Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Berteaud | bc1bafac87 | |
Daniel Berteaud | a8f0dffe0e | |
Daniel Berteaud | 86fdefbde6 | |
Daniel Berteaud | 2eac50ae7c | |
Daniel Berteaud | 31e24819fd | |
Daniel Berteaud | 56a73d9c17 | |
Daniel Berteaud | 6c42871330 | |
Daniel Berteaud | 70018ad822 | |
Daniel Berteaud | 643b19194d | |
Daniel Berteaud | d4a869809e |
|
@ -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.
|
|
@ -0,0 +1 @@
|
||||||
|
0.2.2-1 ./
|
|
@ -0,0 +1 @@
|
||||||
|
../../tito_libs/releasers.conf
|
|
@ -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
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
if ($fastcgi_mod eq 'mod_fastcgi'){
|
||||||
|
$OUT .=<<_EOF;
|
||||||
|
Action phpdokuwiki-fastcgi /php-cgi-bin/phpdokuwiki-wrapper
|
||||||
|
Alias /php-cgi-bin/phpdokuwiki-wrapper /var/www/php-cgi-bin/phpdokuwiki-wrapper
|
||||||
|
FastCgiExternalServer /var/www/php-cgi-bin/phpdokuwiki-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock -pass-header Authorization -idle-timeout 120
|
||||||
|
_EOF
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,28 @@ if (($dokuwiki{'status'} || 'disabled') eq 'enabled'){
|
||||||
'SSLRequireSSL on':'# SSL is not encforced';
|
'SSLRequireSSL on':'# SSL is not encforced';
|
||||||
my $maxsize = $dokuwiki{'MaxUploadSize'} || '200';
|
my $maxsize = $dokuwiki{'MaxUploadSize'} || '200';
|
||||||
$maxsize .= 'M' unless ($maxsize =~ m/M$/);
|
$maxsize .= 'M' unless ($maxsize =~ m/M$/);
|
||||||
|
my $php =<<_EOF;
|
||||||
|
|
||||||
|
AddType application/x-httpd-php .php
|
||||||
|
php_admin_value open_basedir /usr/share/dokuwiki:/var/lib/dokuwiki:/etc/dokuwiki:/dev/urandom
|
||||||
|
php_admin_value memory_limit 128M
|
||||||
|
php_admin_value upload_max_filesize $maxsize
|
||||||
|
php_admin_value post_max_size $maxsize
|
||||||
|
php_admin_value upload_tmp_dir /var/lib/dokuwiki/data/tmp
|
||||||
|
php_admin_value session.save_path /var/lib/dokuwiki/data/tmp
|
||||||
|
|
||||||
|
_EOF
|
||||||
|
if ($fastcgi_mod eq 'mod_fastcgi'){
|
||||||
|
$php = "AddHandler phpdokuwiki-fastcgi .php\n";
|
||||||
|
}
|
||||||
|
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
|
||||||
|
$php =<<_EOF;
|
||||||
|
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock|fcgi://localhost"
|
||||||
|
</FilesMatch>
|
||||||
|
_EOF
|
||||||
|
}
|
||||||
|
|
||||||
$OUT .=<<"EOF";
|
$OUT .=<<"EOF";
|
||||||
|
|
||||||
|
@ -19,17 +41,11 @@ $alias
|
||||||
<Directory /usr/share/dokuwiki>
|
<Directory /usr/share/dokuwiki>
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Options +FollowSymlinks
|
Options +FollowSymlinks
|
||||||
AddType application/x-httpd-php .php
|
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from $allow
|
Allow from $allow
|
||||||
$ssl
|
$ssl
|
||||||
$auth
|
$auth
|
||||||
php_admin_value open_basedir /usr/share/dokuwiki:/var/lib/dokuwiki:/etc/dokuwiki:/dev/urandom
|
$php
|
||||||
php_admin_value memory_limit 128M
|
|
||||||
php_admin_value upload_max_filesize $maxsize
|
|
||||||
php_admin_value post_max_size $maxsize
|
|
||||||
php_admin_value upload_tmp_dir /var/lib/dokuwiki/data/tmp
|
|
||||||
php_admin_value session.save_path /var/lib/dokuwiki/data/tmp
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /usr/share/dokuwiki/inc>
|
<Directory /usr/share/dokuwiki/inc>
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
if ($PHP_VERSION eq '__PHP_VERSION__'){
|
||||||
|
if (($dokuwiki{'status'} || 'disabled') eq 'enabled'){
|
||||||
|
my $max_upload_size = ($dokuwiki{MaxUploadSize} || '20') . 'M';
|
||||||
|
my $id = 'dokuwiki';
|
||||||
|
$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] = 60
|
||||||
|
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/dokuwiki:/var/lib/dokuwiki:/etc/dokuwiki:/dev/urandom
|
||||||
|
php_admin_flag[allow_url_fopen] = on
|
||||||
|
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
|
||||||
|
|
||||||
|
_EOF
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$OUT .= '; Dl is disabled';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,8 +47,16 @@ class auth_plugin_authhttpldap extends auth_plugin_authldap {
|
||||||
function trustExternal($user,$pass,$sticky=false){
|
function trustExternal($user,$pass,$sticky=false){
|
||||||
global $USERINFO;
|
global $USERINFO;
|
||||||
$success = false;
|
$success = false;
|
||||||
if (!isset($_SERVER['REMOTE_USER'])) return false;
|
if (isset($_SERVER['REMOTE_USER'])){
|
||||||
$username = $_SERVER['REMOTE_USER'];
|
$username = $_SERVER['REMOTE_USER'];
|
||||||
|
}
|
||||||
|
elseif (isset($_SERVER['REDIRECT_REMOTE_USER'])){
|
||||||
|
$username = $_SERVER['REDIRECT_REMOTE_USER'];
|
||||||
|
$_SERVER['REMOTE_USER'] = $username;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$this->_debug('LemonLDAP::NG Login Name: '.htmlspecialchars($username),0,__LINE__,__FILE__);
|
$this->_debug('LemonLDAP::NG Login Name: '.htmlspecialchars($username),0,__LINE__,__FILE__);
|
||||||
if (!empty($username)){
|
if (!empty($username)){
|
||||||
$USERINFO = $this->getUserData($username,true);
|
$USERINFO = $this->getUserData($username,true);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
base authhttpldap
|
base authhttpldap
|
||||||
author Daniel Berteaud
|
author Daniel Berteaud
|
||||||
email daniel@firewall-services.com
|
email daniel@firewall-services.com
|
||||||
date 2014-05-06
|
date 2017-07-17
|
||||||
name HTTP+LDAP auth plugin
|
name HTTP+LDAP auth plugin
|
||||||
desc This plugin uses a basic HTTP authentication, but LDAP to get info and authorization
|
desc This plugin uses a basic HTTP authentication, but LDAP to get info and authorization
|
||||||
url https://www.firewall-services.com
|
url https://www.firewall-services.com
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
# Authority: vip-ire
|
%define phpversion 71
|
||||||
# Name: Daniel Berteaud
|
|
||||||
|
|
||||||
%define name smeserver-dokuwiki
|
|
||||||
%define version 0.1.7
|
|
||||||
%define release 1
|
|
||||||
Summary: sme server integration of dokuwiki
|
Summary: sme server integration of dokuwiki
|
||||||
Name: %{name}
|
Name: smeserver-dokuwiki
|
||||||
Version: %{version}
|
Version: 0.2.2
|
||||||
Release: %{release}%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GNU GPL
|
License: GNU GPL
|
||||||
URL: http://www.splitbrain.org/projects/dokuwiki
|
URL: http://www.splitbrain.org/projects/dokuwiki
|
||||||
Group: SMEserver/addon
|
Group: SMEserver/addon
|
||||||
|
@ -26,6 +22,15 @@ smserver integration of dokuwiki
|
||||||
DokuWiki is a simple to use Wiki aimed at the documentation needs of a small company
|
DokuWiki is a simple to use Wiki aimed at the documentation needs of a small company
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 22 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.2-1
|
||||||
|
- Fix permissions on plugin dir (daniel@firewall-services.com)
|
||||||
|
|
||||||
|
* Sun Nov 19 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.1-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
|
* Fri Jul 14 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1
|
||||||
|
- Switch to php 71 using FastCGI and FPM is available
|
||||||
|
|
||||||
* Wed Mar 15 2017 Daniel Berteaud <daniel@firewall-services.com> 0.1.7-1
|
* Wed Mar 15 2017 Daniel Berteaud <daniel@firewall-services.com> 0.1.7-1
|
||||||
- Add /dev/urandom to open_basedir, needed since 2017-02-19
|
- Add /dev/urandom to open_basedir, needed since 2017-02-19
|
||||||
|
|
||||||
|
@ -61,12 +66,21 @@ DokuWiki is a simple to use Wiki aimed at the documentation needs of a small com
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl ./createlinks
|
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/dokuwiki
|
||||||
|
%{__mkdir_p} root/var/lib/php/dokuwiki/{tmp,session,opcache}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||||
rm -f %{name}-%{version}-filelist
|
rm -f %{name}-%{version}-filelist
|
||||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||||
|
--dir /var/log/php/dokuwiki 'attr(0770,root,www)' \
|
||||||
|
--dir /var/lib/php/dokuwiki 'attr(0770,root,www)' \
|
||||||
|
--dir /var/lib/php/dokuwiki/tmp 'attr(0770,root,www)' \
|
||||||
|
--dir /var/lib/php/dokuwiki/opcache 'attr(0770,root,www)' \
|
||||||
|
--dir /var/lib/php/dokuwiki/session 'attr(0770,root,www)' \
|
||||||
|
--dir /usr/share/dokuwiki/lib/plugins 'attr(0755,www,www)' \
|
||||||
> %{name}-%{version}-filelist
|
> %{name}-%{version}-filelist
|
||||||
|
|
||||||
%files -f %{name}-%{version}-filelist
|
%files -f %{name}-%{version}-filelist
|
||||||
|
|
Loading…
Reference in New Issue