Update to version 5.3.2

This commit is contained in:
chendexi 2022-09-23 14:05:15 +08:00
parent f0af34628e
commit 00e7a7d3ec
8 changed files with 35 additions and 116 deletions

View File

@ -1,58 +0,0 @@
From 5c5eff66dfaccb212b8906e769e40633d8b8f5e4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 13 Feb 2018 08:20:52 +0000
Subject: [PATCH] Fix Bytes/String for OCaml 4.06.
---
src/format_ext2_kernel.ml | 4 ++--
src/mode_build.ml | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml
index d5d529d..98bff3a 100644
--- a/src/format_ext2_kernel.ml
+++ b/src/format_ext2_kernel.ml
@@ -290,9 +290,9 @@ and read_leshort chan offset =
and read_string chan offset len =
seek_in chan offset;
- let buf = String.create len in
+ let buf = Bytes.create len in
really_input chan buf 0 len;
- buf
+ Bytes.to_string buf
and copy_or_symlink_file copy_kernel src dest =
if not copy_kernel then
diff --git a/src/mode_build.ml b/src/mode_build.ml
index 95869cb..b5f5fa6 100644
--- a/src/mode_build.ml
+++ b/src/mode_build.ml
@@ -299,9 +299,10 @@ and update_appliance appliance lines = function
(* Determine the [file_type] of [file], or exit with an error. *)
and get_file_type file =
let chan = open_in file in
- let buf = String.create 512 in
- let len = input chan buf 0 (String.length buf) in
+ let buf = Bytes.create 512 in
+ let len = input chan buf 0 (Bytes.length buf) in
close_in chan;
+ let buf = Bytes.to_string buf in
if len >= 3 && buf.[0] = '\x1f' && buf.[1] = '\x8b' && buf.[2] = '\x08'
then (* gzip-compressed file *)
@@ -335,8 +336,9 @@ and get_file_content file buf len =
and get_compressed_file_content zcat file =
let cmd = sprintf "%s %s" zcat (quote file) in
let chan_out, chan_in, chan_err = open_process_full cmd [||] in
- let buf = String.create 512 in
- let len = input chan_out buf 0 (String.length buf) in
+ let buf = Bytes.create 512 in
+ let len = input chan_out buf 0 (Bytes.length buf) in
+ let buf = Bytes.to_string buf in
(* We're expecting the subprocess to fail because we close the pipe
* early, so:
*)
--
2.15.1

View File

@ -1,17 +1,17 @@
From bb6a164d258c70d69b74e946f9e01d1503d66df0 Mon Sep 17 00:00:00 2001
From: maminjie <maminjie1@huawei.com>
Date: Tue, 15 Dec 2020 16:39:20 +0800
Subject: [PATCH] use installed packages instead of dnf downloading
From 83e9444e3f8578beb7de65c5a6b463d4e4e59c2b Mon Sep 17 00:00:00 2001
From: fu-shanqing <fushanqing@kylinos.com>
Date: Fri, 23 Sep 2022 11:29:42 +0800
Subject: [PATCH] use-installed-packages-instead-of-dnf-downloading
---
src/supermin.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/supermin.ml b/src/supermin.ml
index f9798f9..7e4bd6c 100644
index 9f838d9..7bd7de8 100644
--- a/src/supermin.ml
+++ b/src/supermin.ml
@@ -91,7 +91,7 @@ let main () =
@@ -92,7 +92,7 @@ let main () =
let mode = ref None in
let outputdir = ref "" in
let packager_config = ref "" in
@ -21,5 +21,5 @@ index f9798f9..7e4bd6c 100644
let include_packagelist = ref false in
--
2.23.0
2.30.0

View File

@ -1,29 +0,0 @@
From 21d7bb90cbcb1ab71c3d7e660948b92bbf85e5f6 Mon Sep 17 00:00:00 2001
From: zhanghaibo <ted.zhang@huawei.com>
Date: Wed, 11 Dec 2019 03:02:27 +0000
Subject: [PATCH] supermin:fix cannot detect package manager on openeuler
---
src/ph_rpm.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
index b0a5eb2..61537ce 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -31,10 +31,11 @@ let stringset_of_list pkgs =
let fedora_detect () =
Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
(Config.yumdownloader <> "no" || Config.dnf <> "no") &&
- (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos" ] ||
+ (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler" ] ||
try
(stat "/etc/redhat-release").st_kind = S_REG ||
- (stat "/etc/fedora-release").st_kind = S_REG
+ (stat "/etc/fedora-release").st_kind = S_REG ||
+ (stat "/etc/openEuler-release").st_kind = S_REG
with Unix_error _ -> false)
let opensuse_detect () =
--
2.23.0

View File

@ -1,15 +1,17 @@
From a5d2b966fe89e66b7e5f0bb5387f4f0c855cfb54 Mon Sep 17 00:00:00 2001
From: wangqing <wangqing@uniontech.com>
Date: Fri, 8 Oct 2021 16:20:26 +0800
Subject: [PATCH] fix cannot detect package manager on UnionTech
From bab1f73ae2ba78ff78a544303dfac63581ac31b4 Mon Sep 17 00:00:00 2001
From: fu-shanqing <fushanqing@kylinos.com>
Date: Fri, 23 Sep 2022 12:13:19 +0800
Subject: [PATCH] fix-cannot-detect-package-manager-on-UnionTech
Signed-off-by: wangqing <wangqing@uniontech.com>
---
src/ph_rpm.ml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
index 61537ce..a0d3405 100644
index 549bd9a..11c49b4 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -31,10 +31,11 @@ let stringset_of_list pkgs =
@@ -32,11 +32,13 @@ let stringset_of_list pkgs =
let fedora_detect () =
Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
(Config.yumdownloader <> "no" || Config.dnf <> "no") &&
@ -18,10 +20,13 @@ index 61537ce..a0d3405 100644
try
(stat "/etc/redhat-release").st_kind = S_REG ||
(stat "/etc/fedora-release").st_kind = S_REG ||
- (stat "/etc/openEuler-release").st_kind = S_REG
+ (stat "/etc/UnionTech-release").st_kind = S_REG ||
(stat "/etc/openEuler-release").st_kind = S_REG
+ (stat "/etc/openEuler-release").st_kind = S_REG
+
with Unix_error _ -> false)
let opensuse_detect () =
--
2.20.1
2.30.0

View File

@ -1,17 +1,17 @@
From 678155eaeafa82ebdbebeed7567d54558c22538e Mon Sep 17 00:00:00 2001
From: wang_yue111 <648774160@qq.com>
Date: Wed, 8 Sep 2021 16:05:12 +0800
Subject: [PATCH] Add pie and bind_now flags
From 1b43ce5da29fa5a1b9b405e78808f9e43b30d734 Mon Sep 17 00:00:00 2001
From: fu-shanqing <fushanqing@kylinos.com>
Date: Fri, 23 Sep 2022 11:37:04 +0800
Subject: [PATCH] add-pie-and-bind_now-flags
---
src/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 09e1d08..5f8b34a 100644
diff --git a/src/Makefile.in b/src/Makefile.in
index c6e108c..28d8b18 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1077,7 +1077,7 @@ supermin_LDADD = ../lib/libgnu.a
@@ -485,7 +485,7 @@ supermin_DEPENDENCIES = $(OBJECTS)
supermin_LINK = \
./supermin-link.sh \
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
@ -21,5 +21,5 @@ index 09e1d08..5f8b34a 100644
BUILT_SOURCES = format-ext2-init-bin.h
SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
--
2.23.0
2.30.0

Binary file not shown.

BIN
supermin-5.3.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,15 +1,13 @@
Name: supermin
Version: 5.1.19
Release: 14
Version: 5.3.2
Release: 1
Summary: A tool for building supermin appliances, required by libguestfs
License: GPLv2+
URL: http://libguestfs.org/
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
Source0: http://libguestfs.org/download/supermin/5.3-development/%{name}-%{version}.tar.gz
Source1: supermin.attr
Source2: supermin-find-requires
Patch0001: 0001-Fix-Bytes-String-for-OCaml-4.06.patch
Patch0002: 0002-use-installed-packages-instead-of-dnf-downloading.patch
Patch9000: 9000-fix-cannot-detect-package-manager-on-openeuler.patch
Patch9001: add-pie-and-bind_now-flags.patch
Patch9002: 9002-fix-cannot-detect-package-manager-on-UnionTech.patch
@ -70,6 +68,9 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_rpmconfigdir}/
%{_mandir}/man1/*
%changelog
* Thu Sep 22 2022 chendexi<chendexi@kylinos.cn> -5.3.2-1
- Update to version 5.3.2
* Thu May 26 2022 Jun Yang <jun.yang@suse.com> - 5.1.19-14
- Remove dependency of kernel package