- work around spurious tar message [bnc#558475]

- fix defattr reset bug [bnc#594310]
- don't consider prereq deprecated for now

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=46
This commit is contained in:
Michael Schröder 2010-04-07 15:12:18 +00:00 committed by Git OBS Bridge
parent 3f51ae8169
commit 3a22e55b52
5 changed files with 103 additions and 1 deletions

20
noprereqdeprec.diff Normal file
View File

@ -0,0 +1,20 @@
--- ./build/parsePreamble.c.orig 2010-04-07 14:52:57.000000000 +0000
+++ ./build/parsePreamble.c 2010-04-07 14:53:51.000000000 +0000
@@ -748,7 +748,7 @@ static struct PreambleRec_s const preamb
{RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
{RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
{RPMTAG_REQUIREFLAGS, 1, 0, LEN_AND_STR("requires")},
- {RPMTAG_PREREQ, 1, 1, LEN_AND_STR("prereq")},
+ {RPMTAG_PREREQ, 1, 0, LEN_AND_STR("prereq")},
{RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
{RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
{RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")},
@@ -757,7 +757,7 @@ static struct PreambleRec_s const preamb
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")},
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")},
{RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")},
- {RPMTAG_BUILDPREREQ, 1, 1, LEN_AND_STR("buildprereq")},
+ {RPMTAG_BUILDPREREQ, 1, 0, LEN_AND_STR("buildprereq")},
{RPMTAG_BUILDREQUIRES, 1, 0, LEN_AND_STR("buildrequires")},
{RPMTAG_AUTOREQPROV, 0, 0, LEN_AND_STR("autoreqprov")},
{RPMTAG_AUTOREQ, 0, 0, LEN_AND_STR("autoreq")},

55
resetdefattr.diff Normal file
View File

@ -0,0 +1,55 @@
--- ./build/files.c.orig 2010-04-07 14:27:54.000000000 +0000
+++ ./build/files.c 2010-04-07 14:51:11.000000000 +0000
@@ -561,8 +561,13 @@ static rpmRC parseForAttr(const char * b
}
ar->ar_fmode = ui;
} else {
- ar->ar_fmodestr = fl->def_ar.ar_fmodestr;
- ar->ar_fmode = fl->def_ar.ar_fmode;
+ if (ret_ar == &(fl->def_ar)) {
+ ar->ar_fmodestr = NULL;
+ ar->ar_fmode = 0;
+ } else {
+ ar->ar_fmodestr = fl->def_ar.ar_fmodestr;
+ ar->ar_fmode = fl->def_ar.ar_fmode;
+ }
}
if (ar->ar_dmodestr && !isAttrDefault(ar->ar_dmodestr)) {
@@ -574,15 +579,30 @@ static rpmRC parseForAttr(const char * b
}
ar->ar_dmode = ui;
} else {
- ar->ar_dmodestr = fl->def_ar.ar_dmodestr;
- ar->ar_dmode = fl->def_ar.ar_dmode;
+ if (ret_ar == &(fl->def_ar)) {
+ ar->ar_dmodestr = NULL;
+ ar->ar_dmode = 0;
+ } else {
+ ar->ar_dmodestr = fl->def_ar.ar_dmodestr;
+ ar->ar_dmode = fl->def_ar.ar_dmode;
+ }
}
- if (!(ar->ar_user && !isAttrDefault(ar->ar_user)))
- ar->ar_user = fl->def_ar.ar_user;
+ if (!(ar->ar_user && !isAttrDefault(ar->ar_user))) {
+ if (ret_ar == &(fl->def_ar)) {
+ ar->ar_user = NULL;
+ } else {
+ ar->ar_user = fl->def_ar.ar_user;
+ }
+ }
- if (!(ar->ar_group && !isAttrDefault(ar->ar_group)))
- ar->ar_group = fl->def_ar.ar_group;
+ if (!(ar->ar_group && !isAttrDefault(ar->ar_group))) {
+ if (ret_ar == &(fl->def_ar)) {
+ ar->ar_group = 0;
+ } else {
+ ar->ar_group = fl->def_ar.ar_group;
+ }
+ }
dupAttrRec(ar, ret_ar);

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Apr 7 16:59:58 CEST 2010 - mls@suse.de
- work around spurious tar message [bnc#558475]
- fix defattr reset bug [bnc#594310]
- don't consider prereq deprecated for now
-------------------------------------------------------------------
Fri Mar 26 16:29:36 CET 2010 - mls@suse.de

View File

@ -105,6 +105,9 @@ Patch68: rpmdb-no-svc.diff
Patch69: modemuncher.diff
Patch70: repackage-nomd5.diff
Patch71: safeugid.diff
Patch72: resetdefattr.diff
Patch73: noprereqdeprec.diff
Patch74: tarrecordsize.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -165,7 +168,7 @@ rm -f rpmdb/db.h
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%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
%patch -P 70 -P 71 -P 72 -P 73 -P 74
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov

17
tarrecordsize.diff Normal file
View File

@ -0,0 +1,17 @@
--- ./build.c.orig 2010-04-07 14:56:36.000000000 +0000
+++ ./build.c 2010-04-07 14:58:52.000000000 +0000
@@ -126,7 +126,13 @@ static char * getTarSpec(const char *arg
if (!(fp = popen(cmd, "r"))) {
rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n"));
} else {
- char *fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp);
+ char *fok;
+ for (;;) {
+ fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp);
+ /* tar sometimes prints "tar: Record size = 16" messages */
+ if (!fok || strncmp(fok, "tar: ", 5) != 0)
+ break;
+ }
pclose(fp);
gotspec = (fok != NULL) && isSpecFile(tmpSpecFile);
}