aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libguestfs/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libguestfs/APKBUILD')
-rw-r--r--testing/libguestfs/APKBUILD191
1 files changed, 113 insertions, 78 deletions
diff --git a/testing/libguestfs/APKBUILD b/testing/libguestfs/APKBUILD
index 7bf2674b57d..fb5610f90a8 100644
--- a/testing/libguestfs/APKBUILD
+++ b/testing/libguestfs/APKBUILD
@@ -1,112 +1,147 @@
-# Maintainer: Fathi Boudra <fathi.boudra@linaro.org>
+# Contributor: Fathi Boudra <fathi.boudra@linaro.org>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libguestfs
-pkgver=1.40.2
-pkgrel=7
-pkgdesc="tools for accessing and modifying virtual machine disk images"
+pkgver=1.52.0
+pkgrel=1
+pkgdesc="Access and modify virtual machine disk images"
url="https://libguestfs.org/"
-arch="" # FTBFS
+# riscv64, loongarch64: blocked by ocaml
+arch="all !riscv64 !loongarch64"
license="GPL-2.0-or-later"
-depends="cdrkit curl gptfdisk qemu-img qemu-system-x86_64"
+depends="
+ cmd:mkisofs
+ curl
+ qemu-img
+ "
makedepends="
- autoconf automake libtool
- acl-dev
- augeas-dev
- bash
- bison
- coreutils
- cpio
- file-dev
- flex
- fuse-dev
- gawk
- gettext-dev
- hivex-dev
- jansson-dev
- gperf
- libcap-dev
- libconfig-dev
- libselinux-dev
- libselinux-utils
- libtirpc-dev
- libvirt-dev
- libxml2-dev
- libxml2-utils
- ncurses-dev
- ocaml
- ocaml-findlib
- pcre-dev
- perl
- psmisc
- python3-dev
- readline-dev
- xz
- xz-dev
-"
-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
- python-3.8.patch
-"
-options="!check charset.alias" # Test suite does not support Alpine Linux at this moment
+ acl-dev
+ augeas-dev
+ bash
+ bison
+ cmd:xzcat
+ cmd:zstdcat
+ coreutils
+ file-dev
+ flex
+ fuse-dev
+ gawk
+ gperf
+ hivex-dev
+ jansson-dev
+ libcap-dev
+ libconfig-dev
+ libtirpc-dev
+ libxml2-dev
+ lua5.1-dev
+ musl-libintl
+ ocaml
+ ocaml-findlib
+ pcre2-dev
+ perl
+ python3-dev
+ readline-dev
+ ruby-dev
+ ruby-rake
+ zstd-dev
+ "
+subpackages="
+ $pkgname-static
+ $pkgname-dev
+ $pkgname-doc
+ guestfs-tools
+ lua5.1-$pkgname:_lua51
+ py3-$pkgname:_py
+ ruby-$pkgname:_ruby
+ "
+source="https://download.libguestfs.org/${pkgver%.*}-stable/libguestfs-$pkgver.tar.gz
+ fix-missing-int64_t.patch
+ fix-missing-error-h.patch
+ "
+options="!check" # XXX: Test suite does not support Alpine Linux at this moment
+
+case "$CARCH" in
+ arm*) _qemu="qemu-system-arm";;
+ ppc64le) _qemu="qemu-system-ppc64";;
+ x86_64 | x86) _qemu="qemu-system-x86_64";;
+ *) _qemu="qemu-system-$CARCH";;
+esac
+depends="$depends $_qemu"
prepare() {
default_prepare
- autoreconf -vif
+
# busybox gzip does not support --best
sed -i 's/gzip --best/gzip -9/g' test-data/files/*
- # musl lacks error.h
- cp -a "$srcdir"/error.h "$builddir"/lib/
}
build() {
+ # TODO: build and package appliance
+ # NOTE: libvirt is a huge dependency linked into libguestfs.so,
+ # so it cannot be easily split.
PYTHON=/usr/bin/python3 ./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
+ --disable-nls \
+ --enable-fuse \
--disable-probes \
--disable-daemon \
--disable-appliance \
--disable-ocaml \
--disable-perl \
- --disable-ruby \
+ --enable-ruby \
--disable-haskell \
--disable-php \
--disable-erlang \
- --disable-lua \
+ --enable-lua \
--disable-golang \
--disable-gobject \
- --without-java
- # Building index-parse.c and index-scan.c by hand works around a race
- # condition in the autotools cruft, where two other more copies of yacc
- # race with each other, resulting in a corrupted file.
- make -j1 -C builder index-parse.c
- make -j1 -C builder index-scan.c
- make V=1 INSTALLDIRS=vendor LTLIBINTL=-lintl
+ --disable-rust \
+ --enable-vala=no \
+ --with-readline \
+ --without-java \
+ --without-libvirt \
+ --with-qemu="$_qemu"
+ make V=1
}
-# FIXME test require supermin to create an appliance or a prebuilt binary appliance
-# check() {
-# cd "$builddir"
-# wget http://download.libguestfs.org/binaries/appliance/appliance-1.38.0.tar.xz -O /tmp/appliance-1.38.0.tar.xz
-# $(cd /tmp && tar xf appliance-1.38.0.tar.xz)
-# export LIBGUESTFS_PATH=/tmp/appliance
-# make quickcheck
-# }
-
package() {
- make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" install
- make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" -C python install
+ # INSTALLDIRS ensures that Perl and Ruby libs are installed in the
+ # vendor dir not the site dir.
+ make V=1 DESTDIR="$pkgdir" INSTALLDIRS="vendor" install
+}
+
+tools() {
+ pkgdesc="$pkgdesc (CLI tools)"
+ depends=""
+
+ amove etc
+ amove usr/bin
+}
+
+_lua51() {
+ pkgdesc="Lua 5.1 bindings for $pkgname"
+ depends=""
+
+ amove usr/lib/lua
}
_py() {
- local _py=${subpkgname##-*}
- local _pyver=${_py%py}
- pkgdesc="$pkgname - Python 3 bindings"
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
+ pkgdesc="Python 3 bindings for $pkgname"
+ depends=""
+
+ amove usr/lib/python3*
}
-sha512sums="d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2 libguestfs-1.40.2.tar.gz
-c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h
-8c22a83043d965e8404228f224c5daa83bdf3ea9ddbe56dd8f1afd76344cdd61d664d9086160844dc0bcd02cc737c083db116010bca912a65806b52630dcc366 python-3.8.patch"
+_ruby() {
+ pkgdesc="Ruby bindings for $pkgname"
+ depends=""
+
+ amove usr/lib/ruby
+}
+
+sha512sums="
+48dfaabb6b371ab3476b42310d363addf2fd1dfe43876be3bc984953f6919a30c7de13ef235d83fdd39117d71aa6bbfb5fbb645c1b17bc3031798a2a2b3df9d7 libguestfs-1.52.0.tar.gz
+9ca7a2ac8572553394d42eda0e02f8b694651288ce58f1f4c7569eaab81cd3295b0992dcd6452a42b4b284cec54a666fd277eafcee05d54d05b1e84560ac7b06 fix-missing-int64_t.patch
+e4d0cac4ba856d871ca524ebeb4dedf25b3a956fe6a1ab4c93481eba03954fb684621c63085526fc1846b3bffd4cbe30dadfba2b92844d24b8ec277c0e84bf5c fix-missing-error-h.patch
+"