From: Jakub Bogusz Date: Sun, 13 Oct 2013 08:34:04 +0000 (+0200) Subject: - added rpm-double_check_unpackaged_subdirs patch (do a strict check when Bloom filte... X-Git-Tag: auto/th/rpm-5.4.13-4~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=commitdiff_plain;h=3a3e476fe0827a323ce07845970b327eebbc5488;hp=5f3f5bd6b186fa3bc84c78df47cc356b1f19bbca - added rpm-double_check_unpackaged_subdirs patch (do a strict check when Bloom filter succeeds also when checking for unpackaged subdirs) - disable silent-rules - release 3 --- diff --git a/rpm-double_check_unpackaged_subdirs.patch b/rpm-double_check_unpackaged_subdirs.patch new file mode 100644 index 0000000..b83f7de --- /dev/null +++ b/rpm-double_check_unpackaged_subdirs.patch @@ -0,0 +1,46 @@ +Let packagedDir do a strict check when Bloom filter returns true. +Also, don't try to check dirs over buildroot to avoid wasting time +for useless checks (note that before packagedDir() could succeed on +some dir over buildroot, leading to log some junk, after the end of +string shorter than buildrootL). + +--- rpm-5.4.13/build/files.c.orig 2013-10-04 21:31:18.840898688 +0200 ++++ rpm-5.4.13/build/files.c 2013-10-13 09:09:23.406411763 +0200 +@@ -3032,12 +3032,26 @@ + } + + /* auxiliary function: check if directory d is packaged */ +-static inline int packagedDir(Package pkg, const char *d) ++static int packagedDir(Package pkg, const char *d) + /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ + /*@modifies pkg->header, + rpmGlobalMacroContext, fileSystem, internalState @*/ + { +- return rpmbfChk(rpmfiFNBF(pkg->fi), d, strlen(d)); ++ if(!rpmbfChk(rpmfiFNBF(pkg->fi), d, strlen(d))) ++ return 0; ++ char * fifn = (char *) xmalloc(pkg->fi->fnlen + 1); ++ rpmuint32_t j; ++ for(j = 0; j < pkg->fi->fc; j++) { ++ const char * dn = NULL; ++ (void) urlPath(pkg->fi->dnl[pkg->fi->dil[j]], &dn); ++ strcpy(stpcpy(fifn, dn), pkg->fi->bnl[j]); ++ if (!strcmp(d, fifn)) { ++ free(fifn); ++ return 1; ++ } ++ } ++ free(fifn); ++ return 0; + } + + /* auxiliary function: find unpackaged subdirectories +@@ -3076,6 +3090,8 @@ + strcpy(fn, rpmfiFN(fi)); + /* find the first path component that is packaged */ + while ((p = strchr(p + 1, '/'))) { ++ if (p - fn < buildrootL) ++ continue; /* don't try to check components over buildroot */ + *p = '\0'; + found = packagedDir(pkg, fn); + *p = '/'; diff --git a/rpm.spec b/rpm.spec index 6a9b8ed..358c353 100644 --- a/rpm.spec +++ b/rpm.spec @@ -50,7 +50,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 5.4.13 -Release: 2 +Release: 3 License: LGPL v2.1 Group: Base # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.13-0.20130819.src.rpm @@ -164,6 +164,7 @@ Patch74: %{name}-fix-internal-lua-build.patch Patch75: %{name}-double_check_file_deps.patch Patch76: %{name}-revert-debugedit-breakage.patch Patch77: %{name}-lua-expat.patch +Patch78: %{name}-double_check_unpackaged_subdirs.patch # Patches imported from Mandriva @@ -910,6 +911,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %patch75 -p1 %patch76 -p0 %patch77 -p0 +%patch78 -p1 %patch1000 -p1 %patch1001 -p1 @@ -1002,34 +1004,35 @@ sed -i \ CPP="%{__newcpp}" \ WITH_PERL_VERSION=no \ __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \ + --disable-silent-rules \ --enable-shared \ --enable-static \ %{!?with_apidocs:--without-apidocs} \ - %{?with_python:--with-python=%{py_ver} --with-python-lib-dir=%{py_sitedir}} \ - %{!?with_python:--without-python} \ - --with-selinux=%{!?with_selinux:no}%{?with_selinux:external} \ - --with-sepol=%{!?with_selinux:no}%{?with_selinux:external} \ - --with-semanage=%{!?with_selinux:no}%{?with_selinux:external} \ - --with-libelf \ - --with-zlib=external \ - --with-bzip2=external \ --with-beecrypt=external \ - --with-lzma=external \ - --with-xz=external \ - --with-neon=%{?with_neon:external}%{!?with_neon:no} \ - --with-file=external \ - --with-popt=external \ + --with-bugreport="http://bugs.pld-linux.org/" \ + --with-bzip2=external \ --with-db=external \ --with-dbapi=db \ - --with-sqlite=%{?with_sqlite:yes}%{!?with_sqlite:no} \ + --with-file=external \ + --with-keyutils=%{?with_keyutils:external}%{!?with_keyutils:no} \ + --with-libelf \ --with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \ + --with-lzma=external \ + --with-neon=%{?with_neon:external}%{!?with_neon:no} \ + --with-path-macros='%{_rpmlibdir}/macros:%{_rpmlibdir}/%{_target}/macros:%{_rpmlibdir}/macros.d/pld:%{_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=external \ - --with-keyutils=%{?with_keyutils:external}%{!?with_keyutils:no} \ + --with-popt=external \ + %{?with_python:--with-python=%{py_ver} --with-python-lib-dir=%{py_sitedir}} \ + %{!?with_python:--without-python} \ + --with-selinux=%{!?with_selinux:no}%{?with_selinux:external} \ + --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 \ - --without-path-versioned \ - --with-path-macros='%{_rpmlibdir}/macros:%{_rpmlibdir}/%{_target}/macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/macros.build:%{_sysconfdir}/rpm/macros.*:%{_sysconfdir}/rpm/macros:%{_sysconfdir}/rpm/%{_target}/macros:%{_sysconfdir}/rpm/macros.d/*.macros:~/etc/.rpmmacros:~/.rpmmacros' \ - --with-bugreport="http://bugs.pld-linux.org/" \ - --with-vendor=pld + --with-vendor=pld \ + --with-xz=external \ + --with-zlib=external %{__make} -j1 \ CC="%{__cc}" \ @@ -1172,14 +1175,14 @@ sparc-[^-]*-[Ll]inux(-gnu)? noarch-[^-]*-.* EOF -rm $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides* -rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl -rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl -rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh -rm $RPM_BUILD_ROOT%{_rpmlibdir}/lib/liblua.a -rm $RPM_BUILD_ROOT%{_rpmlibdir}/lib/liblua.la -rm $RPM_BUILD_ROOT%{_rpmlibdir}/mono-find-provides -rm $RPM_BUILD_ROOT%{_rpmlibdir}/mono-find-requires +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides* +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/lib/liblua.a +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/lib/liblua.la +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/mono-find-provides +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/mono-find-requires # not installed since 4.4.8 (-tools-perl subpackage) install scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir}