Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/bugfixes/2026-05-15-gce-udev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Updated the GCE udev disk rules to include NVMe disks. ([scripts#3606](https://github.com/flatcar/scripts/pull/3606))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST google-guest-configs-20260504.00.tar.gz 50769 BLAKE2B 672e6a349388501c35d575d42c30635ef7ffd988b6b3de8980fe8242e66655dc8e19858722c95eb1408ff19bc4126cea1478bbd18207b200a6a171f3b0e8461b SHA512 81e569274413d122c9ef93c2e9077f0c94625b4cce1296084eb1dce2363007ae9a775ce999d6cbf5f9160c5db9ddb52ee703dc7b4fa627b531125cb9c2795952
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From a848f8f181e2a7080a7ee06fb87ffbfe05e66a24 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Tue, 20 Jan 2026 15:55:29 +0000
Subject: [PATCH] dracut: Install dd and ln as these are used by google_nvme_id

I found that the disk name symlink was missing on Flatcar due to the
lack of dd. I thought about using pure Bash, but it can't handle the
null bytes. I also thought about using tail, but this is just as likely
to be missing.

I've also added ln for good measure.
--- a/src/lib/dracut/modules.d/30gcp-udev-rules/module-setup.sh
+++ b/src/lib/dracut/modules.d/30gcp-udev-rules/module-setup.sh
@@ -4,7 +4,7 @@

# called by dracut
install() {
- inst_multiple nvme grep sed
+ inst_multiple nvme dd ln grep sed
inst_simple /usr/lib/udev/google_nvme_id
inst_simple /usr/lib/udev/rules.d/65-gce-disk-naming.rules
}
--
2.51.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2026 The Flatcar Container Linux Maintainers
# Distributed under the terms of the Apache License 2.0

# IMPORTANT! When bumping, ensure that the Dracut modules do not install files
# that would make runtime changes to systems to other than GCE VMs because the
# initrd is shared between image types. The udev disk rules are currently safe.

EAPI=8

inherit udev

DESCRIPTION="Configuration and scripts to support the Google Compute Engine guest environment"
HOMEPAGE="http://github.com/GoogleCloudPlatform/guest-configs"
SRC_URI="https://github.com/GoogleCloudPlatform/guest-configs/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/guest-configs-${PV}"

LICENSE="Apache-2.0 BSD ZLIB"
SLOT="0"
KEYWORDS="amd64"

RDEPEND="
!<app-emulation/google-compute-engine-20190124-r3
net-misc/curl
sys-apps/ethtool
sys-apps/iproute2
sys-apps/nvme-cli
"

PATCHES=(
"${FILESDIR}"/${PN}-dracut-deps.patch
)

src_install() {
udev_dorules src/lib/udev/rules.d/{65-gce-disk-naming,75-gce-network}.rules

exeinto "$(get_udevdir)"
doexe src/lib/udev/google_nvme_id

dobin src/usr/bin/google_set_multiqueue
dobin src/usr/bin/google_optimize_local_ssd
dobin src/usr/bin/gce-nic-naming

insinto /usr/lib/sysctl.d
doins src/etc/sysctl.d/60-gce-network-security.conf

insinto /usr/lib/dracut/modules.d
doins -r src/lib/dracut/modules.d/*
}

pkg_postinst() {
udev_reload
}

pkg_postrm() {
udev_reload
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="github">GoogleCloudPlatform/guest-configs</remote-id>
</upstream>
</pkgmetadata>
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ RDEPEND="
sys-apps/iproute2
sys-apps/shadow
"

src_install() {
distutils-r1_src_install

# Newer versions are installed by app-admin/google-guest-configs.
rm -v "${ED}"/usr/bin/google_{optimize_local_ssd,set_multiqueue} || die
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DIST coreos-init-9c940ec78b8eb513397ece28bd6cb0d2af6cc342.tar.gz 60774 BLAKE2B b141646a9ff796825cd0726413c3deacc3d60ac1e9dedbfa72e2f563c4b10ef5f7db5dcafefae75f83a21dd83d811c73611598c27faf70e7d486ffff9d62377e SHA512 4532a1069313cacf2f2d92a71859f6550e87e6cfe1966326b2bfa0279770f2e58d9956ccebc1ddebca2336a8d0e0bc778e73fa0d79c63374a23de5c2b8638c9b
DIST coreos-init-eb859e2b0c6eed7300801e18f878540b650b5950.tar.gz 60327 BLAKE2B f235556b1bfb1912205a96ab6aaf7bc62523864e1f60e3d6e8258216784ed856fd9004e99dc1000aa18c10eb7989c318f9ed46fdc0dc18bf3930003ee1aa611b SHA512 1ad43aaa9720fb171b8a3b10ae403b2d4c7469ef23d029c21c10672db8d1e66c1367c9e8203ab284d1b8b19f64a8e6a60dd81e6b531de12175e6923917f23964
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/flatcar/init.git"
inherit git-r3
else
EGIT_VERSION="9c940ec78b8eb513397ece28bd6cb0d2af6cc342" # flatcar-master
EGIT_VERSION="eb859e2b0c6eed7300801e18f878540b650b5950" # flatcar-master
SRC_URI="https://github.com/flatcar/init/archive/${EGIT_VERSION}.tar.gz -> ${PN}-${EGIT_VERSION}.tar.gz"
S="${WORKDIR}/init-${EGIT_VERSION}"
KEYWORDS="amd64 arm arm64 x86"
Expand Down
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you are changing the versioning of the package. This makes sense, since the package now is not tied only with app-emulation/google-compute-engine, but I'm not sure if using a current date is a way to go - would making it 1.0 make more sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember why I picked 20260102. It was probably the version of google-guest-configs at the time, and I must have decided to use the later of the two. I still think that makes sense. Better than having a downgrade to some meaningless 1.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now bumped that and added a note to the ebuild.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Copyright (c) 2020 Kinvolk GmbH. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

# Version this package using the greater version of its date-based dependencies.

EAPI=8

inherit systemd
Expand All @@ -16,7 +18,8 @@ SLOT="0"
KEYWORDS="amd64"

RDEPEND="
~app-emulation/google-compute-engine-${PV}
app-admin/google-guest-configs
app-emulation/google-compute-engine
"

SYSEXT_NAME="Google Compute Engine"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cros_post_pkg_preinst_rm_from_board_sysroot() {
[[ $(flatcar_target) == generic-board ]] || return

# Dracut copies all sysctl files unconditionally, but our initrd is shared,
# and these rules are GCE-specific, so apply them from the OEM sysext.
rm -r "${ED}"/usr/lib/sysctl.d/ || die
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DIST flatcar-baselayout-9af25c8fed49fc58467ff82b452d6c0fe20188e6.tar.gz 38224 BLAKE2B 9f229b588b8a1b2584d038e83a647107acffa851b0f746dae9b0d3cb33537b6626dde5adbf904470a2be86ec89a5a5de5ad84c82d334837c75152b85cd9f621f SHA512 a32da0a455af0d52d3d0c32b11ab4fdf8b3482fb47040c2e9ac28a1f3d978fe96ce53d288f4a33f7b28999b1f72f01e1265c17986c595f203a23f44cf82c68e6
DIST flatcar-baselayout-9cd8630fd00a78f1af2812791dda0331db963ba7.tar.gz 38900 BLAKE2B 256c5c373f717cd0ec5c68d723f47951be95ec691040124bc1259cf9453a2f3a5ac798c2c6ba4f5722b777f95eabeb0a4b00100b3700893da096b12efc6b8031 SHA512 cebb53beb7ac41c00083dbe89e0c263911423d95d21ffb27541c0449bc10a1c7b4bc383e4c9256afa4d87a3bebb54f7e08691e785aea0afc3c53e5eb71562626
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/flatcar/baselayout.git"
inherit git-r3
else
EGIT_VERSION="9af25c8fed49fc58467ff82b452d6c0fe20188e6" # flatcar-master
EGIT_VERSION="9cd8630fd00a78f1af2812791dda0331db963ba7" # flatcar-master
SRC_URI="https://github.com/flatcar/baselayout/archive/${EGIT_VERSION}.tar.gz -> flatcar-${PN}-${EGIT_VERSION}.tar.gz"
S="${WORKDIR}/${PN}-${EGIT_VERSION}"
KEYWORDS="amd64 arm64"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DIST bootengine-a19dace6ad74359e6c3677fccadc36a7ce09767a.tar.gz 37827 BLAKE2B fa3a4a348bfaf7acc8fc0f9002da040580969801da22121f3d74f3cf0943e7d99d681a564e912260d453261e3483dfc7b3c07a404d8f8048a5bd3353c4f31791 SHA512 e5693fa5bcdd2023857954c2234f290bea28f9416ec31c469e4545756f5630fa5b7ce701f3a7c48797698066de090f9aea349fcc9a000306fdb4a145d0fb38c4
DIST bootengine-a3b96e3cfd7b8c3e0ff38540831fb0de98487404.tar.gz 37928 BLAKE2B e3d9965d21382d7e88419cb5f253c5907fb4af1ced7a0354711fed7374f6086298e49cc5c94ee565804b6f5bcb5ee7caf3762de39e24a947cba676bb5690fca8 SHA512 b47b78375b40ad4e78a44658172c780dce1bcae4b0eb89dbeb01c3dba98dc0cba8216334946ea650430e86e905a5c35959f3ad0c4aa38a9461c061a10032d53b
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/flatcar/bootengine.git"
inherit git-r3
else
EGIT_VERSION="a19dace6ad74359e6c3677fccadc36a7ce09767a" # flatcar-master
EGIT_VERSION="a3b96e3cfd7b8c3e0ff38540831fb0de98487404"
SRC_URI="https://github.com/flatcar/bootengine/archive/${EGIT_VERSION}.tar.gz -> ${PN}-${EGIT_VERSION}.tar.gz"
S="${WORKDIR}/${PN}-${EGIT_VERSION}"
KEYWORDS="amd64 arm arm64 x86"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ DEPEND="
>=sys-kernel/coreos-firmware-20180103-r1:=
sys-process/procps
virtual/udev
amd64? ( sys-firmware/intel-microcode:= )
amd64? (
app-admin/google-guest-configs
sys-firmware/intel-microcode:=
)
"

src_prepare() {
Expand Down