From 4a484f28554237839cf56ab5da05b8086ae9f850293a7a3e65c622d108ce317a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 25 Apr 2014 10:05:25 +0000 Subject: [PATCH 1/4] Accepting request 231005 from home:coolo:branches:openSUSE:Factory - offer a %_rundir to avoid hardcoding /run - and packages wanting to support older distros, can have /var/run as fallback for the macro OBS-URL: https://build.opensuse.org/request/show/231005 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=327 --- rpm-suse_macros | 1 + rpm.changes | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/rpm-suse_macros b/rpm-suse_macros index 71296ef..9e4afa7 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -6,6 +6,7 @@ %_mandir %{_prefix}/share/man %_sysconfdir /etc %_localstatedir /var +%_rundir /run %_defaultdocdir %{_usr}/share/doc/packages # package build macros diff --git a/rpm.changes b/rpm.changes index 2beb793..f7cfbf1 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 22 09:53:19 UTC 2014 - coolo@suse.com + +- offer a %_rundir to avoid hardcoding /run - and packages wanting + to support older distros, can have /var/run as fallback for the macro + ------------------------------------------------------------------- Mon Mar 10 14:28:45 CET 2014 - mls@suse.de From 5b698646a08ef8b6de5c433b4dad9f418f120d6170423da825332b2c1f414ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Fri, 25 Apr 2014 13:42:44 +0000 Subject: [PATCH 2/4] - make _rundir configurable OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=328 --- rpm-suse_macros | 1 - rpm.changes | 5 +++++ rpm.spec | 4 +++- rundir.diff | 26 ++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 rundir.diff diff --git a/rpm-suse_macros b/rpm-suse_macros index 9e4afa7..71296ef 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -6,7 +6,6 @@ %_mandir %{_prefix}/share/man %_sysconfdir /etc %_localstatedir /var -%_rundir /run %_defaultdocdir %{_usr}/share/doc/packages # package build macros diff --git a/rpm.changes b/rpm.changes index f7cfbf1..367cf0e 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 25 15:41:57 CEST 2014 - mls@suse.de + +- make _rundir configurable + ------------------------------------------------------------------- Tue Apr 22 09:53:19 UTC 2014 - coolo@suse.com diff --git a/rpm.spec b/rpm.spec index ad1355e..0e15e1f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -137,6 +137,7 @@ Patch92: find-lang-python.patch Patch93: weakdepscompat.diff Patch94: checksepwarn.diff Patch95: exportoldtags.diff +Patch96: rundir.diff Patch6464: auto-config-update-aarch64-ppc64le.diff Patch68000: m68k.patch Patch68001: debugedit-m68k.patch @@ -226,7 +227,7 @@ rm -f rpmdb/db.h %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 %patch -P 80 -P 82 -P 85 -%patch -P 92 -P 93 -P 94 -P 95 +%patch -P 92 -P 93 -P 94 -P 95 -P 96 %ifarch aarch64 ppc64le %patch6464 @@ -274,6 +275,7 @@ sed -i -e 's,{PYTHON_VERSION}mu,{PYTHON_VERSION}mu python${PYTHON_VERSION}m,' co ./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua \ --with-vendor=suse \ +--with-rundir=/run \ --with-selinux --with-internal-beecrypt \ --with-acl --with-cap --enable-shared %{?with_python: --enable-python} $BUILDTARGET diff --git a/rundir.diff b/rundir.diff new file mode 100644 index 0000000..fe7739b --- /dev/null +++ b/rundir.diff @@ -0,0 +1,26 @@ +--- configure.ac.orig 2014-04-25 13:40:13.808532251 +0000 ++++ configure.ac 2014-04-25 13:40:13.822532172 +0000 +@@ -814,6 +814,13 @@ AC_SUBST(RPMCANONVENDOR) + AC_SUBST(RPMCANONOS) + AC_SUBST(RPMCANONGNU) + ++RUNDIR="/run" ++AC_ARG_WITH([rundir], ++ AS_HELP_STRING([--with-rundir=RUNDIR], [specify run-time variable directory]), ++ [RUNDIR=$withval]) ++AC_DEFINE_UNQUOTED([RUNDIR],["${RUNDIR}"],[run-time variable directory]) ++AC_SUBST(RUNDIR) ++ + if test X"$prefix" = XNONE ; then + usrprefix="$ac_default_prefix" + else +--- platform.in.orig 2014-04-25 13:40:13.823532166 +0000 ++++ platform.in 2014-04-25 13:41:13.034198906 +0000 +@@ -44,6 +44,7 @@ + %_initddir %{_sysconfdir}/init.d + # Deprecated misspelling, present for backwards compatibility. + %_initrddir %{_initddir} ++%_rundir @RUNDIR@ + + %_defaultdocdir %{_datadir}/doc + From 2e211b84e2c923fe0c62d1e7307bac30ae488b2588d144f702ee1b74e8f394d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 6 May 2014 09:34:42 +0000 Subject: [PATCH 3/4] add patchname OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=329 --- rpm.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/rpm.changes b/rpm.changes index 367cf0e..41e9b76 100644 --- a/rpm.changes +++ b/rpm.changes @@ -2,6 +2,7 @@ Fri Apr 25 15:41:57 CEST 2014 - mls@suse.de - make _rundir configurable + new patch: rundir.diff ------------------------------------------------------------------- Tue Apr 22 09:53:19 UTC 2014 - coolo@suse.com From cd5025c1b6dd4713b99ee55f8480f0262b885d91262c0f2918233ba6781d8570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Fri, 9 May 2014 11:38:53 +0000 Subject: [PATCH 4/4] - fix macro adjusting in installplatform OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=330 --- gentlyadjustmacros.diff | 25 +++++++++++++++++++++++++ rpm.changes | 7 +++++++ rpm.spec | 3 ++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 gentlyadjustmacros.diff diff --git a/gentlyadjustmacros.diff b/gentlyadjustmacros.diff new file mode 100644 index 0000000..b85c9e8 --- /dev/null +++ b/gentlyadjustmacros.diff @@ -0,0 +1,25 @@ +commit 46993cd3846a8c8935c980e30bbc3718338e2378 +Author: Panu Matilainen +Date: Fri May 9 10:56:46 2014 +0300 + + Sometimes a smaller hammer is better (but only sometimes) + + - The sed-munger added in commit ccd6281e699781e0b00edb16b6e9f4dec6878c15 + causes bigger breakage than it fixes, perhaps because the hammer + applied was disproportionally large. The only thing needing adjustment + is ${prefix} in case when localstatedir is not explicitly set, so + we fixup just that instead of "everything". + - Discovered via RhBug:921973 testing + +diff --git a/installplatform b/installplatform +index ffaef48..98b87f3 100755 +--- installplatform.orig ++++ installplatform +@@ -154,5 +154,5 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do + + done + +-# gently adjust autoconf variables to rpm macros... +-cat $MACROS | sed -e '/\${\w*:-/!s,\${,%{_,' > ${DESTDIR}/${pkglibdir}/macros ++# gently adjust undefined autoconf variables to rpm macros... ++cat $MACROS | sed -e 's,${prefix},%{_prefix},g' > ${DESTDIR}/${pkglibdir}/macros diff --git a/rpm.changes b/rpm.changes index 41e9b76..89fc8c4 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 9 13:33:09 CEST 2014 - mls@suse.de + +- fix macro adjusting in installplatform + the old code broke macos like GNUconfigure [bnc#874897] + new patch: gentlyadjustmacros.diff + ------------------------------------------------------------------- Fri Apr 25 15:41:57 CEST 2014 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 0e15e1f..6ab7415 100644 --- a/rpm.spec +++ b/rpm.spec @@ -138,6 +138,7 @@ Patch93: weakdepscompat.diff Patch94: checksepwarn.diff Patch95: exportoldtags.diff Patch96: rundir.diff +Patch97: gentlyadjustmacros.diff Patch6464: auto-config-update-aarch64-ppc64le.diff Patch68000: m68k.patch Patch68001: debugedit-m68k.patch @@ -227,7 +228,7 @@ rm -f rpmdb/db.h %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 %patch -P 80 -P 82 -P 85 -%patch -P 92 -P 93 -P 94 -P 95 -P 96 +%patch -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 %ifarch aarch64 ppc64le %patch6464