Tue, 29 Mar 2011 19:46:35 +0200
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.
1.1 --- a/openpkg/bash.patch Mon Mar 28 19:41:02 2011 +0200 1.2 +++ b/openpkg/bash.patch Tue Mar 29 19:46:35 2011 +0200 1.3 @@ -16,7 +16,7 @@ 1.4 +.TP 1.5 .B \-D 1.6 A list of all double-quoted strings preceded by \fB$\fP 1.7 - is printed on the standard ouput. 1.8 + is printed on the standard output. 1.9 1.10 ----------------------------------------------------------------------------- 1.11 1.12 @@ -69,7 +69,7 @@ 1.13 - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); 1.14 + printf ("GNU bash, version %s (%s) [@l_openpkg_release@]\n", shell_version_string (), MACHTYPE); 1.15 if (extended) 1.16 - printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n")); 1.17 + printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n")); 1.18 } 1.19 1.20 -----------------------------------------------------------------------------
2.1 --- a/openpkg/openpkg.spec Mon Mar 28 19:41:02 2011 +0200 2.2 +++ b/openpkg/openpkg.spec Tue Mar 29 19:46:35 2011 +0200 2.3 @@ -39,7 +39,7 @@ 2.4 # o any cc(1) 2.5 2.6 # the package version/release 2.7 -%define V_openpkg 20110320 2.8 +%define V_openpkg 20110322 2.9 2.10 # the used software versions 2.11 %define V_rpm 4.2.1 2.12 @@ -529,6 +529,7 @@ 2.13 esac 2.14 CC="${l_cc}" \ 2.15 GREP="grep" \ 2.16 + MAKE="${l_make}" \ 2.17 ./configure \ 2.18 --cache-file=./config.cache 2.19 ${l_make} || exit $? 2.20 @@ -582,6 +583,7 @@ 2.21 echo 'ac_cv_type_iconv_t=no' 2.22 ) >config.cache 2.23 CC="${l_cc}" \ 2.24 + MAKE="${l_make}" \ 2.25 MAKEINFO="true" \ 2.26 GREP="grep" \ 2.27 ./configure \ 2.28 @@ -698,7 +700,8 @@ 2.29 echo "ac_cv_prog_cc_g=no" 2.30 ) >config.cache 2.31 AUTOCONF="true" \ 2.32 - CC="${l_cc}" 2.33 + CC="${l_cc}" \ 2.34 + MAKE="${l_make}" \ 2.35 ./configure \ 2.36 --cache-file=./config.cache \ 2.37 --prefix=%{l_prefix} \ 2.38 @@ -773,6 +776,7 @@ 2.39 for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do 2.40 [ -d $dir ] && libdirs="$libdirs $dir" 2.41 done 2.42 + PATH=$PATH:`echo "${l_make}" | sed -e 's;\(.*\)/[^/][^/]*$;\1;'` \ 2.43 ./Configure \ 2.44 -d -e -s \ 2.45 -Dprefix=%{l_prefix} \ 2.46 @@ -845,6 +849,7 @@ 2.47 echo 'lt_cv_sys_max_cmd_len=100' 2.48 ) >config.cache 2.49 CC="${l_cc}" \ 2.50 + MAKE="${l_make}" \ 2.51 CFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ 2.52 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ 2.53 LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ 2.54 @@ -886,6 +891,7 @@ 2.55 echo 'bc_cv_as_noexecstack=no' 2.56 ) >config.cache 2.57 CC="${l_cc}" \ 2.58 + MAKE="${l_make}" \ 2.59 CFLAGS="-O" \ 2.60 ./configure \ 2.61 --cache-file=./config.cache \ 2.62 @@ -970,8 +976,16 @@ 2.63 sh $shtool subst \ 2.64 -e 's;\(rsavrfy(\)\(&dig->rsa_pk\);\1\2.n, \2.e;g' \ 2.65 lib/signature.c 2.66 + sh $shtool subst \ 2.67 + -e 's;\(^LIBS =\)[ \t]*;\1 -ldb;' \ 2.68 + -e 's;\(^rpmdb_[^_][^_]*_LDFLAGS =\)[ \t]*;\1 -L$(top_srcdir)/db3;g' \ 2.69 + rpmdb/Makefile.in 2.70 + sh $shtool subst \ 2.71 + -e 's;\(^myLDFLAGS =\);\1 -L$(top_srcdir)/db3;' \ 2.72 + Makefile.in 2.73 2.74 # configure the package 2.75 + MAKE="${l_make}" \ 2.76 sh ./configure \ 2.77 --cache-file=./config.cache \ 2.78 --prefix=%{l_prefix} \
3.1 --- a/openpkg/rpm.patch.bugfix Mon Mar 28 19:41:02 2011 +0200 3.2 +++ b/openpkg/rpm.patch.bugfix Tue Mar 29 19:46:35 2011 +0200 3.3 @@ -23,7 +23,7 @@ 3.4 Index: build/parsePrep.c 3.5 --- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 3.6 +++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 3.7 -@@ -584,12 +635,15 @@ 3.8 +@@ -584,12 +584,15 @@ 3.9 saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n'); 3.10 /*@-usereleased@*/ 3.11 for (lines = saveLines; *lines; lines++) { 3.12 @@ -50,7 +50,7 @@ 3.13 Index: configure.ac 3.14 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 3.15 +++ configure.ac 13 Sep 2006 13:38:23 -0000 3.16 -@@ -416,7 +417,7 @@ 3.17 +@@ -416,7 +416,7 @@ 3.18 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ 3.19 AC_CHECK_LIB(beecrypt, mpfprintln, [ 3.20 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).]) 3.21 @@ -67,7 +67,7 @@ 3.22 Index: configure.ac 3.23 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 3.24 +++ configure.ac 13 Sep 2006 13:38:26 -0000 3.25 -@@ -1274,7 +1305,6 @@ 3.26 +@@ -1274,7 +1274,6 @@ 3.27 python/rpmdb/Makefile 3.28 python/test/Makefile 3.29 ], [ echo timestamp > popt/stamp-h.in 3.30 @@ -82,7 +82,7 @@ 3.31 Index: lib/psm.c 3.32 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 3.33 +++ lib/psm.c 13 Sep 2006 13:38:27 -0000 3.34 -@@ -940,6 +960,8 @@ 3.35 +@@ -940,6 +940,8 @@ 3.36 if (sfdno > STDERR_FILENO) { 3.37 xx = Fclose (scriptFd); 3.38 } 3.39 @@ -99,7 +99,7 @@ 3.40 Index: lib/psm.c 3.41 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 3.42 +++ lib/psm.c 13 Sep 2006 13:38:29 -0000 3.43 -@@ -1106,11 +1128,13 @@ 3.44 +@@ -1106,11 +1108,13 @@ 3.45 const char ** triggerProgs; 3.46 int_32 * triggerIndices; 3.47 const char * sourceName; 3.48 @@ -113,7 +113,7 @@ 3.49 3.50 trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); 3.51 if (trigger == NULL) 3.52 -@@ -1149,7 +1173,7 @@ 3.53 +@@ -1149,7 +1153,7 @@ 3.54 { int arg1; 3.55 int index; 3.56 3.57 @@ -134,7 +134,7 @@ 3.58 Index: lib/psm.c 3.59 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 3.60 +++ lib/psm.c 13 Sep 2006 13:38:32 -0000 3.61 -@@ -1710,6 +1734,7 @@ 3.62 +@@ -1710,6 +1714,7 @@ 3.63 3.64 uid = fi->uid; 3.65 gid = fi->gid; 3.66 @@ -142,7 +142,7 @@ 3.67 if (fi->fuser && unameToUid(fi->fuser[i], &uid)) { 3.68 rpmMessage(RPMMESS_WARNING, 3.69 _("user %s does not exist - using root\n"), 3.70 -@@ -1727,6 +1752,7 @@ 3.71 +@@ -1727,6 +1732,7 @@ 3.72 /* XXX this diddles header memory. */ 3.73 fi->fmodes[i] &= ~S_ISGID; /* turn off the sgid bit */ 3.74 } 3.75 @@ -158,7 +158,7 @@ 3.76 Index: lib/psm.c 3.77 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 3.78 +++ lib/psm.c 13 Sep 2006 13:38:33 -0000 3.79 -@@ -2027,7 +2053,8 @@ 3.80 +@@ -2027,7 +2033,8 @@ 3.81 case PSM_CHROOT_IN: 3.82 { const char * rootDir = rpmtsRootDir(ts); 3.83 /* Change root directory if requested and not already done. */ 3.84 @@ -185,7 +185,7 @@ 3.85 Index: rpmio/macro.c 3.86 --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 3.87 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 3.88 -@@ -879,7 +882,7 @@ 3.89 +@@ -879,7 +879,7 @@ 3.90 */ 3.91 /*@-bounds@*/ 3.92 /*@dependent@*/ static const char * 3.93 @@ -194,7 +194,7 @@ 3.94 /*@globals rpmGlobalMacroContext @*/ 3.95 /*@modifies mb, rpmGlobalMacroContext @*/ 3.96 { 3.97 -@@ -900,7 +903,7 @@ 3.98 +@@ -900,7 +900,7 @@ 3.99 3.100 /* Copy args into buf until lastc */ 3.101 *be++ = ' '; 3.102 @@ -203,7 +203,7 @@ 3.103 /*@-globs@*/ 3.104 if (!isblank(c)) { 3.105 *be++ = c; 3.106 -@@ -968,6 +971,8 @@ 3.107 +@@ -968,6 +968,8 @@ 3.108 /*@-mods@*/ 3.109 optind = 0; /* XXX but posix != glibc */ 3.110 /*@=mods@*/ 3.111 @@ -212,7 +212,7 @@ 3.112 #endif 3.113 3.114 opts = me->opts; 3.115 -@@ -1168,7 +1175,7 @@ 3.116 +@@ -1168,7 +1170,7 @@ 3.117 int c; 3.118 int rc = 0; 3.119 int negate; 3.120 @@ -221,7 +221,7 @@ 3.121 int chkexist; 3.122 3.123 if (++mb->depth > max_macro_depth) { 3.124 -@@ -1202,7 +1209,7 @@ 3.125 +@@ -1202,7 +1204,7 @@ 3.126 if (mb->depth > 1) /* XXX full expansion for outermost level */ 3.127 t = mb->t; /* save expansion pointer for printExpand */ 3.128 negate = 0; 3.129 @@ -230,7 +230,7 @@ 3.130 chkexist = 0; 3.131 switch ((c = *s)) { 3.132 default: /* %name substitution */ 3.133 -@@ -1237,7 +1244,8 @@ 3.134 +@@ -1237,7 +1239,8 @@ 3.135 /* For "%name " macros ... */ 3.136 /*@-globs@*/ 3.137 if ((c = *fe) && isblank(c)) 3.138 @@ -240,7 +240,7 @@ 3.139 /*@=globs@*/ 3.140 /*@switchbreak@*/ break; 3.141 case '(': /* %(...) shell escape */ 3.142 -@@ -1284,7 +1292,7 @@ 3.143 +@@ -1284,7 +1287,7 @@ 3.144 ge = se - 1; 3.145 /*@innerbreak@*/ break; 3.146 case ' ': 3.147 @@ -249,7 +249,7 @@ 3.148 /*@innerbreak@*/ break; 3.149 default: 3.150 /*@innerbreak@*/ break; 3.151 -@@ -1438,7 +1446,7 @@ 3.152 +@@ -1438,7 +1441,7 @@ 3.153 3.154 /* Setup args for "%name " macros with opts */ 3.155 if (me && me->opts != NULL) {
4.1 --- a/openpkg/rpm.patch.feature Mon Mar 28 19:41:02 2011 +0200 4.2 +++ b/openpkg/rpm.patch.feature Tue Mar 29 19:46:35 2011 +0200 4.3 @@ -968,7 +968,7 @@ 4.4 Index: configure.ac 4.5 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 4.6 +++ configure.ac 13 Sep 2006 13:39:12 -0000 4.7 -@@ -1200,12 +1202,12 @@ 4.8 +@@ -1200,12 +1201,12 @@ 4.9 AC_SUBST(LOCALEDIR) 4.10 LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" 4.11 AC_SUBST(LIBDIR) 4.12 @@ -983,7 +983,7 @@ 4.13 AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR", 4.14 [Full path to rpm system configuration directory (usually /etc/rpm)]) 4.15 AC_SUBST(SYSCONFIGDIR) 4.16 -@@ -1215,17 +1217,17 @@ 4.17 +@@ -1215,17 +1216,17 @@ 4.18 [Colon separated paths of macro files to read.]) 4.19 AC_SUBST(MACROFILES) 4.20 4.21 @@ -1560,7 +1560,7 @@ 4.22 Index: rpmio/macro.c 4.23 --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 4.24 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 4.25 -@@ -1114,9 +1119,11 @@ 4.26 +@@ -1116,9 +1119,11 @@ 4.27 case 2: /* COMPRESSED_BZIP2 */ 4.28 sprintf(be, "%%_bzip2 %s", b); 4.29 break; 4.30 @@ -1572,7 +1572,7 @@ 4.31 } 4.32 b = be; 4.33 } else if (STREQ("S", f, fn)) { 4.34 -@@ -1717,9 +1725,11 @@ 4.35 +@@ -1720,9 +1725,11 @@ 4.36 4.37 if ((magic[0] == 'B') && (magic[1] == 'Z')) { 4.38 *compressed = COMPRESSED_BZIP2; 4.39 @@ -1592,7 +1592,7 @@ 4.40 Index: rpmio/macro.c 4.41 --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 4.42 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 4.43 -@@ -1329,7 +1337,7 @@ 4.44 +@@ -1332,7 +1337,7 @@ 4.45 STREQ("error", f, fn)) { 4.46 int waserror = 0; 4.47 if (STREQ("error", f, fn))
5.1 --- a/openpkg/rpm.patch.porting Mon Mar 28 19:41:02 2011 +0200 5.2 +++ b/openpkg/rpm.patch.porting Tue Mar 29 19:46:35 2011 +0200 5.3 @@ -37,7 +37,7 @@ 5.4 Index: configure.ac 5.5 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 5.6 +++ configure.ac 13 Sep 2006 13:40:20 -0000 5.7 -@@ -150,10 +151,10 @@ 5.8 +@@ -151,10 +151,10 @@ 5.9 dnl XXX Test for libpthread.a that is NPTL aware (static link only). 5.10 dnl 5.11 LDFLAGS_NPTL= 5.12 @@ -60,7 +60,7 @@ 5.13 Index: configure.ac 5.14 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 5.15 +++ configure.ac 13 Sep 2006 13:40:21 -0000 5.16 -@@ -446,14 +447,17 @@ 5.17 +@@ -447,14 +447,17 @@ 5.18 AC_CHECK_LIB(socket, socket) 5.19 ]) 5.20 5.21 @@ -92,7 +92,7 @@ 5.22 Index: configure.ac 5.23 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 5.24 +++ configure.ac 13 Sep 2006 13:40:23 -0000 5.25 -@@ -963,12 +967,13 @@ 5.26 +@@ -964,12 +967,13 @@ 5.27 AC_CHECK_FUNCS(getpassphrase) 5.28 5.29 AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [ 5.30 @@ -115,7 +115,7 @@ 5.31 Index: configure.ac 5.32 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 5.33 +++ configure.ac 13 Sep 2006 13:40:25 -0000 5.34 -@@ -1141,9 +1146,6 @@ 5.35 +@@ -1142,9 +1146,6 @@ 5.36 5.37 dnl XXX Choose /usr/lib or /usr/lib64 for library installs. 5.38 MARK64= 5.39 @@ -137,7 +137,7 @@ 5.40 Index: configure.ac 5.41 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 5.42 +++ configure.ac 13 Sep 2006 13:40:29 -0000 5.43 -@@ -1249,11 +1251,40 @@ 5.44 +@@ -1250,11 +1251,40 @@ 5.45 5.46 AC_SUBST(OBJDUMP) 5.47 5.48 @@ -1537,4 +1537,3 @@ 5.49 -__END_DECLS 5.50 - 5.51 #endif /* err.h */ 5.52 -