Merge pull request #2309 from flatcar/scripts

oem-azure: add hyperv daemons
This commit is contained in:
Thilo Fromm 2024-09-12 16:40:42 +02:00
commit eed75a15d9
10 changed files with 79 additions and 1 deletions

View File

@ -11,6 +11,7 @@ if ! check_remote_branch "linux-${VERSION_NEW}-${TARGET_BRANCH}"; then
exit 0 exit 0
fi fi
# Dive into ebuild repo section of SDK
pushd "${SDK_OUTER_OVERLAY}" pushd "${SDK_OUTER_OVERLAY}"
# trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4 # trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4
@ -31,6 +32,12 @@ for pkg in sources modules kernel; do
popd popd
done done
# Update hyperv daemons ebuild soft-link to reflect new kernel version
find -D exec app-emulation/hv-daemons/ -type l -exec rm '{}' \;
ln -s app-emulation/hv-daemons/hv-daemons-9999.ebuild \
app-emulation/hv-daemons/hv-daemons-${VERSION_NEW}.ebuild
# Leave ebuild repo section of SDK
popd popd
function get_lwn_link() { function get_lwn_link() {
@ -72,7 +79,8 @@ generate_update_changelog 'Linux' "${VERSION_NEW}" "${URL}" 'linux' "${OLD_VERSI
commit_changes sys-kernel/coreos-sources "${VERSION_OLD}" "${VERSION_NEW}" \ commit_changes sys-kernel/coreos-sources "${VERSION_OLD}" "${VERSION_NEW}" \
sys-kernel/coreos-modules \ sys-kernel/coreos-modules \
sys-kernel/coreos-kernel sys-kernel/coreos-kernel \
app-emulation/hv-daemons
cleanup_repo cleanup_repo

View File

@ -0,0 +1 @@
- Azure, HyperV: Added daemons `kvp`, `vss`, and `fcopy` for better HyperV hypervisor integration with Flatcar guests ([scripts#2309](https://github.com/flatcar/scripts/pull/2309)).

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V FCOPY daemon
ConditionPathExists=/dev/vmbus/hv_fcopy
[Service]
ExecStart=/usr/bin/hv_fcopy_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V KVP daemon
ConditionPathExists=/dev/vmbus/hv_kvp
[Service]
ExecStart=/usr/bin/hv_kvp_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V VSS daemon
ConditionPathExists=/dev/vmbus/hv_vss
[Service]
ExecStart=/usr/bin/hv_vss_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1 @@
hv-daemons-9999.ebuild

View File

@ -0,0 +1,32 @@
# Copyright 2044-2016 The Flatcar Maintainers
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit coreos-kernel savedconfig systemd
DESCRIPTION="HyperV guest support daemons."
KEYWORDS="amd64 arm64"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm64"
fi
src_compile() {
# Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon
kmake tools/hv
}
src_install() {
dobin "${S}/build/tools/hv/hv_fcopy_daemon"
dobin "${S}/build/tools/hv/hv_kvp_daemon"
dobin "${S}/build/tools/hv/hv_vss_daemon"
systemd_dounit "${FILESDIR}/hv_fcopy_daemon.service"
systemd_dounit "${FILESDIR}/hv_kvp_daemon.service"
systemd_dounit "${FILESDIR}/hv_vss_daemon.service"
systemd_enable_service "multi-user.target" "hv_fcopy_daemon.service"
systemd_enable_service "multi-user.target" "hv_kvp_daemon.service"
systemd_enable_service "multi-user.target" "hv_vss_daemon.service"
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>

View File

@ -17,6 +17,7 @@ IUSE=""
RDEPEND=" RDEPEND="
~app-emulation/wa-linux-agent-${PV} ~app-emulation/wa-linux-agent-${PV}
net-misc/chrony net-misc/chrony
app-emulation/hv-daemons
" "
# for coreos-base/common-oem-files # for coreos-base/common-oem-files

View File

@ -15,6 +15,10 @@ IUSE=""
# no source directory # no source directory
S="${WORKDIR}" S="${WORKDIR}"
RDEPEND="
app-emulation/hv-daemons
"
src_prepare() { src_prepare() {
default default
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \ sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \