OBS User unknown 2009-07-24 10:07:18 +00:00 committed by Git OBS Bridge
parent afde44f6bf
commit 98cbe2ea23
5 changed files with 28 additions and 128 deletions

View File

@ -1,112 +0,0 @@
Index: rpm-4.4.2.3/lib/rpmlib.h
===================================================================
--- rpm-4.4.2.3.orig/lib/rpmlib.h 2009-07-20 10:50:09.000000000 +0200
+++ rpm-4.4.2.3/lib/rpmlib.h 2009-07-20 10:57:40.000000000 +0200
@@ -461,6 +461,7 @@ typedef enum rpmTag_e {
RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */
RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */
+ RPMTAG_SUSEBUILDCNT = 1177, /* s */
/*@-enummemuse@*/
RPMTAG_FIRSTFREE_TAG /*!< internal */
/*@=enummemuse@*/
Index: rpm-4.4.2.3/build/parsePreamble.c
===================================================================
--- rpm-4.4.2.3.orig/build/parsePreamble.c 2009-07-20 10:50:10.000000000 +0200
+++ rpm-4.4.2.3/build/parsePreamble.c 2009-07-20 11:17:14.000000000 +0200
@@ -32,6 +32,7 @@ static rpmTag copyTagsDuringParse[] = {
RPMTAG_RHNPLATFORM,
RPMTAG_DISTTAG,
RPMTAG_CVSID,
+ RPMTAG_SUSEBUILDCNT,
0
};
@@ -335,6 +336,7 @@ static struct optionalTag {
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
{ RPMTAG_DISTURL, "%{disturl}" },
{ RPMTAG_DISTTAG, "%{disttag}" },
+ { RPMTAG_SUSEBUILDCNT, "%{susebuildcnt}" },
{ -1, NULL }
};
@@ -522,6 +524,7 @@ static int handlePreambleTag(Spec spec,
case RPMTAG_RHNPLATFORM:
case RPMTAG_DISTTAG:
case RPMTAG_CVSID:
+ case RPMTAG_SUSEBUILDCNT:
SINGLE_TOKEN_ONLY;
/* These macros are for backward compatibility */
if (tag == RPMTAG_VERSION) {
@@ -759,6 +762,7 @@ static struct PreambleRec_s preambleList
{RPMTAG_NAME, 0, 0, 0, "name"},
{RPMTAG_VERSION, 0, 0, 0, "version"},
{RPMTAG_RELEASE, 0, 0, 0, "release"},
+ {RPMTAG_SUSEBUILDCNT, 0, 0, 0, "susebuildcnt"},
{RPMTAG_EPOCH, 0, 0, 0, "epoch"},
{RPMTAG_EPOCH, 0, 0, 1, "serial"},
{RPMTAG_SUMMARY, 0, 1, 0, "summary"},
Index: rpm-4.4.2.3/lib/psm.c
===================================================================
--- rpm-4.4.2.3.orig/lib/psm.c 2009-07-20 10:50:09.000000000 +0200
+++ rpm-4.4.2.3/lib/psm.c 2009-07-20 11:04:46.000000000 +0200
@@ -103,6 +103,7 @@ static struct tagMacro {
{ "version", RPMTAG_VERSION },
{ "release", RPMTAG_RELEASE },
{ "epoch", RPMTAG_EPOCH },
+ { "susebuildcnt", RPMTAG_SUSEBUILDCNT },
{ NULL, 0 }
};
Index: rpm-4.4.2.3/build/pack.c
===================================================================
--- rpm-4.4.2.3.orig/build/pack.c 2009-07-20 10:50:09.000000000 +0200
+++ rpm-4.4.2.3/build/pack.c 2009-07-20 16:36:16.000000000 +0200
@@ -41,7 +41,7 @@ static inline int genSourceRpmName(Spec
const char *name, *version, *release;
char fileName[BUFSIZ];
- (void) headerNVR(spec->packages->header, &name, &version, &release);
+ (void) headerNVR(spec->sourceHeader, &name, &version, &release);
sprintf(fileName, "%s-%s-%s.%ssrc.rpm", name, version, release,
spec->noSource ? "no" : "");
spec->sourceRpmName = xstrdup(fileName);
@@ -849,6 +849,26 @@ int packageBinaries(Spec spec)
(void) headerAddEntry(pkg->header, RPMTAG_BUILDTIME,
RPM_INT32_TYPE, getBuildTime(), 1);
+ {
+ int type, count;
+ char *ap = NULL;
+ char *rp = NULL;
+ char *bp = NULL;
+ if ((!headerGetEntry(pkg->header, RPMTAG_ARCH, &type, (void **)&ap, &count)
+ || (type == RPM_STRING_TYPE && count == 1
+ && strcmp (ap, "noarch") != 0))
+ && headerGetEntry(pkg->header, RPMTAG_RELEASE, &type, (void **) &rp, &count)
+ && type == RPM_STRING_TYPE && count == 1
+ && headerGetEntry(pkg->header, RPMTAG_SUSEBUILDCNT, &type, (void **) &bp, &count)
+ && type == RPM_STRING_TYPE && count == 1)
+ {
+ char tmp[1024];
+ snprintf (tmp, 1024, "%s.%s", rp, bp);
+ headerModifyEntry (pkg->header, RPMTAG_RELEASE, RPM_STRING_TYPE,
+ strdup (tmp), 1);
+ }
+ }
+
providePackageNVR(pkg->header);
{ const char * optflags = rpmExpand("%{optflags}", NULL);
Index: rpm-4.4.2.3/build/files.c
===================================================================
--- rpm-4.4.2.3.orig/build/files.c 2009-07-23 11:50:30.000000000 +0200
+++ rpm-4.4.2.3/build/files.c 2009-07-23 11:51:05.000000000 +0200
@@ -2608,6 +2608,7 @@ static rpmTag copyTagsForDebug[] = {
RPMTAG_DISTTAG,
RPMTAG_CVSID,
RPMTAG_ARCH,
+ RPMTAG_SUSEBUILDCNT,
0
};

View File

@ -1,7 +1,7 @@
Index: rpm-4.4.2.3/build/files.c
===================================================================
--- rpm-4.4.2.3.orig/build/files.c 2009-07-22 14:07:58.000000000 +0200
+++ rpm-4.4.2.3/build/files.c 2009-07-23 11:50:30.000000000 +0200
--- rpm-4.4.2.3.orig/build/files.c 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/build/files.c 2009-07-24 11:38:30.000000000 +0200
@@ -28,6 +28,10 @@
#define _RPMTE_INTERNAL
#include "rpmte.h"
@ -142,7 +142,15 @@ Index: rpm-4.4.2.3/build/files.c
/*@-incondefs@*/
int processBinaryFiles(Spec spec, int installSpecialDoc, int test)
/*@globals check_fileList @*/
@@ -2498,6 +2624,8 @@ int processBinaryFiles(Spec spec, int in
@@ -2492,12 +2618,16 @@ int processBinaryFiles(Spec spec, int in
{
Package pkg;
int res = 0;
+ char *buildrooturl;
check_fileList = newStringBuf();
+ buildrooturl = rpmGenPath(spec->rootURL, spec->buildRootURL, NULL);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
const char *n, *v, *r;
int rc;
@ -151,7 +159,7 @@ Index: rpm-4.4.2.3/build/files.c
if (pkg->fileList == NULL)
continue;
@@ -2508,6 +2636,106 @@ int processBinaryFiles(Spec spec, int in
@@ -2508,6 +2638,106 @@ int processBinaryFiles(Spec spec, int in
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
res = rc;
@ -185,10 +193,10 @@ Index: rpm-4.4.2.3/build/files.c
+
+ name = rpmfiFN (fi);
+ /* Skip leading buildroot. */
+ base = name + strlen (spec->buildRootURL);
+ base = name + strlen (buildrooturl);
+ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */
+ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug",
+ spec->buildRootURL, base);
+ buildrooturl, base);
+ /* If that file exists we have debug information for it. */
+ if (access (tmp, F_OK) != 0)
+ continue;
@ -260,8 +268,8 @@ Index: rpm-4.4.2.3/build/files.c
}
Index: rpm-4.4.2.3/macros.in
===================================================================
--- rpm-4.4.2.3.orig/macros.in 2009-07-22 14:07:58.000000000 +0200
+++ rpm-4.4.2.3/macros.in 2009-07-22 14:08:05.000000000 +0200
--- rpm-4.4.2.3.orig/macros.in 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/macros.in 2009-07-24 11:38:22.000000000 +0200
@@ -173,19 +173,6 @@
# Template for debug information sub-package.
%debug_package \
@ -284,8 +292,8 @@ Index: rpm-4.4.2.3/macros.in
Group: Development/Debug\
Index: rpm-4.4.2.3/scripts/find-debuginfo.sh
===================================================================
--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-22 14:07:58.000000000 +0200
+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-23 11:24:47.000000000 +0200
--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200
@@ -274,19 +274,11 @@ while read nlinks inum f; do
fi
done || exit

View File

@ -24,7 +24,7 @@ License: GPL v2 or later
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2.3
Release: 43
Release: 44
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 24 11:39:04 CEST 2009 - rguenther@suse.de
- revert SUSEBuildCnt patch
- fix debuginfo package generation for build root URLs with macros
-------------------------------------------------------------------
Thu Jul 23 12:48:50 CEST 2009 - rguenther@suse.de

View File

@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.4.2.3
Release: 43
Release: 44
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -102,7 +102,6 @@ Patch68: disttag-macro.diff
Patch69: buildidprov.diff
Patch70: xz.diff
Patch71: debugsubpkg.diff
Patch72: buildcounter.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -189,7 +188,6 @@ 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
%patch71 -p1
%patch72 -p1
chmod 755 scripts/find-supplements{,.ksyms}
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
chmod 755 scripts/firmware.prov
@ -341,7 +339,7 @@ Summary: A C library for parsing command line parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 491
Release: 492
# bug437293
%ifarch ppc64
Obsoletes: popt-64bit
@ -369,7 +367,7 @@ Summary: C Library for Parsing Command Line Parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 491
Release: 492
Requires: popt = 1.7
Requires: glibc-devel
# bug437293