From e9a42a452378628a6d6e176a7a600f01db6af11f Mon Sep 17 00:00:00 2001 From: hy Date: Thu, 26 Mar 2020 15:07:02 +0800 Subject: [PATCH 1/6] dd packages which are installed on the appliance for openEuler --- ...kages-on-the-appliance-for-openEuler.patch | 58 +++++++++++++++++++ libguestfs.spec | 10 +++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 0000-add-installed-packages-on-the-appliance-for-openEuler.patch diff --git a/0000-add-installed-packages-on-the-appliance-for-openEuler.patch b/0000-add-installed-packages-on-the-appliance-for-openEuler.patch new file mode 100644 index 0000000..1b73f99 --- /dev/null +++ b/0000-add-installed-packages-on-the-appliance-for-openEuler.patch @@ -0,0 +1,58 @@ +From 11dbce19ad70cea93a48d14982bf020d209d5cd7 Mon Sep 17 00:00:00 2001 +From: hy +Date: Thu, 26 Mar 2020 14:56:37 +0800 +Subject: [PATCH] add packages which are installed on the appliance for + openEuler + +Signed-off-by: hy +--- + appliance/packagelist.in | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/appliance/packagelist.in b/appliance/packagelist.in +index 8d2e9d4..d5943ed 100644 +--- a/appliance/packagelist.in ++++ b/appliance/packagelist.in +@@ -11,6 +11,7 @@ dnl ARCHLINUX=1 For Archlinux. + dnl SUSE=1 For OpenSUSE. + dnl FRUGALWARE=1 For Frugalware. + dnl MAGEIA=1 For Mageia. ++dnl OPENEULER=1 For openEuler + dnl + dnl There is also a list of packages which are excluded if they appear + dnl as dependencies of the packages below. See: excludelist.in +@@ -227,6 +228,31 @@ ifelse(MAGEIA,1, + xz + ) + ++ifelse(OPENEULER,1, ++ augeas ++ cryptsetup ++ dhcp ++ genisoimage ++ hivex ++ iproute ++ iputils ++ jansson ++ kernel ++ libcap ++ libldm ++ libtirpc ++ ntfsprogs ++ ntfs-3g ++ openssh ++ pcre ++ policycoreutils ++ reiserfs-utils ++ libselinux ++ systemd ++ vim ++ xz ++) ++ + acl + attr + bash +-- +1.8.3.1 + diff --git a/libguestfs.spec b/libguestfs.spec index c34a06d..aa19fb2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -4,7 +4,7 @@ Name: libguestfs Version: 1.40.2 -Release: 6 +Release: 7 Epoch: 1 Summary: A set of tools for accessing and modifying virtual machine (VM) disk images License: LGPLv2+ @@ -13,6 +13,8 @@ Source0: http://download.libguestfs.org/1.40-stable/libguestfs-1.40.2.tar. Source1: guestfish.sh Source2: yum.conf.in +Patch0000: 0000-add-installed-packages-on-the-appliance-for-openEuler.patch + BuildRequires: gcc-c++, rpcgen, libtirpc-devel, supermin-devel >= 5.1.18, hivex-devel >= 1.2.7-7, ocaml-hivex-devel, perl(Pod::Simple), perl(Pod::Man) BuildRequires: /usr/bin/pod2text, po4a, augeas-devel >= 1.7.0, readline-devel, genisoimage, libxml2-devel, createrepo, glibc-static, libselinux-utils BuildRequires: libselinux-devel, fuse, fuse-devel, pcre-devel, file-devel, libvirt-devel, gperf, flex, bison, libdb-utils, cpio, libconfig-devel, xz-devel @@ -419,6 +421,12 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %exclude %{_mandir}/man1/virt-tar.1* %changelog +* Thu Mar 26 2020 hy - 1:1.40.2-7 +- Type:NA +- ID:NA +- SUG:NA +- DESC: add packages which are installed on the appliance for openEuler. + * Tue Mar 10 2020 yangjian - 1:1.40.2-6 - Type:NA - ID:NA -- Gitee From d97c64eba8cd190d69e7f59b705573561601f81f Mon Sep 17 00:00:00 2001 From: hy Date: Thu, 26 Mar 2020 15:36:26 +0800 Subject: [PATCH 2/6] add packages which are installed on the appliance for openEuler --- libguestfs.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index aa19fb2..58d4cc0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -196,8 +196,6 @@ if [ "$(stat -f -L -c %T .)" != "nfs" ] && [ "$(getenforce | tr '[A-Z]' '[a-z]') chcon --reference=/tmp tmp fi -sed -i 's/FEDORA | RHEL | CENTOS)/FEDORA | RHEL | CENTOS | EULEROS | GENERIC)/g' configure - %build ip addr list ||: ip route list ||: -- Gitee From ff74d90c703fdd17a5601b925b7a3c53f357165b Mon Sep 17 00:00:00 2001 From: hy Date: Mon, 30 Mar 2020 14:49:11 +0800 Subject: [PATCH 3/6] add packages which are installed on the appliance for openEuler and modify the find packages dir --- libguestfs.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 58d4cc0..d7ebf26 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -203,7 +203,12 @@ if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then extra= else install -d cachedir repo - find /.pkgs/ -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo + if -e "/.pkgs" + dir="/.pkgs" + else + dir="/var/cache/{dnf,yum}" + fi + find $dir -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo createrepo repo sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf extra=--with-supermin-packager-config=$(pwd)/yum.conf @@ -423,7 +428,7 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ - Type:NA - ID:NA - SUG:NA -- DESC: add packages which are installed on the appliance for openEuler. +- DESC: add packages which are installed on the appliance for openEuler and modify the find packages dir for jekins build. * Tue Mar 10 2020 yangjian - 1:1.40.2-6 - Type:NA -- Gitee From ba378b2d9dbaeee76ba342860c42a210ad55d5a4 Mon Sep 17 00:00:00 2001 From: hy Date: Mon, 30 Mar 2020 15:06:54 +0800 Subject: [PATCH 4/6] update libguestfs.spec. --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index d7ebf26..604ddd7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -203,7 +203,7 @@ if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then extra= else install -d cachedir repo - if -e "/.pkgs" + if [ -e "/.pkgs" ]; then dir="/.pkgs" else dir="/var/cache/{dnf,yum}" -- Gitee From 0f1cff8f5ec7a8cc5961978135b90f44393f67d9 Mon Sep 17 00:00:00 2001 From: hy Date: Mon, 30 Mar 2020 15:35:13 +0800 Subject: [PATCH 5/6] update libguestfs.spec. --- libguestfs.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 604ddd7..b2bf62f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -205,8 +205,10 @@ else install -d cachedir repo if [ -e "/.pkgs" ]; then dir="/.pkgs" + elif [ -e "/var/cache/dnf" ]; then + dir="/var/cache/dnf" else - dir="/var/cache/{dnf,yum}" + dir="/var/cache/yum" fi find $dir -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo createrepo repo -- Gitee From 6e6558970715e82c7359fb1ff2675cd7ec83ae65 Mon Sep 17 00:00:00 2001 From: hy Date: Tue, 31 Mar 2020 09:57:24 +0800 Subject: [PATCH 6/6] update libguestfs.spec. --- libguestfs.spec | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index b2bf62f..c3185b5 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -202,16 +202,11 @@ ip route list ||: if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then extra= else - install -d cachedir repo if [ -e "/.pkgs" ]; then - dir="/.pkgs" - elif [ -e "/var/cache/dnf" ]; then - dir="/var/cache/dnf" - else - dir="/var/cache/yum" + install -d cachedir repo + find /.pkgs -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo + createrepo repo fi - find $dir -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo - createrepo repo sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf extra=--with-supermin-packager-config=$(pwd)/yum.conf fi -- Gitee