[arch-commits] Commit in (booster booster/repos booster/trunk booster/trunk/PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Wed Feb 10 05:08:35 UTC 2021


    Date: Wednesday, February 10, 2021 @ 05:08:35
  Author: anatolik
Revision: 407772

Add booster initramfs generator to [extra]

Added:
  booster/
  booster/repos/
  booster/trunk/
  booster/trunk/PKGBUILD

----------+
 PKGBUILD |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Added: booster/trunk/PKGBUILD
===================================================================
--- booster/trunk/PKGBUILD	                        (rev 0)
+++ booster/trunk/PKGBUILD	2021-02-10 05:08:35 UTC (rev 407772)
@@ -0,0 +1,47 @@
+# Maintainer: Anatol Pomozov
+
+pkgname=booster
+pkgver=0.2
+pkgrel=1
+pkgdesc='Fast and secure initramfs generator'
+arch=(x86_64)
+url='http://github.com/anatol/booster'
+license=(MIT)
+depends=(bash)
+makedepends=(go)
+#checkdepends=(qemu-headless linux tang)
+optdepends=('busybox: to enable emergency shell at the boot time')
+backup=(etc/booster.yaml)
+provides=(initramfs)
+source=(booster-$pkgver.zip::https://github.com/anatol/booster/archive/$pkgver.zip)
+sha512sums=('f07c01b59744c87f0a45982de1bf3c6811963e7e1b8d21acd55a7dcea8c8f262ff3febe3da3cf2534564f66ac70d03fa6eb8b4c28d91da2c731c3f40b7429cd4')
+
+build() {
+  cd booster-$pkgver
+
+  cd generator
+  CGO_CPPFLAGS="${CPPFLAGS}" CGO_CFLAGS="${CFLAGS}" CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="${LDFLAGS}" \
+    go build -trimpath \
+      -buildmode=pie \
+      -mod=readonly \
+      -modcacherw \
+      -ldflags "-linkmode external -extldflags \"${LDFLAGS}\""
+
+  cd ../init
+  CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+check() {
+  cd booster-$pkgver/tests
+  # arch chroot does not allow access to KVM
+  # TEST_DISABLE_KVM=1 go test -v # integration tests require a lot of time and space to build 10G images
+}
+
+package() {
+  cd booster-$pkgver
+  install -Dp -m755 generator/booster "$pkgdir/usr/bin/booster"
+  install -Dp -m644 generator/booster.1 "$pkgdir/usr/share/man/man1/booster.1"
+  install -Dp -m755 init/init "$pkgdir/usr/lib/booster/init"
+  install -Dp -m644 packaging/arch/90-booster.hook "$pkgdir/usr/share/libalpm/hooks/90-booster.hook"
+  install -Dp -m755 packaging/arch/booster-install "$pkgdir/usr/share/libalpm/scripts/booster-install"
+}



More information about the arch-commits mailing list