Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] new package: tinyramfs
@ 2023-03-28 15:37 dkwo
  2023-03-28 20:18 ` [PR PATCH] [Updated] " dkwo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dkwo @ 2023-03-28 15:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages tiny
https://github.com/void-linux/void-packages/pull/43061

new package: tinyramfs
- I tested the changes in this PR: in progress
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes
- I built this PR locally for my native architecture, (x86_64-musl)

one has to edit the config file; I did not add eudev, cryptsetup, etc to depends, as this can vary.

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

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

From 6c6d03915ec6e00a7cf84b672b3f26165a3e8fdd Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 7 Mar 2023 16:11:17 -0500
Subject: [PATCH] new package: tinyramfs-0.1.0

---
 srcpkgs/tinyramfs/files/config               |  4 ++++
 srcpkgs/tinyramfs/files/kernel-hook-postinst | 13 +++++++++++
 srcpkgs/tinyramfs/files/kernel-hook-postrm   | 10 ++++++++
 srcpkgs/tinyramfs/template                   | 24 ++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 srcpkgs/tinyramfs/files/config
 create mode 100644 srcpkgs/tinyramfs/files/kernel-hook-postinst
 create mode 100644 srcpkgs/tinyramfs/files/kernel-hook-postrm
 create mode 100644 srcpkgs/tinyramfs/template

diff --git a/srcpkgs/tinyramfs/files/config b/srcpkgs/tinyramfs/files/config
new file mode 100644
index 000000000000..d7c6d9728768
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/config
@@ -0,0 +1,4 @@
+compress="gzip -9"
+hooks="eudev"
+root=
+root_type=ext4 
\ No newline at end of file
diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postinst b/srcpkgs/tinyramfs/files/kernel-hook-postinst
new file mode 100644
index 000000000000..c96f55b83d2f
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for tinyramfs.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/tinyramfs ] || exit 0
+
+umask 0077
+usr/bin/tinyramfs -f -k ${VERSION} boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postrm b/srcpkgs/tinyramfs/files/kernel-hook-postrm
new file mode 100644
index 000000000000..d429eade59b4
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for tinyramfs.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img 
\ No newline at end of file
diff --git a/srcpkgs/tinyramfs/template b/srcpkgs/tinyramfs/template
new file mode 100644
index 000000000000..2e82a71f4770
--- /dev/null
+++ b/srcpkgs/tinyramfs/template
@@ -0,0 +1,24 @@
+# Template file for 'tinyramfs'
+pkgname=tinyramfs
+version=0.1.0
+revision=1
+build_style=gnu-makefile
+depends="util-linux cpio binutils kmod"
+short_desc="Tiny initramfs written in POSIX shell"
+maintainer="dkwo <npiazza@disroot.org>"
+license="GPL-3.0-only"
+homepage="https://github.com/illiliti/tinyramfs"
+distfiles="https://github.com/illiliti/tinyramfs/archive/refs/tags/${version}.tar.gz"
+checksum=a78ecd56a52a02bc1f4b86ba829a957ad1f83c252bfde66562d5c3ef40be7c51
+alternatives="
+ initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postinst
+ initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postrm
+"
+make_check=no # checking requires qemu, locally this still fails
+conf_files="/etc/tinyramfs/config"
+
+post_install() {
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/tinyramfs
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 usr/libexec/tinyramfs
+	vinstall ${FILESDIR}/config 644 etc/tinyramfs
+}

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

* Re: [PR PATCH] [Updated] new package: tinyramfs
  2023-03-28 15:37 [PR PATCH] new package: tinyramfs dkwo
@ 2023-03-28 20:18 ` dkwo
  2023-04-01 15:44 ` dkwo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dkwo @ 2023-03-28 20:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages tiny
https://github.com/void-linux/void-packages/pull/43061

new package: tinyramfs
- I tested the changes in this PR: in progress
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes
- I built this PR locally for my native architecture, (x86_64-musl)

one has to edit the config file; I did not add eudev, cryptsetup, etc to depends, as this can vary.

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

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

From e8025dccbd02306e3f974abc9754a7591a2226c4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 7 Mar 2023 16:11:17 -0500
Subject: [PATCH] new package: tinyramfs-0.1.0

---
 srcpkgs/tinyramfs/files/config               |  4 ++++
 srcpkgs/tinyramfs/files/kernel-hook-postinst | 13 +++++++++++
 srcpkgs/tinyramfs/files/kernel-hook-postrm   | 10 ++++++++
 srcpkgs/tinyramfs/template                   | 24 ++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 srcpkgs/tinyramfs/files/config
 create mode 100644 srcpkgs/tinyramfs/files/kernel-hook-postinst
 create mode 100644 srcpkgs/tinyramfs/files/kernel-hook-postrm
 create mode 100644 srcpkgs/tinyramfs/template

diff --git a/srcpkgs/tinyramfs/files/config b/srcpkgs/tinyramfs/files/config
new file mode 100644
index 000000000000..286247233454
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/config
@@ -0,0 +1,4 @@
+compress="gzip -9"
+hooks="eudev"
+root=
+root_type=ext4
diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postinst b/srcpkgs/tinyramfs/files/kernel-hook-postinst
new file mode 100644
index 000000000000..c96f55b83d2f
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/kernel-hook-postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel post-install hook for tinyramfs.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x usr/bin/tinyramfs ] || exit 0
+
+umask 0077
+usr/bin/tinyramfs -f -k ${VERSION} boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postrm b/srcpkgs/tinyramfs/files/kernel-hook-postrm
new file mode 100644
index 000000000000..0648d6c8d255
--- /dev/null
+++ b/srcpkgs/tinyramfs/files/kernel-hook-postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Kernel post-remove hook for tinyramfs.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+rm -f boot/initramfs-${VERSION}.img
diff --git a/srcpkgs/tinyramfs/template b/srcpkgs/tinyramfs/template
new file mode 100644
index 000000000000..2e82a71f4770
--- /dev/null
+++ b/srcpkgs/tinyramfs/template
@@ -0,0 +1,24 @@
+# Template file for 'tinyramfs'
+pkgname=tinyramfs
+version=0.1.0
+revision=1
+build_style=gnu-makefile
+depends="util-linux cpio binutils kmod"
+short_desc="Tiny initramfs written in POSIX shell"
+maintainer="dkwo <npiazza@disroot.org>"
+license="GPL-3.0-only"
+homepage="https://github.com/illiliti/tinyramfs"
+distfiles="https://github.com/illiliti/tinyramfs/archive/refs/tags/${version}.tar.gz"
+checksum=a78ecd56a52a02bc1f4b86ba829a957ad1f83c252bfde66562d5c3ef40be7c51
+alternatives="
+ initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postinst
+ initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postrm
+"
+make_check=no # checking requires qemu, locally this still fails
+conf_files="/etc/tinyramfs/config"
+
+post_install() {
+	vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/tinyramfs
+	vinstall ${FILESDIR}/kernel-hook-postrm 755 usr/libexec/tinyramfs
+	vinstall ${FILESDIR}/config 644 etc/tinyramfs
+}

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

* Re: new package: tinyramfs
  2023-03-28 15:37 [PR PATCH] new package: tinyramfs dkwo
  2023-03-28 20:18 ` [PR PATCH] [Updated] " dkwo
@ 2023-04-01 15:44 ` dkwo
  2023-04-05 15:48 ` dkwo
  2023-04-07 14:24 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: dkwo @ 2023-04-01 15:44 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/43061#issuecomment-1493013563

Comment:
it works, with
```
$ cat /etc/tinyramfs/config 
compress="gzip -9"
hooks="eudev,luks,lvm"
hostonly=yes
luks_root="UUID=..."
luks_name=cryptroot 
luks_discard=yes
lvm_group=cryptroot 
lvm_name=root
root="UUID=..."
```

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

* Re: new package: tinyramfs
  2023-03-28 15:37 [PR PATCH] new package: tinyramfs dkwo
  2023-03-28 20:18 ` [PR PATCH] [Updated] " dkwo
  2023-04-01 15:44 ` dkwo
@ 2023-04-05 15:48 ` dkwo
  2023-04-07 14:24 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: dkwo @ 2023-04-05 15:48 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/43061#issuecomment-1497716228

Comment:
@ahesford do you think this could be added as a choice of initram? it has a small issue with modules (right now `hostonly` works though), but works just fine with luks, lvm (tested by me), zfs, various udev replacements (as per the homepage).

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

* Re: [PR PATCH] [Merged]: new package: tinyramfs
  2023-03-28 15:37 [PR PATCH] new package: tinyramfs dkwo
                   ` (2 preceding siblings ...)
  2023-04-05 15:48 ` dkwo
@ 2023-04-07 14:24 ` ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2023-04-07 14:24 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

new package: tinyramfs
https://github.com/void-linux/void-packages/pull/43061

Description:
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes
- I built this PR locally for my native architecture, (x86_64-musl)

one has to edit the config file; I did not add eudev, cryptsetup, etc to depends, as this can vary.

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

end of thread, other threads:[~2023-04-07 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 15:37 [PR PATCH] new package: tinyramfs dkwo
2023-03-28 20:18 ` [PR PATCH] [Updated] " dkwo
2023-04-01 15:44 ` dkwo
2023-04-05 15:48 ` dkwo
2023-04-07 14:24 ` [PR PATCH] [Merged]: " ahesford

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).