%global __requires_exclude pear\\(Crypt/Hash.php\\)|pear\\(Base.php\\)|pear\\(Rijndael.php\\) %define dir_version 2017-02-19b %define _localstatedir %{_var} %define subrel 1 Name: dokuwiki Version: 20170219 Release: %mkrel 4 Summary: A wiki with plain text files backend License: GPLv2 Group: Networking/WWW URL: https://www.dokuwiki.org/dokuwiki Source0: http://download.dokuwiki.org/src/dokuwiki/%{name}-%{dir_version}.tgz # Fix CVE-2017-12583 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12583) Patch0: Add_htmlspecialchars.patch Requires: apache-mod_php Requires: php-xml BuildArch: noarch %description DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating documentation of any kind. It is targeted at developer teams, workgroups and small companies. It has a simple but powerful syntax which makes sure the datafiles remain readable outside the Wiki and eases the creation of structured texts. All data is stored in plain text files -- no database is required. %prep %autosetup -n %{name}-%{dir_version} -p1 find . -name '.htaccess' | xargs rm -f %build %install install -d -m 755 %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_datadir}/%{name}/bin install -m 755 bin/* %{buildroot}%{_datadir}/%{name}/bin cp -pr inc %{buildroot}%{_datadir}/%{name} cp -pr lib %{buildroot}%{_datadir}/%{name} install -m 644 *.php %{buildroot}%{_datadir}/%{name} pushd %{buildroot}%{_datadir}/%{name} ln -sf ../../../var/lib/dokuwiki data ln -sf ../../../etc/dokuwiki conf popd install -d -m 755 %{buildroot}%{_localstatedir}/lib cp -pr data %{buildroot}%{_localstatedir}/lib/%{name} install -d -m 755 %{buildroot}%{_sysconfdir} cp -pr conf %{buildroot}%{_sysconfdir}/%{name} rm -f %{buildroot}%{_sysconfdir}/%{name}/*.{dist,example} # apache configuration install -d -m 755 %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF # %{name} Apache configuration Alias /%{name} %{_datadir}/%{name} <Directory %{_datadir}/%{name}> Require all granted DirectoryIndex doku.php </Directory> <Directory %{_datadir}/%{name}/bin> Require all denied </Directory> <Directory %{_datadir}/%{name}/inc> Require all denied </Directory> <Directory %{_datadir}/%{name}/conf> Require all denied </Directory> <Directory %{_datadir}/%{name}/data> Require all denied </Directory> EOF cat > README.urpmi <<EOF Mageia RPM specific notes setup ----- The setup used here differs from default one, to achieve better FHS compliance, and follow upstream security recommandations detailed at http://wiki.splitbrain.org/wiki:security: - the non-variable files are in %{_datadir}/%{name} - the variable files are in %{_localstatedir}/lib/%{name} - the configuration files are in %{_sysconfdir}/%{name} EOF # missing composer file mkdir -p %{buildroot}/%{_datadir}/%{name}/vendor #touch %%{buildroot}/%%{_datadir}/%%{name}/vendor/autoload.php #Add vendor files until we start to use php7 (mga#20780) cp -pr vendor/* %{buildroot}%{_datadir}/%{name}/vendor/ %pre if [ $1 = "2" ]; then # fix for old setup if [ -d %{_localstatedir}/lib/%{name}/data ]; then mv %{_localstatedir}/lib/%{name}/data/* %{_localstatedir}/lib/%{name} rmdir %{_localstatedir}/lib/%{name}/data fi fi %files %doc README VERSION README.urpmi conf/*.{dist,example} %config(noreplace) %{_webappconfdir}/%{name}.conf %attr(-,apache,apache) %config(noreplace) %{_sysconfdir}/%{name} %{_datadir}/%{name} %attr(-,apache,apache) %{_localstatedir}/lib/%{name} %changelog * Fri Jan 05 2018 tarakbumba <tarakbumba> 20170219-4.1.mga6 + Revision: 1190499 - Add patch to fix CVE-2017-12583 * Tue May 30 2017 tarakbumba <tarakbumba> 20170219-4.mga6 + Revision: 1105533 - Add vendor files until we start to use php7 (mga#20780) * Mon Mar 13 2017 tarakbumba <tarakbumba> 20170219-3.mga6 + Revision: 1092490 - Update source to 2017-02-19b hotfix release * Mon Feb 27 2017 tarakbumba <tarakbumba> 20170219-2.mga6 + Revision: 1088119 - Update source to 2017-02-19a hotfix release - Update to 20170219 version * Sat Dec 10 2016 ngompa <ngompa> 20160626-2.mga6 + Revision: 1074077 - Remove unneeded %%pretrans * Sat Jul 23 2016 joequant <joequant> 20160626-1.mga6 + Revision: 1043224 - upgrade to 20160626a * Sat Feb 20 2016 umeabot <umeabot> 20150810-3.mga6 + Revision: 971146 - Mageia 6 Mass Rebuild * Sat Oct 10 2015 joequant <joequant> 20150810-2.mga6 + Revision: 889383 - add vendor/autoload.php * Sat Oct 10 2015 tarakbumba <tarakbumba> 20150810-1.mga6 + Revision: 888680 - Update to 2015-08-10a * Thu Mar 19 2015 tarakbumba <tarakbumba> 20140929-6.mga5 + Revision: 818971 - Update to 2014-09-29d hotfix release * Tue Mar 03 2015 tarakbumba <tarakbumba> 20140929-5.mga5 + Revision: 817380 - Update to 2014-09-29c version (mga#15402) (CVE-2015-2172) * Mon Dec 15 2014 tarakbumba <tarakbumba> 20140929-4.mga5 + Revision: 803278 - Update to 20140929b hotfix release (mga#14807) - Fixes CVE-2014-9253 * Wed Oct 15 2014 umeabot <umeabot> 20140929-3.mga5 + Revision: 742590 - Second Mageia 5 Mass Rebuild * Mon Oct 13 2014 tarakbumba <tarakbumba> 20140929-2.mga5 + Revision: 738495 - Use hotfix version for source (mga#14252) - Bump rel * Wed Oct 08 2014 tarakbumba <tarakbumba> 20140929-1.mga5 + Revision: 737593 - Update to 2014-09-29 version (fixes mga#14252) * Fri Sep 26 2014 tv <tv> 20140505-4.mga5 + Revision: 725050 - rebuild for bogus file deps * Thu Sep 18 2014 joequant <joequant> 20140505-3.mga5 + Revision: 694767 - fix autorequires * Tue Sep 16 2014 umeabot <umeabot> 20140505-2.mga5 + Revision: 678803 - Mageia 5 Mass Rebuild + tv <tv> - use %%global for req/prov exclude - autoconvert to new prov/req excludes * Wed Jun 04 2014 tarakbumba <tarakbumba> 20140505-1.mga5 + Revision: 633261 - Update to version 20140505 * Thu Dec 12 2013 spuhler <spuhler> 20131208-2.mga4 + Revision: 556461 - added %%define _requires_exceptions pear(Crypt.Hash.php) * the package is checking if we provide Crypt/Hash.php and we don't * Mon Dec 09 2013 tarakbumba <tarakbumba> 20131208-1.mga4 + Revision: 556039 -Update to 20131208 * Sat Oct 19 2013 umeabot <umeabot> 20130510-2.mga4 + Revision: 532861 - Mageia 4 Mass Rebuild * Fri Aug 23 2013 luigiwalser <luigiwalser> 20130510-1.mga4 + Revision: 469961 - 20130510a * Fri Jan 11 2013 umeabot <umeabot> 20121013-2.mga3 + Revision: 349056 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Dec 11 2012 luigiwalser <luigiwalser> 20121013-1.mga3 + Revision: 329685 - 2012-10-13 (fixes CVE-2011-3727 and CVE-2012-3354) * Sun Sep 09 2012 guillomovitch <guillomovitch> 20120125-3.mga3 + Revision: 291155 - make webapp configuration file compatible with apache 2.4 - install everything under %%{_datadir}/dokuwiki - use symlinks rather than prepended file for achieving FHS setup - don't change anything in configuration file, it prevents installation - make webapp configuration file compatible with apache 2.4 - install everything under %%{_datadir}/%%{name} * Wed Aug 08 2012 luigiwalser <luigiwalser> 20120125-2.mga3 + Revision: 280024 - 2012-01-25b - add link to images directory to fix padlock icon (mga #6480/6166) * Fri Jun 01 2012 dams <dams> 20120125-1.mga3 + Revision: 252765 - new version 2012-01-25a * Tue Jun 21 2011 dmorgan <dmorgan> 20110525-2.mga2 + Revision: 111382 - Fix requires Clean spec file * Wed Jun 15 2011 kharec <kharec> 20110525-1.mga2 + Revision: 106561 - imported package dokuwiki