From: Jan Rękorajski Date: Sat, 28 Dec 2019 15:29:00 +0000 (+0900) Subject: - clean up configure options X-Git-Tag: auto/th/rpm-4.16.0-0.1~36 X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=commitdiff_plain;h=34865f27901a6b75d0e12d61fd5609b9a403ab84 - clean up configure options - reenabled python support - updated php req/prov patch --- diff --git a/rpm-branch.patch b/rpm-branch.patch deleted file mode 100644 index 18fc953..0000000 --- a/rpm-branch.patch +++ /dev/null @@ -1,112 +0,0 @@ -Index: rpm/configure.ac -diff -u -u -r2.305 -r2.306 ---- rpm/configure.ac 28 Jul 2008 14:35:25 -0000 2.305 -+++ rpm/configure.ac 29 Jul 2008 16:00:15 -0000 2.306 -@@ -107,6 +107,7 @@ - - AC_PROG_CC - AC_PROG_CPP -+AC_PROG_CXX - - AC_USE_SYSTEM_EXTENSIONS - -Index: rpm/macros.in -diff -u -u -r1.250 -r1.251 ---- rpm/macros.in 20 Jul 2008 00:04:51 -0000 1.250 -+++ rpm/macros.in 29 Jul 2008 15:42:49 -0000 1.251 -@@ -1115,9 +1115,14 @@ - %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\ - export CLASSPATH}\ - unset PERL_MM_OPT || :\ -+ LC_ALL=C\ -+ export LC_ALL\ - LANG=C\ - export LANG\ - unset DISPLAY || :\ -+ unset LINGUAS || :\ -+ unset LANGUAGE || :\ -+ unset LC_MESSAGES || :\ - \ - %{verbose:set -x}%{!verbose:exec > /dev/null}\ - umask 022\ -Index: rpm/lib/rpmlib.h -diff -u -u -r2.462 -r2.463 ---- rpm/lib/rpmlib.h 26 Mar 2008 20:59:14 -0000 2.462 -+++ rpm/lib/rpmlib.h 29 Jul 2008 14:51:36 -0000 2.463 -@@ -10,6 +10,7 @@ - - #include - #include -+#include - - #define RPM_FORMAT_VERSION 5 - #define RPM_MAJOR_VERSION 0 -Index: rpm/rpmio/argv.h -diff -u -u -r1.9 -r1.10 ---- rpm/rpmio/argv.h 22 May 2008 14:44:09 -0000 1.9 -+++ rpm/rpmio/argv.h 29 Jul 2008 15:00:20 -0000 1.10 -@@ -5,6 +5,8 @@ - * \file rpmio/argv.h - */ - -+#include -+ - typedef const char * ARGstr_t; - typedef ARGstr_t * ARGV_t; - -Index: rpm/rpmio/rpmurl.h -diff -u -u -r1.32 -r1.33 ---- rpm/rpmio/rpmurl.h~ 2008-07-29 18:13:16.865049453 +0200 -+++ rpm/rpmio/rpmurl.h 2008-07-29 18:14:51.751915001 +0200 -@@ -6,6 +6,7 @@ - */ - - #include -+#include - - /** - * Supported URL types. - -Index: rpm/rpmdb/rpmdb.h -diff -u -u -r1.75 -r1.73.2.2 ---- rpm/rpmdb/rpmdb.h 29 Jul 2008 14:54:30 -0000 1.75 -+++ rpm/rpmdb/rpmdb.h 29 Jul 2008 16:08:18 -0000 1.73.2.2 -@@ -10,11 +10,13 @@ - #include - #include - #include -+#if defined(_RPMDB_INTERNAL) - #if defined(WITH_DB) - #include "db.h" - #else - #include "db_emu.h" - #endif -+#endif - - /*@-exportlocal@*/ - /*@unchecked@*/ -diff -urN rpm-5.1.4/lib/rpmfc.c rpm-5.1.4.new/lib/rpmfc.c ---- rpm-5.1.4/lib/rpmfc.c 2008-04-06 10:48:08.000000000 +0200 -+++ rpm-5.1.4.new/lib/rpmfc.c 2008-07-29 21:02:21.000000000 +0200 -@@ -472,7 +472,7 @@ - - { "Java ", RPMFC_JAVA|RPMFC_INCLUDE }, - -- { "PE executable", RPMFC_MONO|RPMFC_INCLUDE }, -+ { "Mono/.Net assembly", RPMFC_MONO|RPMFC_INCLUDE }, - - { "current ar archive", RPMFC_STATIC|RPMFC_LIBRARY|RPMFC_ARCHIVE|RPMFC_INCLUDE }, - ---- rpm/lib/depends.c~ 2008-06-15 10:57:22.000000000 +0200 -+++ rpm/lib/depends.c 2008-07-29 22:03:37.336792223 +0200 -@@ -15,9 +15,7 @@ - - /* XXX CACHE_DEPENDENCY_RESULT deprecated, functionality being reimplemented */ - #undef CACHE_DEPENDENCY_RESULT --#if defined(CACHE_DEPNDENCY_RESULT) --#define _RPMDB_INTERNAL /* XXX response cache needs dbiOpen et al. */ --#endif -+#define _RPMDB_INTERNAL /* XXX response cache needs dbiOpen et al. DBT used below */ - #include "rpmdb.h" - - #define _RPMEVR_INTERNAL diff --git a/rpm-php-macros.patch b/rpm-php-macros.patch index b66cc7e..ff3c349 100644 --- a/rpm-php-macros.patch +++ b/rpm-php-macros.patch @@ -1,28 +1,29 @@ --- rpm-5.3.1/configure.ac.wiget 2010-05-30 16:43:06.000000000 +0200 +++ rpm-5.3.1/configure.ac 2010-05-30 16:43:38.482725491 +0200 @@ -2199,6 +2199,7 @@ AC_CONFIG_FILES([ po/Makefile.in - tools/Makefile - scripts/Makefile - scripts/perl.req scripts/perl.prov -+ scripts/php.req scripts/php.prov - rpmdb/DB_CONFIG - macros/macros macros/macros.rpmbuild - macros/java macros/libtool macros/mono macros/perl ---- rpm-5.4.10/macros/php.in 2012-09-05 18:12:29.474278958 +0200 -+++ rpm-5.4.15/macros/php.in 2015-09-03 11:16:04.928898067 +0300 -@@ -5,12 +5,9 @@ --%__php @__PHP@ -- - # Path to scripts to autogenerate php package dependencies, - # - # Note: Used iff _use_internal_dependency_generator is non-zero. The - # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. - #%__php_provides %{_rpmhome}/phpdeps.sh --provides - #%__php_requires %{_rpmhome}/phpdeps.sh --requires --#%__php_provides %{_rpmhome}/php.prov --#%__php_requires %{_rpmhome}/php.req -- --%php_pear_dir %{_datadir}/pear -+%__php_provides %{_rpmhome}/php.prov + AC_CONFIG_FILES([Makefile + rpmio/Makefile lib/Makefile build/Makefile sign/Makefile + po/Makefile.in scripts/Makefile scripts/perl.req scripts/perl.prov fileattrs/Makefile ++ scripts/php.req scripts/php.prov + misc/Makefile + doc/Makefile + python/Makefile +--- rpm-4.15.1/fileattrs/Makefile.am~ 2019-06-26 23:17:31.000000000 +0900 ++++ rpm-4.15.1/fileattrs/Makefile.am 2019-12-29 00:23:02.120085588 +0900 +@@ -8,6 +8,6 @@ + fattrs_DATA = \ + debuginfo.attr desktop.attr elf.attr font.attr libtool.attr metainfo.attr \ + perl.attr perllib.attr pkgconfig.attr python.attr pythondist.attr ocaml.attr \ +- script.attr ++ script.attr php.attr + + EXTRA_DIST = $(fattrs_DATA) +--- /dev/null 2019-12-23 19:28:16.334291624 +0900 ++++ rpm-4.15.1/fileattrs/php.attr 2019-12-29 00:22:52.989864428 +0900 +@@ -0,0 +1,6 @@ ++%__php_provides %{_rpmconfigdir}/php.prov +# define 'php_req_new' in ~/.rpmmacros to use php version of req finder -+%__php_requires env PHP_MIN_VERSION=%{?php_min_version} %{_rpmhome}/php.req%{?php_req_new:.php} ++%__php_requires env PHP_MIN_VERSION=%{?php_min_version} %{_rpmconfigdir}/php.req%{?php_req_new:.php} ++%__php_magic ^PHP script.* ++%__php_path \\.php$ ++%__php_flags magic_and_path diff --git a/rpm.spec b/rpm.spec index cbe819b..7f64ab9 100644 --- a/rpm.spec +++ b/rpm.spec @@ -14,15 +14,8 @@ %bcond_without suggest_tags # build without Suggest tag (bootstrapping) %bcond_with db61 # use DB 6.1 instead of 5.3 %bcond_with neon # build with HTTP/WebDAV support (neon library) -%bcond_with sqlite # build with SQLite support -%bcond_without system_pcre # use system pcre %bcond_with keyutils # build with keyutils support -%if %{with sqlite} -# Error: /lib64/librpmio-5.4.so: undefined symbol: sqlite3_enable_load_extension -%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) -%endif - # versions of required libraries %if %{with db61} %define reqdb_pkg db6.1 @@ -83,7 +76,6 @@ Source28: %{name}db_reset.c Source29: dbupgrade.sh Source30: rubygems.rb Source31: gem_helper.rb -Patch0: %{name}-branch.patch Patch1: %{name}-man_pl.patch Patch2: %{name}-popt-aliases.patch Patch4: %{name}-perl-macros.patch @@ -108,11 +100,7 @@ Patch84: x32.patch URL: http://rpm5.org/ BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver} -%if %{with sqlite} -BuildRequires: sqlite3-devel -%else BuildRequires: %{reqdb_pkg}-sql-devel >= %{reqdb_pkgver} -%endif BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1.4 BuildRequires: openssl-devel >= %{openssl_ver} @@ -143,6 +131,7 @@ BuildRequires: python-modules >= 1:2.3 BuildRequires: tcl BuildRequires: xz-devel BuildRequires: zlib-devel +BuildRequires: zstd-devel %if %{with apidocs} BuildRequires: doxygen BuildRequires: ghostscript @@ -164,6 +153,7 @@ BuildRequires: libsepol-static >= 2.1.0 %endif BuildRequires: popt-static >= %{reqpopt_ver} BuildRequires: zlib-static +BuildRequires: zstd-static %endif Requires(posttrans): coreutils Requires: FHS >= 3.0-2 @@ -269,11 +259,7 @@ Summary: RPMs library Summary(pl.UTF-8): Biblioteki RPM-a Group: Libraries Requires: %{reqdb_pkg} >= %{reqdb_pkgver} -%if %{with sqlite} -Requires: sqlite3 >= %{sqlite_build_version} -%else Requires: %{reqdb_pkg}-sql >= %{reqdb_pkgver} -%endif Requires: openssl >= %{openssl_ver} Requires: libmagic >= 1.15-2 %{?with_selinux:Requires: libselinux >= 2.1.0} @@ -666,13 +652,12 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %prep %setup -q -n %{name}-%{version}%{?subver} -#patch0 -p1 %patch1 -p1 %patch2 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 -#%patch7 -p1 +%patch7 -p1 %patch9 -p1 %patch14 -p0 %patch15 -p1 @@ -690,8 +675,8 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze #%patch84 -p1 install %{SOURCE2} pld.in -#install %{SOURCE8} scripts/php.prov.in -#install %{SOURCE9} scripts/php.req.in +install %{SOURCE8} scripts/php.prov.in +install %{SOURCE9} scripts/php.req.in install %{SOURCE11} scripts/perl.prov.in cp -p %{SOURCE30} scripts/rubygems.rb cp -p %{SOURCE31} scripts/gem_helper.rb @@ -704,10 +689,6 @@ awk -f %{SOURCE6} %{SOURCE1} install %{SOURCE26} tools/rpmdb_checkversion.c install %{SOURCE28} tools/rpmdb_reset.c -for extlib in openssl neon %{?with_system_pcre:pcre} popt; do - [ -d $extlib ] && %{__rm} -r $extlib -done - %{__sed} -i -e '1s,/usr/bin/python,%{__python},' scripts/pythondistdeps.py %build @@ -730,35 +711,26 @@ CPPFLAGS="-I/usr/include/lua53 %{rpmcppflags}" WITH_PERL_VERSION=no \ __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \ __GPG=%{_bindir}/gpg \ + %{?with_python:PYTHON=python%{py_ver}} \ --disable-silent-rules \ --enable-shared \ --enable-static \ - %{!?with_apidocs:--without-apidocs} \ + --with-hackingdocs=%{!?with_apidocs:no}%{?with_apidocs:yes} \ + --enable-bdb \ --with-crypto=openssl \ - --with-bugreport="http://bugs.pld-linux.org/" \ - --with-bzip2=external \ - --with-db=external \ - --with-dbapi=db \ - --with-file=external \ - --with-keyutils=%{?with_keyutils:external}%{!?with_keyutils:no} \ - --with-libelf \ --with-lua \ - --with-lzma=external \ - --with-neon=%{?with_neon:external}%{!?with_neon:no} \ - --with-path-macros='%{_rpmlibdir}/macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/%%{_target}/macros:%{_rpmlibdir}/macros.build:%{_sysconfdir}/rpm/macros.*:%{_sysconfdir}/rpm/macros:%{_sysconfdir}/rpm/%%{_target}/macros:%{_sysconfdir}/rpm/macros.d/*.macros:~/etc/.rpmmacros:~/.rpmmacros' \ - --without-path-versioned \ - --with-pcre=%{!?with_system_pcre:internal}%{?with_system_pcre:external} \ - --with-popt=external \ - %{?with_python:--with-python=%{py_ver} --with-python-lib-dir=%{py_sitedir}} \ - %{!?with_python:--without-python} \ + --with-cap \ + --with-acl \ + --with-audit \ + %{?with_python:--enable-python} \ --with-selinux=%{!?with_selinux:no}%{?with_selinux:yes} \ - --with-semanage=%{!?with_selinux:no}%{?with_selinux:external} \ - --with-sepol=%{!?with_selinux:no}%{?with_selinux:external} \ - --with-sqlite=%{?with_sqlite:yes}%{!?with_sqlite:no} \ - --with-uuid=%{_libdir}:%{_includedir}/ossp-uuid \ - --with-vendor=pld \ - --with-xz=external \ - --with-zlib=external + --with-vendor=pld + +# --enable-zstd=[yes/no/auto] build without zstd support (default=auto) +# --enable-ndb (EXPERIMENTAL) enable the new rpm database format +# --enable-lmdb=[yes/no/auto] (EXPERIMENTAL) build with LMDB rpm database format support (default=auto) +# --with-archive build rpm2archive - requires libarchive +# --with-imaevm build with imaevm support %{__make} @@ -790,6 +762,7 @@ install %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/PLD-3.0-Th-GPG-key # cleanup %ifnarch %{ix86} %{x8664} x32 rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/geode-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i386-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i486-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i586-linux/macros @@ -806,16 +779,23 @@ rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros %endif %ifnarch %{ppc} +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/m68k-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc32dy4-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8260-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8560-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros %endif +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/aarch64-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/alpha*-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/arm*-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia64-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/mips*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/riscv64-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros +rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform @@ -919,7 +899,7 @@ install %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond install %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc install %{SOURCE12} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh install %{SOURCE14} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires -#install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir} +install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir} cp -p %{SOURCE25} $RPM_BUILD_ROOT%{_rpmlibdir}/php.req.php install %{SOURCE17} $RPM_BUILD_ROOT%{_rpmlibdir}/mimetypedeps.sh install %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache @@ -965,7 +945,7 @@ done %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} %py_comp $RPM_BUILD_ROOT%{py_sitedir} -#%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/rpm/*.{la,a,py} +%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/rpm/*.{la,py} %endif # wrong location, not used anyway @@ -1051,9 +1031,16 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f #%{_rpmlibdir}/macros.d/pld %{_rpmlibdir}/platform/noarch-* %ifarch %{ix86} %{x8664} x32 +%{_rpmlibdir}/platform/athlon* +%{_rpmlibdir}/platform/geode* %{_rpmlibdir}/platform/i?86* %{_rpmlibdir}/platform/pentium* -%{_rpmlibdir}/platform/athlon* +%endif +%ifarch %{x8664} x32 +%{_rpmlibdir}/platform/amd64* +%{_rpmlibdir}/platform/ia32e* +%{_rpmlibdir}/platform/x86_64* +#%{_rpmlibdir}/platform/x32* %endif %ifarch alpha %{_rpmlibdir}/platform/alpha* @@ -1070,12 +1057,6 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %ifarch sparc sparc64 %{_rpmlibdir}/platform/sparc* %endif -%ifarch %{x8664} x32 -%{_rpmlibdir}/platform/amd64* -%{_rpmlibdir}/platform/ia32e* -%{_rpmlibdir}/platform/x86_64* -#%{_rpmlibdir}/platform/x32* -%endif %attr(755,root,root) %{_rpmlibdir}/hrmib-cache @@ -1181,13 +1162,11 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh #%attr(755,root,root) %{_rpmlibdir}/bin/api-sanity-autotest.pl #%attr(755,root,root) %{_rpmlibdir}/bin/api-sanity-checker.pl -#%{!?with_sqlite:%attr(755,root,root) %{_rpmlibdir}/bin/dbsql} #%attr(755,root,root) %{_rpmlibdir}/bin/install-sh #%attr(755,root,root) %{_rpmlibdir}/bin/mkinstalldirs #%attr(755,root,root) %{_rpmlibdir}/bin/pom2spec #%attr(755,root,root) %{_rpmlibdir}/bin/rpmspec #%attr(755,root,root) %{_rpmlibdir}/bin/rpmspecdump -#%attr(755,root,root) %{_rpmlibdir}/bin/sqlite3 #%attr(755,root,root) %{_rpmlibdir}/bin/wget #%attr(755,root,root) %{_rpmlibdir}/vcheck # not used yet ... these six depend on perl @@ -1258,16 +1237,16 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %files php-pearprov %defattr(644,root,root,755) -#%attr(755,root,root) %{_rpmlibdir}/php.prov -#%attr(755,root,root) %{_rpmlibdir}/php.req +%attr(755,root,root) %{_rpmlibdir}/php.prov +%attr(755,root,root) %{_rpmlibdir}/php.req %attr(755,root,root) %{_rpmlibdir}/php.req.php %if %{with python} %files -n python-rpm %defattr(644,root,root,755) -#%dir %{py_sitedir}/rpm -#%attr(755,root,root) %{py_sitedir}/rpm/*.so -#%{py_sitedir}/rpm/*.py[co] +%dir %{py_sitedir}/rpm +%attr(755,root,root) %{py_sitedir}/rpm/*.so +%{py_sitedir}/rpm/*.py[co] %endif %if %{with apidocs}