From b126de5fc8a274f7ca0b5fec9e73f3a8e95929e74863d120028fc7a197cae6ac Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 22 Apr 2013 22:00:49 +0000 Subject: [PATCH 1/2] - add auto-config-update-aarch64.diff: * optionally automatically update config.guess/sub during build OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=259 --- auto-config-update-aarch64.diff | 27 +++++++++++++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 13 +++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 auto-config-update-aarch64.diff diff --git a/auto-config-update-aarch64.diff b/auto-config-update-aarch64.diff new file mode 100644 index 0000000..cd5571e --- /dev/null +++ b/auto-config-update-aarch64.diff @@ -0,0 +1,27 @@ +Index: build/parseBuildInstallClean.c +=================================================================== +--- build/parseBuildInstallClean.c.orig ++++ build/parseBuildInstallClean.c +@@ -46,7 +46,21 @@ int parseBuildInstallClean(rpmSpec spec, + } else if (rc < 0) { + goto exit; + } +- ++ ++ if (parsePart == PART_BUILD) { ++ char* buf = strdup( ++ "ref=/usr/lib/rpm\n" ++ "for s in guess sub; do\n" ++ " for c in $(find -maxdepth 3 -name \"config.$s\"); do\n" ++ " grep -q config-patches@ $c || continue\n" ++ " grep -q aarch64 $c || install -m 755 $ref/config.$s $c\n" ++ " done\n" ++ "done\n" ++ ); ++ appendLineStringBuf(*sbp, buf); ++ free(buf); ++ } ++ + while (! (nextPart = isPart(spec->line))) { + appendStringBuf(*sbp, spec->line); + if ((rc = readLine(spec, STRIP_NOTHING)) > 0) { diff --git a/rpm.changes b/rpm.changes index 3930040..e41248c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 22 22:00:14 UTC 2013 - dmueller@suse.com + +- add auto-config-update-aarch64.diff: + * optionally automatically update config.guess/sub during build + ------------------------------------------------------------------- Fri Apr 5 18:47:53 UTC 2013 - dmueller@suse.com diff --git a/rpm.spec b/rpm.spec index 70df009..73763b4 100644 --- a/rpm.spec +++ b/rpm.spec @@ -60,6 +60,7 @@ Source9: sysconfig.services-rpm Source10: beecrypt-4.1.2.tar.bz2 Source11: db-4.8.30.tar.bz2 Source12: baselibs.conf +Source6464: auto-config-update-aarch64.diff Patch1: beecrypt-4.1.2.diff Patch2: db.diff # quilt patches start here @@ -136,6 +137,11 @@ Patch79: helperenv.diff Patch80: config-guess-sub-update.diff Patch81: debugedit-aarch64.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build +%ifarch aarch64 +%global auto_config_guess_update 1 +%else +%global auto_config_guess_update 0 +%endif # # avoid bootstrapping problem %define _binary_payload w9.bzdio @@ -223,6 +229,9 @@ 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 81 +%if %auto_config_guess_update +patch -p0 < %{S:6464} +%endif cp config.guess config.sub db/dist/ cp config.guess config.sub beecrypt/ #chmod 755 scripts/find-supplements{,.ksyms} @@ -339,6 +348,10 @@ for i in /usr/share/automake-*/*; do fi done popd +%if %auto_config_guess_update +install -m 755 config.guess %{buildroot}/usr/lib/rpm +install -m 755 config.sub %{buildroot}/usr/lib/rpm +%endif gzip -9 CHANGES rm -rf %{buildroot}/%{_libdir}/python%{py_ver} rm -f %{buildroot}%{_libdir}/*.la From 76240e7e11c3e75950f63be2f57672d9d265c62a20cee5a1334583f76a80eed8 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 6 May 2013 18:20:13 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=260 --- rpm.spec | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/rpm.spec b/rpm.spec index 73763b4..5fad8a5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -137,11 +137,6 @@ Patch79: helperenv.diff Patch80: config-guess-sub-update.diff Patch81: debugedit-aarch64.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build -%ifarch aarch64 -%global auto_config_guess_update 1 -%else -%global auto_config_guess_update 0 -%endif # # avoid bootstrapping problem %define _binary_payload w9.bzdio @@ -229,8 +224,8 @@ 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 81 -%if %auto_config_guess_update -patch -p0 < %{S:6464} +%ifarch aarch64 +%patch6464 %endif cp config.guess config.sub db/dist/ cp config.guess config.sub beecrypt/ @@ -348,7 +343,7 @@ for i in /usr/share/automake-*/*; do fi done popd -%if %auto_config_guess_update +%ifarch aarch64 install -m 755 config.guess %{buildroot}/usr/lib/rpm install -m 755 config.sub %{buildroot}/usr/lib/rpm %endif