Github messages for voidlinux
 help / color / mirror / Atom feed
From: dkwo <dkwo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] new package: tinyramfs
Date: Tue, 28 Mar 2023 17:37:34 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43061@inbox.vuxu.org> (raw)

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

             reply	other threads:[~2023-03-28 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 15:37 dkwo [this message]
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

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43061@inbox.vuxu.org \
    --to=dkwo@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).