From efebb7b4e396dc88deeb7157e147f979362a4dac Mon Sep 17 00:00:00 2001 From: hy Date: Fri, 3 Apr 2020 18:30:18 +0800 Subject: [PATCH] add packages which are installed on the appliance for openEuler --- ...kages-on-the-appliance-for-openEuler.patch | 57 +++++++++++++++++++ libguestfs.spec | 24 +++++--- yum.conf.aarch64.in | 17 ++++++ yum.conf.in => yum.conf.x86_64.in | 7 +-- 4 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 0000-add-installed-packages-on-the-appliance-for-openEuler.patch create mode 100644 yum.conf.aarch64.in rename yum.conf.in => yum.conf.x86_64.in (65%) 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..50d396c --- /dev/null +++ b/0000-add-installed-packages-on-the-appliance-for-openEuler.patch @@ -0,0 +1,57 @@ +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 + +Add packages which are installed on the appliance for openEuler +Signed-off-by: hy +--- + appliance/packagelist.in | 25 ++++++++++++++++++++++++++ + 1 file changed, 255555ertions(+) + +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,30 @@ ifelse(MAGEIA,1, + xz + ) + ++ifelse(OPENEULER,1, ++ augeas ++ cryptsetup ++ dhcp ++ genisoimage ++ hivex ++ iproute ++ iputils ++ jansson ++ kernel ++ libcap ++ libldm ++ libtirpc ++ 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..2d175c2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -4,14 +4,17 @@ 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+ URL: http://libguestfs.org/ Source0: http://download.libguestfs.org/1.40-stable/libguestfs-1.40.2.tar.gz Source1: guestfish.sh -Source2: yum.conf.in +Source2: yum.conf.aarch64.in +Source3: yum.conf.x86_64.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 @@ -194,18 +197,17 @@ 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 ||: 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 - createrepo repo - sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf + %ifarch aarch64 + sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf + %else + sed -e "s|@PWD@|$(pwd)|" %{SOURCE3} > yum.conf + %endif extra=--with-supermin-packager-config=$(pwd)/yum.conf fi @@ -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 and modify the yum source. + * Tue Mar 10 2020 yangjian - 1:1.40.2-6 - Type:NA - ID:NA diff --git a/yum.conf.aarch64.in b/yum.conf.aarch64.in new file mode 100644 index 0000000..c1d13d5 --- /dev/null +++ b/yum.conf.aarch64.in @@ -0,0 +1,17 @@ +[main] +cachedir=@PWD@/cachedir +keepcache=0 +debuglevel=2 +logfile=@PWD@/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 +reposdir=/dev/null +modulesdir=@PWD@/modules + +[openEuler] +name=openEuler +baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64 +enabled=1 +gpgcheck=0 diff --git a/yum.conf.in b/yum.conf.x86_64.in similarity index 65% rename from yum.conf.in rename to yum.conf.x86_64.in index c1fbe8e..48e9bac 100644 --- a/yum.conf.in +++ b/yum.conf.x86_64.in @@ -10,9 +10,8 @@ assumeyes=1 reposdir=/dev/null modulesdir=@PWD@/modules -[local] -name=local -baseurl=file://@PWD@/repo -failovermethod=priority +[openEuler] +name=openEuler +baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/everything/x86_64 enabled=1 gpgcheck=0 -- Gitee