diff --git a/sys-kernel/dracut-crypt-ssh/Manifest b/sys-kernel/dracut-crypt-ssh/Manifest new file mode 100644 index 0000000..f3bb2f4 --- /dev/null +++ b/sys-kernel/dracut-crypt-ssh/Manifest @@ -0,0 +1,5 @@ +AUX dracut-crypt-ssh-1.0.7-configure-make-sure-string-is-interpreted-as-base10-integer.patch 703 BLAKE2B 3125695e769f44e832d77b65a2ed4f990adda4b0fc3def9f4513cf6e3714245e900f5bd8be8fff062c9759d5a5df468849dfbf441a3c40ecae8e3f88d6b07245 SHA512 f4da437862eb3a01ca5a2875cb60632a33510efe314ad44a0d4ae568bfada168963e6effc8fab66c6c78b271fa50436ed2983904aeb792fd54f4a395f9dd5b5d +AUX dracut-crypt-ssh-1.0.7-correctly-link-with--as-needed.patch 913 BLAKE2B 82c441c467ca39ecb041d20ff8a2cafb23557159d8cf6d5916d897ae76d80bf0f8ad51f580007d9410f01dc5f0406ce44b25136c37f79746a9c603e256f5f58a SHA512 1483c4d6b9c95348b25a16663729fe760045117cd13842d7ab667eea57e87f19aa4ef919fa3e7073ba16206dcf455432f4f8a455e257e6262029d239d9aa6cef +DIST dracut-crypt-ssh-1.0.7.tar.gz 19561 BLAKE2B b778d03d792c5ebe0466de7474a6cc821445fe0cd3b216f395d3ea28a17cb4ed3aa6da4b7d6dee86e4481e2ac98d677e3410cd6581c4d8c01ab0ec9564504bf3 SHA512 2958a59c3ff615e89b7631224e248e7e931dd91c566e792b10dffe09b8bd2dfcf2c55eef4e974988f19320e0d732d3dfb14b61713445e1ff3a4a9868dfc4e966 +EBUILD dracut-crypt-ssh-1.0.7.ebuild 638 BLAKE2B f1e0be8cba5b8d079fd3e757a083e960131fddb37ba1e8af118f2a9283357af1000d5f56b57e310ed76afe28a5e209c919de01a1ed3b29d21de0afa3de15b16c SHA512 fe6fc795aeafdc2a043751cf7a3043f6ed42ef9def295704fb09d8b561216852476c42e8c3d76d96c70453b392740bb8f1fd67c3284c252718edbb15b1c6260b +MISC metadata.xml 675 BLAKE2B 0fc879807e833b5bb27f3cfd73968052443c446650f6c80ca993b4fa97cdaa008d6f929b465824614408fb16182ae88b14efc3dd3f460bbf426591a9c0964402 SHA512 e47736d58078e6c77592f71245882ed7541e8db6972677cb4a9ebcfc66bb9eea5d15887929af0224eadde9aadb5d47955ea86a9a278df5f1ade6d7fff220bfc3 diff --git a/sys-kernel/dracut-crypt-ssh/dracut-crypt-ssh-1.0.7.ebuild b/sys-kernel/dracut-crypt-ssh/dracut-crypt-ssh-1.0.7.ebuild new file mode 100644 index 0000000..ee624c9 --- /dev/null +++ b/sys-kernel/dracut-crypt-ssh/dracut-crypt-ssh-1.0.7.ebuild @@ -0,0 +1,25 @@ +# Copyright 2020 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="early unlocking of encrypted systems via ssh for dracut" +HOMEPAGE="https://github.com/dracut-crypt-ssh/dracut-crypt-ssh" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +PATCHES=( + "${FILESDIR}"/${P}-configure-make-sure-string-is-interpreted-as-base10-integer.patch + "${FILESDIR}"/${P}-correctly-link-with--as-needed.patch +) + +DEPEND="sys-kernel/dracut" +RDEPEND="${DEPEND} + net-misc/dhcp + net-misc/dropbear" + +DOCS=("README.md") diff --git a/sys-kernel/dracut-crypt-ssh/files/dracut-crypt-ssh-1.0.7-configure-make-sure-string-is-interpreted-as-base10-integer.patch b/sys-kernel/dracut-crypt-ssh/files/dracut-crypt-ssh-1.0.7-configure-make-sure-string-is-interpreted-as-base10-integer.patch new file mode 100644 index 0000000..ba5c1f0 --- /dev/null +++ b/sys-kernel/dracut-crypt-ssh/files/dracut-crypt-ssh-1.0.7-configure-make-sure-string-is-interpreted-as-base10-integer.patch @@ -0,0 +1,25 @@ +From cc349b6df4eb85e27c0bc5dc2621f0cb4281f0cf Mon Sep 17 00:00:00 2001 +From: Jan Delgado +Date: Sun, 27 Oct 2019 21:03:58 +0100 +Subject: [PATCH] make sure string is interpreted as base10 integer + +Current implementation leads to error when e.g. +DRACUT_VERSION == 049, since 049 will be interpreted as +an (invalid) octal value in bash. +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 1c283a1..3fc48df 100755 +--- a/configure ++++ b/configure +@@ -114,7 +114,7 @@ else + fi + + OLDDRACUT=0 +-[[ $DRACUT_VERSION -le 4 ]] && OLDDRACUT=1 ++[[ 10#$DRACUT_VERSION -le 4 ]] && OLDDRACUT=1 + + cat >config.mk < +Date: Thu, 26 Mar 2020 16:48:56 +0100 +Subject: [PATCH] Correctly link with --as-needed + +Linker needs to analzye the objects first before considering libraries. +as-needed is commonly used on distros. +--- + modules/60crypt-ssh/helper/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/60crypt-ssh/helper/Makefile b/modules/60crypt-ssh/helper/Makefile +index 7abc5f3..9aa5003 100644 +--- a/modules/60crypt-ssh/helper/Makefile ++++ b/modules/60crypt-ssh/helper/Makefile +@@ -20,7 +20,7 @@ console_auth: auth.c + $(CC) $(CFLAGS) $^ -o $@ + + unlock: crypttab.o unlock.o +- $(CC) $(CFLAGS) -lblkid $^ -o $@ ++ $(CC) $(CFLAGS) $^ -lblkid -o $@ + + crypttab-test: crypttab-test.c crypttab.o crypttab-test-data + $(CC) crypttab-test.c $(CFLAGS) crypttab.o -lblkid -o crypttab-test diff --git a/sys-kernel/dracut-crypt-ssh/metadata.xml b/sys-kernel/dracut-crypt-ssh/metadata.xml new file mode 100644 index 0000000..d012194 --- /dev/null +++ b/sys-kernel/dracut-crypt-ssh/metadata.xml @@ -0,0 +1,19 @@ + + + + + david.guglielmi@gmail.com + David GUGLIELMI + + + gentoo@asgar.de + Christian Baumhof + + + proxy-maint@gentoo.org + Proxy Maintainers + + +crypt-ssh is a dracut module which allows remote unlocking of block devices encrypted with LUKS via ssh, during the initramfs stage of the boot. + +