Update dracut crypt-ssh support to latest stable
This commit is contained in:
parent
11e8fa3726
commit
bde347c2f2
@ -1,8 +1,14 @@
|
|||||||
AUX 027-0000-fix-version-print.patch 365 SHA256 c065b20c95b24a9fc0e8e1e20de19ec3dca7cb4bd62d7a3d26adf099c39fc57b SHA512 2f622d8bc4e483d91674cb7acaa2ef9bde613bcda7c8b5c8b79bed4919fdcf0852798ba38615f796528e8c83fc18a89322a1fbde7fc5effaa6c4c4d0a389638f WHIRLPOOL b38923d3e04e161b23b9fa510b0dc0b3ce5238f3008ef0f92a1918e38c7a9ecf6d6c99a14006b734c8c77df01213c866bdce293c684c073a6cb61691a5700102
|
AUX 050-Makefile-fix-VERSION-again.patch 1057 BLAKE2B 8373a43030c02bc0273aacb3f0f286d4f98812039c459ec16607e3e5b9bd83c367420c6b67d7cc8d2f6d9469bca2e5e5770f20390348e50abdbec7f12c4f36a3 SHA512 89e5ae4cf88d65ec5f31384c334b46f8e6e74a31e0225a62523524f87f35ead8cae221d3a0f8e5f837a1e22b51833db75b2d3f3b07fa3ac4ded5dac9012a8027
|
||||||
AUX 027-0001-dracut-functions.sh-support-for-altern.patch 1387 SHA256 992e44243e87b07833154d4b2299d08df4d7c1d3b931aa22e1ad75acce21330b SHA512 d3dd82a6f976bb4aab0e70a5c483e89e6ef43f59401bbe756ea8376a758003b434610f31d2d661d749d865b6a943da01867d0223856981262dddc5f12457ccdf WHIRLPOOL eb11e2d39e18d6e2f47c34f4c9d52c90becefe71507069e333c08f96b2b3b2630e4f0d9acff265858546f63f876bd6f83227d8e9459a6732b7488c0f7e77503e
|
AUX 050-Makefile-merge-main-version-and-git-version-earlier.patch 3071 BLAKE2B 0d20b6ca7bb92aca21b3afaaee6fffb94c23de806ebe46383074979e0afedc893aec478122391d7c6015882b7882dd3f6e4124fa1f6fa1dc0bb48beae50d4d9d SHA512 ad9219c66b0a921b2fcb9dc325d1afd4c17d447228ee3b95b7a7e799acdc9d48d1d963842643d6ee6e90f8891d5c924c707331041cde53701261cb670adbcd33
|
||||||
AUX 027-0002-gentoo.conf-let-udevdir-be-handled-by-.patch 950 SHA256 e778ee1fb9179e3898b25e5ae558060d1ee75a0c63e03ad1ddb36b5275c53b35 SHA512 3ce017f58d7eea16342631b02f86330f8e86d8357928df2fb2009d3544b17f4d12a9446e83d6a47cd8fa90c2a910df34a0c680277174bf865a34f1a771f1902a WHIRLPOOL fb5cfa821abd55e6a16ec710cb418d34c1ace1be9e787310054ca5b0d08c31a26600a7ec2d8e27ee8b74773ecbc0d93810ec67f225e909e88623914eb0eb7bbc
|
AUX 050-btrfs-force-preload-btrfs-module.patch 960 BLAKE2B 9837361b8f3559d87dc39374ca9cd8e2717f257dbb428d542e356672623c6b02d2a8aea5c0cbd2c64b01564a1ec08fc7288b993f46c7043327300ca684469168 SHA512 8fcd5579486ce2afc3164970bcd2eb23306d00bef3ce1458fd6f41664299a16c5772ed3f0d823861b698b01cf7a495412afb7f3a200e4c07e96ca3b617d8d6bf
|
||||||
AUX 027-0003-Do-not-call-plymouth-with-full-path.patch 7131 SHA256 0a4d3482713417969a946760b4b25473ba9b4f42224d1fa4223bcc7967137e12 SHA512 bd35e3f22de44df839680f7b28db0bb5a14fd164faafc47a90d3fd799455d83e4e03811c003818c8db76ed56c14ca22b4806e8d6fec3e9f8d90831859f3dbe3f WHIRLPOOL 65917161c32c1f9796e7d8ddf498415ab4e9d09b19140798f4a44df2d3e75bf655bba723603598348f2c657d34bfa7376536e4361afd8ee5d8ab40e2bf233ee6
|
AUX 050-busybox-module-fix.patch 3468 BLAKE2B a5292669c358f46ededf184e654213298e1e2a193e27b90cdb3913149cae40c2bfb70a8a211515ea7d3109fe87676ad71f93166dce793b7033ecfc05691e822c SHA512 a85d8f157d466e642c53436276777e6caf42aa3280cfa2d635c1541919484c50cccc232802131ce6776b1059151bdcfabdd3e4f69d697012d2e4d24a4793794b
|
||||||
AUX 027-0004-plymouth-plymouth-pretrigger.sh-fixup-.patch 1056 SHA256 8e126a78eb051ccc69b9a3edb2d7b74515170ce8acdb9420aceaee750068cc11 SHA512 b1bda85237331aa51d0105e1ad0dee655284ea23d8e47c0818e6ea74190b65593e70b366a254140c9706e33d23eccb7893b83f0a28514806318d9f08cae01281 WHIRLPOOL 5b78398b28cc06c5a25e99b5ae687ad1c7dc14c67605fe7256f3617b458fa21af24f783ab5cad24278225e93f59fd40d1ba97ed42b460f77d1814f0546058c25
|
AUX 050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch 3655 BLAKE2B dc48d86fa1d78622bf0a7e5714de23d046515d3ad866f321769b0c56c243bdc6d6b45c69eb09e02477a79d90a546bdfcd767551b838f647f07179c9174ff46f7 SHA512 774602605b552343b0f26bcc7311c118bbb816bae9a1d798e650b72105c7a44ada8bfe238a66619ef6ee345534ef6a6d3c6449eaad51ba0ecf483fcc4aac1fb8
|
||||||
AUX 027-crypt-ssh.patch 2641 SHA256 28745938ef7bf8ed1a0459062e6ef2b87cde194e63738c7635c72525c9fb2bc3 SHA512 f235391602ac1c2aeca2fb4bf35b87da4e22c9dba609166b2badde6c4eb00b9f2c46ce61df65180156bba39f7f0cd793e98238967452a4a07981c2ae37099955 WHIRLPOOL 007130dd88b846bee9d1193e2837297df081fcb8a9e30cfb6032d8219a232728acb2e6a1cbf5747da430ee7279a065ef8d053da196845f88e03f06348243a0d6
|
AUX 050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch 2779 BLAKE2B edb10ef79fd22863aef5184ca0d7abc88602cf3e8a3cfd198047e0970d10e9aa56e1222dc44a089afb3a0f15caa87e4e3233b32980b5fd56e9975196350000f4 SHA512 a31cfceb9ab53e53ce3f69ed6388bf7cfcf40ad7b036197194f34cd973a74e28ac8bfb7bf7d79068b48fc8c5feaf26540948b8008c1fdab997587bf4b31f8b71
|
||||||
DIST dracut-027.tar.bz2 253049 SHA256 9a8f1ad2e133b4072ff433410be5b14a01cec4f75ab72ef0296e5f49a15fad13 SHA512 1e44b1ad09bc631cc554be4917c5f56514d6f5f4f9658401a7c7e9dc20ef79029246106682146785cb63beef39061aaa944fb24acd106086f02ba1356c61e938 WHIRLPOOL ebd0e0f1c4ba6e95a320e01f98ed7e31d7f399b05c7133fff8a686750f39f29c803b02764995775fa3f2c383205bc09b35a905116d366298bd6587d8d1cac572
|
AUX 050-lvm-fix-removal-of-pvscan-from-udev-rules.patch 1270 BLAKE2B ac4b93d0ed469ca9d2ba2ad9ca83b1f0efce590758bdd824278e9409fd4706e975d3fa9a10733775cc5b0a3a4665260d8869291de5a1f89c810c01a7cf0889e4 SHA512 7466c66f570c9a097b701a91d2735469187e879d2dec2ff2d10322ad39c86f3a5c70fc778d13b42014ba9754a6d1bea6d37f3ee456cbe4ec075dd676cf09093d
|
||||||
EBUILD dracut-027-r1.ebuild 8983 SHA256 683fcabd8e618b3321c4b667a0cfe2821fd974cb6f585e240cb2ff7713a0022b SHA512 c7f464126ad3baf86cd59536659e0f056edc8390fc627464241581a2f37c27c949cdcf58fbc38f04298b69d11d2bcb24c92d6dcd5a9f5cfbad1522000901cbc1 WHIRLPOOL 8521155da6b3b8578ff2ffe801946cda1e52c2d9996c8e4446173b1e20c9a4000b180345e8037926619db3b2dab7e9d11c01028d7e5b5f822d6328a5646f40c6
|
AUX 050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch 1627 BLAKE2B c45b8efef1612ede5021be1bfe2135586286b4ac8d501ce6cde518eefb699c143fec1ec858e4320ba473feb06e88896ab0f4b2f738c6a5a98c20a161d11f508a SHA512 e070f24f0d0e95a14ee503e0cbc62d87b32ad678c12a8054c1a0c505d9ae833cd37052d51fe8d1a2a608fd06a8894d06ea4da626aadf5e9e4dd39b2ea883aaae
|
||||||
|
AUX 050-systemd-remove-obsolete-syslog-parameter.patch 8176 BLAKE2B abf1619f4010cd38d98814f8827d592394a7ed7acc4c19392751adea4a98ce4acfce12bae1c2d264c392c73081ae04a205cfccd3591de651b87301352bbbe68c SHA512 3609ea93b85f79d3451fc810164c1be61def3f8e016a1fc0963088f2a690c56680d0c49bad5f8398af80150bd07bf953de50fe8832a5b88da5c01eead5fdbe7f
|
||||||
|
AUX 051-dracut.sh-move-ldconfig.patch 2064 BLAKE2B 91d60d66cc3dd788f97900e4765761b918425abb603ce09b3101ec242222f17e6e7166af7faaa8ad47cff7aa1a9259af90832066ee67f7bee25c400bdfd302cb SHA512 060f968f39bd11822b1154baa7d28a1190ead371f57e43d4a997e8013f39d48e1509908b2fe3859b9315de57dc4ed03b8e4beab1ec743dc56186c9e6a1d9c116
|
||||||
|
AUX crypt-ssh-luks.patch 4691 BLAKE2B 6b73b9e399e089e081e98d44af971c1afcc371c62c89c145ccde496e8007c8493ef3156a4acc312d4cde1d17fcd80d8395cbdb7f78785c9957b4afb6f3a0c6bf SHA512 74768f06daf9f02344064065613d4ca202906579ba9dce1f0ffaa618698fa6d6efe6af712c735ef13316415e6f8c63c0ea37cac3612130d60bbd1e25a9025295
|
||||||
|
AUX gentoo-ldconfig-paths.patch 1420 BLAKE2B 3ff093e1d244288585c369f0e3c1bc346abe1ee2ce8ee399098559765fa4e3a96611269de5f4edebe435e5a71fa1bb99eb650fcb221fad188e019837261645f4 SHA512 aa99bb08dbc8e38ee1794b7d77e5e6656afa7f6c67684d1b3fb6368861630ea7c7711d84cc48c2c5cf3b1fd98aa2673f816e4f5ebf651b63a07ded93b00d371a
|
||||||
|
DIST dracut-050.tar.xz 333592 BLAKE2B cb0bfa5a8e7547260b8a80a3606eb284182c062926269c85b09e07d26ad177df0eeaa64b17005bff9290611f1c83fc8cd8e2216cfe14b5e66ec7f659d4c2fa7b SHA512 eba046cf1c8013369a398e585e0bff233daa8595d469ce9acc8bbc6a32d55c6a5429d4219db19abbf6001104be05b357f0961f9e66b7f926039a5d3ee7c2b850
|
||||||
|
EBUILD dracut-050-r2.ebuild 5340 BLAKE2B d4ec5701f82859ab58c81619a737a88a0edf14b0ead3cedd6461c734f5acd8efc90d91148170db6d2604f95ff4d608e2c96fcee0f90d75e4a963f3eededd5f38 SHA512 4b1b6ee247a3efdc4a35a83b87ccb39d2f12abc329bbc767e2d8c2ce1d767c2f159a3aee02cbff290effe6fa17031962e3a6efadf6ac5f5335116d208a0d0b76
|
||||||
|
@ -1,308 +0,0 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-027-r1.ebuild,v 1.1 2013/04/18 13:37:10 aidecoe Exp $
|
|
||||||
|
|
||||||
EAPI=4
|
|
||||||
|
|
||||||
inherit bash-completion-r1 eutils linux-info
|
|
||||||
|
|
||||||
add_req_use_for() {
|
|
||||||
local dep="$1"; shift
|
|
||||||
local f
|
|
||||||
|
|
||||||
for f in "$@"; do
|
|
||||||
REQUIRED_USE+="${f}? ( ${dep} )
|
|
||||||
"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
DESCRIPTION="Generic initramfs generation tool"
|
|
||||||
HOMEPAGE="http://dracut.wiki.kernel.org"
|
|
||||||
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
dracut_modules_bootchart? ( !dracut_modules_systemd )
|
|
||||||
dracut_modules_crypt-gpg? ( dracut_modules_crypt )
|
|
||||||
dracut_modules_crypt-ssh? ( dracut_modules_crypt )
|
|
||||||
dracut_modules_crypt-loop? ( dracut_modules_crypt )
|
|
||||||
dracut_modules_livenet? ( dracut_modules_dmsquash-live )
|
|
||||||
"
|
|
||||||
COMMON_MODULES="
|
|
||||||
dracut_modules_biosdevname
|
|
||||||
dracut_modules_bootchart
|
|
||||||
dracut_modules_btrfs
|
|
||||||
dracut_modules_caps
|
|
||||||
dracut_modules_crypt-gpg
|
|
||||||
dracut_modules_crypt-loop
|
|
||||||
dracut_modules_gensplash
|
|
||||||
dracut_modules_mdraid
|
|
||||||
dracut_modules_multipath
|
|
||||||
dracut_modules_plymouth
|
|
||||||
dracut_modules_syslog
|
|
||||||
dracut_modules_systemd
|
|
||||||
"
|
|
||||||
DM_MODULES="
|
|
||||||
dracut_modules_crypt
|
|
||||||
dracut_modules_dmraid
|
|
||||||
dracut_modules_dmsquash-live
|
|
||||||
dracut_modules_livenet
|
|
||||||
dracut_modules_lvm
|
|
||||||
"
|
|
||||||
NETWORK_MODULES="
|
|
||||||
dracut_modules_cifs
|
|
||||||
dracut_modules_iscsi
|
|
||||||
dracut_modules_livenet
|
|
||||||
dracut_modules_nbd
|
|
||||||
dracut_modules_nfs
|
|
||||||
dracut_modules_ssh-client
|
|
||||||
dracut_modules_crypt-ssh
|
|
||||||
"
|
|
||||||
add_req_use_for device-mapper ${DM_MODULES}
|
|
||||||
add_req_use_for net ${NETWORK_MODULES}
|
|
||||||
IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
|
|
||||||
IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}"
|
|
||||||
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
CDEPEND="virtual/udev
|
|
||||||
dracut_modules_systemd? ( >=sys-apps/systemd-199 )
|
|
||||||
"
|
|
||||||
RDEPEND="${CDEPEND}
|
|
||||||
app-arch/cpio
|
|
||||||
>=app-shells/bash-4.0
|
|
||||||
>=app-shells/dash-0.5.4.11
|
|
||||||
>=sys-apps/baselayout-1.12.14-r1
|
|
||||||
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
|
|
||||||
>=sys-apps/sysvinit-2.87-r3
|
|
||||||
>=sys-apps/util-linux-2.21
|
|
||||||
virtual/pkgconfig
|
|
||||||
|
|
||||||
debug? ( dev-util/strace )
|
|
||||||
device-mapper? ( >=sys-fs/lvm2-2.02.33 )
|
|
||||||
net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 )
|
|
||||||
selinux? ( sys-libs/libselinux sys-libs/libsepol )
|
|
||||||
dracut_modules_biosdevname? ( sys-apps/biosdevname )
|
|
||||||
dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep
|
|
||||||
sys-process/acct )
|
|
||||||
dracut_modules_btrfs? ( sys-fs/btrfs-progs )
|
|
||||||
dracut_modules_caps? ( sys-libs/libcap )
|
|
||||||
dracut_modules_cifs? ( net-fs/cifs-utils )
|
|
||||||
dracut_modules_crypt? ( sys-fs/cryptsetup )
|
|
||||||
dracut_modules_crypt-gpg? ( app-crypt/gnupg )
|
|
||||||
dracut_modules_crypt-ssh? ( net-misc/dropbear )
|
|
||||||
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
|
|
||||||
dracut_modules_gensplash? ( media-gfx/splashutils )
|
|
||||||
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
|
|
||||||
dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
|
|
||||||
dracut_modules_mdraid? ( sys-fs/mdadm )
|
|
||||||
dracut_modules_multipath? ( sys-fs/multipath-tools )
|
|
||||||
dracut_modules_nbd? ( sys-block/nbd )
|
|
||||||
dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind )
|
|
||||||
dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
|
|
||||||
dracut_modules_ssh-client? ( dev-libs/openssl )
|
|
||||||
dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
|
|
||||||
"
|
|
||||||
DEPEND="${CDEPEND}
|
|
||||||
app-text/asciidoc
|
|
||||||
>=dev-libs/libxslt-1.1.26
|
|
||||||
app-text/docbook-xml-dtd:4.5
|
|
||||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
|
||||||
"
|
|
||||||
|
|
||||||
DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules
|
|
||||||
README.testsuite TODO )
|
|
||||||
MY_LIBDIR="/usr/lib"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Helper functions
|
|
||||||
#
|
|
||||||
|
|
||||||
# Returns true if any of specified modules is enabled by USE flag and false
|
|
||||||
# otherwise.
|
|
||||||
# $1 = list of modules (which have corresponding USE flags of the same name)
|
|
||||||
any_module() {
|
|
||||||
local m modules=" $@ "
|
|
||||||
|
|
||||||
for m in ${modules}; do
|
|
||||||
! use $m && modules=${modules/ $m / }
|
|
||||||
done
|
|
||||||
|
|
||||||
shopt -s extglob
|
|
||||||
modules=${modules%%+( )}
|
|
||||||
shopt -u extglob
|
|
||||||
|
|
||||||
[[ ${modules} ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Removes module from modules.d.
|
|
||||||
# $1 = module name
|
|
||||||
# Module name can be specified without number prefix.
|
|
||||||
rm_module() {
|
|
||||||
local force m
|
|
||||||
[[ $1 = -f ]] && force=-f
|
|
||||||
|
|
||||||
for m in $@; do
|
|
||||||
if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
|
|
||||||
rm ${force} --interactive=never -r "${modules_dir}"/$m
|
|
||||||
else
|
|
||||||
rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# ebuild functions
|
|
||||||
#
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}/${PV}-0000-fix-version-print.patch"
|
|
||||||
epatch "${FILESDIR}/${PV}-0001-dracut-functions.sh-support-for-altern.patch"
|
|
||||||
epatch "${FILESDIR}/${PV}-0002-gentoo.conf-let-udevdir-be-handled-by-.patch"
|
|
||||||
epatch "${FILESDIR}/${PV}-0003-Do-not-call-plymouth-with-full-path.patch"
|
|
||||||
epatch "${FILESDIR}/${PV}-0004-plymouth-plymouth-pretrigger.sh-fixup-.patch"
|
|
||||||
|
|
||||||
if use dracut_modules_systemd; then
|
|
||||||
local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
|
|
||||||
--variable=systemdutildir)"
|
|
||||||
local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \
|
|
||||||
--variable=systemdsystemunitdir)"
|
|
||||||
[[ ${systemdutildir} ]] || die "Couldn't detect systemdutildir"
|
|
||||||
[[ ${systemdsystemunitdir} ]] \
|
|
||||||
|| die "Couldn't detect systemdsystemunitdir"
|
|
||||||
einfo "Setting systemdutildir to ${systemdutildir} and ..."
|
|
||||||
sed -e "4asystemdutildir=\"${systemdutildir}\"" \
|
|
||||||
-i "${S}/dracut.conf.d/gentoo.conf.example" || die
|
|
||||||
einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir}..."
|
|
||||||
sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
|
|
||||||
-i "${S}/dracut.conf.d/gentoo.conf.example" || die
|
|
||||||
fi
|
|
||||||
if use dracut_modules_crypt-ssh; then
|
|
||||||
epatch "${FILESDIR}/${PV}-crypt-ssh.patch"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf --libdir="${MY_LIBDIR}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake doc
|
|
||||||
|
|
||||||
if use optimization; then
|
|
||||||
ewarn "Enabling experimental optimization!"
|
|
||||||
tc-export CC
|
|
||||||
emake install/dracut-install
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
|
|
||||||
newbashcomp "${PN}-bash-completion.sh" "${PN}"
|
|
||||||
|
|
||||||
local dracutlibdir="${MY_LIBDIR#/}/dracut"
|
|
||||||
|
|
||||||
echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh"
|
|
||||||
|
|
||||||
insinto "${dracutlibdir}/dracut.conf.d/"
|
|
||||||
newins dracut.conf.d/gentoo.conf.example gentoo.conf
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins dracut.logrotate dracut
|
|
||||||
|
|
||||||
dodir /var/lib/dracut/overlay
|
|
||||||
|
|
||||||
dohtml dracut.html
|
|
||||||
|
|
||||||
#
|
|
||||||
# Modules
|
|
||||||
#
|
|
||||||
local module
|
|
||||||
modules_dir="${D%/}/${dracutlibdir}/modules.d"
|
|
||||||
|
|
||||||
# Remove modules not enabled by USE flags
|
|
||||||
for module in ${IUSE_DRACUT_MODULES} ; do
|
|
||||||
! use ${module} && rm_module -f ${module#dracut_modules_}
|
|
||||||
done
|
|
||||||
|
|
||||||
# Those flags are specific, and even are corresponding to modules, they need
|
|
||||||
# to be declared as regular USE flags.
|
|
||||||
use debug || rm_module 95debug
|
|
||||||
use selinux || rm_module 98selinux
|
|
||||||
|
|
||||||
# Following flags define set of helper modules which are base dependencies
|
|
||||||
# for others and as so have no practical use, so remove these modules.
|
|
||||||
use device-mapper || rm_module 90dm
|
|
||||||
use net || rm_module 40network 45ifcfg 45url-lib
|
|
||||||
|
|
||||||
if use dracut_modules_systemd; then
|
|
||||||
# With systemd following modules do not make sense
|
|
||||||
rm_module 96securityfs 98selinux
|
|
||||||
else
|
|
||||||
# Without systemd following modules do not make sense
|
|
||||||
rm_module 00systemd-bootchart
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove S/390 modules which are not tested at all
|
|
||||||
rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet
|
|
||||||
|
|
||||||
# Remove modules which won't work for sure
|
|
||||||
rm_module 95fcoe # no tools
|
|
||||||
# fips module depends on masked app-crypt/hmaccalc
|
|
||||||
rm_module 01fips 02fips-aesni
|
|
||||||
|
|
||||||
# Remove extra modules which go to future dracut-extras
|
|
||||||
rm_module 05busybox 97masterkey 98ecryptfs 98integrity
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if linux-info_get_any_version && linux_config_src_exists; then
|
|
||||||
ewarn ""
|
|
||||||
ewarn "If the following test report contains a missing kernel"
|
|
||||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
|
||||||
ewarn "kernel before booting image generated with this Dracut version."
|
|
||||||
ewarn ""
|
|
||||||
|
|
||||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
|
||||||
|
|
||||||
# Kernel configuration options descriptions:
|
|
||||||
local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev"
|
|
||||||
local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\
|
|
||||||
"(initramfs/initrd) support"
|
|
||||||
|
|
||||||
local opt desc
|
|
||||||
|
|
||||||
# Generate ERROR_* variables for check_extra_config.
|
|
||||||
for opt in ${CONFIG_CHECK}; do
|
|
||||||
opt=${opt#\~}
|
|
||||||
desc=desc_${opt}
|
|
||||||
eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \
|
|
||||||
"is missing and REQUIRED'"
|
|
||||||
done
|
|
||||||
|
|
||||||
check_extra_config
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
ewarn ""
|
|
||||||
ewarn "Your kernel configuration couldn't be checked. Do you have"
|
|
||||||
ewarn "/usr/src/linux/.config file there? Please check manually if"
|
|
||||||
ewarn "following options are enabled:"
|
|
||||||
ewarn ""
|
|
||||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
|
||||||
ewarn " CONFIG_DEVTMPFS"
|
|
||||||
ewarn ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use dracut_modules_crypt || use dracut_modules_dmraid || use \
|
|
||||||
dracut_modules_mdraid || use dracut_modules_lvm; then
|
|
||||||
|
|
||||||
if ! [[ $(</proc/cmdline) =~ rd.auto[\ =] ]]; then
|
|
||||||
ewarn "Autoassembly of special devices like cryptoLUKS, dmraid, "
|
|
||||||
ewarn "mdraid or lvm is off for default as of >=dracut-024."
|
|
||||||
ewarn "Use rd.auto option to turn it on."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
172
sys-kernel/dracut/dracut-050-r2.ebuild
Normal file
172
sys-kernel/dracut/dracut-050-r2.ebuild
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
|
inherit git-r3
|
||||||
|
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||||
|
else
|
||||||
|
[[ "${PV}" = *_rc* ]] || \
|
||||||
|
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
|
||||||
|
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Generic initramfs generation tool"
|
||||||
|
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="selinux"
|
||||||
|
|
||||||
|
# Tests need root privileges, bug #298014
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
app-arch/cpio
|
||||||
|
>=app-shells/bash-4.0:0
|
||||||
|
sys-apps/coreutils[xattr(-)]
|
||||||
|
>=sys-apps/kmod-23[tools]
|
||||||
|
|| (
|
||||||
|
>=sys-apps/sysvinit-2.87-r3
|
||||||
|
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||||
|
sys-apps/systemd[sysv-utils]
|
||||||
|
)
|
||||||
|
>=sys-apps/util-linux-2.21
|
||||||
|
virtual/pkgconfig
|
||||||
|
virtual/udev
|
||||||
|
|
||||||
|
elibc_musl? ( sys-libs/fts-standalone )
|
||||||
|
selinux? (
|
||||||
|
sec-policy/selinux-dracut
|
||||||
|
sys-libs/libselinux
|
||||||
|
sys-libs/libsepol
|
||||||
|
)
|
||||||
|
"
|
||||||
|
DEPEND="
|
||||||
|
>=sys-apps/kmod-23
|
||||||
|
elibc_musl? ( sys-libs/fts-standalone )
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
app-text/asciidoc
|
||||||
|
app-text/docbook-xml-dtd:4.5
|
||||||
|
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||||
|
>=dev-libs/libxslt-1.1.26
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules
|
||||||
|
README.testsuite TODO )
|
||||||
|
|
||||||
|
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/050-Makefile-merge-main-version-and-git-version-earlier.patch
|
||||||
|
"${FILESDIR}"/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch
|
||||||
|
"${FILESDIR}"/050-Makefile-fix-VERSION-again.patch
|
||||||
|
"${FILESDIR}"/050-btrfs-force-preload-btrfs-module.patch
|
||||||
|
"${FILESDIR}"/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch
|
||||||
|
"${FILESDIR}"/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch
|
||||||
|
"${FILESDIR}"/050-busybox-module-fix.patch
|
||||||
|
"${FILESDIR}"/050-systemd-remove-obsolete-syslog-parameter.patch
|
||||||
|
"${FILESDIR}"/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch
|
||||||
|
"${FILESDIR}"/gentoo-ldconfig-paths.patch
|
||||||
|
"${FILESDIR}"/crypt-ssh-luks.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local myconf=(
|
||||||
|
--prefix="${EPREFIX}/usr"
|
||||||
|
--sysconfdir="${EPREFIX}/etc"
|
||||||
|
--bashcompletiondir="$(get_bashcompdir)"
|
||||||
|
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||||
|
)
|
||||||
|
|
||||||
|
tc-export CC PKG_CONFIG
|
||||||
|
|
||||||
|
echo ./configure "${myconf[@]}"
|
||||||
|
./configure "${myconf[@]}" || die
|
||||||
|
|
||||||
|
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||||
|
# Source tarball from github doesn't include this file
|
||||||
|
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d
|
||||||
|
newins dracut.logrotate dracut
|
||||||
|
|
||||||
|
docinto html
|
||||||
|
dodoc dracut.html
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if linux-info_get_any_version && linux_config_exists; then
|
||||||
|
ewarn ""
|
||||||
|
ewarn "If the following test report contains a missing kernel"
|
||||||
|
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||||
|
ewarn "kernel before booting image generated with this Dracut version."
|
||||||
|
ewarn ""
|
||||||
|
|
||||||
|
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||||
|
|
||||||
|
# Kernel configuration options descriptions:
|
||||||
|
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||||
|
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||||
|
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||||
|
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||||
|
|
||||||
|
check_extra_config
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
ewarn ""
|
||||||
|
ewarn "Your kernel configuration couldn't be checked."
|
||||||
|
ewarn "Please check manually if following options are enabled:"
|
||||||
|
ewarn ""
|
||||||
|
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||||
|
ewarn " CONFIG_DEVTMPFS"
|
||||||
|
ewarn ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
elog "To get additional features, a number of optional runtime"
|
||||||
|
elog "dependencies may be installed:"
|
||||||
|
elog ""
|
||||||
|
optfeature "Networking support" net-misc/networkmanager
|
||||||
|
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||||
|
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||||
|
optfeature \
|
||||||
|
"Measure performance of the boot process for later visualisation" \
|
||||||
|
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||||
|
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||||
|
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||||
|
sys-libs/libcap
|
||||||
|
optfeature "Support CIFS" net-fs/cifs-utils
|
||||||
|
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||||
|
"sys-fs/cryptsetup[-static-libs]"
|
||||||
|
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||||
|
app-crypt/gnupg
|
||||||
|
optfeature \
|
||||||
|
"Allows use of dash instead of default bash (on your own risk)" \
|
||||||
|
app-shells/dash
|
||||||
|
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||||
|
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||||
|
optfeature "Support MD devices, also known as software RAID devices" \
|
||||||
|
sys-fs/mdadm
|
||||||
|
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||||
|
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||||
|
optfeature "Support network block devices" sys-block/nbd
|
||||||
|
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||||
|
optfeature \
|
||||||
|
"Install ssh and scp along with config files and specified keys" \
|
||||||
|
net-misc/openssh
|
||||||
|
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||||
|
optfeature \
|
||||||
|
"Enable rngd service to help generating entropy early during boot" \
|
||||||
|
sys-apps/rng-tools
|
||||||
|
}
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
||||||
index b441a27..410201a 100755
|
|
||||||
--- a/modules.d/99base/init.sh
|
|
||||||
+++ b/modules.d/99base/init.sh
|
|
||||||
@@ -104,7 +104,7 @@ else
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f /etc/initrd-release ] && . /etc/initrd-release
|
|
||||||
-[ -n "$VERSION" ] && info "dracut-$VERSION"
|
|
||||||
+[ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID"
|
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 3688462730a97d4cc5644dab87aadf147d8c72f0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
|
|
||||||
Date: Sun, 6 Jan 2013 13:35:01 +0100
|
|
||||||
Subject: [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs -
|
|
||||||
udevaltdirs
|
|
||||||
|
|
||||||
It is required for Gentoo which moves udev from / to /usr and supports
|
|
||||||
both /lib/udev and /usr/lib/udev for compatibility with other packages.
|
|
||||||
|
|
||||||
Credits go to Alexander Tsoy <alexander@tsoy.me>.
|
|
||||||
---
|
|
||||||
dracut-functions.sh | 9 +++++++++
|
|
||||||
1 file changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
||||||
index eba7412..d888f4c 100755
|
|
||||||
--- a/dracut-functions.sh
|
|
||||||
+++ b/dracut-functions.sh
|
|
||||||
@@ -961,6 +961,15 @@ inst_rules() {
|
|
||||||
inst_dir "$_target"
|
|
||||||
for _rule in "$@"; do
|
|
||||||
if [ "${_rule#/}" = "$_rule" ]; then
|
|
||||||
+ for r in ${udevaltdirs}; do
|
|
||||||
+ [[ "$r" = "${udevdir}" ]] && continue
|
|
||||||
+ if [[ -f $r/rules.d/$_rule ]]; then
|
|
||||||
+ _found="$r/rules.d/$_rule"
|
|
||||||
+ inst_rule_programs "$_found"
|
|
||||||
+ inst_rule_group_owner "$_found"
|
|
||||||
+ inst_simple "$_found" "${udevdir}/rules.d/${_found##*/}"
|
|
||||||
+ fi
|
|
||||||
+ done
|
|
||||||
for r in ${udevdir}/rules.d /etc/udev/rules.d; do
|
|
||||||
if [[ -f $r/$_rule ]]; then
|
|
||||||
_found="$r/$_rule"
|
|
||||||
--
|
|
||||||
1.8.1.5
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 624a97d4e2b548889b5f758ed6a908a1495b44be Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
|
|
||||||
Date: Sun, 16 Dec 2012 20:02:48 +0100
|
|
||||||
Subject: [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and
|
|
||||||
use udevaltdirs
|
|
||||||
|
|
||||||
To avoid need of rebuild after udev update/downgrade let udevdir= be set
|
|
||||||
dynamically with pkg-config. Use udevaltdirs to search for rules both
|
|
||||||
in old and new locations.
|
|
||||||
---
|
|
||||||
dracut.conf.d/gentoo.conf.example | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example
|
|
||||||
index 1361a30..b78e5c6 100644
|
|
||||||
--- a/dracut.conf.d/gentoo.conf.example
|
|
||||||
+++ b/dracut.conf.d/gentoo.conf.example
|
|
||||||
@@ -1,7 +1,8 @@
|
|
||||||
# /etc/dracut.conf.d/gentoo.conf
|
|
||||||
# dracut config file customized for Gentoo Base System release 2
|
|
||||||
|
|
||||||
-udevdir=/lib/udev
|
|
||||||
+udevdir=
|
|
||||||
+udevaltdirs="/lib/udev /usr/lib/udev"
|
|
||||||
ro_mnt=yes
|
|
||||||
|
|
||||||
#
|
|
||||||
--
|
|
||||||
1.8.1.5
|
|
||||||
|
|
@ -1,167 +0,0 @@
|
|||||||
From d084ce382e70723854f960daa8b0e486ee1ce97f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Thu, 11 Apr 2013 16:08:26 +0200
|
|
||||||
Subject: [PATCH 3/4] Do not call plymouth with full path
|
|
||||||
|
|
||||||
---
|
|
||||||
modules.d/50plymouth/module-setup.sh | 2 +-
|
|
||||||
modules.d/50plymouth/plymouth-emergency.sh | 2 +-
|
|
||||||
modules.d/50plymouth/plymouth-newroot.sh | 4 ++--
|
|
||||||
modules.d/50plymouth/plymouth-populate-initrd.sh | 5 ++---
|
|
||||||
modules.d/50plymouth/plymouth-pretrigger.sh | 6 +++---
|
|
||||||
modules.d/90crypt/crypt-lib.sh | 4 ++--
|
|
||||||
modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++--
|
|
||||||
modules.d/98systemd/dracut-emergency.sh | 2 +-
|
|
||||||
modules.d/99base/dracut-lib.sh | 4 ++--
|
|
||||||
9 files changed, 16 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
|
|
||||||
index f754e24..ae35b11 100755
|
|
||||||
--- a/modules.d/50plymouth/module-setup.sh
|
|
||||||
+++ b/modules.d/50plymouth/module-setup.sh
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
|
|
||||||
check() {
|
|
||||||
[[ "$mount_needs" ]] && return 1
|
|
||||||
- [[ -x /sbin/plymouthd && -x /bin/plymouth && -x /usr/sbin/plymouth-set-default-theme ]]
|
|
||||||
+ type -P plymouthd >/dev/null && type -P plymouth >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
depends() {
|
|
||||||
diff --git a/modules.d/50plymouth/plymouth-emergency.sh b/modules.d/50plymouth/plymouth-emergency.sh
|
|
||||||
index 68955b8..ed0b0ac 100755
|
|
||||||
--- a/modules.d/50plymouth/plymouth-emergency.sh
|
|
||||||
+++ b/modules.d/50plymouth/plymouth-emergency.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
#!/bin/sh
|
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
-[ -x /bin/plymouth ] && /bin/plymouth --hide-splash
|
|
||||||
+plymouth --hide-splash 2>/dev/null || :
|
|
||||||
diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh
|
|
||||||
index 2311b47..96cd138 100755
|
|
||||||
--- a/modules.d/50plymouth/plymouth-newroot.sh
|
|
||||||
+++ b/modules.d/50plymouth/plymouth-newroot.sh
|
|
||||||
@@ -2,6 +2,6 @@
|
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
-if [ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
- /bin/plymouth --newroot=$NEWROOT
|
|
||||||
+if type plymouth >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
+ plymouth --newroot=$NEWROOT
|
|
||||||
fi
|
|
||||||
diff --git a/modules.d/50plymouth/plymouth-populate-initrd.sh b/modules.d/50plymouth/plymouth-populate-initrd.sh
|
|
||||||
index 1e2ffe7..6e0f561 100755
|
|
||||||
--- a/modules.d/50plymouth/plymouth-populate-initrd.sh
|
|
||||||
+++ b/modules.d/50plymouth/plymouth-populate-initrd.sh
|
|
||||||
@@ -4,15 +4,14 @@
|
|
||||||
PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
|
|
||||||
PLYMOUTH_THEME=$(plymouth-set-default-theme)
|
|
||||||
|
|
||||||
-inst /sbin/plymouthd /bin/plymouthd
|
|
||||||
-dracut_install /bin/plymouth \
|
|
||||||
+dracut_install plymouthd plymouth \
|
|
||||||
"${PLYMOUTH_LOGO_FILE}" \
|
|
||||||
/etc/system-release
|
|
||||||
|
|
||||||
mkdir -m 0755 -p "${initdir}/usr/share/plymouth"
|
|
||||||
|
|
||||||
inst_libdir_file "plymouth/text.so" "plymouth/details.so"
|
|
||||||
-
|
|
||||||
+
|
|
||||||
if [[ $hostonly ]]; then
|
|
||||||
dracut_install \
|
|
||||||
"/usr/share/plymouth/themes/details/details.plymouth" \
|
|
||||||
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
index 0e3cb02..8087bf6 100755
|
|
||||||
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
-if [ -x /bin/plymouthd -a -z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
+if type plymouthd >/dev/null 2>&1 && [-z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
|
|
||||||
# first trigger graphics subsystem
|
|
||||||
udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
|
|
||||||
@@ -16,8 +16,8 @@ if [ -x /bin/plymouthd -a -z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
read consoledev rest < /sys/class/tty/console/active
|
|
||||||
consoledev=${consoledev:-tty0}
|
|
||||||
[ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev"
|
|
||||||
- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
|
|
||||||
- /bin/plymouth --show-splash 2>&1 | vinfo
|
|
||||||
+ plymouthd --attach-to-session --pid-file /run/plymouth/pid
|
|
||||||
+ plymouth --show-splash 2>&1 | vinfo
|
|
||||||
# reset tty after plymouth messed with it
|
|
||||||
[ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev"
|
|
||||||
fi
|
|
||||||
diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh
|
|
||||||
index d66ba88..ebe09f8 100755
|
|
||||||
--- a/modules.d/90crypt/crypt-lib.sh
|
|
||||||
+++ b/modules.d/90crypt/crypt-lib.sh
|
|
||||||
@@ -47,8 +47,8 @@ ask_for_password() {
|
|
||||||
|
|
||||||
{ flock -s 9;
|
|
||||||
# Prompt for password with plymouth, if installed and running.
|
|
||||||
- if [ -x /bin/plymouth ] && /bin/plymouth --ping; then
|
|
||||||
- /bin/plymouth ask-for-password \
|
|
||||||
+ if type plymouth >/dev/null 2>&1 && plymouth --ping 2>/dev/null; then
|
|
||||||
+ plymouth ask-for-password \
|
|
||||||
--prompt "$ply_prompt" --number-of-tries=$ply_tries \
|
|
||||||
--command="$ply_cmd"
|
|
||||||
ret=$?
|
|
||||||
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
||||||
index a79b0d9..07e41f0 100755
|
|
||||||
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
||||||
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
||||||
@@ -31,7 +31,7 @@ if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
|
|
||||||
fi
|
|
||||||
getarg rd.live.check -d check || check=""
|
|
||||||
if [ -n "$check" ]; then
|
|
||||||
- [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
|
|
||||||
+ type plymouth >/dev/null 2>&1 && plymouth --hide-splash
|
|
||||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
|
||||||
p=$(str_replace "$livedev" "-" '\x2d')
|
|
||||||
systemctl start checkisomd5@${p}.service
|
|
||||||
@@ -42,7 +42,7 @@ if [ -n "$check" ]; then
|
|
||||||
die "CD check failed!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- [ -x /bin/plymouth ] && /bin/plymouth --show-splash
|
|
||||||
+ type plymouth >/dev/null 2>&1 && plymouth --show-splash
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s $livedev /run/initramfs/livedev
|
|
||||||
diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh
|
|
||||||
index a0a4b12..8ab045e 100755
|
|
||||||
--- a/modules.d/98systemd/dracut-emergency.sh
|
|
||||||
+++ b/modules.d/98systemd/dracut-emergency.sh
|
|
||||||
@@ -10,7 +10,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
|
||||||
|
|
||||||
-[ -x /bin/plymouth ] && /bin/plymouth quit
|
|
||||||
+type plymouth >/dev/null 2>&1 && plymouth quit
|
|
||||||
|
|
||||||
export _rdshell_name="dracut" action="Boot" hook="emergency"
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
||||||
index e456b01..b8919f3 100755
|
|
||||||
--- a/modules.d/99base/dracut-lib.sh
|
|
||||||
+++ b/modules.d/99base/dracut-lib.sh
|
|
||||||
@@ -952,8 +952,8 @@ emergency_shell()
|
|
||||||
shift 2
|
|
||||||
elif [ "$1" = "--shutdown" ]; then
|
|
||||||
_rdshell_name=$2; action="Shutdown"; hook="shutdown-emergency"
|
|
||||||
- if [ -x /bin/plymouth ]; then
|
|
||||||
- /bin/plymouth --hide-splash
|
|
||||||
+ if type plymouth >/dev/null 2>&1; then
|
|
||||||
+ plymouth --hide-splash
|
|
||||||
elif [ -x /oldroot/bin/plymouth ]; then
|
|
||||||
/oldroot/bin/plymouth --hide-splash
|
|
||||||
fi
|
|
||||||
--
|
|
||||||
1.8.2.1
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 331ebcb5f3530597f49a344c7392c7f330838fdd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Fri, 12 Apr 2013 15:25:44 +0200
|
|
||||||
Subject: [PATCH 4/4] plymouth/plymouth-pretrigger.sh: fixup of ca2c6936
|
|
||||||
|
|
||||||
---
|
|
||||||
modules.d/50plymouth/plymouth-pretrigger.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
index 8087bf6..196f2f9 100755
|
|
||||||
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
-if type plymouthd >/dev/null 2>&1 && [-z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
+if type plymouthd >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
|
|
||||||
if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
|
|
||||||
# first trigger graphics subsystem
|
|
||||||
udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
|
|
||||||
--
|
|
||||||
1.8.2.1
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
|||||||
commit 2a662251cf8d8163d5fbd42cd4c08329d58f2486
|
|
||||||
Author: Stefan Reimer <it@startux.de>
|
|
||||||
Date: Wed Apr 3 23:18:19 2013 -0700
|
|
||||||
|
|
||||||
Initial version of the crypt-ssh module
|
|
||||||
|
|
||||||
diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
|
|
||||||
index 9665e48..2d81684 100755
|
|
||||||
--- a/modules.d/90crypt/cryptroot-ask.sh
|
|
||||||
+++ b/modules.d/90crypt/cryptroot-ask.sh
|
|
||||||
@@ -146,12 +146,26 @@ fi
|
|
||||||
|
|
||||||
if [ $ask_passphrase -ne 0 ]; then
|
|
||||||
luks_open="$(command -v cryptsetup) $cryptsetupopts luksOpen"
|
|
||||||
- ask_for_password --ply-tries 5 \
|
|
||||||
- --ply-cmd "$luks_open -T1 $device $luksname" \
|
|
||||||
- --ply-prompt "Password ($device)" \
|
|
||||||
- --tty-tries 1 \
|
|
||||||
- --tty-cmd "$luks_open -T5 $device $luksname"
|
|
||||||
- unset luks_open
|
|
||||||
+ port=22001
|
|
||||||
+
|
|
||||||
+ if getargbool 0 rd.luks.ssh; then
|
|
||||||
+ # Setup authorized_key file
|
|
||||||
+ echo -n "command=\"$luks_open -T5 $device $luksname && rm -f /root/.ssh/key.pub \" " > /root/.ssh/authorized_keys
|
|
||||||
+ cat /root/.ssh/key.pub >> /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys
|
|
||||||
+ echo "Starting SSH server on port $port"
|
|
||||||
+ /usr/sbin/dropbear -p $port -m -j -k -s
|
|
||||||
+ while [ -f /root/.ssh/key.pub ]; do
|
|
||||||
+ sleep 1
|
|
||||||
+ done
|
|
||||||
+ kill $(cat /var/run/dropbear.pid)
|
|
||||||
+ else
|
|
||||||
+ ask_for_password --ply-tries 5 \
|
|
||||||
+ --ply-cmd "$luks_open -T1 $device $luksname" \
|
|
||||||
+ --ply-prompt "Password ($device)" \
|
|
||||||
+ --tty-tries 1 \
|
|
||||||
+ --tty-cmd "$luks_open -T5 $device $luksname"
|
|
||||||
+ fi
|
|
||||||
+ unset luks_open port
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset device luksname luksfile
|
|
||||||
diff --git a/modules.d/92crypt-ssh/module-setup.sh b/modules.d/92crypt-ssh/module-setup.sh
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..ac0785b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/92crypt-ssh/module-setup.sh
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
+
|
|
||||||
+# Author: Stefan Reimer
|
|
||||||
+# Date: 2013-Mar-24
|
|
||||||
+
|
|
||||||
+check() {
|
|
||||||
+ [ -x /usr/sbin/dropbear ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+depends() {
|
|
||||||
+ echo "network crypt"
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+install() {
|
|
||||||
+ #Install dropbear incl. keys
|
|
||||||
+ mkdir -p /etc/dropbear
|
|
||||||
+ [ -r /etc/dropbear/dropbear_dss_host_key ] || /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null
|
|
||||||
+ [ -r /etc/dropbear/dropbear_rsa_host_key ] || /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null
|
|
||||||
+
|
|
||||||
+ inst /usr/sbin/dropbear
|
|
||||||
+ inst /etc/dropbear/dropbear_dss_host_key
|
|
||||||
+ inst /etc/dropbear/dropbear_rsa_host_key
|
|
||||||
+ [ -r /root/.ssh/authorized_keys ] && inst /root/.ssh/authorized_keys /root/.ssh/key.pub
|
|
||||||
+}
|
|
34
sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch
Normal file
34
sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Sun, 8 Mar 2020 05:47:50 +0300
|
||||||
|
Subject: [PATCH] Makefile: fix VERSION again
|
||||||
|
|
||||||
|
The variable is not undefined anymore after the first assignment, so
|
||||||
|
we should check if variable is empty instead.
|
||||||
|
---
|
||||||
|
Makefile | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index c69e2dfc..02e2c4b5 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -1,9 +1,13 @@
|
||||||
|
-include dracut-version.sh
|
||||||
|
|
||||||
|
DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||||
|
-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
|
||||||
|
+ifeq ($(DRACUT_MAIN_VERSION),)
|
||||||
|
+DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
|
||||||
|
+endif
|
||||||
|
DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
|
||||||
|
-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
|
||||||
|
+ifeq ($(DRACUT_FULL_VERSION),)
|
||||||
|
+DRACUT_FULL_VERSION = $(DRACUT_VERSION)
|
||||||
|
+endif
|
||||||
|
|
||||||
|
-include Makefile.inc
|
||||||
|
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
From eb8a7a96351b6e1cfd9dc34f1e854333a8f4a4e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
||||||
|
<congdanhqx@gmail.com>
|
||||||
|
Date: Fri, 6 Mar 2020 08:46:36 +0700
|
||||||
|
Subject: [PATCH] Makefile: merge main-version and git-version earlier
|
||||||
|
|
||||||
|
With GNU Make 4.3 on both ArchLinux, and VoidLinux,
|
||||||
|
GITVERION is always empty because of bad substitution.
|
||||||
|
Change '\#' to simply '#' can fix it,
|
||||||
|
but we don't need that complation.
|
||||||
|
|
||||||
|
We can merge DRACUT_MAIN_VERSION and GITVERSION into DRACUT_FULL_VERSION.
|
||||||
|
Because, GITVERSION will be attached back to DRACUT_MAIN_VERSION in all
|
||||||
|
situation.
|
||||||
|
|
||||||
|
While we're at it, detect if we're in git worktree by:
|
||||||
|
limiting GIT_CEILING_DIRECTORIES to parent directory of
|
||||||
|
dracut's top level directory; instead of checking for .git directory,
|
||||||
|
in order to support git-worktree, in such case, .git will be a file, see
|
||||||
|
gitrepository-layout(5)
|
||||||
|
---
|
||||||
|
Makefile | 13 +++++++------
|
||||||
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 22b584f1..c69e2dfc 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -1,8 +1,9 @@
|
||||||
|
-include dracut-version.sh
|
||||||
|
|
||||||
|
-DRACUT_MAIN_VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||||
|
+DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||||
|
DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
|
||||||
|
-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||||
|
+DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
|
||||||
|
+DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
|
||||||
|
|
||||||
|
-include Makefile.inc
|
||||||
|
|
||||||
|
@@ -92,14 +93,14 @@ endif
|
||||||
|
|
||||||
|
%.xml: %.asc
|
||||||
|
@rm -f -- "$@"
|
||||||
|
- asciidoc -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" -d manpage -b docbook -o "$@" $<
|
||||||
|
+ asciidoc -a "version=$(DRACUT_FULL_VERSION)" -d manpage -b docbook -o "$@" $<
|
||||||
|
|
||||||
|
dracut.8: dracut.usage.asc dracut.8.asc
|
||||||
|
|
||||||
|
dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||||
|
@rm -f -- dracut.xml
|
||||||
|
asciidoc -a "mainversion=$(DRACUT_MAIN_VERSION)" \
|
||||||
|
- -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" \
|
||||||
|
+ -a "version=$(DRACUT_FULL_VERSION)" \
|
||||||
|
-a numbered \
|
||||||
|
-d book -b docbook -o dracut.xml dracut.asc
|
||||||
|
@rm -f -- dracut.html
|
||||||
|
@@ -112,7 +113,7 @@ dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||||
|
dracut.pc: Makefile.inc Makefile
|
||||||
|
@echo "Name: dracut" > dracut.pc
|
||||||
|
@echo "Description: dracut" >> dracut.pc
|
||||||
|
- @echo "Version: $(DRACUT_MAIN_VERSION)$(GITVERSION)" >> dracut.pc
|
||||||
|
+ @echo "Version: $(DRACUT_FULL_VERSION)" >> dracut.pc
|
||||||
|
@echo "dracutdir=$(pkglibdir)" >> dracut.pc
|
||||||
|
@echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc
|
||||||
|
@echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc
|
||||||
|
@@ -182,7 +183,7 @@ endif
|
||||||
|
|
||||||
|
dracut-version.sh:
|
||||||
|
@rm -f dracut-version.sh
|
||||||
|
- @echo "DRACUT_VERSION=$(DRACUT_MAIN_VERSION)$(GITVERSION)" > dracut-version.sh
|
||||||
|
+ @echo "DRACUT_VERSION=$(DRACUT_FULL_VERSION)" > dracut-version.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) *~
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 0402b3777b1c64bd716f588ff7457b905e98489d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 11 Mar 2020 12:56:52 +0100
|
||||||
|
Subject: [PATCH] btrfs: force preload btrfs module
|
||||||
|
|
||||||
|
fixes https://github.com/dracutdevs/dracut/issues/658
|
||||||
|
|
||||||
|
raid6_pq and xor takes time doing benchmarking
|
||||||
|
|
||||||
|
[ 3.983009] request_module fs-btrfs succeeded, but still no fs?
|
||||||
|
---
|
||||||
|
modules.d/90btrfs/module-setup.sh | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
|
||||||
|
index b0d0058b..66a254e1 100755
|
||||||
|
--- a/modules.d/90btrfs/module-setup.sh
|
||||||
|
+++ b/modules.d/90btrfs/module-setup.sh
|
||||||
|
@@ -48,5 +48,7 @@ install() {
|
||||||
|
|
||||||
|
inst_multiple -o btrfsck btrfs-zero-log
|
||||||
|
inst $(command -v btrfs) /sbin/btrfs
|
||||||
|
+ # Hack for slow machines
|
||||||
|
+ # see https://github.com/dracutdevs/dracut/issues/658
|
||||||
|
+ echo "rd.driver.pre=btrfs" > ${initdir}/etc/cmdline.d/00-btrfs.conf
|
||||||
|
}
|
||||||
|
-
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
102
sys-kernel/dracut/files/050-busybox-module-fix.patch
Normal file
102
sys-kernel/dracut/files/050-busybox-module-fix.patch
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
From f769154bccf22d2b5caf5e4888f88bf7edde2662 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Mon, 25 May 2020 19:02:05 +0300
|
||||||
|
Subject: [PATCH 1/2] dracut-functions: fix find_binary() to return full path
|
||||||
|
|
||||||
|
Fixes: a01204202b30 (Allow running on a cross-compiled rootfs)
|
||||||
|
---
|
||||||
|
dracut-functions.sh | 21 +++++++++++++--------
|
||||||
|
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||||
|
index 3cb9c7af..b5c28248 100755
|
||||||
|
--- a/dracut-functions.sh
|
||||||
|
+++ b/dracut-functions.sh
|
||||||
|
@@ -41,31 +41,36 @@ str_ends() { [ "${1%*"$2"}" != "$1" ]; }
|
||||||
|
# search in the usual places to find the binary.
|
||||||
|
find_binary() {
|
||||||
|
local _delim
|
||||||
|
+ local _path
|
||||||
|
local l
|
||||||
|
local p
|
||||||
|
[[ -z ${1##/*} ]] || _delim="/"
|
||||||
|
|
||||||
|
if [[ "$1" == *.so* ]]; then
|
||||||
|
for l in libdirs ; do
|
||||||
|
- if { $DRACUT_LDD "$dracutsysrootdir$l$_delim$1" &>/dev/null; }; then
|
||||||
|
- printf "%s\n" "$1"
|
||||||
|
+ _path="${l}${_delim}${1}"
|
||||||
|
+ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then
|
||||||
|
+ printf "%s\n" "${_path}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
- if { $DRACUT_LDD "$dracutsysrootdir$_delim$1" &>/dev/null; }; then
|
||||||
|
- printf "%s\n" "$1"
|
||||||
|
+ _path="${_delim}${1}"
|
||||||
|
+ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then
|
||||||
|
+ printf "%s\n" "${_path}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$1" == */* ]]; then
|
||||||
|
- if [[ -L $dracutsysrootdir$_delim$1 ]] || [[ -x $dracutsysrootdir$_delim$1 ]]; then
|
||||||
|
- printf "%s\n" "$1"
|
||||||
|
+ _path="${_delim}${1}"
|
||||||
|
+ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then
|
||||||
|
+ printf "%s\n" "${_path}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
for p in $DRACUT_PATH ; do
|
||||||
|
- if [[ -L $dracutsysrootdir$p$_delim$1 ]] || [[ -x $dracutsysrootdir$p$_delim$1 ]]; then
|
||||||
|
- printf "%s\n" "$1"
|
||||||
|
+ _path="${p}${_delim}${1}"
|
||||||
|
+ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then
|
||||||
|
+ printf "%s\n" "${_path}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 50cc23ba32b0fda63eff7623b529dbeb4e6a38c6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Mon, 25 May 2020 17:49:20 +0300
|
||||||
|
Subject: [PATCH 2/2] busybox: simplify listing of supported utilities
|
||||||
|
|
||||||
|
'--list' option is supported since busybox-1.20.0, which was released
|
||||||
|
in 2010.
|
||||||
|
---
|
||||||
|
modules.d/05busybox/module-setup.sh | 11 ++++++-----
|
||||||
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh
|
||||||
|
index ecbd6a13..5d88c5d1 100755
|
||||||
|
--- a/modules.d/05busybox/module-setup.sh
|
||||||
|
+++ b/modules.d/05busybox/module-setup.sh
|
||||||
|
@@ -14,15 +14,16 @@ depends() {
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
- local _i _progs _path _busybox
|
||||||
|
+ local _i _path _busybox
|
||||||
|
+ local _progs=()
|
||||||
|
_busybox=$(type -P busybox)
|
||||||
|
inst $_busybox /usr/bin/busybox
|
||||||
|
- for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
|
||||||
|
- do
|
||||||
|
- _progs="$_progs $_i"
|
||||||
|
+ for _i in $($_busybox --list); do
|
||||||
|
+ [[ ${_i} == busybox ]] && continue
|
||||||
|
+ _progs+=("${_i}")
|
||||||
|
done
|
||||||
|
|
||||||
|
- for _i in $_progs; do
|
||||||
|
+ for _i in "${_progs[@]}"; do
|
||||||
|
_path=$(find_binary "$_i")
|
||||||
|
[ -z "$_path" ] && continue
|
||||||
|
ln_r /usr/bin/busybox $_path
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,111 @@
|
|||||||
|
From 8e1a4dc5f8a777fc718db490414ffdc9dc755f66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jonas Witschel <diabonas@archlinux.org>
|
||||||
|
Date: Sat, 18 Apr 2020 14:55:41 +0200
|
||||||
|
Subject: [PATCH] dracut-lib.sh: quote variables in parameter expansion
|
||||||
|
patterns
|
||||||
|
|
||||||
|
According to POSIX.1-2017, 2.6.2 Parameter Expansion:
|
||||||
|
|
||||||
|
${parameter%[word]} [...] The word shall be expanded to produce a
|
||||||
|
pattern.
|
||||||
|
|
||||||
|
This means if word contains variables that itself contain special
|
||||||
|
characters like asterisks or backslashes, these are treated as pattern
|
||||||
|
characters unless the variable is quoted. Try e.g. the following example
|
||||||
|
in bash, dash or (busybox) ash:
|
||||||
|
|
||||||
|
i='a\c'; j='\'; echo "${i%$j*}"
|
||||||
|
|
||||||
|
This prints "a\c" because "$j*" is expanded to "\*", escaping the
|
||||||
|
asterisk. In contrast,
|
||||||
|
|
||||||
|
i='a\c'; j='\'; echo "${i%"$j"*}"
|
||||||
|
|
||||||
|
produces the expected result "a" because the backslash is not specially
|
||||||
|
treated any more after quoting.
|
||||||
|
|
||||||
|
The quotes that this commit adds have been previously removed in commit
|
||||||
|
f9c96cf56fed390841eac05c43826e62014c9188, citing issues with busybox
|
||||||
|
hush without further specifying the actual error. I tested a recent
|
||||||
|
busybox build (upstream commit 9aa751b08ab03d6396f86c3df77937a19687981b)
|
||||||
|
and couldn't find any problems. Note that the above example always
|
||||||
|
produces "a\c" in hush regardless of quoting $j, making hush unsuitable
|
||||||
|
for use with dracut, but using quotes in parameter expansions generally
|
||||||
|
works.
|
||||||
|
|
||||||
|
The unquoted variables break the "rd.luks.uuid/name" kernel command line
|
||||||
|
options in dracut 050 because
|
||||||
|
|
||||||
|
str_replace "$luksname" '\' '\\'
|
||||||
|
|
||||||
|
in modules.d/90crypt/parse-crypt.sh is not able to escape the
|
||||||
|
backslashes any more, see GH-723, GH-727: backslashes in the
|
||||||
|
systemd-cryptsetup@.service unit name stay unescaped for use in udev
|
||||||
|
(cf. commit 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3), leading to
|
||||||
|
failures in starting the unit.
|
||||||
|
|
||||||
|
This partially reverts commit f9c96cf56fed390841eac05c43826e62014c9188.
|
||||||
|
---
|
||||||
|
modules.d/99base/dracut-lib.sh | 16 ++++++++--------
|
||||||
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||||
|
index c53cd13b..c57523d3 100755
|
||||||
|
--- a/modules.d/99base/dracut-lib.sh
|
||||||
|
+++ b/modules.d/99base/dracut-lib.sh
|
||||||
|
@@ -24,7 +24,7 @@ debug_on() {
|
||||||
|
|
||||||
|
# returns OK if $1 contains literal string $2 (and isn't empty)
|
||||||
|
strstr() {
|
||||||
|
- [ "${1##*$2*}" != "$1" ]
|
||||||
|
+ [ "${1##*"$2"*}" != "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# returns OK if $1 matches (completely) glob pattern $2
|
||||||
|
@@ -43,18 +43,18 @@ strglobin() {
|
||||||
|
|
||||||
|
# returns OK if $1 contains literal string $2 at the beginning, and isn't empty
|
||||||
|
str_starts() {
|
||||||
|
- [ "${1#$2*}" != "$1" ]
|
||||||
|
+ [ "${1#"$2"*}" != "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# returns OK if $1 contains literal string $2 at the end, and isn't empty
|
||||||
|
str_ends() {
|
||||||
|
- [ "${1%*$2}" != "$1" ]
|
||||||
|
+ [ "${1%*"$2"}" != "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
trim() {
|
||||||
|
local var="$*"
|
||||||
|
- var="${var#${var%%[![:space:]]*}}" # remove leading whitespace characters
|
||||||
|
- var="${var%${var##*[![:space:]]}}" # remove trailing whitespace characters
|
||||||
|
+ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||||
|
+ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
||||||
|
printf "%s" "$var"
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -108,9 +108,9 @@ str_replace() {
|
||||||
|
local out=''
|
||||||
|
|
||||||
|
while strstr "${in}" "$s"; do
|
||||||
|
- chop="${in%%$s*}"
|
||||||
|
+ chop="${in%%"$s"*}"
|
||||||
|
out="${out}${chop}$r"
|
||||||
|
- in="${in#*$s}"
|
||||||
|
+ in="${in#*"$s"}"
|
||||||
|
done
|
||||||
|
echo "${out}${in}"
|
||||||
|
}
|
||||||
|
@@ -396,7 +396,7 @@ splitsep() {
|
||||||
|
while [ -n "$str" -a "$#" -gt 1 ]; do
|
||||||
|
tmp="${str%%$sep*}"
|
||||||
|
eval "$1='${tmp}'"
|
||||||
|
- str="${str#$tmp}"
|
||||||
|
+ str="${str#"$tmp"}"
|
||||||
|
str="${str#$sep}"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,75 @@
|
|||||||
|
From 0386e4627779cb51f4292b3c642d90586d5e71b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Wilck <mwilck@suse.com>
|
||||||
|
Date: Wed, 29 Jan 2020 23:53:29 +0100
|
||||||
|
Subject: [PATCH] dracut.sh: don't call fsfreeze on subvol of root file system
|
||||||
|
|
||||||
|
dracut.sh already doesn't call fsfreeze if the output file is on
|
||||||
|
the root file system. For btrfs, however, this is not sufficient.
|
||||||
|
Because fsfreeze is a superblock operation, and all btrfs subvolumes
|
||||||
|
share the same superblock, fsfreeze may freeze the entire system
|
||||||
|
if the subvolume on which the output file is written and / are
|
||||||
|
subvolumes of the same file system. Avoid this by comparing file
|
||||||
|
system UUIDs for btrfs.
|
||||||
|
|
||||||
|
Fixes: de576db3c225 ("call fsfreeze(8) on /boot to flush initramfs data & metadata to media")
|
||||||
|
---
|
||||||
|
dracut.sh | 36 +++++++++++++++++++++++++++++++++++-
|
||||||
|
1 file changed, 35 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index af346f3a..c14f6c0b 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -2075,6 +2075,40 @@ fi
|
||||||
|
|
||||||
|
command -v restorecon &>/dev/null && restorecon -- "$outfile"
|
||||||
|
|
||||||
|
+btrfs_uuid() {
|
||||||
|
+ btrfs filesystem show "$1" | sed -n '1s/^.*uuid: //p'
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+freeze_ok_for_btrfs() {
|
||||||
|
+ local mnt uuid1 uuid2
|
||||||
|
+ # If the output file is on btrfs, we need to make sure that it's
|
||||||
|
+ # not on a subvolume of the same file system as the root FS.
|
||||||
|
+ # Otherwise, fsfreeze() might freeze the entire system.
|
||||||
|
+ # This is most conveniently checked by comparing the FS uuid.
|
||||||
|
+
|
||||||
|
+ [[ "$(stat -f -c %T -- "/")" == "btrfs" ]] || return 0
|
||||||
|
+ mnt=$(stat -c %m -- "$1")
|
||||||
|
+ uuid1=$(btrfs_uuid "$mnt")
|
||||||
|
+ uuid2=$(btrfs_uuid "/")
|
||||||
|
+ [[ "$uuid1" && "$uuid2" && "$uuid1" != "$uuid2" ]]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+freeze_ok_for_fstype() {
|
||||||
|
+ local outfile=$1
|
||||||
|
+ local fstype
|
||||||
|
+
|
||||||
|
+ [[ "$(stat -c %m -- "$outfile")" == "/" ]] && return 1
|
||||||
|
+ fstype=$(stat -f -c %T -- "$outfile")
|
||||||
|
+ case $fstype in
|
||||||
|
+ msdos)
|
||||||
|
+ return 1;;
|
||||||
|
+ btrfs)
|
||||||
|
+ freeze_ok_for_btrfs "$outfile";;
|
||||||
|
+ *)
|
||||||
|
+ return 0;;
|
||||||
|
+ esac
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# We sync/fsfreeze only if we're operating on a live booted system.
|
||||||
|
# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
|
||||||
|
# and there's no reason to sync, and *definitely* no reason to fsfreeze.
|
||||||
|
@@ -2087,7 +2121,7 @@ if test -d $dracutsysrootdir/run/systemd/system; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# use fsfreeze only if we're not writing to /
|
||||||
|
- if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
|
||||||
|
+ if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
|
||||||
|
if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
|
||||||
|
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
|
||||||
|
fi
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 07417b7fc5cb261187519c916e4735189f20f4c6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Sat, 23 May 2020 18:03:47 +0300
|
||||||
|
Subject: [PATCH] lvm: fix removal of pvscan from udev rules
|
||||||
|
|
||||||
|
udev rules provided by lvm 2.02.128 and newer uses '+=' instead of '='.
|
||||||
|
---
|
||||||
|
modules.d/90lvm/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
||||||
|
index d6d2c185..52c803f7 100755
|
||||||
|
--- a/modules.d/90lvm/module-setup.sh
|
||||||
|
+++ b/modules.d/90lvm/module-setup.sh
|
||||||
|
@@ -101,7 +101,7 @@ install() {
|
||||||
|
sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
|
||||||
|
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||||
|
sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||||
|
- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||||
|
+ sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||||
|
else
|
||||||
|
sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
|
||||||
|
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
From 3dcaa97ca4dcfa8092252a22df62c60941e59ce3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||||
|
Date: Wed, 11 Mar 2020 09:40:50 +0100
|
||||||
|
Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when
|
||||||
|
needed
|
||||||
|
|
||||||
|
The network-manager command line hook must install a
|
||||||
|
initqueue/finished hook to ensure that nm-run.sh is executed when
|
||||||
|
there are network connections to activate.
|
||||||
|
|
||||||
|
Fixes: #694
|
||||||
|
---
|
||||||
|
modules.d/35network-manager/nm-config.sh | 11 +++++++++++
|
||||||
|
modules.d/35network-manager/nm-run.sh | 2 ++
|
||||||
|
2 files changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
|
||||||
|
index 1efa737c..39a1c8bd 100755
|
||||||
|
--- a/modules.d/35network-manager/nm-config.sh
|
||||||
|
+++ b/modules.d/35network-manager/nm-config.sh
|
||||||
|
@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/libexec/nm-initrd-generator -- $(getcmdline)
|
||||||
|
+
|
||||||
|
+if getargbool 0 rd.neednet; then
|
||||||
|
+ for i in /usr/lib/NetworkManager/system-connections/* \
|
||||||
|
+ /run/NetworkManager/system-connections/* \
|
||||||
|
+ /etc/NetworkManager/system-connections/* \
|
||||||
|
+ /etc/sysconfig/network-scripts/ifcfg-*; do
|
||||||
|
+ [ -f "$i" ] || continue
|
||||||
|
+ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh
|
||||||
|
+ break
|
||||||
|
+ done
|
||||||
|
+fi
|
||||||
|
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||||
|
index 4079b735..fc5280a1 100755
|
||||||
|
--- a/modules.d/35network-manager/nm-run.sh
|
||||||
|
+++ b/modules.d/35network-manager/nm-run.sh
|
||||||
|
@@ -22,3 +22,5 @@ do
|
||||||
|
source_hook initqueue/online $ifname
|
||||||
|
/sbin/netroot $ifname
|
||||||
|
done
|
||||||
|
+
|
||||||
|
+> /tmp/nm.done
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,241 @@
|
|||||||
|
From 265f696b532f63f0ac1f9f341e0469a6eafe2fdd Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:26:00 +0000
|
||||||
|
Subject: [PATCH 01/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/90stratis/stratisd-init.service | 2 --
|
||||||
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90stratis/stratisd-init.service b/modules.d/90stratis/stratisd-init.service
|
||||||
|
index 318e8c27..1be2e33b 100644
|
||||||
|
--- a/modules.d/90stratis/stratisd-init.service
|
||||||
|
+++ b/modules.d/90stratis/stratisd-init.service
|
||||||
|
@@ -8,8 +8,6 @@ DefaultDependencies=no
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/sbin/stratisd-init --debug
|
||||||
|
KillSignal=SIGINT
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sysinit.target
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 38ba90bf88b38228e128c65be40a2da287c0b1ed Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:29:34 +0000
|
||||||
|
Subject: [PATCH 02/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/99squash/squash-mnt-clear.service | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
||||||
|
index 84441f60..9d94c524 100644
|
||||||
|
--- a/modules.d/99squash/squash-mnt-clear.service
|
||||||
|
+++ b/modules.d/99squash/squash-mnt-clear.service
|
||||||
|
@@ -12,6 +12,6 @@ ConditionPathExists=/squash/root
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=no
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog+console
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardOutput=journal+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
ExecStart=/squash/clear-squash.sh
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 5cb2a4004d18e4b96ddc18f221fae922350a9000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:31:17 +0000
|
||||||
|
Subject: [PATCH 03/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-trigger.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.service b/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||||
|
index 7bf16167..6f1ba521 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||||
|
@@ -20,8 +20,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-pre-trigger
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 317d841c788e841d3533515ceda5597a099eb64e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:31:59 +0000
|
||||||
|
Subject: [PATCH 04/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-initqueue.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-initqueue.service b/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||||
|
index 207d545d..3a8679a5 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||||
|
@@ -21,8 +21,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-initqueue
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 0c1bd016ecfb9c6d194c4356199b509d90db4071 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:32:44 +0000
|
||||||
|
Subject: [PATCH 05/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-pivot.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.service b/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||||
|
index 9a1f0854..e893d1dd 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||||
|
@@ -27,8 +27,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-pre-pivot
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From e1130a83405648777210fdc99f7eee087eebaadc Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:33:33 +0000
|
||||||
|
Subject: [PATCH 06/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-udev.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.service b/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||||
|
index 570ec02d..e4092e35 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||||
|
@@ -24,8 +24,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-pre-udev
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From c437933cb0490e800e776cb7695d2ea0e95056a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:34:17 +0000
|
||||||
|
Subject: [PATCH 07/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-mount.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.service b/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||||
|
index d3909689..18c9730c 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||||
|
@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-pre-mount
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From d9149c6ca7c52c204c1b346e9b6a32bbadd0b2ff Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:35:02 +0000
|
||||||
|
Subject: [PATCH 08/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-cmdline.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.service b/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||||
|
index e577ec88..a8078bd2 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||||
|
@@ -23,8 +23,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-cmdline
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
From 8cb5ac1b30be458df9497911ba601d90e68f4d5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||||
|
Date: Wed, 15 Jul 2020 14:35:38 +0000
|
||||||
|
Subject: [PATCH 09/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||||
|
switches have been deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-mount.service | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service
|
||||||
|
index 77d34f62..c88e6d84 100644
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-mount.service
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-mount.service
|
||||||
|
@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=-/bin/dracut-mount
|
||||||
|
StandardInput=null
|
||||||
|
-StandardOutput=syslog
|
||||||
|
-StandardError=syslog+console
|
||||||
|
+StandardError=journal+console
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
60
sys-kernel/dracut/files/051-dracut.sh-move-ldconfig.patch
Normal file
60
sys-kernel/dracut/files/051-dracut.sh-move-ldconfig.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
From 48258fae9fa58046d7d1a246ea3d821530180643 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Fri, 18 Dec 2020 00:01:32 +0300
|
||||||
|
Subject: [PATCH] dracut.sh: Move ldconfig after library workaround
|
||||||
|
|
||||||
|
This fixes boot failures when libgcc_s.so.1 is in a non-standard
|
||||||
|
directory.
|
||||||
|
|
||||||
|
Bug: https://bugs.gentoo.org/760249
|
||||||
|
Fixes: de3cb0e3214c (dracut.sh: Move the library workaround after squash)
|
||||||
|
---
|
||||||
|
dracut.sh | 28 ++++++++++++++--------------
|
||||||
|
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index 0f4648397..c6c361acc 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1724,20 +1724,6 @@ for ((i=0; i < ${#include_src[@]}; i++)); do
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
-if [[ $kernel_only != yes ]]; then
|
||||||
|
- # make sure that library links are correct and up to date
|
||||||
|
- for f in $dracutsysrootdir/etc/ld.so.conf $dracutsysrootdir/etc/ld.so.conf.d/*; do
|
||||||
|
- [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}"
|
||||||
|
- done
|
||||||
|
- if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then
|
||||||
|
- if [[ $EUID = 0 ]]; then
|
||||||
|
- derror "ldconfig exited ungracefully"
|
||||||
|
- else
|
||||||
|
- derror "ldconfig might need uid=0 (root) for chroot()"
|
||||||
|
- fi
|
||||||
|
- fi
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
if [[ $do_hardlink = yes ]] && command -v hardlink >/dev/null; then
|
||||||
|
dinfo "*** Hardlinking files ***"
|
||||||
|
hardlink "$initdir" 2>&1
|
||||||
|
@@ -1920,6 +1906,20 @@ if [[ $kernel_only != yes ]]; then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if [[ $kernel_only != yes ]]; then
|
||||||
|
+ # make sure that library links are correct and up to date
|
||||||
|
+ for f in $dracutsysrootdir/etc/ld.so.conf $dracutsysrootdir/etc/ld.so.conf.d/*; do
|
||||||
|
+ [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}"
|
||||||
|
+ done
|
||||||
|
+ if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then
|
||||||
|
+ if [[ $EUID = 0 ]]; then
|
||||||
|
+ derror "ldconfig exited ungracefully"
|
||||||
|
+ else
|
||||||
|
+ derror "ldconfig might need uid=0 (root) for chroot()"
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
||||||
|
dinfo "*** Stripping files ***"
|
||||||
|
find "$initdir" -type f \
|
132
sys-kernel/dracut/files/crypt-ssh-luks.patch
Normal file
132
sys-kernel/dracut/files/crypt-ssh-luks.patch
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
commit 2e091e01691ac86f014d52504f13c6e1cc0990c3
|
||||||
|
Author: Stefan Reimer <it@startux.de>
|
||||||
|
Date: Fri Feb 19 13:50:45 2021 +0100
|
||||||
|
|
||||||
|
crypt-ssh module: This modules allows for unlocking LUKS encrypted root filesystems remotely over SSH.
|
||||||
|
By setting rd.luks.ssh and having a /root/.ssh/authorized_keys file dracut will wait
|
||||||
|
until an authorized users logs in and enters a passphrase to open the LUKS device.
|
||||||
|
|
||||||
|
diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
index 1ea77ccc..e73743ef 100755
|
||||||
|
--- a/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
+++ b/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
@@ -173,15 +173,26 @@ fi
|
||||||
|
|
||||||
|
if [ $ask_passphrase -ne 0 ]; then
|
||||||
|
luks_open="$(command -v cryptsetup) $cryptsetupopts luksOpen"
|
||||||
|
- _timeout=$(getargs "rd.luks.timeout")
|
||||||
|
- _timeout=${_timeout:-0}
|
||||||
|
- ask_for_password --ply-tries 5 \
|
||||||
|
- --ply-cmd "$luks_open -T1 $device $luksname" \
|
||||||
|
- --ply-prompt "Password ($device)" \
|
||||||
|
- --tty-tries 1 \
|
||||||
|
- --tty-cmd "$luks_open -T5 -t $_timeout $device $luksname"
|
||||||
|
+
|
||||||
|
+ if getargbool 0 rd.luks.ssh; then
|
||||||
|
+ # Setup authorized_key file, inject forced cmd for each entry
|
||||||
|
+ while read key; do
|
||||||
|
+ echo "command=\"$luks_open -T5 $device $luksname && rm -f /tmp/crypt-ssh-block\" $key" >> /root/.ssh/authorized_keys
|
||||||
|
+ done < /root/.ssh/key.pub
|
||||||
|
+ rm -f /root/.ssh/key.pub
|
||||||
|
+ # Create flock to prevent initqueue from timing out waiting for someone to login
|
||||||
|
+ echo "initqueue blocked by ssh server" > /tmp/crypt-ssh-block
|
||||||
|
+ else
|
||||||
|
+ _timeout=$(getargs "rd.luks.timeout")
|
||||||
|
+ _timeout=${_timeout:-0}
|
||||||
|
+ ask_for_password --ply-tries 5 \
|
||||||
|
+ --ply-cmd "$luks_open -T1 $device $luksname" \
|
||||||
|
+ --ply-prompt "Password ($device)" \
|
||||||
|
+ --tty-tries 1 \
|
||||||
|
+ --tty-cmd "$luks_open -T5 -t $_timeout $device $luksname"
|
||||||
|
+ unset _timeout
|
||||||
|
+ fi
|
||||||
|
unset luks_open
|
||||||
|
- unset _timeout
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$is_keysource" -ne 0 -a ${luksname##luks-} != "$luksname" ]; then
|
||||||
|
diff --git a/modules.d/92crypt-ssh/crypt-ssh-cleanup.sh b/modules.d/92crypt-ssh/crypt-ssh-cleanup.sh
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..03b05d84
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/92crypt-ssh/crypt-ssh-cleanup.sh
|
||||||
|
@@ -0,0 +1,7 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+
|
||||||
|
+# Stops previously started dropbear
|
||||||
|
+
|
||||||
|
+if [ -f /var/run/dropbear.pid ]; then
|
||||||
|
+ kill $(cat /var/run/dropbear.pid)
|
||||||
|
+fi
|
||||||
|
diff --git a/modules.d/92crypt-ssh/module-setup.sh b/modules.d/92crypt-ssh/module-setup.sh
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..4fd2aadf
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/92crypt-ssh/module-setup.sh
|
||||||
|
@@ -0,0 +1,33 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+check() {
|
||||||
|
+ require_binaries dropbear || return 1
|
||||||
|
+
|
||||||
|
+ # We need a SSH pub key, as passwords are not an option
|
||||||
|
+ # due to the initrd being unencrypted on disk
|
||||||
|
+ [ -r /root/.ssh/authorized_keys ] || {
|
||||||
|
+ echo "No /root/.ssh/authorized_keys found, needed to authenticate at boot!";
|
||||||
|
+ exit 1;
|
||||||
|
+ }
|
||||||
|
+ return 255
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+depends() {
|
||||||
|
+ echo "network crypt"
|
||||||
|
+ return 0
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+install() {
|
||||||
|
+ #Install dropbear
|
||||||
|
+ mkdir -p /etc/dropbear
|
||||||
|
+
|
||||||
|
+ # Create host keys of needed
|
||||||
|
+ [ -r /etc/dropbear/dropbear_dss_host_key ] || /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null
|
||||||
|
+ [ -r /etc/dropbear/dropbear_rsa_host_key ] || /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null
|
||||||
|
+
|
||||||
|
+ inst_multiple dropbear /etc/dropbear/dropbear_dss_host_key /etc/dropbear/dropbear_rsa_host_key
|
||||||
|
+ inst /root/.ssh/authorized_keys /root/.ssh/key.pub
|
||||||
|
+
|
||||||
|
+ inst_hook initqueue/online 60 "$moddir/start-ssh.sh"
|
||||||
|
+ inst_hook cleanup 99 "$moddir/crypt-ssh-cleanup.sh"
|
||||||
|
+}
|
||||||
|
diff --git a/modules.d/92crypt-ssh/start-ssh.sh b/modules.d/92crypt-ssh/start-ssh.sh
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..ac1c5ec3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/92crypt-ssh/start-ssh.sh
|
||||||
|
@@ -0,0 +1,27 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+
|
||||||
|
+# Start dropbear server once online
|
||||||
|
+
|
||||||
|
+type get_ip >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
+
|
||||||
|
+port=$(getargnum 22 1 65535 rd.luks.ssh.port)
|
||||||
|
+listen_ip=$(get_ip $1)
|
||||||
|
+pid_file="/var/run/dropbear_$listen_ip_$port.pid"
|
||||||
|
+
|
||||||
|
+[ "x$listen_ip" != "x" ] && listen_ip="$listen_ip:"
|
||||||
|
+
|
||||||
|
+if [ -x "/usr/sbin/dropbear" ]; then
|
||||||
|
+ if [ -r /root/.ssh/authorized_keys ]; then
|
||||||
|
+ touch /var/log/lastlog
|
||||||
|
+ /usr/sbin/dropbear -p $listen_ip$port -m -j -k -s -P $pid_file
|
||||||
|
+ # flock will be removed upon successful luksopen via forced_command
|
||||||
|
+ while [ -e /tmp/crypt-ssh-block ]; do
|
||||||
|
+ sleep 1
|
||||||
|
+ done
|
||||||
|
+ kill $(cat $pid_file)
|
||||||
|
+ else
|
||||||
|
+ warn "No authorized_keys files, not starting SSH server!"
|
||||||
|
+ fi
|
||||||
|
+else
|
||||||
|
+ warn "initqueue/online/start-ssh: Could not find dropbear binary!"
|
||||||
|
+fi
|
39
sys-kernel/dracut/files/gentoo-ldconfig-paths.patch
Normal file
39
sys-kernel/dracut/files/gentoo-ldconfig-paths.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 0674b9136831b1beb6a7ec91147fd5c280c693a3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Mon, 9 Mar 2020 02:47:07 +0300
|
||||||
|
Subject: [PATCH] Remove redundant gcc paths in ldconfig_paths()
|
||||||
|
|
||||||
|
Bug: https://bugs.gentoo.org/705728
|
||||||
|
---
|
||||||
|
dracut-functions.sh | 15 ++++++++++++++-
|
||||||
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||||
|
index 3cb9c7af..5337ff6c 100755
|
||||||
|
--- a/dracut-functions.sh
|
||||||
|
+++ b/dracut-functions.sh
|
||||||
|
@@ -76,7 +76,20 @@ find_binary() {
|
||||||
|
|
||||||
|
ldconfig_paths()
|
||||||
|
{
|
||||||
|
- $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
|
||||||
|
+ local gccpath
|
||||||
|
+
|
||||||
|
+ if type -P gcc-config &>/dev/null; then
|
||||||
|
+ gccpath=$(gcc-config -c)
|
||||||
|
+ gccpath=/usr/lib/gcc/${gccpath%-*}/${gccpath##*-}
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ while read -r line; do
|
||||||
|
+ if [[ ${line} != /usr/lib/gcc/* || -z ${gccpath} ]]; then
|
||||||
|
+ echo ${line}
|
||||||
|
+ elif [[ ${line} == ${gccpath} ]]; then
|
||||||
|
+ echo ${line}
|
||||||
|
+ fi
|
||||||
|
+ done < <($DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Version comparision function. Assumes Linux style version scheme.
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user