%define upstream_name phpMyAdmin %global __requires_exclude_from %{_datadir}/phpmyadmin/libraries/plugins/transformations/TEMPLATE.* Summary: Handles the administration of MySQL over the web Name: phpmyadmin Version: 4.4.15.4 Release: %mkrel 1 License: GPLv2 Group: System/Servers URL: http://www.phpmyadmin.net/ Source0: https://files.phpmyadmin.net/%{upstream_name}/%{version}/%{upstream_name}-%{version}-all-languages.tar.xz Source1: phpmyadmin-16x16.png Source2: phpmyadmin-32x32.png Source3: phpmyadmin-48x48.png Source4: phpmyadmin.conf Source5: phpmyadmin.desktop Patch0: phpMyAdmin-4.2.3-default_config.diff Patch1: phpMyAdmin-4.2.13-external_phpseclib.diff Requires: apache-mod_php Requires: php-mysqli Requires: php-mbstring Requires: php-mcrypt BuildArch: noarch Obsoletes: phpMyAdmin # used by setup Recommends: php-bz2 php-zip # parts of phpseclib is bundled in libraries/phpseclib/Crypt, but is incomplete # http://sourceforge.net/projects/phpseclib/ Requires: phpseclib %description phpMyAdmin is intended to handle the administration of MySQL over the web. Currently it can : create and drop databases, create, copy, drop and alter tables, delete, edit and add fields, execute any SQL-statement, even batch-queries, manage keys on fields, load text files into tables, create and read dumps of tables, export data to CSV value, administer multiple servers and single databases. %prep %setup -q -n %{upstream_name}-%{version}-all-languages %patch0 -p0 %patch1 -p0 # Setup vendor config file sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@%{_datadir}/doc/%{name}/ChangeLog@" \ -e "/'LICENSE_FILE'/s@./LICENSE@%{_datadir}/doc/%{name}/LICENSE@" \ -e "/'CONFIG_DIR'/s@'./'@'%{_sysconfdir}/%{name}/'@" \ -e "/'SETUP_CONFIG_FILE'/s@./config/config.inc.php@%{_localstatedir}/lib/%{name}/config/config.inc.php@" \ -i libraries/vendor_config.php %build %install export DONT_RELINK=1 install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_datadir}/%{name} cp -aRf * %{buildroot}%{_datadir}/%{name}/ # cleanup pushd %{buildroot}%{_datadir}/%{name} rm -f CREDITS ChangeLog Documentation.txt INSTALL LICENSE README rm -f README.VENDOR RELEASE-DATE-* TODO rm -rf scripts rm -rf contrib rm -rf doc rm -f lang/*.sh libraries/transformations/*.sh rm -rf libraries/phpseclib rm -rf phpunit.xml.nocoverage # nuke the patch backup, if any rm -f config.sample.inc.php.* find -name "\.htaccess" | xargs rm -f popd # fix docs install -d %{buildroot}%{_datadir}/%{name}/doc/html/_static install -m0644 doc/html/*.html doc/html/*.js %{buildroot}%{_datadir}/%{name}/doc/html/ install -m0644 doc/html/_static/* %{buildroot}%{_datadir}/%{name}/doc/html/_static/ # fix config file location # keep the "config.inc.php" file name as this is hard coded everywhere. mv %{buildroot}%{_datadir}/%{name}/config.sample.inc.php \ %{buildroot}%{_sysconfdir}/%{name}/config.inc.php chmod 640 %{buildroot}%{_sysconfdir}/%{name}/config.inc.php install -d %{buildroot}%{_localstatedir}/lib/%{name}/{upload,save,config} cat > README.urpmi << EOF The actual configuration file is /etc/phpmyadmin/config.inc.php The %{_datadir}/%{name}/config.default.inc.php file contains default values, and is not supposed to be modified. EOF # new Icons install -d %{buildroot}%{_iconsdir} install -d %{buildroot}%{_miconsdir} install -d %{buildroot}%{_liconsdir} install -m0644 %{SOURCE1} %{buildroot}%{_miconsdir}/%{name}.png install -m0644 %{SOURCE2} %{buildroot}%{_iconsdir}/%{name}.png install -m0644 %{SOURCE3} %{buildroot}%{_liconsdir}/%{name}.png # install menu entry. # XDG menu install -d %{buildroot}%{_datadir}/applications install -m0644 %{SOURCE5} %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop install -d -m 755 %{buildroot}%{_webappconfdir} install -m0644 %{SOURCE4} %{buildroot}%{_webappconfdir}/%{name}.conf # fix borked permissions find %{buildroot}%{_datadir}/%{name} -type d -exec chmod 755 {} \; find %{buildroot}%{_datadir}/%{name} -type f -exec chmod 644 {} \; %pretrans # fix configuration file name change if [ -f %{_sysconfdir}/phpmyadmin/config.default.php ]; then mv %{_sysconfdir}/phpmyadmin/config.default.php \ %{_sysconfdir}/phpmyadmin/config.php fi # use the default file name if [ -f %{_sysconfdir}/phpmyadmin/config.php ]; then mv %{_sysconfdir}/phpmyadmin/config.php \ %{_sysconfdir}/phpmyadmin/config.inc.php fi if [ -L /var/www/phpmyadmin/libraries/config.default.php ]; then rm -f /var/www/phpmyadmin/libraries/config.default.php fi if [ -L %{_datadir}/phpmyadmin/libraries/config.default.php ]; then rm -f %{_datadir}/phpmyadmin/libraries/config.default.php fi %post # generate random secret secret=%_get_password 46 # blowfish secret perl -pi \ -e "s|\\\$cfg\\['blowfish_secret'\\] = ''|\\\$cfg\\['blowfish_secret'\\] = '$secret'|" \ %{_sysconfdir}/%{name}/config.inc.php %files %doc ChangeLog LICENSE README RELEASE-DATE-* README.urpmi %config(noreplace) %{webappconfdir}/%{name}.conf %dir %{_sysconfdir}/%{name} %attr(-,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.inc.php %{_datadir}/%{name} %dir %{_localstatedir}/lib/%{name}/ %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/upload %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/save %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/config %{_iconsdir}/%{name}.png %{_miconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_datadir}/applications/*.desktop %changelog * Fri Jan 29 2016 luigiwalser <luigiwalser> 4.4.15.4-1.mga5 + Revision: 929008 - 4.4.15.4 - 4.4.15.3 (fixes several security issues) - remove CVE patches fixed upstream in 4.4.x - update patch0 - update source URL - add upstream patch to fix CVE-2015-8669 - add upstream patch to fix CVE-2015-7873 - update CVE-2015-6830 to fix regressions from upstream - rediff and actually apply patch 1 - add upstream patch to fix CVE-2015-6830 - move desktop file contents out of spec to external source file * Thu May 14 2015 luigiwalser <luigiwalser> 4.2.13.3-1.mga5 + Revision: 822084 - 4.2.13.3 * Thu Mar 05 2015 luigiwalser <luigiwalser> 4.2.13.2-1.mga5 + Revision: 817844 - 4.2.13.2 (fixes CVE-2015-2206) * Wed Dec 03 2014 luigiwalser <luigiwalser> 4.2.13.1-1.mga5 + Revision: 800516 - 4.2.13.1 (fixes CVE-2014-9218 and CVE-2014-9219) * Sun Nov 30 2014 luigiwalser <luigiwalser> 4.2.13-1.mga5 + Revision: 800076 - 4.2.13 * Fri Nov 21 2014 luigiwalser <luigiwalser> 4.2.12-1.mga5 + Revision: 798084 - 4.2.12 (fixes CVE-2014-895[89] and CVE-2014-896[01]) * Tue Oct 21 2014 luigiwalser <luigiwalser> 4.2.10.1-1.mga5 + Revision: 792389 - 4.2.10.1 (fixes CVE-2014-8326) * Wed Oct 15 2014 umeabot <umeabot> 4.2.9.1-4.mga5 + Revision: 744766 - Second Mageia 5 Mass Rebuild * Sat Oct 04 2014 pterjan <pterjan> 4.2.9.1-3.mga5 + Revision: 736844 - Exclude broken requires from template files * Wed Oct 01 2014 tv <tv> 4.2.9.1-2.mga5 + Revision: 734027 - rebuild for pear deps * Wed Oct 01 2014 luigiwalser <luigiwalser> 4.2.9.1-1.mga5 + Revision: 733837 - 4.2.9.1 (fixes CVE-2014-7217) * Tue Sep 16 2014 umeabot <umeabot> 4.2.8.1-2.mga5 + Revision: 687568 - Mageia 5 Mass Rebuild + luigiwalser <luigiwalser> - 4.2.8.1 + tv <tv> - s/uggests:/Recommends:/ * Mon Sep 01 2014 luigiwalser <luigiwalser> 4.2.8-1.mga5 + Revision: 670774 - 4.2.8 * Mon Aug 18 2014 luigiwalser <luigiwalser> 4.2.7.1-1.mga5 + Revision: 665250 - 4.2.7.1 (fixes CVE-2014-5273 and CVE-2014-5274) * Fri Jul 18 2014 luigiwalser <luigiwalser> 4.2.6-1.mga5 + Revision: 653664 - 4.2.6 (fixes CVE-2014-495[45] and CVE-2014-498[67]) * Mon Jun 23 2014 luigiwalser <luigiwalser> 4.2.4-1.mga5 + Revision: 638892 - 4.2.4 (fixes CVE-2014-4348 and CVE-2014-4349) * Thu Jun 12 2014 oden <oden> 4.2.3-1.mga5 + Revision: 635778 - 4.2.3 * Mon Feb 24 2014 luigiwalser <luigiwalser> 4.1.8-1.mga5 + Revision: 596576 - 4.1.8 * Thu Feb 20 2014 oden <oden> 4.1.7-1.mga5 + Revision: 595085 - 4.1.7 (fixes CVE-2014-1879) * Mon Oct 21 2013 umeabot <umeabot> 4.0.8-2.mga4 + Revision: 539550 - Mageia 4 Mass Rebuild * Mon Oct 07 2013 oden <oden> 4.0.8-1.mga4 + Revision: 492405 - 4.0.8 * Tue Sep 24 2013 fwang <fwang> 4.0.7-1.mga4 + Revision: 484673 - new version 4.0.7 * Fri Sep 06 2013 oden <oden> 4.0.6-1.mga4 + Revision: 475353 - 4.0.6 * Mon Aug 05 2013 fwang <fwang> 4.0.5-1.mga4 + Revision: 463691 - new version 4.0.5 * Mon Jul 29 2013 oden <oden> 4.0.4.2-1.mga4 + Revision: 460217 - 4.0.4.2 * Tue Jul 02 2013 zezinho <zezinho> 4.0.4.1-1.mga4 + Revision: 449783 - new version * Thu Jun 06 2013 oden <oden> 4.0.3-1.mga4 + Revision: 438210 - 4.0.3 - more apache 2.2/2.4 compat stuff * Sat May 25 2013 zezinho <zezinho> 4.0.2-1.mga4 + Revision: 427059 - version 4.x.x import work of Oden Eriksson #10021 * Thu Apr 25 2013 zezinho <zezinho> 3.5.8.1-1.mga3 + Revision: 411139 - security update * Tue Apr 16 2013 zezinho <zezinho> 3.5.8-1.mga3 + Revision: 410203 - new security fix version 3.5.8 * Sat Apr 13 2013 guillomovitch <guillomovitch> 3.5.7-3.mga3 + Revision: 409847 - fix URL used in menu entry (#9664) * Sun Mar 17 2013 guillomovitch <guillomovitch> 3.5.7-2.mga3 + Revision: 403548 - no need to enforce mod_ssl usage by default, this is a sysadmin decision * Wed Mar 13 2013 zezinho <zezinho> 3.5.7-1.mga3 + Revision: 402343 - new bugfix version * Thu Jan 31 2013 zezinho <zezinho> 3.5.6-1.mga3 + Revision: 393825 - new version * Thu Dec 20 2012 oden <oden> 3.5.5-1.mga3 + Revision: 333360 - 3.5.5 * Wed Dec 19 2012 oden <oden> 3.5.4-2.mga3 + Revision: 332803 - bump release - make it backportable - force ssl * Sun Nov 18 2012 fwang <fwang> 3.5.4-1.mga3 + Revision: 319515 - new version 3.5.4 * Tue Oct 16 2012 tmb <tmb> 3.5.3-3.mga3 + Revision: 306855 - bump rel to preserve upgrade path from mga2 * Thu Oct 11 2012 zezinho <zezinho> 3.5.3-2.mga3 + Revision: 304716 - bump release to be higher than in 2 * Wed Oct 10 2012 zezinho <zezinho> 3.5.3-1.mga3 + Revision: 304499 - new version + guillomovitch <guillomovitch> - make webapp configuration file compatible with apache 2.4 * Wed Aug 22 2012 zezinho <zezinho> 3.5.2.2-1.mga3 + Revision: 283048 - new version - new version * Thu Jun 21 2012 zezinho <zezinho> 3.5.1-2.mga3 + Revision: 262522 - require php-mysqli for now, as it is the recommended upstream * Fri May 11 2012 zezinho <zezinho> 3.5.1-1.mga2 + Revision: 235361 - new bugfix release * Thu Apr 12 2012 zezinho <zezinho> 3.5.0-2.mga2 + Revision: 230515 - new version * Thu Mar 29 2012 zezinho <zezinho> 3.4.10.2-1.mga2 + Revision: 227530 - new version * Tue Feb 21 2012 zezinho <zezinho> 3.4.10.1-1.mga2 + Revision: 211462 - new version * Sun Feb 19 2012 zezinho <zezinho> 3.4.10-1.mga2 + Revision: 211010 - new version * Tue Jan 03 2012 zezinho <zezinho> 3.4.9-1.mga2 + Revision: 189887 - new version * Mon Dec 05 2011 zezinho <zezinho> 3.4.8-1.mga2 + Revision: 177084 - new version * Mon Nov 14 2011 zezinho <zezinho> 3.4.7.1-1.mga2 + Revision: 167617 - a security release * Mon Nov 07 2011 zezinho <zezinho> 3.4.7-1.mga2 + Revision: 164970 - new version * Thu Oct 20 2011 zezinho <zezinho> 3.4.6-1.mga2 + Revision: 156863 - new version * Fri Sep 16 2011 fwang <fwang> 3.4.5-1.mga2 + Revision: 144152 - new version 3.4.5 - new version 3.4.4 * Sun Jul 03 2011 fwang <fwang> 3.4.3.1-1.mga2 + Revision: 117607 - new version 3.4.3.1 * Tue Apr 26 2011 wally <wally> 3.3.10-2.mga1 + Revision: 91807 - fix desktop file name (mga#954) * Mon Apr 11 2011 dams <dams> 3.3.10-1.mga1 + Revision: 83210 - update to 3.3.10 * Tue Mar 15 2011 ennael <ennael> 3.3.9.2-2.mga1 + Revision: 71888 - clean spec file - imported package phpmyadmin