commit 51cf0b44b73a190b176fcccd166a7056ce5d45d2
parent 22797a92ca2315aa7112f333de0bcfca373137e7
Author: Dash Eclipse <dash@ezup.dev>
Date: Wed, 15 Jul 2020 15:19:09 +0000
lilo: keytab-lilo: update to support kbd 2.0.3 format
Diffstat:
6 files changed, 104 insertions(+), 0 deletions(-)
diff --git a/README b/README
@@ -19,3 +19,11 @@ dwm
Color: nordtheme based
https://dwm.suckless.org/patches/systray/
+
+
+lilo
+----
+
+[syslinux] [PATCH] keytab-lilo: update to support kbd 2.0.3 format
+https://www.syslinux.org/archives/2015-December/024690.html
+https://repo.or.cz/syslinux.git/commit/138e850fab106b5235178848b3e0d33e25f4d3a2
diff --git a/srcpkgs/lilo/files/kernel.d/lilo.post-install b/srcpkgs/lilo/files/kernel.d/lilo.post-install
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Kernel hook for LILO.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x "$(command -v lilo)" ] || \
+ exit 0
+
+[ -f /etc/lilo.conf ] && lilo
diff --git a/srcpkgs/lilo/files/kernel.d/lilo.post-remove b/srcpkgs/lilo/files/kernel.d/lilo.post-remove
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Kernel hook for LILO.
+#
+# Arguments passed to this script: $1 pkgname, $2 version.
+#
+PKGNAME="$1"
+VERSION="$2"
+
+[ -x "$(command -v lilo)" ] || \
+ exit 0
+
+# Do not abort kernel removal on error.
+[ -f /etc/lilo.conf ] && lilo || true
diff --git a/srcpkgs/lilo/patches/keytab-lilo.patch b/srcpkgs/lilo/patches/keytab-lilo.patch
@@ -0,0 +1,14 @@
+--- keytab-lilo.pl
++++ keytab-lilo.pl
+@@ -44,9 +44,9 @@ sub load_map
+ $empty = 1;
+ while (<FILE>) {
+ chop;
+- if (/^(static\s+)?u_short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) {
++ if (/^(static\s+)?(u_|unsigned )short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) {
+ die "active at beginning of map" if defined $current;
+- $current = $pfx.":".$2;
++ $current = $pfx.":".$3;
+ next;
+ }
+ undef $current if /^};\s*$/;
diff --git a/srcpkgs/lilo/patches/remove___GLIBC__.patch b/srcpkgs/lilo/patches/remove___GLIBC__.patch
@@ -0,0 +1,10 @@
+--- src/lilo.c
++++ src/lilo.c
+@@ -182,7 +182,6 @@ extern int has_partitions_beta(dev_t dev); /* defined in geometry.c */
+ printf("Without");
+ #endif
+ printf(" device-mapper\n");
+- printf("\nglibc version %d.%d\n", __GLIBC__, __GLIBC_MINOR__);
+ printf("Kernel Headers included from %d.%d.%d\n",
+ LINUX_VERSION_CODE>>16,
+ LINUX_VERSION_CODE>>8 & 255,
diff --git a/srcpkgs/lilo/template b/srcpkgs/lilo/template
@@ -0,0 +1,45 @@
+# Template file for 'lilo'
+pkgname=lilo
+version=24.2
+revision=3
+archs="i686* x86_64*"
+hostmakedepends="bin86"
+makedepends="device-mapper-devel"
+short_desc="Standard Linux boot loader"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="BSD-3-Clause"
+homepage="http://www.joonet.de/lilo"
+distfiles="${DEBIAN_SITE}/main/l/${pkgname}/${pkgname}_${version}.orig.tar.gz"
+checksum=e158f19de4560c935ebe0507c21b79bff17618b9230d8076fe8c5fff9fdbd5b1
+
+pre_build() {
+ sed -i Makefile src/Makefile \
+ -e 's|^\tmake|\t$(MAKE)|g' \
+ -e '/images install/d' \
+ -e '/images all/d'
+}
+do_build() {
+ # LILO needs LC_ALL=C
+ LC_ALL=C make CC=${CC} CFLAGS="$CFLAGS $LDFLAGS" ${makejobs} all
+}
+
+do_install() {
+ vmkdir usr/bin
+ make DESTDIR=${DESTDIR} install
+ mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/bin
+ mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+
+ rm ${DESTDIR}/etc/lilo.conf_example
+ for file in sample/*.conf; do
+ vsconf ${file}
+ done
+
+ # Setup kernel hooks
+ rm -rf ${DESTDIR}/etc/initramfs ${DESTDIR}/etc/kernel
+ vinstall ${FILESDIR}/kernel.d/lilo.post-install 750 \
+ etc/kernel.d/post-install 50-lilo
+ vinstall ${FILESDIR}/kernel.d/lilo.post-remove 750 \
+ etc/kernel.d/post-remove 50-lilo
+
+ vlicense COPYING
+}