- update to 4.4.2.3-rc1
- merge nss-related patches into one - change default queryformat to include arch - resolves (documentation): #159638, #233232, #332271, #350401 - resolves (build): #124300, #140597, #124995, #147383, #220449 - resolves (query): #244236, #323221, #60288 - resolves (general): #223931, #164021, #83006, #205080, #217258, #428979
This commit is contained in:
parent
6a4e3b56e1
commit
fa7edf0811
@ -1 +1 @@
|
||||
rpm-4.4.2.2.tar.gz
|
||||
rpm-4.4.2.3-rc1.tar.gz
|
||||
|
@ -1,102 +0,0 @@
|
||||
diff -r 39cb695c7c8b rpmio/base64.c
|
||||
--- a/rpmio/base64.c Thu Nov 01 10:42:01 2007 +0100
|
||||
+++ b/rpmio/base64.c Wed Nov 14 18:16:51 2007 +0100
|
||||
@@ -98,21 +98,20 @@ char *b64encode(const void *data, size_t
|
||||
return output;
|
||||
}
|
||||
|
||||
-static int base64_decode_value(char value_in)
|
||||
-{
|
||||
- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
|
||||
- static const char decoding_size = sizeof(decoding);
|
||||
+static int base64_decode_value(unsigned char value_in)
|
||||
+{
|
||||
+ static const int decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
|
||||
value_in -= 43;
|
||||
- if (value_in < 0 || value_in > decoding_size)
|
||||
+ if (value_in > sizeof(decoding)/sizeof(int))
|
||||
return -1;
|
||||
- return decoding[(int)value_in];
|
||||
+ return decoding[value_in];
|
||||
}
|
||||
|
||||
static size_t base64_decode_block(const char *code_in, const size_t length_in, char *plaintext_out)
|
||||
{
|
||||
const char *codechar = code_in;
|
||||
char *plainchar = plaintext_out;
|
||||
- char fragment;
|
||||
+ int fragment;
|
||||
|
||||
*plainchar = 0;
|
||||
|
||||
@@ -123,38 +122,38 @@ static size_t base64_decode_block(const
|
||||
{
|
||||
return plainchar - plaintext_out;
|
||||
}
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar = (fragment & 0x03f) << 2;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x030) >> 4;
|
||||
- *plainchar = (fragment & 0x00f) << 4;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x03c) >> 2;
|
||||
- *plainchar = (fragment & 0x003) << 6;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x03f);
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar = (char)((fragment & 0x03f) << 2);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)((fragment & 0x030) >> 4);
|
||||
+ *plainchar = (char)((fragment & 0x00f) << 4);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)((fragment & 0x03c) >> 2);
|
||||
+ *plainchar = (char)((fragment & 0x003) << 6);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)(fragment & 0x03f);
|
||||
}
|
||||
/* control should not reach here */
|
||||
return plainchar - plaintext_out;
|
@ -1,98 +0,0 @@
|
||||
diff -up rpm-4.4.2.2/rpmio/digest.c.nss-init rpm-4.4.2.2/rpmio/digest.c
|
||||
--- rpm-4.4.2.2/rpmio/digest.c.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/digest.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -78,9 +78,6 @@ rpmDigestInit(pgpHashAlgo hashalgo, rpmD
|
||||
HASH_HashType type;
|
||||
DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx));
|
||||
|
||||
- if (NSS_NoDB_Init(NULL) != SECSuccess)
|
||||
- return NULL;
|
||||
-
|
||||
ctx->flags = flags;
|
||||
|
||||
type = getHashType(hashalgo);
|
||||
diff -up rpm-4.4.2.2/rpmio/rpmpgp.h.nss-init rpm-4.4.2.2/rpmio/rpmpgp.h
|
||||
--- rpm-4.4.2.2/rpmio/rpmpgp.h.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/rpmpgp.h 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -1380,6 +1380,15 @@ unsigned int pgpCRC(const byte *octets,
|
||||
}
|
||||
|
||||
/** \ingroup rpmio
|
||||
+ * Perform cryptography initialization.
|
||||
+ * It must be called before any cryptography can be used within rpm.
|
||||
+ * It's not normally necessary to call it directly as it's called in
|
||||
+ * general rpm initialization routines.
|
||||
+ * @return 0 on success, -1 on failure
|
||||
+ */
|
||||
+int rpmInitCrypto(void);
|
||||
+
|
||||
+/** \ingroup rpmio
|
||||
* Duplicate a digest context.
|
||||
* @param octx existing digest context
|
||||
* @return duplicated digest context
|
||||
diff -up rpm-4.4.2.2/rpmio/rpmpgp.c.nss-init rpm-4.4.2.2/rpmio/rpmpgp.c
|
||||
--- rpm-4.4.2.2/rpmio/rpmpgp.c.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/rpmpgp.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -17,6 +17,8 @@ static int _debug = 0;
|
||||
/*@unchecked@*/
|
||||
static int _print = 0;
|
||||
|
||||
+static int _crypto_initialized = 0;
|
||||
+
|
||||
/*@unchecked@*/ /*@null@*/
|
||||
static pgpDig _dig = NULL;
|
||||
|
||||
@@ -1094,7 +1096,6 @@ int pgpPrtPkt(const byte *pkt, unsigned
|
||||
pgpDig pgpNewDig(void)
|
||||
{
|
||||
pgpDig dig = xcalloc(1, sizeof(*dig));
|
||||
- NSS_NoDB_Init(NULL);
|
||||
|
||||
return dig;
|
||||
}
|
||||
@@ -1404,5 +1405,18 @@ char * pgpArmorWrap(int atype, const uns
|
||||
|
||||
return val;
|
||||
}
|
||||
-
|
||||
/*@=boundsread@*/
|
||||
+
|
||||
+int rpmInitCrypto(void) {
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ if (!_crypto_initialized && NSS_NoDB_Init(NULL) != SECSuccess) {
|
||||
+ rc = -1;
|
||||
+ } else {
|
||||
+ _crypto_initialized = 1;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+
|
||||
diff -up rpm-4.4.2.2/tools/debugedit.c.nss-init rpm-4.4.2.2/tools/debugedit.c
|
||||
--- rpm-4.4.2.2/tools/debugedit.c.nss-init 2007-11-15 15:01:42.000000000 +0200
|
||||
+++ rpm-4.4.2.2/tools/debugedit.c 2007-11-15 15:02:23.000000000 +0200
|
||||
@@ -1318,6 +1318,8 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
void *digest = NULL;
|
||||
size_t len;
|
||||
|
||||
+ rpmInitCrypto();
|
||||
+
|
||||
while (i-- > 0)
|
||||
{
|
||||
algorithm = algorithms[i];
|
||||
diff -up rpm-4.4.2.2/lib/rpmrc.c.nss-init rpm-4.4.2.2/lib/rpmrc.c
|
||||
--- rpm-4.4.2.2/lib/rpmrc.c.nss-init 2007-09-11 09:28:15.000000000 +0300
|
||||
+++ rpm-4.4.2.2/lib/rpmrc.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -1850,6 +1850,10 @@ static int rpmReadRC(/*@null@*/ const ch
|
||||
|
||||
int rpmReadConfigFiles(const char * file, const char * target)
|
||||
{
|
||||
+ /* Initialize crypto engine as early as possible */
|
||||
+ if (rpmInitCrypto() < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
/* Preset target macros */
|
||||
/*@-nullstate@*/ /* FIX: target can be NULL */
|
@ -1,41 +0,0 @@
|
||||
diff -r f531397e7635 -r 751cf2c7614e tools/debugedit.c
|
||||
--- a/tools/debugedit.c Sun Oct 14 12:49:18 2007 +0300
|
||||
+++ b/tools/debugedit.c Thu Oct 18 09:34:54 2007 +0300
|
||||
@@ -560,11 +560,16 @@ edit_dwarf2_line (DSO *dso, uint_32 off,
|
||||
}
|
||||
else
|
||||
{
|
||||
- memcpy (s, comp_dir, comp_dir_len);
|
||||
- s[comp_dir_len] = '/';
|
||||
- memcpy (s + comp_dir_len + 1, dirt[value], dir_len);
|
||||
- s[comp_dir_len + 1 + dir_len] = '/';
|
||||
- memcpy (s + comp_dir_len + 1 + dir_len + 1, file, file_len + 1);
|
||||
+ char *p = s;
|
||||
+ if (comp_dir_len != 0)
|
||||
+ {
|
||||
+ memcpy (s, comp_dir, comp_dir_len);
|
||||
+ s[comp_dir_len] = '/';
|
||||
+ p += comp_dir_len + 1;
|
||||
+ }
|
||||
+ memcpy (p, dirt[value], dir_len);
|
||||
+ p[dir_len] = '/';
|
||||
+ memcpy (p + dir_len + 1, file, file_len + 1);
|
||||
}
|
||||
canonicalize_path (s, s);
|
||||
if (list_file_fd != -1)
|
||||
@@ -822,6 +827,7 @@ edit_attributes (DSO *dso, unsigned char
|
||||
|
||||
switch (form)
|
||||
{
|
||||
+ case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */
|
||||
case DW_FORM_addr:
|
||||
ptr += ptr_size;
|
||||
break;
|
||||
@@ -847,7 +853,6 @@ edit_attributes (DSO *dso, unsigned char
|
||||
case DW_FORM_udata:
|
||||
read_uleb128 (ptr);
|
||||
break;
|
||||
- case DW_FORM_ref_addr:
|
||||
case DW_FORM_strp:
|
||||
ptr += 4;
|
||||
break;
|
@ -1,42 +0,0 @@
|
||||
diff -up rpm-4.4.2.2/tools/debugedit.c.gcc43 rpm-4.4.2.2/tools/debugedit.c
|
||||
--- rpm-4.4.2.2/tools/debugedit.c.gcc43 2008-01-04 08:57:09.000000000 +0200
|
||||
+++ rpm-4.4.2.2/tools/debugedit.c 2008-01-04 08:58:40.000000000 +0200
|
||||
@@ -1353,12 +1353,6 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
or Elf64 object, only that we are consistent in what bits feed the
|
||||
hash so it comes out the same for the same file contents. */
|
||||
{
|
||||
- inline void process (const void *data, size_t size);
|
||||
- inline void process (const void *data, size_t size)
|
||||
- {
|
||||
- rpmDigestUpdate(ctx, data, size);
|
||||
- }
|
||||
-
|
||||
union
|
||||
{
|
||||
GElf_Ehdr ehdr;
|
||||
@@ -1387,7 +1381,7 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
goto bad;
|
||||
if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
|
||||
goto bad;
|
||||
- process (x.d_buf, x.d_size);
|
||||
+ rpmDigestUpdate(ctx, x.d_buf, x.d_size);
|
||||
}
|
||||
|
||||
x.d_type = ELF_T_SHDR;
|
||||
@@ -1399,14 +1393,14 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
u.shdr.sh_offset = 0;
|
||||
if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
|
||||
goto bad;
|
||||
- process (x.d_buf, x.d_size);
|
||||
+ rpmDigestUpdate(ctx, x.d_buf, x.d_size);
|
||||
|
||||
if (u.shdr.sh_type != SHT_NOBITS)
|
||||
{
|
||||
Elf_Data *d = elf_rawdata (dso->scn[i], NULL);
|
||||
if (d == NULL)
|
||||
goto bad;
|
||||
- process (d->d_buf, d->d_size);
|
||||
+ rpmDigestUpdate(ctx, d->d_buf, d->d_size);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
Don't reset target when reading included rpmrc's. Doesn't seem to break
|
||||
anything and fixes rhbz#232429...
|
||||
|
||||
diff -up rpm-4.4.2.2/lib/rpmrc.c.noreset rpm-4.4.2.2/lib/rpmrc.c
|
||||
--- rpm-4.4.2.2/lib/rpmrc.c.noreset 2008-01-11 10:30:12.000000000 +0200
|
||||
+++ rpm-4.4.2.2/lib/rpmrc.c 2008-01-11 10:15:27.000000000 +0200
|
||||
@@ -641,7 +641,9 @@ static int doReadRC( /*@killref@*/ FD_t
|
||||
while (*se && !xisspace(*se)) se++;
|
||||
if (*se != '\0') *se++ = '\0';
|
||||
|
||||
+#if 0
|
||||
rpmRebuildTargetVars(NULL, NULL);
|
||||
+#endif
|
||||
|
||||
fn = rpmGetPath(s, NULL);
|
||||
if (fn == NULL || *fn == '\0') {
|
@ -1,25 +0,0 @@
|
||||
changeset: 6180:aa5086a15540
|
||||
user: Ralf Corsépius <corsepiu@fedoraproject.org>
|
||||
date: Wed Oct 10 08:37:35 2007 +0200
|
||||
files: build.c
|
||||
description:
|
||||
Kick out polish comment.
|
||||
(transplanted from 6b4e7092bfc65ed7a95f4be20b86db814c6d999c)
|
||||
|
||||
|
||||
diff -r 48dd32feaef5 -r aa5086a15540 build.c
|
||||
--- a/build.c Tue Oct 09 15:47:15 2007 +0300
|
||||
+++ b/build.c Wed Oct 10 08:37:35 2007 +0200
|
||||
@@ -49,11 +49,6 @@ static int checkSpec(rpmts ts, Header h)
|
||||
return rc;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * Kurwa, durni ameryka?ce sobe zawsze my?l?, ?e ca?y ?wiat mówi po
|
||||
- * angielsku...
|
||||
- */
|
||||
-/* XXX this is still a dumb test but at least it's i18n aware */
|
||||
/**
|
||||
*/
|
||||
static int isSpecFile(const char * specfile)
|
||||
|
@ -1,197 +0,0 @@
|
||||
changeset: 6184:9de21aa6bd62
|
||||
tag: tip
|
||||
user: Panu Matilainen <pmatilai@redhat.com>
|
||||
date: Thu Sep 06 08:19:03 2007 +0300
|
||||
files: scripts/Makefile.am scripts/osgideps.pl
|
||||
description:
|
||||
Add OSGi dependency extractor script from Kyu Lee
|
||||
(transplanted from 838c8ccfcf2619369e76bdca375721e049052dc8)
|
||||
|
||||
|
||||
diff -r 358dd9d838a6 -r 9de21aa6bd62 scripts/Makefile.am
|
||||
--- a/scripts/Makefile.am Thu Oct 11 14:14:00 2007 +0300
|
||||
+++ b/scripts/Makefile.am Thu Sep 06 08:19:03 2007 +0300
|
||||
@@ -21,7 +21,7 @@ EXTRA_DIST = \
|
||||
sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
|
||||
vpkg-provides.sh vpkg-provides2.sh \
|
||||
macros.perl* macros.python* \
|
||||
- macros.php* find-*.php find-php-* mono-find*
|
||||
+ macros.php* find-*.php find-php-* mono-find* osgideps.pl
|
||||
|
||||
installprefix = $(DESTDIR)
|
||||
|
||||
@@ -38,7 +38,7 @@ config_SCRIPTS = \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl \
|
||||
find-requires.perl freshen.sh get_magic.pl getpo.sh http.req \
|
||||
magic.prov magic.req perldeps.pl perl.prov perl.req pythondeps.sh \
|
||||
- mono-find-requires mono-find-provides \
|
||||
+ mono-find-requires mono-find-provides osgideps.pl \
|
||||
rpmdb_loadcvt rpmdiff rpmdiff.cgi \
|
||||
rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
|
||||
sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
|
||||
diff -r 358dd9d838a6 -r 9de21aa6bd62 scripts/osgideps.pl
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/scripts/osgideps.pl Thu Sep 06 08:19:03 2007 +0300
|
||||
@@ -0,0 +1,161 @@
|
||||
+#!/usr/bin/perl
|
||||
+
|
||||
+
|
||||
+use Cwd;
|
||||
+use Getopt::Long;
|
||||
+
|
||||
+
|
||||
+$cdir = getcwd();
|
||||
+$TEMPDIR="/tmp";
|
||||
+$MANIFEST_NAME="META-INF/MANIFEST.MF";
|
||||
+
|
||||
+
|
||||
+# prepare temporary directory
|
||||
+if (! (-d $TEMPDIR)) {
|
||||
+ if (($_ = `mkdir $TEMPDIR`) != 0) {exit 1;}
|
||||
+ elsif (! (-w $TEMPDIR) && (-x $TEMPDIR)) {exit 1;}
|
||||
+}
|
||||
+
|
||||
+# parse options
|
||||
+my ($show_provides, $show_requires);
|
||||
+
|
||||
+my $result = GetOptions("provides" => \$show_provides,
|
||||
+ "requires" => \$show_requires);
|
||||
+
|
||||
+exit(1) if (not $result);
|
||||
+
|
||||
+
|
||||
+
|
||||
+@allfiles = <STDIN>;
|
||||
+
|
||||
+if ($show_provides) {
|
||||
+ do_provides(@allfiles);
|
||||
+}
|
||||
+
|
||||
+if ($show_requires) {
|
||||
+ do_requires(@allfiles);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+exit(0);
|
||||
+
|
||||
+
|
||||
+
|
||||
+sub do_provides {
|
||||
+
|
||||
+
|
||||
+foreach $jar (@_) {
|
||||
+
|
||||
+next if -f $jar && -r $jar;
|
||||
+ $jar =~ s/[^[:print:]]//g;
|
||||
+ # if this jar contains MANIFEST.MF file
|
||||
+ if (`jar tf $jar | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") {
|
||||
+ # extract MANIFEST.MF file from jar to temporary directory
|
||||
+ chdir $TEMPDIR;
|
||||
+ `jar xf $cdir/$jar $MANIFEST_NAME`;
|
||||
+ open(MANIFEST, "$MANIFEST_NAME");
|
||||
+ my $bundleName = "";
|
||||
+ my $bundleVersion = "";
|
||||
+ # parse bundle name and version
|
||||
+ while(<MANIFEST>) {
|
||||
+ # get rid of non-print chars (some manifest files contain weird chars
|
||||
+ s/[^[:print]]//g;
|
||||
+ if (m/(^Bundle-SymbolicName: )((\w|\.)+)(\;*)(.*\n)/) {
|
||||
+ $bundleName = $2;
|
||||
+ }
|
||||
+ if (m/(^Bundle-Version: )(.*)/) {
|
||||
+ $bundleVersion = $2;
|
||||
+ }
|
||||
+ }
|
||||
+ # skip this jar if no bundle name exists
|
||||
+ if (! $bundleName eq "") {
|
||||
+ if (! $bundleVersion eq "") {
|
||||
+ print "osgi(".$bundleName.") = ".$bundleVersion."\n";
|
||||
+ } else {
|
||||
+ print "osgi(".$bundleName.")\n";
|
||||
+ }
|
||||
+ }
|
||||
+ chdir $cdir;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+sub do_requires {
|
||||
+
|
||||
+foreach $jar (@_) {
|
||||
+next if -f $jar && -r $jar;
|
||||
+$jar =~ s/[^[:print:]]//g;
|
||||
+ if (`jar tf $jar | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") {
|
||||
+ chdir $TEMPDIR;
|
||||
+ `jar xf $cdir/$jar $MANIFEST_NAME`;
|
||||
+ open(MANIFEST, "$MANIFEST_NAME") or die;
|
||||
+ my %reqcomp = ();
|
||||
+ while(<MANIFEST>) {
|
||||
+ if (m/(^(Require-Bundle|Import-Package): )(.*)$/) {
|
||||
+ my $reqlist = "$3"."\n";
|
||||
+ while(<MANIFEST>) {
|
||||
+ if (m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/) {
|
||||
+ $len = length $_;
|
||||
+ seek MANIFEST, $len*-1 , 1;
|
||||
+ last;
|
||||
+ }
|
||||
+ $reqlist.="$_";
|
||||
+ }
|
||||
+ push @requirelist, parseReqString($reqlist);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ chdir $cdir;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+$list = "";
|
||||
+for $require (@requirelist) {
|
||||
+ $list .= "osgi(".$require->{NAME}.")".$require->{VERSION}."\n";
|
||||
+}
|
||||
+#$abc = `echo \"$list\"|grep -e \^osgi\\(.*\\)| sort|uniq`;
|
||||
+print $list;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+sub parseReqString {
|
||||
+ my $reqstr = $_[0];
|
||||
+ my @return;
|
||||
+ $reqstr =~ s/ //g;
|
||||
+ $reqstr =~ s/\n//g;
|
||||
+ $reqstr =~ s/[^[:print:]]//g;
|
||||
+ $reqstr =~ s/("[[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+)(,)([[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+")/$1 $3/g;
|
||||
+ @reqcomp = split /,/g, $reqstr;
|
||||
+ foreach $reqelement (@reqcomp) {
|
||||
+ @reqelementfrmnt = split /;/g, $reqelement;
|
||||
+ $name="";
|
||||
+ $version="";
|
||||
+ $name = $reqelementfrmnt[0];
|
||||
+ for $i (1 .. $#reqelementfrmnt) {
|
||||
+ if ($reqelementfrmnt[$i] =~ m/(^(bundle-|)version=")(.*)(")/){
|
||||
+ $version = $3;
|
||||
+ last;
|
||||
+ }
|
||||
+ }
|
||||
+ $version = parseVersion($version);
|
||||
+ push @return, { NAME=>"$name", VERSION=>"$version"};
|
||||
+ }
|
||||
+
|
||||
+ return @return;
|
||||
+}
|
||||
+
|
||||
+sub parseVersion {
|
||||
+ my $ver = $_[0];
|
||||
+ if ($ver eq "") { return "";}
|
||||
+ if ($ver =~ m/(^[\[|\(])(.+)\ (.+)([\]|\)]$)/) {
|
||||
+ ($1 eq "\[") ? return " <= $2" : return " < $2";
|
||||
+ } else {
|
||||
+ return " = $ver";
|
||||
+ }
|
||||
+ return $ver;
|
||||
+}
|
||||
+
|
||||
|
@ -1,110 +0,0 @@
|
||||
changeset: 6194:fe6fc6dc7b98
|
||||
tag: tip
|
||||
user: Panu Matilainen <pmatilai@redhat.com>
|
||||
date: Wed Oct 24 10:31:42 2007 +0300
|
||||
summary: Use NEVRA, not NEVR everywhere for rpmProblems
|
||||
|
||||
diff -r cc2abc150d64 -r fe6fc6dc7b98 lib/rpmfi.c
|
||||
--- a/lib/rpmfi.c Wed Oct 24 09:50:13 2007 +0300
|
||||
+++ b/lib/rpmfi.c Wed Oct 24 10:31:42 2007 +0300
|
||||
@@ -815,7 +815,7 @@ assert(p != NULL);
|
||||
if (j == numValid && !allowBadRelocate && actions) {
|
||||
rpmps ps = rpmtsProblems(ts);
|
||||
rpmpsAppend(ps, RPMPROB_BADRELOCATE,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
relocations[i].oldPath, NULL, NULL, 0);
|
||||
ps = rpmpsFree(ps);
|
||||
}
|
||||
diff -r cc2abc150d64 -r fe6fc6dc7b98 lib/rpmts.c
|
||||
--- a/lib/rpmts.c Wed Oct 24 09:50:13 2007 +0300
|
||||
+++ b/lib/rpmts.c Wed Oct 24 10:31:42 2007 +0300
|
||||
@@ -1356,14 +1356,14 @@ void rpmtsCheckDSIProblems(const rpmts t
|
||||
|
||||
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
|
||||
rpmpsAppend(ps, RPMPROB_DISKSPACE,
|
||||
- rpmteNEVR(te), rpmteKey(te),
|
||||
+ rpmteNEVRA(te), rpmteKey(te),
|
||||
ts->filesystems[i], NULL, NULL,
|
||||
(adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
|
||||
}
|
||||
|
||||
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
|
||||
rpmpsAppend(ps, RPMPROB_DISKNODES,
|
||||
- rpmteNEVR(te), rpmteKey(te),
|
||||
+ rpmteNEVRA(te), rpmteKey(te),
|
||||
ts->filesystems[i], NULL, NULL,
|
||||
(adj_fs_blocks(dsi->ineeded) - dsi->iavail));
|
||||
}
|
||||
diff -r cc2abc150d64 -r fe6fc6dc7b98 lib/transaction.c
|
||||
--- a/lib/transaction.c Wed Oct 24 09:50:13 2007 +0300
|
||||
+++ b/lib/transaction.c Wed Oct 24 10:31:42 2007 +0300
|
||||
@@ -138,7 +138,7 @@ static int handleInstInstalledFiles(cons
|
||||
mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES,
|
||||
&shared->otherPkg, sizeof(shared->otherPkg));
|
||||
while ((h = rpmdbNextIterator(mi)) != NULL) {
|
||||
- altNEVR = hGetNEVR(h, NULL);
|
||||
+ altNEVR = hGetNEVRA(h, NULL);
|
||||
otherFi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
|
||||
break;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ static int handleInstInstalledFiles(cons
|
||||
|
||||
if (rConflicts) {
|
||||
rpmpsAppend(ps, RPMPROB_FILE_CONFLICT,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
rpmfiDN(fi), rpmfiBN(fi),
|
||||
altNEVR,
|
||||
0);
|
||||
@@ -603,9 +603,9 @@ assert(otherFi != NULL);
|
||||
|
||||
if (rConflicts) {
|
||||
rpmpsAppend(ps, RPMPROB_NEW_FILE_CONFLICT,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
fn, NULL,
|
||||
- rpmteNEVR(otherFi->te),
|
||||
+ rpmteNEVRA(otherFi->te),
|
||||
0);
|
||||
}
|
||||
}
|
||||
@@ -703,9 +703,9 @@ static int ensureOlder(rpmts ts,
|
||||
|
||||
if (rc == 0) {
|
||||
rpmps ps = rpmtsProblems(ts);
|
||||
- const char * altNEVR = hGetNEVR(h, NULL);
|
||||
+ const char * altNEVR = hGetNEVRA(h, NULL);
|
||||
rpmpsAppend(ps, RPMPROB_OLDPACKAGE,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
NULL, NULL,
|
||||
altNEVR,
|
||||
0);
|
||||
@@ -1508,14 +1508,14 @@ rpmMessage(RPMMESS_DEBUG, _("sanity chec
|
||||
if (!(rpmtsFilterFlags(ts) & RPMPROB_FILTER_IGNOREARCH) && !tscolor)
|
||||
if (!archOkay(rpmteA(p)))
|
||||
rpmpsAppend(ps, RPMPROB_BADARCH,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
rpmteA(p), NULL,
|
||||
NULL, 0);
|
||||
|
||||
if (!(rpmtsFilterFlags(ts) & RPMPROB_FILTER_IGNOREOS))
|
||||
if (!osOkay(rpmteO(p)))
|
||||
rpmpsAppend(ps, RPMPROB_BADOS,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
rpmteO(p), NULL,
|
||||
NULL, 0);
|
||||
|
||||
@@ -1544,7 +1544,7 @@ rpmMessage(RPMMESS_DEBUG, _("sanity chec
|
||||
|
||||
while (rpmdbNextIterator(mi) != NULL) {
|
||||
rpmpsAppend(ps, RPMPROB_PKG_INSTALLED,
|
||||
- rpmteNEVR(p), rpmteKey(p),
|
||||
+ rpmteNEVRA(p), rpmteKey(p),
|
||||
NULL, NULL,
|
||||
NULL, 0);
|
||||
/*@innerbreak@*/ break;
|
||||
|
@ -1,27 +0,0 @@
|
||||
changeset: 6193:cc2abc150d64
|
||||
tag: tip
|
||||
user: Panu Matilainen <pmatilai@redhat.com>
|
||||
date: Wed Oct 24 09:50:13 2007 +0300
|
||||
summary: Don't mess up problem pkgNEVR in python ts.check() (rhbz#349091)
|
||||
|
||||
diff -r 751cf2c7614e -r cc2abc150d64 python/rpmts-py.c
|
||||
--- a/python/rpmts-py.c Thu Oct 18 09:34:54 2007 +0300
|
||||
+++ b/python/rpmts-py.c Wed Oct 24 09:50:13 2007 +0300
|
||||
@@ -439,7 +439,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts
|
||||
if (p->type == RPMPROB_BADRELOCATE)
|
||||
continue;
|
||||
|
||||
- byName = p->pkgNEVR;
|
||||
+ byName = strdup(p->pkgNEVR);
|
||||
if ((byArch= strrchr(byName, '.')) != NULL)
|
||||
*byArch++ = '\0';
|
||||
if ((byRelease = strrchr(byName, '-')) != NULL)
|
||||
@@ -475,6 +475,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts
|
||||
#endif
|
||||
PyList_Append(list, (PyObject *) cf);
|
||||
Py_DECREF(cf);
|
||||
+ free(byName);
|
||||
}
|
||||
|
||||
ps = rpmpsFree(ps);
|
||||
|
@ -1,36 +0,0 @@
|
||||
Hackery to get secondary arch macros included on x86_64...
|
||||
|
||||
diff -r 8004da6eac95 installplatform
|
||||
--- a/installplatform Thu Nov 08 15:59:45 2007 +0200
|
||||
+++ b/installplatform Mon Nov 12 16:16:31 2007 +0200
|
||||
@@ -20,7 +20,7 @@ E_O_F
|
||||
|
||||
RPM="./rpm --rcfile=$TEMPRC --macros=$MACROS"
|
||||
|
||||
-canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_'
|
||||
+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_;s,\(ia32e\|amd64\),x86_64,'
|
||||
arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`"
|
||||
VENDOR="`$RPM --eval '%{_vendor}'`"
|
||||
OS="`$RPM --eval '%{_os}'`"
|
||||
@@ -35,7 +35,7 @@ case "$arch" in
|
||||
sparc*) SUBSTS='s_sparc\(64\|64v\|v9v\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
|
||||
powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
|
||||
s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
|
||||
- x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64,' ;;
|
||||
+ x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64, s,x86_64,i386, s,x86_64,i486, s,x86_64,i586, s,x86_64,i686, s,x86_64,pentium3, s,x86_64,pentium4, s,x86_64,athlon,' ;;
|
||||
*) SUBSTS=y___ ;;
|
||||
esac
|
||||
|
||||
@@ -102,9 +102,11 @@ for SUBST in $SUBSTS ; do
|
||||
;;
|
||||
esac
|
||||
|
||||
+ CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`"
|
||||
+
|
||||
cat $PLATFORM \
|
||||
| sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
|
||||
- -e "s,@RPMRC_ARCH@,$ARCH," \
|
||||
+ -e "s,$arch,$CANONARCH," \
|
||||
-e "s,@RPMRC_GNU@,$RPMRC_GNU," \
|
||||
-e "s,@LIB@,$LIB," \
|
||||
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
|
@ -1841,3 +1841,245 @@ diff -r ec9e6c427068 tools/debugedit.c
|
||||
puts (hex);
|
||||
}
|
||||
}
|
||||
diff -r 39cb695c7c8b rpmio/base64.c
|
||||
--- a/rpmio/base64.c Thu Nov 01 10:42:01 2007 +0100
|
||||
+++ b/rpmio/base64.c Wed Nov 14 18:16:51 2007 +0100
|
||||
@@ -98,21 +98,20 @@ char *b64encode(const void *data, size_t
|
||||
return output;
|
||||
}
|
||||
|
||||
-static int base64_decode_value(char value_in)
|
||||
-{
|
||||
- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
|
||||
- static const char decoding_size = sizeof(decoding);
|
||||
+static int base64_decode_value(unsigned char value_in)
|
||||
+{
|
||||
+ static const int decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
|
||||
value_in -= 43;
|
||||
- if (value_in < 0 || value_in > decoding_size)
|
||||
+ if (value_in > sizeof(decoding)/sizeof(int))
|
||||
return -1;
|
||||
- return decoding[(int)value_in];
|
||||
+ return decoding[value_in];
|
||||
}
|
||||
|
||||
static size_t base64_decode_block(const char *code_in, const size_t length_in, char *plaintext_out)
|
||||
{
|
||||
const char *codechar = code_in;
|
||||
char *plainchar = plaintext_out;
|
||||
- char fragment;
|
||||
+ int fragment;
|
||||
|
||||
*plainchar = 0;
|
||||
|
||||
@@ -123,38 +122,38 @@ static size_t base64_decode_block(const
|
||||
{
|
||||
return plainchar - plaintext_out;
|
||||
}
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar = (fragment & 0x03f) << 2;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x030) >> 4;
|
||||
- *plainchar = (fragment & 0x00f) << 4;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x03c) >> 2;
|
||||
- *plainchar = (fragment & 0x003) << 6;
|
||||
-
|
||||
- do {
|
||||
- if (codechar == code_in+length_in)
|
||||
- {
|
||||
- return plainchar - plaintext_out;
|
||||
- }
|
||||
- fragment = (char)base64_decode_value(*codechar++);
|
||||
- } while (fragment < 0);
|
||||
- *plainchar++ |= (fragment & 0x03f);
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar = (char)((fragment & 0x03f) << 2);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)((fragment & 0x030) >> 4);
|
||||
+ *plainchar = (char)((fragment & 0x00f) << 4);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)((fragment & 0x03c) >> 2);
|
||||
+ *plainchar = (char)((fragment & 0x003) << 6);
|
||||
+
|
||||
+ do {
|
||||
+ if (codechar == code_in+length_in)
|
||||
+ {
|
||||
+ return plainchar - plaintext_out;
|
||||
+ }
|
||||
+ fragment = base64_decode_value(*codechar++);
|
||||
+ } while (fragment < 0);
|
||||
+ *plainchar++ |= (char)(fragment & 0x03f);
|
||||
}
|
||||
/* control should not reach here */
|
||||
return plainchar - plaintext_out;
|
||||
diff -up rpm-4.4.2.2/rpmio/digest.c.nss-init rpm-4.4.2.2/rpmio/digest.c
|
||||
--- rpm-4.4.2.2/rpmio/digest.c.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/digest.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -78,9 +78,6 @@ rpmDigestInit(pgpHashAlgo hashalgo, rpmD
|
||||
HASH_HashType type;
|
||||
DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx));
|
||||
|
||||
- if (NSS_NoDB_Init(NULL) != SECSuccess)
|
||||
- return NULL;
|
||||
-
|
||||
ctx->flags = flags;
|
||||
|
||||
type = getHashType(hashalgo);
|
||||
diff -up rpm-4.4.2.2/rpmio/rpmpgp.h.nss-init rpm-4.4.2.2/rpmio/rpmpgp.h
|
||||
--- rpm-4.4.2.2/rpmio/rpmpgp.h.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/rpmpgp.h 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -1380,6 +1380,15 @@ unsigned int pgpCRC(const byte *octets,
|
||||
}
|
||||
|
||||
/** \ingroup rpmio
|
||||
+ * Perform cryptography initialization.
|
||||
+ * It must be called before any cryptography can be used within rpm.
|
||||
+ * It's not normally necessary to call it directly as it's called in
|
||||
+ * general rpm initialization routines.
|
||||
+ * @return 0 on success, -1 on failure
|
||||
+ */
|
||||
+int rpmInitCrypto(void);
|
||||
+
|
||||
+/** \ingroup rpmio
|
||||
* Duplicate a digest context.
|
||||
* @param octx existing digest context
|
||||
* @return duplicated digest context
|
||||
diff -up rpm-4.4.2.2/rpmio/rpmpgp.c.nss-init rpm-4.4.2.2/rpmio/rpmpgp.c
|
||||
--- rpm-4.4.2.2/rpmio/rpmpgp.c.nss-init 2007-11-15 15:00:41.000000000 +0200
|
||||
+++ rpm-4.4.2.2/rpmio/rpmpgp.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -17,6 +17,8 @@ static int _debug = 0;
|
||||
/*@unchecked@*/
|
||||
static int _print = 0;
|
||||
|
||||
+static int _crypto_initialized = 0;
|
||||
+
|
||||
/*@unchecked@*/ /*@null@*/
|
||||
static pgpDig _dig = NULL;
|
||||
|
||||
@@ -1094,7 +1096,6 @@ int pgpPrtPkt(const byte *pkt, unsigned
|
||||
pgpDig pgpNewDig(void)
|
||||
{
|
||||
pgpDig dig = xcalloc(1, sizeof(*dig));
|
||||
- NSS_NoDB_Init(NULL);
|
||||
|
||||
return dig;
|
||||
}
|
||||
@@ -1404,5 +1405,18 @@ char * pgpArmorWrap(int atype, const uns
|
||||
|
||||
return val;
|
||||
}
|
||||
-
|
||||
/*@=boundsread@*/
|
||||
+
|
||||
+int rpmInitCrypto(void) {
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ if (!_crypto_initialized && NSS_NoDB_Init(NULL) != SECSuccess) {
|
||||
+ rc = -1;
|
||||
+ } else {
|
||||
+ _crypto_initialized = 1;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+
|
||||
diff -up rpm-4.4.2.2/tools/debugedit.c.nss-init rpm-4.4.2.2/tools/debugedit.c
|
||||
--- rpm-4.4.2.2/tools/debugedit.c.nss-init 2007-11-15 15:01:42.000000000 +0200
|
||||
+++ rpm-4.4.2.2/tools/debugedit.c 2007-11-15 15:02:23.000000000 +0200
|
||||
@@ -1318,6 +1318,8 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
void *digest = NULL;
|
||||
size_t len;
|
||||
|
||||
+ rpmInitCrypto();
|
||||
+
|
||||
while (i-- > 0)
|
||||
{
|
||||
algorithm = algorithms[i];
|
||||
diff -up rpm-4.4.2.2/lib/rpmrc.c.nss-init rpm-4.4.2.2/lib/rpmrc.c
|
||||
--- rpm-4.4.2.2/lib/rpmrc.c.nss-init 2007-09-11 09:28:15.000000000 +0300
|
||||
+++ rpm-4.4.2.2/lib/rpmrc.c 2007-11-15 15:00:41.000000000 +0200
|
||||
@@ -1850,6 +1850,10 @@ static int rpmReadRC(/*@null@*/ const ch
|
||||
|
||||
int rpmReadConfigFiles(const char * file, const char * target)
|
||||
{
|
||||
+ /* Initialize crypto engine as early as possible */
|
||||
+ if (rpmInitCrypto() < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
/* Preset target macros */
|
||||
/*@-nullstate@*/ /* FIX: target can be NULL */
|
||||
diff -up rpm-4.4.2.2/tools/debugedit.c.gcc43 rpm-4.4.2.2/tools/debugedit.c
|
||||
--- rpm-4.4.2.2/tools/debugedit.c.gcc43 2008-01-04 08:57:09.000000000 +0200
|
||||
+++ rpm-4.4.2.2/tools/debugedit.c 2008-01-04 08:58:40.000000000 +0200
|
||||
@@ -1353,12 +1353,6 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
or Elf64 object, only that we are consistent in what bits feed the
|
||||
hash so it comes out the same for the same file contents. */
|
||||
{
|
||||
- inline void process (const void *data, size_t size);
|
||||
- inline void process (const void *data, size_t size)
|
||||
- {
|
||||
- rpmDigestUpdate(ctx, data, size);
|
||||
- }
|
||||
-
|
||||
union
|
||||
{
|
||||
GElf_Ehdr ehdr;
|
||||
@@ -1387,7 +1381,7 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
goto bad;
|
||||
if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
|
||||
goto bad;
|
||||
- process (x.d_buf, x.d_size);
|
||||
+ rpmDigestUpdate(ctx, x.d_buf, x.d_size);
|
||||
}
|
||||
|
||||
x.d_type = ELF_T_SHDR;
|
||||
@@ -1399,14 +1393,14 @@ handle_build_id (DSO *dso, Elf_Data *bui
|
||||
u.shdr.sh_offset = 0;
|
||||
if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
|
||||
goto bad;
|
||||
- process (x.d_buf, x.d_size);
|
||||
+ rpmDigestUpdate(ctx, x.d_buf, x.d_size);
|
||||
|
||||
if (u.shdr.sh_type != SHT_NOBITS)
|
||||
{
|
||||
Elf_Data *d = elf_rawdata (dso->scn[i], NULL);
|
||||
if (d == NULL)
|
||||
goto bad;
|
||||
- process (d->d_buf, d->d_size);
|
||||
+ rpmDigestUpdate(ctx, d->d_buf, d->d_size);
|
||||
}
|
||||
}
|
||||
}
|
12
rpm-4.4.2.3-queryformat-arch.patch
Normal file
12
rpm-4.4.2.3-queryformat-arch.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up rpm-4.4.2.3-rc1/macros.in.qfmt rpm-4.4.2.3-rc1/macros.in
|
||||
--- rpm-4.4.2.3-rc1/macros.in.qfmt 2008-01-25 16:52:39.000000000 +0200
|
||||
+++ rpm-4.4.2.3-rc1/macros.in 2008-01-25 16:57:31.000000000 +0200
|
||||
@@ -791,7 +791,7 @@ print (t)\
|
||||
# Default headerSprintf() output format string for rpm -qa
|
||||
#
|
||||
# XXX Note: escaped %% for use in headerSprintf()
|
||||
-%_query_all_fmt %%{name}-%%{version}-%%{release}
|
||||
+%_query_all_fmt %%{name}-%%{version}-%%{release}%%|arch?{.%%{arch}}:{}|
|
||||
|
||||
#
|
||||
# Default path to the file used for transaction fcmtl lock.
|
57
rpm.spec
57
rpm.spec
@ -5,11 +5,11 @@
|
||||
|
||||
Summary: The RPM package management system
|
||||
Name: rpm
|
||||
Version: 4.4.2.2
|
||||
Release: 13%{?dist}
|
||||
Version: 4.4.2.3
|
||||
Release: 0.1.rc1
|
||||
Group: System Environment/Base
|
||||
Url: http://www.rpm.org/
|
||||
Source: http://rpm.org/releases/rpm-4.4.x/%{name}-%{version}.tar.gz
|
||||
Source: http://rpm.org/releases/rpm-4.4.x/%{name}-%{version}-rc1.tar.gz
|
||||
Patch1: rpm-4.4.1-prereq.patch
|
||||
Patch2: rpm-4.4.2-ghost-conflicts.patch
|
||||
Patch3: rpm-4.4.2-trust.patch
|
||||
@ -17,19 +17,10 @@ Patch4: rpm-4.4.2.2-devel-autodep.patch
|
||||
Patch5: rpm-4.4.2-rpmfc-skip.patch
|
||||
Patch6: rpm-4.4.2.2-matchpathcon.patch
|
||||
Patch7: rpm-4.4.2.1-no-popt.patch
|
||||
Patch8: rpm-4.4.2.2-nonutf-comment.patch
|
||||
Patch9: rpm-4.4.2.2-osgideps.patch
|
||||
Patch10: rpm-4.4.2.2-debugedit-fpc.patch
|
||||
Patch11: rpm-4.4.2.2-pyproblem.patch
|
||||
Patch12: rpm-4.4.2.2-problem-nevra.patch
|
||||
Patch13: rpm-4.4.2.2-nss.patch
|
||||
Patch14: rpm-4.4.2.2-base64-unsigned-char.patch
|
||||
Patch15: rpm-4.4.2.2-cryptoinit.patch
|
||||
Patch16: rpm-4.4.2.2-gcc43.patch
|
||||
Patch17: rpm-4.4.2.2-secondary-arch-macros.patch
|
||||
Patch18: rpm-4.4.2.2-no-targetreset.patch
|
||||
Patch19: rpm-4.4.2.2-pkgconfig-path.patch
|
||||
Patch20: rpm-4.4.2.2-autofoo.patch
|
||||
Patch8: rpm-4.4.2.3-nss.patch
|
||||
Patch9: rpm-4.4.2.2-autofoo.patch
|
||||
Patch10: rpm-4.4.2.2-pkgconfig-path.patch
|
||||
Patch11: rpm-4.4.2.3-queryformat-arch.patch
|
||||
|
||||
# XXX Beware, this is one murky license, partially GPL/LGPL dual-licensed
|
||||
# and several different components with their own licenses included...
|
||||
@ -41,9 +32,6 @@ Requires: popt >= 1.10.2.1
|
||||
Requires: crontabs
|
||||
Requires: logrotate
|
||||
|
||||
# XXX temporary
|
||||
Source2: find-debuginfo.sh
|
||||
|
||||
# XXX for autoreconf due to popt removal
|
||||
BuildRequires: autoconf automake libtool
|
||||
# XXX generally assumed to be installed but make it explicit as rpm
|
||||
@ -143,7 +131,7 @@ that will manipulate RPM packages and databases.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%setup -q -n %{name}-%{version}-rc1
|
||||
%patch1 -p1 -b .prereq
|
||||
%patch2 -p1 -b .ghostconflicts
|
||||
%patch3 -p1 -b .trust
|
||||
@ -151,19 +139,10 @@ that will manipulate RPM packages and databases.
|
||||
%patch5 -p1 -b .fcskip
|
||||
%patch6 -p1 -b .matchpathcon
|
||||
%patch7 -p1 -b .no-popt
|
||||
%patch8 -p1 -b .nonutf-comment
|
||||
%patch9 -p1 -b .osgideps
|
||||
%patch10 -p1 -b .debugedit-fpc
|
||||
%patch11 -p1 -b .pyproblem
|
||||
%patch12 -p1 -b .problem-nevra
|
||||
%patch13 -p1 -b .nss
|
||||
%patch14 -p1 -b .base64
|
||||
%patch15 -p1 -b .nss-init
|
||||
%patch16 -p1 -b .gcc43
|
||||
%patch17 -p1 -b .archmacros
|
||||
%patch18 -p1 -b .notargetreset
|
||||
%patch19 -p1 -b .pkgconfig-path
|
||||
%patch20 -p1 -b .autofoo
|
||||
%patch8 -p1 -b .nss
|
||||
%patch9 -p1 -b .autofoo
|
||||
%patch10 -p1 -b .pkgconfig-path
|
||||
%patch11 -p1 -b .qfmt-arch
|
||||
|
||||
# force external popt
|
||||
rm -rf popt/
|
||||
@ -171,9 +150,6 @@ rm -rf popt/
|
||||
# XXX for popt removal
|
||||
autoreconf
|
||||
|
||||
# new buildid-aware debuginfo
|
||||
cp -f %{SOURCE2} scripts/find-debuginfo.sh
|
||||
|
||||
%build
|
||||
|
||||
# XXX pull in updated config.guess and config.sub as done by %%configure
|
||||
@ -418,6 +394,15 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 25 2008 Panu Matilainen <pmatilai@redhat.com> 4.4.2.3-0.1.rc1
|
||||
- update to 4.4.2.3-rc1
|
||||
- merge nss-related patches into one
|
||||
- change default queryformat to include arch
|
||||
- resolves (documentation): #159638, #233232, #332271, #350401
|
||||
- resolves (build): #124300, #140597, #124995, #147383, #220449
|
||||
- resolves (query): #244236, #323221, #60288
|
||||
- resolves (general): #223931, #164021, #83006, #205080, #217258, #428979
|
||||
|
||||
* Fri Jan 11 2008 Panu Matilainen <pmatilai@redhat.com> 4.4.2.2-13
|
||||
- lose the useless rpm user+group, use root:root like everything else
|
||||
- install x86 arch macros on x86_64 (#194123)
|
||||
|
Loading…
Reference in New Issue
Block a user