Переглянути джерело

fix unpacking of non-compressed tarballs and fix order and annotation of the build/parsePrep.c patches

Ralf S. Engelschall 22 роки тому
батько
коміт
c092b6ae08

+ 1 - 0
openpkg/HISTORY

@@ -2,6 +2,7 @@
 2003
 ====
 
+20030828 fix unpacking of non-compressed tarballs
 20030827 enhance and fix %post script to correctly rebuild RPM DB and import OpenPGP public key
 20030826 **** MAJOR UPGRADE FROM RPM 4.0.2 TO RPM 4.2.1 ****
 20030820 name internal bootstrapping tarball just .tar instead of .tar.Z -- it is no longer compressed.

+ 1 - 1
openpkg/openpkg.spec

@@ -39,7 +39,7 @@
 #   o any cc(1)
 
 #   the package version/release
-%define       V_openpkg  20030827
+%define       V_openpkg  20030828
 
 #   the used software versions
 %define       V_rpm      4.2.1

+ 22 - 16
openpkg/rpm.patch.bugfix

@@ -10,7 +10,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 27-Aug-2003
+##  Created on: 28-Aug-2003
 ##
 ##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
 ##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
@@ -23,21 +23,27 @@
 +---------------------------------------------------------------------------
 Index: build/parsePrep.c
 --- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
-+++ build/parsePrep.c	24 Aug 2003 13:10:15 -0000
-@@ -264,11 +296,12 @@
- 		"fi");
-     } else {
- 	buf[0] = '\0';
--	t = stpcpy( stpcpy(buf, "tar "), taropts);
-+	t = stpcpy( stpcpy(buf, tar), taropts);
- 	*t++ = ' ';
- 	t = stpcpy(t, fn);
-     }
- 
-+    tar = _free(tar);
-     urlfn = _free(urlfn);
-     return buf;
- }
++++ build/parsePrep.c	28 Aug 2003 08:13:15 -0000
+@@ -584,12 +619,15 @@
+     saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n');
+     /*@-usereleased@*/
+     for (lines = saveLines; *lines; lines++) {
++        char *cp;
++        for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++)
++            ;
+ 	res = 0;
+ /*@-boundsread@*/
+-	if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
+-	    res = doSetupMacro(spec, *lines);
+-	} else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) {
+-	    res = doPatchMacro(spec, *lines);
++	if (! strncmp(cp, "%setup", sizeof("%setup")-1)) {
++	    res = doSetupMacro(spec, cp);
++	} else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) {
++	    res = doPatchMacro(spec, cp);
+ 	} else {
+ 	    appendLineStringBuf(spec->prep, *lines);
+ 	}
 
 +---------------------------------------------------------------------------
 | Remove access to not-existing beecrypt/ subdirectory

+ 36 - 42
openpkg/rpm.patch.feature

@@ -10,7 +10,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 27-Aug-2003
+##  Created on: 28-Aug-2003
 ##
 ##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
 ##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
@@ -380,13 +380,10 @@ Index: build/parsePreamble.c
 | In OpenPKG, the RPM package contains own local versions of the
 | "patch" and "tar" tools, so we cannot accept hard-coded names here.
 | Instead we expand a variable to allow us to direct RPM to our tools.
-| Also, we allow %setup and %patch macros whitespace-indented in
-| %prep, because both in OpenPKG we both have all scripts indented and
-| this way it is more flexible and clean.
 +---------------------------------------------------------------------------
 Index: build/parsePrep.c
 --- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
-+++ build/parsePrep.c	24 Aug 2003 13:10:15 -0000
++++ build/parsePrep.c	28 Aug 2003 08:13:15 -0000
 @@ -76,6 +76,7 @@
      struct Source *sp;
      rpmCompressedMagic compressed = COMPRESSED_NOT;
@@ -442,22 +439,6 @@ Index: build/parsePrep.c
  
      for (sp = spec->sources; sp != NULL; sp = sp->next) {
  	if ((sp->flags & RPMBUILD_ISSOURCE) && (sp->num == c)) {
-@@ -182,7 +197,15 @@
- 	return NULL;
-     }
- 
-+#ifndef OPENPKG
-     urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
-+#else
-+    urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
-+    if (access(urlfn, F_OK) == -1) {
-+        urlfn = _free(urlfn);
-+        urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
-+    }
-+#endif
- 
-     /*@-internalglobs@*/ /* FIX: shrug */
-     taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf");
 @@ -228,6 +251,10 @@
  	/*@notreached@*/ break;
      }
@@ -485,26 +466,23 @@ Index: build/parsePrep.c
  	t = stpcpy(t,
  		"\n"
  		"STATUS=$?\n"
-@@ -584,12 +617,15 @@
-     saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n');
-     /*@-usereleased@*/
-     for (lines = saveLines; *lines; lines++) {
-+        char *cp;
-+        for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++)
-+            ;
- 	res = 0;
- /*@-boundsread@*/
--	if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
--	    res = doSetupMacro(spec, *lines);
--	} else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) {
--	    res = doPatchMacro(spec, *lines);
-+	if (! strncmp(cp, "%setup", sizeof("%setup")-1)) {
-+	    res = doSetupMacro(spec, cp);
-+	} else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) {
-+	    res = doPatchMacro(spec, cp);
- 	} else {
- 	    appendLineStringBuf(spec->prep, *lines);
- 	}
+@@ -264,11 +296,14 @@
+ 		"fi");
+     } else {
+ 	buf[0] = '\0';
+-	t = stpcpy( stpcpy(buf, "tar "), taropts);
+-	*t++ = ' ';
++	t = stpcpy(buf, tar);
++	t = stpcpy(t, " ");
++	t = stpcpy(t, taropts);
++	t = stpcpy(t, " ");
+ 	t = stpcpy(t, fn);
+     }
+ 
++    tar = _free(tar);
+     urlfn = _free(urlfn);
+     return buf;
+ }
 
 +---------------------------------------------------------------------------
 | Add support for splitted source directories, i.e., source files
@@ -513,7 +491,7 @@ Index: build/parsePrep.c
 +---------------------------------------------------------------------------
 Index: build/parsePrep.c
 --- build/parsePrep.c	7 Aug 2002 14:20:45 -0000	1.1.1.10
-+++ build/parsePrep.c	24 Aug 2003 13:10:15 -0000
++++ build/parsePrep.c	28 Aug 2003 08:13:15 -0000
 @@ -87,7 +88,15 @@
  	return NULL;
      }
@@ -530,6 +508,22 @@ Index: build/parsePrep.c
  
      args[0] = '\0';
      if (db) {
+@@ -182,7 +197,15 @@
+ 	return NULL;
+     }
+ 
++#ifndef OPENPKG
+     urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
++#else
++    urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
++    if (access(urlfn, F_OK) == -1) {
++        urlfn = _free(urlfn);
++        urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
++    }
++#endif
+ 
+     /*@-internalglobs@*/ /* FIX: shrug */
+     taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf");
 
 +---------------------------------------------------------------------------
 | Not everything on a system is RPM based (for instance OpenPKG is

+ 1 - 1
openpkg/rpm.patch.porting

@@ -10,7 +10,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 27-Aug-2003
+##  Created on: 28-Aug-2003
 ##
 ##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
 ##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.

+ 1 - 1
openpkg/rpm.patch.regen

@@ -10,7 +10,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 27-Aug-2003
+##  Created on: 28-Aug-2003
 ##
 ##  ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
 ##             RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.