-
Notifications
You must be signed in to change notification settings - Fork 68
Signed built-in sysexts #3162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Signed built-in sysexts #3162
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
USE="cros_host expat man -pam" | ||
USE="${USE} cryptsetup" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could have consequences. What needs this, and could it be done against that specific package? |
||
|
||
# Used by some old goo in profiles/coreos/base/profile.bashrc | ||
# TODO: clean up that old goo | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Temporarily put the SDK version ahead for sd-json support in Dracut. | ||
=sys-apps/systemd-257.5 ~amd64 ~arm64 | ||
|
||
=sys-fs/erofs-utils-1.8.4 ~amd64 ~arm64 |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -64,6 +64,7 @@ src_prepare() { | |||
validate_sig_key | ||||
|
||||
config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"' | ||||
config_update "CONFIG_SYSTEM_TRUSTED_KEYS=\"/usr/share/sb_keys/shim.pem\"" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you meant to include this, and this certificate should not be used in production builds.
Suggested change
|
||||
|
||||
# include all intel and amd microcode files, avoiding the signatures | ||||
local fw_dir="${ESYSROOT}/lib/firmware" | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,7 @@ CONFIG_DM_SNAPSHOT=m | |
CONFIG_DM_THIN_PROVISIONING=m | ||
CONFIG_DM_UEVENT=y | ||
CONFIG_DM_VERITY=m | ||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The certificate you're signing with is written to /usr/lib/verity.d, so you don't need this. The verification is done in userspace. However, I have doubts about this security model. You're verifying sysexts in USR with a certificate in USR. Does that add anything, especially when USR's own integrity is already enforced by verity? Having the certificate in the kernel keyring may be a stronger model, but I'm not the best person to ask. @jepio, your input here would be appreciated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we use this for the extensions that are downloaded on demand, it makes sense. For the ones itself stored in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were going to have bakery sysexts use certificates in /etc/verity.d because we felt more flexibility was needed here. What if we need to rotate the certificate? Newer sysexts are supposed to work on older Flatcar releases. |
||
CONFIG_DM_ZERO=m | ||
CONFIG_DNS_RESOLVER=y | ||
CONFIG_DRM=m | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DIST xxhash-0.8.2.tar.gz 1141188 BLAKE2B 735408256240760778fa516e01bed428f04837eb4e059c512e924f13e4a96db6cacbbefb04dea65a37b0f25b52cf13c4927a6e7870dc8c0d45b1b955d4ba3da1 SHA512 3e3eef21432fe88bc4dd9940ccad0308fdea3537b06fa5ac0e74c1bde53413dff29c8b3fc617a8a42b9ce88fcf213311d338a31b1ce73b3729342c9e68f06c78 | ||
DIST xxhash-0.8.3.tar.gz 1147630 BLAKE2B 75923c7c5df3490062791fa02ccddfb7281b3646e2b3e4b4a0c0d611c339e07c8d9cb656777fd0fcec9cda484f7b33edf080116bb011f70d6b8299cda63afa4e SHA512 8b5c8b9aad4e869f28310b12cc314037feda81d92f26c23eaecdb35dc65042ca2e65f2e9606033e62a31bcc737a9a950500ffcbdb8677d6ab20e820ea14f2b79 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Guilherme Amadio</name> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">Cyan4973/xxHash</remote-id> | ||
<bugs-to>https://github.com/Cyan4973/xxHash/issues</bugs-to> | ||
</upstream> | ||
</pkgmetadata> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit multilib-minimal toolchain-funcs | ||
|
||
DESCRIPTION="Extremely fast non-cryptographic hash algorithm" | ||
HOMEPAGE="https://xxhash.com/" | ||
SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
S=${WORKDIR}/xxHash-${PV} | ||
|
||
LICENSE="BSD-2 GPL-2+" | ||
# https://abi-laboratory.pro/tracker/timeline/xxhash | ||
SLOT="0" | ||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" | ||
|
||
src_prepare() { | ||
default | ||
|
||
multilib_copy_sources | ||
} | ||
|
||
multilib_src_compile() { | ||
emake AR="$(tc-getAR)" CC="$(tc-getCC)" | ||
} | ||
|
||
multilib_src_test() { | ||
emake CC="$(tc-getCC)" check | ||
} | ||
|
||
multilib_src_install() { | ||
local emakeargs=( | ||
DESTDIR="${D}" | ||
PREFIX="${EPREFIX}"/usr | ||
LIBDIR="${EPREFIX}"/usr/$(get_libdir) | ||
) | ||
|
||
emake "${emakeargs[@]}" install | ||
einstalldocs | ||
|
||
rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 1999-2025 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit multilib-minimal toolchain-funcs | ||
|
||
DESCRIPTION="Extremely fast non-cryptographic hash algorithm" | ||
HOMEPAGE="https://xxhash.com/" | ||
SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
S=${WORKDIR}/xxHash-${PV} | ||
|
||
LICENSE="BSD-2 GPL-2+" | ||
SLOT="0" | ||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" | ||
|
||
src_prepare() { | ||
default | ||
|
||
multilib_copy_sources | ||
} | ||
|
||
multilib_src_compile() { | ||
emake AR="$(tc-getAR)" CC="$(tc-getCC)" | ||
} | ||
|
||
multilib_src_test() { | ||
emake CC="$(tc-getCC)" check | ||
} | ||
|
||
multilib_src_install() { | ||
local emakeargs=( | ||
DESTDIR="${D}" | ||
PREFIX="${EPREFIX}"/usr | ||
LIBDIR="${EPREFIX}"/usr/$(get_libdir) | ||
) | ||
|
||
emake "${emakeargs[@]}" install | ||
einstalldocs | ||
|
||
rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST erofs-utils-1.8.4.tar.gz 187276 BLAKE2B da0d80abbfd9b2d547c30bad7647165a3500f20e5de0b5db4c54efb27ec895fd069be983193b06d35728f5a8e1490e6cd255207c76135d8978d86e1512430755 SHA512 c941b0a2ab6c650a9aa4c9cadeb277ebc87007dc51354ff013c7cb763e6e8c9d44ed9e4791730ed05088faaba8c612198b924e70f5e52019382cfdf6d2e6b677 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright 2021-2025 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit autotools | ||
|
||
DESCRIPTION="Userspace tools for EROFS" | ||
HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git" | ||
|
||
SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/xiang/${PN}.git/snapshot/${P}.tar.gz" | ||
|
||
LICENSE="GPL-2+" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm64 ~loong" | ||
|
||
IUSE="fuse libdeflate +lz4 +lzma selinux static-libs +threads +uuid +zlib +zstd" | ||
|
||
RDEPEND=" | ||
dev-libs/xxhash:0= | ||
fuse? ( sys-fs/fuse:0 ) | ||
lz4? ( app-arch/lz4:0= ) | ||
lzma? ( >=app-arch/xz-utils-5.4.0:0= ) | ||
selinux? ( sys-libs/libselinux:0= ) | ||
uuid? ( sys-apps/util-linux ) | ||
zlib? ( | ||
libdeflate? ( app-arch/libdeflate:0= ) | ||
!libdeflate? ( sys-libs/zlib:0= ) | ||
) | ||
zstd? ( app-arch/zstd:0= ) | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="virtual/pkgconfig" | ||
|
||
PATCHES=( | ||
) | ||
|
||
src_prepare() { | ||
default | ||
eautoreconf | ||
} | ||
|
||
src_configure() { | ||
local myeconfargs=( | ||
--disable-werror | ||
$(use_enable fuse) | ||
$(use_with libdeflate) | ||
$(use_enable lz4) | ||
$(use_enable lzma) | ||
$(use_with selinux) | ||
$(use_enable static-libs static-fuse) | ||
$(use_enable threads multithreading) | ||
$(use_with uuid) | ||
$(use_with zlib) | ||
$(use_with zstd libzstd) | ||
--without-qpl # not packaged | ||
# do not use bundled xxhash; also upstream says "expected to be | ||
# faster than the internal one" | ||
--with-xxhash | ||
) | ||
|
||
econf "${myeconfargs[@]}" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>WANG Xuerui</name> | ||
</maintainer> | ||
<use> | ||
<flag name="fuse">Builds erofsfuse (requires <pkg>sys-fs/fuse</pkg>).</flag> | ||
<flag name="libdeflate">Use <pkg>app-arch/libdeflate</pkg> rather than <pkg>sys-libs/zlib</pkg> for handling deflate compression.</flag> | ||
<flag name="uuid">Enables UUID support via <pkg>sys-apps/util-linux</pkg>.</flag> | ||
</use> | ||
</pkgmetadata> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.