--- rpms/phpMyAdmin/contribs10/phpMyAdmin.spec 2021/02/28 06:34:59 1.1 +++ rpms/phpMyAdmin/contribs10/phpMyAdmin.spec 2021/02/28 08:27:59 1.2 @@ -2,8 +2,8 @@ %global pkgname phpMyAdmin # Having below mentioned separate projects externally or only internally? -%global gettext 1 -%global tcpdf 1 +%global gettext 0 +%global tcpdf 0 %if 0%{?fedora} >= 21 # nginx 1.6 with nginx-filesystem @@ -17,8 +17,8 @@ Summary: Handle the administration of MySQL over the World Wide Web Name: phpMyAdmin -Version: 4.4.15.10 -Release: 4%{?dist} +Version: 5.1.0 +Release: 1%{?dist} # MIT (js/jquery/, js/canvg/, js/codemirror/, libraries/sql-formatter/), # BSD (libraries/plugins/auth/recaptcha/), # GPLv2+ (the rest) @@ -30,14 +30,17 @@ Source1: https://files.phpmyadmin.net/%{ Source2: phpMyAdmin-config.inc.php Source3: phpMyAdmin.htaccess Source4: phpMyAdmin.nginx -Patch0: phpMyAdmin-4.4.15.10-pmasa-2017-8.patch -Patch1: phpMyAdmin-4.4.15.10-pmasa-2018-1.patch -Patch2: phpMyAdmin-4.4.15.10-force-links.patch -Patch3: phpMyAdmin-4.4.15.10-php-array.patch -Patch4: phpMyAdmin-4.4.15.10-gettext-search.patch +Source5: https://files.phpmyadmin.net/phpmyadmin.keyring + +Patch0: phpMyAdmin-certs.patch +#Patch0: phpMyAdmin-4.4.15.10-pmasa-2017-8.patch +#Patch1: phpMyAdmin-4.4.15.10-pmasa-2018-1.patch +#Patch2: phpMyAdmin-4.4.15.10-force-links.patch +#Patch3: phpMyAdmin-4.4.15.10-php-array.patch +#Patch4: phpMyAdmin-4.4.15.10-gettext-search.patch # Optional (and partially redundant) runtime requirements: php-bcmath, php-gmp, php-recode, php-soap, # php-mcrypt, php-phpseclib-crypt-aes >= 2.0.0, php-phpseclib-crypt-random >= 2.0.0 -Requires: php(language) >= 5.3.7, php-filter, php-xmlwriter +Requires: php74-php(language) >= 5.3.7, php-filter, php-xmlwriter %if %{with_nginx} Requires: nginx-filesystem %endif @@ -58,9 +61,16 @@ Requires: php-tcpdf, php-tcpdf-dejavu-sa %else Requires: php-hash, php-xml >= 5.3.7 %endif + +# Update from other 3rd party +Obsoletes: phpMyAdmin50 <= %{version} +Obsoletes: phpMyAdmin49 <= %{version} +Obsoletes: phpmyadmin < %{version} Provides: phpmyadmin = %{version}-%{release} BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gnupg2 + %description phpMyAdmin is a tool written in PHP intended to handle the administration of @@ -83,17 +93,19 @@ transforming stored data into any format like displaying BLOB-data as image or download-link and much more... %prep +%{?gpgverify:%{gpgverify} --keyring='%{SOURCE5}' --signature='%{SOURCE1}' --data='%{SOURCE0}'} + %setup -q -n %{pkgname}-%{version}-all-languages %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +#%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 +#%patch4 -p1 # Setup vendor config file -sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@%{_pkgdocdir}/ChangeLog@" \ - -e "/'LICENSE_FILE'/s@./LICENSE@%{_pkgdocdir}/LICENSE@" \ - -e "/'CONFIG_DIR'/s@'./'@'%{_sysconfdir}/%{pkgname}/'@" \ +sed -e "/'CHANGELOG_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \ + -e "/'LICENSE_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \ + -e "/'CONFIG_DIR'/s@ROOT_PATH@'%{_sysconfdir}/%{name}/'@" \ -e "/'SETUP_CONFIG_FILE'/s@./config/config.inc.php@%{_localstatedir}/lib/%{pkgname}/config/config.inc.php@" \ %if 0%{?gettext} -e "/'GETTEXT_INC'/s@./libraries/php-gettext/gettext.inc@%{_datadir}/php/gettext/gettext.inc@" \ @@ -101,12 +113,17 @@ sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@ %if 0%{?tcpdf} -e "/'TCPDF_INC'/s@./libraries/tcpdf/tcpdf.php@%{_datadir}/php/tcpdf/tcpdf.php@" \ %endif - -e "/'PHPSECLIB_INC_DIR'/s@./libraries/phpseclib@%{_datadir}/pear@" \ + -e "/'##PHPSECLIB_INC_DIR'/s@./libraries/phpseclib@%{_datadir}/pear@" \ %if 0%{?_licensedir:1} -e '/LICENSE_FILE/s:%_defaultdocdir:%_defaultlicensedir:' \ %endif + -e "/TEMP_DIR/s@ROOT.*tmp'@'%{_localstatedir}/lib/%{name}/temp'@" \ + -e "/CACHE_DIR/s@ROOT.*cache'@'%{_localstatedir}/lib/%{name}/cache'@" \ -i libraries/vendor_config.php +# For debug +grep '^define' libraries/vendor_config.php + # Remove bundled libraries %if 0%{?gettext} rm -rf libraries/php-gettext/ @@ -116,7 +133,8 @@ rm -rf libraries/php-gettext/ rm -rf libraries/tcpdf/ %endif -rm -rf libraries/phpseclib/ +#Koozali we keep +#rm -rf libraries/phpseclib/ # Remove sources of JavaScript libraries rm -rf js/jquery/src/ js/openlayers/src/ @@ -126,7 +144,7 @@ rm -rf js/jquery/src/ js/openlayers/src/ %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pkgname} -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{pkgname}/{upload,save,config}/ +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{pkgname}/{upload,save,config,temp}/ cp -ad * $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/ install -Dpm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{pkgname}.conf install -Dpm 0640 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{pkgname}/config.inc.php @@ -134,6 +152,7 @@ install -Dpm 0640 %{SOURCE2} $RPM_BUILD_ install -Dpm 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/default.d/%{pkgname}.conf %endif + rm -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/{[CDLR]*,*.txt,config.sample.inc.php} rm -rf $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/{doc,examples}/ rm -f doc/html/.buildinfo @@ -142,15 +161,18 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pk ln -s ../../../..%{_pkgdocdir}/html/ $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/doc/html mv -f config.sample.inc.php examples/ -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/jquery/MIT-LICENSE.txt LICENSE-jquery -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/canvg/MIT-LICENSE.txt LICENSE-canvg -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/codemirror/LICENSE LICENSE-codemirror -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/plugins/auth/recaptcha/LICENSE LICENSE-recaptcha -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/sql-formatter/LICENSE.txt LICENSE-sql-formatter +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/jquery/MIT-LICENSE.txt LICENSE-jquery +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/canvg/MIT-LICENSE.txt LICENSE-canvg +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/js/codemirror/LICENSE LICENSE-codemirror +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/plugins/auth/recaptcha/LICENSE LICENSE-recaptcha +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/sql-formatter/LICENSE.txt LICENSE-sql-formatter %if ! 0%{?tcpdf} -mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/tcpdf/LICENSE.TXT LICENSE-tcpdf +#mv -f $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/libraries/tcpdf/LICENSE.TXT LICENSE-tcpdf %endif +# from remi +mv %{buildroot}%{_datadir}/%{name}/libraries/cache %{buildroot}/%{_localstatedir}/lib/%{name}/cache + %clean rm -rf $RPM_BUILD_ROOT @@ -163,7 +185,7 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANG %defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE* -%doc ChangeLog README DCO doc/html/ examples/ +%doc ChangeLog README doc/html/ examples/ %{_datadir}/%{pkgname}/ %dir %attr(0750,root,apache) %{_sysconfdir}/%{pkgname}/ %config(noreplace) %attr(0640,root,apache) %{_sysconfdir}/%{pkgname}/config.inc.php @@ -175,8 +197,15 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANG %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{pkgname}/upload/ %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{pkgname}/save/ %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{pkgname}/config/ +%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{pkgname}/temp +%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{pkgname}/cache + %attr(0640,apache,apache) %{_localstatedir}/lib/%{pkgname}/cache/* %changelog +* Sun Feb 28 2021 Jean-Philipe Pialasse 5.1.0-1.sme +- Upgrade to 5.1.0 [SME: 11043] + use epel spec with some modifications from remi + * Tue Oct 29 2019 Robert Scheck 4.4.15.10-4 - Added upstream patch for table searching with non-english locale