Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: booster-0.3
@ 2021-03-13 14:53 travankor
  2021-03-13 15:16 ` [PR REVIEW] " ericonr
                   ` (65 more replies)
  0 siblings, 66 replies; 67+ messages in thread
From: travankor @ 2021-03-13 14:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]

There is a new pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2926 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 00000000000..0efbcecb56e
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 00000000000..ef13d1967a6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 00000000000..08e1e9a7cd6
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
@ 2021-03-13 15:16 ` ericonr
  2021-03-13 22:55 ` travankor
                   ` (64 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-03-13 15:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r593763332

Comment:
From the arch package, it would seem busybox is a dependency only for the rescue shell, and bash is a strict dependency...

Why did you go with -static, too?

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
  2021-03-13 15:16 ` [PR REVIEW] " ericonr
@ 2021-03-13 22:55 ` travankor
  2021-03-13 23:10 ` travankor
                   ` (63 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-13 22:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

New review comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r593811674

Comment:
I'm not yet sure how bash is a dependency (Arch uses `#!/bin/bash` instead of `#!/bin/sh` for the kernel hooks but that's all I can see so far).

I would say rescue shell is core functionality, and Arch's busybox package is -static.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
  2021-03-13 15:16 ` [PR REVIEW] " ericonr
  2021-03-13 22:55 ` travankor
@ 2021-03-13 23:10 ` travankor
  2021-03-13 23:11 ` travankor
                   ` (62 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-13 23:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

New review comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r593813216

Comment:
Any idea on how to cross-compile this? I'm not really familiar with why these options are needed to build this.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (2 preceding siblings ...)
  2021-03-13 23:10 ` travankor
@ 2021-03-13 23:11 ` travankor
  2021-03-13 23:30 ` ericonr
                   ` (61 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-13 23:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

New review comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r593813216

Comment:
Any idea on how to cross-compile this? I'm not really familiar with why these options are needed.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (3 preceding siblings ...)
  2021-03-13 23:11 ` travankor
@ 2021-03-13 23:30 ` ericonr
  2021-03-15  3:06 ` [PR PATCH] [Updated] " travankor
                   ` (60 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-03-13 23:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r593815057

Comment:
Fair enough. It would be nice to have a busybox virtual, if this can work with non static one.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (4 preceding siblings ...)
  2021-03-13 23:30 ` ericonr
@ 2021-03-15  3:06 ` travankor
  2021-03-15  3:17 ` travankor
                   ` (59 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4296 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..08e1e9a7cd67
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

From dd377e9fd74b6ae8d2e81942d09935558112f664 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:06:21 -0700
Subject: [PATCH 2/2] booster: update to 0.3.

---
 srcpkgs/booster/template | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 08e1e9a7cd67..69373b754770 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -5,7 +5,7 @@ revision=1
 build_style=go
 go_import_path=github.com/anatol/booster
 go_package="${go_import_path}/init ${go_import_path}/generator"
-go_mod_mode=readonly
+#go_mod_mode="readonly"
 hostmakedepends="git"
 depends="busybox-static"
 short_desc="Fast and secure initramfs generator"
@@ -15,14 +15,7 @@ homepage="https://github.com/anatol/booster"
 distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
-do_build() {
-	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"
-
-	cd ../init
-	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
-}
+go_ldflags="-linkmode external"
 
 do_install() {
 	vbin generator/booster

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (5 preceding siblings ...)
  2021-03-15  3:06 ` [PR PATCH] [Updated] " travankor
@ 2021-03-15  3:17 ` travankor
  2021-03-15  3:32 ` travankor
                   ` (58 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4381 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..08e1e9a7cd67
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

From f455a26ea3b357252cf6857112477fa2f30ccb99 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:06:21 -0700
Subject: [PATCH 2/2] booster: update to 0.3.

---
 srcpkgs/booster/template | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 08e1e9a7cd67..290c6d5b8888 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/anatol/booster
 go_package="${go_import_path}/init ${go_import_path}/generator"
-go_mod_mode=readonly
 hostmakedepends="git"
 depends="busybox-static"
 short_desc="Fast and secure initramfs generator"
@@ -15,17 +14,10 @@ homepage="https://github.com/anatol/booster"
 distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
-do_build() {
-	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"
-
-	cd ../init
-	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
-}
+#go_ldflags="-linkmode external"
 
 do_install() {
-	vbin generator/booster
+	vbin generator/generator booster
 	vman generator/booster.1
 	vinstall init/init 755 usr/lib/booster
 }

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (6 preceding siblings ...)
  2021-03-15  3:17 ` travankor
@ 2021-03-15  3:32 ` travankor
  2021-03-15  3:35 ` travankor
                   ` (57 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4425 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..08e1e9a7cd67
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

From 35cffc601b95a6645a96c3bf2a41167a6be9e670 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:06:21 -0700
Subject: [PATCH 2/2] booster: update to 0.3.

---
 srcpkgs/booster/template | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 08e1e9a7cd67..37dfb4efab19 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/anatol/booster
 go_package="${go_import_path}/init ${go_import_path}/generator"
-go_mod_mode=readonly
 hostmakedepends="git"
 depends="busybox-static"
 short_desc="Fast and secure initramfs generator"
@@ -15,19 +14,10 @@ homepage="https://github.com/anatol/booster"
 distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
-do_build() {
-	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"
-
-	cd ../init
-	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
-}
-
 do_install() {
-	vbin generator/booster
+	vbin ${GO_PATH}/bin/generator booster
 	vman generator/booster.1
-	vinstall init/init 755 usr/lib/booster
+	vinstall ${GO_PATH}/bin/init 755 usr/lib/booster
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (7 preceding siblings ...)
  2021-03-15  3:32 ` travankor
@ 2021-03-15  3:35 ` travankor
  2021-03-15  3:50 ` travankor
                   ` (56 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4423 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..08e1e9a7cd67
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

From 6489b01661472ed30dcef2d010ba5bc45f31b2b6 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:06:21 -0700
Subject: [PATCH 2/2] booster: update to 0.3.

---
 srcpkgs/booster/template | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 08e1e9a7cd67..fef73654b37a 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -5,7 +5,6 @@ revision=1
 build_style=go
 go_import_path=github.com/anatol/booster
 go_package="${go_import_path}/init ${go_import_path}/generator"
-go_mod_mode=readonly
 hostmakedepends="git"
 depends="busybox-static"
 short_desc="Fast and secure initramfs generator"
@@ -15,19 +14,10 @@ homepage="https://github.com/anatol/booster"
 distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
-do_build() {
-	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"
-
-	cd ../init
-	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
-}
-
 do_install() {
-	vbin generator/booster
+	vbin ${GOPATH}/bin/generator booster
 	vman generator/booster.1
-	vinstall init/init 755 usr/lib/booster
+	vinstall ${GOPATH}/bin/init 755 usr/lib/booster
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (8 preceding siblings ...)
  2021-03-15  3:35 ` travankor
@ 2021-03-15  3:50 ` travankor
  2021-03-15  3:55 ` travankor
                   ` (55 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 5730 bytes --]

From e35da2f9508e6d033759da9c6d3b19e8fa9166b8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/3] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 38 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..08e1e9a7cd67
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/init ${go_import_path}/generator"
+go_mod_mode=readonly
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_build() {
+	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"
+
+	cd ../init
+	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+do_install() {
+	vbin generator/booster
+	vman generator/booster.1
+	vinstall init/init 755 usr/lib/booster
+}
+
+post_install() {
+	vlicense LICENSE
+
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+}

From 29d709ce2e7eb5bdd1128596bb2b0355e0e7e1b1 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:06:21 -0700
Subject: [PATCH 2/3] booster: update to 0.3.

---
 srcpkgs/booster/template | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 08e1e9a7cd67..aabc1b476705 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -4,8 +4,7 @@ version=0.3
 revision=1
 build_style=go
 go_import_path=github.com/anatol/booster
-go_package="${go_import_path}/init ${go_import_path}/generator"
-go_mod_mode=readonly
+go_package="${go_import_path}/generator ${go_import_path}/init"
 hostmakedepends="git"
 depends="busybox-static"
 short_desc="Fast and secure initramfs generator"
@@ -15,24 +14,14 @@ homepage="https://github.com/anatol/booster"
 distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
-do_build() {
-	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"
-
-	cd ../init
-	CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
-}
-
 do_install() {
-	vbin generator/booster
+	vbin ${GOPATH}/bin/generator booster
+	vinstall ${GOPATH}/bin/init 755 usr/lib/booster
 	vman generator/booster.1
-	vinstall init/init 755 usr/lib/booster
 }
 
 post_install() {
-	vlicense LICENSE
-
 	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
 	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
 }

From 88ebbcc7834ae25adb1e3bdaaa23843844fd5773 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sun, 14 Mar 2021 20:49:54 -0700
Subject: [PATCH 3/3] booster: update to 0.3.

---
 srcpkgs/booster/template | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index aabc1b476705..428d7ef3fb68 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -15,8 +15,13 @@ distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
 checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
 
 do_install() {
-	vbin ${GOPATH}/bin/generator booster
-	vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
 	vman generator/booster.1
 }
 

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (9 preceding siblings ...)
  2021-03-15  3:50 ` travankor
@ 2021-03-15  3:55 ` travankor
  2021-03-16 14:03 ` travankor
                   ` (54 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-15  3:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2780 bytes --]

From b7f7eda5af22e9270b6e54b38d16dbbba7076876 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 ++++++++
 srcpkgs/booster/template                   | 32 ++++++++++++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..428d7ef3fb68
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,32 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	vman generator/booster.1
+}
+
+post_install() {
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (10 preceding siblings ...)
  2021-03-15  3:55 ` travankor
@ 2021-03-16 14:03 ` travankor
  2021-04-11  4:01 ` [PR REVIEW] " ericonr
                   ` (53 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-03-16 14:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.3
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2872 bytes --]

From d2f70aa8bd331f3c3368456a9cb66cea3dc6ce5e Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.3

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 35 ++++++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..952b76d1dc8e
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,35 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.3
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=77067a5056e1070aee0f27130c31ebbf7cacca18644dc4906290371a04f07371
+conf_files="/etc/booster.yaml"
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	vman generator/booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.3
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (11 preceding siblings ...)
  2021-03-16 14:03 ` travankor
@ 2021-04-11  4:01 ` ericonr
  2021-04-11 17:31 ` [PR PATCH] [Updated] New package: booster-0.4 travankor
                   ` (52 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-04-11  4:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r611126399

Comment:
Are these not being installed automatically? :/

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (12 preceding siblings ...)
  2021-04-11  4:01 ` [PR REVIEW] " ericonr
@ 2021-04-11 17:31 ` travankor
  2021-04-12 13:21 ` travankor
                   ` (51 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-11 17:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2909 bytes --]

From 06172cfd2a797c84ac0551affd0c254bc8e0f35b Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++++
 srcpkgs/booster/template                   | 36 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..99f2da20c341
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,36 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (13 preceding siblings ...)
  2021-04-11 17:31 ` [PR PATCH] [Updated] New package: booster-0.4 travankor
@ 2021-04-12 13:21 ` travankor
  2021-04-25  2:03 ` travankor
                   ` (50 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-12 13:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 5458 bytes --]

From 76ab2f6fac0da5205fb0a7117e0cd9d49c5cd5b7 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 37 +++++++++++++++++
 4 files changed, 111 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..9d3ba94fc1f2
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,37 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (14 preceding siblings ...)
  2021-04-12 13:21 ` travankor
@ 2021-04-25  2:03 ` travankor
  2021-04-25  3:38 ` travankor
                   ` (49 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25  2:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 5483 bytes --]

From 8a5026ebd8fb99813e60df520c4e9f40797fe318 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 39 ++++++++++++++++++
 4 files changed, 113 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..99e3208de195
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,39 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+export CGO_ENABLED=0
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (15 preceding siblings ...)
  2021-04-25  2:03 ` travankor
@ 2021-04-25  3:38 ` travankor
  2021-04-25  3:51 ` travankor
                   ` (48 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25  3:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 5513 bytes --]

From 4a9f9164d77ff9b805b7d318b30e7973391f0247 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 38 +++++++++++++++++
 4 files changed, 112 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..0efbcecb56ec
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..922a19f23aee
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+go_ldflags="-linkmode external -extldflags "-static""
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (16 preceding siblings ...)
  2021-04-25  3:38 ` travankor
@ 2021-04-25  3:51 ` travankor
  2021-04-25 13:16 ` travankor
                   ` (47 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25  3:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 5520 bytes --]

From e6bc852d7e6b4a985604aa53cddb9de7947d7d16 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 38 +++++++++++++++++
 4 files changed, 112 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..922a19f23aee
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,38 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+go_ldflags="-linkmode external -extldflags "-static""
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (17 preceding siblings ...)
  2021-04-25  3:51 ` travankor
@ 2021-04-25 13:16 ` travankor
  2021-04-25 17:08 ` [PR REVIEW] " travankor
                   ` (46 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25 13:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 6675 bytes --]

From c14adb9fc09c40757d81e0a4e079345992d1edb5 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/builtin.patch      | 27 ++++++++++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 41 ++++++++++++++++++
 5 files changed, 142 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/builtin.patch
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/builtin.patch b/srcpkgs/booster/patches/builtin.patch
new file mode 100644
index 000000000000..752b613a4dab
--- /dev/null
+++ b/srcpkgs/booster/patches/builtin.patch
@@ -0,0 +1,27 @@
+From e85ea7386f456afaa4f646e21c3407e39bb61bb4 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Sat, 24 Apr 2021 23:16:55 -0700
+Subject: [PATCH] Do not append a builtin module to extraDependencies list
+
+Closes #81
+---
+ generator/kmod.go | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 4cc2c50..c548ee2 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -682,7 +682,11 @@ func readHostModules() (set, error) {
+ }
+ 
+ func (k *Kmod) addExtraDep(mod string, deps ...string) {
+-	k.extraDep[mod] = append(k.extraDep[mod], deps...)
++	for _, dep := range deps {
++		if !k.builtinModules[dep] {
++			k.extraDep[mod] = append(k.extraDep[mod], dep)
++		}
++	}
+ }
+ 
+ func (k *Kmod) forceLoad(mods ...string) {
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..a3df73671a61
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=2
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "vconsole: false" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (18 preceding siblings ...)
  2021-04-25 13:16 ` travankor
@ 2021-04-25 17:08 ` travankor
  2021-04-25 17:14 ` [PR PATCH] [Updated] " travankor
                   ` (45 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25 17:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New review comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r619846453

Comment:
The second binary needs to put in a special path not `vbin`'ed

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (19 preceding siblings ...)
  2021-04-25 17:08 ` [PR REVIEW] " travankor
@ 2021-04-25 17:14 ` travankor
  2021-04-25 17:17 ` travankor
                   ` (44 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25 17:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 6672 bytes --]

From 70a4e19377784e511f1b45bda1df14ecd377ec89 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/builtin.patch      | 27 ++++++++++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 41 ++++++++++++++++++
 5 files changed, 142 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/builtin.patch
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/builtin.patch b/srcpkgs/booster/patches/builtin.patch
new file mode 100644
index 000000000000..752b613a4dab
--- /dev/null
+++ b/srcpkgs/booster/patches/builtin.patch
@@ -0,0 +1,27 @@
+From e85ea7386f456afaa4f646e21c3407e39bb61bb4 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Sat, 24 Apr 2021 23:16:55 -0700
+Subject: [PATCH] Do not append a builtin module to extraDependencies list
+
+Closes #81
+---
+ generator/kmod.go | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 4cc2c50..c548ee2 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -682,7 +682,11 @@ func readHostModules() (set, error) {
+ }
+ 
+ func (k *Kmod) addExtraDep(mod string, deps ...string) {
+-	k.extraDep[mod] = append(k.extraDep[mod], deps...)
++	for _, dep := range deps {
++		if !k.builtinModules[dep] {
++			k.extraDep[mod] = append(k.extraDep[mod], dep)
++		}
++	}
+ }
+ 
+ func (k *Kmod) forceLoad(mods ...string) {
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..19e042dae2fa
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=2
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > boster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (20 preceding siblings ...)
  2021-04-25 17:14 ` [PR PATCH] [Updated] " travankor
@ 2021-04-25 17:17 ` travankor
  2021-04-25 17:19 ` [PR PATCH] [Updated] " travankor
                   ` (43 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25 17:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-826357915

Comment:
Booting works with some patches, there might be some edge cases for exotic setups. Kernel hooks handle the destination directory, and the config file is related to image generation.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (21 preceding siblings ...)
  2021-04-25 17:17 ` travankor
@ 2021-04-25 17:19 ` travankor
  2021-05-13 13:19 ` travankor
                   ` (42 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-04-25 17:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 6673 bytes --]

From 310836f5dc06eef2cf142a58415bac8494a58bb8 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.4

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 +++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++++
 srcpkgs/booster/patches/builtin.patch      | 27 ++++++++++++
 srcpkgs/booster/patches/modprobe.patch     | 48 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 41 ++++++++++++++++++
 5 files changed, 142 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/builtin.patch
 create mode 100644 srcpkgs/booster/patches/modprobe.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/builtin.patch b/srcpkgs/booster/patches/builtin.patch
new file mode 100644
index 000000000000..752b613a4dab
--- /dev/null
+++ b/srcpkgs/booster/patches/builtin.patch
@@ -0,0 +1,27 @@
+From e85ea7386f456afaa4f646e21c3407e39bb61bb4 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Sat, 24 Apr 2021 23:16:55 -0700
+Subject: [PATCH] Do not append a builtin module to extraDependencies list
+
+Closes #81
+---
+ generator/kmod.go | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 4cc2c50..c548ee2 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -682,7 +682,11 @@ func readHostModules() (set, error) {
+ }
+ 
+ func (k *Kmod) addExtraDep(mod string, deps ...string) {
+-	k.extraDep[mod] = append(k.extraDep[mod], deps...)
++	for _, dep := range deps {
++		if !k.builtinModules[dep] {
++			k.extraDep[mod] = append(k.extraDep[mod], dep)
++		}
++	}
+ }
+ 
+ func (k *Kmod) forceLoad(mods ...string) {
diff --git a/srcpkgs/booster/patches/modprobe.patch b/srcpkgs/booster/patches/modprobe.patch
new file mode 100644
index 000000000000..9ffb47a3ecd7
--- /dev/null
+++ b/srcpkgs/booster/patches/modprobe.patch
@@ -0,0 +1,48 @@
+From 68646929c4ff7e144182564fea4272cb3b94cff6 Mon Sep 17 00:00:00 2001
+From: Anatol Pomazau <apomazau@twitter.com>
+Date: Sun, 11 Apr 2021 09:45:56 -0700
+Subject: [PATCH] modprobe parser needs to handle lines that contain only
+ whitespaces
+
+Closes #78
+---
+ generator/kmod.go      | 3 +--
+ generator/kmod_test.go | 4 ++++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/generator/kmod.go b/generator/kmod.go
+index 88df50c..4cc2c50 100644
+--- a/generator/kmod.go
++++ b/generator/kmod.go
+@@ -719,6 +719,7 @@ func parseModprobe(content string, options map[string][]string) error {
+ 	)
+ 	for s.Scan() {
+ 		line := s.Text()
++		line = strings.TrimSpace(line)
+ 		if len(line) == 0 || line[0] == '#' {
+ 			if multiLine {
+ 				return fmt.Errorf("multiline directive contains an empty or comment line")
+@@ -726,8 +727,6 @@ func parseModprobe(content string, options map[string][]string) error {
+ 			continue
+ 		}
+ 
+-		line = strings.TrimSpace(line)
+-
+ 		if line[len(line)-1] == '\\' {
+ 			multiLine = true
+ 			b.WriteString(line[:len(line)-1])
+diff --git a/generator/kmod_test.go b/generator/kmod_test.go
+index aa48b48..8b61dba 100644
+--- a/generator/kmod_test.go
++++ b/generator/kmod_test.go
+@@ -184,6 +184,10 @@ func TestParseModprobe(t *testing.T) {
+ 		map[string][]string{
+ 			"btusb": {"reset=1"},
+ 		})
++	check("# use \"reset=1\" as default, since it should be safe for recent devices and\n  \t  \n# solves all kind of problems.\noptions btusb reset=1",
++		map[string][]string{
++			"btusb": {"reset=1"},
++		})
+ 	check("install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS\n", map[string][]string{})
+ 	check("# When bonding module is loaded, it creates bond0 by default due to max_bonds\n# option default value 1. This interferes with the network configuration\n# management / networkd, as it is not possible to detect whether this bond0 was\n# intentionally configured by the user, or should be managed by\n# networkd/NM/etc. Therefore disable bond0 creation.\n\noptions bonding max_bonds=0\n\n# Do the same for dummy0.\n\noptions dummy numdummies=0\n",
+ 		map[string][]string{
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..f7bfe766fc01
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.4
+revision=2
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=440def00073a35d012f9b65a4e560d5f81bec279516104dab173b40a5310da27
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.4
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (22 preceding siblings ...)
  2021-04-25 17:19 ` [PR PATCH] [Updated] " travankor
@ 2021-05-13 13:19 ` travankor
  2021-05-15 13:36 ` [PR PATCH] [Updated] New package: booster-0.5 travankor
                   ` (41 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-05-13 13:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.4
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2974 bytes --]

From e4fd4489ff4c08a0c76faeae691eed948cfac919 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.5

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 ++++++
 srcpkgs/booster/template                   | 41 ++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..29e495d0fa0e
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.5
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=aea7e30cad1987bcc61de0c18b4273b477782c57a331ca47d92d0146860529b0
+conf_files="/etc/booster.yaml"
+patch_args="-Np1"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (23 preceding siblings ...)
  2021-05-13 13:19 ` travankor
@ 2021-05-15 13:36 ` travankor
  2021-05-18 14:13 ` UsernameRandomlyGenerated
                   ` (40 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-05-15 13:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.5
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 2955 bytes --]

From 714799e74a386f30759ae91a1eb24ac29407f1ce Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.5

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 ++++++
 srcpkgs/booster/template                   | 40 ++++++++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..9e1822b7fdcd
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.5
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=aea7e30cad1987bcc61de0c18b4273b477782c57a331ca47d92d0146860529b0
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (24 preceding siblings ...)
  2021-05-15 13:36 ` [PR PATCH] [Updated] New package: booster-0.5 travankor
@ 2021-05-18 14:13 ` UsernameRandomlyGenerated
  2021-05-24 16:15 ` dkwo
                   ` (39 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: UsernameRandomlyGenerated @ 2021-05-18 14:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

New comment by UsernameRandomlyGenerated on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-843207564

Comment:
Also boots here, though I noticed it won't mount home and swap for me on LVM+LUKS, though it's probably upstream issue.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (25 preceding siblings ...)
  2021-05-18 14:13 ` UsernameRandomlyGenerated
@ 2021-05-24 16:15 ` dkwo
  2021-05-27 18:50 ` dkwo
                   ` (38 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-05-24 16:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-847156082

Comment:
I installed it on my second machine, seems fine.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (26 preceding siblings ...)
  2021-05-24 16:15 ` dkwo
@ 2021-05-27 18:50 ` dkwo
  2021-06-01 19:13 ` travankor
                   ` (37 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-05-27 18:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-849861250

Comment:
On my main machine, also using 5.12, it breaks full disk encryption: instead of prompting for password, I'm just left with an empty console.  Do you know what is going wrong?
Thanks.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (27 preceding siblings ...)
  2021-05-27 18:50 ` dkwo
@ 2021-06-01 19:13 ` travankor
  2021-06-06  8:39 ` dkwo
                   ` (36 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-06-01 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-852379929

Comment:
FDE works here, but I'm not using grub.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (28 preceding siblings ...)
  2021-06-01 19:13 ` travankor
@ 2021-06-06  8:39 ` dkwo
  2021-06-12 17:23 ` dkwo
                   ` (35 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-06  8:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-855362111

Comment:
Works now, had to edit grub cfg, https://github.com/anatol/booster/issues/85

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (29 preceding siblings ...)
  2021-06-06  8:39 ` dkwo
@ 2021-06-12 17:23 ` dkwo
  2021-06-12 17:24 ` dkwo
                   ` (34 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-12 17:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860083405

Comment:
Ehm, while it was building fine before, now I get
```
=> booster-0.5_1: building [go] for x86_64...
   [host] git-2.31.1_1: not found
   [host] ruby-ronn-0.7.3_4: found (https://alpha.de.repo.voidlinux.org/current)
   [host] go-1.16.4_1: not found
```
and it tries to build the whole world.
Is this my issue? or does it have to do with a recent `go` update?

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (30 preceding siblings ...)
  2021-06-12 17:23 ` dkwo
@ 2021-06-12 17:24 ` dkwo
  2021-06-12 17:26 ` dkwo
                   ` (33 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-12 17:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860083490

Comment:
Other than that, it is working fine, both with encrypted and unencrypted drives, using grub.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (31 preceding siblings ...)
  2021-06-12 17:24 ` dkwo
@ 2021-06-12 17:26 ` dkwo
  2021-06-12 17:52 ` paper42
                   ` (32 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-12 17:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860083800

Comment:
Just a minor note: in my init, after it prompts for password, I see this, just before entering stage 1:
`runit: warning: unable to open /dev/console: file does not exist`
Do you know how to fix it?
It's not blocking, but I'd like to understand.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (32 preceding siblings ...)
  2021-06-12 17:26 ` dkwo
@ 2021-06-12 17:52 ` paper42
  2021-06-12 17:52 ` paper42
                   ` (31 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-06-12 17:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860087060

Comment:
> Ehm, while it was building fine before, now I get
> 
> ```
> => booster-0.5_1: building [go] for x86_64...
>    [host] git-2.31.1_1: not found
>    [host] ruby-ronn-0.7.3_4: found (https://alpha.de.repo.voidlinux.org/current)
>    [host] go-1.16.4_1: not found
> ```
> 
> and it tries to build the whole world.
> Is this my issue? or does it have to do with a recent `go` update?

Rebase your branch on top of master. There have been updates to some packages since this PR was posted, xbps-src tries to build the old versions.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (33 preceding siblings ...)
  2021-06-12 17:52 ` paper42
@ 2021-06-12 17:52 ` paper42
  2021-06-12 18:15 ` dkwo
                   ` (30 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-06-12 17:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860087060

Comment:
@dkwo 
> Ehm, while it was building fine before, now I get
> 
> ```
> => booster-0.5_1: building [go] for x86_64...
>    [host] git-2.31.1_1: not found
>    [host] ruby-ronn-0.7.3_4: found (https://alpha.de.repo.voidlinux.org/current)
>    [host] go-1.16.4_1: not found
> ```
> 
> and it tries to build the whole world.
> Is this my issue? or does it have to do with a recent `go` update?

Rebase your branch on top of master. There have been updates to some packages since this PR was posted, xbps-src tries to build the old versions.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (34 preceding siblings ...)
  2021-06-12 17:52 ` paper42
@ 2021-06-12 18:15 ` dkwo
  2021-06-23  3:08 ` anatol
                   ` (29 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-12 18:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-860089831

Comment:
@paper42 Thank you.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (35 preceding siblings ...)
  2021-06-12 18:15 ` dkwo
@ 2021-06-23  3:08 ` anatol
  2021-06-30  8:33 ` dkwo
                   ` (28 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: anatol @ 2021-06-23  3:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

New comment by anatol on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-866487029

Comment:
Thank you @travankor, the work looks great to me. Looking forward to see `booster` in Void Linux repo.

wrt `/dev/console` warning. I am happy to debug it, but I need a way to reproduce it locally. Ideally if I can have an up-to-date  Void Linux image (kernel + userspace) that I can start with QEMU.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (36 preceding siblings ...)
  2021-06-23  3:08 ` anatol
@ 2021-06-30  8:33 ` dkwo
  2021-06-30  9:14 ` travankor
                   ` (27 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-06-30  8:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-871205129

Comment:
Warning is now fixed for me.
I hope this will be merged soon, and perhaps even become default in Void.
Thanks.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (37 preceding siblings ...)
  2021-06-30  8:33 ` dkwo
@ 2021-06-30  9:14 ` travankor
  2021-06-30 13:06 ` [PR PATCH] [Updated] " travankor
                   ` (26 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-06-30  9:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-871233450

Comment:
I'll add the patch for the warning and then ask for a review on IRC.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (38 preceding siblings ...)
  2021-06-30  9:14 ` travankor
@ 2021-06-30 13:06 ` travankor
  2021-07-01  3:51 ` [PR REVIEW] " ericonr
                   ` (25 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-06-30 13:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.5
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 6983 bytes --]

From 4afcb2e753937769c180be448dd29ad3a4212182 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.5

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++
 srcpkgs/booster/patches/runit.patch        | 89 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 40 ++++++++++
 4 files changed, 155 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/runit.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/runit.patch b/srcpkgs/booster/patches/runit.patch
new file mode 100644
index 000000000000..fc478269fa16
--- /dev/null
+++ b/srcpkgs/booster/patches/runit.patch
@@ -0,0 +1,89 @@
+From 47041269c6a9912839e6382e32e8b37c66711ffb Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Tue, 29 Jun 2021 16:01:45 -0700
+Subject: [PATCH] Move all auxiliary mount points from initramfs to host fs
+
+At initram stage booster mounts several filesystems that needed for
+successful boot process. At this moment we preserve /run (because it contains
+udev state) and other mountpoints are unmounted.
+
+It turns out runit used at Void Linux expects that /dev is present from the very
+beginning. And it differs from systemd that parses fstab and mount the fs before
+it tries to use.
+
+Help runit and move `/dev` `/sys` `/proc` to host filesystem. It fixes the runit
+"unable to open /dev/console" warning.
+
+Closes #92
+---
+ init/main.go | 45 +++++++++++++++++++++------------------------
+ 1 file changed, 21 insertions(+), 24 deletions(-)
+
+diff --git a/init/main.go b/init/main.go
+index c0c2633..38f43f9 100644
+--- a/init/main.go
++++ b/init/main.go
+@@ -348,23 +348,28 @@ func isSystemd(path string) (bool, error) {
+ 	return strings.HasSuffix(myRealpath, "/systemd"), nil
+ }
+ 
+-// moveSlashRunMountpoint moves some of the initramfs mounts into the main image
+-func moveSlashRunMountpoint() error {
+-	// remount root as it might contain udev state that we need to pass to the new root
+-	_, err := os.Stat(newRoot + "/run")
+-	if os.IsNotExist(err) {
+-		// let's print a warning and hope that the new root works without initrd udev state
+-		warning("/run does not exist at the newly mounted root filesystem")
+-
+-		// unmount /run so its directory can be removed and reclaimed
+-		if err := unix.Unmount("/run", 0); err != nil {
+-			return fmt.Errorf("unmount(/run): %v", err)
++// moveMountpointsToHost moves some of the initramfs mounts into the host filesystem
++// it is needed for example in following cases:
++//    /run might contain some udev state that needs to be passed from initramfs to host
++//    runit expects that /dev/ is mounted at the moment runit starts
++func moveMountpointsToHost() error {
++	for _, m := range []string{"/run", "/dev", "/proc", "/sys"} {
++		// remount root as it might contain state that we need to pass to the new root
++		_, err := os.Stat(newRoot + m)
++		if os.IsNotExist(err) {
++			// let's print a warning and hope that host OS setup the filesystem if needed
++			warning("%s does not exist at the newly mounted root filesystem", m)
++
++			// unmount the directory so its directory can be removed and reclaimed
++			if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
++				return fmt.Errorf("unmount(%s): %v", m, err)
++			}
++			continue
+ 		}
+-		return nil
+-	}
+ 
+-	if err := unix.Mount("/run", newRoot+"/run", "", unix.MS_MOVE, ""); err != nil {
+-		return fmt.Errorf("move /run to new root: %v", err)
++		if err := unix.Mount(m, newRoot+m, "", unix.MS_MOVE, ""); err != nil {
++			return fmt.Errorf("move %s to new root: %v", m, err)
++		}
+ 	}
+ 
+ 	return nil
+@@ -464,18 +469,10 @@ func deleteRamfs() error {
+ 
+ // https://github.com/mirror/busybox/blob/9aa751b08ab03d6396f86c3df77937a19687981b/util-linux/switch_root.c#L297
+ func switchRoot() error {
+-	if err := moveSlashRunMountpoint(); err != nil {
++	if err := moveMountpointsToHost(); err != nil {
+ 		return err
+ 	}
+ 
+-	// note that /run has been unmounted earlier
+-	for _, m := range []string{"/dev", "/proc", "/sys"} {
+-		// some drivers (e.g. GPU) might use these filesystems, unmount it lazily
+-		if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
+-			return fmt.Errorf("unmount(%s): %v", m, err)
+-		}
+-	}
+-
+ 	if err := deleteRamfs(); err != nil {
+ 		return fmt.Errorf("wiping ramfs: %v", err)
+ 	}
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..9e1822b7fdcd
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.5
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=aea7e30cad1987bcc61de0c18b4273b477782c57a331ca47d92d0146860529b0
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (39 preceding siblings ...)
  2021-06-30 13:06 ` [PR PATCH] [Updated] " travankor
@ 2021-07-01  3:51 ` ericonr
  2021-07-01  3:51 ` ericonr
                   ` (24 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-07-01  3:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r661951002

Comment:
@ahesford I think this is a great opportunity to start implementing your initramfs chooser stuff, in whatever format.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (40 preceding siblings ...)
  2021-07-01  3:51 ` [PR REVIEW] " ericonr
@ 2021-07-01  3:51 ` ericonr
  2021-07-01  3:58 ` ericonr
                   ` (23 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-07-01  3:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r661950815

Comment:
I'd prefer to wait for a release with this patch.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (41 preceding siblings ...)
  2021-07-01  3:51 ` ericonr
@ 2021-07-01  3:58 ` ericonr
  2021-07-01  4:01 ` ericonr
                   ` (22 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-07-01  3:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-871895114

Comment:
With kernel 4.19.192_1, I get: `open /usr/lib/modules/4.19.192_1/modules.builtin.modinfo: no such file or directory`

It built fine for 5.11.22_1 though.

I think we should document a umask policy; the final image is world-readable, so you should call `umask 0077` in the kernel install script first (see `initramfs-regenerate` hook!)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (42 preceding siblings ...)
  2021-07-01  3:58 ` ericonr
@ 2021-07-01  4:01 ` ericonr
  2021-07-01 13:03 ` [PR PATCH] [Updated] " travankor
                   ` (21 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ericonr @ 2021-07-01  4:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-871896052

Comment:
Ok, I seem to have booted into 5.11.22_1 with booster. The only mention of it in my dmesg were errors about being unable to open `/usr/lib/modules//{usbmouse.ko,hid.ko}` (the double forward slash is verbatim).

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (43 preceding siblings ...)
  2021-07-01  4:01 ` ericonr
@ 2021-07-01 13:03 ` travankor
  2021-07-01 13:05 ` travankor
                   ` (20 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-07-01 13:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.5
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 8918 bytes --]

From 4afcb2e753937769c180be448dd29ad3a4212182 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.5

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++
 srcpkgs/booster/patches/runit.patch        | 89 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 40 ++++++++++
 4 files changed, 155 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/runit.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/runit.patch b/srcpkgs/booster/patches/runit.patch
new file mode 100644
index 000000000000..fc478269fa16
--- /dev/null
+++ b/srcpkgs/booster/patches/runit.patch
@@ -0,0 +1,89 @@
+From 47041269c6a9912839e6382e32e8b37c66711ffb Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Tue, 29 Jun 2021 16:01:45 -0700
+Subject: [PATCH] Move all auxiliary mount points from initramfs to host fs
+
+At initram stage booster mounts several filesystems that needed for
+successful boot process. At this moment we preserve /run (because it contains
+udev state) and other mountpoints are unmounted.
+
+It turns out runit used at Void Linux expects that /dev is present from the very
+beginning. And it differs from systemd that parses fstab and mount the fs before
+it tries to use.
+
+Help runit and move `/dev` `/sys` `/proc` to host filesystem. It fixes the runit
+"unable to open /dev/console" warning.
+
+Closes #92
+---
+ init/main.go | 45 +++++++++++++++++++++------------------------
+ 1 file changed, 21 insertions(+), 24 deletions(-)
+
+diff --git a/init/main.go b/init/main.go
+index c0c2633..38f43f9 100644
+--- a/init/main.go
++++ b/init/main.go
+@@ -348,23 +348,28 @@ func isSystemd(path string) (bool, error) {
+ 	return strings.HasSuffix(myRealpath, "/systemd"), nil
+ }
+ 
+-// moveSlashRunMountpoint moves some of the initramfs mounts into the main image
+-func moveSlashRunMountpoint() error {
+-	// remount root as it might contain udev state that we need to pass to the new root
+-	_, err := os.Stat(newRoot + "/run")
+-	if os.IsNotExist(err) {
+-		// let's print a warning and hope that the new root works without initrd udev state
+-		warning("/run does not exist at the newly mounted root filesystem")
+-
+-		// unmount /run so its directory can be removed and reclaimed
+-		if err := unix.Unmount("/run", 0); err != nil {
+-			return fmt.Errorf("unmount(/run): %v", err)
++// moveMountpointsToHost moves some of the initramfs mounts into the host filesystem
++// it is needed for example in following cases:
++//    /run might contain some udev state that needs to be passed from initramfs to host
++//    runit expects that /dev/ is mounted at the moment runit starts
++func moveMountpointsToHost() error {
++	for _, m := range []string{"/run", "/dev", "/proc", "/sys"} {
++		// remount root as it might contain state that we need to pass to the new root
++		_, err := os.Stat(newRoot + m)
++		if os.IsNotExist(err) {
++			// let's print a warning and hope that host OS setup the filesystem if needed
++			warning("%s does not exist at the newly mounted root filesystem", m)
++
++			// unmount the directory so its directory can be removed and reclaimed
++			if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
++				return fmt.Errorf("unmount(%s): %v", m, err)
++			}
++			continue
+ 		}
+-		return nil
+-	}
+ 
+-	if err := unix.Mount("/run", newRoot+"/run", "", unix.MS_MOVE, ""); err != nil {
+-		return fmt.Errorf("move /run to new root: %v", err)
++		if err := unix.Mount(m, newRoot+m, "", unix.MS_MOVE, ""); err != nil {
++			return fmt.Errorf("move %s to new root: %v", m, err)
++		}
+ 	}
+ 
+ 	return nil
+@@ -464,18 +469,10 @@ func deleteRamfs() error {
+ 
+ // https://github.com/mirror/busybox/blob/9aa751b08ab03d6396f86c3df77937a19687981b/util-linux/switch_root.c#L297
+ func switchRoot() error {
+-	if err := moveSlashRunMountpoint(); err != nil {
++	if err := moveMountpointsToHost(); err != nil {
+ 		return err
+ 	}
+ 
+-	// note that /run has been unmounted earlier
+-	for _, m := range []string{"/dev", "/proc", "/sys"} {
+-		// some drivers (e.g. GPU) might use these filesystems, unmount it lazily
+-		if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
+-			return fmt.Errorf("unmount(%s): %v", m, err)
+-		}
+-	}
+-
+ 	if err := deleteRamfs(); err != nil {
+ 		return fmt.Errorf("wiping ramfs: %v", err)
+ 	}
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..9e1822b7fdcd
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.5
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=aea7e30cad1987bcc61de0c18b4273b477782c57a331ca47d92d0146860529b0
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

From a328299017082e691781a7b0de4268e815391ce5 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Thu, 1 Jul 2021 06:02:25 -0700
Subject: [PATCH 2/2] booster: add support to initramfs-regenerate hook

---
 srcpkgs/booster/files/kernel-hook-postinst       |  1 +
 srcpkgs/xbps-triggers/files/initramfs-regenerate | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
index 68d2eaf6caf6..7313b69da6a5 100644
--- a/srcpkgs/booster/files/kernel-hook-postinst
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -11,5 +11,6 @@ if [ ! -x usr/bin/booster ]; then
 	exit 0
 fi
 
+umask 0077
 usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
 exit $?
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..9fb3f04fcc4e 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a # value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (44 preceding siblings ...)
  2021-07-01 13:03 ` [PR PATCH] [Updated] " travankor
@ 2021-07-01 13:05 ` travankor
  2021-07-01 13:08 ` [PR PATCH] [Updated] " travankor
                   ` (19 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-07-01 13:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-872230290

Comment:
I added the umask and added booster to the `initramfs-regenerate` hook. booster won't work with zfs yet, but it should work with nvidia modules.

The previous missing module issues sound like bugs for upstream to fix.


^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (45 preceding siblings ...)
  2021-07-01 13:05 ` travankor
@ 2021-07-01 13:08 ` travankor
  2021-07-01 15:15 ` anatol
                   ` (18 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-07-01 13:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.5
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 8916 bytes --]

From 4afcb2e753937769c180be448dd29ad3a4212182 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH 1/2] New package: booster-0.5

---
 srcpkgs/booster/files/kernel-hook-postinst | 15 ++++
 srcpkgs/booster/files/kernel-hook-postrm   | 11 +++
 srcpkgs/booster/patches/runit.patch        | 89 ++++++++++++++++++++++
 srcpkgs/booster/template                   | 40 ++++++++++
 4 files changed, 155 insertions(+)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/patches/runit.patch
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..68d2eaf6caf6
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/patches/runit.patch b/srcpkgs/booster/patches/runit.patch
new file mode 100644
index 000000000000..fc478269fa16
--- /dev/null
+++ b/srcpkgs/booster/patches/runit.patch
@@ -0,0 +1,89 @@
+From 47041269c6a9912839e6382e32e8b37c66711ffb Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Tue, 29 Jun 2021 16:01:45 -0700
+Subject: [PATCH] Move all auxiliary mount points from initramfs to host fs
+
+At initram stage booster mounts several filesystems that needed for
+successful boot process. At this moment we preserve /run (because it contains
+udev state) and other mountpoints are unmounted.
+
+It turns out runit used at Void Linux expects that /dev is present from the very
+beginning. And it differs from systemd that parses fstab and mount the fs before
+it tries to use.
+
+Help runit and move `/dev` `/sys` `/proc` to host filesystem. It fixes the runit
+"unable to open /dev/console" warning.
+
+Closes #92
+---
+ init/main.go | 45 +++++++++++++++++++++------------------------
+ 1 file changed, 21 insertions(+), 24 deletions(-)
+
+diff --git a/init/main.go b/init/main.go
+index c0c2633..38f43f9 100644
+--- a/init/main.go
++++ b/init/main.go
+@@ -348,23 +348,28 @@ func isSystemd(path string) (bool, error) {
+ 	return strings.HasSuffix(myRealpath, "/systemd"), nil
+ }
+ 
+-// moveSlashRunMountpoint moves some of the initramfs mounts into the main image
+-func moveSlashRunMountpoint() error {
+-	// remount root as it might contain udev state that we need to pass to the new root
+-	_, err := os.Stat(newRoot + "/run")
+-	if os.IsNotExist(err) {
+-		// let's print a warning and hope that the new root works without initrd udev state
+-		warning("/run does not exist at the newly mounted root filesystem")
+-
+-		// unmount /run so its directory can be removed and reclaimed
+-		if err := unix.Unmount("/run", 0); err != nil {
+-			return fmt.Errorf("unmount(/run): %v", err)
++// moveMountpointsToHost moves some of the initramfs mounts into the host filesystem
++// it is needed for example in following cases:
++//    /run might contain some udev state that needs to be passed from initramfs to host
++//    runit expects that /dev/ is mounted at the moment runit starts
++func moveMountpointsToHost() error {
++	for _, m := range []string{"/run", "/dev", "/proc", "/sys"} {
++		// remount root as it might contain state that we need to pass to the new root
++		_, err := os.Stat(newRoot + m)
++		if os.IsNotExist(err) {
++			// let's print a warning and hope that host OS setup the filesystem if needed
++			warning("%s does not exist at the newly mounted root filesystem", m)
++
++			// unmount the directory so its directory can be removed and reclaimed
++			if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
++				return fmt.Errorf("unmount(%s): %v", m, err)
++			}
++			continue
+ 		}
+-		return nil
+-	}
+ 
+-	if err := unix.Mount("/run", newRoot+"/run", "", unix.MS_MOVE, ""); err != nil {
+-		return fmt.Errorf("move /run to new root: %v", err)
++		if err := unix.Mount(m, newRoot+m, "", unix.MS_MOVE, ""); err != nil {
++			return fmt.Errorf("move %s to new root: %v", m, err)
++		}
+ 	}
+ 
+ 	return nil
+@@ -464,18 +469,10 @@ func deleteRamfs() error {
+ 
+ // https://github.com/mirror/busybox/blob/9aa751b08ab03d6396f86c3df77937a19687981b/util-linux/switch_root.c#L297
+ func switchRoot() error {
+-	if err := moveSlashRunMountpoint(); err != nil {
++	if err := moveMountpointsToHost(); err != nil {
+ 		return err
+ 	}
+ 
+-	// note that /run has been unmounted earlier
+-	for _, m := range []string{"/dev", "/proc", "/sys"} {
+-		// some drivers (e.g. GPU) might use these filesystems, unmount it lazily
+-		if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
+-			return fmt.Errorf("unmount(%s): %v", m, err)
+-		}
+-	}
+-
+ 	if err := deleteRamfs(); err != nil {
+ 		return fmt.Errorf("wiping ramfs: %v", err)
+ 	}
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..9e1822b7fdcd
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.5
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=aea7e30cad1987bcc61de0c18b4273b477782c57a331ca47d92d0146860529b0
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}

From 446c4aaabee14a34abfcad41becffcf3dee0886e Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Thu, 1 Jul 2021 06:02:25 -0700
Subject: [PATCH 2/2] booster: add support to initramfs-regenerate hook

---
 srcpkgs/booster/files/kernel-hook-postinst       |  1 +
 srcpkgs/xbps-triggers/files/initramfs-regenerate | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
index 68d2eaf6caf6..7313b69da6a5 100644
--- a/srcpkgs/booster/files/kernel-hook-postinst
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -11,5 +11,6 @@ if [ ! -x usr/bin/booster ]; then
 	exit 0
 fi
 
+umask 0077
 usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
 exit $?
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (46 preceding siblings ...)
  2021-07-01 13:08 ` [PR PATCH] [Updated] " travankor
@ 2021-07-01 15:15 ` anatol
  2021-07-02  9:36 ` dkwo
                   ` (17 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: anatol @ 2021-07-01 15:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

New comment by anatol on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-872331382

Comment:
For ZFS support - here is the ticket https://github.com/anatol/booster/issues/33

> in my dmesg were errors about being unable to open /usr/lib/modules//{usbmouse.ko,hid.ko}

Could you please start a ticket with repro steps and i'll debug it.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (47 preceding siblings ...)
  2021-07-01 15:15 ` anatol
@ 2021-07-02  9:36 ` dkwo
  2021-07-20 17:12 ` anatol
                   ` (16 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-07-02  9:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-872863237

Comment:
@travankor btw, is it possible to add tests to the template?

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (48 preceding siblings ...)
  2021-07-02  9:36 ` dkwo
@ 2021-07-20 17:12 ` anatol
  2021-07-21 15:48 ` [PR PATCH] [Updated] " travankor
                   ` (15 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: anatol @ 2021-07-20 17:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

New comment by anatol on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-883557223

Comment:
Booster [has released version 0.6](https://github.com/anatol/booster/releases/tag/0.6). This release includes runit support. Please take a look and let me know if you see any issues with booster-0.6.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.5
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (49 preceding siblings ...)
  2021-07-20 17:12 ` anatol
@ 2021-07-21 15:48 ` travankor
  2021-07-22  7:43 ` New package: booster-0.6 dkwo
                   ` (14 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-07-21 15:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.5
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4204 bytes --]

From e54480b721773a375ce6a83f450385d607902908 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 16 ++++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 11 +++++
 srcpkgs/booster/template                      | 40 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..7313b69da6a5
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+if [ ! -x usr/bin/booster ]; then
+	exit 0
+fi
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
+exit $?
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..ef13d1967a67
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
+exit $?
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..a29576408f10
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (50 preceding siblings ...)
  2021-07-21 15:48 ` [PR PATCH] [Updated] " travankor
@ 2021-07-22  7:43 ` dkwo
  2021-09-11 23:27 ` anatol
                   ` (13 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-07-22  7:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-884716595

Comment:
This works for me, thanks.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (51 preceding siblings ...)
  2021-07-22  7:43 ` New package: booster-0.6 dkwo
@ 2021-09-11 23:27 ` anatol
  2021-09-12  6:31 ` dkwo
                   ` (12 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: anatol @ 2021-09-11 23:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

New comment by anatol on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-917501059

Comment:
Is there anything else need to be done to add booster to the packages?

The ideas behind booster is to have a simple and fast initramfs with focus on security features (such as Tang key management or TPM binding without using systemd). It also avoids uneeded dependencies like shell, sshd or systemd in initramfs to minimize security attack surface. Having booster in Void packages will be beneficial both for Void Linux users and booster project.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (52 preceding siblings ...)
  2021-09-11 23:27 ` anatol
@ 2021-09-12  6:31 ` dkwo
  2021-09-12 10:36 ` [PR REVIEW] " paper42
                   ` (11 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: dkwo @ 2021-09-12  6:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-917567652

Comment:
It's been working well for me for the past few monts, so LGTM.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (53 preceding siblings ...)
  2021-09-12  6:31 ` dkwo
@ 2021-09-12 10:36 ` paper42
  2021-09-12 10:36 ` paper42
                   ` (10 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-09-12 10:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r706816046

Comment:
Would something like this work? We don't want to ignore errors and we are returning the exit code anyway?
```suggestion
exec rm boot/initramfs-${VERSION}.img
```

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (55 preceding siblings ...)
  2021-09-12 10:36 ` paper42
@ 2021-09-12 10:36 ` paper42
  2021-09-12 11:28 ` ahesford
                   ` (8 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-09-12 10:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r706815821

Comment:
```suggestion
exec usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
```

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (54 preceding siblings ...)
  2021-09-12 10:36 ` [PR REVIEW] " paper42
@ 2021-09-12 10:36 ` paper42
  2021-09-12 10:36 ` paper42
                   ` (9 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-09-12 10:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r706815867

Comment:
```suggestion
[ -x usr/bin/booster ] || exit 0
```

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (56 preceding siblings ...)
  2021-09-12 10:36 ` paper42
@ 2021-09-12 11:28 ` ahesford
  2021-09-12 11:36 ` paper42
                   ` (7 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: ahesford @ 2021-09-12 11:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r706822555

Comment:
There's no need for `exec` and there's no need for `exit $?` anyway. The shell exits with the return code if the last command it ran. 

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR REVIEW] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (57 preceding siblings ...)
  2021-09-12 11:28 ` ahesford
@ 2021-09-12 11:36 ` paper42
  2021-09-13 14:42 ` [PR PATCH] [Updated] " travankor
                   ` (6 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: paper42 @ 2021-09-12 11:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#discussion_r706815821

Comment:
```suggestion
usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
```

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (58 preceding siblings ...)
  2021-09-12 11:36 ` paper42
@ 2021-09-13 14:42 ` travankor
  2021-09-13 14:44 ` travankor
                   ` (5 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-13 14:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.6
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4170 bytes --]

From fa1b41398f89cdabb250c4cbbb968da959be40e0 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 13 ++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 10 +++++
 srcpkgs/booster/template                      | 40 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..5c145c315095
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/booster ] || exit 0
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..253c8d2d45f4
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..a29576408f10
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (59 preceding siblings ...)
  2021-09-13 14:42 ` [PR PATCH] [Updated] " travankor
@ 2021-09-13 14:44 ` travankor
  2021-09-14 14:02 ` travankor
                   ` (4 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-13 14:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.6
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4170 bytes --]

From 043d4998c1dd6cd6b351b4bd6aea459220fbcd74 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 13 ++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 10 +++++
 srcpkgs/booster/template                      | 40 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..5c145c315095
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/booster ] || exit 0
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..253c8d2d45f4
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..a29576408f10
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (60 preceding siblings ...)
  2021-09-13 14:44 ` travankor
@ 2021-09-14 14:02 ` travankor
  2021-09-14 14:08 ` travankor
                   ` (3 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-14 14:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.6
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4193 bytes --]

From 5541f66823ffd1661049a06ce1cf05c68c9f4414 Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 13 ++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 10 +++++
 srcpkgs/booster/template                      | 41 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 77 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..5c145c315095
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/booster ] || exit 0
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..253c8d2d45f4
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..b62bf6e76397
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+	export GO111MODULE=1
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (61 preceding siblings ...)
  2021-09-14 14:02 ` travankor
@ 2021-09-14 14:08 ` travankor
  2021-09-14 14:16 ` travankor
                   ` (2 subsequent siblings)
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-14 14:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.6
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4194 bytes --]

From f897d09522ae6c4436dcdaddbc57a3f20043045d Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 13 ++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 10 +++++
 srcpkgs/booster/template                      | 41 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 77 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..5c145c315095
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/booster ] || exit 0
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..253c8d2d45f4
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..70d08fd067ca
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,41 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+	export GO111MODULE=on
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PR PATCH] [Updated] New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (62 preceding siblings ...)
  2021-09-14 14:08 ` travankor
@ 2021-09-14 14:16 ` travankor
  2021-09-14 14:25 ` travankor
  2021-09-14 22:57 ` travankor
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-14 14:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

There is an updated pull request by travankor against master on the void-packages repository

https://github.com/travankor/void-packages booster
https://github.com/void-linux/void-packages/pull/29434

New package: booster-0.6
<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

A patch file from https://github.com/void-linux/void-packages/pull/29434.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-booster-29434.patch --]
[-- Type: text/x-diff, Size: 4170 bytes --]

From c0c06afb20ba62edb6d6de64a3624678453f88ea Mon Sep 17 00:00:00 2001
From: travankor <travankor@tuta.io>
Date: Sat, 13 Mar 2021 07:51:37 -0700
Subject: [PATCH] New package: booster-0.6

Added booster to initramfs-regenerate hook
---
 srcpkgs/booster/files/kernel-hook-postinst    | 13 ++++++
 srcpkgs/booster/files/kernel-hook-postrm      | 10 +++++
 srcpkgs/booster/template                      | 40 +++++++++++++++++++
 .../xbps-triggers/files/initramfs-regenerate  | 15 ++++++-
 4 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/booster/files/kernel-hook-postinst
 create mode 100644 srcpkgs/booster/files/kernel-hook-postrm
 create mode 100644 srcpkgs/booster/template

diff --git a/srcpkgs/booster/files/kernel-hook-postinst b/srcpkgs/booster/files/kernel-hook-postinst
new file mode 100644
index 000000000000..5c145c315095
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/booster ] || exit 0
+
+umask 0077
+usr/bin/booster -force -output boot/initramfs-${VERSION}.img -kernelVersion ${VERSION}
diff --git a/srcpkgs/booster/files/kernel-hook-postrm b/srcpkgs/booster/files/kernel-hook-postrm
new file mode 100644
index 000000000000..253c8d2d45f4
--- /dev/null
+++ b/srcpkgs/booster/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for booster.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
new file mode 100644
index 000000000000..a29576408f10
--- /dev/null
+++ b/srcpkgs/booster/template
@@ -0,0 +1,40 @@
+# Template file for 'booster'
+pkgname=booster
+version=0.6
+revision=1
+build_style=go
+go_import_path=github.com/anatol/booster
+go_package="${go_import_path}/generator ${go_import_path}/init"
+hostmakedepends="git ruby-ronn"
+depends="busybox-static"
+short_desc="Fast and secure initramfs generator"
+maintainer="travankor <travankor@tuta.io>"
+license="MIT"
+homepage="https://github.com/anatol/booster"
+distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
+checksum=9f62c77fcc625ef77d784cf45b69f6477276151670a204e62a709d508af4c176
+conf_files="/etc/booster.yaml"
+
+pre_build() {
+	export CGO_ENABLED=0
+}
+
+do_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vbin ${GOPATH}/bin/linux_${GOARCH}/generator booster
+		vinstall ${GOPATH}/bin/linux_${GOARCH}/init 755 usr/lib/booster
+	else
+		vbin ${GOPATH}/bin/generator booster
+		vinstall ${GOPATH}/bin/init 755 usr/lib/booster
+	fi
+	ronn docs/manpage.md
+	vman docs/manpage.1 booster.1
+	echo "busybox: true" > booster.yaml
+}
+
+post_install() {
+	vconf booster.yaml
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-booster
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-booster
+	vlicense LICENSE
+}
diff --git a/srcpkgs/xbps-triggers/files/initramfs-regenerate b/srcpkgs/xbps-triggers/files/initramfs-regenerate
index 780c3580829f..62c3db859e15 100755
--- a/srcpkgs/xbps-triggers/files/initramfs-regenerate
+++ b/srcpkgs/xbps-triggers/files/initramfs-regenerate
@@ -8,8 +8,8 @@
 #
 #     INITRAMFS_GENERATOR=<generator>
 #
-# where <generator> is one of "dracut", "mkinitcpio" or "none". By default, a
-# value of "dracut" is assumed.
+# where <generator> is one of "dracut", "mkinitcpio", "booster" or "none".
+# By default, a value of "dracut" is assumed.
 #
 # Arguments:	$ACTION = [run/targets]
 #		$TARGET = [post-install/post-remove]
@@ -61,6 +61,17 @@ case "${INITRAMFS_GENERATOR:-dracut}" in
 			done
 		fi
 		;;
+	booster)
+		if command -v booster >dev/null 2>&1; then
+			echo "Regenerating initramfs with booster"
+			# Regenerate images for every kernel version with modules
+			for kdir in usr/lib/modules/*; do
+				[ -d "${kdir}/kernel" ] || continue
+				kver="${kdir##*/}"
+				booster -force -output "boot/initramfs-${kver}.img" -kernelVersion "${kver}"
+			done
+		fi
+		;;
 	none)
 		;;
 	*)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (63 preceding siblings ...)
  2021-09-14 14:16 ` travankor
@ 2021-09-14 14:25 ` travankor
  2021-09-14 22:57 ` travankor
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-14 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-919203657

Comment:
The build is failing since it needs to use go modules. This is also a blocker for go-1.17 in general since `GOPATH` is dropped.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: New package: booster-0.6
  2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
                   ` (64 preceding siblings ...)
  2021-09-14 14:25 ` travankor
@ 2021-09-14 22:57 ` travankor
  65 siblings, 0 replies; 67+ messages in thread
From: travankor @ 2021-09-14 22:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/29434#issuecomment-919203657

Comment:
The build is failing since it needs to use go modules.

^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2021-09-14 22:57 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 14:53 [PR PATCH] New package: booster-0.3 travankor
2021-03-13 15:16 ` [PR REVIEW] " ericonr
2021-03-13 22:55 ` travankor
2021-03-13 23:10 ` travankor
2021-03-13 23:11 ` travankor
2021-03-13 23:30 ` ericonr
2021-03-15  3:06 ` [PR PATCH] [Updated] " travankor
2021-03-15  3:17 ` travankor
2021-03-15  3:32 ` travankor
2021-03-15  3:35 ` travankor
2021-03-15  3:50 ` travankor
2021-03-15  3:55 ` travankor
2021-03-16 14:03 ` travankor
2021-04-11  4:01 ` [PR REVIEW] " ericonr
2021-04-11 17:31 ` [PR PATCH] [Updated] New package: booster-0.4 travankor
2021-04-12 13:21 ` travankor
2021-04-25  2:03 ` travankor
2021-04-25  3:38 ` travankor
2021-04-25  3:51 ` travankor
2021-04-25 13:16 ` travankor
2021-04-25 17:08 ` [PR REVIEW] " travankor
2021-04-25 17:14 ` [PR PATCH] [Updated] " travankor
2021-04-25 17:17 ` travankor
2021-04-25 17:19 ` [PR PATCH] [Updated] " travankor
2021-05-13 13:19 ` travankor
2021-05-15 13:36 ` [PR PATCH] [Updated] New package: booster-0.5 travankor
2021-05-18 14:13 ` UsernameRandomlyGenerated
2021-05-24 16:15 ` dkwo
2021-05-27 18:50 ` dkwo
2021-06-01 19:13 ` travankor
2021-06-06  8:39 ` dkwo
2021-06-12 17:23 ` dkwo
2021-06-12 17:24 ` dkwo
2021-06-12 17:26 ` dkwo
2021-06-12 17:52 ` paper42
2021-06-12 17:52 ` paper42
2021-06-12 18:15 ` dkwo
2021-06-23  3:08 ` anatol
2021-06-30  8:33 ` dkwo
2021-06-30  9:14 ` travankor
2021-06-30 13:06 ` [PR PATCH] [Updated] " travankor
2021-07-01  3:51 ` [PR REVIEW] " ericonr
2021-07-01  3:51 ` ericonr
2021-07-01  3:58 ` ericonr
2021-07-01  4:01 ` ericonr
2021-07-01 13:03 ` [PR PATCH] [Updated] " travankor
2021-07-01 13:05 ` travankor
2021-07-01 13:08 ` [PR PATCH] [Updated] " travankor
2021-07-01 15:15 ` anatol
2021-07-02  9:36 ` dkwo
2021-07-20 17:12 ` anatol
2021-07-21 15:48 ` [PR PATCH] [Updated] " travankor
2021-07-22  7:43 ` New package: booster-0.6 dkwo
2021-09-11 23:27 ` anatol
2021-09-12  6:31 ` dkwo
2021-09-12 10:36 ` [PR REVIEW] " paper42
2021-09-12 10:36 ` paper42
2021-09-12 10:36 ` paper42
2021-09-12 11:28 ` ahesford
2021-09-12 11:36 ` paper42
2021-09-13 14:42 ` [PR PATCH] [Updated] " travankor
2021-09-13 14:44 ` travankor
2021-09-14 14:02 ` travankor
2021-09-14 14:08 ` travankor
2021-09-14 14:16 ` travankor
2021-09-14 14:25 ` travankor
2021-09-14 22:57 ` travankor

Github messages for voidlinux

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/voidlinux-github

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 voidlinux-github voidlinux-github/ https://inbox.vuxu.org/voidlinux-github \
		voidlinux-github@inbox.vuxu.org
	public-inbox-index voidlinux-github

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git