From a5a68e9c69a12114a67910933fa4f2aac9d7bf91 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Fri, 28 May 2010 19:25:09 +0000 Subject: [PATCH] This commit was manufactured by cvs2git to create branch 'rpm-4_5'. Cherrypick from master 2010-05-08 12:32:02 UTC sparky '- chroot back to old root, not to old pwd': rpm-lua-exit-chroot-correctly.patch -> 1.1 rpm-popt-aliases.patch -> 1.4 Cherrypick from rpm-4_4_9 2010-05-28 19:25:09 UTC Marcin Banasiak '- don't generate:': rpm-macros-th.patch -> 1.5.2.4 --- rpm-lua-exit-chroot-correctly.patch | 38 ++++++++++++++++++++++++++ rpm-macros-th.patch | 41 +++++++++++++++++++++++++++++ rpm-popt-aliases.patch | 22 ++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 rpm-lua-exit-chroot-correctly.patch create mode 100644 rpm-macros-th.patch create mode 100644 rpm-popt-aliases.patch diff --git a/rpm-lua-exit-chroot-correctly.patch b/rpm-lua-exit-chroot-correctly.patch new file mode 100644 index 0000000..c71ed1c --- /dev/null +++ b/rpm-lua-exit-chroot-correctly.patch @@ -0,0 +1,38 @@ +--- rpm-4.5/lib/psm.c 2010-05-08 14:14:22.817080224 +0200 ++++ rpm-4.5/lib/psm.c 2010-05-08 14:14:03.063343062 +0200 +@@ -469,6 +469,7 @@ + /*@modifies psm, fileSystem, internalState @*/ + { + const rpmts ts = psm->ts; ++ int pwdFdno = -1; + int rootFdno = -1; + const char *n, *v, *r; + rpmRC rc = RPMRC_OK; +@@ -487,9 +488,12 @@ + + /* Save the current working directory. */ + /*@-nullpass@*/ +- rootFdno = open(".", O_RDONLY, 0); ++ pwdFdno = open(".", O_RDONLY, 0); + /*@=nullpass@*/ + ++ /* Save the current root directory. */ ++ rootFdno = open("/", O_RDONLY, 0); ++ + /* Get into the chroot. */ + if (!rpmtsChrootDone(ts)) { + const char *rootDir = rpmtsRootDir(ts); +@@ -554,10 +558,12 @@ + /*@=superuser =noeffect @*/ + xx = rpmtsSetChrootDone(ts, 0); + } ++ xx = fchdir(pwdFdno); + } else +- xx = fchdir(rootFdno); ++ xx = fchdir(pwdFdno); + + xx = close(rootFdno); ++ xx = close(pwdFdno); + + return rc; + } diff --git a/rpm-macros-th.patch b/rpm-macros-th.patch new file mode 100644 index 0000000..3c51b10 --- /dev/null +++ b/rpm-macros-th.patch @@ -0,0 +1,41 @@ +diff -urN rpm-4.5/macros.in rpm-4.5.new//macros.in +--- rpm-4.5/macros.in 2010-05-28 20:56:02.854032755 +0200 ++++ rpm-4.5.new//macros.in 2010-05-28 20:59:04.177348180 +0200 +@@ -277,6 +277,9 @@ + # + #%distribution + ++# PLD Linux Release ++%pld_release th ++ + # Configurable distribution URL, same as DistURL: tag in a specfile. + # The URL will be used to supply reliable information to tools like + # rpmfind. +@@ -1449,7 +1452,7 @@ + # Note: Used iff _use_internal_dependency_generator is non-zero. The + # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. + %__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name} +-%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name} ++%__libtool_requires %{nil} + + #------------------------------------------------------------------------ + # pkgconfig(...) configuration. +@@ -1459,7 +1462,7 @@ + # Note: Used iff _use_internal_dependency_generator is non-zero. The + # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. + %__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides +-%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires ++%__pkgconfig_requires %{nil} + + #------------------------------------------------------------------------ + # executable(...) configuration. +@@ -1482,6 +1485,9 @@ + # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed. + + %debugcflags -O0 -g -Wall ++%debugcppflags %{nil} ++%optldflags -Wl,--as-needed -Wl,-z,relro -Wl,-z,combreloc ++%optcppflags -D_FORTIFY_SOURCE=2 + + # Warning: those macros are overwritten by macros.build, + # left here for compatibility diff --git a/rpm-popt-aliases.patch b/rpm-popt-aliases.patch new file mode 100644 index 0000000..6ddd2da --- /dev/null +++ b/rpm-popt-aliases.patch @@ -0,0 +1,22 @@ +--- rpm-4.4.9/rpmpopt.in 2008-03-24 22:09:33.709972364 +0200 ++++ rpm-4.4.9/rpmpopt.in 2008-04-04 18:51:45.658923774 +0300 +@@ -595,4 +595,19 @@ + rpmv alias --httpproxy --define '_httpproxy !#:+' + ++rpm alias --downgrade --oldpackage \ ++ --POPTdesc=$"Allow an upgrade to replace a newer package with an older one." ++ ++rpm alias --what-provides --whatprovides \ ++ --POPTdesc=$"find package name that contains a provided capability" ++ ++rpm alias --what-requires --whatrequires \ ++ --POPTdesc=$"find package name that contains a required capability" ++ ++rpm alias --norepackage --define '_repackage_all_erasures 0' \ ++ --POPTdesc=$"Disable re-package of the files before erasing" ++ ++rpmbuild alias --disable-debuginfo --define '_enable_debug_packages 0' \ ++ --POPTdesc=$"Disable debuginfo package creation" ++ + # \endverbatim + #*/ -- 2.43.0