From d99915c2b447035d78a5ed1d2b1ebeabbf2d796e Mon Sep 17 00:00:00 2001
From: Leo <thinkabit.ukim@gmail.com>
Date: Sun, 26 May 2019 01:37:29 -0300
Subject: [PATCH] testing/libguestfs: modernize, fix license

Closes: GH-8131
---
 testing/libguestfs/APKBUILD | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/testing/libguestfs/APKBUILD b/testing/libguestfs/APKBUILD
index f8851a69d288..1bff29eddc2b 100644
--- a/testing/libguestfs/APKBUILD
+++ b/testing/libguestfs/APKBUILD
@@ -1,18 +1,17 @@
 # Maintainer: Fathi Boudra <fathi.boudra@linaro.org>
 pkgname=libguestfs
 pkgver=1.40.2
-pkgrel=2
+pkgrel=3
 pkgdesc="tools for accessing and modifying virtual machine disk images"
 url="http://libguestfs.org/"
 arch="x86_64"
-license="GPL2"
+license="GPL-2.0-or-later"
 depends="cdrkit curl gptfdisk qemu-img qemu-system-x86_64"
 makedepends="
  acl-dev
  augeas-dev
  bash
  bison
- cdrkit
  coreutils
  cpio
  file-dev
@@ -23,7 +22,6 @@ makedepends="
  hivex-dev
  jansson-dev
  gperf
- gptfdisk
  libcap-dev
  libconfig-dev
  libselinux-dev
@@ -39,23 +37,18 @@ makedepends="
  perl
  psmisc
  python3-dev
- qemu-img
- qemu-system-x86_64
  readline-dev
  xz
  xz-dev
 "
-install=""
 subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py3-$pkgname:_py"
 source="
  http://download.libguestfs.org/1.40-stable/$pkgname-$pkgver.tar.gz
  https://raw.githubusercontent.com/alpinelinux/aports/3.9-stable/main/kbd/error.h
 "
-builddir="$srcdir/$pkgname-$pkgver"
 options="!check charset.alias" # Test suite does not support Alpine Linux at this moment
 
 prepare() {
-	cd "$builddir"
 	# busybox gzip does not support --best
 	sed -i 's/gzip --best/gzip -9/g' test-data/files/*
 	# musl lacks error.h
@@ -63,7 +56,6 @@ prepare() {
 }
 
 build() {
-	cd "$builddir"
 	PYTHON=/usr/bin/python3 ./configure \
 		--prefix=/usr \
 		--mandir=/usr/share/man \
@@ -99,7 +91,6 @@ build() {
 # }
 
 package() {
-	cd "$builddir"
 	make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" install
 	make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" -C python install
 }
-- 
GitLab