SHA256
3
0
forked from pool/rpm

Accepting request 923520 from Base:System

update to rpm-4.17.0

OBS-URL: https://build.opensuse.org/request/show/923520
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=291
This commit is contained in:
Dominique Leuenberger 2021-10-25 13:16:42 +00:00 committed by Git OBS Bridge
commit 08ad72a51f
40 changed files with 321 additions and 2680 deletions

View File

@ -1,62 +0,0 @@
From d741374effd75baaa35047c29c7a8adf819138ff Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Mon, 15 Mar 2021 16:58:34 +0100
Subject: [PATCH] Add --dwz-single-file-mode argument for find-debuginfo.sh.
Sometime it's handy to disable multi-file mode and the patch
adds option for that: --dwz-single-file-mode.
It will be used in openSUSE for packages that use baselibs.conf
mechanism.
---
scripts/find-debuginfo.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index e0c36ebb6..2503b0f01 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -10,6 +10,7 @@
# [-S debugsourcefiles.list]
# [--run-dwz] [--dwz-low-mem-die-limit N]
# [--dwz-max-die-limit N]
+# [--dwz-single-file-mode]
# [--build-id-seed SEED]
# [--unique-debug-suffix SUFFIX]
# [--unique-debug-src-base BASE]
@@ -45,6 +46,8 @@
# The --run-dwz flag instructs find-debuginfo.sh to run the dwz utility
# if available, and --dwz-low-mem-die-limit and --dwz-max-die-limit
# provide detailed limits. See dwz(1) -l and -L option for details.
+# Use --dwz-single-file-mode to disable multi-file mode, see -m
+# for more details.
#
# If --build-id-seed SEED is given then debugedit is called to
# update the build-ids it finds adding the SEED as seed to recalculate
@@ -96,6 +99,7 @@ no_recompute_build_id=false
run_dwz=false
dwz_low_mem_die_limit=
dwz_max_die_limit=
+dwz_single_file_mode=false
# build id seed given by the --build-id-seed option
build_id_seed=
@@ -129,6 +133,9 @@ while [ $# -gt 0 ]; do
dwz_max_die_limit=$2
shift
;;
+ --dwz-single-file-mode)
+ dwz_single_file_mode=true
+ ;;
--build-id-seed)
build_id_seed=$2
shift
@@ -523,7 +530,7 @@ if $run_dwz \
done
dwz_multifile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
dwz_opts="-h -q -r"
- [ ${#dwz_files[@]} -gt 1 ] \
+ [ ${#dwz_files[@]} -gt 1 ] && [ "$dwz_single_file_mode" = "false" ] \
&& dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"
mkdir -p "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz"
[ -n "${dwz_low_mem_die_limit}" ] \

View File

@ -1,5 +1,5 @@
--- ./scripts/brp-strip-comment-note.orig 2020-05-28 10:04:25.076136900 +0000
+++ ./scripts/brp-strip-comment-note 2020-09-30 12:27:44.484016581 +0000
--- ./scripts/brp-strip-comment-note.orig 2021-06-21 12:00:44.650612737 +0000
+++ ./scripts/brp-strip-comment-note 2021-09-23 19:04:31.249193665 +0000
@@ -16,6 +16,8 @@ esac
# 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 {} \; | \
@ -9,11 +9,11 @@
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'`; do
note="-R .note"
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
--- ./scripts/brp-strip.orig 2020-09-30 12:27:44.484016581 +0000
+++ ./scripts/brp-strip 2020-09-30 12:28:43.959881586 +0000
--- ./scripts/brp-strip.orig 2021-09-23 19:04:31.249193665 +0000
+++ ./scripts/brp-strip 2021-09-23 19:07:10.624868675 +0000
@@ -14,4 +14,4 @@ esac
# Strip ELF binaries
find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" -print0 | \
- xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | grep -v ' shared object,' | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0
+ xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | grep -v ' shared object,' | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0
find "$RPM_BUILD_ROOT" -type f \! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \! -name "*.ko" -print0 | \
- xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0
+ xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0

View File

@ -1,17 +1,3 @@
--- db3/configure
+++ db3/configure
@@ -10,9 +10,9 @@
# XXX edit CFLAGS= ... out of invocation args ???
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
--enable-shared --enable-static \
- --with-uniquename=_rpmdb --srcdir=$db_dist
+ --with-uniquename=_rpmdb --srcdir=$db_dist --with-pic $ARGS
mv Makefile Makefile.orig
cat Makefile.orig | sed -e '/^install[:-]/c\
--- installplatform
+++ installplatform
@@ -118,6 +118,11 @@

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ba998b7451758928011878514c78b8a6f0fbfd49ebf5cc9f4269f4666414ab4
size 19969243

82
db.diff
View File

@ -1,82 +0,0 @@
--- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000
+++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000
@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
MAKE_INMEM(dbp);
return (ret);
}
+ if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
+ F_SET(mpf->mfp, MP_NOFSYNC);
/*
* Set the open flag. We use it to mean that the dbp has gone
--- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000
+++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000
@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
#define OKFLAGS \
(DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \
DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \
+ DB_NOFSYNC | \
DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
return (ret);
--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000
+++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000
@@ -467,6 +467,7 @@ struct __mpoolfile {
#define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */
#define MP_NOT_DURABLE 0x100 /* File is not durable. */
#define MP_TEMP 0x200 /* Backing file is a temporary. */
+#define MP_NOFSYNC 0x400 /* Don't fsync */
u_int32_t flags;
};
--- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000
+++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000
@@ -83,6 +83,7 @@
#define DB_NOORDERCHK 0x00000002
#define DB_NOPANIC 0x00000800
#define DB_NO_AUTO_COMMIT 0x00001000
+#define DB_NOFSYNC 0x00040000
#define DB_ODDFILESIZE 0x00000080
#define DB_ORDERCHKONLY 0x00000004
#define DB_OVERWRITE 0x00001000
--- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000
+++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000
@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
. ./RELEASE
echo "autoconf: building aclocal.m4..."
-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
+cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
+aclocal
echo "autoconf: running autoheader to build config.hin..."
rm -f config.hin
--- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000
+++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000
@@ -578,7 +578,7 @@ done: /*
if (ret == 0 && required_write) {
if (dbmfp == NULL)
ret = __memp_sync_files(env);
- else
+ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
ret = __os_fsync(env, dbmfp->fhp);
}
@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
"%s: unable to flush", (char *)
R_ADDR(dbmp->reginfo, mfp->path_off));
}
- } else
+ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
ret = __os_fsync(env, dbmfp->fhp);
/*
@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
COMPQUIET(hp, NULL);
env = dbmp->env;
+ if (F_ISSET(mfp, MP_NOFSYNC))
+ return 0;
/*
* We need to be holding the hash lock: we're using the path name
* and __memp_nameop might try and rename the file.

View File

@ -1,24 +0,0 @@
Support a database-local fsync setting. Needs berkeley db patch.
--- ./lib/backend/db3.c.orig 2017-01-19 10:31:06.874215725 +0000
+++ ./lib/backend/db3.c 2017-01-19 10:32:51.825873926 +0000
@@ -73,8 +73,10 @@ static const struct poptOption rdbOption
{ "mp_size", 0,POPT_ARG_INT, &staticcfg.db_cachesize, 0,
NULL, NULL },
+#if 0
{ "nofsync", 0,POPT_ARG_NONE, &staticcfg.db_no_fsync, 0,
NULL, NULL },
+#endif
/* Per-dbi options */
{ "nommap", 0,POPT_BIT_SET, &staticdbicfg.dbi_oflags, DB_NOMMAP,
@@ -84,6 +86,8 @@ static const struct poptOption rdbOption
NULL, NULL },
{ "lockdbfd", 0,POPT_ARG_NONE, &staticdbicfg.dbi_lockdbfd, 0,
NULL, NULL },
+ { "nofsync", 0,POPT_BIT_SET, &staticdbicfg.dbi_oflags, DB_NOFSYNC,
+ NULL, NULL },
POPT_TABLEEND
};

View File

@ -1,11 +0,0 @@
--- ./lib/backend/db3.c.orig 2017-12-01 15:44:53.609993968 +0000
+++ ./lib/backend/db3.c 2017-12-01 15:45:05.462959735 +0000
@@ -416,7 +416,7 @@ static int db_init(rpmdb rdb, const char
int rdonly = ((rdb->db_mode & O_ACCMODE) == O_RDONLY);
struct dbConfig_s * cfg = &rdb->cfg;
/* This is our setup, thou shall not have other setups before us */
- uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB);
+ uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB|DB_PRIVATE);
if (rdb->db_dbenv != NULL) {
rdb->db_opens++;

BIN
debugedit-5.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
--- ./scripts/find-debuginfo.sh.orig 2017-12-01 15:40:27.006764372 +0000
+++ ./scripts/find-debuginfo.sh 2017-12-01 15:41:17.270619182 +0000
@@ -348,6 +348,16 @@ while read nlinks inum f; do
--- ./scripts/find-debuginfo.in.orig 2021-09-23 20:28:21.646855995 +0000
+++ ./scripts/find-debuginfo.in 2021-09-23 20:28:53.530790698 +0000
@@ -434,6 +434,16 @@ while read nlinks inum f; do
;;
*) continue ;;
esac

View File

@ -1,6 +1,6 @@
--- ./scripts/find-debuginfo.sh.orig 2017-12-01 15:39:07.239994681 +0000
+++ ./scripts/find-debuginfo.sh 2017-12-01 15:39:34.942914702 +0000
@@ -321,7 +321,7 @@ debug_link()
--- ./scripts/find-debuginfo.in.orig 2021-09-23 20:27:13.686995174 +0000
+++ ./scripts/find-debuginfo.in 2021-09-23 20:27:40.826939593 +0000
@@ -407,7 +407,7 @@ debug_link()
get_debugfn()
{
dn=$(dirname "${1#$RPM_BUILD_ROOT}")

View File

@ -1,6 +1,6 @@
--- ./scripts/find-debuginfo.sh.orig 2017-12-01 15:35:59.023537837 +0000
+++ ./scripts/find-debuginfo.sh 2017-12-01 15:36:30.351447397 +0000
@@ -548,19 +548,25 @@ if $run_dwz \
--- ./scripts/find-debuginfo.in.orig 2021-09-23 20:25:41.059184871 +0000
+++ ./scripts/find-debuginfo.in 2021-09-23 20:26:40.363063418 +0000
@@ -643,19 +643,25 @@ if $run_dwz \
fi
fi

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +1,20 @@
--- ./fileattrs/Makefile.am.orig 2019-10-02 11:39:56.095525981 +0000
+++ ./fileattrs/Makefile.am 2019-10-02 11:40:20.695473538 +0000
@@ -8,6 +8,6 @@ fattrsdir = $(rpmconfigdir)/fileattrs
fattrs_DATA = \
debuginfo.attr desktop.attr elf.attr font.attr libtool.attr metainfo.attr \
perl.attr perllib.attr pkgconfig.attr python.attr pythondist.attr ocaml.attr \
- script.attr
+ script.attr elflib.attr
EXTRA_DIST = $(fattrs_DATA)
--- ./fileattrs/elf.attr.orig 2019-06-26 14:17:31.404985707 +0000
+++ ./fileattrs/elf.attr 2019-10-02 11:39:56.095525981 +0000
@@ -1,4 +1,5 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
-%__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
+%__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*executable
%__elf_flags exeonly
--- ./fileattrs/elf.attr.orig 2021-09-23 19:29:51.474079693 +0000
+++ ./fileattrs/elf.attr 2021-09-23 19:35:43.413332593 +0000
@@ -1,3 +1,4 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides
%__elf_requires %{_rpmconfigdir}/elfdeps --requires
%__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
+%__elf_exclude_path ^/usr/lib/debug/
--- ./fileattrs/elflib.attr.orig 2019-10-02 11:39:56.095525981 +0000
+++ ./fileattrs/elflib.attr 2019-10-02 11:39:56.095525981 +0000
@@ -0,0 +1,4 @@
+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object
+%__elflib_exclude_path ^/usr/lib/debug/
--- ./fileattrs/perl.attr.orig 2019-06-26 14:17:31.404985707 +0000
+++ ./fileattrs/perl.attr 2019-10-02 11:39:56.095525981 +0000
--- ./fileattrs/perl.attr.orig 2021-06-21 12:00:44.587611741 +0000
+++ ./fileattrs/perl.attr 2021-09-23 19:29:51.474079693 +0000
@@ -1,3 +1,4 @@
-%__perl_requires %{_rpmconfigdir}/perl.req
+# disabled for now
+#%__perl_requires %{_rpmconfigdir}/perl.req
%__perl_magic ^.*[Pp]erl .*$
%__perl_flags exeonly
--- ./fileattrs/perllib.attr.orig 2019-06-26 14:17:31.404985707 +0000
+++ ./fileattrs/perllib.attr 2019-10-02 11:39:56.095525981 +0000
--- ./fileattrs/perllib.attr.orig 2021-06-21 12:00:44.587611741 +0000
+++ ./fileattrs/perllib.attr 2021-09-23 19:29:51.478079685 +0000
@@ -1,5 +1,6 @@
%__perllib_provides %{_rpmconfigdir}/perl.prov
-%__perllib_requires %{_rpmconfigdir}/perl.req
@ -42,11 +23,3 @@
%__perllib_magic ^Perl[[:digit:]] module source.*
%__perllib_path \\.pm$
%__perllib_flags magic_and_path
--- ./fileattrs/pythondist.attr.orig 2019-12-06 14:32:57.245328376 +0000
+++ ./fileattrs/pythondist.attr 2019-12-06 14:33:35.345238073 +0000
@@ -1,3 +1,4 @@
%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
-%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
+#disabled for now
+#%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
%__pythondist_path /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$

View File

@ -1,13 +1,13 @@
--- ./scripts/find-lang.sh.orig 2017-12-01 16:07:23.339071251 +0000
+++ ./scripts/find-lang.sh 2017-12-01 16:13:00.392088317 +0000
@@ -296,7 +296,9 @@ s:%lang(C) ::
--- ./scripts/find-lang.sh.orig 2021-09-23 19:57:49.046595975 +0000
+++ ./scripts/find-lang.sh 2021-09-23 19:59:36.182374732 +0000
@@ -305,7 +305,9 @@ s:%lang(C) ::
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\([^/]\+_qt\.qm$\):%lang(\2) \1\2\3\4:
+'"$NO_ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\('"$NAME"'_qt\.qm$\):%lang(\2) \1\2\3\4:
+'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
+'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:

View File

@ -1,15 +1,6 @@
From: Jan Blunck <jblunck@suse.de>
Subject: Do the symbolic links right in the first place
Since brp-symlink relinks symbolic links to enforce a certain policy we should
do it right in the first place. So this patch changes find-debuginfo.sh scripts
behavior to reflect that policy.
Signed-off-by: Jan Blunck <jblunck@suse.de>
--- ./scripts/find-debuginfo.sh.orig 2017-12-01 15:26:21.939199791 +0000
+++ ./scripts/find-debuginfo.sh 2017-12-01 15:27:03.153081225 +0000
@@ -305,7 +305,17 @@ debug_link()
--- ./scripts/find-debuginfo.in.orig 2021-09-23 20:23:21.967469723 +0000
+++ ./scripts/find-debuginfo.in 2021-09-23 20:24:51.623286108 +0000
@@ -391,7 +391,17 @@ debug_link()
local l="/usr/lib/debug$2"
local t="$1"
echo >> "$LINKSFILE" "$l $t"

View File

@ -1,6 +1,6 @@
--- ./scripts/find-debuginfo.sh.orig 2019-09-09 07:56:53.377788842 +0000
+++ ./scripts/find-debuginfo.sh 2019-10-02 11:11:56.878979662 +0000
@@ -348,12 +348,18 @@ trap 'rm -rf "$temp"' EXIT
--- ./scripts/find-debuginfo.in.orig 2021-07-26 23:05:31.867817624 +0000
+++ ./scripts/find-debuginfo.in 2021-09-23 20:20:03.763875636 +0000
@@ -412,12 +412,18 @@ trap 'rm -rf "$temp"' EXIT
# Build a list of unstripped ELF files and their hardlinks
touch "$temp/primary"
@ -24,16 +24,16 @@
if [ $nlinks -gt 1 ]; then
var=seen_$inum
if test -n "${!var}"; then
@@ -386,6 +392,8 @@ do_file()
@@ -450,6 +456,8 @@ do_file()
if [ "$no_recompute_build_id" = "true" ]; then
no_recompute="-n"
fi
+ mode=$(stat -c %a "$f")
+ chmod +w "$f"
id=$(${lib_rpm_dir}/debugedit -b "$debug_base_name" -d "$debug_dest_name" \
id=$(${install_dir}/debugedit -b "$debug_base_name" -d "$debug_dest_name" \
$no_recompute -i \
${build_id_seed:+--build-id-seed="$build_id_seed"} \
@@ -413,17 +421,30 @@ do_file()
@@ -477,17 +485,30 @@ do_file()
# just has its file names collected and adjusted.
case "$dn" in
/usr/lib/debug/*)
@ -71,7 +71,7 @@
# strip -g implies we have full symtab, don't add mini symtab in that case.
# It only makes sense to add a minisymtab for executables and shared
@@ -581,12 +602,14 @@ if [ -s "$SOURCEFILE" ]; then
@@ -646,12 +667,14 @@ if [ -s "$SOURCEFILE" ]; then
# and non-standard modes may be inherented from original directories, fixup
find "${RPM_BUILD_ROOT}${debug_dest_name}" -type d -print0 |
xargs --no-run-if-empty -0 chmod 0755

View File

@ -1,6 +1,6 @@
--- ./scripts/find-lang.sh.orig 2019-09-09 07:56:53.377788842 +0000
+++ ./scripts/find-lang.sh 2019-10-02 11:12:53.774861485 +0000
@@ -22,11 +22,11 @@ the top of the tree containing the files
--- ./scripts/find-lang.sh.orig 2021-06-21 12:00:44.650612737 +0000
+++ ./scripts/find-lang.sh 2021-09-23 19:12:01.428275661 +0000
@@ -37,11 +37,11 @@ the top of the tree containing the files
PACKAGE_NAME is the %{name} of the package. This should also be
the basename of the .mo files. the output is written to
PACKAGE_NAME.lang unless \$3 is given in which case output is written
@ -15,7 +15,7 @@
--with-qt find Qt translation files
--with-html find HTML files
--with-man find localized man pages
@@ -50,9 +50,9 @@ else NAMES[0]=$1
@@ -65,9 +65,9 @@ else NAMES[0]=$1
fi
shift
@ -27,7 +27,7 @@
QT=#
MAN=#
HTML=#
@@ -74,6 +74,14 @@ while test $# -gt 0 ; do
@@ -89,6 +89,14 @@ while test $# -gt 0 ; do
KDE=
shift
;;
@ -42,7 +42,7 @@
--with-qt )
QT=
shift
@@ -103,11 +111,13 @@ while test $# -gt 0 ; do
@@ -118,11 +126,13 @@ while test $# -gt 0 ; do
shift
;;
esac
@ -59,7 +59,7 @@
for NAME in ${NAMES[@]}; do
@@ -117,7 +127,7 @@ s:'"$TOP_DIR"'::
@@ -132,7 +142,7 @@ s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang(C) ::
@ -68,7 +68,7 @@
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
@@ -125,27 +135,27 @@ s:'"$TOP_DIR"'::
@@ -140,27 +150,27 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
s:^\([^%].*\)::
s:%lang(C) ::
@ -103,7 +103,7 @@
find "$TOP_DIR" -type f|sed '
s:'"$TOP_DIR"'::
@@ -153,7 +163,7 @@ s:'"$TOP_DIR"'::
@@ -168,7 +178,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
s:^[^%].*::
s:%lang(C) ::
@ -112,7 +112,7 @@
find $TOP_DIR -type d|sed '
s:'"$TOP_DIR"'::
@@ -166,14 +176,14 @@ s:'"$TOP_DIR"'::
@@ -181,14 +191,14 @@ s:'"$TOP_DIR"'::
s:%lang(.*) .*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*::
s:^\([^%].*\)::
s:%lang(C) ::
@ -129,7 +129,7 @@
find "$TOP_DIR" -type f|sed '
s:'"$TOP_DIR"'::
@@ -181,7 +191,7 @@ s:'"$TOP_DIR"'::
@@ -196,7 +206,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MATE"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
s:^[^%].*::
s:%lang(C) ::
@ -138,7 +138,7 @@
KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null`
if [ x"$KDE3_HTML" != x ] && [ -d "$TOP_DIR$KDE3_HTML" ]; then
@@ -193,7 +203,7 @@ s:'"$TOP_DIR"'::
@@ -208,7 +218,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang(C) ::
@ -147,7 +147,7 @@
fi
KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null`
@@ -206,7 +216,7 @@ s:'"$TOP_DIR"'::
@@ -221,7 +231,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang(C) ::
@ -156,7 +156,7 @@
fi
KF5_HTML=`kf5-config --expandvars --install html 2>/dev/null`
@@ -219,7 +229,7 @@ s:'"$TOP_DIR"'::
@@ -234,7 +244,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang(C) ::
@ -165,7 +165,7 @@
fi
find "$TOP_DIR" -type d|sed '
@@ -230,7 +240,7 @@ s:'"$TOP_DIR"'::
@@ -245,7 +255,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang(C) ::
@ -174,8 +174,8 @@
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
@@ -243,7 +253,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
@@ -258,7 +268,7 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
s:^[^%].*::
s:%lang(C) ::
-/^$/d' >> $MO_NAME
@ -183,7 +183,7 @@
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
@@ -251,19 +261,24 @@ s:'"$TOP_DIR"'::
@@ -266,19 +276,24 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
s:^\([^%].*\)::
s:%lang(C) ::

View File

@ -1,25 +1,25 @@
--- ./scripts/Makefile.am.orig 2020-05-28 10:04:25.075136894 +0000
+++ ./scripts/Makefile.am 2020-09-30 13:11:48.626135765 +0000
@@ -16,7 +16,7 @@ EXTRA_DIST = \
--- ./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 \
rpm.daily rpm.log rpm.supp rpm2cpio.sh \
tgpg vpkg-provides.sh \
- find-requires find-provides \
+ find-requires find-provides find-supplements \
find-requires.php find-provides.php \
ocamldeps.sh \
pkgconfigdeps.sh libtooldeps.sh \
@@ -28,7 +28,7 @@ rpmconfig_SCRIPTS = \
brp-strip-shared brp-strip-static-archive \
pkgconfigdeps.sh \
fontconfig.prov script.req
@@ -29,7 +29,7 @@ rpmconfig_SCRIPTS = \
brp-remove-la-files \
check-files check-prereqs \
check-buildroot check-rpaths check-rpaths-worker \
- find-lang.sh find-requires find-provides \
+ find-lang.sh find-requires find-provides find-supplements \
perl.prov perl.req pythondistdeps.py \
pkgconfigdeps.sh libtooldeps.sh \
perl.prov perl.req \
pkgconfigdeps.sh \
ocamldeps.sh \
--- ./scripts/find-supplements.orig 2020-09-30 13:10:46.546268477 +0000
+++ ./scripts/find-supplements 2020-09-30 13:10:46.546268477 +0000
--- ./scripts/find-supplements.orig 2021-09-23 20:01:42.554113780 +0000
+++ ./scripts/find-supplements 2021-09-23 20:01:42.554113780 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+

View File

@ -1,6 +1,6 @@
--- ./macros.in.orig 2018-01-31 13:35:52.735593230 +0000
+++ ./macros.in 2018-01-31 13:35:55.528585772 +0000
@@ -1351,6 +1351,7 @@ EOF
--- ./macros.in.orig 2021-09-23 19:54:19.515028659 +0000
+++ ./macros.in 2021-09-23 19:54:25.495016311 +0000
@@ -1150,6 +1150,7 @@ package or when debugging this package.\
# %files -f %{name}.lang
#
%find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
@ -8,9 +8,9 @@
# Commands + opts to use for retrieving remote files
# Proxy opts can be set through --httpproxy/--httpport popt aliases,
--- ./scripts/find-lang.sh.orig 2018-01-31 13:35:52.726593254 +0000
+++ ./scripts/find-lang.sh 2018-01-31 13:36:35.806478195 +0000
@@ -60,6 +60,8 @@ MO=
--- ./scripts/find-lang.sh.orig 2021-09-23 19:54:19.507028675 +0000
+++ ./scripts/find-lang.sh 2021-09-23 19:54:25.495016311 +0000
@@ -75,6 +75,8 @@ MO=
MO_NAME=${NAMES[0]}.lang
ALL_NAME=#
NO_ALL_NAME=
@ -19,7 +19,7 @@
while test $# -gt 0 ; do
case "${1}" in
--with-gnome )
@@ -103,6 +105,14 @@ while test $# -gt 0 ; do
@@ -118,6 +120,14 @@ while test $# -gt 0 ; do
NO_ALL_NAME=#
shift
;;
@ -34,7 +34,7 @@
* )
if [ $MO_NAME != ${NAMES[$#]}.lang ]; then
NAMES[${#NAMES[@]}]=$MO_NAME
@@ -143,6 +153,8 @@ s:'"$TOP_DIR"'::
@@ -158,6 +168,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
@ -43,7 +43,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -151,19 +163,23 @@ s:'"$TOP_DIR"'::
@@ -166,19 +178,23 @@ s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/:
'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
s:^\([^%].*\)::
@ -69,7 +69,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -179,6 +195,8 @@ s:'"$TOP_DIR"'::
@@ -194,6 +210,8 @@ s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1:
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
s:^[^%].*::
@ -78,7 +78,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -219,6 +237,8 @@ s:'"$TOP_DIR"'::
@@ -234,6 +252,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
@ -87,7 +87,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
@@ -232,6 +252,8 @@ s:'"$TOP_DIR"'::
@@ -247,6 +267,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
@ -96,16 +96,16 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
@@ -269,6 +291,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
@@ -284,6 +306,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
s:^[^%].*::
+'"$ONLY_C"'/%lang(C)/!d
+'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -277,6 +301,8 @@ s:'"$TOP_DIR"'::
@@ -292,6 +316,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\)::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
s:^\([^%].*\)::
@ -114,7 +114,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -284,6 +310,8 @@ find "$TOP_DIR" -type f -o -type l|sed -
@@ -299,6 +325,8 @@ find "$TOP_DIR" -type f -o -type l|sed -
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
s:^\([^%].*\)::

View File

@ -1,8 +1,8 @@
Convert output to the current locale. Assumes utf8 input if the
decoding works, otherwise iso-8859-1.
--- ./lib/tagexts.c.orig 2016-10-21 09:44:00.309962086 +0000
+++ ./lib/tagexts.c 2017-01-19 10:27:57.243832208 +0000
--- ./lib/tagexts.c.orig 2021-06-21 12:00:44.615612184 +0000
+++ ./lib/tagexts.c 2021-09-23 18:58:58.461872258 +0000
@@ -2,6 +2,7 @@
* \file lib/formats.c
*/
@ -167,7 +167,7 @@ decoding works, otherwise iso-8859-1.
+/**
* Retrieve summary text.
* @param h header
* @retval td tag data container
* @param[out] td tag data container
@@ -634,6 +774,16 @@ static int descriptionTag(Header h, rpmt
return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags);
}

View File

@ -1,6 +1,6 @@
--- ./macros.in.orig 2020-09-30 12:42:09.146057387 +0000
+++ ./macros.in 2020-09-30 12:45:30.517611707 +0000
@@ -168,6 +168,7 @@
--- ./macros.in.orig 2021-09-23 19:13:54.532045005 +0000
+++ ./macros.in 2021-09-23 19:13:59.592034687 +0000
@@ -170,6 +170,7 @@
%{?_unique_debug_names:--unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}"} \\\
%{?_unique_debug_srcs:--unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}"} \\\
%{?_find_debuginfo_dwz_opts} \\\
@ -8,7 +8,7 @@
%{?_find_debuginfo_opts} \\\
%{?_debugsource_packages:-S debugsourcefiles.list} \\\
"%{_builddir}/%{?buildsubdir}"\
@@ -217,7 +217,8 @@ package or when debugging this package.\
@@ -209,7 +210,8 @@ package or when debugging this package.\
%endif\
%{nil}
@ -18,7 +18,7 @@
%_defaultlicensedir %{_datadir}/licenses
# Following macros for filtering auto deps must not be used in spec files.
@@ -280,7 +281,8 @@ package or when debugging this package.\
@@ -269,7 +271,8 @@ package or when debugging this package.\
%_tmppath %{_var}/tmp
# Path to top of build area.
@ -26,9 +26,9 @@
+%_topdir %{expand:%%global _topdir %{lua:if posix.access(rpm.expand("%{_usrsrc}/packages"), "w") then print "%{_usrsrc}/packages" else print "%{getenv:HOME}/rpmbuild" end} \
+}%_topdir
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
@@ -392,7 +394,7 @@ package or when debugging this package.\
#==============================================================================
# ---- Optional rpmrc macros.
@@ -371,7 +374,7 @@ package or when debugging this package.\
# "w.ufdio" uncompressed
#
#%_source_payload w9.gzdio
@ -37,7 +37,7 @@
# Algorithm to use for generating file checksum digests on build.
# If not specified or 0, MD5 is used.
@@ -499,6 +501,19 @@ package or when debugging this package.\
@@ -481,6 +484,19 @@ package or when debugging this package.\
#
#%_include_minidebuginfo 1
@ -57,7 +57,7 @@
#
# Include a .gdb_index section in the .debug files.
# Requires _enable_debug_packages and gdb-add-index installed.
@@ -531,7 +546,7 @@ package or when debugging this package.\
@@ -513,7 +529,7 @@ package or when debugging this package.\
# Same as for "separate" but if the __debug_package global is set then
# the -debuginfo package will have a compatibility link for the main
# ELF /usr/lib/debug/.build-id/xx/yyy -> /usr/lib/.build-id/xx/yyy
@ -66,7 +66,7 @@
# Whether build-ids should be made unique between package version/releases
# when generating debuginfo packages. If set to 1 this will pass
@@ -560,10 +575,10 @@ package or when debugging this package.\
@@ -542,10 +558,10 @@ package or when debugging this package.\
%_unique_debug_srcs 1
# Whether rpm should put debug source files into its own subpackage
@ -79,7 +79,7 @@
#
# Use internal dependency generator rather than external helpers?
@@ -576,6 +591,10 @@ package or when debugging this package.\
@@ -554,6 +570,10 @@ package or when debugging this package.\
# Directories whose contents should be considered as documentation.
%__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{_datadir}/gnome/help:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man
@ -90,7 +90,7 @@
#
# Path to scripts to autogenerate package dependencies,
#
@@ -586,6 +605,7 @@ package or when debugging this package.\
@@ -564,6 +584,7 @@ package or when debugging this package.\
%__find_requires %{_rpmconfigdir}/find-requires
#%__find_conflicts ???
#%__find_obsoletes ???
@ -98,20 +98,7 @@
#
# Path to file attribute classifications for automatic dependency
@@ -665,10 +685,10 @@ package or when debugging this package.\
# Misc BDB tuning options
%__dbi_other mp_mmapsize=128Mb mp_size=1Mb
-%_dbi_config %{?__dbi_other}
+%_dbi_config %{?__dbi_other} nofsync
# "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd".
-%_dbi_config_Packages %{?_dbi_config} lockdbfd
+%_dbi_config_Packages %{?__dbi_other} lockdbfd
#==============================================================================
# ---- GPG/PGP/PGP5 signature macros.
@@ -1011,7 +1031,7 @@ package or when debugging this package.\
@@ -948,7 +969,7 @@ package or when debugging this package.\
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host @host@
@ -120,7 +107,7 @@
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
@@ -1130,11 +1150,13 @@ package or when debugging this package.\
@@ -1067,11 +1088,13 @@ package or when debugging this package.\
#------------------------------------------------------------------------------
# arch macro for all supported 32-bit ARM processors

View File

@ -1,39 +0,0 @@
--- ./lib/backend/ndb/glue.c.orig 2021-01-05 15:36:03.097744355 +0000
+++ ./lib/backend/ndb/glue.c 2021-01-07 10:28:58.656228804 +0000
@@ -311,12 +311,13 @@ static void setdata(dbiCursor dbc, unsi
static rpmRC ndb_pkgdbPut(dbiIndex dbi, dbiCursor dbc, unsigned int *hdrNum, unsigned char *hdrBlob, unsigned int hdrLen)
{
+ struct ndbEnv_s *ndbenv = dbc->dbi->dbi_rpmdb->db_dbenv;
unsigned int hnum = *hdrNum;
int rc = RPMRC_OK;
if (hnum == 0) {
rc = rpmpkgNextPkgIdx(dbc->dbi->dbi_db, &hnum);
- if (!rc)
+ if (!rc && ndbenv->hdrNum == hnum)
setdata(dbc, hnum, 0, 0);
}
@@ -325,7 +326,8 @@ static rpmRC ndb_pkgdbPut(dbiIndex dbi,
if (!rc) {
dbc->hdrNum = hnum;
- setdata(dbc, hnum, 0, 0);
+ if (ndbenv->hdrNum == hnum)
+ setdata(dbc, hnum, 0, 0);
*hdrNum = hnum;
}
return rc;
@@ -333,8 +335,10 @@ static rpmRC ndb_pkgdbPut(dbiIndex dbi,
static rpmRC ndb_pkgdbDel(dbiIndex dbi, dbiCursor dbc, unsigned int hdrNum)
{
+ struct ndbEnv_s *ndbenv = dbc->dbi->dbi_rpmdb->db_dbenv;
dbc->hdrNum = 0;
- setdata(dbc, 0, 0, 0);
+ if (ndbenv->hdrNum == hdrNum)
+ setdata(dbc, 0, 0, 0);
return rpmpkgDel(dbc->dbi->dbi_db, hdrNum);
}

16
python-rpm-packaging.diff Normal file
View File

@ -0,0 +1,16 @@
--- ./fileattrs/pythondist.attr.orig 2021-09-23 20:14:04.880605674 +0000
+++ ./fileattrs/pythondist.attr 2021-09-23 20:15:23.392446317 +0000
@@ -1,3 +1,4 @@
%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
-%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
+#disabled for now
+#%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
%__pythondist_path /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
--- ./scripts/pythondistdeps.py.orig 2021-09-23 20:14:26.496561795 +0000
+++ ./scripts/pythondistdeps.py 2021-09-23 20:14:30.748553177 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2010 Per Øyvind Karlsen <proyvind@moondrake.org>

View File

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 23 20:57:45 CEST 2021 - mls@suse.de
- update to rpm-4.17.0
-------------------------------------------------------------------
Tue Mar 30 11:15:44 CEST 2021 - 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.16.1.3
Version: 4.17.0
Release: 0
Summary: Python Bindings for Manipulating RPM Packages
License: GPL-2.0-or-later

View File

@ -1,8 +0,0 @@
--- ./scripts/pythondistdeps.py.orig 2019-06-26 10:17:31.454985631 -0400
+++ ./scripts/pythondistdeps.py 2019-10-31 16:30:37.685850605 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2010 Per Øyvind Karlsen <proyvind@moondrake.org>

View File

@ -3,14 +3,14 @@ Subject: remove references to removed brp scripts
Some brp-scripts are not used in openSUSE, remove references
to it
--- ./platform.in.orig 2018-10-16 09:22:16.004374524 +0000
+++ ./platform.in 2018-10-16 09:24:58.891939175 +0000
@@ -80,8 +80,6 @@
%__os_install_post \
--- ./platform.in.orig 2021-09-23 19:23:57.822814696 +0000
+++ ./platform.in 2021-09-23 19:24:31.534745951 +0000
@@ -96,8 +96,6 @@
%{?__brp_compress} \
%{?__brp_elfperms} \
%{?__brp_strip} \
- %{?__brp_strip_static_archive} \
- %{?__brp_strip_comment_note} \
%{?__brp_remove_la_files} \
%{nil}
%__spec_install_post\

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:513dc7f972b6e7ccfc9fc7f9c01d5310cc56ee853892e4314fa2cad71478e21d
size 4354652

3
rpm-4.17.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e0d220b24749b17810ed181ac1ed005a56bbb6bc8ac429c21f314068dc65e6a
size 4514138

View File

@ -1,3 +1,49 @@
-------------------------------------------------------------------
Thu Sep 23 20:57:45 CEST 2021 - mls@suse.de
- update to rpm-4.17.0
- dropped support for berkeley db
- archive unpacking failures no longer leave garbage
- unified built-in and user-define macro syntax and calling conventions
- python generators and debuginfo extraction has been split into a
separate upstream project
- support for ed25519 signatures
- easier rpm macro access in lua
- new patches:
* python-rpm-packaging.diff
* singlefilemode.diff
* verbosearg.diff
- modified patches:
* usr-lib-sysimage-rpm.patch
* localetag.diff
* brp.diff
* findlang.diff
* macrosin.diff
* rpmqpack.diff
* build.diff
* whatrequires-doc.diff
* remove-brp-strips.diff
* fileattrs.diff
* langnoc.diff
* find-lang-qt-qm.patch
* findsupplements.diff
* finddebuginfo.diff
* finddebuginfo-absolute-links.diff
* debugsubpkg.diff
* debuglink.diff
* debuginfo-mono.patch
- dropped patches:
* db.diff
* dbfsync.diff
* dbprivate.diff
* dwarf5.diff
* ndbglue.diff
* pythondistdeps.diff
* suspendlock.diff
* taggedfileindex.diff
* waitlock.diff
* add-dwz-single-file-mode-option.patch
-------------------------------------------------------------------
Wed May 12 13:28:38 UTC 2021 - Andreas Schwab <schwab@suse.de>

116
rpm.spec
View File

@ -20,7 +20,6 @@
%{?!_fillupdir:%define _fillupdir /var/adm/fillup-templates}
%global librpmsover 9
%global without_bdb 1
Name: rpm
BuildRequires: binutils
@ -59,54 +58,44 @@ Requires: /usr/bin/awk
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
Version: 4.16.1.3
Version: 4.17.0
Release: 0
URL: https://rpm.org/
#Git-Clone: https://github.com/rpm-software-management/rpm
Source: http://ftp.rpm.org/releases/rpm-4.16.x/rpm-%{version}.tar.bz2
Source: http://ftp.rpm.org/releases/rpm-4.17.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: https://sourceware.org/ftp/debugedit/5.0/debugedit-5.0.tar.xz
Source3: python-rpm-packaging.tar.bz2
Source5: rpmsort
Source8: rpmconfigcheck
Source9: sysconfig.services-rpm
Source11: db-4.8.30.tar.bz2
Source12: baselibs.conf
Source13: rpmconfigcheck.service
Patch2: db.diff
Patch5: usr-lib-sysimage-rpm.patch
# quilt patches start here
Patch5: usr-lib-sysimage-rpm.patch
Patch13: ignore-auxv.diff
Patch12: localetag.diff
Patch15: dbfsync.diff
Patch16: dbrointerruptable.diff
Patch18: refreshtestarch.diff
Patch20: waitlock.diff
Patch21: suspendlock.diff
Patch24: brp.diff
Patch25: brpcompress.diff
Patch26: checkfilesnoinfodir.diff
Patch27: finddebuginfo.diff
Patch29: findlang.diff
Patch30: macrosin.diff
Patch32: platformin.diff
Patch33: rpmpopt.diff
Patch34: rpmrc.diff
Patch35: taggedfileindex.diff
Patch36: rpmqpack.diff
Patch38: build.diff
Patch43: rpm-shorten-changelog.diff
Patch45: whatrequires-doc.diff
Patch46: remove-brp-strips.diff
Patch47: requires-ge-macro.diff
Patch49: finddebuginfo-absolute-links.diff
Patch51: specfilemacro.diff
Patch55: debugsubpkg.diff
Patch56: debuglink.diff
Patch57: debuginfo-mono.patch
Patch60: safeugid.diff
Patch61: noprereqdeprec.diff
Patch66: remove-translations.diff
Patch67: headeradddb.diff
Patch68: dbprivate.diff
Patch69: nobuildcolor.diff
Patch70: fileattrs.diff
Patch71: nomagiccheck.diff
@ -121,14 +110,18 @@ Patch99: enable-postin-scripts-error.diff
Patch100: rpm-findlang-inject-metainfo.patch
Patch102: emptymanifest.diff
Patch103: find-lang-qt-qm.patch
Patch109: pythondistdeps.diff
Patch117: findsupplements.diff
Patch122: db_conversion.diff
Patch123: nextiteratorheaderblob.diff
Patch129: ndbglue.diff
Patch130: dwarf5.diff
Patch131: posttrans.diff
Patch132: add-dwz-single-file-mode-option.patch
Patch132: verbosearg.diff
Patch200: finddebuginfo.diff
Patch201: finddebuginfo-absolute-links.diff
Patch202: debugsubpkg.diff
Patch203: debuglink.diff
Patch204: debuginfo-mono.patch
Patch205: singlefilemode.diff
Patch300: python-rpm-packaging.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -233,37 +226,38 @@ Provides and requires generator for .pl files and modules.
%prep
%setup -q -n rpm-%{version}
tar -xjf %{SOURCE1}
tar -xJf %{SOURCE2}
tar -xjf %{SOURCE3}
rm -rf sqlite
%if 0%{?!without_bdb:1}
tar xjf %{SOURCE11}
ln -s db-4.8.30 db
cd db
%patch2 -p1
cd ..
chmod -R u+w db/*
rm -f rpmdb/db.h
cp build-aux/config.guess build-aux/config.sub db/dist/
%endif
%patch5 -p1
%patch -P 12 -P 13 -P 15 -P 16 -P 18
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 29
%patch -P 30 -P 32 -P 33 -P 34 -P 35 -P 36 -P 38
%patch -P 43 -P 45 -P 46 -P 47 -P 49
%patch -P 51 -P 55 -P 56 -P 57
%patch -P 60 -P 61 -P 66 -P 67 -P 68 -P 69
%patch -P 5 -P 12 -P 13 -P 16 -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 45 -P 46 -P 47
%patch -P 51
%patch -P 60 -P 61 -P 66 -P 67 -P 69
%patch -P 70 -P 71 -P 73 -P 75 -P 77 -P 78
%patch -P 85
%patch -P 93 -P 94 -P 99
%patch -P 100 -P 102 -P 103
%patch -P 109 -P 117
%patch -P 122 -P 123 -P 129 -P 130 -P 131
%patch132 -p1
%patch -P 117
%patch -P 122 -P 123 -P 131 -P 132
# debugedit patches
pushd debugedit-5.0
%patch -P 200 -P 201 -P 202 -P 203 -P 204 -P 205
popd
# python-rpm-packaging patches
pushd python-rpm-packaging
%patch -P 300
popd
%ifarch aarch64 ppc64le riscv64
%patch6464
%endif
tar -xjvf %{SOURCE1}
rm -f m4/libtool.m4
rm -f m4/lt*.m4
@ -279,6 +273,7 @@ BUILDTARGET="--build=%{_target_cpu}-suse-linux-gnueabi"
%else
BUILDTARGET="--build=%{_target_cpu}-suse-linux"
%endif
export __FIND_DEBUGINFO=/usr/lib/rpm/find-debuginfo
autoreconf -fi
./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
@ -295,13 +290,21 @@ autoreconf -fi
--enable-ndb \
--enable-bdb-ro \
--enable-zstd \
%{?without_bdb: --enable-bdb=no} \
--enable-sqlite=no \
%{?with_python: --enable-python} \
$BUILDTARGET
rm po/de.gmo
make %{?_smp_mflags}
%if "%{NAME}" != "python-rpm"
pushd debugedit-5.0
./configure --bindir=/usr/lib/rpm
touch find-debuginfo.1
make
popd
%endif
%install
mkdir -p %{buildroot}/usr/lib
mkdir -p %{buildroot}/usr/share/locale
@ -311,9 +314,6 @@ mkdir -p %{buildroot}/bin
%if !0%{?usrmerged}
ln -s /usr/bin/rpm %{buildroot}/bin/rpm
%endif
%if 0%{?!without_bdb:1}
install -m 644 db3/db.h %{buildroot}/usr/include/rpm
%endif
# remove .la file and the static variant of libpopt
# have to remove the dependency from other .la files as well
for f in %{buildroot}/%{_libdir}/*.la; do
@ -341,8 +341,6 @@ export RPM_BUILD_ROOT
%ifarch s390x
[ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux
%endif
chmod 755 doc/manual
rm -rf doc/manual/Makefile*
rm -f %{buildroot}/usr/lib/rpmpopt
rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk}
rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo
@ -383,11 +381,20 @@ sh %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm
# so we need to enforce the platform here.
echo -n "%{_target_cpu}-suse-linux-gnueabi" > %{buildroot}/etc/rpm/platform
%endif
%if 0%{?without_bdb:1}
# make ndb the default database backend
echo "setting the default database backend to 'ndb'"
sed -i -e '/_db_backend/s/bdb/ndb/' %{buildroot}/usr/lib/rpm/macros
%endif
sed -i -e '/_db_backend/s/sqlite/ndb/' %{buildroot}/usr/lib/rpm/macros
# install debugedit files
pushd debugedit-5.0
make install-exec DESTDIR="%{buildroot}"
popd
# install python-rpm-packaging files
cp -a python-rpm-packaging/fileattrs/*.attr %{buildroot}/usr/lib/rpm/fileattrs
cp -a python-rpm-packaging/scripts/* %{buildroot}/usr/lib/rpm
chmod 755 %{buildroot}/usr/lib/rpm/brp-python-bytecompile
%post
%{fillup_only -an services}
@ -428,7 +435,7 @@ fi
%files -f rpm.lang
%defattr(-,root,root)
%license COPYING
%doc doc/manual
%doc docs/manual
%doc RPM-HOWTO
/etc/rpm
%if !0%{?usrmerged}
@ -481,7 +488,6 @@ fi
%files build
%defattr(-,root,root)
/usr/bin/rpmbuild
/usr/lib/rpm/libtooldeps.sh
/usr/lib/rpm/pkgconfigdeps.sh
/usr/lib/rpm/ocamldeps.sh
/usr/lib/rpm/elfdeps
@ -490,9 +496,12 @@ fi
/usr/lib/rpm/sepdebugcrcfix
/usr/bin/rpmspec
/usr/lib/rpm/brp-*
%exclude /usr/lib/rpm/brp-python-hardlink
%exclude /usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/check-*
/usr/lib/rpm/*find*
/usr/lib/rpm/fileattrs/
%exclude /usr/lib/rpm/fileattrs/python.attr
%exclude /usr/lib/rpm/fileattrs/pythondist.attr
%exclude /usr/lib/rpm/fileattrs/perl*.attr
/usr/lib/rpm/*.prov
@ -506,8 +515,11 @@ fi
%files build-python
%defattr(-,root,root)
/usr/lib/rpm/fileattrs/python.attr
/usr/lib/rpm/fileattrs/pythondist.attr
/usr/lib/rpm/pythondistdeps.py
/usr/lib/rpm/brp-python-hardlink
/usr/lib/rpm/brp-python-bytecompile
%files build-perl
%defattr(-,root,root)

View File

@ -1,6 +1,6 @@
--- ./Makefile.am.orig 2020-09-30 12:47:19.181371209 +0000
+++ ./Makefile.am 2020-09-30 12:47:25.797356566 +0000
@@ -198,6 +198,10 @@ rpmgraph_LDADD = lib/librpm.la rpmio/lib
--- ./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
dist_bin_SCRIPTS = scripts/gendiff
@ -11,19 +11,19 @@
rpmconfig_DATA = rpmrc
rpmrc: $(top_srcdir)/rpmrc.in
@$(SED) \
--- ./doc/Makefile.am.orig 2020-09-30 12:47:25.797356566 +0000
+++ ./doc/Makefile.am 2020-09-30 12:48:22.709230608 +0000
@@ -8,7 +8,7 @@ EXTRA_DIST += $(man_man1_DATA)
--- ./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
@@ -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
EXTRA_DIST += $(man_man8_DATA)
--- ./doc/rpmqpack.8.orig 2020-09-30 12:47:25.797356566 +0000
+++ ./doc/rpmqpack.8 2020-09-30 12:47:25.797356566 +0000
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
@@ -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 2020-09-30 12:47:25.797356566 +0000
+++ ./rpmqpack.c 2020-09-30 12:47:25.797356566 +0000
--- ./rpmqpack.c.orig 2021-09-23 19:17:54.619555392 +0000
+++ ./rpmqpack.c 2021-09-23 19:17:54.619555392 +0000
@@ -0,0 +1,60 @@
+#include <sys/types.h>
+#include <limits.h>

10
singlefilemode.diff Normal file
View File

@ -0,0 +1,10 @@
--- ./scripts/find-debuginfo.in.orig 2021-09-24 09:10:06.477724685 +0000
+++ ./scripts/find-debuginfo.in 2021-09-24 09:10:26.557680705 +0000
@@ -168,7 +168,6 @@ while [ $# -gt 0 ]; do
;;
--dwz-single-file-mode)
dwz_single_file_mode=true
- shift
;;
--build-id-seed)
build_id_seed=$2

View File

@ -1,117 +0,0 @@
Suspend exclusive database lock when scriptlets get called, allowing
read access in scriptlets. Only needed for DB_PRIVATE (aka global)
locking.
--- ./lib/backend/db3.c.orig 2020-09-30 12:25:06.516375109 +0000
+++ ./lib/backend/db3.c 2020-09-30 12:25:10.312366497 +0000
@@ -549,6 +549,46 @@ static void db3_dbSetFSync(rpmdb rdb, in
static int db3_Ctrl(rpmdb rdb, dbCtrlOp ctrl)
{
+ struct flock l;
+ int tries;
+ int fdno = -1;
+ dbiIndex dbi;
+ DB * db;
+
+ switch (ctrl) {
+ case DB_CTRL_SUSPEND_DBLOCK:
+ case DB_CTRL_RESUME_DBLOCK:
+ dbi = rdb->db_pkgs; /* packages db only */
+ if (!dbi)
+ return 1;
+ if (!dbi->cfg.dbi_lockdbfd || (dbi->dbi_flags & DBI_VERIFYONLY) != 0)
+ return 0;
+ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY)))
+ return 0;
+ if (_lockdbfd == 0)
+ return 0;
+ db = dbi->dbi_db;
+ if (!(db->fd(db, &fdno) == 0 && fdno >= 0))
+ return 1;
+ for (tries = 0; tries < 2; tries++) {
+ memset(&l, 0, sizeof(l));
+ l.l_whence = 0;
+ l.l_start = 0;
+ l.l_len = 0;
+ l.l_type = ctrl == DB_CTRL_SUSPEND_DBLOCK ? F_RDLCK : F_WRLCK;
+ if (!fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *)&l))
+ return 0;
+ if (ctrl == DB_CTRL_SUSPEND_DBLOCK) {
+ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n"));
+ return 1;
+ }
+ if (tries == 0)
+ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n"));
+ }
+ return 1;
+ default:
+ break;
+ }
return 0;
}
--- ./lib/backend/dbi.h.orig 2020-09-30 12:25:06.516375109 +0000
+++ ./lib/backend/dbi.h 2020-09-30 12:25:10.312366497 +0000
@@ -18,7 +18,9 @@ typedef enum dbCtrlOp_e {
DB_CTRL_UNLOCK_RO = 2,
DB_CTRL_LOCK_RW = 3,
DB_CTRL_UNLOCK_RW = 4,
- DB_CTRL_INDEXSYNC = 5
+ DB_CTRL_INDEXSYNC = 5,
+ DB_CTRL_SUSPEND_DBLOCK = 100,
+ DB_CTRL_RESUME_DBLOCK = 101
} dbCtrlOp;
typedef struct dbiIndex_s * dbiIndex;
--- ./lib/rpmdb.c.orig 2020-09-30 12:25:06.516375109 +0000
+++ ./lib/rpmdb.c 2020-09-30 12:25:10.312366497 +0000
@@ -2637,6 +2637,12 @@ int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl
case RPMDB_CTRL_INDEXSYNC:
dbctrl = DB_CTRL_INDEXSYNC;
break;
+ case RPMDB_CTRL_SUSPEND_DBLOCK:
+ dbctrl = DB_CTRL_SUSPEND_DBLOCK;
+ break;
+ case RPMDB_CTRL_RESUME_DBLOCK:
+ dbctrl = DB_CTRL_RESUME_DBLOCK;
+ break;
}
return dbctrl ? dbCtrl(db, dbctrl) : 1;
}
--- ./lib/rpmdb.h.orig 2020-05-28 10:04:25.037136686 +0000
+++ ./lib/rpmdb.h 2020-09-30 12:25:10.312366497 +0000
@@ -36,7 +36,9 @@ typedef enum rpmdbCtrlOp_e {
RPMDB_CTRL_UNLOCK_RO = 2,
RPMDB_CTRL_LOCK_RW = 3,
RPMDB_CTRL_UNLOCK_RW = 4,
- RPMDB_CTRL_INDEXSYNC = 5
+ RPMDB_CTRL_INDEXSYNC = 5,
+ RPMDB_CTRL_SUSPEND_DBLOCK = 100,
+ RPMDB_CTRL_RESUME_DBLOCK = 101
} rpmdbCtrlOp;
/** \ingroup rpmdb
--- ./lib/transaction.c.orig 2020-09-30 07:48:01.215567727 +0000
+++ ./lib/transaction.c 2020-09-30 12:25:10.312366497 +0000
@@ -1692,6 +1692,7 @@ rpmRC runScript(rpmts ts, rpmte te, Head
rpmTagVal stag = rpmScriptTag(script);
FD_t sfd = NULL;
int warn_only = !(rpmScriptFlags(script) & RPMSCRIPT_FLAG_CRITICAL);
+ rpmdb rdb = rpmtsGetRdb(ts);
if (rpmChrootIn())
return RPMRC_FAIL;
@@ -1706,10 +1707,12 @@ rpmRC runScript(rpmts ts, rpmte te, Head
if (sfd == NULL)
sfd = rpmtsScriptFd(ts);
+ rpmdbCtrl(rdb, RPMDB_CTRL_SUSPEND_DBLOCK);
rpmswEnter(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), 0);
rc = rpmScriptRun(script, arg1, arg2, sfd,
prefixes, rpmtsPlugins(ts));
rpmswExit(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), 0);
+ rpmdbCtrl(rdb, RPMDB_CTRL_RESUME_DBLOCK);
/* Map warn-only errors to "notfound" for script stop callback */
stoprc = (rc != RPMRC_OK && warn_only) ? RPMRC_NOTFOUND : rc;

View File

@ -1,15 +0,0 @@
This used to be the taggedfileindex patch, but it's gone.
The remaining part just strips off the tag.
--- ./lib/backend/db3.c.orig 2017-01-19 12:54:16.141112342 +0000
+++ ./lib/backend/db3.c 2017-01-19 12:55:14.587945851 +0000
@@ -1024,6 +1024,9 @@ static int dbt2set(dbiIndex dbi, DBT * d
_DBSWAP(hdrNum);
_DBSWAP(tagNum);
}
+ /* remove tagged directory info */
+ if (tagNum.ui & 0x80000000)
+ tagNum.ui &= 0x0000ffff;
set->recs[i].hdrNum = hdrNum.ui;
set->recs[i].tagNum = tagNum.ui;
}

View File

@ -1,7 +1,7 @@
--- rpm-4.13.0.1/macros.in.orig 2017-10-04 17:05:17.198681581 +0200
+++ rpm-4.13.0.1/macros.in 2017-10-04 17:07:37.122679969 +0200
@@ -165,7 +165,7 @@
%_bzip2bin %{__bzip2}
--- ./macros.in.orig 2021-08-20 08:44:56.264259007 +0000
+++ ./macros.in 2021-09-23 18:57:26.654059458 +0000
@@ -140,7 +140,7 @@
%_buildshell /bin/sh
# The location of the rpm database file(s).
-%_dbpath %{_var}/lib/rpm

32
verbosearg.diff Normal file
View File

@ -0,0 +1,32 @@
--- ./rpmio/macro.c.orig
+++ ./rpmio/macro.c
@@ -1141,7 +1141,10 @@ static size_t doExpand(MacroBuf mb, rpmMacroEntry me, ARGV_t argv)
static size_t doVerbose(MacroBuf mb, rpmMacroEntry me, ARGV_t argv)
{
- mbAppend(mb, rpmIsVerbose() ? '1' : '0');
+ if (argv[1] != NULL)
+ mbAppendStr(mb, rpmIsVerbose() ? argv[1] : "");
+ else
+ mbAppend(mb, rpmIsVerbose() ? '1' : '0');
return 0;
}
@@ -1282,7 +1285,7 @@ static struct builtins_s {
{ "uncompress", doUncompress, 1, ME_FUNC },
{ "undefine", doUndefine, 1, ME_FUNC },
{ "url2path", doFoo, 1, ME_FUNC },
- { "verbose", doVerbose, 0, ME_FUNC },
+ { "verbose", doVerbose, -1, ME_FUNC },
{ "warn", doOutput, 1, ME_FUNC },
{ NULL, NULL, 0 }
};
@@ -1347,7 +1350,7 @@ doExpandThisMacro(MacroBuf mb, rpmMacroEntry me, ARGV_t args, size_t *parsed)
int nargs = argvCount(args) - 1;
int needarg = (me->nargs != 0);
int havearg = (nargs > 0);
- if (needarg != havearg) {
+ if (((me->flags & ME_PARSE) || me->nargs >= 0) && needarg != havearg) {
mbErr(mb, 1, "%%%s: %s\n", me->name, needarg ?
_("argument expected") : _("unexpected argument"));
goto exit;

View File

@ -1,111 +0,0 @@
Fix global (DB_PRIVATE) lock code: fix recursion counter, retry
failed lock operations for up to 3 minutes.
--- ./lib/backend/db3.c.orig 2017-01-19 14:59:01.432807649 +0000
+++ ./lib/backend/db3.c 2017-01-19 15:13:18.034716068 +0000
@@ -33,6 +33,8 @@ struct dbiCursor_s {
static struct dbiConfig_s staticdbicfg;
static struct dbConfig_s staticcfg;
+static int _lockdbfd = 0;
+
/** \ingroup dbi
*/
static const struct poptOption rdbOptions[] = {
@@ -744,6 +746,8 @@ static int db3_dbiClose(dbiIndex dbi, un
rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n",
dbhome, dbi->dbi_file);
+ if (dbi->cfg.dbi_lockdbfd && !(dbi->dbi_flags & DBI_VERIFYONLY) && _lockdbfd)
+ _lockdbfd--;
}
db_fini(rdb, dbhome ? dbhome : "");
@@ -783,6 +787,7 @@ static int dbiFlock(dbiIndex dbi, int mo
rc = 1;
} else {
const char *dbhome = rpmdbHome(dbi->dbi_rpmdb);
+ int tries;
struct flock l;
memset(&l, 0, sizeof(l));
l.l_whence = 0;
@@ -792,20 +797,38 @@ static int dbiFlock(dbiIndex dbi, int mo
? F_RDLCK : F_WRLCK;
l.l_pid = 0;
- rc = fcntl(fdno, F_SETLK, (void *) &l);
- if (rc) {
- uint32_t eflags = db_envflags(db);
- /* Warning iff using non-private CDB locking. */
- rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1);
- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING),
- _("cannot get %s lock on %s/%s\n"),
- ((mode & O_ACCMODE) == O_RDONLY)
- ? _("shared") : _("exclusive"),
- dbhome, dbi->dbi_file);
- } else {
- rpmlog(RPMLOG_DEBUG,
- "locked db index %s/%s\n",
- dbhome, dbi->dbi_file);
+ for (tries = 0; ; tries++) {
+ rc = fcntl(fdno, F_SETLK, (void *) &l);
+ if (rc) {
+ uint32_t eflags = db_envflags(db);
+ /* Warning iff using non-private CDB locking. */
+ rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1);
+ if (errno == EAGAIN && rc) {
+ struct timespec ts;
+ if (tries == 0)
+ rpmlog(RPMLOG_WARNING,
+ _("waiting for %s lock on %s/%s\n"),
+ ((mode & O_ACCMODE) == O_RDONLY)
+ ? _("shared") : _("exclusive"),
+ dbhome, dbi->dbi_file);
+ ts.tv_sec = (time_t)0;
+ ts.tv_nsec = 100000000; /* .1 seconds */
+ if (tries < 10*60*3) { /* 3 minutes */
+ nanosleep(&ts, (struct timespec *)0);
+ continue;
+ }
+ }
+ rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING),
+ _("cannot get %s lock on %s/%s\n"),
+ ((mode & O_ACCMODE) == O_RDONLY)
+ ? _("shared") : _("exclusive"),
+ dbhome, dbi->dbi_file);
+ } else {
+ rpmlog(RPMLOG_DEBUG,
+ "locked db index %s/%s\n",
+ dbhome, dbi->dbi_file);
+ }
+ break;
}
}
return rc;
@@ -822,7 +845,6 @@ static int db3_dbiOpen(rpmdb rdb, rpmDbi
DB * db = NULL;
DBTYPE dbtype = DB_UNKNOWN;
uint32_t oflags;
- static int _lockdbfd = 0;
if (dbip)
*dbip = NULL;
@@ -902,6 +924,8 @@ static int db3_dbiOpen(rpmdb rdb, rpmDbi
dbi->dbi_flags |= DBI_CREATED;
if (oflags & DB_RDONLY)
dbi->dbi_flags |= DBI_RDONLY;
+ if (verifyonly)
+ dbi->dbi_flags |= DBI_VERIFYONLY;
if (!verifyonly && rc == 0 && dbi->cfg.dbi_lockdbfd && _lockdbfd++ == 0) {
rc = dbiFlock(dbi, rdb->db_mode);
--- ./lib/backend/dbi.h.orig 2017-01-19 15:12:26.833899257 +0000
+++ ./lib/backend/dbi.h 2017-01-19 15:05:43.958347554 +0000
@@ -83,6 +83,7 @@ enum dbiFlags_e {
DBI_NONE = 0,
DBI_CREATED = (1 << 0),
DBI_RDONLY = (1 << 1),
+ DBI_VERIFYONLY = (1 << 2),
};
enum dbcFlags_e {

View File

@ -1,14 +1,14 @@
--- ./doc/rpm.8.orig 2018-08-21 10:38:02.035078442 +0000
+++ ./doc/rpm.8 2018-10-16 09:21:26.948505637 +0000
@@ -632,6 +632,11 @@ Query all packages that provide the \fIC
.TP
\fB--whatrequires \fICAPABILITY\fB\fR
Query all packages that require \fICAPABILITY\fR for proper functioning.
--- ./docs/man/rpm.8.orig 2021-09-23 19:20:46.991203867 +0000
+++ ./docs/man/rpm.8 2021-09-23 19:22:45.918961340 +0000
@@ -601,6 +601,11 @@ Query all packages that provide the \f[I
\f[B]--whatrequires \f[R]\f[I]CAPABILITY\f[R]
Query all packages that require \f[I]CAPABILITY\f[R] for proper
functioning.
+.br
+Note that this does not return what requires a given package.
+A package usually provides multiple capabilities and file-names on which
+other packages may depend. To see the complete dependencies
+for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR
+for a package, use \f[B]-e --test \f[R]\f[I]PACKAGE_NAME\f[R]
.TP
\fB--whatconflicts \fICAPABILITY\fB\fR
Query all packages that conflict with \fICAPABILITY\fR.
\f[B]--whatconflicts \f[R]\f[I]CAPABILITY\f[R]
Query all packages that conflict with \f[I]CAPABILITY\f[R].