From 89e3bb49e81dba1b05a018cc1d0e74353b2c6b62 Mon Sep 17 00:00:00 2001 From: lizhenhua Date: Tue, 26 May 2020 16:50:13 +0800 Subject: [PATCH 1/2] Add yaml file --- libguestfs.spec | 14 +++++++++----- libguestfs.yaml | 4 ++++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 libguestfs.yaml diff --git a/libguestfs.spec b/libguestfs.spec index c34a06d..ebc6c0d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -202,11 +202,15 @@ 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 - extra=--with-supermin-packager-config=$(pwd)/yum.conf + if [ ! -d "/.pkgs" ];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 + extra=--with-supermin-packager-config=$(pwd)/yum.conf + fi fi %global localconfigure \ diff --git a/libguestfs.yaml b/libguestfs.yaml new file mode 100644 index 0000000..be83263 --- /dev/null +++ b/libguestfs.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: libguestfs/libguestfs +tag_prefix: ^v +seperator: . -- Gitee From bb13c6ad1470f5c24438d154e6c02aa5b392e8c9 Mon Sep 17 00:00:00 2001 From: lizhenhua Date: Tue, 26 May 2020 17:41:38 +0800 Subject: [PATCH 2/2] modify spec file --- libguestfs.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index ebc6c0d..032932d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -202,15 +202,13 @@ ip route list ||: if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then extra= else - if [ ! -d "/.pkgs" ];then - extra= - else - install -d cachedir repo + install -d cachedir repo + if [ -d "/.pkgs" ];then find /.pkgs/ -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 + createrepo repo + sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf + extra=--with-supermin-packager-config=$(pwd)/yum.conf fi %global localconfigure \ -- Gitee