Github messages for voidlinux
 help / color / mirror / Atom feed
From: travankor <travankor@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: booster-0.4
Date: Sun, 25 Apr 2021 15:16:13 +0200	[thread overview]
Message-ID: <20210425131613.BDv1RMqyhoJpRTroPoMcAE4sx-jIc5IJjlex_Ar11FQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29434@inbox.vuxu.org>

[-- 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
+}

  parent reply	other threads:[~2021-04-25 13:16 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
2021-09-27 23:37 ` anatol
2021-10-12  8:48 ` dkwo
2021-10-14 19:32 ` anatol
2021-10-16 11:56 ` dkwo
2021-10-16 12:21 ` dkwo
2021-11-07  9:54 ` dkwo
2021-11-07 10:19 ` dkwo
2021-11-07 14:14 ` anatol
2021-11-07 14:15 ` anatol
2021-11-07 15:17 ` anatol
2021-11-08 10:01 ` dkwo
2021-11-08 14:04 ` anatol
2021-11-08 17:19 ` dkwo
2021-11-08 20:45 ` anatol
2021-11-09 13:13 ` dkwo
2021-11-09 19:05 ` nilium
2021-11-09 20:59 ` anatol
2021-11-09 21:17 ` nilium
2021-11-10  9:25 ` dkwo
2021-11-10 15:22 ` anatol
2021-11-10 21:38 ` [PR PATCH] [Updated] " travankor
2021-11-10 21:48 ` travankor
2021-11-10 23:12 ` [PR REVIEW] New package: booster-0.7 anatol
2021-11-11  7:59 ` travankor
2021-11-12  1:31 ` anatol
2021-11-12 10:12 ` dkwo
2021-11-12 16:03 ` anatol
2021-11-12 21:46 ` [PR PATCH] [Updated] " travankor
2021-11-12 21:47 ` [PR REVIEW] " travankor
2021-11-13  9:29 ` dkwo
2021-12-03  2:56 ` anatol
2022-03-06 21:13 ` anatol
2022-05-28  0:07 ` [PR PATCH] [Updated] " travankor
2022-07-03 11:46 ` dkwo
2022-07-03 13:05 ` anatol
2022-07-03 13:08 ` anatol
2022-07-03 13:10 ` anatol
2022-07-03 18:58 ` dkwo
2022-07-18  1:57 ` anatol
2022-07-23  9:09 ` oynqr
2022-07-31 23:01 ` CameronNemo
2022-07-31 23:45 ` CameronNemo
2022-08-01  3:56 ` anatol
2022-08-01  3:59 ` [PR REVIEW] " anatol
2022-08-01 13:40 ` [PR PATCH] [Updated] " travankor
2022-08-01 13:42 ` travankor
2022-08-01 13:46 ` [PR PATCH] [Updated] New package: booster-0.8 travankor
2022-08-01 14:55 ` [PR REVIEW] " CameronNemo
2022-08-01 14:55 ` CameronNemo
2022-08-01 19:57 ` [PR PATCH] [Updated] " travankor
2022-08-26 10:42 ` JamiKettunen
2022-09-08 20:08 ` [PR PATCH] [Updated] " travankor
2022-09-26 12:21 ` New package: booster-0.9 ahesford
2022-10-03 15:08 ` dkwo
2022-10-09 20:36 ` [PR PATCH] [Updated] " travankor
2022-10-09 23:11 ` [PR REVIEW] " CameronNemo
2022-10-09 23:31 ` ahesford
2022-10-09 23:33 ` ahesford
2022-10-10  2:51 ` CameronNemo
2022-10-10  6:58 ` [PR PATCH] [Updated] " travankor
2022-10-10 14:02 ` ahesford
2022-10-10 14:33 ` ahesford
2022-10-10 14:49 ` ahesford
2022-10-10 14:58 ` ahesford
2022-10-10 14:59 ` ahesford
2022-10-10 18:14 ` CameronNemo
2022-10-10 18:14 ` CameronNemo
2022-10-10 18:26 ` ahesford
2022-10-10 20:51 ` anatol
2022-10-10 20:51 ` anatol
2022-10-10 22:03 ` ahesford
2022-10-14 20:13 ` dkwo
2022-10-14 20:41 ` [PR PATCH] [Closed]: " ahesford
2022-10-14 20:41 ` ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210425131613.BDv1RMqyhoJpRTroPoMcAE4sx-jIc5IJjlex_Ar11FQ@z \
    --to=travankor@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).