Rebase to rpm 4.16.0 beta1
This commit is contained in:
parent
03c8fed85d
commit
bd27fcf3b7
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,3 +38,4 @@
|
||||
/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
|
||||
|
@ -1,65 +0,0 @@
|
||||
From a4afbb62c94c6e0dc18c1bf08336aeb4a91f82de Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a4afbb62c94c6e0dc18c1bf08336aeb4a91f82de.1587559252.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Wed, 22 Apr 2020 14:12:47 +0300
|
||||
Subject: [PATCH] Don't look into source package provides in depsolving
|
||||
|
||||
Fixes regressions from commit 75ec16e660e784d7897b37cac1a2b9b135825f25:
|
||||
the newly added provides of to-be-built packages were being used for
|
||||
dependency resolution, such as spec satifying its own buildrequires,
|
||||
and matched against conflicts in installed packages.
|
||||
|
||||
Source packages cannot obsolete anything or provide capabilities or files
|
||||
to transactions, don't add them to rpmal at all. Explicitly skip checks
|
||||
against source provides, similarly to what we already did with obsoletes.
|
||||
|
||||
Fixes: #1189
|
||||
---
|
||||
lib/depends.c | 8 ++++----
|
||||
lib/rpmal.c | 4 ++++
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/depends.c b/lib/depends.c
|
||||
index 6acb21dc3..579451926 100644
|
||||
--- a/lib/depends.c
|
||||
+++ b/lib/depends.c
|
||||
@@ -1040,6 +1040,10 @@ int rpmtsCheck(rpmts ts)
|
||||
checkDS(ts, dcache, p, rpmteNEVRA(p), rpmteDS(p, RPMTAG_OBSOLETENAME),
|
||||
tscolor);
|
||||
|
||||
+ /* Skip obsoletion and provides checks for source packages (ie build) */
|
||||
+ if (rpmteIsSource(p))
|
||||
+ continue;
|
||||
+
|
||||
/* Check provides against conflicts in installed packages. */
|
||||
while (rpmdsNext(provides) >= 0) {
|
||||
checkInstDeps(ts, dcache, p, RPMTAG_CONFLICTNAME, NULL, provides, 0);
|
||||
@@ -1047,10 +1051,6 @@ int rpmtsCheck(rpmts ts)
|
||||
checkInstDeps(ts, dcache, p, RPMTAG_REQUIRENAME, NULL, provides, 1);
|
||||
}
|
||||
|
||||
- /* Skip obsoletion checks for source packages (ie build) */
|
||||
- if (rpmteIsSource(p))
|
||||
- continue;
|
||||
-
|
||||
/* Check package name (not provides!) against installed obsoletes */
|
||||
checkInstDeps(ts, dcache, p, RPMTAG_OBSOLETENAME, NULL, rpmteDS(p, RPMTAG_NAME), 0);
|
||||
|
||||
diff --git a/lib/rpmal.c b/lib/rpmal.c
|
||||
index 3c8acd63a..8a47d025a 100644
|
||||
--- a/lib/rpmal.c
|
||||
+++ b/lib/rpmal.c
|
||||
@@ -247,6 +247,10 @@ void rpmalAdd(rpmal al, rpmte p)
|
||||
rpmalNum pkgNum;
|
||||
availablePackage alp;
|
||||
|
||||
+ /* Source packages don't provide anything to depsolving */
|
||||
+ if (rpmteIsSource(p))
|
||||
+ return;
|
||||
+
|
||||
if (al->size == al->alloced) {
|
||||
al->alloced += al->delta;
|
||||
al->list = xrealloc(al->list, sizeof(*al->list) * al->alloced);
|
||||
--
|
||||
2.25.3
|
||||
|
@ -1,26 +0,0 @@
|
||||
From cbbbf06a0ba3aaced56edf5f632c1b0da6da0c6b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cbbbf06a0ba3aaced56edf5f632c1b0da6da0c6b.1586433208.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu, 9 Apr 2020 14:49:30 +0300
|
||||
Subject: [PATCH] Fix regression causing all ELF files classified as OCaml
|
||||
|
||||
Commit a6fe37c39b39acbcbd014dd1e6d5653ff84254a1 causes OCaml generators
|
||||
to execute on all ELF files due to missing "magic_and_path" flag.
|
||||
|
||||
Fixes: #1173
|
||||
---
|
||||
fileattrs/ocaml.attr | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/fileattrs/ocaml.attr b/fileattrs/ocaml.attr
|
||||
index ad698b5fa..4bd65c17a 100644
|
||||
--- a/fileattrs/ocaml.attr
|
||||
+++ b/fileattrs/ocaml.attr
|
||||
@@ -2,3 +2,4 @@
|
||||
%__ocaml_requires %{_rpmconfigdir}/ocamldeps.sh --requires
|
||||
%__ocaml_magic ^(ELF|Objective caml|OCaml) .*$
|
||||
%__ocaml_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$
|
||||
+%__ocaml_flags magic_and_path
|
||||
--
|
||||
2.25.2
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 853c48ba6468ce1a516621a2fa6d1fc51e4f7410 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <853c48ba6468ce1a516621a2fa6d1fc51e4f7410.1589277227.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu, 2 Apr 2020 09:14:36 +0300
|
||||
Subject: [PATCH] Fix regression causing segfault on database autodetection
|
||||
|
||||
If configuration points to non-existent backend, tryBackend() will
|
||||
segfault on the first call. Duh. Regression introduced in commit
|
||||
3eb0eed3806b41efdf86f0433d0b5d7d6c953561.
|
||||
---
|
||||
lib/backend/dbi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/backend/dbi.c b/lib/backend/dbi.c
|
||||
index b51fc7ba3..94823b14c 100644
|
||||
--- a/lib/backend/dbi.c
|
||||
+++ b/lib/backend/dbi.c
|
||||
@@ -52,7 +52,7 @@ dbiIndex dbiNew(rpmdb rdb, rpmDbiTagVal rpmtag)
|
||||
static int tryBackend(const char *dbhome, const struct rpmdbOps_s *be)
|
||||
{
|
||||
int rc = 0;
|
||||
- if (be->path) {
|
||||
+ if (be && be->path) {
|
||||
char *path = rstrscat(NULL, dbhome, "/", be->path, NULL);
|
||||
rc = (access(path, F_OK) == 0);
|
||||
free(path);
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 82ae63e2b85073230cc3b6a76499448d01f966ca Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <82ae63e2b85073230cc3b6a76499448d01f966ca.1585650704.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Tue, 31 Mar 2020 13:29:48 +0300
|
||||
Subject: [PATCH] Unset SOURCE_DATE_EPOCH for the test-suite
|
||||
|
||||
Fixes the reproducable build test failing in Fedora rpm builds due to
|
||||
%source_date_epoch_from_changelog being set on the outside, which
|
||||
leaks the SOURCE_DATE_EPOCH environment into the test-suite and
|
||||
changes the expectation.
|
||||
---
|
||||
tests/atlocal.in | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/atlocal.in b/tests/atlocal.in
|
||||
index 95baca55f..a41752f5e 100644
|
||||
--- a/tests/atlocal.in
|
||||
+++ b/tests/atlocal.in
|
||||
@@ -27,6 +27,8 @@ export HOME
|
||||
TZ=UTC
|
||||
export TZ
|
||||
|
||||
+unset SOURCE_DATE_EPOCH
|
||||
+
|
||||
TOPDIR="${RPMTEST}/build"
|
||||
|
||||
RPM_XFAIL=${RPM_XFAIL-1}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 701736a18a4625557a5181df3a4f3aed7ac13506 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <701736a18a4625557a5181df3a4f3aed7ac13506.1587381334.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Wed, 8 Apr 2020 14:38:46 +0300
|
||||
Subject: [PATCH] Warn on undefined components in buildtree macros
|
||||
|
||||
Issue a warning if buildtree macros (%_sourcedir etc) contain undefined
|
||||
macro(s) after expansion, such as things only defined during spec parse.
|
||||
This always was a murky case that doesn't work in all scenarios, so
|
||||
a warning seems appropriate. Actual behavior doesn't change here though.
|
||||
---
|
||||
rpmio/rpmfileutil.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
|
||||
index 84ee34f4d..4a939dbfe 100644
|
||||
--- a/rpmio/rpmfileutil.c
|
||||
+++ b/rpmio/rpmfileutil.c
|
||||
@@ -439,6 +439,8 @@ int rpmMkdirs(const char *root, const char *pathstr)
|
||||
|
||||
for (char **d = dirs; *d; d++) {
|
||||
char *path = rpmGetPath(root ? root : "", *d, NULL);
|
||||
+ if (strstr(path, "%{"))
|
||||
+ rpmlog(RPMLOG_WARNING, ("undefined macro(s) in %s: %s\n"), *d, path);
|
||||
if ((rc = rpmioMkpath(path, 0755, -1, -1)) != 0) {
|
||||
const char *msg = _("failed to create directory");
|
||||
/* try to be more informative if the failing part was a macro */
|
||||
--
|
||||
2.25.2
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 10127cdb2364de2c1408950a25b730920e665689 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <10127cdb2364de2c1408950a25b730920e665689.1586173014.git.pmatilai@redhat.com>
|
||||
From: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
Date: Sun, 5 Apr 2020 16:21:40 +0200
|
||||
Subject: [PATCH] rpmfc: Do not prepend buildroot to a path for parametric
|
||||
generator
|
||||
|
||||
'fn' already contains full path to a file, so no need to prepend it once
|
||||
more. This is actually breaking things.
|
||||
|
||||
Before:
|
||||
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64//home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop
|
||||
|
||||
After:
|
||||
D: Calling %{__pythonname_provides %{?__pythonname_provides_opts}}() on /home/brain/rpmbuild/BUILDROOT/hello-1-1.fc33.x86_64/usr/share/applications/org.gnome.Terminal.desktop
|
||||
|
||||
Fixes: https://github.com/rpm-software-management/rpm/issues/1162
|
||||
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
build/rpmfc.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/build/rpmfc.c b/build/rpmfc.c
|
||||
index f6c358676..10c380ee9 100644
|
||||
--- a/build/rpmfc.c
|
||||
+++ b/build/rpmfc.c
|
||||
@@ -533,20 +533,18 @@ static ARGV_t runCall(const char *cmd,
|
||||
const char *buildRoot, const char *fn)
|
||||
{
|
||||
ARGV_t output = NULL;
|
||||
- char *path = rstrscat(NULL, buildRoot ? buildRoot : "", "/", fn, NULL);
|
||||
|
||||
if (_rpmfc_debug)
|
||||
- rpmlog(RPMLOG_DEBUG, "Calling %s() on %s\n", cmd, path);
|
||||
+ rpmlog(RPMLOG_DEBUG, "Calling %s() on %s\n", cmd, fn);
|
||||
|
||||
/* Hack to pass in the path as what looks like a macro argument */
|
||||
- rpmPushMacroFlags(NULL, "1", NULL, path, 1, RPMMACRO_LITERAL);
|
||||
+ rpmPushMacroFlags(NULL, "1", NULL, fn, 1, RPMMACRO_LITERAL);
|
||||
char *exp = rpmExpand(cmd, NULL);
|
||||
rpmPopMacro(NULL, "1");
|
||||
if (*exp)
|
||||
argvSplit(&output, exp, "\n\r");
|
||||
free(exp);
|
||||
|
||||
- free(path);
|
||||
return output;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
23
rpm.spec
23
rpm.spec
@ -23,9 +23,9 @@
|
||||
|
||||
%define rpmhome /usr/lib/rpm
|
||||
|
||||
%global rpmver 4.15.90
|
||||
%global snapver git14971
|
||||
%global rel 12
|
||||
%global rpmver 4.16.0
|
||||
%global snapver beta1
|
||||
%global rel 1
|
||||
|
||||
%global srcver %{rpmver}%{?snapver:-%{snapver}}
|
||||
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
|
||||
@ -59,12 +59,6 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch
|
||||
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
||||
|
||||
# Patches already upstream:
|
||||
Patch100: 0001-Unset-SOURCE_DATE_EPOCH-for-the-test-suite.patch
|
||||
Patch101: 0001-rpmfc-Do-not-prepend-buildroot-to-a-path-for-paramet.patch
|
||||
Patch102: 0001-Fix-regression-causing-all-ELF-files-classified-as-O.patch
|
||||
Patch103: 0001-Warn-on-undefined-components-in-buildtree-macros.patch
|
||||
Patch104: 0001-Don-t-look-into-source-package-provides-in-depsolvin.patch
|
||||
Patch105: 0001-Fix-regression-causing-segfault-on-database-autodete.patch
|
||||
|
||||
# These are not yet upstream
|
||||
Patch906: rpm-4.7.1-geode-i686.patch
|
||||
@ -441,8 +435,10 @@ fi
|
||||
%{_mandir}/man8/rpm.8*
|
||||
%{_mandir}/man8/rpmdb.8*
|
||||
%{_mandir}/man8/rpmkeys.8*
|
||||
%{_mandir}/man8/rpm2archive.8*
|
||||
%{_mandir}/man8/rpm2cpio.8*
|
||||
%{_mandir}/man8/rpm-misc.8*
|
||||
%{_mandir}/man8/rpm-plugins.8*
|
||||
|
||||
# XXX this places translated manuals to wrong package wrt eg rpmbuild
|
||||
%lang(fr) %{_mandir}/fr/man[18]/*.[18]*
|
||||
@ -478,9 +474,11 @@ fi
|
||||
|
||||
%files plugin-syslog
|
||||
%{_libdir}/rpm-plugins/syslog.so
|
||||
%{_mandir}/man8/rpm-plugin-syslog.8*
|
||||
|
||||
%files plugin-selinux
|
||||
%{_libdir}/rpm-plugins/selinux.so
|
||||
%{_mandir}/man8/rpm-plugin-selinux.8*
|
||||
|
||||
%files plugin-systemd-inhibit
|
||||
%{_libdir}/rpm-plugins/systemd_inhibit.so
|
||||
@ -488,12 +486,15 @@ fi
|
||||
|
||||
%files plugin-ima
|
||||
%{_libdir}/rpm-plugins/ima.so
|
||||
%{_mandir}/man8/rpm-plugin-ima.8*
|
||||
|
||||
%files plugin-prioreset
|
||||
%{_libdir}/rpm-plugins/prioreset.so
|
||||
%{_mandir}/man8/rpm-plugin-prioreset.8*
|
||||
|
||||
%files plugin-audit
|
||||
%{_libdir}/rpm-plugins/audit.so
|
||||
%{_mandir}/man8/rpm-plugin-audit.8*
|
||||
# with plugins
|
||||
%endif
|
||||
|
||||
@ -524,7 +525,6 @@ fi
|
||||
%{rpmhome}/*deps*
|
||||
%{rpmhome}/*.prov
|
||||
%{rpmhome}/*.req
|
||||
%{rpmhome}/config.*
|
||||
%{rpmhome}/mkinstalldirs
|
||||
%{rpmhome}/fileattrs/*
|
||||
|
||||
@ -552,6 +552,9 @@ fi
|
||||
%doc doc/librpm/html/*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 1 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.1
|
||||
- Rebase to rpm 4.16.0-beta1
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 4.15.90-0.git14971.12.1
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (rpm-4.15.90-git14971.tar.bz2) = aed1945f17860b6458dccffa35ba48e0823d9173d6c9009338e2e6ea8a21187a4fb7c222f38a86a02b4ba1a9ca645c7cbad82b45c736e346ddaea89e16fd8a04
|
||||
SHA512 (rpm-4.16.0-beta1.tar.bz2) = f0c4e1148129bee7c83837556013dc497344167871d5aab6941012f377be86fbb51482b894a0ced27b97ba8900fe39d8bceba4ee12d90f6e7cbf7268e2183211
|
||||
|
Loading…
Reference in New Issue
Block a user