[packages/supermin] basic pld support using dnf (based on fedora)

atler atler at pld-linux.org
Mon Jun 26 14:09:50 CEST 2023


commit 2d6da998976ec8a3caf686b2cc6f64d85ae1afbf
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jun 26 14:08:14 2023 +0200

    basic pld support using dnf (based on fedora)
    
    poldek support could be added later on

 pld.patch     | 28 ++++++++++++++++++++++++++++
 supermin.spec |  2 ++
 2 files changed, 30 insertions(+)
---
diff --git a/supermin.spec b/supermin.spec
index 6fc40d8..39de8a7 100644
--- a/supermin.spec
+++ b/supermin.spec
@@ -12,6 +12,7 @@ Group:		Applications/System
 Source0:	https://download.libguestfs.org/supermin/5.2-stable/%{name}-%{version}.tar.gz
 # Source0-md5:	44cf367b27f645e8db7e8ae3ae5bad02
 Patch0:		%{name}-rpm5.patch
+Patch1:		pld.patch
 URL:		https://people.redhat.com/~rjones/supermin/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -60,6 +61,7 @@ uruchomienia takowej.
 %prep
 %setup -q
 %{?with_rpm5:%patch0 -p1}
+%patch1 -p1
 
 %build
 %{__aclocal} -I m4
diff --git a/pld.patch b/pld.patch
new file mode 100644
index 0000000..ea4b42c
--- /dev/null
+++ b/pld.patch
@@ -0,0 +1,28 @@
+--- supermin-5.2.2.orig/src/ph_rpm.ml	2022-03-04 14:13:20.000000000 +0100
++++ supermin-5.2.2/src/ph_rpm.ml	2023-06-24 20:21:37.026413973 +0200
+@@ -64,6 +64,14 @@
+       (stat "/etc/ibm_powerkvm-release").st_kind = S_REG
+     with Unix_error _ -> false
+ 
++let pld_detect () =
++  Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
++    (Config.yumdownloader <> "no" || Config.dnf <> "no") &&
++    (List.mem (Os_release.get_id ()) [ "pld" ] ||
++     try
++       (stat "/etc/pld-release").st_kind = S_REG
++     with Unix_error _ -> false)
++
+ let settings = ref no_settings
+ let rpm_major, rpm_minor, rpm_arch = ref 0, ref 0, ref ""
+ let zypper_major, zypper_minor, zypper_patch = ref 0, ref 0, ref 0
+@@ -543,4 +584,9 @@
+     ph_detect = openmandriva_detect;
+     ph_download_package = PHDownloadAllPackages openmandriva_download_all_packages;
+   } in
+-  register_package_handler "openmandriva" "rpm" openmandriva
++  register_package_handler "openmandriva" "rpm" openmandriva;
++  let pld = {
++    fedora with
++    ph_detect = pld_detect;
++  } in
++  register_package_handler "pld" "rpm" pld
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/supermin.git/commitdiff/2d6da998976ec8a3caf686b2cc6f64d85ae1afbf



More information about the pld-cvs-commit mailing list