# HG changeset patch # User Michael Schloh von Bennewitz # Date 1301420795 -7200 # Node ID 4ecfc2416fd8fce7dc4915bb2f4bd21a4f4b55f7 # Parent 2289d64c212302940c9b57c6f1c44cbd520781cd Correct and introduce slightly needed logic, leading to better reliability: Update bash(1) patch logic, correct several buildconf make location errors, correct failed bash(1) configure invocation, enable perl(1) to build with unpathed make(1), patch rpm(1) to correctly link with internal libdb(3), and lastly unsuscessfully try to reorganize rpm patch hunks. diff -r 2289d64c2123 -r 4ecfc2416fd8 openpkg/bash.patch --- a/openpkg/bash.patch Mon Mar 28 19:41:02 2011 +0200 +++ b/openpkg/bash.patch Tue Mar 29 19:46:35 2011 +0200 @@ -16,7 +16,7 @@ +.TP .B \-D A list of all double-quoted strings preceded by \fB$\fP - is printed on the standard ouput. + is printed on the standard output. ----------------------------------------------------------------------------- @@ -69,7 +69,7 @@ - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); + printf ("GNU bash, version %s (%s) [@l_openpkg_release@]\n", shell_version_string (), MACHTYPE); if (extended) - printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n")); + printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n")); } ----------------------------------------------------------------------------- diff -r 2289d64c2123 -r 4ecfc2416fd8 openpkg/openpkg.spec --- a/openpkg/openpkg.spec Mon Mar 28 19:41:02 2011 +0200 +++ b/openpkg/openpkg.spec Tue Mar 29 19:46:35 2011 +0200 @@ -39,7 +39,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20110320 +%define V_openpkg 20110322 # the used software versions %define V_rpm 4.2.1 @@ -529,6 +529,7 @@ esac CC="${l_cc}" \ GREP="grep" \ + MAKE="${l_make}" \ ./configure \ --cache-file=./config.cache ${l_make} || exit $? @@ -582,6 +583,7 @@ echo 'ac_cv_type_iconv_t=no' ) >config.cache CC="${l_cc}" \ + MAKE="${l_make}" \ MAKEINFO="true" \ GREP="grep" \ ./configure \ @@ -698,7 +700,8 @@ echo "ac_cv_prog_cc_g=no" ) >config.cache AUTOCONF="true" \ - CC="${l_cc}" + CC="${l_cc}" \ + MAKE="${l_make}" \ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ @@ -773,6 +776,7 @@ for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do [ -d $dir ] && libdirs="$libdirs $dir" done + PATH=$PATH:`echo "${l_make}" | sed -e 's;\(.*\)/[^/][^/]*$;\1;'` \ ./Configure \ -d -e -s \ -Dprefix=%{l_prefix} \ @@ -845,6 +849,7 @@ echo 'lt_cv_sys_max_cmd_len=100' ) >config.cache CC="${l_cc}" \ + MAKE="${l_make}" \ CFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ @@ -886,6 +891,7 @@ echo 'bc_cv_as_noexecstack=no' ) >config.cache CC="${l_cc}" \ + MAKE="${l_make}" \ CFLAGS="-O" \ ./configure \ --cache-file=./config.cache \ @@ -970,8 +976,16 @@ sh $shtool subst \ -e 's;\(rsavrfy(\)\(&dig->rsa_pk\);\1\2.n, \2.e;g' \ lib/signature.c + sh $shtool subst \ + -e 's;\(^LIBS =\)[ \t]*;\1 -ldb;' \ + -e 's;\(^rpmdb_[^_][^_]*_LDFLAGS =\)[ \t]*;\1 -L$(top_srcdir)/db3;g' \ + rpmdb/Makefile.in + sh $shtool subst \ + -e 's;\(^myLDFLAGS =\);\1 -L$(top_srcdir)/db3;' \ + Makefile.in # configure the package + MAKE="${l_make}" \ sh ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ diff -r 2289d64c2123 -r 4ecfc2416fd8 openpkg/rpm.patch.bugfix --- a/openpkg/rpm.patch.bugfix Mon Mar 28 19:41:02 2011 +0200 +++ b/openpkg/rpm.patch.bugfix Tue Mar 29 19:46:35 2011 +0200 @@ -23,7 +23,7 @@ Index: build/parsePrep.c --- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 +++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 -@@ -584,12 +635,15 @@ +@@ -584,12 +584,15 @@ saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n'); /*@-usereleased@*/ for (lines = saveLines; *lines; lines++) { @@ -50,7 +50,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:38:23 -0000 -@@ -416,7 +417,7 @@ +@@ -416,7 +416,7 @@ AC_CHECK_HEADER([beecrypt/beecrypt.h], [ AC_CHECK_LIB(beecrypt, mpfprintln, [ AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).]) @@ -67,7 +67,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:38:26 -0000 -@@ -1274,7 +1305,6 @@ +@@ -1274,7 +1274,6 @@ python/rpmdb/Makefile python/test/Makefile ], [ echo timestamp > popt/stamp-h.in @@ -82,7 +82,7 @@ Index: lib/psm.c --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 +++ lib/psm.c 13 Sep 2006 13:38:27 -0000 -@@ -940,6 +960,8 @@ +@@ -940,6 +940,8 @@ if (sfdno > STDERR_FILENO) { xx = Fclose (scriptFd); } @@ -99,7 +99,7 @@ Index: lib/psm.c --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 +++ lib/psm.c 13 Sep 2006 13:38:29 -0000 -@@ -1106,11 +1128,13 @@ +@@ -1106,11 +1108,13 @@ const char ** triggerProgs; int_32 * triggerIndices; const char * sourceName; @@ -113,7 +113,7 @@ trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); if (trigger == NULL) -@@ -1149,7 +1173,7 @@ +@@ -1149,7 +1153,7 @@ { int arg1; int index; @@ -134,7 +134,7 @@ Index: lib/psm.c --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 +++ lib/psm.c 13 Sep 2006 13:38:32 -0000 -@@ -1710,6 +1734,7 @@ +@@ -1710,6 +1714,7 @@ uid = fi->uid; gid = fi->gid; @@ -142,7 +142,7 @@ if (fi->fuser && unameToUid(fi->fuser[i], &uid)) { rpmMessage(RPMMESS_WARNING, _("user %s does not exist - using root\n"), -@@ -1727,6 +1752,7 @@ +@@ -1727,6 +1732,7 @@ /* XXX this diddles header memory. */ fi->fmodes[i] &= ~S_ISGID; /* turn off the sgid bit */ } @@ -158,7 +158,7 @@ Index: lib/psm.c --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 +++ lib/psm.c 13 Sep 2006 13:38:33 -0000 -@@ -2027,7 +2053,8 @@ +@@ -2027,7 +2033,8 @@ case PSM_CHROOT_IN: { const char * rootDir = rpmtsRootDir(ts); /* Change root directory if requested and not already done. */ @@ -185,7 +185,7 @@ Index: rpmio/macro.c --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -879,7 +882,7 @@ +@@ -879,7 +879,7 @@ */ /*@-bounds@*/ /*@dependent@*/ static const char * @@ -194,7 +194,7 @@ /*@globals rpmGlobalMacroContext @*/ /*@modifies mb, rpmGlobalMacroContext @*/ { -@@ -900,7 +903,7 @@ +@@ -900,7 +900,7 @@ /* Copy args into buf until lastc */ *be++ = ' '; @@ -203,7 +203,7 @@ /*@-globs@*/ if (!isblank(c)) { *be++ = c; -@@ -968,6 +971,8 @@ +@@ -968,6 +968,8 @@ /*@-mods@*/ optind = 0; /* XXX but posix != glibc */ /*@=mods@*/ @@ -212,7 +212,7 @@ #endif opts = me->opts; -@@ -1168,7 +1175,7 @@ +@@ -1168,7 +1170,7 @@ int c; int rc = 0; int negate; @@ -221,7 +221,7 @@ int chkexist; if (++mb->depth > max_macro_depth) { -@@ -1202,7 +1209,7 @@ +@@ -1202,7 +1204,7 @@ if (mb->depth > 1) /* XXX full expansion for outermost level */ t = mb->t; /* save expansion pointer for printExpand */ negate = 0; @@ -230,7 +230,7 @@ chkexist = 0; switch ((c = *s)) { default: /* %name substitution */ -@@ -1237,7 +1244,8 @@ +@@ -1237,7 +1239,8 @@ /* For "%name " macros ... */ /*@-globs@*/ if ((c = *fe) && isblank(c)) @@ -240,7 +240,7 @@ /*@=globs@*/ /*@switchbreak@*/ break; case '(': /* %(...) shell escape */ -@@ -1284,7 +1292,7 @@ +@@ -1284,7 +1287,7 @@ ge = se - 1; /*@innerbreak@*/ break; case ' ': @@ -249,7 +249,7 @@ /*@innerbreak@*/ break; default: /*@innerbreak@*/ break; -@@ -1438,7 +1446,7 @@ +@@ -1438,7 +1441,7 @@ /* Setup args for "%name " macros with opts */ if (me && me->opts != NULL) { diff -r 2289d64c2123 -r 4ecfc2416fd8 openpkg/rpm.patch.feature --- a/openpkg/rpm.patch.feature Mon Mar 28 19:41:02 2011 +0200 +++ b/openpkg/rpm.patch.feature Tue Mar 29 19:46:35 2011 +0200 @@ -968,7 +968,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:39:12 -0000 -@@ -1200,12 +1202,12 @@ +@@ -1200,12 +1201,12 @@ AC_SUBST(LOCALEDIR) LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" AC_SUBST(LIBDIR) @@ -983,7 +983,7 @@ AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR", [Full path to rpm system configuration directory (usually /etc/rpm)]) AC_SUBST(SYSCONFIGDIR) -@@ -1215,17 +1217,17 @@ +@@ -1215,17 +1216,17 @@ [Colon separated paths of macro files to read.]) AC_SUBST(MACROFILES) @@ -1560,7 +1560,7 @@ Index: rpmio/macro.c --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -1114,9 +1119,11 @@ +@@ -1116,9 +1119,11 @@ case 2: /* COMPRESSED_BZIP2 */ sprintf(be, "%%_bzip2 %s", b); break; @@ -1572,7 +1572,7 @@ } b = be; } else if (STREQ("S", f, fn)) { -@@ -1717,9 +1725,11 @@ +@@ -1720,9 +1725,11 @@ if ((magic[0] == 'B') && (magic[1] == 'Z')) { *compressed = COMPRESSED_BZIP2; @@ -1592,7 +1592,7 @@ Index: rpmio/macro.c --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 -@@ -1329,7 +1337,7 @@ +@@ -1332,7 +1337,7 @@ STREQ("error", f, fn)) { int waserror = 0; if (STREQ("error", f, fn)) diff -r 2289d64c2123 -r 4ecfc2416fd8 openpkg/rpm.patch.porting --- a/openpkg/rpm.patch.porting Mon Mar 28 19:41:02 2011 +0200 +++ b/openpkg/rpm.patch.porting Tue Mar 29 19:46:35 2011 +0200 @@ -37,7 +37,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:40:20 -0000 -@@ -150,10 +151,10 @@ +@@ -151,10 +151,10 @@ dnl XXX Test for libpthread.a that is NPTL aware (static link only). dnl LDFLAGS_NPTL= @@ -60,7 +60,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:40:21 -0000 -@@ -446,14 +447,17 @@ +@@ -447,14 +447,17 @@ AC_CHECK_LIB(socket, socket) ]) @@ -92,7 +92,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:40:23 -0000 -@@ -963,12 +967,13 @@ +@@ -964,12 +967,13 @@ AC_CHECK_FUNCS(getpassphrase) AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [ @@ -115,7 +115,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:40:25 -0000 -@@ -1141,9 +1146,6 @@ +@@ -1142,9 +1146,6 @@ dnl XXX Choose /usr/lib or /usr/lib64 for library installs. MARK64= @@ -137,7 +137,7 @@ Index: configure.ac --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 +++ configure.ac 13 Sep 2006 13:40:29 -0000 -@@ -1249,11 +1251,40 @@ +@@ -1250,11 +1251,40 @@ AC_SUBST(OBJDUMP) @@ -1537,4 +1537,3 @@ -__END_DECLS - #endif /* err.h */ -