added upstream patch to disable unshare plugin in chroot environment causing scripts to fail [release 4.20.0-3mamba;Wed Jan 01 2025]

This commit is contained in:
Automatic Build System 2025-01-04 10:40:39 +01:00
parent b18a273c67
commit 10c0d64114
8 changed files with 282 additions and 164 deletions

View File

@ -1,11 +0,0 @@
--- rpm-4.19.0/scripts/brp-strip.orig 2023-10-09 17:01:55.435858403 +0200
+++ rpm-4.19.0/scripts/brp-strip 2023-10-09 17:02:22.378013465 +0200
@@ -32,7 +32,7 @@
local nprocs="${2}"
find "$RPM_BUILD_ROOT" -type f \
- ! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \
+ ! -path "${RPM_BUILD_ROOT}/*usr/lib/debug*" \
! -name "*.go" -links "${nlinks}" -print0 | \
xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | \

View File

@ -1,11 +0,0 @@
--- rpm-4.19.0/macros.in.orig 2023-10-09 16:49:43.041643296 +0200
+++ rpm-4.19.0/macros.in 2023-10-09 16:50:04.355765964 +0200
@@ -265,7 +265,7 @@
%_srcrpmdir %{_topdir}/SRPMS
# The directory where buildroots will be created.
-%_buildrootdir %{_topdir}/BUILDROOT
+%_buildrootdir %{_tmppath}
# Build root path, where %install installs the package during build.
%buildroot %{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_arch}

View File

@ -1,13 +0,0 @@
--- rpm-4.19.1.1/macros.in.orig 2024-05-17 18:39:49.394575123 +0200
+++ rpm-4.19.1.1/macros.in 2024-05-17 18:40:07.126608510 +0200
@@ -271,8 +271,8 @@
# Build root path, where %install installs the package during build.
%buildroot %{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_arch}
-# Path for spec file snippets generated during build
-%specpartsdir %{_builddir}/%{buildsubdir}-SPECPARTS
+# Path for spec file snippets generated during build (openmamba: disabled by default)
+#%specpartsdir %{_builddir}/%{buildsubdir}-SPECPARTS
# Directory where temporaray files can be created.
%_tmppath %{_var}/tmp

View File

@ -0,0 +1,11 @@
--- rpm-4.20.0/scripts/brp-strip.orig 2024-10-17 21:53:20.483458113 +0200
+++ rpm-4.20.0/scripts/brp-strip 2024-10-17 21:53:27.115467209 +0200
@@ -33,7 +33,7 @@
local nprocs="${2}"
find "$RPM_BUILD_ROOT" -type f \
- ! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \
+ ! -path "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \
! -name "*.py" ! -name "*.js" ! -name "*.rb" \
! -name "*.go" -links "${nlinks}" -print0 | \
xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \

View File

@ -0,0 +1,72 @@
From 931cb97455b01228c639ae8361e4553679b13d54 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Thu, 1 Aug 2024 13:54:25 +0300
Subject: [PATCH] Disable private mounts in chroot'ed operation in the unshare
plugin
mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL) inside a chroot
fails with EINVAL if the "/" inside the chroot is not an actual
mount point on the system - as it often isn't. For now, just disable
that functionality on chroot operation.
Related: #3187
---
docs/man/rpm-plugin-unshare.8.md | 5 +++++
plugins/unshare.c | 21 ++++++++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/docs/man/rpm-plugin-unshare.8.md b/docs/man/rpm-plugin-unshare.8.md
index d8a4222426..33073b872d 100644
--- a/docs/man/rpm-plugin-unshare.8.md
+++ b/docs/man/rpm-plugin-unshare.8.md
@@ -27,6 +27,11 @@ This plugin implements the following configurables:
execution. Typical examples would be `/tmp` to protect against
insecure temporary file usage inside scriptlets, and `/home` to
prevent scriptlets from accessing user home directories.
+ When path unsharing is enabled, any mounts made from scriptlets
+ are also private to the scriptlet (and vice versa, mount changes
+ on the host are not visible to the scriptlet).
+
+ Private mounts in chroot-operations is unimplemented.
`%__transaction_unshare_nonet`
diff --git a/plugins/unshare.c b/plugins/unshare.c
index bb02201e4a..50f60fad2f 100644
--- a/plugins/unshare.c
+++ b/plugins/unshare.c
@@ -19,8 +19,18 @@ static rpmRC unshare_init(rpmPlugin plugin, rpmts ts)
{
char *paths = rpmExpand("%{?__transaction_unshare_paths}", NULL);
private_mounts = argvSplitString(paths, ":", ARGV_SKIPEMPTY);
- if (private_mounts)
- unshare_flags |= CLONE_NEWNS;
+ if (private_mounts) {
+ /*
+ * Changing mount propagation from inside a chroot fails if the root
+ * is not also a mount point, disable for now.
+ */
+ if (strcmp(rpmtsRootDir(ts), "/")) {
+ rpmlog(RPMLOG_WARNING,
+ "private mounts in chroot not implemented\n");
+ } else {
+ unshare_flags |= CLONE_NEWNS;
+ }
+ }
free(paths);
if (rpmExpandNumeric("%{?__transaction_unshare_nonet}"))
@@ -47,9 +57,10 @@ static rpmRC unshare_scriptlet_fork_post(rpmPlugin plugin,
goto exit;
}
- if (private_mounts) {
- if (mount("/", "/", NULL, MS_REC | MS_PRIVATE, NULL) == -1) {
- rpmlog(RPMLOG_ERR, _("failed to mount private %s: %s\n"),
+ if (unshare_flags & CLONE_NEWNS) {
+ if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL) == -1) {
+ rpmlog(RPMLOG_ERR,
+ _("failed to change mount propagation %s: %s\n"),
"/", strerror(errno));
goto exit;
}

View File

@ -0,0 +1,168 @@
From 234706084d8203a22eb984b1ef3646a15f8a9a1b Mon Sep 17 00:00:00 2001
From: Florian Festi <ffesti@redhat.com>
Date: Mon, 18 Nov 2024 14:16:29 +0100
Subject: [PATCH] Support new u! command in sysusers files
systemd 257 defines a new modifier ! for u entries that locks the
account by setting it as expired.
See https://github.com/systemd/systemd/commit/2ec7977e1b100c1717d95417e6d825fbf939f7b3
Resolves: #3450
---
docs/manual/users_and_groups.md | 8 ++++----
macros.in | 2 +-
scripts/sysusers.sh | 21 ++++++++++++++++-----
tests/data/SPECS/klang.spec | 2 +-
tests/rpmi.at | 8 ++++++--
5 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/docs/manual/users_and_groups.md b/docs/manual/users_and_groups.md
index 3950b594b5..aee103f1c2 100644
--- a/docs/manual/users_and_groups.md
+++ b/docs/manual/users_and_groups.md
@@ -41,10 +41,10 @@ to weaken these into recommends-dependencies by setting
## Limitations
-At this time, rpm only supports the `u`, `g` and (since RPM 4.20) `m`
-directives of sysusers.d format and ignores others. If other
-directives are needed, the package will need to call systemd-sysusers
-with the correct arguments manually.
+At this time, rpm only supports the `u`, `g`, (since RPM 4.20) `m`
+and (since RPM 6.0) the `u!` directives of sysusers.d format and
+ignores others. If other directives are needed, the package will need
+to call systemd-sysusers with the correct arguments manually.
## Technical details
diff --git a/macros.in b/macros.in
index cb07970e13..00c9d07715 100644
--- a/macros.in
+++ b/macros.in
@@ -1367,7 +1367,7 @@ end
name = arg[2]
if arg[1] == 'g' then
type = 'group'
- elseif arg[1] == 'u' then
+ elseif arg[1] == 'u' or arg[1] == 'u!' then
type = 'user'
elseif arg[1] == 'm' and #arg >=3 then
type = 'groupmember'
diff --git a/scripts/sysusers.sh b/scripts/sysusers.sh
index 22ae5f23e6..d945b281bd 100755
--- a/scripts/sysusers.sh
+++ b/scripts/sysusers.sh
@@ -72,6 +72,7 @@ user() {
local group="$4"
local home="$5"
local shell="$6"
+ local expire="$7"
[ "$desc" = '-' ] && desc=
{ [ "$home" = '-' ] || [ "$home" = '' ]; } && home=/
@@ -90,6 +91,10 @@ user() {
fi
fi
fi
+
+ if [[ $expire ]]; then
+ usermod -e 1 "${user}"
+ fi
}
group() {
@@ -109,13 +114,13 @@ addtogroup() {
local group="$2"
group "${group}" "-"
- user "${user}" "-" "" "${group}" "" ""
+ user "${user}" "-" "" "${group}" "" "" ""
usermod -R "$ROOT" -a -G "${group}" "$user" || :
}
parse() {
- local line arr
+ local line arr expire
while read -r line || [ -n "$line" ] ; do
{ [ "${line:0:1}" = '#' ] || [ "${line:0:1}" = ';' ]; } && continue
@@ -123,13 +128,19 @@ parse() {
[ -z "$line" ] && continue
mapfile -t arr < <(xargs -n1 <<<"$line")
+ expire=""
+
case "${arr[0]}" in
- ('u')
+ ('u' | 'u!')
+ if [[ "${arr[0]}" == 'u!' ]]; then
+ expire="1";
+ fi
+
if [[ "${arr[2]}" == *":"* ]]; then
- user "${arr[1]}" "${arr[2]%:*}" "${arr[3]}" "${arr[2]#*:}" "${arr[4]}" "${arr[5]}"
+ user "${arr[1]}" "${arr[2]%:*}" "${arr[3]}" "${arr[2]#*:}" "${arr[4]}" "${arr[5]}" $expire
else
group "${arr[1]}" "${arr[2]}"
- user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
+ user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}" $expire
fi
;;
('g')
diff --git a/tests/data/SPECS/klang.spec b/tests/data/SPECS/klang.spec
index cc35b87bd4..6d71de6ea0 100644
--- a/tests/data/SPECS/klang.spec
+++ b/tests/data/SPECS/klang.spec
@@ -47,7 +47,7 @@ EOF
cat << EOF > ${RPM_BUILD_ROOT}/%{_sysusersdir}/plong.conf
# Real life files have all sorts of anomalies
-u plong - "Plong fu" /var/lib/plong /sbin/nologin
+u! plong - "Plong fu" /var/lib/plong /sbin/nologin
#...such as empty lines
# and comments comments
diff --git a/tests/rpmi.at b/tests/rpmi.at
index 7ea6a75207..6c7b84cdfe 100644
--- a/tests/rpmi.at
+++ b/tests/rpmi.at
@@ -1589,7 +1589,7 @@ group(klong) = ZyBrbG9uZyAt
group(plong)
groupmember(klangd/klong) = bSBrbGFuZ2Qga2xvbmcA
user(klangd) = dSBrbGFuZ2QgLSAiS2xhbmcgc2VydmVyIiAvdmFyL2xpYi9rbGFuZ2QgL3NiaW4vbm9sb2dpbgAA
-user(plong) = dSBwbG9uZyAtICJQbG9uZyBmdSIgL3Zhci9saWIvcGxvbmcgL3NiaW4vbm9sb2dpbgAA
+user(plong) = dSEgcGxvbmcgLSAiUGxvbmcgZnUiIC92YXIvbGliL3Bsb25nIC9zYmluL25vbG9naW4A
],
[warning: ignoring unsupported sysuser type: r
])
@@ -1618,7 +1618,7 @@ group(klong) = ZyBrbG9uZyAt
group(plong)
groupmember(klangd/klong) = bSBrbGFuZ2Qga2xvbmcA
user(klangd) = dSBrbGFuZ2QgLSAiS2xhbmcgc2VydmVyIiAvdmFyL2xpYi9rbGFuZ2QgL3NiaW4vbm9sb2dpbgAA
-user(plong) = dSBwbG9uZyAtICJQbG9uZyBmdSIgL3Zhci9saWIvcGxvbmcgL3NiaW4vbm9sb2dpbgAA
+user(plong) = dSEgcGxvbmcgLSAiUGxvbmcgZnUiIC92YXIvbGliL3Bsb25nIC9zYmluL25vbG9naW4A
],
[warning: ignoring unsupported sysuser type: r
])
@@ -1660,15 +1660,19 @@ runroot rpm -V ${VERIFYOPTS} klang-client klang-common
RPMTEST_CHECK([
runroot rpm -U /build/RPMS/noarch/klang-server-1.0-1.noarch.rpm
runroot_other grep ^klangd /etc/passwd | cut -f1 -d:
+runroot_other chage -l klangd | grep "Account expires" | cut -f2 -d:
runroot_other grep ^klangd /etc/group | cut -f1 -d:
runroot_other grep ^plong /etc/passwd | cut -f1 -d:
+runroot_other chage -l plong | grep "Account expires" | cut -f2 -d:
runroot_other grep ^klong /etc/group | cut -f4 -d:
runroot rpm -V ${VERIFYOPTS} klang-server
],
[0],
[klangd
+ never
klangd
plong
+ Jan 02, 1970
klangd
],
[ignore])

View File

@ -16,8 +16,8 @@
%define majver %(echo %version | cut -d. -f1-2) %define majver %(echo %version | cut -d. -f1-2)
Name: rpm Name: rpm
Epoch: 1 Epoch: 1
Version: 4.19.1.1 Version: 4.20.0
Release: 5mamba Release: 3mamba
Summary: The RPM Package Manager (RPM) is a powerful package management system Summary: The RPM Package Manager (RPM) is a powerful package management system
Group: System/Management Group: System/Management
Vendor: openmamba Vendor: openmamba
@ -25,7 +25,6 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://rpm.org/index.html URL: https://rpm.org/index.html
Source: http://ftp.rpm.org/releases/rpm-%{majver}.x/rpm-%{version}.tar.bz2 Source: http://ftp.rpm.org/releases/rpm-%{majver}.x/rpm-%{version}.tar.bz2
Source2: rpm4-macros_openmamba
Source3: rpmdb-rebuild.service Source3: rpmdb-rebuild.service
Source4: python.attr Source4: python.attr
Source5: pythondist.attr Source5: pythondist.attr
@ -39,15 +38,15 @@ Patch5: rpm-4.14.2.1-debuginfo-rename-to-debug.patch
Patch6: rpm-4.14.2.1-add-usrlibrpm-macro.patch Patch6: rpm-4.14.2.1-add-usrlibrpm-macro.patch
Patch7: rpm-4.14.2.1-remove_macro_expanded_in_comment_warning.patch Patch7: rpm-4.14.2.1-remove_macro_expanded_in_comment_warning.patch
Patch9: rpm-4.14.2.1-increase_default_patch_fuzz.patch Patch9: rpm-4.14.2.1-increase_default_patch_fuzz.patch
Patch10: rpm-4.19.0-openmamba-buildroot.patch
Patch11: rpm-4.19.0-target-platform-gnu.patch Patch11: rpm-4.19.0-target-platform-gnu.patch
Patch12: rpm-4.17.0-find-lang-qt-fix.patch Patch12: rpm-4.17.0-find-lang-qt-fix.patch
Patch14: rpm-4.19.0-brp-strip-fix-for-plus-in-buildroot.patch Patch14: rpm-4.20.0-brp-strip-fix-for-plus-in-buildroot.patch
Patch15: rpm-4.18.0-allow-disabling-rmbuild.patch Patch15: rpm-4.18.0-allow-disabling-rmbuild.patch
Patch16: rpm-4.19.1.1-i586-add-sse-sse2-build-flags.patch Patch16: rpm-4.19.1.1-i586-add-sse-sse2-build-flags.patch
Patch17: rpm-4.19.1.1-i586-only-force-i586-host-cpu.patch Patch17: rpm-4.19.1.1-i586-only-force-i586-host-cpu.patch
Patch18: rpm-4.19.1.1-disable-specpartsdir.patch
Patch19: rpm-4.19.1.1-host-readd-gnu-suffix.patch Patch19: rpm-4.19.1.1-host-readd-gnu-suffix.patch
Patch20: rpm-4.20.0-upstream-support-u-exclamation-mark-in-sysusers-files.patch
Patch21: rpm-4.20.0-upstream-disable_unshare_plugin_in_chroot.patch
License: LGPL License: LGPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -59,6 +58,7 @@ BuildRequires: libcap-devel
BuildRequires: libdbus-devel BuildRequires: libdbus-devel
BuildRequires: libdw-devel BuildRequires: libdw-devel
BuildRequires: libelf-devel BuildRequires: libelf-devel
BuildRequires: libgcc
BuildRequires: libgomp-devel BuildRequires: libgomp-devel
BuildRequires: liblua-devel BuildRequires: liblua-devel
BuildRequires: liblzma-devel BuildRequires: liblzma-devel
@ -79,6 +79,7 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: rpm-build Provides: rpm-build
Obsoletes: rpm-build < 1:4.16.1.2 Obsoletes: rpm-build < 1:4.16.1.2
Requires: debugedit Requires: debugedit
Recommends: openmamba-rpm-config
%description %description
The RPM Package Manager (RPM) is a powerful package management system capable of building computer software from source into easily distributable packages installing, updating and uninstalling packaged software querying detailed information about the packaged software, whether installed or not verifying integrity of packaged software and resulting software installation. The RPM Package Manager (RPM) is a powerful package management system capable of building computer software from source into easily distributable packages installing, updating and uninstalling packaged software querying detailed information about the packaged software, whether installed or not verifying integrity of packaged software and resulting software installation.
@ -125,8 +126,6 @@ Obsoletes: python-rpm-py310 < 1:4.19.1.1-2mamba
The rpm-python package contains a module which permits applications written in the Python programming language to use the interface supplied by RPM (RPM Package Manager) libraries. The rpm-python package contains a module which permits applications written in the Python programming language to use the interface supplied by RPM (RPM Package Manager) libraries.
This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases. This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases.
%debug_package
%prep %prep
%setup -q -n rpm-%{version} %setup -q -n rpm-%{version}
#-D -T #-D -T
@ -139,7 +138,6 @@ This package should be installed if you want to develop Python programs that wil
%patch 6 -p1 %patch 6 -p1
%patch 7 -p1 %patch 7 -p1
%patch 9 -p1 %patch 9 -p1
%patch 10 -p1
%patch 11 -p1 %patch 11 -p1
%patch 12 -p1 %patch 12 -p1
%patch 14 -p1 %patch 14 -p1
@ -148,8 +146,9 @@ This package should be installed if you want to develop Python programs that wil
%patch 16 -p1 %patch 16 -p1
%patch 17 -p1 %patch 17 -p1
%endif %endif
%patch 18 -p1
%patch 19 -p1 %patch 19 -p1
%patch 20 -p1 -b .upstream-support-u-exclamation-mark-in-sysusers-files
%patch 21 -p1 -b .upstream-disable_unshare_plugin_in_chroot
%build %build
#:<< _EOF #:<< _EOF
@ -172,9 +171,6 @@ This package should be installed if you want to develop Python programs that wil
# create system-wide build directories # create system-wide build directories
mkdir -p %{buildroot}%{_usr}/src/RPM/{BUILD,RPMS/{aarch64,arm,i586,noarch,x86_64},SOURCES,SPECS,SRPMS} mkdir -p %{buildroot}%{_usr}/src/RPM/{BUILD,RPMS/{aarch64,arm,i586,noarch,x86_64},SOURCES,SPECS,SRPMS}
# install rpm macros for openmamba
install -D -m 644 %{S:2} %{buildroot}%{_sysconfdir}/rpm%{?program_suffix}/macros.openmamba
# install rpmdb-rebuild service # install rpmdb-rebuild service
install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/rpmdb-rebuild.service install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/rpmdb-rebuild.service
@ -191,7 +187,7 @@ install -m0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/rpm/fileattrs/python.attr
install -m0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/rpm/fileattrs/pythondist.attr install -m0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/rpm/fileattrs/pythondist.attr
install -m0755 %{SOURCE6} %{buildroot}%{_prefix}/lib/rpm/pythondistdeps.py install -m0755 %{SOURCE6} %{buildroot}%{_prefix}/lib/rpm/pythondistdeps.py
rm -f %{buildroot}%{_libdir}/librpm*.la install -d -m0755 %{buildroot}%{_sysconfdir}/rpm/
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -212,13 +208,10 @@ rm -f %{buildroot}%{_libdir}/librpm*.la
: :
%post -n lib%{name} %post -n lib%{name}
/sbin/ldconfig
/usr/sbin/groupadd packager -g %{packager_groupid} 2>/dev/null || : /usr/sbin/groupadd packager -g %{packager_groupid} 2>/dev/null || :
/usr/sbin/useradd packager -u %{packager_userid} -g packager -d /dev/null -s /bin/false 2>/dev/null || : /usr/sbin/useradd packager -u %{packager_userid} -g packager -d /dev/null -s /bin/false 2>/dev/null || :
: :
%postun -n lib%{name} -p /sbin/ldconfig
%triggerpostun -- rpm < 1:4.17.1.1-4mamba %triggerpostun -- rpm < 1:4.17.1.1-4mamba
# Ensuring enabling rpmdb-rebuild service on update # Ensuring enabling rpmdb-rebuild service on update
/usr/bin/systemctl enable rpmdb-rebuild.service /usr/bin/systemctl enable rpmdb-rebuild.service
@ -226,21 +219,20 @@ rm -f %{buildroot}%{_libdir}/librpm*.la
%files -f rpm.lang %files -f rpm.lang
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_sysconfdir}/rpm%{?program_suffix} %dir %{_sysconfdir}/rpm
%config %{_sysconfdir}/rpm%{?program_suffix}/macros.openmamba %{_bindir}/gendiff
%{_bindir}/gendiff%{?program_suffix} %{_bindir}/rpm
%{_bindir}/rpm%{?program_suffix} %{_bindir}/rpm2archive
%{_bindir}/rpm2archive%{?program_suffix} %{_bindir}/rpm2cpio
%{_bindir}/rpm2cpio%{?program_suffix} %{_bindir}/rpmbuild
%{_bindir}/rpmbuild%{?program_suffix} %{_bindir}/rpmdb
%{_bindir}/rpmdb%{?program_suffix} %{_bindir}/rpmgraph
%{_bindir}/rpmgraph%{?program_suffix} %{_bindir}/rpmkeys
%{_bindir}/rpmkeys%{?program_suffix}
%{_bindir}/rpmlua %{_bindir}/rpmlua
%{_bindir}/rpmquery %{_bindir}/rpmquery
%{_bindir}/rpmsign%{?program_suffix} %{_bindir}/rpmsign
%{_bindir}/rpmsort %{_bindir}/rpmsort
%{_bindir}/rpmspec%{?program_suffix} %{_bindir}/rpmspec
%{_bindir}/rpmverify %{_bindir}/rpmverify
%{_unitdir}/rpmdb-rebuild.service %{_unitdir}/rpmdb-rebuild.service
%{_datadir}/dbus-1/system.d/org.rpm.conf %{_datadir}/dbus-1/system.d/org.rpm.conf
@ -302,6 +294,16 @@ rm -f %{buildroot}%{_libdir}/librpm*.la
%{python3_sitearch}/rpm/* %{python3_sitearch}/rpm/*
%changelog %changelog
* Wed Jan 01 2025 Automatic Build System <autodist@openmamba.org> 4.20.0-3mamba
- added upstream patch to disable unshare plugin in chroot environment causing scripts to fail
* Tue Dec 31 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.20.0-2mamba
- added upstream patch to support u! in sysusers files (required by systemd package)
- weak-require openmamba-rpm-config and remove internally provided macros.openmamba
* Fri Oct 18 2024 Automatic Build System <autodist@openmamba.org> 4.20.0-1mamba
- automatic version update by autodist
* Tue Jun 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.1.1-5mamba * Tue Jun 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.1.1-5mamba
- readd -gnu suffix to _host macro - readd -gnu suffix to _host macro

View File

@ -1,100 +0,0 @@
%_dist mamba
%_docdir %_defaultdocdir
%_topdir %{_usr}/src/RPM
%_buildrootdir %{_topdir}/BUILD
%_check_dirname_deps 0
%_check_symlink_deps 0
%majorminor %(echo %version | cut -d. -f 1-2)
%MAJver %(echo %version | cut -d. -f 1)
%majver %majorminor
%maj3ver %(echo %version | cut -d. -f 1-3)
# obsoleted macro (for compatibility with QiLinux packages)
# do not use it; use %python_version instead
%pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")
#------------------------------------------------------------------------
# Macros for building and installing
%make_jobs %{__make} %{?_smp_mflags}
%make \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
%{make_jobs}
%makeinstall \
make DESTDIR=%{buildroot} install
%makeoldinstall \
make \\\
prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
install
%makeinstall_perl make pure_install DESTDIR=%{buildroot}
#------------------------------------------------------------------------
# Macros for installing and uninstalling info pages
%__install_info /sbin/install-info
%install_info() \
%{__install_info} %{_infodir}/%{1}.gz %{_infodir}/dir ||:\;
%uninstall_info() \
if [ "$1" = "0" ]; then \
%{__install_info} --delete %{_infodir}/%{1}.gz %{_infodir}/dir \
fi \
%{nil}
#==============================================================================
# ---- configure macros.
#
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
#---------------------------------------------------------------------
# Multilibs
%_multilibno 1
%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
# Expanded at end of %install scriptlet.
#
%__arch_install_post %{nil}
#%__os_install_post \
## /usr/lib/rpm/brp-infodir \
## /usr/lib/rpm/brp-strip-builddirs \
# /usr/lib/rpm/brp-compress \
# /usr/lib/rpm/brp-strip \
# /usr/lib/rpm/brp-strip-shared \
# /usr/lib/rpm/brp-strip-static-archive \
# /usr/lib/rpm/brp-strip-comment-note \
# /usr/lib/rpm/brp-nobuildrootpath \
#%{nil}
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}