Compare commits

..

7 Commits
master ... f13

Author SHA1 Message Date
Paul Whalen 233bb3037a Added patch for ARM builds 2011-05-28 11:49:45 -04:00
Paul Whalen 2b03c0dab4 Added patch for ARM builds 2011-05-27 12:48:36 -04:00
Fedora Release Engineering abf039d8a8 dist-git conversion 2010-07-29 11:36:32 +00:00
Panu Matilainen c698fc1a8e - plug a tiny race on sbit/capability removal 2010-06-30 10:36:54 +00:00
Panu Matilainen 855e5dc18e - update to 4.8.1
- drop no longer needed patches
- fix source url pointing to testing directory
- fixes CVE-2010-2059 / #598934
- fixes #532992, #578299, #587755, #590588, #593553, #597835, #598988
2010-06-11 11:29:33 +00:00
Panu Matilainen 644df007ba Sync with rawhide to pull in various minor fixes:
- lose dangling symlink to extinct (and useless) berkeley_db_svc (#585174)
- fix python match iterator regression wrt boolean representation (rpmlint)
- support single PPD providing driver for devices (#568351), merge psdriver
    patches
- preserve empty lines in spec prep section (#573339)
- teach python bindings about RPMTRANS_FLAG_NOCONTEXTS (related to #573111)
- dont own localized man directories through find_lang (#569536)
2010-04-23 11:19:45 +00:00
Jesse Keating 90f9e63a66 Initialize branch F-13 for rpm 2010-02-17 03:04:25 +00:00
22 changed files with 1442 additions and 931 deletions

43
.gitignore vendored
View File

@ -1,42 +1 @@
/rpm-4.9.90.git11505.tar.bz2
/rpm-4.9.90.git11519.tar.bz2
/rpm-4.9.90.git11536.tar.bz2
/rpm-4.10.0-beta1.tar.bz2
/rpm-4.10.0.tar.bz2
/rpm-4.10.1.tar.bz2
/rpm-4.10.90.git11989.tar.bz2
/rpm-4.11.0-beta1.tar.bz2
/rpm-4.11.0.1.tar.bz2
/rpm-4.11.1-rc1.tar.bz2
/rpm-4.11.1-rc2.tar.bz2
/rpm-4.11.1.tar.bz2
/rpm-4.11.2-rc1.tar.bz2
/rpm-4.11.2-rc2.tar.bz2
/rpm-4.11.2.tar.bz2
/rpm-4.11.90-git12844.tar.bz2
/rpm-4.12.0-beta1.tar.bz2
/rpm-4.12.0-rc1.tar.bz2
/rpm-4.12.0.tar.bz2
/rpm-4.12.0.1.tar.bz2
/rpm-4.12.90.tar.bz2
/rpm-4.13.0-rc1.tar.bz2
/rpm-4.13.0-rc2.tar.bz2
/rpm-4.13.0.tar.bz2
/rpm-4.13.0.1.tar.bz2
/rpm-4.13.90-git14002.tar.bz2
/rpm-4.14.0-rc1.tar.bz2
/rpm-4.14.0-rc2.tar.bz2
/rpm-4.14.0.tar.bz2
/rpm-4.14.1.tar.bz2
/rpm-4.14.2-rc1.tar.bz2
/rpm-4.14.2-rc2.tar.bz2
/rpm-4.14.2.tar.bz2
/rpm-4.14.2.1.tar.bz2
/rpm-4.14.90-git14653.tar.bz2
/rpm-4.15.0-beta.tar.bz2
/rpm-4.15.0-rc1.tar.bz2
/rpm-4.15.0.tar.bz2
/rpm-4.15.1.tar.bz2
/rpm-4.15.90-git14971.tar.bz2
/rpm-4.16.0-beta1.tar.bz2
/rpm-4.16.0-beta3.tar.bz2
rpm-4.8.1.tar.bz2

View File

@ -1,95 +0,0 @@
From 2426c2a066e44f4d9a342585e76cdbdb0a8a2db1 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 23 Oct 2019 20:22:19 +0100
Subject: [PATCH] Revert "Improve ARM detection"
This reverts commit 8c3a7b8fa92b49a811fe36b60857b12f5d7db8a8.
This is the final piece in fixing rhbz 1691430. It's a clean revert
so let's do that for F-31 and we can discuss the details later.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
lib/rpmrc.c | 37 +++++++++----------------------------
1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 0806e1b07..cada3f788 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -82,7 +82,6 @@ struct rpmOption {
static struct rpmat_s {
const char *platform;
uint64_t hwcap;
- uint64_t hwcap2;
} rpmat;
typedef struct defaultEntry_s {
@@ -951,9 +950,6 @@ static int is_geode(void)
#if defined(__linux__)
-#ifndef AT_HWCAP2 /* glibc < 2.18 */
-#define AT_HWCAP2 26
-#endif
/**
* Populate rpmat structure with auxv values
*/
@@ -967,7 +963,6 @@ static void read_auxv(void)
if (!rpmat.platform)
rpmat.platform = "";
rpmat.hwcap = getauxval(AT_HWCAP);
- rpmat.hwcap2 = getauxval(AT_HWCAP2);
#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -989,9 +984,6 @@ static void read_auxv(void)
case AT_HWCAP:
rpmat.hwcap = auxv.a_un.a_val;
break;
- case AT_HWCAP2:
- rpmat.hwcap2 = auxv.a_un.a_val;
- break;
}
}
close(fd);
@@ -1225,27 +1217,16 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
# if !defined(HWCAP_ARM_VFPv3)
# define HWCAP_ARM_VFPv3 (1 << 13)
# endif
-# if !defined(HWCAP2_AES)
-# define HWCAP2_AES (1 << 0)
-# endif
- /*
- * un.machine is armvXE, where X is version number and E is
- * endianness (b or l)
- */
- if (rstreqn(un.machine, "armv", 4)) {
- char endian = un.machine[strlen(un.machine)-1];
- char *modifier = un.machine + 5;
- /* keep armv7, armv8, armv9, armv10, ... */
- while(risdigit(*modifier))
- modifier++;
- if (rpmat.hwcap & HWCAP_ARM_VFPv3)
- *modifier++ = 'h';
- if (rpmat.hwcap2 & HWCAP2_AES)
- *modifier++ = 'c';
+ if (rstreq(un.machine, "armv7l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFPv3) {
if (rpmat.hwcap & HWCAP_ARM_NEON)
- *modifier++ = 'n';
- *modifier++ = endian;
- *modifier++ = 0;
+ strcpy(un.machine, "armv7hnl");
+ else
+ strcpy(un.machine, "armv7hl");
+ }
+ } else if (rstreq(un.machine, "armv6l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFP)
+ strcpy(un.machine, "armv6hl");
}
# endif /* arm*-linux */
--
2.23.0

View File

@ -1,30 +0,0 @@
From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 21 Jul 2018 10:13:04 +0200
Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections
debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
scripts/find-debuginfo.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 90a44942d..7b01bc036 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -357,6 +357,9 @@ do_file()
get_debugfn "$f"
[ -f "${debugfn}" ] && return
+ echo "explicitly decompress any DWARF compressed ELF sections in $f"
+ eu-elfcompress -q -p -t none "$f"
+
echo "extracting debug info from $f"
# See also cpio SOURCEFILE copy. Directories must match up.
debug_base_name="$RPM_BUILD_DIR"
--
2.18.0

View File

@ -1,34 +0,0 @@
#requires popt
#requires nss-softokn
#requires nss
#requires file
#requires libarchive
#requires libdb4
#requires redhat-rpm-config
#requires lua
#requires autoconf
#requires pkgconfig
(cd $SRC/rpm-*/ && autoreconf -vif)
mcd $BUILDDIR/rpm
$SRC/rpm-*/configure $TCONFIGARGS \
--build=${TARGET} \
--host=${TARGET} \
--target=${TARGET} \
CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss3 -DPACKAGE -DPACKAGE_VERSION" \
--libdir=/usr/lib${SUFFIX} \
--with-external-db \
--disable-static \
--with-lua \
--localstatedir=/var
make $J
make $J install
mkdir -p /etc/rpm
mkdir -p /var/lib/rpm
rpm --initdb

View File

@ -1,18 +0,0 @@
diff --git a/rpm2cpio.c b/rpm2cpio.c
index 89ebdfa..ae999ff 100644
--- a/rpm2cpio.c
+++ b/rpm2cpio.c
@@ -84,7 +84,12 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- rc = (ufdCopy(gzdi, fdo) == payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
+ /*
+ * XXX HACK for #1142949: should be equality test, but archive size
+ * short by cpio trailer size in packages built with rpm 4.12.0
+ * and its pre-releases.
+ */
+ rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
Fclose(fdo);

View File

@ -1,15 +0,0 @@
diff -up rpm-4.9.1.1/macros.in.jx rpm-4.9.1.1/macros.in
--- rpm-4.9.1.1/macros.in.jx 2011-08-03 16:19:05.000000000 -0400
+++ rpm-4.9.1.1/macros.in 2011-08-08 09:41:52.981064316 -0400
@@ -674,9 +674,10 @@ print (t)\
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
+ RPM_LD_FLAGS=\"%{?build_ldflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{NAME}\"\

View File

@ -1,12 +0,0 @@
diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in
--- rpm-4.11.1-rc1/macros.in.siteconfig 2013-06-07 13:19:21.000000000 +0300
+++ rpm-4.11.1-rc1/macros.in 2013-06-11 15:06:59.525747503 +0300
@@ -647,6 +647,8 @@ package or when debugging this package.\
export CLASSPATH}\
PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
export PKG_CONFIG_PATH\
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
+ export CONFIG_SITE\
\
%{verbose:set -x}\
umask 022\

View File

@ -0,0 +1,16 @@
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 94fb68e..525915b 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1093,6 +1093,11 @@ assert(s != NULL);
free(buf);
}
+ /* Add possible GStreamer provides */
+ if (!fc->skipProv && isDSO) {
+ xx = rpmfcHelper(fc, 'P', "gstreamer");
+ }
+
exit:
soname = _free(soname);
if (elf) (void) elf_end(elf);

View File

@ -0,0 +1,13 @@
diff --git a/macros.in b/macros.in
index 830072a..bdce7f4 100644
--- a/macros.in
+++ b/macros.in
@@ -805,6 +805,8 @@ print (t)\
export RPM_BUILD_ROOT}\
%{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
export CLASSPATH}\
+ PKG_CONFIG_PATH=\"%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
+ export PKG_CONFIG_PATH\
\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
umask 022\

61
rpm-4.6.0-niagara.patch Normal file
View File

@ -0,0 +1,61 @@
diff -rNu rpm-4.6.0-orig/lib/rpmrc.c rpm-4.6.0/lib/rpmrc.c
--- rpm-4.6.0-orig/lib/rpmrc.c 2009-03-09 21:54:49.000000000 -0500
+++ rpm-4.6.0/lib/rpmrc.c 2009-03-11 12:00:44.000000000 -0500
@@ -763,6 +763,31 @@
return rc;
}
+#if defined(__linux__) && defined(__sparc__)
+static int is_sun4v()
+{
+ char buffer[4096], *p;
+ int fd = open("/proc/cpuinfo", O_RDONLY);
+ if (read(fd, &buffer, sizeof(buffer) - 1) == -1) {
+ rpmlog(RPMLOG_WARNING, _("read(/proc/cpuinfo) failed\n"));
+ close(fd);
+ return 0;
+ }
+ close(fd);
+
+ p = strstr(buffer, "type");
+ p = strtok(p, "\n");
+ p = strstr(p, "sun");
+ if (p == NULL) {
+ rpmlog(RPMLOG_WARNING, _("/proc/cpuinfo has no 'type' line\n"));
+ return 0;
+ } else if (strcmp(p, "sun4v") == 0) {
+ return 1;
+ }
+ return 0;
+}
+#endif
+
# if defined(__linux__) && defined(__i386__)
#include <setjmp.h>
@@ -1179,6 +1204,13 @@
personality(oldpers);
}
}
+ if (is_sun4v()){
+ if (strcmp(un.machine, "sparcv9") == 0 || strcmp(un.machine, "sparc") == 0 ) {
+ strcpy(un.machine, "sparcv9v");
+ } else if (strcmp(un.machine, "sparc64") == 0 ) {
+ strcpy(un.machine, "sparc64v");
+ }
+ }
# endif /* sparc*-linux */
# if defined(__GNUC__) && defined(__alpha__)
diff -rNu rpm-4.6.0-orig/rpmrc.in rpm-4.6.0/rpmrc.in
--- rpm-4.6.0-orig/rpmrc.in 2009-03-09 21:54:49.000000000 -0500
+++ rpm-4.6.0/rpmrc.in 2009-03-11 11:50:49.000000000 -0500
@@ -312,7 +312,7 @@
arch_compat: sun4d: sparc
arch_compat: sun4m: sparc
arch_compat: sun4u: sparc64
-arch_compat: sparc64v: sparc64
+arch_compat: sparc64v: sparc64 sparcv9v
arch_compat: sparc64: sparcv9
arch_compat: sparcv9v: sparcv9
arch_compat: sparcv9: sparcv8

View File

@ -0,0 +1,157 @@
diff -up rpm-4.7.90.git9278/build/rpmfc.c.devel-autodep rpm-4.7.90.git9278/build/rpmfc.c
--- rpm-4.7.90.git9278/build/rpmfc.c.devel-autodep 2009-09-01 10:45:07.000000000 +0300
+++ rpm-4.7.90.git9278/build/rpmfc.c 2009-09-01 11:00:15.000000000 +0300
@@ -501,7 +501,7 @@ static const struct rpmfcTokens_s const
{ "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
{ " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
- { "symbolic link to", RPMFC_SYMLINK },
+ { "symbolic link to", RPMFC_SYMLINK|RPMFC_INCLUDE },
{ "socket", RPMFC_DEVICE },
{ "special", RPMFC_DEVICE },
{ " text", RPMFC_TEXT|RPMFC_INCLUDE },
@@ -663,6 +663,105 @@ rpmds rpmfcRequires(rpmfc fc)
/**
+ * Ensure that symlinks for shared libs generate a dep on the shared lib
+ * @param fc file classifier
+ * @return 0 on success
+ */
+static int rpmfcSYMLINK(rpmfc fc)
+{
+ const char * fn = fc->fn[fc->ix];
+ struct stat sb;
+ int fdno;
+
+ if (fc->skipReq)
+ return 0;
+
+ if (stat(fn, &sb) < 0)
+ return -1;
+ if (S_ISLNK(sb.st_mode))
+ return -1;
+
+ fdno = open(fn, O_RDONLY);
+ if (fdno < 0) {
+ return fdno;
+ }
+
+#if HAVE_GELF_H && HAVE_LIBELF
+ Elf * elf = NULL;
+ GElf_Ehdr ehdr_mem, * ehdr;
+ int isElf64 = 0;
+ int i, cnt;
+ char * soname = NULL;
+ rpmds ds;
+
+ (void) elf_version(EV_CURRENT);
+ elf = NULL;
+ if ((elf = elf_begin (fdno, ELF_C_READ_MMAP, NULL)) == NULL
+ || elf_kind(elf) != ELF_K_ELF
+ || (ehdr = gelf_getehdr(elf, &ehdr_mem)) == NULL
+ || ehdr->e_type != ET_DYN)
+ goto exit;
+
+/* alpha uses /lib, not /lib64 so don't add (64bit) deps */
+#if !defined(__alpha__)
+ isElf64 = ehdr->e_ident[EI_CLASS] == ELFCLASS64;
+#endif
+
+ for (i = 0; i < ehdr->e_phnum; ++i) {
+ GElf_Phdr phdr_mem;
+ GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem);
+ GElf_Shdr shdr_mem;
+ Elf_Data * data = NULL;
+ Elf_Scn * scn;
+ GElf_Shdr *shdr;
+
+ if (phdr == NULL || phdr->p_type != PT_DYNAMIC)
+ continue;
+
+ scn = gelf_offscn(elf, phdr->p_offset);
+ shdr = gelf_getshdr(scn, &shdr_mem);
+
+ if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC)
+ data = elf_getdata (scn, NULL);
+ if (data == NULL)
+ continue;
+
+ for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) {
+ GElf_Dyn dynmem;
+ GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
+ char *depname = NULL;
+
+ if (dyn == NULL)
+ break;
+ if (dyn->d_tag != DT_SONAME)
+ continue;
+
+ /* add the soname to package deps */
+ soname = elf_strptr(elf, shdr->sh_link, dyn->d_un.d_val);
+ if (soname == NULL)
+ break;
+
+ rasprintf(&depname, "%s%s", soname, isElf64 ? "()(64bit)" : "");
+ /* Add to package dependencies. */
+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, depname, "",
+ RPMSENSE_FIND_REQUIRES);
+ free(depname);
+
+ rpmdsMerge(&fc->requires, ds);
+ rpmfcAddFileDep(&fc->ddict, fc->ix, ds);
+ ds = rpmdsFree(ds);
+ break;
+ }
+ }
+exit:
+ if (elf) (void) elf_end(elf);
+ close(fdno);
+ return 0;
+#endif
+ return -1;
+}
+
+/**
* Extract script dependencies.
* @param fc file classifier
* @return 0 on success
@@ -1118,6 +1217,7 @@ static const struct rpmfcApplyTbl_s cons
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|RPMFC_OCAML|
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
{ rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
+ { rpmfcSYMLINK, RPMFC_SYMLINK },
{ NULL, 0 }
};
@@ -1138,6 +1238,7 @@ rpmRC rpmfcApply(rpmfc fc)
int ix;
int i;
int xx;
+ int skipping = 0;
/* Generate package and per-file dependencies. */
for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
@@ -1192,11 +1293,13 @@ rpmRC rpmfcApply(rpmfc fc)
default:
break;
case 'P':
+ skipping = fc->skipProv;
ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags);
dix = rpmdsFind(fc->provides, ds);
ds = rpmdsFree(ds);
break;
case 'R':
+ skipping = fc->skipReq;
ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags);
dix = rpmdsFind(fc->requires, ds);
ds = rpmdsFree(ds);
@@ -1218,7 +1321,7 @@ assert(dix >= 0);
previx = ix;
xx = argiAdd(&fc->fddictx, ix, argiCount(fc->ddictx)-1);
}
- if (fc->fddictn && fc->fddictn->vals)
+ if (fc->fddictn && fc->fddictn->vals && !skipping)
fc->fddictn->vals[ix]++;
}

View File

@ -0,0 +1,92 @@
diff -up rpm-4.7.90.git9301/lib/tagexts.c.fedora-specspo rpm-4.7.90.git9301/lib/tagexts.c
--- rpm-4.7.90.git9301/lib/tagexts.c.fedora-specspo 2009-09-02 13:59:38.000000000 +0300
+++ rpm-4.7.90.git9301/lib/tagexts.c 2009-09-02 14:51:10.000000000 +0300
@@ -460,12 +460,6 @@ static int filerequireTag(Header h, rpmt
}
/* I18N look aside diversions */
-
-#if defined(ENABLE_NLS)
-extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */
-#endif
-static const char * const language = "LANGUAGE";
-
static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
/**
@@ -477,61 +471,27 @@ static const char * const _macro_i18ndom
*/
static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags)
{
- char * dstring = rpmExpand(_macro_i18ndomains, NULL);
- int rc;
-
- td->type = RPM_STRING_TYPE;
- td->data = NULL;
- td->count = 0;
-
- if (dstring && *dstring) {
- char *domain, *de;
- const char * langval;
- char * msgkey;
- const char * msgid;
-
- rasprintf(&msgkey, "%s(%s)", headerGetString(h, RPMTAG_NAME),
- rpmTagGetName(tag));
-
- /* change to en_US for msgkey -> msgid resolution */
- langval = getenv(language);
- (void) setenv(language, "en_US", 1);
-#if defined(ENABLE_NLS)
- ++_nl_msg_cat_cntr;
-#endif
+ int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+ if (rc) {
+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
+ const char *domain;
- msgid = NULL;
for (domain = dstring; domain != NULL; domain = de) {
+ const char *msgid = td->data;
+ const char *msg = NULL;
+
de = strchr(domain, ':');
if (de) *de++ = '\0';
- msgid = dgettext(domain, msgkey);
- if (msgid != msgkey) break;
- }
-
- /* restore previous environment for msgid -> msgstr resolution */
- if (langval)
- (void) setenv(language, langval, 1);
- else
- unsetenv(language);
-#if defined(ENABLE_NLS)
- ++_nl_msg_cat_cntr;
-#endif
-
- if (domain && msgid) {
- td->data = dgettext(domain, msgid);
- td->data = xstrdup(td->data); /* XXX xstrdup has side effects. */
- td->count = 1;
- td->flags = RPMTD_ALLOCED;
+ msg = dgettext(domain, td->data);
+ if (msg != msgid) {
+ free(td->data);
+ td->data = xstrdup(msg);
+ break;
+ }
}
- dstring = _free(dstring);
- free(msgkey);
- if (td->data)
- return 1;
+ free(dstring);
}
- dstring = _free(dstring);
-
- rc = headerGet(h, tag, td, HEADERGET_ALLOC);
return rc;
}

View File

@ -0,0 +1,13 @@
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh
index bb25b31..e4a22db 100755
--- a/scripts/find-lang.sh
+++ b/scripts/find-lang.sh
@@ -173,7 +173,7 @@ 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

View File

@ -0,0 +1,393 @@
diff -up rpm-4.8.0/build/rpmfc.c.psdriver rpm-4.8.0/build/rpmfc.c
--- rpm-4.8.0/build/rpmfc.c.psdriver 2010-03-16 10:54:04.000000000 +0200
+++ rpm-4.8.0/build/rpmfc.c 2010-03-16 10:54:04.000000000 +0200
@@ -489,6 +489,7 @@ static const struct rpmfcTokens_s const
{ " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
+ { "PPD file", RPMFC_PSDRIVER|RPMFC_INCLUDE },
{ " commands", RPMFC_SCRIPT|RPMFC_INCLUDE },
{ " script", RPMFC_SCRIPT|RPMFC_INCLUDE },
@@ -1185,6 +1186,11 @@ exit:
#endif
}
+static int rpmfcPSDRIVER(rpmfc fc)
+{
+ return rpmfcHelper(fc, 'P', "psdriver");
+}
+
static int rpmfcMISC(rpmfc fc)
{
struct stat st;
@@ -1224,6 +1230,7 @@ static const struct rpmfcApplyTbl_s cons
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
{ rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
{ rpmfcSYMLINK, RPMFC_SYMLINK },
+ { rpmfcPSDRIVER, RPMFC_PSDRIVER },
{ NULL, 0 }
};
@@ -1260,6 +1267,10 @@ rpmRC rpmfcApply(rpmfc fc)
fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
}
}
+ /* XXX HACK: get cups driver executables also recognized as psdrivers */
+ if (strstr(fc->fn[fc->ix], "/usr/lib/cups/driver/")) {
+ fc->fcolor->vals[fc->ix] |= RPMFC_PSDRIVER;
+ }
if (fc->fcolor->vals[fc->ix])
for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) {
@@ -1401,6 +1412,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg
else if (rpmFileHasSuffix(s, ".pc"))
ftype = "pkgconfig file";
+ /* XXX Make cups .drv's to appear as PPD's for now */
+ else if (rpmFileHasSuffix(s, ".drv") &&
+ strstr(s, "/usr/share/cups/drv"))
+ ftype = "PPD file";
+
/* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
else if (slen >= fc->brlen+sizeof("/dev/") && rstreqn(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
ftype = "";
diff -up rpm-4.8.0/build/rpmfc.h.psdriver rpm-4.8.0/build/rpmfc.h
--- rpm-4.8.0/build/rpmfc.h.psdriver 2009-12-09 15:37:25.000000000 +0200
+++ rpm-4.8.0/build/rpmfc.h 2010-03-16 10:54:04.000000000 +0200
@@ -31,7 +31,8 @@ enum FCOLOR_e {
#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
/* (1 << 3) leaks into package headers, reserved */
- /* bits 4-6 unused */
+ /* bits 4-5 unused */
+ RPMFC_PSDRIVER = (1 << 6),
RPMFC_OCAML = (1 << 7),
RPMFC_PKGCONFIG = (1 << 8),
RPMFC_LIBTOOL = (1 << 9),
@@ -53,6 +54,7 @@ enum FCOLOR_e {
RPMFC_MANPAGE = (7 << 16),
RPMFC_TEXT = (8 << 16),
RPMFC_DOCUMENT = (9 << 16),
+ RPMFC_PPD = (10 << 16),
RPMFC_ARCHIVE = (1 << 20),
RPMFC_COMPRESSED = (1 << 21),
diff -up rpm-4.8.0/macros.in.psdriver rpm-4.8.0/macros.in
--- rpm-4.8.0/macros.in.psdriver 2010-03-16 10:54:04.000000000 +0200
+++ rpm-4.8.0/macros.in 2010-03-16 10:54:04.000000000 +0200
@@ -504,6 +504,7 @@ print (t)\
%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
+%__psdriver_provides %{_rpmconfigdir}/postscriptdriver.prov %{buildroot}
#==============================================================================
# ---- Database configuration macros.
diff -up rpm-4.8.0/scripts/Makefile.am.psdriver rpm-4.8.0/scripts/Makefile.am
--- rpm-4.8.0/scripts/Makefile.am.psdriver 2009-12-07 16:36:49.000000000 +0200
+++ rpm-4.8.0/scripts/Makefile.am 2010-03-16 10:54:04.000000000 +0200
@@ -20,7 +20,8 @@ EXTRA_DIST = \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
pkgconfigdeps.sh libtooldeps.sh \
- fontconfig.prov desktop-file.prov
+ fontconfig.prov desktop-file.prov \
+ postscriptdriver.prov
rpmconfig_SCRIPTS = \
brp-compress brp-python-bytecompile brp-java-gcjcompile \
@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
fontconfig.prov desktop-file.prov \
+ postscriptdriver.prov \
rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg
rpmconfig_DATA = \
diff -up rpm-4.8.0/scripts/Makefile.in.psdriver rpm-4.8.0/scripts/Makefile.in
--- rpm-4.8.0/scripts/Makefile.in.psdriver 2010-01-08 10:35:16.000000000 +0200
+++ rpm-4.8.0/scripts/Makefile.in 2010-03-16 10:54:04.000000000 +0200
@@ -317,7 +317,8 @@ EXTRA_DIST = brp-compress brp-python-byt
find-php-provides find-php-requires mono-find-requires \
mono-find-provides ocaml-find-requires.sh \
ocaml-find-provides.sh pkgconfigdeps.sh libtooldeps.sh \
- fontconfig.prov desktop-file.prov macros.perl.in macros.php.in \
+ fontconfig.prov desktop-file.prov postscriptdriver.prov \
+ macros.perl.in macros.php.in \
macros.python.in
rpmconfig_SCRIPTS = \
brp-compress brp-python-bytecompile brp-java-gcjcompile \
@@ -331,6 +332,7 @@ rpmconfig_SCRIPTS = \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
fontconfig.prov desktop-file.prov \
+ postscriptdriver.prov \
rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg
rpmconfig_DATA = rpmdiff.cgi rpm.daily rpm.log rpm.xinetd macros.perl \
diff -up rpm-4.8.0/scripts/postscriptdriver.prov.psdriver rpm-4.8.0/scripts/postscriptdriver.prov
--- rpm-4.8.0/scripts/postscriptdriver.prov.psdriver 2010-03-16 10:54:04.000000000 +0200
+++ rpm-4.8.0/scripts/postscriptdriver.prov 2010-03-16 10:54:04.000000000 +0200
@@ -0,0 +1,261 @@
+#!/bin/bash
+shopt -s execfail
+exec -a "$0" python -- <(tail -n +4 -- "$0") "$@" || exit 0 # -*- python -*-
+
+## Copyright (C) 2009, 2010 Red Hat, Inc.
+## Author: Tim Waugh <twaugh@redhat.com>
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+import sys
+
+try:
+ import cups
+ CAN_EXAMINE_PPDS = True
+except:
+ CAN_EXAMINE_PPDS = False
+
+from getopt import getopt
+import errno
+import os
+import posix
+import re
+import shlex
+import signal
+import subprocess
+import sys
+import tempfile
+
+if len (sys.argv) > 1:
+ RPM_BUILD_ROOT = sys.argv[1]
+else:
+ RPM_BUILD_ROOT = None
+
+class TimedOut(Exception):
+ def __init__ (self):
+ Exception.__init__ (self, "Timed out")
+
+class DeviceIDs:
+ def __init__ (self):
+ self.ids = dict()
+
+ def get_dict (self):
+ return self.ids
+
+ def get_tags (self):
+ ret = []
+ for mfg, mdlset in self.ids.iteritems ():
+ mfgl = mfg.lower ().replace (" ", "_")
+ for mdl in mdlset:
+ mdll = mdl.lower ().replace (" ", "_")
+ ret.append ("postscriptdriver(%s;%s;)" % (mfgl,
+ mdll))
+
+ return ret
+
+ def __add__ (self, other):
+ if isinstance(other, DeviceIDs):
+ for omfg, omdlset in other.ids.iteritems ():
+ try:
+ mdlset = self.ids[omfg]
+ except KeyError:
+ mdlset = set()
+ self.ids[omfg] = mdlset
+
+ mdlset.update (omdlset)
+
+ return self
+
+ pieces = other.split (';')
+ mfg = mdl = None
+ for piece in pieces:
+ s = piece.split (":")
+ if len (s) != 2:
+ continue
+ key, value = s
+ key = key.upper ()
+ if key in ["MFG", "MANUFACTURER"]:
+ mfg = value
+ elif key in ["MDL", "MODEL"]:
+ mdl = value
+
+ if mfg and mdl:
+ try:
+ mdlset = self.ids[mfg]
+ except KeyError:
+ mdlset = set()
+ self.ids[mfg] = mdlset
+
+ mdlset.add (mdl)
+
+ return self
+
+class Driver:
+ def __init__ (self):
+ self.ids = DeviceIDs()
+
+ def list (self):
+ return self.ids
+
+class PPDDriver(Driver):
+ def __init__ (self, pathname=None):
+ Driver.__init__ (self)
+ self.pathname = pathname
+
+ def list (self):
+ if self.pathname != None:
+ self.examine_file (self.pathname)
+
+ return Driver.list (self)
+
+ def examine_file (self, path):
+ try:
+ ppd = cups.PPD (path)
+ except RuntimeError, e:
+ # Not a PPD file. Perhaps it's a drv file.
+ drv = DrvDriver (path)
+ self.ids += drv.list ()
+ return
+
+ attr = ppd.findAttr ('1284DeviceID')
+ while attr:
+ self.ids += attr.value
+ attr = ppd.findNextAttr ('1284DeviceID')
+
+class DynamicDriver(Driver):
+ def __init__ (self, driver):
+ Driver.__init__ (self)
+ self.driver = driver
+ signal.signal (signal.SIGALRM, self._alarm)
+
+ def _alarm (self, sig, stack):
+ raise TimedOut
+
+ def list (self):
+ signal.alarm (60)
+ env = os.environ.copy ()
+ if RPM_BUILD_ROOT:
+ buildroot = RPM_BUILD_ROOT
+ if not buildroot.endswith (os.path.sep):
+ buildroot += os.path.sep
+
+ env["DESTDIR"] = RPM_BUILD_ROOT
+ env["LD_LIBRARY_PATH"] = "%susr/lib64:%susr/lib" % (buildroot,
+ buildroot)
+
+ p = subprocess.Popen ([self.driver, "list"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ env=env)
+ try:
+ (stdout, stderr) = p.communicate ()
+ signal.alarm (0)
+ except TimedOut:
+ posix.kill (p.pid, signal.SIGKILL)
+ raise
+
+ if stderr:
+ print >> sys.stderr, stderr
+
+ ppds = []
+ lines = stdout.split ('\n')
+ for line in lines:
+ l = shlex.split (line)
+ if len (l) < 5:
+ continue
+ self.ids += l[4]
+
+ return Driver.list (self)
+
+class DrvDriver(PPDDriver):
+ def __init__ (self, pathname):
+ PPDDriver.__init__ (self)
+ self.drv = pathname
+
+ def _alarm (self, sig, stack):
+ raise TimedOut
+
+ def list (self):
+ tmpdir = os.environ.get ("TMPDIR", "/tmp") + os.path.sep
+ outputdir = tempfile.mkdtemp (dir=tmpdir)
+
+ argv = [ "ppdc",
+ "-d", outputdir,
+ "-I", "/usr/share/cups/ppdc",
+ self.drv ]
+
+ signal.alarm (60)
+ try:
+ p = subprocess.Popen (argv,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ except OSError:
+ # ppdc not available.
+ os.rmdir (outputdir)
+ return Driver.list (self)
+
+ try:
+ (stdout, stderr) = p.communicate ()
+ signal.alarm (0)
+ except TimedOut:
+ posix.kill (p.pid, signal.SIGKILL)
+ raise
+
+ os.path.walk (outputdir, self.examine_directory, None)
+ os.rmdir (outputdir)
+ return Driver.list (self)
+
+ def examine_directory (self, unused, dirname, fnames):
+ for fname in fnames:
+ path = dirname + os.path.sep + fname
+ self.examine_file (path)
+ os.unlink (path)
+
+class TagBuilder:
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ self.ids = DeviceIDs ()
+
+ for path in paths:
+ if path.find ("/usr/lib/cups/driver/") != -1:
+ try:
+ self.ids += DynamicDriver (path).list ()
+ except TimedOut:
+ pass
+ except OSError, (e, s):
+ if e == errno.EACCES or e == errno.ENOENT:
+ # Not executable
+ pass
+ else:
+ raise
+
+ if CAN_EXAMINE_PPDS:
+ for path in paths:
+ try:
+ self.ids += PPDDriver (path).list ()
+ except TimedOut:
+ pass
+
+ def get_tags (self):
+ return self.ids.get_tags ()
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
+ tags = builder.get_tags ()
+ for tag in tags:
+ print tag

View File

@ -0,0 +1,74 @@
commit 7617dfec85012a75bf15dec963f2f9a65e8550d9
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Wed Feb 3 12:26:23 2010 +0200
brp-python-bytecompile fixes + improvements (RhBug:558997)
- fix incorrect paths (eg /site-packages/filename.py instead of
/usr/lib/pythonX.Y/site-packages/filename.py) ending up in bytecode
- add a "strict" mode where byte-compilation errors will abort the build
- when in non-strict mode, byte-compile everything we can instead of
bailing out at first error
- patch originally from Toshio Kuratomi, slightly changed to preserve
the original order of arguments to avoid unnecessary incompatibilities
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
index 9fac5a7..79996ea 100644
--- a/scripts/brp-python-bytecompile
+++ b/scripts/brp-python-bytecompile
@@ -1,4 +1,5 @@
#!/bin/bash
+errors_terminate=$2
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
@@ -33,16 +34,25 @@ fi
# and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1
shopt -s nullglob
-for python_libdir in $RPM_BUILD_ROOT/usr/lib*/python*/ ;
+for python_libdir in $RPM_BUILD_ROOT/usr/lib{,64}/python[0-9].[0-9]/ ;
do
python_binary=/usr/bin/$(basename $python_libdir)
+ real_libdir=${python_libdir/$RPM_BUILD_ROOT/}
echo "Bytecompiling .py files below $python_libdir using $python_binary"
# Generate normal (.pyc) byte-compiled files.
- $python_binary -c 'import compileall; compileall.compile_dir("'"$python_libdir"'", '"$depth"', "/", force=1, quiet=1)'
+ $python_binary -c 'import compileall, sys; sys.exit(not compileall.compile_dir("'"$python_libdir"'", '"$depth"', "'"$real_libdir"'", force=1, quiet=1))'
+ if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
+ # One or more of the files had a syntax error
+ exit 1
+ fi
# Generate optimized (.pyo) byte-compiled files.
- $python_binary -O -c 'import compileall; compileall.compile_dir("'"$python_libdir"'", '"$depth"', "/", force=1, quiet=1)'
+ $python_binary -O -c 'import compileall, sys; sys.exit(not compileall.compile_dir("'"$python_libdir"'", '"$depth"', "'"$real_libdir"'", force=1, quiet=1))'
+ if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
+ # One or more of the files had a syntax error
+ exit 1
+ fi
done
@@ -50,12 +60,16 @@ done
# implementation:
# Generate normal (.pyc) byte-compiled files.
-$default_python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib.*/python.+/"'"), quiet=1))'
-if [ $? != 0 ]; then
+$default_python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]"'"), quiet=1))'
+if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
# One or more of the files had a syntax error
- # XXX TODO: parametrize the exit code, only warn for now
- exit 0
+ exit 1
fi
# Generate optimized (.pyo) byte-compiled files.
-$default_python -O -c 'import compileall, re; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib.*/python.+/"'"))' > /dev/null
+$default_python -O -c 'import compileall, re, sys; sys.exit(not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]"'"), quiet=1))' > /dev/null
+if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
+ # One or more of the files had a syntax error
+ exit 1
+fi
+exit 0

View File

@ -0,0 +1,37 @@
diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh
index 7ccd076..7bf6fec 100755
--- a/scripts/pythondeps.sh
+++ b/scripts/pythondeps.sh
@@ -5,17 +5,27 @@
exit 0
}
-PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"`
case $1 in
-P|--provides)
shift
- grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}"
- exit 0
+ # Match buildroot/payload paths of the form
+ # /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
+ # generating a line of the form
+ # python(abi) = MAJOR.MINOR
+ # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
+ grep "/usr/bin/python.\..$" \
+ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
;;
-R|--requires)
shift
- grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}"
- exit 0
+ # Match buildroot paths of the form
+ # /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and
+ # /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
+ # generating (uniqely) lines of the form:
+ # python(abi) = MAJOR.MINOR
+ grep "/usr/lib[^/]*/python.\../.*" \
+ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
+ | sort | uniq
;;
esac

12
rpm-4.8.1-fixarm.patch Normal file
View File

@ -0,0 +1,12 @@
diff -ru rpm-4.8.1-orig/installplatform rpm-4.8.1/installplatform
--- rpm-4.8.1-orig/installplatform 2009-12-07 09:36:49.000000000 -0500
+++ rpm-4.8.1/installplatform 2011-01-19 02:58:44.000000000 -0500
@@ -19,7 +19,7 @@
case "$arch" in
i[3456]86|pentium[34]|athlon|geode) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_ s_i386_geode_' ;;
alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
- arm*) SUBSTS='s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_ s_arm_armv7l_' ;;
+ arm*) SUBSTS='s_arm_arm_ s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_ s_arm_armv7l_' ;;
sh4*) SUBSTS='s_sh4_sh4_ s_sh4_sh4a_' ;;
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_' ;;

View File

@ -0,0 +1,25 @@
commit 26874707edfe73e153383284f9fe33cfd9879bb1
Author: Michal Schmidt <mschmidt@redhat.com>
Date: Tue Jun 22 15:51:41 2010 +0200
Revert "If there are no hardlinks, dont bother with s-bit and caps removal"
Deciding whether it is necessary to remove the SUID bit based on
the current link count creates an opportunity for a race condition.
A hardlink could be created just between lstat() and chmod().
This reverts commit 89be57ad9239c9ada0cba94a5003876b456d46bf.
diff --git a/lib/fsm.c b/lib/fsm.c
index 2d972f3..068c65d 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -1264,7 +1264,7 @@ static int fsmMkdirs(FSM_t fsm)
static void removeSBITS(const char *path)
{
struct stat stb;
- if (lstat(path, &stb) == 0 && S_ISREG(stb.st_mode) && stb.st_nlink > 1) {
+ if (lstat(path, &stb) == 0 && S_ISREG(stb.st_mode)) {
if ((stb.st_mode & 06000) != 0) {
(void) chmod(path, stb.st_mode & 0777);
}

View File

@ -1,12 +0,0 @@
diff -up rpm-4.9.90.git11486/scripts/find-lang.sh.no-man-dirs rpm-4.9.90.git11486/scripts/find-lang.sh
--- rpm-4.9.90.git11486/scripts/find-lang.sh.no-man-dirs 2012-03-07 11:31:10.000000000 +0200
+++ rpm-4.9.90.git11486/scripts/find-lang.sh 2012-03-07 15:11:57.465801075 +0200
@@ -181,7 +181,7 @@ 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

1200
rpm.spec

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
[Unit]
Description=RPM database rebuild
ConditionPathExists=/var/lib/rpm/.rebuilddb
# This should run before any daemons that may open the rpmdb
DefaultDependencies=no
After=sysinit.target
Before=basic.target shutdown.target
Conflicts=shutdown.target
# In case /var is remote-mounted
RequiresMountsFor=/var
[Service]
Type=oneshot
ExecStart=/usr/bin/rpmdb --rebuilddb
ExecStartPost=rm -f /var/lib/rpm/.rebuilddb
[Install]
WantedBy=basic.target

View File

@ -1 +1 @@
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032
85b9cabd384ffe47b7c3ffb396133fb1 rpm-4.8.1.tar.bz2