initramfs-tools from debian
This commit is contained in:
1 parent
ecda3eabf6
commit
19e72ac0cd
2 files changed
+119
No files matched your search
@@ -0,0 +1,79 @@
|
||||
diff --git a/conf/initramfs.conf b/conf/initramfs.conf
|
||||
index aa561bd..bf80786 100644
|
||||
--- a/conf/initramfs.conf
|
||||
+++ b/conf/initramfs.conf
|
||||
@@ -38,10 +38,10 @@ BUSYBOX=auto
|
||||
KEYMAP=n
|
||||
|
||||
#
|
||||
-# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
|
||||
+# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]
|
||||
#
|
||||
|
||||
-COMPRESS=zstd
|
||||
+COMPRESS=gzip
|
||||
|
||||
#
|
||||
# COMPRESSLEVEL: ...
|
||||
@@ -52,7 +52,6 @@ COMPRESS=zstd
|
||||
# Valid values are:
|
||||
# 1 - 9 for gzip|bzip2|lzma|lzop
|
||||
# 0 - 9 for lz4|xz
|
||||
-# 0 - 19 for zstd
|
||||
#
|
||||
# COMPRESSLEVEL=3
|
||||
|
||||
diff --git a/mkinitramfs b/mkinitramfs
|
||||
index df1b940..e9ab814 100755
|
||||
--- a/mkinitramfs
|
||||
+++ b/mkinitramfs
|
||||
@@ -188,7 +188,6 @@ lzma) kconfig_sym=CONFIG_RD_LZMA ;;
|
||||
xz) kconfig_sym=CONFIG_RD_XZ ;;
|
||||
lzop) kconfig_sym=CONFIG_RD_LZO ;;
|
||||
lz4) kconfig_sym=CONFIG_RD_LZ4 ;;
|
||||
-zstd) kconfig_sym=CONFIG_RD_ZSTD ;;
|
||||
esac
|
||||
while ! grep -q "^$kconfig_sym=y" "/boot/config-${version}"; do
|
||||
if [ "${compress}" = gzip ]; then
|
||||
@@ -205,7 +204,6 @@ if [ -z "${compresslevel:-}" ]; then
|
||||
fi
|
||||
case "${compress}" in
|
||||
lz4) compresslevel="-${compresslevel:-9}" ;;
|
||||
-zstd) compresslevel="-${compresslevel:-9}" ;;
|
||||
#gzip|xz|bzip2|lzma|lzop included
|
||||
*)
|
||||
# We're not using a compression level by default
|
||||
@@ -227,7 +225,6 @@ gzip) # If we're doing a reproducible build, use gzip -n
|
||||
fi
|
||||
;;
|
||||
lz4) compress="lz4 ${compresslevel} -l" ;;
|
||||
-zstd) compress="zstd -q ${compresslevel}"
|
||||
# If we're not doing a reproducible build, enable multithreading
|
||||
test -z "${SOURCE_DATE_EPOCH}" && compress="$compress -T0"
|
||||
;;
|
||||
@@ -426,12 +423,6 @@ find "${DESTDIR}/${MODULESDIR}" -name '*.ko.*' | while read -r ko; do
|
||||
fi
|
||||
xz -d "${ko}"
|
||||
;;
|
||||
- *.zst)
|
||||
- if ! command -v zstd >/dev/null 2>&1; then
|
||||
- break
|
||||
- fi
|
||||
- zstd -q -d --rm "${ko}"
|
||||
- ;;
|
||||
esac
|
||||
done
|
||||
|
||||
diff --git a/unmkinitramfs b/unmkinitramfs
|
||||
index d1226c3..3f8c75d 100755
|
||||
--- a/unmkinitramfs
|
||||
+++ b/unmkinitramfs
|
||||
@@ -31,8 +31,6 @@ xcpio()
|
||||
|
||||
if gzip -t "$archive" >/dev/null 2>&1 ; then
|
||||
gzip -c -d "$archive"
|
||||
- elif zstd -q -c -t "$archive" >/dev/null 2>&1 ; then
|
||||
- zstd -q -c -d "$archive"
|
||||
elif xzcat -t "$archive" >/dev/null 2>&1 ; then
|
||||
xzcat "$archive"
|
||||
elif lz4cat -t < "$archive" >/dev/null 2>&1 ; then
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
name='initramfs-tools'
|
||||
release='1'
|
||||
version='0.142'
|
||||
url='https://salsa.debian.org/kernel-team/initramfs-tools'
|
||||
description='Initial ramdisk system from debian'
|
||||
email='aliriza.keskin@pardus.org.tr'
|
||||
maintainer='aliriza'
|
||||
license=('GPLv3')
|
||||
source=("https://salsa.debian.org/kernel-team/initramfs-tools/-/archive/v$version/initramfs-tools-v$version.tar.gz"
|
||||
"remove-zstd.patch")
|
||||
depends=(eudev coreutils)
|
||||
makedepends=()
|
||||
md5sums=('a3765010fe0fc6a71fe900a798b759ea'
|
||||
'SKIP')
|
||||
uses=()
|
||||
group=(sys.kernel)
|
||||
arch=('x86_64')
|
||||
|
||||
cd $name-v$version
|
||||
|
||||
prepare(){
|
||||
patch -Np1 < ../remove-zstd.patch
|
||||
}
|
||||
|
||||
package(){
|
||||
cat debian/*.install | sed "s/\t/ /g" | tr -s " " | while read line ; do
|
||||
file=$(echo $line | cut -f1 -d" ")
|
||||
target=$(echo $line | cut -f2 -d" ")
|
||||
mkdir -p ${DESTDIR}/$target
|
||||
cp -prvf $file ${DESTDIR}/$target/
|
||||
done
|
||||
# install mkinitramfs
|
||||
cp -pvf mkinitramfs ${DESTDIR}/usr/sbin/mkinitramfs
|
||||
sed -i "s/@BUSYBOX_PACKAGES@/busybox/g" ${DESTDIR}/usr/sbin/mkinitramfs
|
||||
sed -i "s/@BUSYBOX_MIN_VERSION@/1.22.0/g" ${DESTDIR}/usr/sbin/mkinitramfs
|
||||
# Remove debian stuff
|
||||
rm -rvf ${DESTDIR}/etc/kernel
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user