packages: dokuwiki/dokuwiki-config.patch, dokuwiki/dokuwiki-paths.patch, do...

glen glen at pld-linux.org
Sun Jun 24 22:50:46 CEST 2012


Author: glen                         Date: Sun Jun 24 20:50:46 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 2012-06-24 snapshot

---- Files affected:
packages/dokuwiki:
   dokuwiki-config.patch (1.18 -> 1.19) , dokuwiki-paths.patch (1.6 -> 1.7) , dokuwiki.spec (1.106 -> 1.107) , pld-branding.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/dokuwiki/dokuwiki-config.patch
diff -u packages/dokuwiki/dokuwiki-config.patch:1.18 packages/dokuwiki/dokuwiki-config.patch:1.19
--- packages/dokuwiki/dokuwiki-config.patch:1.18	Fri Jan 27 08:42:17 2012
+++ packages/dokuwiki/dokuwiki-config.patch	Sun Jun 24 22:50:40 2012
@@ -1,31 +1,23 @@
---- dokuwiki-2012-01-25/conf/dokuwiki.php~	2012-01-27 09:33:02.000000000 +0200
-+++ dokuwiki-2012-01-25/conf/dokuwiki.php	2012-01-27 09:33:34.363230629 +0200
-@@ -19,7 +19,7 @@
- $conf['basedir']     = '';                //absolute dir from serveroot - blank for autodetection
- $conf['baseurl']     = '';                //URL to server including protocol - blank for autodetect
- $conf['cookiedir']   = '';                //Cookie path. Leave blank for using baseurl.
--$conf['savedir']     = './data';          //where to store all the files
-+$conf['savedir']     = '/var/lib/dokuwiki';  //where to store all the files
- $conf['allowdebug']  = 0;                 //allow debug output, enable if needed 0|1
- $conf['mediarevisions'] = 1;              //enable/disable media revisions
- 
-@@ -26,7 +26,7 @@
- $conf['start']       = 'start';           //name of start page
- $conf['title']       = 'PLD Linux DokuWiki'; //what to show in the title
- $conf['template']    = 'default';         //see lib/tpl directory
+--- dokuwiki-2012-06-23/conf/dokuwiki.php~	2012-06-23 13:08:48.000000000 +0300
++++ dokuwiki-2012-06-23/conf/dokuwiki.php	2012-06-23 13:09:12.871130284 +0300
+@@ -19,8 +19,8 @@
+ $conf['template']    = 'dokuwiki';         //see lib/tpl directory
+ $conf['tagline']     = '';                //tagline in header (if template supports it)
+ $conf['sidebar']     = 'sidebar';         //name of sidebar in root namespace (if template supports it)
 -$conf['license']     = 'cc-by-nc-sa';     //see conf/license.php
+-$conf['savedir']     = './data';          //where to store all the files
 +$conf['license']     = 'publicdomain';    //see conf/license.php
- $conf['fullpath']    = 0;                 //show full path of the document or relative to datadir only? 0|1
- $conf['recent']      = 20;                //how many entries to show in recent
- $conf['breadcrumbs'] = 10;                //how many recent visited pages to show
---- dokuwiki-2012-01-25/install.php~	2012-01-27 09:34:09.000000000 +0200
-+++ dokuwiki-2012-01-25/install.php	2012-01-27 09:34:34.872417423 +0200
-@@ -50,7 +50,7 @@
-     '2010-11-07'   => '7921d48195f4db21b8ead6d9bea801b8',
-     '2011-05-25'   => '4241865472edb6fa14a1227721008072',
++$conf['savedir']     = '/var/lib/dokuwiki';  //where to store all the files
+ $conf['basedir']     = '';                //absolute dir from serveroot - blank for autodetection
+ $conf['baseurl']     = '';                //URL to server including protocol - blank for autodetect
+ $conf['cookiedir']   = '';                //path to use in cookies - blank for basedir
+--- dokuwiki-2012-06-24/install.php~	2012-06-24 21:55:08.000000000 +0300
++++ dokuwiki-2012-06-24/install.php	2012-06-24 21:56:11.184049230 +0300
+@@ -55,6 +55,7 @@
      '2011-11-10'   => 'b46ff19a7587966ac4df61cbab1b8b31',
--    '2012-01-25'   => '72c083c73608fc43c586901fd5dabb74',
-+    '2012-01-25pld' => '9e3d022699048b720ff54b6bdf49118f',
+     '2012-01-25'   => '72c083c73608fc43c586901fd5dabb74',
+     'devel'        => 'eb0b3fc90056fbc12bac6f49f7764df3'
++    'devel-pld'    => 'e41c579c958478060232b8d6a16bc915'
  );
  
  

================================================================
Index: packages/dokuwiki/dokuwiki-paths.patch
diff -u packages/dokuwiki/dokuwiki-paths.patch:1.6 packages/dokuwiki/dokuwiki-paths.patch:1.7
--- packages/dokuwiki/dokuwiki-paths.patch:1.6	Fri Jan 27 08:42:17 2012
+++ packages/dokuwiki/dokuwiki-paths.patch	Sun Jun 24 22:50:40 2012
@@ -1,7 +1,23 @@
---- dokuwiki/inc/init.php~	2009-11-10 15:19:36.000000000 +0200
-+++ dokuwiki/inc/init.php	2009-11-10 15:19:38.080947917 +0200
-@@ -21,7 +21,10 @@
- if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/');
+From f835e03e88ba3cb8de941c7cd0862c57afe22da5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen at delfi.ee>
+Date: Sun, 24 Jun 2012 12:23:30 +0300
+Subject: [PATCH] introduce DOKU_DATA and DOKU_CACHE variables for packaging
+
+add new constants, that makes packaging (rpm, deb) dokuwiki better fit
+to [FHS standards](http://www.pathname.com/fhs/pub/fhs-2.3.html):
+- DOKU_DATA - /var/lib/dokuwiki/
+- DOKU_CACHE - /var/cache/dokuwiki/
+---
+ inc/init.php |    8 +++++++-
+ install.php  |   26 ++++++++++++++------------
+ 2 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/inc/init.php b/inc/init.php
+index 403fbe4..29d96b2 100644
+--- a/inc/init.php
++++ b/inc/init.php
+@@ -23,7 +23,13 @@ if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/
+ if(!defined('DOKU_PLUGIN'))  define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
  
  // define config path (packagers may want to change this to /etc/dokuwiki/)
 -if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
@@ -9,24 +25,45 @@
 +
 +// define path where variable data is saved (packagers may want to change this to /var/lib/dokuwiki/)
 +if(!defined('DOKU_DATA')) define('DOKU_DATA','/var/lib/dokuwiki/');
++
++// define path where cache data saved (packagers may want to change this to /var/cache/dokuwiki/)
++if(!defined('DOKU_CACHE')) define('DOKU_CACHE','/var/cache/dokuwiki/');
  
  // check for error reporting override or set error reporting to sane values
  if (!defined('DOKU_E_LEVEL') && @file_exists(DOKU_CONF.'report_e_all')) {
---- dokuwiki-2012-01-25/install.php~	2012-01-27 09:30:05.000000000 +0200
-+++ dokuwiki-2012-01-25/install.php	2012-01-27 09:31:55.795792191 +0200
-@@ -6,8 +6,9 @@
-  */
+@@ -234,13 +234,14 @@
+             'mediaolddir' => 'media_attic',
+             'metadir'   => 'meta',
+             'mediametadir' => 'media_meta',
+-            'cachedir'  => 'cache',
++            'cachedir'  => '/var/cache/dokuwiki',
+             'indexdir'  => 'index',
+             'lockdir'   => 'locks',
+             'tmpdir'    => 'tmp');
+ 
+     foreach($paths as $c => $p) {
+-        $path = empty($conf[$c]) ? $conf['savedir'].'/'.$p : $conf[$c];
++        $path = empty($conf[$c]) ? $p : $conf[$c];
++        $path = $path[0] == '/' ? $path : $conf['savedir'].'/'.$path;
+         $conf[$c] = init_path($path);
+         if(empty($conf[$c]))
+             nice_die("The $c ('$p') at $path is not found, isn't accessible or writable.
+diff --git a/install.php b/install.php
+index 80e9ad4..fe72513 100644
+--- a/install.php
++++ b/install.php
+@@ -7,7 +7,9 @@
  
  if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/');
--if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
+ if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
 -if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/');
-+if(!defined('DOKU_CONF')) define('DOKU_CONF','/etc/webapps/dokuwiki/');
 +if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_CONF);
-+if(!defined('DOKU_DATA')) define('DOKU_DATA','/var/lib/dokuwiki/');
++if(!defined('DOKU_DATA')) define('DOKU_DATA',DOKU_INC.'data');
++if(!defined('DOKU_CACHE')) define('DOKU_CACHE',DOKU_DATA.'cache');
  
- // check for error reporting override or set error reporting to sane values
- if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); }
-@@ -422,17 +422,17 @@
+ require_once(DOKU_INC.'inc/PassHash.class.php');
+ 
+@@ -428,17 +430,17 @@ function check_permissions(){
  
      $dirs = array(
          'conf'        => DOKU_LOCAL,
@@ -48,10 +85,12 @@
 +        'media_attic' => DOKU_DATA.'media_attic',
 +        'media_meta'  => DOKU_DATA.'media_meta',
 +        'meta'        => DOKU_DATA.'meta',
-+        'cache'       => DOKU_DATA.'cache',
++        'cache'       => DOKU_CACHE,
 +        'locks'       => DOKU_DATA.'locks',
 +        'index'       => DOKU_DATA.'index',
 +        'tmp'         => DOKU_DATA.'tmp'
      );
  
      $ok = true;
+-- 
+1.7.7.4

================================================================
Index: packages/dokuwiki/dokuwiki.spec
diff -u packages/dokuwiki/dokuwiki.spec:1.106 packages/dokuwiki/dokuwiki.spec:1.107
--- packages/dokuwiki/dokuwiki.spec:1.106	Tue Jun 12 21:36:37 2012
+++ packages/dokuwiki/dokuwiki.spec	Sun Jun 24 22:50:40 2012
@@ -1,17 +1,19 @@
 # $Revision$, $Date$
-%define		subver	2012-01-25a
+%define		subver	2012-06-24
 %define		ver		%(echo %{subver} | tr -d -)
+%define		snap	1
 %define		php_min_version 5.2.4
 %include	/usr/lib/rpm/macros.php
 Summary:	PHP-based Wiki webapplication
 Summary(pl.UTF-8):	Aplikacja WWW Wiki oparta na PHP
 Name:		dokuwiki
 Version:	%{ver}
-Release:	1
+Release:	1.5
 License:	GPL v2
 Group:		Applications/WWW
-Source0:	http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-%{subver}.tgz
-# Source0-md5:	aea520bd7bb61f7ecd3322e479cd8047
+#Source0:	http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-%{subver}.tgz
+Source0:	http://github.com/splitbrain/dokuwiki/tarball/master/%{name}.tgz
+# Source0-md5:	32e73e37068f66392be004374d885af9
 Source1:	%{name}-apache.conf
 Source2:	%{name}-lighttpd.conf
 Source3:	http://glen.alkohol.ee/pld/jude.png
@@ -74,6 +76,7 @@
 %define		_sysconfdir	%{_webapps}/%{_webapp}
 %define		_appdir		%{_datadir}/%{_webapp}
 %define		_localstatedir	/var/lib/%{name}
+%define		_cachedir		/var/cache/%{name}
 %define		find_lang 	%{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
 
 # bad depsolver
@@ -118,7 +121,13 @@
 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
 
 %prep
-%setup -q -n %{name}-%{subver}
+%setup -q -n %{name}-%{subver} %{?snap:-c}
+%if 0%{?snap:1}
+mv *-dokuwiki-*/* .
+test -e VERSION || echo %{subver}-git > VERSION
+install -d data/pages/playground
+touch data/pages/playground/playground.txt
+%endif
 %patch0 -p1
 %patch3 -p1
 %patch4 -p1
@@ -127,24 +136,30 @@
 %patch8 -p1
 %patch10 -p1
 %patch11 -p1
-%patch12 -p1
+#%patch12 -p1 UPDATE to new mailer class
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
-%patch21 -p1
+#%patch21 -p1 UPDATE to new mailer class
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
 
 %patch66 -p1
 
+# package as basenames, upgrade overwrite protected with .rpmnew
+mv conf/local.php{.dist,}
+mv conf/acl.auth.php{.dist,}
+mv conf/users.auth.php{.dist,}
+mv conf/mysql.conf.php{.example,}
+
 find -name _dummy | xargs rm
 %{__rm} lib/index.html lib/plugins/index.html inc/lang/.htaccess
 
-# we just don't package deleted files, so these get removed automatically on rpm upgrades
+# we just don't package deleted files, these get removed automatically on rpm upgrades
 %{__rm} data/deleted.files
 # source for security.png
 %{__rm} data/security.xcf
@@ -161,9 +176,10 @@
 
 # flash source on git tarballs
 rm -rf lib/_fla
+rm -rf lib/plugins/testing
 
 # cleanup backups after patching
-find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %build
 md5=$(md5sum -b conf/dokuwiki.php | awk '{print $1}')
@@ -174,7 +190,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{lang,plugin_lang},%{_localstatedir},%{_appdir}/{bin,inc,lib}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{lang,plugin_lang},%{_localstatedir},%{_cachedir},%{_appdir}/{bin,inc,lib}}
 
 # hardlink test
 cp -al VERSION $RPM_BUILD_ROOT%{_appdir} 2>/dev/null && l=l
@@ -194,7 +210,6 @@
 touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf
 touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php
 touch $RPM_BUILD_ROOT%{_sysconfdir}/plugins.local.php
-touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php
 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php
 touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf
 touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf
@@ -263,6 +278,9 @@
 	mv -f %{_appdir}/conf/* %{_sysconfdir}
 	rm -rf %{_appdir}/conf
 fi
+if [ -d %{_localstatedir}/cache ]; then
+	rm -rf %{_localstatedir}/cache
+fi
 exit 0
 
 %files -f %{name}.lang
@@ -276,18 +294,23 @@
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
 
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.php
 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
 
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acl.auth.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size mode) %{_sysconfdir}/local.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size mode) %{_sysconfdir}/plugins.local.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/userstyle.css
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/users.auth.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql.conf.php
+
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size mode) %{_sysconfdir}/local.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size mode) %{_sysconfdir}/plugins.local.php
 
 # use local.php, local.protected.php, etc for local changes
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
@@ -295,18 +318,12 @@
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
+%attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/wordblock.conf
 
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/plugins.required.php
 
-# samples. perhaps move to %doc instead?
-%attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
-%attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
-%attr(640,root,http) %{_sysconfdir}/wordblock.conf
-%attr(640,root,http) %{_sysconfdir}/local.php.dist
-%attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
-
 %dir %{_appdir}
 %{_appdir}/VERSION
 %{_appdir}/doku.php
@@ -356,7 +373,6 @@
 
 %dir %attr(770,root,http) %{_localstatedir}
 %dir %attr(770,root,http) %{_localstatedir}/attic
-%dir %attr(770,root,http) %{_localstatedir}/cache
 %dir %attr(770,root,http) %{_localstatedir}/index
 %dir %attr(770,root,http) %{_localstatedir}/locks
 %dir %attr(770,root,http) %{_localstatedir}/media
@@ -375,6 +391,8 @@
 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/security.png
 
+%dir %attr(770,root,http) %{_cachedir}
+
 %files setup
 %defattr(644,root,root,755)
 %{_appdir}/install.php
@@ -385,6 +403,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.107  2012/06/24 20:50:40  glen
+- up to 2012-06-24 snapshot
+
 Revision 1.106  2012/06/12 19:36:37  glen
 - up to 2012-01-25a hotfix, released 2012/04/19
   Fixes/changes: XSS security (issue 2487)[http://bugs.dokuwiki.org/index.php?do=details&task_id=2487]

================================================================
Index: packages/dokuwiki/pld-branding.patch
diff -u packages/dokuwiki/pld-branding.patch:1.1 packages/dokuwiki/pld-branding.patch:1.2
--- packages/dokuwiki/pld-branding.patch:1.1	Tue Nov 10 15:09:06 2009
+++ packages/dokuwiki/pld-branding.patch	Sun Jun 24 22:50:40 2012
@@ -1,16 +1,14 @@
-===================================================================
---- dokuwiki-0.0.20090214.orig/conf/dokuwiki.php	2009-02-14 19:19:27.000000000 +0100
-+++ dokuwiki-0.0.20090214/conf/dokuwiki.php	2009-02-14 19:22:46.000000000 +0100
-@@ -24,7 +24,7 @@
- /* Display Options */
+--- dokuwiki-2012-06-23/conf/dokuwiki.php~	2012-06-23 13:07:26.000000000 +0300
++++ dokuwiki-2012-06-23/conf/dokuwiki.php	2012-06-23 13:07:43.700694458 +0300
+@@ -13,7 +13,7 @@
  
- $conf['start']       = 'start';           //name of start page
+ 
+ /* Basic Settings */
 -$conf['title']       = 'DokuWiki';        //what to show in the title
 +$conf['title']       = 'PLD Linux DokuWiki'; //what to show in the title
- $conf['template']    = 'default';         //see lib/tpl directory
- $conf['license']     = 'publicdomain';     //see conf/license.php
- $conf['fullpath']    = 0;                 //show full path of the document or relative to datadir only? 0|1
-===================================================================
+ $conf['start']       = 'start';           //name of start page
+ $conf['lang']        = 'en';              //your language
+ $conf['template']    = 'dokuwiki';         //see lib/tpl directory
 --- dokuwiki-0.0.20090214.orig/lib/tpl/default/footer.html	2009-02-14 19:22:01.000000000 +0100
 +++ dokuwiki-0.0.20090214/lib/tpl/default/footer.html	2009-02-14 19:23:14.000000000 +0100
 @@ -28,6 +28,8 @@
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/dokuwiki/dokuwiki-config.patch?r1=1.18&r2=1.19
    http://cvs.pld-linux.org/packages/dokuwiki/dokuwiki-paths.patch?r1=1.6&r2=1.7
    http://cvs.pld-linux.org/packages/dokuwiki/dokuwiki.spec?r1=1.106&r2=1.107
    http://cvs.pld-linux.org/packages/dokuwiki/pld-branding.patch?r1=1.1&r2=1.2



More information about the pld-cvs-commit mailing list