Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8528f83fb0 | ||
|
1e3940ebcf | ||
|
ea995a00cd | ||
|
e16a36fe97 | ||
|
fd758b930b | ||
|
ac89dac938 | ||
|
65b0c3e60a | ||
|
8dacc3e1a7 | ||
|
2e4c0c312a | ||
|
5e9a9489de | ||
|
f6928fbd5b | ||
|
f1ab5e2195 | ||
|
47287ab61f | ||
|
18bc9ed30a | ||
|
f9da9e670f | ||
|
9d8dcb147c | ||
|
66cd0917bb | ||
|
6c1b33e547 | ||
|
52db1b9e75 | ||
|
1affd0666b | ||
|
8300d5f428 | ||
|
e2c18a4b78 | ||
|
a21a1117c2 | ||
|
df1608db0f | ||
|
c1b0d270c0 | ||
|
1d7195efc1 | ||
|
eba4367fc5 | ||
|
a29afa4b7c | ||
|
7d02690e47 | ||
|
cbe6f3fdf2 | ||
|
8e51f07b72 | ||
|
e51e9bf577 |
3
.tito/packages/.readme
Normal file
3
.tito/packages/.readme
Normal file
|
@ -0,0 +1,3 @@
|
|||
the .tito/packages directory contains metadata files
|
||||
named after their packages. Each file has the latest tagged
|
||||
version and the project's relative directory.
|
1
.tito/packages/smeserver-dl
Normal file
1
.tito/packages/smeserver-dl
Normal file
|
@ -0,0 +1 @@
|
|||
0.2.3-1 ./
|
1
.tito/releasers.conf
Symbolic link
1
.tito/releasers.conf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../tito_libs/releasers.conf
|
6
.tito/tito.props
Normal file
6
.tito/tito.props
Normal file
|
@ -0,0 +1,6 @@
|
|||
[buildconfig]
|
||||
builder = tito.builder.Builder
|
||||
tagger = tito.tagger.VersionTagger
|
||||
changelog_do_not_remove_cherrypick = 0
|
||||
changelog_format = %s (%ae)
|
||||
lib_dir = ../tito_libs
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
su -s /bin/bash - -c "cd /usr/share/dl/include/scripts && /usr/bin/php ./expire.php"
|
||||
su -s /bin/bash -c "cd /usr/share/dl/include/scripts && /usr/bin/php__PHP_VERSION__ ./expire.php"
|
||||
|
|
|
@ -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 ./dbupgrade.php"
|
||||
su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php__PHP_VERSION__ ./dbupgrade.php"
|
||||
fi
|
||||
|
||||
/usr/bin/mysql <<EOF
|
||||
|
@ -43,6 +43,10 @@ REPLACE INTO db (
|
|||
'N', 'Y', 'Y');
|
||||
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
use $db
|
||||
INSERT INTO user (\\`name\\`,\\`role_id\\`) VALUES ('admin', '1') ON DUPLICATE KEY update role_id='1';
|
||||
|
||||
EOF
|
||||
END
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
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
|
||||
}
|
||||
}
|
|
@ -15,6 +15,7 @@ if ($authtype eq 'http'){
|
|||
SSLRequireSSL on
|
||||
AuthName "dl"
|
||||
AuthType Basic
|
||||
AuthBasicProvider external
|
||||
AuthExternal pwauth
|
||||
Require valid-user
|
||||
</FilesMatch>
|
||||
|
@ -22,15 +23,8 @@ EOF
|
|||
}
|
||||
if ($dl{'status'} eq 'enabled'){
|
||||
|
||||
$OUT .=<<"END"
|
||||
|
||||
# dl Configuration
|
||||
$alias
|
||||
|
||||
<Directory /usr/share/dl>
|
||||
AllowOverride Limit
|
||||
my $php =<<_EOF;
|
||||
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
|
||||
|
@ -42,6 +36,26 @@ $alias
|
|||
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
|
||||
|
|
52
root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Dl
Normal file
52
root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15Dl
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
%define name smeserver-dl
|
||||
%define version 0.1.0
|
||||
%define release 1
|
||||
%define phpversion 56
|
||||
|
||||
Summary: sme server integration of dl
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
Name: smeserver-dl
|
||||
Version: 0.2.3
|
||||
Release: 1%{?dist}
|
||||
Epoch: 9
|
||||
License: GNU GPL version 2
|
||||
URL: http://www.thregr.org/~wavexx/software/dl/
|
||||
Group: SMEserver/addon
|
||||
|
@ -21,20 +21,55 @@ 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
|
||||
|
||||
* Tue Feb 4 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1.sme
|
||||
- Grant admin privileges to the admin user
|
||||
|
||||
* Sun Nov 24 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1.sme
|
||||
- Automatically upgrade the database
|
||||
|
||||
* Fri Nov 22 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1.sme
|
||||
- First release
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%setup -q
|
||||
|
||||
%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
|
||||
|
|
Loading…
Reference in New Issue
Block a user