Changeset 2162


Ignore:
Timestamp:
01/16/19 15:08:45 (5 years ago)
Author:
nanardon
Message:

Changes for mageia6

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/etc/httpd/latmos-accounts-web.conf

    r561 r2162  
    1 <IfModule mod_proxy.c> 
    2         <Proxy *> 
    3         Order deny,allow 
    4         Allow from all 
    5         </Proxy> 
     1<Location /> 
     2        Order allow,deny 
     3        Allow From all 
     4        Satisfy any 
    65 
    7         # ReverseProxy 
    8         ProxyRequests Off 
    9         ProxyPass / http://localhost:4000/ 
    10         ProxyPassReverse / http://localhost:4000/ 
    11 </IfModule> 
     6        Options ExecCGI 
     7        AddHandler fcgid-script .pl 
     8</Location> 
    129 
    13 <IfModule mod_cache.c> 
    14         CacheDisable / 
    15 </IfModule> 
     10FcgidPassHeader Authorization 
     11Alias / /var/www/cgi-bin/latmos_accounts_web_fastcgi.pl/ 
  • trunk/LATMOS-Accounts-Web/etc/init.d/latmos-accounts-web

    r666 r2162  
    2121function start () { 
    2222    gprintf "Starting %s: " "$prog" 
    23     daemon --user $USER /usr/bin/latmos_accounts_web_server.pl --daemon --fork --port $PORT --host localhost --forcehttps 2>/dev/null 
     23    daemon --user $USER /usr/bin/latmos_accounts_web_server.pl -p $PORT --host localhost --background 2>/dev/null 
    2424    [ $? -eq 0 ] && success || failure 
    2525    touch /var/lock/subsys/$prog 
  • trunk/LATMOS-Accounts-Web/latmos-accounts-web.spec.in

    r2153 r2162  
    7878install -m 640 etc/httpd/latmos-accounts-web.conf %buildroot/%_sysconfdir/httpd/conf/webapps.d/ 
    7979 
    80 mkdir -p %buildroot/%_sysconfdir/init.d 
    81 install -m 750 etc/init.d/latmos-accounts-web %buildroot/%_sysconfdir/init.d/latmos-accounts-web 
     80mkdir -p %buildroot%_sysconfdir/sudoers.d 
     81install -m 644 etc/sudoers.d/latmos-accounts %buildroot%_sysconfdir/sudoers.d/ 
    8282 
    8383%clean 
    8484rm -rf %buildroot 
    8585 
    86 %preun 
    87 %_preun_service %name 
    88  
    8986%post 
    90 %_post_service %name 
    9187if [ "$1" -ge "1" ] ; then 
    92     /sbin/service %name restart 
     88    /sbin/service httpd restart 
    9389fi 
    9490 
    9591%triggerpostun -- latmos-accounts 
    96 /sbin/service %name restart 
     92/sbin/service httpd restart 
    9793 
    9894%files 
     
    105101%_var/www/*/*.pl 
    106102%config(noreplace) %_sysconfdir/httpd/conf/webapps.d/* 
    107 %_sysconfdir/init.d/latmos-accounts-web 
    108103%config(noreplace) %_sysconfdir/latmos-accounts/* 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm

    r2157 r2162  
    2525    /; 
    2626 
    27 our $VERSION = '5.2.31'; 
     27our $VERSION = '5.2.33'; 
    2828 
    2929# Configure the application.  
     30__PACKAGE__->config( 
     31    encoding => 'UTF-8', 
     32    'Plugin::I18N' => { 
     33        'maketext_options' => { 
     34            Decode => 1 
     35        } 
     36    } 
     37); 
    3038 
    3139# Default value for active/inactive features 
     
    105113}; 
    106114 
    107 __PACKAGE__->config->{'Plugin::I18N'} = { 
    108     'maketext_options' => { 
    109         Decode => 0 
    110     } 
    111 }; 
    112  
    113  
    114115# 1 week for session 
    115116__PACKAGE__->config->{'Plugin::Session'} = { 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r2155 r2162  
    66use LATMOS::Accounts::Log; 
    77use HTML::Prototype; 
     8use utf8; 
    89 
    910=head1 NAME 
     
    347348            or return $attr; 
    348349        my $label = $oattr->label; 
    349         utf8::encode($label); 
    350350        return $label; 
    351351    } 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TT.pm

    r1326 r2162  
    1212    PRE_PROCESS  => 'includes/defs.tt', 
    1313    WRAPPER      => 'includes/wrapper.tt', 
     14    ENCODING     => 'utf-8', 
    1415); 
    1516 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm

    r1081 r2162  
    1111    ], 
    1212    PRE_PROCESS  => 'includes/defs.tt', 
     13    ENCODING     => 'utf-8', 
    1314); 
    1415 
  • trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_cgi.pl

    r94 r2162  
    1 #!/usr/bin/perl -w 
     1#!/usr/bin/env perl 
    22 
    3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } 
    4  
    5 use strict; 
    6 use warnings; 
    7 use FindBin; 
    8 use lib "$FindBin::Bin/../lib"; 
    9 use LATMOS::Accounts::Web; 
    10  
    11 LATMOS::Accounts::Web->run; 
     3use Catalyst::ScriptRunner; 
     4Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'CGI'); 
    125 
    1361; 
     
    2316=head1 DESCRIPTION 
    2417 
    25 Run a Catalyst application as a cgi script. 
     18Run a Catalyst application as a CGI script. 
    2619 
    27 =head1 AUTHOR 
     20=head1 AUTHORS 
    2821 
    29 Sebastian Riedel, C<sri@oook.de> 
     22Catalyst Contributors, see Catalyst.pm 
    3023 
    3124=head1 COPYRIGHT 
    3225 
    33  
    34 This library is free software, you can redistribute it and/or modify 
     26This library is free software. You can redistribute it and/or modify 
    3527it under the same terms as Perl itself. 
    3628 
    3729=cut 
     30 
  • trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_create.pl

    r94 r2162  
    1 #!/usr/bin/perl -w 
     1#!/usr/bin/env perl 
    22 
    33use strict; 
    44use warnings; 
    5 use Getopt::Long; 
    6 use Pod::Usage; 
    7 use Catalyst::Helper; 
    85 
    9 my $force = 0; 
    10 my $mech  = 0; 
    11 my $help  = 0; 
    12  
    13 GetOptions( 
    14     'nonew|force'    => \$force, 
    15     'mech|mechanize' => \$mech, 
    16     'help|?'         => \$help 
    17  ); 
    18  
    19 pod2usage(1) if ( $help || !$ARGV[0] ); 
    20  
    21 my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } ); 
    22  
    23 pod2usage(1) unless $helper->mk_component( 'LATMOS::Accounts::Web', @ARGV ); 
     6use Catalyst::ScriptRunner; 
     7Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Create'); 
    248 
    2591; 
     
    3418 
    3519 Options: 
    36    -force        don't create a .new file where a file to be created exists 
    37    -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available 
    38    -help         display this help and exits 
     20   --force        don't create a .new file where a file to be created exists 
     21   --mechanize    use Test::WWW::Mechanize::Catalyst for tests if available 
     22   --help         display this help and exits 
    3923 
    4024 Examples: 
    4125   latmos_accounts_web_create.pl controller My::Controller 
    42    latmos_accounts_web_create.pl -mechanize controller My::Controller 
     26   latmos_accounts_web_create.pl --mechanize controller My::Controller 
    4327   latmos_accounts_web_create.pl view My::View 
    44    latmos_accounts_web_create.pl view MyView TT 
    45    latmos_accounts_web_create.pl view TT TT 
     28   latmos_accounts_web_create.pl view HTML TT 
    4629   latmos_accounts_web_create.pl model My::Model 
    4730   latmos_accounts_web_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ 
    4831   dbi:SQLite:/tmp/my.db 
    4932   latmos_accounts_web_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\ 
    50    dbi:Pg:dbname=foo root 4321 
     33   [Loader opts like db_schema, naming] dbi:Pg:dbname=foo root 4321 
     34   [connect_info opts like quote_char, name_sep] 
    5135 
    5236 See also: 
    5337   perldoc Catalyst::Manual 
    5438   perldoc Catalyst::Manual::Intro 
     39   perldoc Catalyst::Helper::Model::DBIC::Schema 
     40   perldoc Catalyst::Model::DBIC::Schema 
     41   perldoc Catalyst::View::TT 
    5542 
    5643=head1 DESCRIPTION 
     
    6249This behavior can be suppressed with the C<-force> option. 
    6350 
    64 =head1 AUTHOR 
     51=head1 AUTHORS 
    6552 
    66 Sebastian Riedel, C<sri@oook.de> 
    67 Maintained by the Catalyst Core Team. 
     53Catalyst Contributors, see Catalyst.pm 
    6854 
    6955=head1 COPYRIGHT 
    7056 
    71 This library is free software, you can redistribute it and/or modify 
     57This library is free software. You can redistribute it and/or modify 
    7258it under the same terms as Perl itself. 
    7359 
  • trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_fastcgi.pl

    r94 r2162  
    1 #!/usr/bin/perl -w 
     1#!/usr/bin/env perl 
    22 
    3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } 
    4  
    5 use strict; 
    6 use warnings; 
    7 use Getopt::Long; 
    8 use Pod::Usage; 
    9 use FindBin; 
    10 use lib "$FindBin::Bin/../lib"; 
    11 use LATMOS::Accounts::Web; 
    12  
    13 my $help = 0; 
    14 my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr ); 
    15   
    16 GetOptions( 
    17     'help|?'      => \$help, 
    18     'listen|l=s'  => \$listen, 
    19     'nproc|n=i'   => \$nproc, 
    20     'pidfile|p=s' => \$pidfile, 
    21     'manager|M=s' => \$manager, 
    22     'daemon|d'    => \$detach, 
    23     'keeperr|e'   => \$keep_stderr, 
    24 ); 
    25  
    26 pod2usage(1) if $help; 
    27  
    28 LATMOS::Accounts::Web->run(  
    29     $listen,  
    30     {   nproc   => $nproc, 
    31         pidfile => $pidfile,  
    32         manager => $manager, 
    33         detach  => $detach, 
    34         keep_stderr => $keep_stderr, 
    35     } 
    36 ); 
     3use Catalyst::ScriptRunner; 
     4Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'FastCGI'); 
    375 
    3861; 
     
    4513 
    4614latmos_accounts_web_fastcgi.pl [options] 
    47   
     15 
    4816 Options: 
    49    -? -help      display this help and exits 
    50    -l -listen    Socket path to listen on 
     17   -? --help      display this help and exit 
     18   -l --listen   socket path to listen on 
    5119                 (defaults to standard input) 
    5220                 can be HOST:PORT, :PORT or a 
    5321                 filesystem path 
    54    -n -nproc     specify number of processes to keep 
     22   -n --nproc    specify number of processes to keep 
    5523                 to serve requests (defaults to 1, 
    56                  requires -listen) 
    57    -p -pidfile   specify filename for pid file 
    58                  (requires -listen) 
    59    -d -daemon    daemonize (requires -listen) 
    60    -M -manager   specify alternate process manager 
     24                 requires --listen) 
     25   -p --pidfile  specify filename for pid file 
     26                 (requires --listen) 
     27   -d --daemon   daemonize (requires --listen) 
     28   -M --manager  specify alternate process manager 
    6129                 (FCGI::ProcManager sub-class) 
    6230                 or empty string to disable 
    63    -e -keeperr   send error messages to STDOUT, not 
     31   -e --keeperr  send error messages to STDOUT, not 
    6432                 to the webserver 
     33   --proc_title  Set the process title (if possible) 
    6534 
    6635=head1 DESCRIPTION 
    6736 
    68 Run a Catalyst application as fastcgi. 
     37Run a Catalyst application as FastCGI. 
    6938 
    70 =head1 AUTHOR 
     39=head1 AUTHORS 
    7140 
    72 Sebastian Riedel, C<sri@oook.de> 
    73 Maintained by the Catalyst Core Team. 
     41Catalyst Contributors, see Catalyst.pm 
    7442 
    7543=head1 COPYRIGHT 
    7644 
    77 This library is free software, you can redistribute it and/or modify 
     45This library is free software. You can redistribute it and/or modify 
    7846it under the same terms as Perl itself. 
    7947 
  • trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_server.pl

    r1539 r2162  
    1 #!/usr/bin/perl -w 
     1#!/usr/bin/env perl 
    22 
    3 BEGIN {  
    4     $ENV{CATALYST_ENGINE} ||= 'HTTP'; 
    5     $ENV{CATALYST_SCRIPT_GEN} = 30; 
    6     require Catalyst::Engine::HTTP; 
    7  
    8  
    9 use strict; 
    10 use warnings; 
    11 use Getopt::Long; 
    12 use Pod::Usage; 
    13 use FindBin; 
    14 use lib "$FindBin::Bin/../lib"; 
    15  
    16 my $debug             = 0; 
    17 my $daemon            = 0; 
    18 my $fork              = 0; 
    19 my $help              = 0; 
    20 my $host              = undef; 
    21 my $port              = 3000; 
    22 my $keepalive         = 0; 
    23 my $restart           = 0; 
    24 my $restart_delay     = 1; 
    25 my $restart_regex     = '\.yml$|\.yaml$|\.pm$'; 
    26 my $restart_directory = undef; 
    27 my $forcehttps        = 0; 
    28  
    29 my @argv = @ARGV; 
    30  
    31 GetOptions( 
    32     'debug|d'             => \$debug, 
    33     'fork'                => \$fork, 
    34     'daemon'              => \$daemon, 
    35     'help|?'              => \$help, 
    36     'host=s'              => \$host, 
    37     'port=s'              => \$port, 
    38     'keepalive|k'         => \$keepalive, 
    39     'restart|r'           => \$restart, 
    40     'restartdelay|rd=s'   => \$restart_delay, 
    41     'restartregex|rr=s'   => \$restart_regex, 
    42     'restartdirectory=s'  => \$restart_directory, 
    43     'forcehttps'          => \$forcehttps, 
    44 ); 
    45  
    46 pod2usage(1) if $help; 
    47  
    48 if ( $restart ) { 
    49     $ENV{CATALYST_ENGINE} = 'HTTP::Restarter'; 
    50 } 
    51 if ( $debug ) { 
    52     $ENV{CATALYST_DEBUG} = 1; 
    53 } 
    54 if ( $forcehttps ) { 
    55     $ENV{HTTPS} = 'ON'; 
     3BEGIN { 
     4    $ENV{CATALYST_SCRIPT_GEN} = 40; 
    565} 
    576 
    58 if ($daemon) { 
    59     require POSIX; 
    60     my $childpid = fork; 
    61     if ($childpid) { 
    62        exit(0); 
    63     } 
    64     # child now 
    65     open STDIN,  "+</dev/null" or die $!; 
    66     open STDOUT, ">&STDIN"     or die $!; 
    67     open STDERR, ">&STDIN"     or die $!; 
    68 } 
    69  
    70 # This is require instead of use so that the above environment 
    71 # variables can be set at runtime. 
    72 require LATMOS::Accounts::Web; 
    73  
    74 LATMOS::Accounts::Web->run( $port, $host, { 
    75     argv              => \@argv, 
    76     'fork'            => $fork, 
    77     keepalive         => $keepalive, 
    78     restart           => $restart, 
    79     restart_delay     => $restart_delay, 
    80     restart_regex     => qr/$restart_regex/, 
    81     restart_directory => $restart_directory, 
    82 } ); 
     7use Catalyst::ScriptRunner; 
     8Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Server'); 
    839 
    84101; 
     
    8612=head1 NAME 
    8713 
    88 latmos_accounts_web_server.pl - Catalyst Testserver 
     14latmos_accounts_web_server.pl - Catalyst Test Server 
    8915 
    9016=head1 SYNOPSIS 
     
    9218latmos_accounts_web_server.pl [options] 
    9319 
    94  Options: 
    95    -d -debug          force debug mode 
    96    -f -fork           handle each request in a new process 
    97                       (defaults to false) 
    98    -? -help           display this help and exits 
    99       -host           host (defaults to all) 
    100    -p -port           port (defaults to 3000) 
    101    -k -keepalive      enable keep-alive connections 
    102    -r -restart        restart when files get modified 
    103                       (defaults to false) 
    104    -rd -restartdelay  delay between file checks 
    105    -rr -restartregex  regex match files that trigger 
    106                       a restart when modified 
    107                       (defaults to '\.yml$|\.yaml$|\.pm$') 
    108    -restartdirectory  the directory to search for 
    109                       modified files 
    110                       (defaults to '../') 
    111    -forcehttps        force url to https 
     20   -d --debug           force debug mode 
     21   -f --fork            handle each request in a new process 
     22                        (defaults to false) 
     23   -? --help            display this help and exits 
     24   -h --host            host (defaults to all) 
     25   -p --port            port (defaults to 3000) 
     26   -k --keepalive       enable keep-alive connections 
     27   -r --restart         restart when files get modified 
     28                        (defaults to false) 
     29   -rd --restart_delay  delay between file checks 
     30                        (ignored if you have Linux::Inotify2 installed) 
     31   -rr --restart_regex  regex match files that trigger 
     32                        a restart when modified 
     33                        (defaults to '\.yml$|\.yaml$|\.conf|\.pm$') 
     34   --restart_directory  the directory to search for 
     35                        modified files, can be set multiple times 
     36                        (defaults to '[SCRIPT_DIR]/..') 
     37   --follow_symlinks    follow symlinks in search directories 
     38                        (defaults to false. this is a no-op on Win32) 
     39   --background         run the process in the background 
     40   --pidfile            specify filename for pid file 
    11241 
    11342 See also: 
     
    11948Run a Catalyst Testserver for this application. 
    12049 
    121 =head1 AUTHOR 
     50=head1 AUTHORS 
    12251 
    123 Sebastian Riedel, C<sri@oook.de> 
    124 Maintained by the Catalyst Core Team. 
     52Catalyst Contributors, see Catalyst.pm 
    12553 
    12654=head1 COPYRIGHT 
    12755 
    128 This library is free software, you can redistribute it and/or modify 
     56This library is free software. You can redistribute it and/or modify 
    12957it under the same terms as Perl itself. 
    13058 
    13159=cut 
     60 
  • trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_test.pl

    r94 r2162  
    1 #!/usr/bin/perl -w 
     1#!/usr/bin/env perl 
    22 
    3 use strict; 
    4 use warnings; 
    5 use Getopt::Long; 
    6 use Pod::Usage; 
    7 use FindBin; 
    8 use lib "$FindBin::Bin/../lib"; 
    9 use Catalyst::Test 'LATMOS::Accounts::Web'; 
    10  
    11 my $help = 0; 
    12  
    13 GetOptions( 'help|?' => \$help ); 
    14  
    15 pod2usage(1) if ( $help || !$ARGV[0] ); 
    16  
    17 print request($ARGV[0])->content . "\n"; 
     3use Catalyst::ScriptRunner; 
     4Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Test'); 
    185 
    1961; 
     
    2815 
    2916 Options: 
    30    -help    display this help and exits 
     17   --help    display this help and exits 
    3118 
    3219 Examples: 
     
    4229Run a Catalyst action from the command line. 
    4330 
    44 =head1 AUTHOR 
     31=head1 AUTHORS 
    4532 
    46 Sebastian Riedel, C<sri@oook.de> 
    47 Maintained by the Catalyst Core Team. 
     33Catalyst Contributors, see Catalyst.pm 
    4834 
    4935=head1 COPYRIGHT 
    5036 
    51 This library is free software, you can redistribute it and/or modify 
     37This library is free software. You can redistribute it and/or modify 
    5238it under the same terms as Perl itself. 
    5339 
  • trunk/LATMOS-Accounts/etc/sysconfig/latmos-accounts

    r608 r2162  
    11# The user server must run as 
    2 USER=nobody 
     2USER=laccounts 
    33 
    44# The listener port 
  • trunk/LATMOS-Accounts/latmos-accounts.spec.in

    r2134 r2162  
    7979install -m 644 etc/cron.d/latmos-accounts %buildroot/%_sysconfdir/cron.d/latmos-accounts 
    8080 
     81mkdir -p %buildroot%{_localstatedir}/lib/latmos-accounts 
     82 
    8183%clean 
    8284rm -rf %buildroot 
     85 
     86%pre 
     87%_pre_useradd laccounts %{_localstatedir}/lib/latmos-accounts /bin/bash 
    8388 
    8489%preun 
     
    99104%attr(0600,laccounts,laccounts) %config(noreplace) %_sysconfdir/latmos-accounts/* 
    100105%_bindir/* 
    101 %{_mandir}/man1/* 
    102 %{_mandir}/man3/* 
    103 %{_mandir}/man5/* 
    104 %{_mandir}/man8/* 
     106%{_mandir}/man?/* 
    105107%perl_vendorlib/* 
    106108%_datadir/latmos-accounts 
    107109%_datadir/locale/* 
     110%attr(0600,laccounts,laccounts) %{_localstatedir}/lib/latmos-accounts 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r2157 r2162  
    1212use LATMOS::Accounts::I18N; 
    1313 
    14 our $VERSION = '5.2.31'; 
     14our $VERSION = '5.2.33'; 
    1515 
    1616=head1 NAME 
Note: See TracChangeset for help on using the changeset viewer.