summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-10-24 03:04:29 +0000
committerCoprDistGit <infra@openeuler.org>2024-10-24 03:04:29 +0000
commitcbd2260b272f41b0939ed53466bc39b6dc384910 (patch)
tree47f41aa87104524381a8f2919e230a11054c046c
parent4ad1d692311b38472d44f5deb9c32634b334ed4d (diff)
automatic import of rpmopeneuler24.03_LTS
-rw-r--r--8fc4e71f9b51438f09c8206ceb1b407bbaca8aab.patch30
-rw-r--r--backport-Remove-libtool-la-symlinks.patch33
-rw-r--r--backport-Specify-the-private-key-in-rpm-addsign.patch32
-rw-r--r--rpm.spec62
4 files changed, 95 insertions, 62 deletions
diff --git a/8fc4e71f9b51438f09c8206ceb1b407bbaca8aab.patch b/8fc4e71f9b51438f09c8206ceb1b407bbaca8aab.patch
deleted file mode 100644
index ca28701..0000000
--- a/8fc4e71f9b51438f09c8206ceb1b407bbaca8aab.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8fc4e71f9b51438f09c8206ceb1b407bbaca8aab Mon Sep 17 00:00:00 2001
-From: Florian Festi <ffesti@redhat.com>
-Date: Tue, 17 Sep 2024 13:13:13 +0200
-Subject: [PATCH] brp-remove-la-files: Remove symlinks, too
-
-As we check for file contents delete symlink before looking at regular
-files.
-
-Resolves: #3304
----
- scripts/brp-remove-la-files | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/scripts/brp-remove-la-files b/scripts/brp-remove-la-files
-index 58c513bf88..cffbd655c5 100755
---- a/scripts/brp-remove-la-files
-+++ b/scripts/brp-remove-la-files
-@@ -5,6 +5,12 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
- exit 0
- fi
-
-+# Check and remove symlinks first
-+find "$RPM_BUILD_ROOT" -type l -name '*.la' 2>/dev/null -print0 |
-+ xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
-+ xargs -0 rm --force
-+
-+# Process regular files
- find "$RPM_BUILD_ROOT" -type f -name '*.la' 2>/dev/null -print0 |
- xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
- xargs -0 rm --force
diff --git a/backport-Remove-libtool-la-symlinks.patch b/backport-Remove-libtool-la-symlinks.patch
new file mode 100644
index 0000000..288d1c4
--- /dev/null
+++ b/backport-Remove-libtool-la-symlinks.patch
@@ -0,0 +1,33 @@
+From 4936c42b4d8ed68af45fe220d24b2a69baaf9676 Mon Sep 17 00:00:00 2001
+From: Florian Festi <ffesti@redhat.com>
+Date: Tue, 17 Sep 2024 13:13:13 +0200
+Subject: [PATCH] brp-remove-la-files: Remove symlinks, too
+
+As we check for file contents delete symlink before looking at regular
+files.
+
+Resolves: #3304
+---
+ scripts/brp-remove-la-files | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/brp-remove-la-files b/scripts/brp-remove-la-files
+index 58c513bf88..0e6e58f31a 100755
+--- a/scripts/brp-remove-la-files
++++ b/scripts/brp-remove-la-files
+@@ -5,6 +5,12 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+ fi
+
+-find "$RPM_BUILD_ROOT" -type f -name '*.la' 2>/dev/null -print0 |
+- xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
+- xargs -0 rm --force
++# Check and remove symlinks first then regular files
++for FILETYPE in l f
++do
++
++ find "$RPM_BUILD_ROOT" -type $FILETYPE -name '*.la' 2>/dev/null -print0 |
++ xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
++ xargs -0 rm --force
++
++done
diff --git a/backport-Specify-the-private-key-in-rpm-addsign.patch b/backport-Specify-the-private-key-in-rpm-addsign.patch
new file mode 100644
index 0000000..49d8d55
--- /dev/null
+++ b/backport-Specify-the-private-key-in-rpm-addsign.patch
@@ -0,0 +1,32 @@
+From 3141bf74ffcc0650c64611066ede8718a98ecebe Mon Sep 17 00:00:00 2001
+From: xujing <xujing125@huawei.com>
+Date: Thu, 5 Sep 2024 16:28:17 +0800
+Subject: [PATCH] Specify the private key in "rpm --addsign"
+
+Conflict:adapt context
+Reference:https://github.com/rpm-software-management/rpm/commit/3141bf74ffcc0650c64611066ede8718a98ecebe
+
+Using "*.secret" may cause "rpm --addsign" to fail, and the testcase
+is actually related only to rpm.org-rsa-2048-test.secret.
+
+Fix https://github.com/rpm-software-management/rpm/issues/3277
+---
+ tests/rpmsigdig.at | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at
+index e62c63415..262a68c71 100644
+--- a/tests/rpmsigdig.at
++++ b/tests/rpmsigdig.at
+@@ -917,7 +917,7 @@ AT_SETUP([rpmsign --addsign])
+ AT_SETUP([rpmsign --addsign])
+ AT_KEYWORDS([rpmsign signature])
+ RPMDB_INIT
+-gpg2 --import ${RPMTEST}/data/keys/*.secret
++gpg2 --import ${RPMTEST}/data/keys/rpm.org-rsa-2048-test.secret
+ # Our keys have no passphrases to be asked, silence GPG_TTY warning
+ export GPG_TTY=""
+
+--
+2.33.0
+
diff --git a/rpm.spec b/rpm.spec
index 5fa5746..3522941 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,10 +1,10 @@
Name: rpm
Version: 4.18.2
-Release: 16
+Release: 17
Summary: RPM Package Manager
-License: GPLv2+
-URL: http://www.rpm.org/
-Source0: http://ftp.rpm.org/releases/rpm-4.18.x/%{name}-%{version}.tar.bz2
+License: GPL-2.0-or-later
+URL: https://rpm.org/
+Source0: https://ftp.osuosl.org/pub/rpm/releases/rpm-4.18.x/%{name}-%{version}.tar.bz2
Patch1: Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch
Patch2: rpm-4.12.0-rpm2cpio-hack.patch
@@ -17,7 +17,6 @@ Patch8: still-in-use-of-python-scripts-from-old-version.patch
Patch9: Add-loongarch-architecture-support.patch
Patch10: rpm-Add-sw64-architecture.patch
Patch11: add-default-machine-name-to-support-loongarch.patch
-Patch12: 8fc4e71f9b51438f09c8206ceb1b407bbaca8aab.patch
Patch6000: backport-revert-Permit-building-rpm-from-git-without-pandoc.patch
Patch6001: backport-Check-inside-root-when-querying-for-files.patch
@@ -46,6 +45,8 @@ Patch6023: backport-Make-sure-dirs-are-not-relocated-twice.patch
Patch6024: backport-Fix-root-relocation-regression.patch
Patch6025: backport-Fix-crash-on-Lua-file-trigger-exiting-with-return-ed.patch
Patch6026: backport-Fix-V-option-usage-in-our-tests.patch
+Patch6027: backport-Remove-libtool-la-symlinks.patch
+Patch6028: backport-Specify-the-private-key-in-rpm-addsign.patch
Patch9000: Add-digest-list-plugin.patch
Patch9001: Add-IMA-digest-list-support.patch
@@ -127,7 +128,7 @@ Obsoletes: apidocs
%prep
%autosetup -n %{name}-%{version} -p1
%ifnarch sw_64
-%patch10 -R -p1
+%patch -P10 -R -p1
%endif
%build
@@ -172,6 +173,7 @@ done;
%install
%make_install
+%delete_la
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
@@ -207,12 +209,13 @@ cp -va ndb/. $RPM_BUILD_ROOT/var/lib/rpm/
%find_lang %{name}
-find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
-
rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{perldeps.pl,perl.*,pythond*}
rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*}
rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{tcl.req,osgideps.pl}
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
+rm -f $RPM_BUILD_ROOT/%{_libdir}/rpm-plugins/fsverity.so
+rm -f $RPM_BUILD_ROOT/%{_libdir}/rpm-plugins/dbus_announce.so
+rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rpm-plugin-dbus-announce.8*
%check
%ifnarch loongarch64
@@ -223,14 +226,6 @@ make check || (cat tests/rpmtests.log; exit 0)
make clean
%endif
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%post libs -p /sbin/ldconfig
-
-%postun libs -p /sbin/ldconfig
-
%posttrans
{
set -e
@@ -246,7 +241,6 @@ make clean
} &
%files -f %{name}.lang
-%defattr(-,root,root)
%license COPYING
%doc CREDITS
/usr/lib/tmpfiles.d/rpm.conf
@@ -275,10 +269,12 @@ make clean
%{_rpmconfigdir}/rpm2cpio.sh
%{_rpmconfigdir}/tgpg
%{_rpmconfigdir}/platform
-%{_libdir}/rpm-plugins/
-%exclude %{_libdir}/rpm-plugins/systemd_inhibit.so
-%exclude %{_libdir}/rpm-plugins/fsverity.so
-%exclude %{_libdir}/rpm-plugins/dbus_announce.so
+%dir %{_libdir}/rpm-plugins
+%{_libdir}/rpm-plugins/digest_list.so
+%{_libdir}/rpm-plugins/ima.so
+%{_libdir}/rpm-plugins/prioreset.so
+%{_libdir}/rpm-plugins/selinux.so
+%{_libdir}/rpm-plugins/syslog.so
%dir %{_rpmconfigdir}/fileattrs
%{_bindir}/rpm
%{_bindir}/rpm2archive
@@ -295,14 +291,13 @@ make clean
%{_libdir}/librpm*.so.9*
%files build
-%defattr(-,root,root)
%{_bindir}/rpmbuild
%{_bindir}/gendiff
%{_bindir}/rpmspec
%{_mandir}/man1/gendiff.1*
-%{_mandir}/man8/rpmbuild.8.gz
-%{_mandir}/man8/rpmdeps.8.gz
-%{_mandir}/man8/rpmspec.8.gz
+%{_mandir}/man8/rpmbuild.8*
+%{_mandir}/man8/rpmdeps.8*
+%{_mandir}/man8/rpmspec.8*
%{_rpmconfigdir}/brp-*
%{_rpmconfigdir}/check-*
@@ -317,12 +312,10 @@ make clean
%{_rpmconfigdir}/config.*
%files -n python3-%{name}
-%defattr(-,root,root)
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}*.egg-info
%files devel
-%defattr(-,root,root)
%{_bindir}/rpmgraph
%{_libdir}/librp*[a-z].so
%{_libdir}/pkgconfig/%{name}.pc
@@ -333,17 +326,22 @@ make clean
%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
%files help
-%defattr(-,root,root)
%doc docs/manual/[a-z]*
%doc docs/librpm/html/*
%{_mandir}/man8/rpm*.8*
%exclude %{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
-%exclude %{_mandir}/man8/rpm-plugin-dbus-announce.8*
-%exclude %{_mandir}/man8/rpmbuild.8.gz
-%exclude %{_mandir}/man8/rpmdeps.8.gz
-%exclude %{_mandir}/man8/rpmspec.8.gz
+%exclude %{_mandir}/man8/rpmbuild.8*
+%exclude %{_mandir}/man8/rpmdeps.8*
+%exclude %{_mandir}/man8/rpmspec.8*
%changelog
+* Sun Sep 29 2024 hugel<gengqihu2@h-partners.com> - 4.18.2-17
+- Fix testcase failed of rpm addsign
+
+* Wed Sep 18 2024 Funda Wang <fundawang@yeah.net> - 4.18.2-16
+- Remove symlinks towards libtool .la also
+- cleanup spec
+
* Wed Sep 11 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-15
- Fix the log level of IMA digest_list