diff --git a/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch b/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch new file mode 100644 index 0000000..6e70551 --- /dev/null +++ b/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch @@ -0,0 +1,33 @@ +From 7a80a6eec799841b828ba7f617709562d8061435 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 21 Oct 2024 11:55:53 +0100 +Subject: [PATCH] prepare: Use stable owner, group and mtime in base.tar.gz + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Signed-off-by: Richard W.M. Jones +--- + src/mode_prepare.ml | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/mode_prepare.ml b/src/mode_prepare.ml +index 70f9dd4..6af47b1 100644 +--- a/src/mode_prepare.ml ++++ b/src/mode_prepare.ml +@@ -166,9 +166,12 @@ let prepare debug (copy_kernel, format, host_cpu, + let base = outputdir // "base.tar.gz" in + if debug >= 1 then printf "supermin: writing %s\n%!" base; + let cmd = +- sprintf "tar%s -C %s -zcf %s -T %s" ++ let mtime = ++ try sprintf "--mtime=@%s" (quote (Sys.getenv "SOURCE_DATE_EPOCH")) ++ with Not_found -> "" in ++ sprintf "tar%s -C %s -z --owner=0 --group=0 %s -cf %s -T %s" + (if debug >=1 then " -v" else "") +- (quote dir) (quote base) (quote files_from) in ++ (quote dir) mtime (quote base) (quote files_from) in + run_command cmd; + ) + else ( +-- +2.46.0 + diff --git a/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch b/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch deleted file mode 100644 index 6115707..0000000 --- a/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 86fd6f3e86ab99d54a22b475aecccfc19bdff07e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 21 Jan 2023 09:38:55 +0000 -Subject: [PATCH] rpm: New RPM database location in /usr/lib/sysimage/rpm - -A few years ago the RPM database was moved from /var to /usr. This is -now feeding through to Linux distros. - -http://lists.rpm.org/pipermail/rpm-maint/2017-October/006723.html -https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -https://src.fedoraproject.org/rpms/rpm/pull-request/21 ---- - src/ph_rpm.ml | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml -index 85557fe..2c199c1 100644 ---- a/src/ph_rpm.ml -+++ b/src/ph_rpm.ml -@@ -236,12 +236,22 @@ let rpm_package_name pkg = - let rpm = rpm_of_pkg pkg in - rpm.name - -+let rpmdb_locations = [ -+ "/usr/lib/sysimage/rpm/rpmdb.sqlite"; -+ "/var/lib/rpm/rpmdb.sqlite"; -+ "/var/lib/rpm/Packages" -+] -+ -+let find_rpmdb () = -+ let rec loop = function -+ | [] -> error "rpm: cannot locate RPM database; if this is a normal RPM-based Linux distro then this is probably a supermin bug" -+ | db :: rest -> -+ if Sys.file_exists db then db else loop rest -+ in -+ loop rpmdb_locations -+ - let rpm_get_package_database_mtime () = -- (try -- lstat "/var/lib/rpm/rpmdb.sqlite" -- with Unix_error (ENOENT, _, _) -> -- lstat "/var/lib/rpm/Packages" -- ).st_mtime -+ (lstat (find_rpmdb ())).st_mtime - - (* Return the best provider of a particular RPM requirement. - * --- -2.39.0 - diff --git a/sources b/sources index 98c633b..cc31e54 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (supermin-5.3.3.tar.gz) = 39eb687a4e6fbd13d356612f950352848626fe68a14054a62ac7fa1bb3b42be716189b1505bf137331974ea02d75e2e8079f412a133af165cba7767699925f38 -SHA512 (supermin-5.3.3.tar.gz.sig) = e5109e718b06992bde73be913be49cd00358ec835566beb1f207109f54f73dbc6600275e929eb88fea42bda13643ec3ee9bb80032f8a05c37537f28bafb49fad +SHA512 (supermin-5.3.5.tar.gz) = e410bafe06805880f0f701e78d743a6e22e9d25e57bd70a020d583dba6d710ba9917d7afc37be714d9bde410c7ff35f4198300b3af0858d761b0b3e07af58dc0 +SHA512 (supermin-5.3.5.tar.gz.sig) = 88f446c3855367dd8917a6eb44d926f8a09dac9913d9098757951ccb3300f9e3544689a45d661382ae24221f8558bbfc188976f4db288829c28379b87949ed7e diff --git a/supermin.spec b/supermin.spec index d162e84..ee09a0f 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,4 +1,5 @@ -%undefine _package_note_flags +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} # On platforms and architectures that support it, the default is # ‘--with dietlibc’. @@ -22,6 +23,12 @@ %endif %endif +%if 0%{?fedora} > 40 || 0%{?rhel} > 10 +%bcond_without dnf5 +%else +%bcond_with dnf5 +%endif + # Whether we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 @@ -30,9 +37,9 @@ Summary: Tool for creating supermin appliances Name: supermin -Version: 5.3.3 -Release: 3%{?dist} -License: GPLv2+ +Version: 5.3.5 +Release: 7%{?dist} +License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} %if 0%{?rhel} @@ -46,8 +53,10 @@ Source1: http://download.libguestfs.org/supermin/%{source_directory}/%{nam # Keyring used to verify tarball signature. Source2: libguestfs.keyring -# https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -Patch1: 0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +# Use stable owner, group and mtime in base.tar.gz +# Upstream in > 5.3.5 +# https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Patch1: 0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch BuildRequires: gcc BuildRequires: make @@ -56,8 +65,12 @@ BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2html BuildRequires: rpm BuildRequires: rpm-devel +%if %{with dnf5} +BuildRequires: dnf5 +%else BuildRequires: dnf BuildRequires: dnf-plugins-core +%endif BuildRequires: /usr/sbin/mke2fs BuildRequires: e2fsprogs-devel BuildRequires: findutils @@ -124,8 +137,12 @@ Requires: %{name} = %{version}-%{release} Requires: rpm-build # Dependencies needed for supermin --prepare +%if %{with dnf5} +Requires: dnf5 +%else Requires: dnf Requires: dnf-plugins-core +%endif Requires: findutils @@ -147,7 +164,11 @@ supermin appliances. %build autoreconf -fi -%configure --disable-network-tests +# Setting DNF is temporarily required for Rawhide. We should be able +# to remove this later. See: +# https://bugzilla.redhat.com/show_bug.cgi?id=2209412 +# https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5 +%configure %{?with_dnf5:DNF=%{_bindir}/dnf5} --disable-network-tests %if %{with dietlibc} make -C init CC="diet gcc" @@ -190,6 +211,85 @@ make check || { %changelog +* Mon Oct 13 2025 Richard W.M. Jones - 5.3.5-7 +- OCaml 5.4.0 rebuild + +* Fri Jul 25 2025 Fedora Release Engineering - 5.3.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jul 11 2025 Jerry James - 5.3.5-5 +- Rebuild to fix OCaml dependencies + +* Sun Jan 19 2025 Fedora Release Engineering - 5.3.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jan 9 2025 Jerry James - 5.3.5-3 +- OCaml 5.3.0 rebuild for Fedora 42 + +* Mon Oct 21 2024 Richard W.M. Jones - 5.3.5-2 +- Use stable owner, group and mtime in base.tar.gz (RHBZ#2320025) + +* Sat Aug 31 2024 Richard W.M. Jones - 5.3.5-1 +- New upstream version 5.3.5 + +* Sat Jul 20 2024 Fedora Release Engineering - 5.3.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 19 2024 Richard W.M. Jones - 5.3.4-4 +- OCaml 5.2.0 ppc64le fix + +* Wed May 29 2024 Richard W.M. Jones - 5.3.4-3 +- OCaml 5.2.0 for Fedora 41 + +* Sat Jan 27 2024 Fedora Release Engineering - 5.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 11 2024 Richard W.M. Jones - 5.3.4-1 +- New upstream version 5.3.4 +- Remove patches which are now all upstream. + +* Mon Dec 18 2023 Richard W.M. Jones - 5.3.3-19 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + +* Tue Dec 12 2023 Richard W.M. Jones - 5.3.3-18 +- OCaml 5.1.1 rebuild for Fedora 40 + +* Fri Nov 10 2023 Richard W.M. Jones - 5.3.3-17 +- Fix RISC-V gzip compressed kernels + +* Thu Oct 05 2023 Richard W.M. Jones - 5.3.3-16 +- OCaml 5.1 rebuild for Fedora 40 + +* Wed Aug 02 2023 Yaakov Selkowitz - 5.3.3-15 +- Defer dnf5 until Fedora 41 + +* Sat Jul 22 2023 Fedora Release Engineering - 5.3.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jul 12 2023 Richard W.M. Jones - 5.3.3-13 +- OCaml 5.0 rebuild for Fedora 39 + +* Mon Jul 10 2023 Jerry James - 5.3.3-10 +- OCaml 5.0.0 rebuild + +* Mon Jun 12 2023 Richard W.M. Jones - 5.3.3-9 +- Fix --if-newer + +* Mon Jun 05 2023 Richard W.M. Jones - 5.3.3-8 +- Migrated to SPDX license + +* Wed May 31 2023 Richard W.M. Jones - 5.3.3-7 +- Further fix for dnf5 (RHBZ#2211386) + +* Tue May 30 2023 Richard W.M. Jones - 5.3.3-6 +- Add support for dnf5 (RHBZ#2209412) + +* Fri May 19 2023 Richard W.M. Jones - 5.3.3-5 +- Rebuild against librpm 10 + +* Tue Jan 24 2023 Richard W.M. Jones - 5.3.3-4 +- Rebuild OCaml packages for F38 + * Sat Jan 21 2023 Richard W.M. Jones - 5.3.3-3 - Deal with new RPM database location - https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr