summaryrefslogtreecommitdiff
path: root/libre/mkinitcpio/9001-udev.patch
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2021-11-21 04:32:14 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-11-21 04:33:25 +0100
commitd544044d45ebb3a3f0c688cd640c6c354c9f3e1c (patch)
treeed2f5467f11493c07d4ab9ac485b82577acc8434 /libre/mkinitcpio/9001-udev.patch
parent359e2c4e7f3637bbb58712c62c0ab1ef9225edcf (diff)
downloadabslibre-d544044d45ebb3a3f0c688cd640c6c354c9f3e1c.tar.gz
abslibre-d544044d45ebb3a3f0c688cd640c6c354c9f3e1c.tar.bz2
abslibre-d544044d45ebb3a3f0c688cd640c6c354c9f3e1c.zip
libre: Add mkinitcpio mkinitcpio-30-2.parabola2-any.src.tar.gz source code
The process of packages releases makes it very easy to forget to push a package or its source code to git: - A developer can push to abslibre and forget to build the package, or that developer might want to build the package later on for various reasons. - A developer can also push the package and forget to push the corresponding git commits to abslibre. I often am in the first case, but here we are in the later case. Fortunately the process of packages releases also makes it easy to find that source code. The source code of libre/mkinitcpio can be found here: https://repo.parabola.nu/sources/parabola/mkinitcpio-30-2.parabola1-any.src.tar.gz https://repo.parabola.nu/sources/parabola/mkinitcpio-30-2.parabola1-any.src.tar.gz.sig And we can even verify its signature: $ gpg --verify mkinitcpio-30-2.parabola2-any.src.tar.gz.sig gpg: assuming signed data in 'mkinitcpio-30-2.parabola2-any.src.tar.gz' gpg: Signature made sam. 06 nov. 2021 03:42:02 CET gpg: using RSA key FBCC5AD7421197B7ABA72853908710913E8C7778 gpg: Good signature from "bill-auger <bill-auger@peers.community>" [unknown] gpg: aka "bill-auger <mr.j.spam.me@gmail.com>" [unknown] gpg: aka "bill-auger <bill-auger@programmer.net>" [unknown] gpg: aka "[jpeg image of size 6017]" [unknown] gpg: Note: This key has expired! Primary key fingerprint: 3954 A7AB 837D 0EA9 CFA9 7989 25DB 7D9B 5A8D 4B40 Subkey fingerprint: FBCC 5AD7 4211 97B7 ABA7 2853 9087 1091 3E8C 7778 So we can safely import the source back in abslibre. The archive has a bit more than needed for this specific situation: $ tar tf ../mkinitcpio-30-2.parabola2-any.src.tar.gz mkinitcpio/ mkinitcpio/mkinitcpio-30.tar.gz mkinitcpio/PKGBUILD mkinitcpio/.SRCINFO mkinitcpio/mkinitcpio.install mkinitcpio/mkinitcpio-30.tar.gz.sig mkinitcpio/9001-udev.patch So I only used the PKGBUILD, mkinitcpio.install and 9001-udev.patch files here as we don't commit the .SRCINFO or source tarballs to git in Parabola. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/mkinitcpio/9001-udev.patch')
-rw-r--r--libre/mkinitcpio/9001-udev.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/libre/mkinitcpio/9001-udev.patch b/libre/mkinitcpio/9001-udev.patch
new file mode 100644
index 000000000..0de1067a4
--- /dev/null
+++ b/libre/mkinitcpio/9001-udev.patch
@@ -0,0 +1,52 @@
+$ curl https://github.com/archlinux/mkinitcpio/commit/9ee1333a5f3302d7ddb004cf0909c94b4cff60ba.diff
+diff --git a/functions b/functions
+index 9539a60..f95fb92 100644
+--- a/functions
++++ b/functions
+@@ -625,6 +625,46 @@ add_binary() {
+ return 0
+ }
+
++add_udev_rule() {
++ # Add an udev rules file to the initcpio image. Dependencies on binaries
++ # will be discovered and added.
++ # $1: path to rules file (or name of rules file)
++
++ local rules="$1" rule= key= value= binary=
++
++ if [[ ${rules:0:1} != '/' ]]; then
++ rules=$(PATH=/usr/lib/udev/rules.d:/lib/udev/rules.d type -P "$rules")
++ fi
++ if [[ -z $rules ]]; then
++ # complain about not found rules
++ return 1
++ fi
++
++ add_file "$rules" /usr/lib/udev/rules.d/"${rules##*/}"
++
++ while IFS=, read -ra rule; do
++ # skip empty lines, comments
++ [[ -z $rule || $rule = @(+([[:space:]])|#*) ]] && continue
++
++ for pair in "${rule[@]}"; do
++ IFS=' =' read -r key value <<< "$pair"
++ case $key in
++ RUN@({program}|+)|IMPORT{program}|ENV{REMOVE_CMD})
++ # strip quotes
++ binary=${value//[\"\']/}
++ # just take the first word as the binary name
++ binary=${binary%% *}
++ [[ ${binary:0:1} == '$' ]] && continue
++ if [[ ${binary:0:1} != '/' ]]; then
++ binary=$(PATH=/usr/lib/udev:/lib/udev type -P "$binary")
++ fi
++ add_binary "$binary"
++ ;;
++ esac
++ done
++ done <"$rules"
++}
++
+ parse_config() {
+ # parse key global variables set by the config file.
+