- update to rpm-4.18.0

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=625
This commit is contained in:
Michael Schröder 2022-12-02 14:17:05 +00:00 committed by Git OBS Bridge
parent bffb5f187b
commit 5030bb08e0
19 changed files with 247 additions and 309 deletions

View File

@ -1,10 +1,11 @@
--- scripts/brp-compress.orig 2020-09-30 13:09:28.846434576 +0000
+++ scripts/brp-compress 2020-09-30 13:09:34.514422459 +0000
@@ -51,6 +51,7 @@ do
find $d -type f ! -name dir | while read f
do
[ -f "$f" ] || continue
+ case $(file "$f") in *"image data"*) continue;; esac
--- scripts/brp-compress.orig 2022-12-02 13:18:54.498881077 +0000
+++ scripts/brp-compress 2022-12-02 13:20:00.038727777 +0000
@@ -52,6 +52,8 @@ do
while IFS= read -r -d '' f; do
[ -f "$f" ] || continue
case "$f" in
*.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ case $(file "$f") in *"image data"*) continue;; esac
+
case "$f" in
*.gz|*.Z) gunzip -f "$f"; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;;
*.bz2) bunzip2 -f "$f"; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;;

View File

@ -1,16 +1,16 @@
--- scripts/brp-strip-comment-note.orig 2022-07-01 09:02:17.586292400 +0000
+++ scripts/brp-strip-comment-note 2022-07-21 14:03:57.119809772 +0000
@@ -16,6 +16,8 @@ esac
--- scripts/brp-strip-comment-note.orig 2022-04-07 11:13:19.072518377 +0000
+++ scripts/brp-strip-comment-note 2022-12-02 13:07:03.700394762 +0000
@@ -15,7 +15,7 @@ esac
# Strip .comment and .note sections (the latter only if it is not allocated)
# for already stripped elf files in the build root
for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
+ grep -v ' shared object,' | \
+ grep -v '/lib/modules/' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'`; do
-for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do
+for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | grep -v ' shared object,' | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do
note="-R .note"
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
--- scripts/brp-strip.orig 2022-07-01 10:31:45.997506545 +0000
+++ scripts/brp-strip 2022-07-21 14:06:12.155573458 +0000
grep ALLOC >/dev/null; then
--- scripts/brp-strip.orig 2022-04-07 11:13:19.072518377 +0000
+++ scripts/brp-strip 2022-12-02 13:04:21.392758270 +0000
@@ -14,4 +14,4 @@ esac
# Strip ELF binaries

View File

@ -1,5 +1,5 @@
--- scripts/brp-compress.orig 2020-05-28 10:04:25.075136894 +0000
+++ scripts/brp-compress 2020-10-27 15:23:57.970737863 +0000
--- scripts/brp-compress.orig 2022-04-07 11:13:19.072518377 +0000
+++ scripts/brp-compress 2022-12-02 13:12:31.239774558 +0000
@@ -5,6 +5,9 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_B
exit 0
fi
@ -39,61 +39,42 @@
+}
+
for d in .${PREFIX}/man/man* .${PREFIX}/man/*/man* .${PREFIX}/info \
.${PREFIX}/share/man/man* .${PREFIX}/share/man/*/man* \
.${PREFIX}/share/info .${PREFIX}/kerberos/man \
@@ -21,40 +48,40 @@ for d in .${PREFIX}/man/man* .${PREFIX}/
.${PREFIX}/share/fish/man/man*
do
[ -d $d ] || continue
- for f in `find $d -type f ! -name dir`
+ find $d -type f ! -name dir | while read f
do
[ -f "$f" ] || continue
.${PREFIX}/share/man/man* .${PREFIX}/share/man/*/man* \
.${PREFIX}/share/info .${PREFIX}/kerberos/man \
@@ -26,10 +53,10 @@ do
[ -f "$f" ] || continue
case "$f" in
- *.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
- *.zst|*.zstd) unzstd -f --rm $f; b=`echo $f | sed -e 's/\.\(zst\|zstd\)$//'`;;
+ *.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.zst|*.zstd) unzstd -f --rm "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(zst\|zstd\)$//'`;;
*) b=$f;;
esac
case "$f" in
- *.gz|*.Z) gunzip -f "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;;
- *.bz2) bunzip2 -f "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;;
- *.xz|*.lzma) unxz -f "$f"; b=`echo "$f" | sed -e 's/\.\(xz\|lzma\)$//'`;;
- *.zst|*.zstd) unzstd -f --rm $f; b=`echo "$f" | sed -e 's/\.\(zst\|zstd\)$//'`;;
+ *.gz|*.Z) gunzip -f "$f"; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 -f "$f"; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz -f "$f"; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.zst|*.zstd) unzstd -f --rm $f; check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(zst\|zstd\)$//'`;;
*) b="$f";;
esac
- $COMPRESS $b </dev/null 2>/dev/null || {
+ $COMPRESS "$b" </dev/null 2>/dev/null || {
inode=`ls -i $b | awk '{ print $1 }'`
others=`find $d -type f -inum $inode`
if [ -n "$others" ]; then
@@ -38,7 +65,7 @@ do
others="`find $d -type f -inum $inode`"
if [ -n "$others" ]; then
for afile in $others ; do
- [ "$afile" != "$b" ] && rm -f $afile
+ [ "$afile" != "$b" ] && rm -f "$afile"
done
- $COMPRESS -f $b
+ $COMPRESS -f "$b"
$COMPRESS -f "$b"
for afile in $others ; do
- [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT
+ [ "$afile" != "$b" ] && ln "$b$COMPRESS_EXT" "$afile$COMPRESS_EXT"
done
else
- $COMPRESS -f $b
+ $COMPRESS -f "$b"
fi
}
done
@@ -52,9 +79,9 @@ do
- for f in `find $d -type l`
+ find $d -type l | while read f
do
- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
- rm -f $f
- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
- ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT
+ l=`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ rm -f "$f"
+ b=`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT"
find $d -type l -print0 |
while IFS= read -r -d '' f; do
- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
- rm -f $f
- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ l=`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ rm -f "$f"
+ b=`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT"
done
done

View File

@ -1,6 +1,6 @@
--- lib/backend/bdb_ro.c.orig 2020-05-28 10:04:25.027136631 +0000
+++ lib/backend/bdb_ro.c 2021-01-07 15:24:08.866776792 +0000
@@ -790,6 +790,7 @@ static unsigned int bdbro_pkgdbKey(dbiIn
--- lib/backend/bdb_ro.c.orig 2022-04-07 11:13:18.994517848 +0000
+++ lib/backend/bdb_ro.c 2022-12-02 13:22:16.726408071 +0000
@@ -793,6 +793,7 @@ static unsigned int bdbro_pkgdbKey(dbiIn
struct rpmdbOps_s bdbro_dbops = {
.name = "bdb_ro",
.path = "Packages",
@ -8,9 +8,9 @@
.open = bdbro_Open,
.close = bdbro_Close,
--- lib/backend/dbi.c.orig 2020-08-31 09:14:07.991087349 +0000
+++ lib/backend/dbi.c 2021-01-07 15:24:08.866776792 +0000
@@ -119,11 +119,20 @@ exit:
--- lib/backend/dbi.c.orig 2022-04-07 11:13:18.994517848 +0000
+++ lib/backend/dbi.c 2022-12-02 13:22:16.726408071 +0000
@@ -138,11 +138,20 @@ exit:
}
rdb->db_descr = rdb->db_ops->name;
@ -31,9 +31,9 @@
const char * dbiName(dbiIndex dbi)
{
return dbi->dbi_file;
--- lib/backend/dbi.h.orig 2021-01-07 15:23:56.122812108 +0000
+++ lib/backend/dbi.h 2021-01-07 15:24:08.866776792 +0000
@@ -11,6 +11,7 @@ enum rpmdbFlags {
--- lib/backend/dbi.h.orig 2022-04-07 11:13:18.994517848 +0000
+++ lib/backend/dbi.h 2022-12-02 13:22:16.726408071 +0000
@@ -13,6 +13,7 @@ enum rpmdbFlags {
RPMDB_FLAG_REBUILD = (1 << 1),
RPMDB_FLAG_VERIFYONLY = (1 << 2),
RPMDB_FLAG_SALVAGE = (1 << 3),
@ -41,7 +41,7 @@
};
typedef enum dbCtrlOp_e {
@@ -63,6 +64,7 @@ struct rpmdb_s {
@@ -53,6 +54,7 @@ struct rpmdb_s {
int db_buildindex; /*!< Index rebuild indicator */
const struct rpmdbOps_s * db_ops; /*!< backend ops */
@ -49,7 +49,7 @@
/* dbenv and related parameters */
void * db_dbenv; /*!< Backend private handle */
@@ -209,6 +211,14 @@ RPM_GNUC_INTERNAL
@@ -197,6 +199,14 @@ RPM_GNUC_INTERNAL
const char * dbiName(dbiIndex dbi);
/** \ingroup dbi
@ -64,7 +64,7 @@
* Open a database cursor.
* @param dbi index database handle
* @param flags DBC_WRITE if writing, or 0 (DBC_READ) for reading
@@ -252,6 +262,7 @@ const void * idxdbKey(dbiIndex dbi, dbiC
@@ -240,6 +250,7 @@ const void * idxdbKey(dbiIndex dbi, dbiC
struct rpmdbOps_s {
const char *name; /* backend name */
const char *path; /* main database name */
@ -72,8 +72,8 @@
int (*open)(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags);
int (*close)(dbiIndex dbi, unsigned int flags);
--- lib/backend/ndb/rpmpkg.c.orig 2021-01-07 15:24:37.266698082 +0000
+++ lib/backend/ndb/rpmpkg.c 2021-01-07 15:27:46.678173133 +0000
--- lib/backend/ndb/rpmpkg.c.orig 2022-04-07 11:13:18.997517869 +0000
+++ lib/backend/ndb/rpmpkg.c 2022-12-02 13:22:16.726408071 +0000
@@ -1116,11 +1116,12 @@ static int rpmpkgPutInternal(rpmpkgdb pk
if (rpmpkgWriteBlob(pkgdb, pkgidx, blkoff, blkcnt, blob, blobl, pkgdb->generation)) {
return RPMRC_FAIL;
@ -90,24 +90,23 @@
if (rpmpkgWriteslot(pkgdb, slotno, pkgidx, blkoff, blkcnt)) {
free(pkgdb->slots);
pkgdb->slots = 0;
--- lib/rpmdb.c.orig 2021-01-07 15:23:56.122812108 +0000
+++ lib/rpmdb.c 2021-01-07 15:24:08.866776792 +0000
@@ -516,7 +516,13 @@ static int openDatabase(const char * pre
rpmsqActivate(1);
}
--- lib/rpmdb.c.orig 2022-09-20 12:08:27.197920294 +0000
+++ lib/rpmdb.c 2022-12-02 13:24:02.830159868 +0000
@@ -469,7 +469,12 @@ static int openDatabase(const char * pre
/* Open just bare minimum when rebuilding a potentially damaged db */
int justPkgs = (db->db_flags & RPMDB_FLAG_REBUILD) &&
((db->db_mode & O_ACCMODE) == O_RDONLY);
- rc = doOpen(db, justPkgs);
+ if (!db->db_pkgs && !justCheck && (mode & O_ACCMODE) == O_RDWR && dbiNeedConversion(db)) {
+ rc = rpmdbRebuild(prefix, NULL, NULL, RPMDB_REBUILD_FLAG_CONVERT);
+ db->db_ops = NULL; /* force re-detection of backend */
+ }
+
+ if (!rc)
+ rc = doOpen(db, justPkgs);
if (!db->db_descr)
db->db_descr = "unknown db";
@@ -2311,6 +2317,15 @@ int rpmdbAdd(rpmdb db, Header h)
@@ -2228,6 +2233,15 @@ int rpmdbAdd(rpmdb db, Header h)
if (db == NULL)
return 0;
@ -123,7 +122,7 @@
hdrBlob = headerExport(h, &hdrLen);
if (hdrBlob == NULL || hdrLen == 0) {
ret = -1;
@@ -2506,7 +2521,22 @@ int rpmdbRebuild(const char * prefix, rp
@@ -2423,7 +2437,22 @@ int rpmdbRebuild(const char * prefix, rp
}
rootdbpath = rpmGetPath(prefix, dbpath, NULL);
@ -147,7 +146,7 @@
if (rstreq(newdbpath, "") || rstreq(newdbpath, dbpath)) {
newdbpath = _free(newdbpath);
rasprintf(&newdbpath, "%srebuilddb.%d", dbpath, (int) getpid());
@@ -2532,7 +2562,9 @@ int rpmdbRebuild(const char * prefix, rp
@@ -2449,7 +2478,9 @@ int rpmdbRebuild(const char * prefix, rp
goto exit;
}
if (openDatabase(prefix, newdbpath, &newdb,
@ -158,8 +157,8 @@
rc = 1;
goto exit;
}
--- lib/rpmdb_internal.h.orig 2020-05-28 10:04:25.037136686 +0000
+++ lib/rpmdb_internal.h 2021-01-07 15:24:08.866776792 +0000
--- lib/rpmdb_internal.h.orig 2022-04-07 11:13:19.014517984 +0000
+++ lib/rpmdb_internal.h 2022-12-02 13:22:16.726408071 +0000
@@ -25,6 +25,7 @@ extern "C" {
enum rpmdbRebuildFlags_e {

View File

@ -1,32 +0,0 @@
--- lib/rpmdb.c.orig 2020-05-28 10:04:25.037136686 +0000
+++ lib/rpmdb.c 2020-09-30 12:23:50.708547165 +0000
@@ -387,9 +387,11 @@ int rpmdbClose(rpmdb db)
{
rpmdb * prev, next;
int rc = 0;
+ int dbmode;
if (db == NULL)
goto exit;
+ dbmode = db->db_mode;
prev = &rpmdbRock;
while ((next = *prev) != NULL && next != db)
@@ -423,7 +425,7 @@ int rpmdbClose(rpmdb db)
db = _free(db);
- if (rpmdbRock == NULL) {
+ if (rpmdbRock == NULL && (dbmode & (O_RDWR|O_WRONLY)) != 0) {
rpmsqActivate(0);
}
exit:
@@ -510,7 +512,7 @@ static int openDatabase(const char * pre
int justPkgs = (db->db_flags & RPMDB_FLAG_REBUILD) &&
((db->db_mode & O_ACCMODE) == O_RDONLY);
/* Enable signal queue on the first db open */
- if (db->db_next == NULL) {
+ if (db->db_next == NULL && (db->db_mode & (O_RDWR|O_WRONLY)) != 0) {
rpmsqActivate(1);
}

View File

@ -1,15 +1,15 @@
--- scripts/Makefile.am.orig 2021-09-23 20:01:42.554113780 +0000
+++ scripts/Makefile.am 2021-09-23 20:02:13.466049945 +0000
@@ -17,7 +17,7 @@ EXTRA_DIST = \
rpmdb_dump rpmdb_load \
--- scripts/Makefile.am.orig 2022-04-07 11:13:19.072518377 +0000
+++ scripts/Makefile.am 2022-12-02 13:21:08.886566747 +0000
@@ -18,7 +18,7 @@ EXTRA_DIST = \
rpm.daily rpm.log rpm.supp rpm2cpio.sh \
rpm_macros_provides.sh \
tgpg vpkg-provides.sh \
- find-requires find-provides \
+ find-requires find-provides find-supplements \
ocamldeps.sh \
pkgconfigdeps.sh \
fontconfig.prov script.req
@@ -29,7 +29,7 @@ rpmconfig_SCRIPTS = \
@@ -30,7 +30,7 @@ rpmconfig_SCRIPTS = \
brp-remove-la-files \
check-files check-prereqs \
check-buildroot check-rpaths check-rpaths-worker \
@ -18,8 +18,8 @@
perl.prov perl.req \
pkgconfigdeps.sh \
ocamldeps.sh \
--- scripts/find-supplements.orig 2021-09-23 20:01:42.554113780 +0000
+++ scripts/find-supplements 2021-09-23 20:01:42.554113780 +0000
--- scripts/find-supplements.orig 2022-12-02 13:21:08.886566747 +0000
+++ scripts/find-supplements 2022-12-02 13:21:08.886566747 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+

View File

@ -28,8 +28,8 @@ convertdb1 will build again.
/* keyp might no be defined. */
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
const void * keyp, size_t keylen)
--- lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000
+++ lib/rpmts.h 2011-05-12 13:28:32.000000000 +0000
--- include/rpm/lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000
+++ include/rpm/rpmts.h 2011-05-12 13:28:32.000000000 +0000
@@ -264,6 +264,22 @@ int rpmtsRebuildDB(rpmts ts);
int rpmtsVerifyDB(rpmts ts);

View File

@ -1,46 +0,0 @@
From 8763969a4a5f19231c0d851e5d50eff614cf5940 Mon Sep 17 00:00:00 2001
Date: Thu, 23 Jan 2020 13:43:36 +0100
Subject: [PATCH] Do not unset $MALLOC_CHECK_
How do we even _know_ user wants to debug malloc in rpmbuild,
maybe user wants to debug it in _the child_?
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
build/rpmfc.c | 1 -
lib/rpmscript.c | 3 ---
sign/rpmgensig.c | 1 -
3 files changed, 5 deletions(-)
--- build/rpmfc.c
+++ build/rpmfc.c
@@ -319,7 +319,6 @@ static int getOutputFrom(ARGV_t argv,
if (buildRoot)
setenv("RPM_BUILD_ROOT", buildRoot, 1);
- unsetenv("MALLOC_CHECK_");
execvp(argv[0], (char *const *)argv);
rpmlog(RPMLOG_ERR, _("Couldn't exec %s: %s\n"),
argv[0], strerror(errno));
--- lib/rpmscript.c
+++ lib/rpmscript.c
@@ -245,9 +245,6 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
}
if (chdir("/") == 0) {
- /* XXX Don't mtrace into children. */
- unsetenv("MALLOC_CHECK_");
-
xx = execv(argv[0], argv);
if (xx) {
rpmlog(RPMLOG_ERR,
--- sign/rpmgensig.c
+++ sign/rpmgensig.c
@@ -216,7 +216,6 @@ static int runGPG(sigTarget sigt, const char *sigfile)
dup2(pipefd[0], STDIN_FILENO);
close(pipefd[1]);
- unsetenv("MALLOC_CHECK_");
cmd = rpmExpand("%{?__gpg_sign_cmd}", NULL);
rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
if (!rc)

View File

@ -49,8 +49,8 @@
char *rpmdbCookie(rpmdb db)
{
void *cookie = NULL;
--- lib/rpmdb.h.orig 2020-11-27 13:09:17.968992873 +0000
+++ lib/rpmdb.h 2020-11-27 13:09:36.352942782 +0000
--- include/rpm/rpmdb.h.orig 2020-11-27 13:09:17.968992873 +0000
+++ include/rpm/rpmdb.h 2020-11-27 13:09:36.352942782 +0000
@@ -253,6 +253,14 @@ int rpmdbStat(const char *prefix, struct
*/
int rpmdbFStat(rpmdb db, struct stat *statbuf);

View File

@ -1,39 +1,15 @@
--- lib/poptI.c.orig 2021-04-09 11:28:12.359647290 +0000
+++ lib/poptI.c 2021-04-09 11:28:15.523640983 +0000
@@ -265,6 +265,10 @@ struct poptOption rpmInstallPoptTable[]
&rpmIArgs.installInterfaceFlags, (INSTALL_REINSTALL|INSTALL_INSTALL),
N_("reinstall package(s)"),
N_("<packagefile>+") },
+ { "runposttrans", '\0', POPT_BIT_SET,
+ &rpmIArgs.installInterfaceFlags, INSTALL_RUNPOSTTRANS,
+ N_("run posttrans scriptlet"),
+ N_("<posttransmanifest>") },
POPT_TABLEEND
};
--- lib/psm.c.orig 2021-04-09 11:28:12.359647290 +0000
+++ lib/psm.c 2021-04-09 11:28:15.527640975 +0000
@@ -810,7 +810,7 @@ static rpmRC rpmPackageErase(rpmts ts, r
}
if (rc) break;
- if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) {
+ if (ts->dump_posttrans || !(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) {
/* Prepare post transaction uninstall triggers */
rpmtriggersPrepPostUnTransFileTrigs(psm->ts, psm->te);
}
--- lib/rpmcli.h.orig 2021-04-09 11:28:12.359647290 +0000
+++ lib/rpmcli.h 2021-04-09 11:28:15.527640975 +0000
@@ -304,6 +304,7 @@ enum rpmInstallFlags_e {
INSTALL_ERASE = (1 << 8), /*!< from --erase */
--- include/rpm/rpmcli.h.orig 2022-04-07 11:13:18.983517774 +0000
+++ include/rpm/rpmcli.h 2022-12-02 13:43:44.899359176 +0000
@@ -306,6 +306,7 @@ enum rpmInstallFlags_e {
INSTALL_ALLMATCHES = (1 << 9), /*!< from --allmatches */
INSTALL_REINSTALL = (1 << 10), /*!< from --reinstall */
+ INSTALL_RUNPOSTTRANS = (1 << 11), /*!< from --runposttrans */
INSTALL_RESTORE = (1 << 11), /*!< from --restore */
+ INSTALL_RUNPOSTTRANS = (1 << 12), /*!< from --runposttrans */
};
typedef rpmFlags rpmInstallFlags;
@@ -385,6 +386,15 @@ int rpmInstall(rpmts ts, struct rpmInsta
int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv);
@@ -396,6 +397,15 @@ int rpmErase(rpmts ts, struct rpmInstall
int rpmRestore(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv);
/** \ingroup rpmcli
+ * Run posttrans scriptlets
@ -48,18 +24,60 @@
*/
extern struct rpmInstallArguments_s rpmIArgs;
--- lib/rpminstall.c.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/rpminstall.c 2021-04-09 11:28:15.527640975 +0000
@@ -4,6 +4,8 @@
--- include/rpm/rpmts.h.orig 2022-12-02 13:27:05.109729552 +0000
+++ include/rpm/rpmts.h 2022-12-02 13:27:08.881720646 +0000
@@ -249,6 +249,15 @@ int rpmtsOrder(rpmts ts);
int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet);
#include "system.h"
/** \ingroup rpmts
+ * Run all posttrans scriptlets described in the manifest data.
+ *
+ * @param ts transaction set
+ * @param manifest the manifest data
+ * @return 0 on success, -1 on error
+ */
+int rpmtsRunPostTrans(rpmts ts, ARGV_const_t manifest);
+
+/** \ingroup rpmts
* Reference a transaction set instance.
* @param ts transaction set
* @return new transaction set reference
--- lib/poptI.c.orig 2022-04-07 11:13:19.010517957 +0000
+++ lib/poptI.c 2022-12-02 13:27:08.877720656 +0000
@@ -273,6 +273,10 @@ struct poptOption rpmInstallPoptTable[]
&rpmIArgs.installInterfaceFlags, (INSTALL_RESTORE),
N_("restore package(s)"),
N_("<packagefile>+") },
+ { "runposttrans", '\0', POPT_BIT_SET,
+ &rpmIArgs.installInterfaceFlags, INSTALL_RUNPOSTTRANS,
+ N_("run posttrans scriptlet"),
+ N_("<posttransmanifest>") },
POPT_TABLEEND
};
--- lib/psm.c.orig 2022-12-02 13:27:05.093729590 +0000
+++ lib/psm.c 2022-12-02 13:27:08.877720656 +0000
@@ -826,7 +826,7 @@ static rpmRC rpmPackageErase(rpmts ts, r
}
if (rc) break;
- if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) {
+ if (ts->dump_posttrans || !(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) {
/* Prepare post transaction uninstall triggers */
rpmtriggersPrepPostUnTransFileTrigs(psm->ts, psm->te);
}
--- lib/rpminstall.c.orig 2022-09-02 05:48:29.712846716 +0000
+++ lib/rpminstall.c 2022-12-02 13:27:08.877720656 +0000
@@ -6,6 +6,8 @@
#include <string.h>
+#include <errno.h>
+
#include <rpm/rpmcli.h>
#include <rpm/rpmtag.h>
#include <rpm/rpmlib.h> /* rpmReadPackageFile, vercmp etc */
@@ -772,3 +774,32 @@ int rpmInstallSource(rpmts ts, const cha
@@ -812,3 +814,32 @@ int rpmInstallSource(rpmts ts, const cha
return rc;
}
@ -92,8 +110,8 @@
+ argvFree(manifest);
+ return rc;
+}
--- lib/rpmtriggers.c.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/rpmtriggers.c 2021-04-09 11:31:46.999219563 +0000
--- lib/rpmtriggers.c.orig 2022-04-07 11:13:19.020518024 +0000
+++ lib/rpmtriggers.c 2022-12-02 13:27:08.877720656 +0000
@@ -1,5 +1,6 @@
#include "system.h"
@ -110,7 +128,7 @@
unsigned int tix, unsigned int priority)
{
if (trigs->count == trigs->alloced) {
@@ -177,6 +178,14 @@ int runPostUnTransFileTrigs(rpmts ts)
@@ -178,6 +179,14 @@ int runPostUnTransFileTrigs(rpmts ts)
if (trigH == NULL)
continue;
@ -125,7 +143,7 @@
/* Prepare and run script */
script = rpmScriptFromTriggerTag(trigH,
triggertag(RPMSENSE_TRIGGERPOSTUN),
@@ -583,6 +592,16 @@ rpmRC runImmedFileTriggers(rpmts ts, rpm
@@ -587,6 +596,16 @@ rpmRC runImmedFileTriggers(rpmts ts, rpm
rpmTagVal priorityTag;
rpmtriggers triggers;
@ -142,8 +160,8 @@
if (tm == RPMSCRIPT_FILETRIGGER) {
priorityTag = RPMTAG_FILETRIGGERPRIORITIES;
} else {
--- lib/rpmtriggers.h.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/rpmtriggers.h 2021-04-09 11:28:15.527640975 +0000
--- lib/rpmtriggers.h.orig 2022-04-07 11:13:19.020518024 +0000
+++ lib/rpmtriggers.h 2022-12-02 13:27:08.881720646 +0000
@@ -27,6 +27,10 @@ rpmtriggers rpmtriggersCreate(unsigned i
RPM_GNUC_INTERNAL
rpmtriggers rpmtriggersFree(rpmtriggers triggers);
@ -155,37 +173,20 @@
/*
* Prepare post trans uninstall file triggers. After transcation uninstalled
* files are not saved anywhere. So we need during uninstalation of every
--- lib/rpmts.h.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/rpmts.h 2021-04-09 11:28:15.527640975 +0000
@@ -229,6 +229,15 @@ int rpmtsOrder(rpmts ts);
int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet);
/** \ingroup rpmts
+ * Run all posttrans scriptlets described in the manifest data.
+ *
+ * @param ts transaction set
+ * @param manifest the manifest data
+ * @return 0 on success, -1 on error
+ */
+int rpmtsRunPostTrans(rpmts ts, ARGV_const_t manifest);
+
+/** \ingroup rpmts
* Reference a transaction set instance.
* @param ts transaction set
* @return new transaction set reference
--- lib/rpmts_internal.h.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/rpmts_internal.h 2021-04-09 11:28:15.527640975 +0000
@@ -87,6 +87,7 @@ struct rpmts_s {
rpmtriggers trigs2run; /*!< Transaction file triggers */
--- lib/rpmts_internal.h.orig 2022-04-07 11:13:19.021518031 +0000
+++ lib/rpmts_internal.h 2022-12-02 13:44:39.803225928 +0000
@@ -94,6 +94,8 @@ struct rpmts_s {
int min_writes; /*!< macro minimize_writes used */
time_t overrideTime; /*!< Time value used when overriding system clock. */
+
+ int dump_posttrans; /*!< macro dump_posttrans used */
};
#ifdef __cplusplus
--- lib/transaction.c.orig 2021-04-09 11:28:12.363647282 +0000
+++ lib/transaction.c 2021-04-09 11:33:22.247029757 +0000
@@ -1468,6 +1468,8 @@ static int rpmtsSetup(rpmts ts, rpmprobF
--- lib/transaction.c.orig 2022-08-30 11:42:23.784853830 +0000
+++ lib/transaction.c 2022-12-02 13:27:08.881720646 +0000
@@ -1478,6 +1478,8 @@ static int rpmtsSetup(rpmts ts, rpmprobF
/* Get available space on mounted file systems. */
(void) rpmtsInitDSI(ts);
@ -194,7 +195,7 @@
return 0;
}
@@ -1846,22 +1848,26 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rp
@@ -1856,22 +1858,26 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rp
/* Actually install and remove packages */
nfailed = rpmtsProcess(ts);
@ -225,8 +226,8 @@
runTransScripts(ts, PKG_TRANSFILETRIGGERIN);
}
/* Final exit code */
@@ -1884,3 +1890,110 @@ exit:
rpmsqSetAction(SIGPIPE, oact);
@@ -1894,3 +1900,110 @@ exit:
sigaction(SIGPIPE, &oact, NULL);
return rc;
}
+
@ -336,29 +337,29 @@
+ rpmtsEmpty(ts);
+ return rc;
+}
--- rpm.c.orig 2021-04-09 11:28:12.363647282 +0000
+++ rpm.c 2021-04-09 11:28:15.527640975 +0000
@@ -19,6 +19,7 @@ enum modes {
MODE_INSTALL = (1 << 1),
--- rpm.c.orig 2022-04-07 11:13:19.067518343 +0000
+++ rpm.c 2022-12-02 13:55:52.969592594 +0000
@@ -21,6 +21,7 @@ enum modes {
MODE_ERASE = (1 << 2),
MODE_RESTORE = (1 << 4),
#define MODES_IE (MODE_INSTALL | MODE_ERASE)
+ MODE_RUNPOSTTRANS = (1 << 4),
+ MODE_RUNPOSTTRANS = (1 << 5),
MODE_UNKNOWN = 0
};
@@ -114,6 +115,11 @@ int main(int argc, char *argv[])
INSTALL_INSTALL|INSTALL_REINSTALL));
@@ -115,6 +116,11 @@ int main(int argc, char *argv[])
int eflags = (ia->installInterfaceFlags & INSTALL_ERASE);
int rflags = (ia->installInterfaceFlags & INSTALL_RESTORE);
+ if (ia->installInterfaceFlags & INSTALL_RUNPOSTTRANS) {
+ if (iflags || eflags)
+ if (iflags || eflags || rflags)
+ argerror(_("only one major mode may be specified"));
+ bigMode = MODE_RUNPOSTTRANS;
+ }
if (iflags & eflags)
if (iflags & eflags & rflags)
argerror(_("only one major mode may be specified"));
else if (iflags)
@@ -286,6 +292,14 @@ int main(int argc, char *argv[])
@@ -293,6 +299,14 @@ int main(int argc, char *argv[])
ec = rpmcliVerify(ts, qva, (ARGV_const_t) poptGetArgs(optCon));
} break;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Dec 2 15:09:55 CET 2022 - mls@suse.de
- update to rpm-4.18.0
------------------------------------------------------------------
Thu Jul 21 16:11:22 CEST 2022 - mls@suse.de

View File

@ -21,7 +21,7 @@
%global with_python 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-rpm
Version: 4.17.1.1
Version: 4.18.0
Release: 0
Summary: Python Bindings for Manipulating RPM Packages
License: GPL-2.0-or-later

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8752057c779658cc5988d4bd096fc1e49b5a5db57cbbdd08705d6b55ca6df352
size 4477410

BIN
rpm-4.18.0.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Fri Dec 2 15:01:05 CET 2022 - mls@suse.de
- update to rpm-4.18.0
* documentation updates
* fix query arguments containing ^ not working
* add downgrade (--oldpackage) support to --freshe
* add --path query for support for stateless file information
* add --shell option for interactive macro shell to rpmspec
* add --justdb counterpart --nodb option and matching API flag
* fix intermediate symlinks not verified (CVE-2021-35939)
* fix unowned directories created unsafely
* fix %posttrans argument on upgrade
* fix package build tree not getting removed on successful build
* add new %conf spec section for build configuration
* add %bcond macro as a nicer way of defining build conditionals
* add new rpmuncompress cli tool
* deprecate implicit "%patch number zero" syntax
- refreshed patches:
* brp-compress-no-img.patch
* brp.diff
* brpcompress.diff
* db_conversion.diff
* findsupplements.diff
* headeradddb.diff
* nextiteratorheaderblob.diff
* posttrans.diff
* rpmqpack.diff
* rpmrc.diff
* selinux_transactional_update.patch
- removed patches:
* dbrointerruptable.diff
* leave-malloc-check-set.diff
-------------------------------------------------------------------
Tue Oct 25 12:15:12 UTC 2022 - Johannes Segitz <jsegitz@suse.com>

View File

@ -58,7 +58,7 @@ Requires: /usr/bin/awk
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
Version: 4.17.1.1
Version: 4.18.0
Release: 0
URL: https://rpm.org/
#Git-Clone: https://github.com/rpm-software-management/rpm
@ -72,7 +72,6 @@ Source13: rpmconfigcheck.service
Patch5: usr-lib-sysimage-rpm.patch
Patch13: ignore-auxv.diff
Patch12: localetag.diff
Patch16: dbrointerruptable.diff
Patch18: refreshtestarch.diff
Patch24: brp.diff
Patch25: brpcompress.diff
@ -97,7 +96,6 @@ Patch71: nomagiccheck.diff
Patch73: assumeexec.diff
Patch77: langnoc.diff
Patch78: headerchk2.diff
Patch79: leave-malloc-check-set.diff
Patch85: brp-compress-no-img.patch
Patch93: weakdepscompat.diff
Patch94: checksepwarn.diff
@ -211,20 +209,19 @@ Provides and requires generator for .pl files and modules.
%setup -q -n rpm-%{version}
rm -rf sqlite
%patch -P 5 -P 12 -P 13 -P 16 -P 18
%patch -P 5 -P 12 -P 13 -P 18
%patch -P 24 -P 25 -P 26 -P 29
%patch -P 30 -P 32 -P 33 -P 34 -P 36 -P 38
%patch -P 43 -P 46
%patch -P 51
%patch -P 60 -P 61 -P 66 -P 67 -P 69
%patch -P 70 -P 71 -P 73 -P 77 -P 78 -P 79
%patch -P 70 -P 71 -P 73 -P 77 -P 78
%patch -P 85
%patch -P 93 -P 94 -P 99
%patch -P 100 -P 102 -P 103
%patch -P 117
%patch -P 122 -P 123 -P 131 -P 133 -P 134
%patch -p1 -P 135
%patch -P 180
%patch -P 135 -P 180
%ifarch aarch64 ppc64le riscv64
%patch6464
@ -400,6 +397,7 @@ fi
%{_bindir}/rpmdb
%{_bindir}/rpmgraph
%{_bindir}/rpmkeys
%{_bindir}/rpmlua
%{_bindir}/rpmqpack
%{_bindir}/rpmquery
%{_bindir}/rpmsign
@ -415,6 +413,8 @@ fi
/usr/lib/rpm/rpmpopt-*
/usr/lib/rpm/rpmrc
/usr/lib/rpm/rpmsort
/usr/lib/rpm/rpmuncompress
/usr/lib/rpm/rpm_macros_provides.sh
/usr/lib/rpm/suse
/usr/lib/rpm/tgpg
%{_libdir}/rpm-plugins

View File

@ -1,6 +1,6 @@
--- Makefile.am.orig 2021-06-21 12:00:44.552611187 +0000
+++ Makefile.am 2021-09-23 19:17:54.619555392 +0000
@@ -175,6 +175,10 @@ rpmgraph_LDADD = lib/librpm.la rpmio/lib
--- Makefile.am.orig 2022-08-30 11:42:23.754853580 +0000
+++ Makefile.am 2022-12-02 13:15:01.631426573 +0000
@@ -186,6 +186,10 @@ rpmgraph_LDADD = lib/librpm.la rpmio/lib
dist_bin_SCRIPTS = scripts/gendiff
@ -11,19 +11,19 @@
rpmconfig_DATA = rpmrc
rpmrc: $(top_srcdir)/rpmrc.in
@$(SED) \
--- docs/man/Makefile.am.orig 2021-08-20 08:44:56.263259000 +0000
+++ docs/man/Makefile.am 2021-09-23 19:17:54.619555392 +0000
--- docs/man/Makefile.am.orig 2022-04-07 11:13:18.958517604 +0000
+++ docs/man/Makefile.am 2022-12-02 13:16:00.071289072 +0000
@@ -9,7 +9,7 @@ EXTRA_DIST += gendiff.1.md
man_man8dir = $(mandir)/man8
man_man8_DATA = rpm.8 rpm-misc.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8
-man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8
+man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmqpack.8
-man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmlua.8
+man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmlua.8 rpmqpack.8
EXTRA_DIST += rpm.8.md rpm-misc.8.md rpmbuild.8.md rpmdeps.8.md rpmgraph.8.md
EXTRA_DIST += rpm2cpio.8.md rpmdb.8.md rpmkeys.8.md rpmsign.8.md rpmspec.8.md
--- docs/man/rpmqpack.8.orig 2021-09-23 19:17:54.619555392 +0000
+++ docs/man/rpmqpack.8 2021-09-23 19:17:54.619555392 +0000
--- docs/man/rpmqpack.8.orig 2022-12-02 13:15:01.635426563 +0000
+++ docs/man/rpmqpack.8 2022-12-02 13:15:01.635426563 +0000
@@ -0,0 +1,25 @@
+.TH RPMQPACK 8 "Mar 2002"
+.SH NAME
@ -50,8 +50,8 @@
+
+.SH AUTHOR
+Michael Schroeder <mls@suse.de>
--- rpmqpack.c.orig 2021-09-23 19:17:54.619555392 +0000
+++ rpmqpack.c 2021-09-23 19:17:54.619555392 +0000
--- rpmqpack.c.orig 2022-12-02 13:15:01.635426563 +0000
+++ rpmqpack.c 2022-12-02 13:15:01.635426563 +0000
@@ -0,0 +1,60 @@
+#include <sys/types.h>
+#include <limits.h>

View File

@ -1,5 +1,5 @@
--- rpmrc.in.orig 2019-06-26 14:17:31.451985635 +0000
+++ rpmrc.in 2019-10-02 11:24:49.601403844 +0000
--- rpmrc.in.orig 2022-04-07 11:13:19.072518377 +0000
+++ rpmrc.in 2022-12-02 13:14:27.719506789 +0000
@@ -12,16 +12,16 @@
# "fat" binary with both archs, for Darwin
optflags: fat -O2 -g -arch i386 -arch ppc
@ -67,7 +67,7 @@
optflags: armv7hnl -O2 -g -march=armv7-a -mfloat-abi=hard -mfpu=neon
optflags: armv8l -O2 -g -march=armv8-a
optflags: armv8hl -O2 -g -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4
@@ -95,8 +96,8 @@ optflags: atariclone -O2 -g -fomit-frame
@@ -93,8 +94,8 @@ optflags: atariclone -O2 -g -fomit-frame
optflags: milan -O2 -g -fomit-frame-pointer
optflags: hades -O2 -g -fomit-frame-pointer
@ -112,9 +112,9 @@
buildarchtranslate: ppc8260: ppc
buildarchtranslate: ppc8560: ppc
buildarchtranslate: ppc32dy4: ppc
@@ -398,6 +400,15 @@ buildarchtranslate: arm64: aarch64
buildarchtranslate: riscv: riscv64
buildarchtranslate: riscv64: riscv64
@@ -397,6 +399,15 @@ buildarchtranslate: riscv64: riscv64
buildarchtranslate: loongarch64: loongarch64
+buildarchtranslate: parisc: hppa
+buildarchtranslate: hppa2.0: hppa
@ -128,7 +128,7 @@
#############################################################
# Architecture compatibility
@@ -462,16 +473,20 @@ arch_compat: mips64r6el: mipsr6el
@@ -461,16 +472,20 @@ arch_compat: mips64r6el: mipsr6el
arch_compat: hppa2.0: hppa1.2
arch_compat: hppa1.2: hppa1.1
arch_compat: hppa1.1: hppa1.0
@ -151,7 +151,7 @@
arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
@@ -497,7 +512,7 @@ arch_compat: i370: noarch
@@ -493,7 +508,7 @@ arch_compat: i370: noarch
arch_compat: s390: noarch
arch_compat: s390x: s390 noarch
@ -160,7 +160,7 @@
arch_compat: x86_64: amd64 em64t athlon noarch
arch_compat: amd64: x86_64 em64t athlon noarch
@@ -623,7 +638,8 @@ buildarch_compat: armv6hl: noarch
@@ -619,7 +634,8 @@ buildarch_compat: armv6hl: noarch
buildarch_compat: hppa2.0: hppa1.2
buildarch_compat: hppa1.2: hppa1.1
buildarch_compat: hppa1.1: hppa1.0

View File

@ -1,8 +1,6 @@
Index: rpm-4.17.1.1/plugins/selinux.c
===================================================================
--- rpm-4.17.1.1.orig/plugins/selinux.c
+++ rpm-4.17.1.1/plugins/selinux.c
@@ -7,6 +7,7 @@
--- plugins/selinux.c.orig 2022-04-07 11:13:19.027518072 +0000
+++ plugins/selinux.c 2022-12-02 13:59:42.185032111 +0000
@@ -8,6 +8,7 @@
#include <rpm/rpmlog.h>
#include <rpm/rpmts.h>
#include "lib/rpmplugin.h"
@ -10,20 +8,17 @@ Index: rpm-4.17.1.1/plugins/selinux.c
#include "debug.h"
@@ -165,9 +166,15 @@ static rpmRC selinux_fsm_file_prepare(rp
char *scon = NULL;
if (selabel_lookup_raw(sehandle, &scon, dest, file_mode) == 0) {
int conrc = lsetfilecon(path, scon);
-
@@ -173,6 +174,13 @@ static rpmRC selinux_fsm_file_prepare(rp
if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP))
rc = RPMRC_OK;
+ else {
+ char *tup = getenv("TRANSACTIONAL_UPDATE");
+ if ( tup != NULL && ! strncmp( tup, "true", 4 ) ) {
+ if (tup != NULL && !strncmp(tup, "true", 4)) {
+ rpmlog(RPMLOG_DEBUG, "lsetfilecon failed, will be healed upon reboot (transactional update): (%s, %s)\n", path, scon);
+ rc = RPMRC_OK;
+ }
+ }
rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%s, %s) %s\n",
path, scon, (conrc < 0 ? strerror(errno) : ""));
rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%d %s, %s) %s\n",
fd, path, scon, (conrc < 0 ? strerror(errno) : ""));