Compare commits

...

8 Commits
master ... f19

Author SHA1 Message Date
Panu Matilainen 8fda439c33 Oops, old armhfp patch no longer applies cleanly 2014-09-16 09:28:38 +03:00
Panu Matilainen 71c3800d64 - update to 4.11.3 2014-09-16 09:28:32 +03:00
Panu Matilainen e089ed3274 - reduce the double separator spec parse error into a warning (#1065563) 2014-02-18 09:10:54 +02:00
Panu Matilainen cfbeab79dc - update to 4.11.2
- drop/adjust patches as appropriate
2014-02-13 11:06:18 +02:00
Panu Matilainen 597e221b9f - add missing dependency on tar to rpm-build (#986539) 2013-09-09 16:03:26 +03:00
Panu Matilainen b0562d75d2 - fix build-time double-free on file capability processing (#956190)
- fix relocation related regression on file sanity check (#1001553)
- fix segfault on empty -p <lua> scriptlet body (#1004062)
- fix source url, once again
2013-09-09 15:24:59 +03:00
Panu Matilainen bc0b9ea216 - update to 4.11.1 (http://rpm.org/wiki/Releases/4.11.1)
- drop upstreamed (and unused leftoever) patches
- fix .gnu_debuglink CRC32 after dwz, buildrequire binutils-devel (#971119)
- ensure relocatable packages always get install-prefix(es) set (#979443)
2013-07-05 11:21:42 +03:00
Panu Matilainen 6ba00b9a5e - check for stale locks when opening write-cursors (#860500, #962750...)
- serialize BDB environment open/close (#924417)
2013-05-28 10:07:58 +03:00
10 changed files with 487 additions and 221 deletions

3
.gitignore vendored
View File

@ -7,3 +7,6 @@
/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.tar.bz2
/rpm-4.11.2.tar.bz2
/rpm-4.11.3.tar.bz2

View File

@ -1,50 +0,0 @@
commit a712252392eca75443ca45c10a72873cabec7963
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Mon Jan 28 12:50:39 2013 +0200
Be more careful about skipping shared file/directory creation
- Only skip shared file/dir creation if its actually being created
by another package. Previously we could've decided to skip an entry
where the other file was also being skipped for some other reason.
- Ensure %ghost entries always have FA_SKIP on install, previously
they often were FA_CREATE which makes no sense for %ghost. We dont
encounter %ghosts at all during install in the FSM as they dont
exist in the payload, but the file disposition calculations need
to take them into account now that we're avoiding redundant creates.
- Fixes a regression from commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e
which unearthed the %ghost FA_CREATE issue, reported here:
http://lists.fedoraproject.org/pipermail/buildsys/2013-January/004047.html
diff --git a/lib/transaction.c b/lib/transaction.c
index 6e9e025..397f23d 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -572,7 +572,8 @@ assert(otherFi != NULL);
}
} else {
/* Skip create on all but the first instance of a shared file */
- if (rpmfsGetAction(otherFs, otherFileNum) != FA_UNKNOWN)
+ rpmFileAction oaction = rpmfsGetAction(otherFs, otherFileNum);
+ if (oaction != FA_UNKNOWN && !XFA_SKIPPING(oaction))
rpmfsSetAction(fs, i, FA_SKIP);
}
@@ -760,6 +761,17 @@ static void skipInstallFiles(const rpmts ts, rpmte p)
ix = rpmfiDX(fi);
drc[ix]++;
+ /*
+ * Always skip %ghosts on install.
+ * XXX: Should we skip directory creation if there are only
+ * %ghosts in it? Traditionally we create the (empty) directory, so
+ * preserving that behavior for now at least: leave the refcount alone.
+ */
+ if (rpmfiFFlags(fi) & RPMFILE_GHOST) {
+ rpmfsSetAction(fs, i, FA_SKIP);
+ continue;
+ }
+
/* Don't bother with skipped files */
if (XFA_SKIPPING(rpmfsGetAction(fs, i))) {
drc[ix]--; dff[ix] = 1;

View File

@ -0,0 +1,394 @@
--- rpm-4.11.1-rc1-orig/Makefile.am 2013-06-07 12:19:21.000000000 +0200
+++ rpm-4.11.1-rc1/Makefile.am 2013-06-24 18:34:06.342894002 +0200
@@ -162,6 +162,10 @@ rpmlibexec_PROGRAMS += elfdeps
elfdeps_SOURCES = tools/elfdeps.c
elfdeps_LDADD = rpmio/librpmio.la
elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
+
+rpmlibexec_PROGRAMS += sepdebugcrcfix
+sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
+sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@
endif
endif
--- rpm-4.11.1-rc1-orig/scripts/find-debuginfo.sh 2013-06-24 17:20:55.407538301 +0200
+++ rpm-4.11.1-rc1/scripts/find-debuginfo.sh 2013-06-24 18:34:41.270897302 +0200
@@ -114,10 +114,12 @@ done
LISTFILE="$BUILDDIR/$out"
SOURCEFILE="$BUILDDIR/debugsources.list"
LINKSFILE="$BUILDDIR/debuglinks.list"
+ELFBINSFILE="$BUILDDIR/elfbins.list"
> "$SOURCEFILE"
> "$LISTFILE"
> "$LINKSFILE"
+> "$ELFBINSFILE"
debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
@@ -316,6 +318,7 @@ while read nlinks inum f; do
$include_minidebug && add_minidebug "${debugfn}" "$f"
+ echo "./${f#$RPM_BUILD_ROOT}" >> "$ELFBINSFILE"
if [ -n "$id" ]; then
make_id_link "$id" "$dn/$(basename $f)"
@@ -354,6 +357,10 @@ if $run_dwz && type dwz >/dev/null 2>&1
fi
fi
+# dwz invalidates .gnu_debuglink CRC32 in the main files.
+cat "$ELFBINSFILE" |
+(cd "$RPM_BUILD_ROOT"; xargs -d '\n' /usr/lib/rpm/sepdebugcrcfix usr/lib/debug)
+
# For each symlink whose target has a .debug file,
# make a .debug symlink to that file.
find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
--- rpm-4.11.1-rc1-orig/tools/sepdebugcrcfix.c 1970-01-01 01:00:00.000000000 +0100
+++ rpm-4.11.1-rc1/tools/sepdebugcrcfix.c 2013-06-24 18:31:54.927881439 +0200
@@ -0,0 +1,344 @@
+/* Copyright (C) 2013 Free Software Foundation, Inc.
+
+ 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 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* Version 2013-06-24. */
+
+#define _GNU_SOURCE
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <endian.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <error.h>
+#include <libelf.h>
+#include <gelf.h>
+#include <bfd.h>
+
+#define _(x) x
+#define static_assert(expr) \
+ extern int never_defined_just_used_for_checking[(expr) ? 1 : -1]
+#ifndef min
+# define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+static_assert (sizeof (unsigned long) >= sizeof (uint32_t));
+
+typedef int bool;
+static const bool false = 0, true = 1;
+
+/* This is bfd_calc_gnu_debuglink_crc32 from bfd/opncls.c. */
+static unsigned long
+ calc_gnu_debuglink_crc32 (unsigned long crc,
+ const unsigned char *buf,
+ bfd_size_type len)
+{
+ static const unsigned long crc32_table[256] =
+ {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ };
+ const unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++ buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc & 0xffffffff;
+}
+
+static size_t updated_count, matched_count, failed_count;
+
+static const char *usr_lib_debug;
+
+static bool
+crc32 (const char *fname, const char *base_fname, uint32_t *crcp)
+{
+ char *reldir = strdup (base_fname);
+ if (reldir == NULL)
+ error (1, 0, _("out of memory"));
+ char *s = reldir + strlen (reldir);
+ while (s > reldir && s[-1] != '/')
+ *--s = '\0';
+ char *debugname;
+ if (asprintf (&debugname, "%s/%s/%s", usr_lib_debug, reldir, fname) <= 0)
+ error (1, 0, _("out of memory"));
+ free (reldir);
+ int fd = open (debugname, O_RDONLY);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open \"%s\""), debugname);
+ return false;
+ }
+ off64_t size = lseek64 (fd, 0, SEEK_END);
+ if (size == -1)
+ {
+ error (0, errno, _("cannot get size of \"%s\""), debugname);
+ return false;
+ }
+ off_t offset = 0;
+ uint32_t crc = 0;
+ void *buf = NULL;
+ while (offset < size)
+ {
+ const size_t maplen = min (0x10000, size - offset);
+ void *map = NULL;
+ if (buf == NULL)
+ {
+ map = mmap (NULL, maplen, PROT_READ, MAP_PRIVATE | MAP_POPULATE,
+ fd, offset);
+ if (map == MAP_FAILED)
+ {
+ error (0, errno, _("cannot map 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ map = NULL;
+ }
+ }
+ if (map == NULL)
+ {
+ if (buf == NULL)
+ {
+ buf = malloc (maplen);
+ if (buf == NULL)
+ error (1, 0, _("out of memory"));
+ }
+ ssize_t got = pread (fd, buf, maplen, offset);
+ if (got != maplen)
+ {
+ error (0, errno, _("cannot read 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ free (buf);
+ free (debugname);
+ return false;
+ }
+ }
+ crc = calc_gnu_debuglink_crc32 (crc, map ?: buf, maplen);
+ if (map && munmap (map, maplen) != 0)
+ error (1, errno, _("cannot unmap 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ offset += maplen;
+ }
+ free (buf);
+ if (close (fd) != 0)
+ {
+ error (0, errno, _("cannot close \"%s\""), debugname);
+ free (debugname);
+ return false;
+ }
+ free (debugname);
+ *crcp = crc;
+ return true;
+}
+
+static bool
+process (Elf *elf, int fd, const char *fname)
+{
+ GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ error (0, 0, _("cannot get ELF header of \"%s\""), fname);
+ return false;
+ }
+ if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB
+ && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
+ {
+ error (0, 0, _("invalid ELF endianity of \"%s\""), fname);
+ return false;
+ }
+ Elf_Scn *scn = NULL;
+ const char scnname[] = ".gnu_debuglink";
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ error (0, 0, _("cannot get section # %zu in \"%s\""),
+ elf_ndxscn (scn), fname);
+ continue;
+ }
+ const char *sname = elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name);
+ if (sname == NULL)
+ {
+ error (0, 0, _("cannot get name of section # %zu in \"%s\""),
+ elf_ndxscn (scn), fname);
+ continue;
+ }
+ if (strcmp (sname, scnname) != 0)
+ continue;
+ Elf_Data *data = elf_getdata (scn, NULL);
+ if (data == NULL)
+ {
+ error (0, 0, _("cannot get data of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ if ((data->d_size & 3) != 0)
+ {
+ error (0, 0, _("invalid size of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ const uint8_t *zerop = memchr (data->d_buf, '\0', data->d_size);
+ const uint8_t *crcp = (zerop == NULL
+ ? NULL
+ : (const uint8_t *) ((uintptr_t) (zerop + 1 + 3)
+ & -4));
+ if (crcp + 4 != (uint8_t *) data->d_buf + data->d_size)
+ {
+ error (0, 0, _("invalid format of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ uint32_t had_crc_targetendian = *(const uint32_t *) crcp;
+ uint32_t had_crc = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
+ ? le32toh (had_crc_targetendian)
+ : be32toh (had_crc_targetendian));
+ uint32_t crc;
+ if (! crc32 (data->d_buf, fname, &crc))
+ return false;
+ if (crc == had_crc)
+ {
+ matched_count++;
+ return true;
+ }
+ updated_count++;
+ off64_t seekto = (shdr->sh_offset + data->d_off
+ + (crcp - (const uint8_t *) data->d_buf));
+ uint32_t crc_targetendian = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
+ ? htole32 (crc) : htobe32 (crc));
+ ssize_t wrote = pwrite (fd, &crc_targetendian, sizeof (crc_targetendian),
+ seekto);
+ if (wrote != sizeof (crc_targetendian))
+ {
+ error (0, 0, _("cannot write new CRC to 0x%llx "
+ "inside section \"%s\" # %zu in \"%s\""),
+ (unsigned long long) seekto, scnname, elf_ndxscn (scn), fname);
+ return false;
+ }
+ return true;
+ }
+ error (0, 0, _("cannot find section \"%s\" in \"%s\""), scnname, fname);
+ return false;
+}
+
+int
+main (int argc, char **argv)
+{
+ if (argc < 2)
+ error (1, 0, _("usr/lib/debug [<relative filenames>...]"));
+ usr_lib_debug = argv[1];
+ if (elf_version (EV_CURRENT) == EV_NONE)
+ error (1, 0, _("error initializing libelf: %s"), elf_errmsg (-1));
+ for (int argi = 2; argi < argc; argi++)
+ {
+ const char *fname = argv[argi];
+ int fd = open64 (fname, O_RDWR);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open \"%s\""), fname);
+ failed_count++;
+ continue;
+ }
+ bool failed = false;
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
+ if (elf == NULL)
+ {
+ error (0, 0, _("cannot open \"%s\" as ELF: %s"), fname,
+ elf_errmsg (-1));
+ failed = true;
+ }
+ else
+ {
+ if (! process (elf, fd, fname))
+ failed = true;
+ if (elf_end (elf) != 0)
+ {
+ error (0, 0, _("cannot close \"%s\" as ELF: %s"), fname,
+ elf_errmsg (-1));
+ failed = true;
+ }
+ }
+ if (close (fd) != 0)
+ {
+ error (0, errno, _("cannot close \"%s\""), fname);
+ failed = true;
+ }
+ if (failed)
+ failed_count++;
+ }
+ printf ("%s: Updated %zu CRC32s, %zu CRC32s did match.\n", argv[0],
+ updated_count, matched_count);
+ if (failed_count)
+ printf ("%s: Failed for %zu files.\n", argv[0], failed_count);
+ return failed_count == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}

View File

@ -0,0 +1,17 @@
diff -up rpm-4.11.2/build/parseReqs.c.double-sep-warning rpm-4.11.2/build/parseReqs.c
--- rpm-4.11.2/build/parseReqs.c.double-sep-warning 2014-02-18 08:59:32.692891895 +0200
+++ rpm-4.11.2/build/parseReqs.c 2014-02-18 09:00:17.572769945 +0200
@@ -166,8 +166,11 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}~")) goto exit;
/* While ':' and '-' are valid, only one of each is valid. */
- if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg))
- goto exit;
+ if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg)) {
+ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"),
+ spec->lineNum, emsg, spec->line);
+ emsg = _free(emsg);
+ }
re = ve; /* ==> next token after EVR string starts here */
} else

View File

@ -1,7 +1,7 @@
diff -uNr rpm-4.9.0-orig//macros.in rpm-4.9.0/macros.in
--- rpm-4.9.0-orig//macros.in 2011-08-05 12:23:04.000000000 -0500
+++ rpm-4.9.0/macros.in 2011-08-05 12:25:13.000000000 -0500
@@ -1032,7 +1032,7 @@
diff -up rpm-4.11.3/macros.in.armhfp rpm-4.11.3/macros.in
--- rpm-4.11.3/macros.in.armhfp 2014-09-05 16:09:00.595885788 +0300
+++ rpm-4.11.3/macros.in 2014-09-05 16:09:00.602885768 +0300
@@ -999,7 +999,7 @@ done \
#------------------------------------------------------------------------------
# arch macro for all supported ARM processors
@ -10,19 +10,19 @@ diff -uNr rpm-4.9.0-orig//macros.in rpm-4.9.0/macros.in
#------------------------------------------------------------------------------
# arch macro for all supported Sparc processors
diff -uNr rpm-4.9.0-orig//rpmrc.in rpm-4.9.0/rpmrc.in
--- rpm-4.9.0-orig//rpmrc.in 2011-08-05 12:23:04.000000000 -0500
+++ rpm-4.9.0/rpmrc.in 2011-08-05 12:26:34.000000000 -0500
@@ -66,6 +66,8 @@
diff -up rpm-4.11.3/rpmrc.in.armhfp rpm-4.11.3/rpmrc.in
--- rpm-4.11.3/rpmrc.in.armhfp 2014-09-05 16:09:00.590885802 +0300
+++ rpm-4.11.3/rpmrc.in 2014-09-05 16:09:00.602885768 +0300
@@ -68,6 +68,8 @@ optflags: armv5tel -O2 -g -march=armv5te
optflags: armv5tejl -O2 -g -march=armv5te
optflags: armv6l -O2 -g -march=armv6
optflags: armv7l -O2 -g -march=armv7
+optflags: armv7hl -O2 -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16
+optflags: armv7hnl -O2 -g -march=armv7-a -mfloat-abi=hard -mfpu=neon
optflags: atarist -O2 -g -fomit-frame-pointer
optflags: atariste -O2 -g -fomit-frame-pointer
@@ -140,6 +142,8 @@
optflags: m68k -O2 -g -fomit-frame-pointer
@@ -185,6 +187,8 @@ arch_canon: armv5tel: armv5tel 12
arch_canon: armv5tejl: armv5tejl 12
arch_canon: armv6l: armv6l 12
arch_canon: armv7l: armv7l 12
@ -31,25 +31,25 @@ diff -uNr rpm-4.9.0-orig//rpmrc.in rpm-4.9.0/rpmrc.in
arch_canon: m68kmint: m68kmint 13
arch_canon: atarist: m68kmint 13
@@ -248,6 +252,8 @@
@@ -298,6 +302,8 @@ buildarchtranslate: armv5tel: armv5tel
buildarchtranslate: armv5tejl: armv5tejl
buildarchtranslate: armv6l: armv6l
buildarchtranslate: armv7l: armv7l
+buildarchtranslate: armv7hl: armv7hl
+buildarchtranslate: armv7hnl: armv7hnl
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
@@ -336,6 +342,8 @@
buildarchtranslate: m68k: m68k
@@ -392,6 +398,8 @@ arch_compat: armv5tel: armv4tl
arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
+arch_compat: armv7hnl: armv7hl
+arch_compat: armv7hl: noarch
arch_compat: atarist: m68kmint noarch
arch_compat: atariste: m68kmint noarch
@@ -441,6 +449,9 @@
arch_compat: m68k: noarch
@@ -505,6 +513,9 @@ buildarch_compat: armv4tl: armv4l
buildarch_compat: armv4l: armv3l
buildarch_compat: armv3l: noarch

View File

@ -1,13 +0,0 @@
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\

View File

@ -1,7 +1,7 @@
diff -up rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic rpm-4.9.1.3/lib/rpmrc.c
--- rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic 2012-04-19 17:11:32.728750591 +0200
+++ rpm-4.9.1.3/lib/rpmrc.c 2012-04-19 17:11:32.754738455 +0200
@@ -743,6 +743,56 @@ static int is_sun4v()
diff -up rpm-4.11.1/lib/rpmrc.c.armhfp-logic rpm-4.11.1/lib/rpmrc.c
--- rpm-4.11.1/lib/rpmrc.c.armhfp-logic 2013-10-01 14:59:12.841041726 +0300
+++ rpm-4.11.1/lib/rpmrc.c 2013-10-01 14:59:12.856041684 +0300
@@ -733,6 +733,56 @@ static int is_sun4v()
}
#endif
@ -58,8 +58,8 @@ diff -up rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic rpm-4.9.1.3/lib/rpmrc.c
# if defined(__linux__) && defined(__i386__)
#include <setjmp.h>
@@ -1220,6 +1270,22 @@ static void defaultMachine(const char **
}
@@ -1136,6 +1186,22 @@ static void defaultMachine(const char **
# endif /* __ORDER_BIG_ENDIAN__ */
# endif /* ppc64*-linux */
+# if defined(__linux__) && defined(__arm__)

View File

@ -1,127 +0,0 @@
diff --git a/lib/depends.c b/lib/depends.c
index 69aecbb..5101d32 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -386,6 +386,108 @@ static int rpmdbProvides(rpmts ts, depCache dcache, rpmds dep)
return rc;
}
+/*
+ * Temporary support for live-conversion of the filesystem hierarchy
+ * mailto: kay@redhat.com, harald@redhat.com
+ * https://fedoraproject.org/wiki/Features/UsrMove
+ *
+ * X-CheckUnifiedSystemdir:
+ * /bin, /sbin, /lib, /lib64 --> /usr
+ *
+ * X-CheckUnifiedBindir:
+ * /usr/sbin -> /usr/bin
+ *
+ * X-CheckMultiArchLibdir:
+ * /usr/lib64 /usr/lib/<platform tuple> (e.g. x86_64-linux-gnu)
+ *
+ * This code is not needed for new installations, it can be removed after
+ * updates from older systems are no longer supported: Fedora 19 / RHEL 8.
+ */
+
+static int CheckLink(const char *dir, const char *root)
+{
+ char *d = NULL;
+ struct stat sbuf;
+ int rc = 0;
+
+ if (!root)
+ root = "/";
+
+ rasprintf(&d, "%s%s", root, dir);
+ if (!d) {
+ rc = -1;
+ goto exit;
+ }
+
+ /* directory or symlink does not exist, all is fine */
+ if (lstat(d, &sbuf) < 0) {
+ rc = 1;
+ goto exit;
+ }
+
+ /* if it is a symlink, all is fine */
+ if (S_ISLNK(sbuf.st_mode))
+ rc = 1;
+
+exit:
+ free(d);
+ return rc;
+}
+
+static int CheckFilesystemHierarchy(rpmds * dsp, const char *root)
+{
+ static const char *dirs[] = { "bin", "sbin", "lib", "lib64" };
+ int check;
+ int i;
+ rpmds ds;
+ int rc = 0;
+
+ for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
+ check = CheckLink(dirs[i], root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+
+ if (check == 0)
+ goto exit;
+ }
+ ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckUnifiedSystemdir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+
+ check = CheckLink("usr/lib64", root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+ if (check > 0) {
+ ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckMultiArchLibdir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+ }
+
+ check = CheckLink("usr/sbin", root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+ if (check > 0) {
+ ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckUnifiedBindir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+ }
+
+exit:
+ return rc;
+}
+
/**
* Check dep for an unsatisfied dependency.
* @param ts transaction set
@@ -410,9 +512,11 @@ retry:
*/
if (dsflags & RPMSENSE_RPMLIB) {
static int oneshot = -1;
- if (oneshot)
+ if (oneshot) {
oneshot = rpmdsRpmlib(&rpmlibP, NULL);
-
+ CheckFilesystemHierarchy(&rpmlibP, rpmtsRootDir(ts));
+ }
+
if (rpmlibP != NULL && rpmdsSearch(rpmlibP, dep) >= 0) {
rpmdsNotify(dep, "(rpmlib provides)", rc);
goto exit;

View File

@ -11,7 +11,7 @@
%define rpmhome /usr/lib/rpm
%define rpmver 4.11.0.1
%define rpmver 4.11.3
%define srcver %{rpmver}%{?snapver:-%{snapver}}
%define bdbname libdb
@ -24,7 +24,7 @@ Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}1%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2
%if %{with int_bdb}
Source1: db-%{bdbver}.tar.gz
%else
@ -32,7 +32,6 @@ BuildRequires: libdb-devel
%endif
Source10: libsymlink.attr
Patch1: rpm-4.5.90-pkgconfig-path.patch
# Fedora specspo is setup differently than what rpm expects, considering
# this as Fedora-specific patch for now
Patch2: rpm-4.9.90-fedora-specspo.patch
@ -40,10 +39,14 @@ Patch2: rpm-4.9.90-fedora-specspo.patch
Patch3: rpm-4.9.90-no-man-dirs.patch
# gnupg2 comes installed by default, avoid need to drag in gnupg too
Patch4: rpm-4.8.1-use-gpg2.patch
Patch5: rpm-4.9.90-armhfp.patch
Patch5: rpm-4.11.3-armhfp.patch
#conditionally applied patch for arm hardware floating point
Patch6: rpm-4.9.0-armhfp-logic.patch
# Fedora has big package stacks based on broken dependency EVRs, reduce the
# double separator error into an error on released versions (#1065563)
Patch10: rpm-4.11.2-double-separator-warning.patch
# Patches already in upstream
# These are not yet upstream
@ -55,6 +58,8 @@ Patch304: rpm-4.9.1.1-ld-flags.patch
Patch305: rpm-4.10.0-dwz-debuginfo.patch
# Minidebuginfo support (#834073)
Patch306: rpm-4.10.0-minidebuginfo.patch
# Fix CRC32 after dwz (#971119)
Patch307: rpm-4.11.1-sepdebugcrcfix.patch
# Temporary Patch to provide support for updates
Patch400: rpm-4.10.90-rpmlib-filesystem-check.patch
@ -103,6 +108,10 @@ BuildRequires: libacl-devel%{_isa}
%if ! %{without xz}
BuildRequires: xz-devel%{_isa} >= 4.999.8
%endif
# Only required by sepdebugcrcfix patch
BuildRequires: binutils-devel
# Couple of patches change makefiles so, require for now...
BuildRequires: automake libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -162,7 +171,7 @@ Group: Development/Tools
Requires: rpm = %{version}-%{release}
Requires: elfutils >= 0.128 binutils
Requires: findutils sed grep gawk diffutils file patch >= 2.5
Requires: unzip gzip bzip2 cpio xz
Requires: unzip gzip bzip2 cpio xz tar
Requires: pkgconfig >= 1:0.24
Requires: /usr/bin/gdb-add-index
Conflicts: ocaml-runtime < 3.11.1-7
@ -213,16 +222,18 @@ packages on a system.
%prep
%setup -q -n %{name}-%{srcver} %{?with_int_bdb:-a 1}
%patch1 -p1 -b .pkgconfig-path
%patch2 -p1 -b .fedora-specspo
%patch3 -p1 -b .no-man-dirs
%patch4 -p1 -b .use-gpg2
%patch10 -p1 -b .double-sep-warning
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
%patch304 -p1 -b .ldflags
%patch305 -p1 -b .dwz-debuginfo
%patch306 -p1 -b .minidebuginfo
%patch307 -p1 -b .sepdebugcrcfix
%patch400 -p1 -b .rpmlib-filesystem-check
@ -245,6 +256,8 @@ CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
CFLAGS="$RPM_OPT_FLAGS"
export CPPFLAGS CFLAGS LDFLAGS
autoreconf -i -f
# Using configure macro has some unwanted side-effects on rpm platform
# setup, use the old-fashioned way for now only defining minimal paths.
./configure \
@ -411,6 +424,7 @@ exit 0
%{rpmhome}/brp-*
%{rpmhome}/check-*
%{rpmhome}/debugedit
%{rpmhome}/sepdebugcrcfix
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/find-lang.sh
%{rpmhome}/*provides*
@ -450,6 +464,34 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
* Fri Sep 05 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.3-1
- update to 4.11.3 (http://rpm.org/wiki/Releases/4.11.3)
* Tue Feb 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-2
- reduce the double separator spec parse error into a warning (#1065563)
* Thu Feb 13 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-1
- update to 4.11.2 (http://rpm.org/wiki/Releases/4.11.2)
* Mon Sep 09 2013 Matilainen <pmatilai@redhat.com> - 4.11.1-3
- add missing dependency on tar to rpm-build (#986539)
* Mon Sep 09 2013 Matilainen <pmatilai@redhat.com> - 4.11.1-2
- fix build-time double-free on file capability processing (#956190)
- fix relocation related regression on file sanity check (#1001553)
- fix segfault on empty -p <lua> scriptlet body (#1004062)
- fix source url, once again
* Fri Jul 05 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-1
- update to 4.11.1 (http://rpm.org/wiki/Releases/4.11.1)
- drop upstreamed patches
- fix .gnu_debuglink CRC32 after dwz, buildrequire binutils-devel (#971119)
- ensure relocatable packages always get install-prefix(es) set (#979443)
* Tue May 28 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.0.1-2
- check for stale locks when opening write-cursors (#860500, #962750...)
- serialize BDB environment open/close (#924417)
* Mon Feb 04 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.0.1-1
- update to 4.11.0.1 (http://rpm.org/wiki/Releases/4.11.0.1)

View File

@ -1 +1 @@
b35f5359e0d4494d7b11e8d0c1512a0d rpm-4.11.0.1.tar.bz2
2e3e7919c5b59d2c5aa8207ad2014d3b rpm-4.11.3.tar.bz2