Pile of patches to clear up accumulated bug queue...
- abort transaction on python callback crash - package signing fixes (#442761, #463482) - fix uncompress macro wrt bzip - force cloexec all open descriptors on scriptlet execution - make find-lang --with-man brp-compress friendly - handle headerLoad() failure in rpmReadHeader() correctly - fix --nodirtokens build option (#462391) - drop no longer necessary jar.so.debug kludge (#442264) - remove buggy, i386-specific RDTSC timing code (#435309) - fix retrieval of multiple package through a proxy (#450205) - ensure default SIGPIPE handler for --pipe (#444389)
This commit is contained in:
parent
877a04d001
commit
8dd1aac03e
76
rpm-4.4.2.3-addsignature.patch
Normal file
76
rpm-4.4.2.3-addsignature.patch
Normal file
@ -0,0 +1,76 @@
|
||||
commit 4a72b894a369a75f10706683b7fddfba07749d36
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu May 8 09:07:06 2008 +0300
|
||||
|
||||
Check rpmAddSignature() return codes (rhbz#442761)
|
||||
- headerGetEntry() on RPMTAG_HEADERIMMUTABLE already caught the corrupted
|
||||
package, we just didn't paying attention
|
||||
- make the hge failed error message a bit more meaningful
|
||||
|
||||
Backported from HEAD cb36d48351ea944d445db29635750042f445ec3d
|
||||
|
||||
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
|
||||
index b4d377e..d145d3a 100644
|
||||
--- a/lib/rpmchecksig.c
|
||||
+++ b/lib/rpmchecksig.c
|
||||
@@ -288,12 +288,18 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
|
||||
xx = headerRemoveEntry(sigh, RPMSIGTAG_BADSHA1_2);
|
||||
|
||||
/* Toss and recalculate header+payload size and digests. */
|
||||
- xx = headerRemoveEntry(sigh, RPMSIGTAG_SIZE);
|
||||
- xx = rpmAddSignature(sigh, sigtarget, RPMSIGTAG_SIZE, qva->passPhrase);
|
||||
- xx = headerRemoveEntry(sigh, RPMSIGTAG_MD5);
|
||||
- xx = rpmAddSignature(sigh, sigtarget, RPMSIGTAG_MD5, qva->passPhrase);
|
||||
- xx = headerRemoveEntry(sigh, RPMSIGTAG_SHA1);
|
||||
- xx = rpmAddSignature(sigh, sigtarget, RPMSIGTAG_SHA1, qva->passPhrase);
|
||||
+ {
|
||||
+ enum rpmtagSignature const sigs[] = { RPMSIGTAG_SIZE,
|
||||
+ RPMSIGTAG_MD5,
|
||||
+ RPMSIGTAG_SHA1,
|
||||
+ };
|
||||
+ int i, nsigs = sizeof(sigs) / sizeof(enum rpmtagSignature);
|
||||
+ for (i = 0; i < nsigs; i++) {
|
||||
+ (void) headerRemoveEntry(sigh, sigs[i]);
|
||||
+ if (rpmAddSignature(sigh, sigtarget, sigs[i], qva->passPhrase))
|
||||
+ goto exit;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (deleting) { /* Nuke all the signature tags. */
|
||||
xx = headerRemoveEntry(sigh, RPMSIGTAG_GPG);
|
||||
@@ -326,7 +332,9 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
|
||||
}
|
||||
|
||||
xx = headerRemoveEntry(sigh, sigtag);
|
||||
- xx = rpmAddSignature(sigh, sigtarget, sigtag, qva->passPhrase);
|
||||
+ if (rpmAddSignature(sigh, sigtarget, sigtag, qva->passPhrase)) {
|
||||
+ goto exit;
|
||||
+ }
|
||||
|
||||
/* If package was previously signed, check for same signer. */
|
||||
memset(newsignid, 0, sizeof(newsignid));
|
||||
@@ -665,7 +673,9 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig)
|
||||
|| uh == NULL)
|
||||
{
|
||||
h = headerFree(h);
|
||||
- rpmError(RPMERR_FREAD, _("%s: headerGetEntry failed\n"), fn);
|
||||
+ rpmlog(RPMERR_FREAD,
|
||||
+ _("%s: Immutable header region could not be read. "
|
||||
+ "Corrupted package?\n"), fn);
|
||||
goto exit;
|
||||
}
|
||||
dig->hdrsha1ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE);
|
||||
diff --git a/lib/signature.c b/lib/signature.c
|
||||
index 5617e32..684846f 100644
|
||||
--- a/lib/signature.c
|
||||
+++ b/lib/signature.c
|
||||
@@ -732,6 +732,9 @@ static int makeHDRSignature(Header sigh, const char * file, int_32 sigTag,
|
||||
if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)
|
||||
|| uh == NULL)
|
||||
{
|
||||
+ rpmlog(RPMERR_FREAD,
|
||||
+ _("Immutable header region could not be read. "
|
||||
+ "Corrupted package?\n"));
|
||||
h = headerFree(h);
|
||||
goto exit;
|
||||
}
|
19
rpm-4.4.2.3-bzip-uncompress.patch
Normal file
19
rpm-4.4.2.3-bzip-uncompress.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit f2466c6304907a76ab8a8e2e20ca639d027bf968
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Fri Apr 4 15:52:52 2008 +0300
|
||||
|
||||
Missing decompression arguments for bzip in uncompress macro
|
||||
|
||||
diff --git a/rpmio/macro.c b/rpmio/macro.c
|
||||
index 6dd58ce..1a6ef12 100644
|
||||
--- a/rpmio/macro.c
|
||||
+++ b/rpmio/macro.c
|
||||
@@ -1176,7 +1176,7 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
|
||||
sprintf(be, "%%_gzip -dc %s", b);
|
||||
break;
|
||||
case COMPRESSED_BZIP2:
|
||||
- sprintf(be, "%%_bzip2 %s", b);
|
||||
+ sprintf(be, "%%_bzip2 -dc %s", b);
|
||||
break;
|
||||
case COMPRESSED_ZIP:
|
||||
sprintf(be, "%%_unzip %s", b);
|
37
rpm-4.4.2.3-cloexec.patch
Normal file
37
rpm-4.4.2.3-cloexec.patch
Normal file
@ -0,0 +1,37 @@
|
||||
commit 2b82ada80fd8352abadb3bb1fcd4c64961abed3b
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Wed Aug 13 15:38:19 2008 +0300
|
||||
|
||||
Force FD_CLOEXEC on all potentially open descriptors
|
||||
- instead of just "100 should be large enough", use sysconf() to grab
|
||||
number of max open files and do them all. If sysconf() fails,
|
||||
use 1024 as "should be enough for everybody"
|
||||
- backported from HEAD aa9a791d808f504781d0b75255df3387383a1809
|
||||
|
||||
diff --git a/lib/psm.c b/lib/psm.c
|
||||
index 0f53c7f..e09fb27 100644
|
||||
--- a/lib/psm.c
|
||||
+++ b/lib/psm.c
|
||||
@@ -806,6 +806,7 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
|
||||
int pipes[2];
|
||||
int flag;
|
||||
int fdno;
|
||||
+ int open_max;
|
||||
|
||||
pipes[0] = pipes[1] = 0;
|
||||
/* make stdin inaccessible */
|
||||
@@ -814,8 +815,12 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
|
||||
xx = dup2(pipes[0], STDIN_FILENO);
|
||||
xx = close(pipes[0]);
|
||||
|
||||
- /* XXX Force FD_CLOEXEC on 1st 100 inherited fdno's. */
|
||||
- for (fdno = 3; fdno < 100; fdno++) {
|
||||
+ /* XXX Force FD_CLOEXEC on all inherited fdno's. */
|
||||
+ open_max = sysconf(_SC_OPEN_MAX);
|
||||
+ if (open_max == -1) {
|
||||
+ open_max = 1024;
|
||||
+ }
|
||||
+ for (fdno = 3; fdno < open_max; fdno++) {
|
||||
flag = fcntl(fdno, F_GETFD);
|
||||
if (flag == -1 || (flag & FD_CLOEXEC))
|
||||
continue;
|
29
rpm-4.4.2.3-find-lang-man.patch
Normal file
29
rpm-4.4.2.3-find-lang-man.patch
Normal file
@ -0,0 +1,29 @@
|
||||
commit 3c441dc5a1f257ecc114ea72da618e12f22d3ef1
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Tue Apr 15 13:27:43 2008 +0300
|
||||
|
||||
Make find-lang.sh --with-man brp-compress friendly (rhbz#440994)
|
||||
|
||||
Patch from Ville Skyttä
|
||||
|
||||
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh
|
||||
index 7a74e02..0ca4707 100755
|
||||
--- a/scripts/find-lang.sh
|
||||
+++ b/scripts/find-lang.sh
|
||||
@@ -153,14 +153,14 @@ s:%lang(C) ::
|
||||
find $TOP_DIR -type d|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\)::
|
||||
-'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1:
|
||||
+'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME
|
||||
|
||||
find $TOP_DIR -type f -o -type l|sed '
|
||||
s:'"$TOP_DIR"'::
|
||||
-'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1:
|
||||
+'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
|
||||
s:^\([^%].*\)::
|
||||
s:%lang(C) ::
|
||||
/^$/d' >> $MO_NAME
|
18
rpm-4.4.2.3-headerload-err.patch
Normal file
18
rpm-4.4.2.3-headerload-err.patch
Normal file
@ -0,0 +1,18 @@
|
||||
commit 0dbf5280540ed78faaa509d8653526cb0f334190
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu Sep 18 14:34:42 2008 +0300
|
||||
|
||||
Force error return if headerLoad() fails
|
||||
|
||||
diff --git a/lib/package.c b/lib/package.c
|
||||
index 09571b0..d026226 100644
|
||||
--- a/lib/package.c
|
||||
+++ b/lib/package.c
|
||||
@@ -721,6 +721,7 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg)
|
||||
h = headerLoad(ei);
|
||||
if (h == NULL) {
|
||||
(void) snprintf(buf, sizeof(buf), _("hdr load: BAD\n"));
|
||||
+ rc = RPMRC_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
h->flags |= HEADERFLAG_ALLOCATED;
|
22
rpm-4.4.2.3-no-jar-exclude.patch
Normal file
22
rpm-4.4.2.3-no-jar-exclude.patch
Normal file
@ -0,0 +1,22 @@
|
||||
commit 29ea11c3cb07dd6ea97accc41fc2b569f0d05e74
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Tue Apr 15 13:13:40 2008 +0300
|
||||
|
||||
Don't exempt *.jar.so.debug from buildroot checks (rhbz#442264)
|
||||
- jar-kludge no longer necessary...
|
||||
|
||||
Patch from Ville Skyttä
|
||||
|
||||
diff --git a/scripts/check-buildroot b/scripts/check-buildroot
|
||||
index 0a9ec4b..89a283f 100755
|
||||
--- a/scripts/check-buildroot
|
||||
+++ b/scripts/check-buildroot
|
||||
@@ -27,7 +27,7 @@ trap "rm -f $tmp" EXIT
|
||||
|
||||
find "$RPM_BUILD_ROOT" \! \( \
|
||||
-name '*.pyo' -o -name '*.pyc' -o -name '*.elc' -o -name '.packlist' \
|
||||
- -o -name '*.jar.so.debug' \) -type f -print0 | \
|
||||
+ \) -type f -print0 | \
|
||||
LANG=C xargs -0r grep -F "$RPM_BUILD_ROOT" >$tmp
|
||||
|
||||
test -s "$tmp" && {
|
212
rpm-4.4.2.3-no-rdtsc.patch
Normal file
212
rpm-4.4.2.3-no-rdtsc.patch
Normal file
@ -0,0 +1,212 @@
|
||||
commit c4d1ed354d8a3b1bc3352211f84ebb77a3ce8841
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Mon Apr 21 12:39:18 2008 +0300
|
||||
|
||||
Rip i386-specific RDTSC support from rpmsw, use gettimeofday() everywhere
|
||||
- we don't need accuracy beyond what gettimeofday() offers for bleeping
|
||||
debugging benchmarks
|
||||
- we especially don't need hw-specific magic asm voodoo to get unreliable
|
||||
timing results (RDTSC isn't reliable with multi-core/hyperthreaded CPU's
|
||||
etc etc)
|
||||
- fixes rhbz#435309
|
||||
|
||||
diff --git a/rpmio/rpmsw.c b/rpmio/rpmsw.c
|
||||
index 5334782..87a2311 100644
|
||||
--- a/rpmio/rpmsw.c
|
||||
+++ b/rpmio/rpmsw.c
|
||||
@@ -22,78 +22,16 @@ static rpmtime_t rpmsw_overhead = 0;
|
||||
static rpmtime_t rpmsw_cycles = 1;
|
||||
|
||||
/*@unchecked@*/
|
||||
-static int rpmsw_type = 0;
|
||||
-
|
||||
-/*@unchecked@*/
|
||||
static int rpmsw_initialized = 0;
|
||||
|
||||
-#if defined(__i386__)
|
||||
-/* Swiped from glibc-2.3.2 sysdeps/i386/i686/hp-timing.h */
|
||||
-
|
||||
-#define HP_TIMING_ZERO(Var) (Var) = (0)
|
||||
-#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var))
|
||||
-
|
||||
-/* It's simple arithmetic for us. */
|
||||
-#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||
-
|
||||
-/* We have to jump through hoops to get this correctly implemented. */
|
||||
-#define HP_TIMING_ACCUM(Sum, Diff) \
|
||||
- do { \
|
||||
- char __not_done; \
|
||||
- hp_timing_t __oldval = (Sum); \
|
||||
- hp_timing_t __diff = (Diff) - GL(dl_hp_timing_overhead); \
|
||||
- do \
|
||||
- { \
|
||||
- hp_timing_t __newval = __oldval + __diff; \
|
||||
- int __temp0, __temp1; \
|
||||
- __asm__ __volatile__ ("xchgl %4, %%ebx\n\t" \
|
||||
- "lock; cmpxchg8b %1\n\t" \
|
||||
- "sete %0\n\t" \
|
||||
- "movl %4, %%ebx" \
|
||||
- : "=q" (__not_done), "=m" (Sum), \
|
||||
- "=A" (__oldval), "=c" (__temp0), \
|
||||
- "=SD" (__temp1) \
|
||||
- : "1" (Sum), "2" (__oldval), \
|
||||
- "3" (__newval >> 32), \
|
||||
- "4" (__newval & 0xffffffff) \
|
||||
- : "memory"); \
|
||||
- } \
|
||||
- while (__not_done); \
|
||||
- } while (0)
|
||||
-
|
||||
-/* No threads, no extra work. */
|
||||
-#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
|
||||
-
|
||||
-/* Print the time value. */
|
||||
-#define HP_TIMING_PRINT(Buf, Len, Val) \
|
||||
- do { \
|
||||
- char __buf[20]; \
|
||||
- char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0); \
|
||||
- int __len = (Len); \
|
||||
- char *__dest = (Buf); \
|
||||
- while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \
|
||||
- *__dest++ = *__cp++; \
|
||||
- memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \
|
||||
- } while (0)
|
||||
-#endif /* __i386__ */
|
||||
-
|
||||
rpmsw rpmswNow(rpmsw sw)
|
||||
{
|
||||
if (!rpmsw_initialized)
|
||||
(void) rpmswInit();
|
||||
if (sw == NULL)
|
||||
return NULL;
|
||||
- switch (rpmsw_type) {
|
||||
- case 0:
|
||||
- if (gettimeofday(&sw->u.tv, NULL))
|
||||
- return NULL;
|
||||
- break;
|
||||
-#if defined(HP_TIMING_NOW)
|
||||
- case 1:
|
||||
- HP_TIMING_NOW(sw->u.ticks);
|
||||
- break;
|
||||
-#endif
|
||||
- }
|
||||
+ if (gettimeofday(&sw->u.tv, NULL))
|
||||
+ return NULL;
|
||||
return sw;
|
||||
}
|
||||
|
||||
@@ -122,18 +60,7 @@ rpmtime_t rpmswDiff(rpmsw end, rpmsw begin)
|
||||
|
||||
if (end == NULL || begin == NULL)
|
||||
return 0;
|
||||
- switch (rpmsw_type) {
|
||||
- default:
|
||||
- case 0:
|
||||
- ticks = tvsub(&end->u.tv, &begin->u.tv);
|
||||
- break;
|
||||
-#if defined(HP_TIMING_NOW)
|
||||
- case 1:
|
||||
- if (end->u.ticks > begin->u.ticks)
|
||||
- HP_TIMING_DIFF(ticks, begin->u.ticks, end->u.ticks);
|
||||
- break;
|
||||
-#endif
|
||||
- }
|
||||
+ ticks = tvsub(&end->u.tv, &begin->u.tv);
|
||||
if (ticks >= rpmsw_overhead)
|
||||
ticks -= rpmsw_overhead;
|
||||
if (rpmsw_cycles > 1)
|
||||
@@ -141,38 +68,6 @@ rpmtime_t rpmswDiff(rpmsw end, rpmsw begin)
|
||||
return ticks;
|
||||
}
|
||||
|
||||
-#if defined(HP_TIMING_NOW)
|
||||
-static rpmtime_t rpmswCalibrate(void)
|
||||
- /*@globals internalState @*/
|
||||
- /*@modifies internalState @*/
|
||||
-{
|
||||
- struct rpmsw_s begin, end;
|
||||
- rpmtime_t ticks;
|
||||
- struct timespec req, rem;
|
||||
- int rc;
|
||||
- int i;
|
||||
-
|
||||
-/*@-uniondef@*/
|
||||
- (void) rpmswNow(&begin);
|
||||
-/*@=uniondef@*/
|
||||
- req.tv_sec = 0;
|
||||
- req.tv_nsec = 20 * 1000 * 1000;
|
||||
- for (i = 0; i < 100; i++) {
|
||||
- rc = nanosleep(&req, &rem);
|
||||
- if (rc == 0)
|
||||
- break;
|
||||
- if (rem.tv_sec == 0 && rem.tv_nsec == 0)
|
||||
- break;
|
||||
- req = rem; /* structure assignment */
|
||||
- }
|
||||
-/*@-uniondef@*/
|
||||
- ticks = rpmswDiff(rpmswNow(&end), &begin);
|
||||
-/*@=uniondef@*/
|
||||
-
|
||||
- return ticks;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
rpmtime_t rpmswInit(void)
|
||||
/*@globals rpmsw_cycles, rpmsw_initialized, rpmsw_overhead,
|
||||
rpmsw_type @*/
|
||||
@@ -180,8 +75,6 @@ rpmtime_t rpmswInit(void)
|
||||
rpmsw_type @*/
|
||||
{
|
||||
struct rpmsw_s begin, end;
|
||||
- unsigned long long sum_cycles = 0;
|
||||
- rpmtime_t sum_usecs = 0;
|
||||
rpmtime_t sum_overhead = 0;
|
||||
rpmtime_t cycles;
|
||||
int i;
|
||||
@@ -193,38 +86,6 @@ rpmtime_t rpmswInit(void)
|
||||
|
||||
/* Convergence for simultaneous cycles and overhead is overkill ... */
|
||||
for (i = 0; i < 3; i++) {
|
||||
-#if defined(HP_TIMING_NOW)
|
||||
- rpmtime_t save_cycles = rpmsw_cycles;
|
||||
-
|
||||
- /* We want cycles, not cycles/usec, here. */
|
||||
- rpmsw_cycles = 1;
|
||||
-
|
||||
- /* Start wall clock. */
|
||||
- rpmsw_type = 0;
|
||||
-/*@-uniondef@*/
|
||||
- (void) rpmswNow(&begin);
|
||||
-/*@=uniondef@*/
|
||||
-
|
||||
- /* Get no. of cycles while doing nanosleep. */
|
||||
- rpmsw_type = 1;
|
||||
- cycles = rpmswCalibrate();
|
||||
- if (save_cycles > 0 && rpmsw_overhead > 0)
|
||||
- cycles -= (save_cycles * rpmsw_overhead);
|
||||
- sum_cycles += cycles;
|
||||
-
|
||||
- /* Compute wall clock delta in usecs. */
|
||||
- rpmsw_type = 0;
|
||||
-/*@-uniondef@*/
|
||||
- sum_usecs += rpmswDiff(rpmswNow(&end), &begin);
|
||||
-/*@=uniondef@*/
|
||||
- rpmsw_type = 1;
|
||||
-
|
||||
- /* Compute cycles/usec */
|
||||
- rpmsw_cycles = sum_cycles/sum_usecs;
|
||||
-#else
|
||||
- rpmsw_type = 0;
|
||||
-#endif
|
||||
-
|
||||
/* Calculate timing overhead in usecs. */
|
||||
/*@-uniondef@*/
|
||||
(void) rpmswNow(&begin);
|
||||
@@ -232,7 +93,6 @@ rpmtime_t rpmswInit(void)
|
||||
/*@=uniondef@*/
|
||||
|
||||
rpmsw_overhead = sum_overhead/(i+1);
|
||||
-
|
||||
}
|
||||
|
||||
return rpmsw_overhead;
|
46
rpm-4.4.2.3-nodirtokens.patch
Normal file
46
rpm-4.4.2.3-nodirtokens.patch
Normal file
@ -0,0 +1,46 @@
|
||||
commit 7739cb6fffb2371266371ec58486a3cde4fca155
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Tue Sep 16 12:03:26 2008 +0300
|
||||
|
||||
Resurrect --nodirtokens build option
|
||||
- this gets somewhat hysterical: we create the filelist as uncompressed,
|
||||
then compress it for rpmfi which only understands compressed filelist,
|
||||
and if nodirtokens is used, expand the list again after initializing
|
||||
rpmfi for cpio/fsm...
|
||||
|
||||
diff --git a/build/files.c b/build/files.c
|
||||
index 83f67cd..d58c88b 100644
|
||||
--- a/build/files.c
|
||||
+++ b/build/files.c
|
||||
@@ -1358,14 +1358,8 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
if (_addDotSlash)
|
||||
(void) rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
|
||||
|
||||
- /* Choose how filenames are represented. */
|
||||
- if (_noDirTokens)
|
||||
- expandFilelist(h);
|
||||
- else {
|
||||
- compressFilelist(h);
|
||||
- /* Binary packages with dirNames cannot be installed by legacy rpm. */
|
||||
- (void) rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
|
||||
- }
|
||||
+ /* rpmfi only groks compressed filelists */
|
||||
+ compressFilelist(h);
|
||||
|
||||
{ int scareMem = 0;
|
||||
rpmts ts = NULL; /* XXX FIXME drill rpmts ts all the way down here */
|
||||
@@ -1467,6 +1461,14 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
fi = rpmfiFree(fi);
|
||||
/*@=branchstate =compdef@*/
|
||||
}
|
||||
+
|
||||
+ /* Convert back to expanded filelist if legacy format requested */
|
||||
+ if (_noDirTokens)
|
||||
+ expandFilelist(h);
|
||||
+ else {
|
||||
+ /* Binary packages with dirNames cannot be installed by legacy rpm. */
|
||||
+ (void) rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
|
||||
+ }
|
||||
}
|
||||
/*@=bounds@*/
|
||||
|
28
rpm-4.4.2.3-proxy.patch
Normal file
28
rpm-4.4.2.3-proxy.patch
Normal file
@ -0,0 +1,28 @@
|
||||
commit afb12a466d632ef2479a7a705c41cbd230e1e750
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Fri Sep 19 11:16:06 2008 +0300
|
||||
|
||||
Fix retrieval of multiple packages through a proxy (rhbz#450205)
|
||||
- update url cache to contain the actual url we requested on cache hit
|
||||
|
||||
diff --git a/rpmio/url.c b/rpmio/url.c
|
||||
index 3f947f5..daceeb5 100644
|
||||
--- a/rpmio/url.c
|
||||
+++ b/rpmio/url.c
|
||||
@@ -236,7 +236,15 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk)
|
||||
continue;
|
||||
if (urlStrcmp(u->portstr, ou->portstr))
|
||||
continue;
|
||||
- break; /* Found item in cache */
|
||||
+ /*
|
||||
+ * Found item in cache.
|
||||
+ * Now ensure the url actually points to the requested path.
|
||||
+ */
|
||||
+ if (urlStrcmp(u->url, ou->url) != 0) {
|
||||
+ _free(ou->url);
|
||||
+ ou->url = xstrdup(u->url);
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (i == _url_count) {
|
18
rpm-4.4.2.3-sigpipe.patch
Normal file
18
rpm-4.4.2.3-sigpipe.patch
Normal file
@ -0,0 +1,18 @@
|
||||
commit 0bbd26299bd892617f5af1a50049e4606abca70d
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Fri May 2 11:40:29 2008 +0300
|
||||
|
||||
Ensure default SIGPIPE handler for --pipe (rhbz#444389)
|
||||
|
||||
diff --git a/rpmqv.c b/rpmqv.c
|
||||
index 251dd3f..c12ae80 100644
|
||||
--- a/rpmqv.c
|
||||
+++ b/rpmqv.c
|
||||
@@ -614,6 +614,7 @@ int main(int argc, const char ** argv)
|
||||
(void) pipe(p);
|
||||
|
||||
if (!(pipeChild = fork())) {
|
||||
+ (void) signal(SIGPIPE, SIG_DFL);
|
||||
(void) close(p[1]);
|
||||
(void) dup2(p[0], STDIN_FILENO);
|
||||
(void) close(p[0]);
|
36
rpm.spec
36
rpm.spec
@ -6,7 +6,7 @@
|
||||
Summary: The RPM package management system
|
||||
Name: rpm
|
||||
Version: 4.4.2.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Group: System Environment/Base
|
||||
Url: http://www.rpm.org/
|
||||
Source: http://rpm.org/releases/rpm-4.4.x/%{name}-%{version}.tar.gz
|
||||
@ -23,6 +23,16 @@ Patch10: rpm-4.4.2.2-pkgconfig-path.patch
|
||||
Patch11: rpm-4.4.2.3-queryformat-arch.patch
|
||||
Patch12: rpm-4.4.2.3-no-order-rescan-limit.patch
|
||||
Patch13: rpm-4.4.2.3-fix-find-requires.patch
|
||||
Patch14: rpm-4.4.2.3-addsignature.patch
|
||||
Patch15: rpm-4.4.2.3-bzip-uncompress.patch
|
||||
Patch16: rpm-4.4.2.3-cloexec.patch
|
||||
Patch17: rpm-4.4.2.3-find-lang-man.patch
|
||||
Patch18: rpm-4.4.2.3-headerload-err.patch
|
||||
Patch19: rpm-4.4.2.3-nodirtokens.patch
|
||||
Patch20: rpm-4.4.2.3-no-jar-exclude.patch
|
||||
Patch21: rpm-4.4.2.3-no-rdtsc.patch
|
||||
Patch22: rpm-4.4.2.3-proxy.patch
|
||||
Patch23: rpm-4.4.2.3-sigpipe.patch
|
||||
Patch50: rpm-4.4.2.3-rc1-sparc-mcpu.patch
|
||||
|
||||
# XXX Beware, this is one murky license, partially GPL/LGPL dual-licensed
|
||||
@ -148,6 +158,17 @@ that will manipulate RPM packages and databases.
|
||||
%patch11 -p1 -b .qfmt-arch
|
||||
%patch12 -p1 -b .no-order-limit
|
||||
%patch13 -p1 -b .requires
|
||||
%patch14 -p1 -b .addsig
|
||||
%patch15 -p1 -b .bzip
|
||||
%patch16 -p1 -b .cloexec
|
||||
%patch17 -p1 -b .findlang
|
||||
%patch18 -p1 -b .hdrload
|
||||
%patch19 -p1 -b .nodirtoken
|
||||
%patch20 -p1 -b .jar
|
||||
%patch21 -p1 -b .nordtsc
|
||||
%patch22 -p1 -b .proxy
|
||||
%patch23 -p1 -b .sigpipe
|
||||
|
||||
%patch50 -p1 -b .sparc-mcpu
|
||||
|
||||
# force external popt
|
||||
@ -401,6 +422,19 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Dec 12 2008 Panu Matilainen <pmatilai@redhat.com> 4.4.2.3-3
|
||||
- abort transaction on python callback crash
|
||||
- package signing fixes (#442761, #463482)
|
||||
- fix uncompress macro wrt bzip
|
||||
- force cloexec all open descriptors on scriptlet execution
|
||||
- make find-lang --with-man brp-compress friendly
|
||||
- handle headerLoad() failure in rpmReadHeader() correctly
|
||||
- fix --nodirtokens build option (#462391)
|
||||
- drop no longer necessary jar.so.debug kludge (#442264)
|
||||
- remove buggy, i386-specific RDTSC timing code (#435309)
|
||||
- fix retrieval of multiple package through a proxy (#450205)
|
||||
- ensure default SIGPIPE handler for --pipe (#444389)
|
||||
|
||||
* Fri Apr 18 2008 Bill Nottingham <notting@redhat.com> 4.4.2.3-2
|
||||
- fix find-requires (#443015)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user