Compare commits

..

No commits in common. "master" and "0.1.4_el6" have entirely different histories.

10 changed files with 16 additions and 126 deletions

View File

@ -1,3 +0,0 @@
the .tito/packages directory contains metadata files
named after their packages. Each file has the latest tagged
version and the project's relative directory.

View File

@ -1 +0,0 @@
0.2.3-1 ./

View File

@ -1 +0,0 @@
../../tito_libs/releasers.conf

View File

@ -1,6 +0,0 @@
[buildconfig]
builder = tito.builder.Builder
tagger = tito.tagger.VersionTagger
changelog_do_not_remove_cherrypick = 0
changelog_format = %s (%ae)
lib_dir = ../tito_libs

View File

@ -1,2 +1,2 @@
#!/bin/sh
su -s /bin/bash -c "cd /usr/share/dl/include/scripts && /usr/bin/php__PHP_VERSION__ ./expire.php"
su -s /bin/bash -c "cd /usr/share/dl/include/scripts && /usr/bin/php ./expire.php"

View File

@ -11,7 +11,7 @@ if [ ! -d /var/lib/mysql/$db ]; then
/usr/bin/mysql -e 'create database $db'
/usr/bin/mysql $db < $dbstruct
else
su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php__PHP_VERSION__ ./dbupgrade.php"
su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php ./dbupgrade.php"
fi
/usr/bin/mysql <<EOF

View File

@ -1,9 +0,0 @@
{
if ($fastcgi_mod eq 'mod_fastcgi'){
$OUT .=<<_EOF;
Action phpdl-fastcgi /php-cgi-bin/phpdl-wrapper
Alias /php-cgi-bin/phpdl-wrapper /var/www/php-cgi-bin/phpdl-wrapper
FastCgiExternalServer /var/www/php-cgi-bin/phpdl-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-dl.sock -pass-header Authorization -idle-timeout 120
_EOF
}
}

View File

@ -23,8 +23,15 @@ EOF
}
if ($dl{'status'} eq 'enabled'){
my $php =<<_EOF;
$OUT .=<<"END"
# dl Configuration
$alias
<Directory /usr/share/dl>
AllowOverride Limit
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/dl:/etc/dl.php:/var/lib/dl:/var/log/dl.log
php_admin_flag file_uploads On
php_admin_flag magic_quotes Off
php_admin_flag magic_quotes_gpc Off
@ -36,26 +43,6 @@ if ($dl{'status'} eq 'enabled'){
php_admin_value upload_tmp_dir /var/lib/dl/tmp
php_admin_value session.save_path /var/lib/dl/tmp
php_admin_value session.gc_maxlifetime 86400
_EOF
if ($fastcgi_mod eq 'mod_fastcgi'){
$php = " AddHandler phpdl-fastcgi .php\n";
}
elsif ($fascgi_mod eq 'mod_proxy_fcgi'){
$php =<<'_EOF';
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-dl.sock|fcgi://localhost"
</FilesMatch>
_EOF
}
$OUT .=<<"END"
# dl Configuration
$alias
<Directory /usr/share/dl>
AllowOverride Limit
$php
order deny,allow
deny from all
allow from $allow

View File

@ -1,52 +0,0 @@
{
if ($PHP_VERSION eq '__PHP_VERSION__'){
if (($dl{'status'} || 'disabled') eq 'enabled'){
my $max_upload_size = ($dl{MaxUploadSize} || '4096');
$max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/);
my $id = 'dl';
$OUT .=<<_EOF;
[php$PHP_VERSION-$id]
user = www
group = www
listen.owner = root
listen.group = www
listen.mode = 0660
listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
pm = dynamic
pm.max_children = 15
pm.start_servers = 3
pm.min_spare_servers = 3
pm.max_spare_servers = 4
pm.max_requests = 1000
php_admin_value[session.save_path] = /var/lib/php/$id/session
php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
php_admin_value[error_log] = /var/log/php/$id/error.log
slowlog = /var/log/php/dl/slow.log
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
php_admin_flag[display_errors] = off
php_admin_flag[log_errors] = on
php_admin_value[error_log] = syslog
php_admin_value[memory_limit] = 128M
php_admin_value[max_execution_time] = 0
php_admin_value[post_max_size] = $max_upload_size
php_admin_value[upload_max_filesize] = $max_upload_size
php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd
php_admin_value[open_basedir] = /usr/share/dl:/etc/dl.php:/var/lib/dl:/var/log/dl.log:/var/lib/php/dl
php_admin_flag[allow_url_fopen] = off
php_admin_flag[file_upload] = on
php_admin_flag[session.cookie_httponly] = on
php_admin_flag[allow_url_include] = off
php_admin_value[session.save_handler] = files
php_admin_flag[output_buffering] = off
_EOF
}
else{
$OUT .= '; Dl is disabled';
}
}
}

View File

@ -1,9 +1,10 @@
%define phpversion 56
%define name smeserver-dl
%define version 0.1.3
%define release 1
Summary: sme server integration of dl
Name: smeserver-dl
Version: 0.2.3
Release: 1%{?dist}
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Epoch: 9
License: GNU GPL version 2
URL: http://www.thregr.org/~wavexx/software/dl/
@ -21,24 +22,6 @@ Requires: smeserver-webapps-common
smserver integration of dl
%changelog
* Sun Jan 21 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.3-1
- Use alt php binary when expiring tickets [SME: 10495] (daniel@firewall-
services.com)
* Sun Nov 19 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.2-1
- Prepare spec file for tito (daniel@firewall-services.com)
* Wed Jul 26 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.1-1.sme
- Add /var/lib/php/dl to open_basedir for the fpm pool
- Assume MB if no unit is specified for max file size
- Remove hardcoded PHP version, replaced at build time
* Thu Jul 13 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1.sme
- Support smeserver-php-fpm
* Tue May 31 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.4-1.sme
- Fix cron job output [SME: 9116]
* Wed Apr 23 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.3-1.sme
- Fix basic auth on SME9
@ -56,20 +39,12 @@ smserver integration of dl
%build
perl ./createlinks
find root/ -type f | xargs grep -l __PHP_VERSION__ | xargs sed -i -e "s/__PHP_VERSION__/%{phpversion}/g"
%{__mkdir_p} root/var/log/php/dl
%{__mkdir_p} root/var/lib/php/dl/{tmp,opcache,session}
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--dir /var/log/php/dl 'attr(0770,root,www)' \
--dir /var/lib/php/dl 'attr(0770,root,www)' \
--dir /var/lib/php/dl/tmp 'attr(0770,root,www)' \
--dir /var/lib/php/dl/opcache 'attr(0770,root,www)' \
--dir /var/lib/php/dl/session 'attr(0770,root,www)' \
> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist