Merge pull request #27442 from DaanDeMeyer/presets
mkosi: Switch to use mkosi presets with prebuilt initrds
This commit is contained in:
@@ -73,7 +73,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
- uses: systemd/mkosi@54f80aa8f687ed4d1759f0a7329c64c3f0ff70ad
|
||||
- uses: systemd/mkosi@3008c7e9383669b7fb6f6afe556c6fd28f28f8f4
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
|
||||
@@ -703,6 +703,8 @@ git = find_program('git', required : false)
|
||||
env = find_program('env')
|
||||
perl = find_program('perl', required : false)
|
||||
rsync = find_program('rsync', required : false)
|
||||
diff = find_program('diff')
|
||||
find = find_program('find')
|
||||
meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh'
|
||||
|
||||
mkdir_p = 'mkdir -p $DESTDIR/@0@'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# Arch and CentOS 8 Stream initrds are rather big so we need to give QEMU more memory so the kernel can load
|
||||
# them without OOMing.
|
||||
|
||||
[Match]
|
||||
Distribution=arch centos
|
||||
Release=rolling 8
|
||||
|
||||
[Host]
|
||||
QemuMem=3G
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=debian
|
||||
|
||||
[Distribution]
|
||||
Release=testing
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=fedora
|
||||
|
||||
[Distribution]
|
||||
Release=38
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=opensuse
|
||||
|
||||
[Distribution]
|
||||
Release=tumbleweed
|
||||
@@ -10,60 +10,6 @@ OutputDirectory=mkosi.output
|
||||
[Content]
|
||||
BuildDirectory=mkosi.builddir
|
||||
CacheDirectory=mkosi.cache
|
||||
ExtraTrees=src:/root/src
|
||||
Packages=
|
||||
acl
|
||||
bash-completion
|
||||
coreutils
|
||||
diffutils
|
||||
dnsmasq
|
||||
dosfstools
|
||||
dracut
|
||||
e2fsprogs
|
||||
findutils
|
||||
gcc # For sanitizer libraries
|
||||
gdb
|
||||
grep
|
||||
kbd
|
||||
kexec-tools
|
||||
kmod
|
||||
less
|
||||
mtools
|
||||
nano
|
||||
nftables
|
||||
openssl
|
||||
python3
|
||||
qrencode
|
||||
sed
|
||||
strace
|
||||
systemd
|
||||
tree
|
||||
udev
|
||||
util-linux
|
||||
valgrind
|
||||
wireguard-tools
|
||||
xfsprogs
|
||||
zsh
|
||||
|
||||
BuildPackages=
|
||||
bc
|
||||
binutils
|
||||
bison
|
||||
clang
|
||||
flex
|
||||
gcc
|
||||
gettext
|
||||
git
|
||||
gperf
|
||||
lld
|
||||
llvm
|
||||
make
|
||||
meson
|
||||
pkgconf
|
||||
rpm
|
||||
rsync
|
||||
tar
|
||||
zstd
|
||||
|
||||
[Host]
|
||||
Acl=yes
|
||||
@@ -77,7 +23,7 @@ KernelCommandLineExtra=systemd.crash_shell
|
||||
systemd.mask=auditd
|
||||
# Tell the kernel to only log warning and up to the console.
|
||||
loglevel=4
|
||||
|
||||
[Validation]
|
||||
Password=
|
||||
Autologin=yes
|
||||
# Disable the kernel's ratelimiting on userspace logging to kmsg.
|
||||
printk.devkmsg=on
|
||||
# Tell networkd to manage the ethernet interface.
|
||||
ip=enp0s1:any
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=ubuntu
|
||||
|
||||
[Distribution]
|
||||
Release=jammy
|
||||
Repositories=universe
|
||||
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=centos
|
||||
Release=8
|
||||
@@ -1,51 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Copyright © 2016 Zeal Jagannatha
|
||||
|
||||
[Match]
|
||||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
alsa-lib
|
||||
base
|
||||
btrfs-progs
|
||||
compsize
|
||||
dhcp
|
||||
f2fs-tools
|
||||
fuse2
|
||||
gnutls
|
||||
iproute
|
||||
libbpf
|
||||
libcap-ng
|
||||
libfido2
|
||||
libmicrohttpd
|
||||
libmnl
|
||||
libpwquality
|
||||
libxkbcommon
|
||||
linux
|
||||
man-db
|
||||
numactl
|
||||
openbsd-netcat
|
||||
openssh
|
||||
polkit
|
||||
popt
|
||||
python-pefile
|
||||
python-psutil
|
||||
python-pytest
|
||||
quota-tools
|
||||
shadow
|
||||
tpm2-tss
|
||||
vim
|
||||
|
||||
BuildPackages=
|
||||
bpf
|
||||
docbook-xsl
|
||||
libxslt
|
||||
linux-api-headers
|
||||
pahole
|
||||
perl
|
||||
python-docutils
|
||||
python-jinja
|
||||
python-lxml
|
||||
python-pyelftools
|
||||
-1
@@ -1 +0,0 @@
|
||||
ignore *
|
||||
@@ -1,3 +0,0 @@
|
||||
set debuginfod enabled off
|
||||
set build-id-verbose 0
|
||||
set substitute-path ../src /root/src
|
||||
@@ -1,6 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
disable ssh.service
|
||||
disable sshd.service
|
||||
disable dnsmasq.service
|
||||
disable isc-dhcp-server.service
|
||||
disable isc-dhcp-server6.service
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
if [ "$(grep '^ID=' /etc/os-release)" = "ID=\"centos\"" ] && [ "$(grep '^VERSION=' /etc/os-release)" = "VERSION=\"8\"" ]; then
|
||||
alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
alternatives --set python3 /usr/bin/python3.9
|
||||
fi
|
||||
|
||||
# Make sure the necessary test users are available in the build image. We do this here because the build
|
||||
# script does not run as root.
|
||||
if [ "$1" = "build" ]; then
|
||||
for id in 1 2 3; do
|
||||
getent group $id >/dev/null || echo "g testgroup$id $id -" | systemd-sysusers -
|
||||
done
|
||||
fi
|
||||
@@ -162,31 +162,3 @@ if [ "$WITH_TESTS" = 1 ] ; then
|
||||
fi
|
||||
|
||||
meson install -C "$BUILDDIR" --quiet --no-rebuild --only-changed
|
||||
|
||||
if [ -d mkosi.kernel/ ]; then
|
||||
SRCDIR="$SRCDIR/mkosi.kernel"
|
||||
BUILDDIR="$BUILDDIR/mkosi.kernel"
|
||||
cd "$SRCDIR"
|
||||
mkdir -p "$BUILDDIR"
|
||||
|
||||
# Ensure fast incremental builds by fixating these values which usually change for each build.
|
||||
export KBUILD_BUILD_TIMESTAMP="Fri Jun 5 15:58:00 CEST 2015"
|
||||
export KBUILD_BUILD_HOST="mkosi"
|
||||
|
||||
scripts/kconfig/merge_config.sh -O "$BUILDDIR" \
|
||||
../mkosi.kernel.config \
|
||||
tools/testing/selftests/bpf/config.x86_64 \
|
||||
tools/testing/selftests/bpf/config
|
||||
|
||||
# Make sure systemd-boot boots this kernel and not the distro provided one by overriding the version.
|
||||
make O="$BUILDDIR" VERSION=99 -j "$(nproc)"
|
||||
|
||||
KERNEL_RELEASE=$(make O="$BUILDDIR" VERSION=99 -s kernelrelease)
|
||||
mkdir -p "$DESTDIR/usr/lib/modules/$KERNEL_RELEASE"
|
||||
make O="$BUILDDIR" VERSION=99 INSTALL_MOD_PATH="$DESTDIR/usr" modules_install
|
||||
make O="$BUILDDIR" VERSION=99 INSTALL_PATH="$DESTDIR/usr/lib/modules/$KERNEL_RELEASE" install
|
||||
mkdir -p "$DESTDIR/usr/lib/kernel/selftests"
|
||||
make -C tools/testing/selftests -j "$(nproc)" O="$BUILDDIR" VERSION=99 KSFT_INSTALL_PATH="$DESTDIR/usr/lib/kernel/selftests" SKIP_TARGETS="" install
|
||||
|
||||
ln -sf /usr/lib/kernel/selftests/bpf/bpftool "$DESTDIR/usr/bin/bpftool"
|
||||
fi
|
||||
@@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Output]
|
||||
Format=directory
|
||||
|
||||
[Content]
|
||||
Bootable=no
|
||||
BuildSources=../..
|
||||
CleanPackageMetadata=no
|
||||
Packages=
|
||||
kmod
|
||||
less
|
||||
systemd
|
||||
udev
|
||||
|
||||
BuildPackages=
|
||||
acl
|
||||
diffutils
|
||||
gawk
|
||||
binutils
|
||||
clang
|
||||
gettext
|
||||
git
|
||||
gperf
|
||||
grep
|
||||
lld
|
||||
llvm
|
||||
make
|
||||
meson
|
||||
pkgconf
|
||||
rsync
|
||||
sed
|
||||
tar
|
||||
zstd
|
||||
@@ -0,0 +1,31 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
gnutls
|
||||
libbpf
|
||||
libfido2
|
||||
libmicrohttpd
|
||||
libnftnl
|
||||
libpwquality
|
||||
libxkbcommon
|
||||
openssl
|
||||
qrencode
|
||||
systemd-sysvcompat
|
||||
tpm2-tss
|
||||
|
||||
BuildPackages=
|
||||
bpf
|
||||
docbook-xsl
|
||||
glib2
|
||||
libxslt
|
||||
linux-api-headers
|
||||
perl
|
||||
python
|
||||
python-jinja
|
||||
python-lxml
|
||||
python-pefile
|
||||
python-pyelftools
|
||||
+8
-35
@@ -5,67 +5,40 @@ Distribution=centos fedora
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
alsa-lib
|
||||
audit-libs
|
||||
cryptsetup
|
||||
dhcp-server
|
||||
dnf
|
||||
fuse
|
||||
glib2
|
||||
glibc-minimal-langpack
|
||||
glibc.i686
|
||||
cryptsetup-libs
|
||||
gnutls
|
||||
iproute
|
||||
iproute-tc
|
||||
kernel-core
|
||||
libasan
|
||||
libbpf
|
||||
libcap-ng
|
||||
libcap-ng-utils
|
||||
libfido2
|
||||
libgcrypt
|
||||
libmicrohttpd
|
||||
libmnl
|
||||
libnftnl
|
||||
libubsan
|
||||
libxcrypt
|
||||
libxkbcommon
|
||||
netcat
|
||||
numactl-libs
|
||||
openssh-server
|
||||
p11-kit
|
||||
pam
|
||||
passwd
|
||||
polkit
|
||||
popt
|
||||
procps-ng
|
||||
quota
|
||||
openssl-libs
|
||||
qrencode-libs
|
||||
tpm2-tss
|
||||
util-linux
|
||||
vim-common
|
||||
|
||||
BuildPackages=
|
||||
/usr/bin/pkg-config
|
||||
bpftool
|
||||
docbook-xsl
|
||||
dwarves
|
||||
glibc-devel.i686
|
||||
glibc-static
|
||||
glibc-static.i686
|
||||
findutils
|
||||
libxslt
|
||||
pam-devel
|
||||
perl-interpreter
|
||||
pkgconfig(alsa)
|
||||
pkgconfig(audit)
|
||||
pkgconfig(blkid)
|
||||
pkgconfig(bzip2)
|
||||
pkgconfig(dbus-1)
|
||||
pkgconfig(fdisk)
|
||||
pkgconfig(fuse)
|
||||
pkgconfig(glib-2.0)
|
||||
pkgconfig(gnutls)
|
||||
pkgconfig(libacl)
|
||||
pkgconfig(libbpf)
|
||||
pkgconfig(libcap-ng)
|
||||
pkgconfig(libcap)
|
||||
pkgconfig(libcryptsetup)
|
||||
pkgconfig(libcurl)
|
||||
@@ -74,7 +47,7 @@ BuildPackages=
|
||||
pkgconfig(libidn2)
|
||||
pkgconfig(libkmod)
|
||||
pkgconfig(libmicrohttpd)
|
||||
pkgconfig(libmnl)
|
||||
pkgconfig(libnftnl)
|
||||
pkgconfig(libpcre2-8)
|
||||
pkgconfig(libqrencode)
|
||||
pkgconfig(libseccomp)
|
||||
@@ -83,12 +56,12 @@ BuildPackages=
|
||||
pkgconfig(mount)
|
||||
pkgconfig(numa)
|
||||
pkgconfig(openssl)
|
||||
pkgconfig(openssl)
|
||||
pkgconfig(p11-kit-1)
|
||||
pkgconfig(popt)
|
||||
pkgconfig(pwquality)
|
||||
pkgconfig(tss2-esys)
|
||||
pkgconfig(tss2-mu)
|
||||
pkgconfig(tss2-rc)
|
||||
pkgconfig(valgrind)
|
||||
pkgconfig(xkbcommon)
|
||||
python3-docutils
|
||||
rpm
|
||||
+7
-38
@@ -5,69 +5,39 @@ Distribution=debian ubuntu
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
cryptsetup-bin
|
||||
dbus-broker
|
||||
default-dbus-session-bus
|
||||
f2fs-tools
|
||||
fdisk
|
||||
fuse
|
||||
gcc # Provides libasan/libubsan
|
||||
iproute2
|
||||
isc-dhcp-server
|
||||
libasound2
|
||||
libc6-i386
|
||||
libcap-ng-utils
|
||||
libcap-ng0
|
||||
libfdisk1
|
||||
libfido2-1
|
||||
libglib2.0-0
|
||||
libgnutls30
|
||||
libidn2-0
|
||||
libmicrohttpd12
|
||||
libmnl0
|
||||
libnuma1
|
||||
libnftnl11
|
||||
libp11-kit0
|
||||
libpam0g
|
||||
libpopt0
|
||||
libpwquality1
|
||||
libqrencode4
|
||||
libssl3
|
||||
libtss2-dev # Use the -dev package to avoid churn in updating version numbers
|
||||
netcat-openbsd
|
||||
openssh-server
|
||||
passwd
|
||||
policykit-1
|
||||
procps
|
||||
python3-pefile
|
||||
python3-psutil
|
||||
python3-pytest
|
||||
quota
|
||||
systemd
|
||||
systemd-sysv
|
||||
tzdata
|
||||
xxd
|
||||
|
||||
BuildPackages=
|
||||
docbook-xsl
|
||||
dpkg-dev
|
||||
g++
|
||||
gcc-multilib
|
||||
libacl1-dev
|
||||
libasound-dev
|
||||
libaudit-dev
|
||||
libblkid-dev
|
||||
libbpf-dev
|
||||
libbz2-dev
|
||||
libc6-dev
|
||||
libc6-dev-i386
|
||||
libcap-dev
|
||||
libcap-ng-dev
|
||||
libcryptsetup-dev
|
||||
libcurl4-openssl-dev
|
||||
libdbus-1-dev
|
||||
libdw-dev
|
||||
libfdisk-dev
|
||||
libfido2-dev
|
||||
libfuse-dev
|
||||
libgcrypt20-dev
|
||||
libglib2.0-dev
|
||||
libgnutls28-dev
|
||||
@@ -75,12 +45,10 @@ BuildPackages=
|
||||
libiptc-dev
|
||||
libkmod-dev
|
||||
libmicrohttpd-dev
|
||||
libmnl-dev
|
||||
libmount-dev
|
||||
libnuma-dev
|
||||
libnftnl-dev
|
||||
libp11-kit-dev
|
||||
libpam0g-dev
|
||||
libpopt-dev
|
||||
libpwquality-dev
|
||||
libqrencode-dev
|
||||
libseccomp-dev
|
||||
@@ -89,9 +57,10 @@ BuildPackages=
|
||||
libxen-dev
|
||||
libxkbcommon-dev
|
||||
libzstd-dev
|
||||
pahole
|
||||
python3-docutils
|
||||
python3
|
||||
python3-jinja2
|
||||
python3-lxml
|
||||
python3-pefile
|
||||
python3-pyelftools
|
||||
python3-pytest
|
||||
xsltproc
|
||||
@@ -3,13 +3,9 @@
|
||||
[Match]
|
||||
Distribution=debian
|
||||
|
||||
[Distribution]
|
||||
Release=testing
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
libbpf1
|
||||
linux-image-cloud-amd64
|
||||
|
||||
BuildPackages=
|
||||
bpftool
|
||||
@@ -3,22 +3,13 @@
|
||||
[Match]
|
||||
Distribution=fedora
|
||||
|
||||
[Distribution]
|
||||
Release=38
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
compsize
|
||||
f2fs-tools
|
||||
python3dist(pefile)
|
||||
python3dist(psutil)
|
||||
python3dist(pytest)
|
||||
|
||||
BuildPackages=
|
||||
libcap-static
|
||||
pkgconfig(libgcrypt)
|
||||
pkgconfig(xencontrol)
|
||||
python3
|
||||
python3dist(jinja2)
|
||||
python3dist(lxml)
|
||||
python3dist(pefile)
|
||||
python3dist(pyelftools)
|
||||
python3dist(pytest)
|
||||
+13
-44
@@ -3,23 +3,13 @@
|
||||
[Match]
|
||||
Distribution=opensuse
|
||||
|
||||
[Distribution]
|
||||
Release=tumbleweed
|
||||
|
||||
[Content]
|
||||
# We install gawk, gzip, grep, xz here explicitly so that the busybox versions don't get installed instead.
|
||||
Packages=
|
||||
btrfs-progs
|
||||
dbus-1
|
||||
f2fs-tools
|
||||
fuse
|
||||
gcc # Provides libasan/libubsan
|
||||
glibc-32bit
|
||||
glibc-locale-base
|
||||
kernel-default
|
||||
libasound2
|
||||
gawk
|
||||
grep
|
||||
gzip
|
||||
libbpf1
|
||||
libcap-ng-utils
|
||||
libcap-ng0
|
||||
libcrypt1
|
||||
libcryptsetup12
|
||||
libdw1
|
||||
@@ -28,48 +18,34 @@ Packages=
|
||||
libgcrypt20
|
||||
libglib-2_0-0
|
||||
libkmod2
|
||||
liblz4-1
|
||||
libmnl0
|
||||
libmount1
|
||||
libnuma1
|
||||
libnftnl11
|
||||
libopenssl3
|
||||
libp11-kit0
|
||||
libpopt0
|
||||
libqrencode4
|
||||
libseccomp2
|
||||
libxkbcommon0
|
||||
openssh-server
|
||||
libzstd1
|
||||
pam
|
||||
python3-pefile
|
||||
python3-psutil
|
||||
python3-pytest
|
||||
shadow
|
||||
tpm2-0-tss
|
||||
vim
|
||||
xz
|
||||
|
||||
BuildPackages=
|
||||
alsa-devel
|
||||
audit-devel
|
||||
bpftool
|
||||
dbus-1-devel
|
||||
docbook-xsl-stylesheets
|
||||
dwarves
|
||||
fdupes
|
||||
fuse-devel
|
||||
gcc-32bit
|
||||
gcc-c++
|
||||
glib2-devel
|
||||
glibc-devel-32bit
|
||||
glibc-devel-static-32bit
|
||||
glibc-locale
|
||||
glibc-static
|
||||
intltool
|
||||
libacl-devel
|
||||
libapparmor-devel
|
||||
libblkid-devel
|
||||
libbpf-devel
|
||||
libbz2-devel
|
||||
libcap-devel
|
||||
libcap-ng-devel
|
||||
libcryptsetup-devel
|
||||
libcurl-devel
|
||||
libdw-devel
|
||||
@@ -79,34 +55,27 @@ BuildPackages=
|
||||
libgcrypt-devel
|
||||
libgnutls-devel
|
||||
libkmod-devel
|
||||
liblz4-devel
|
||||
libmicrohttpd-devel
|
||||
libmnl-devel
|
||||
libmount-devel
|
||||
libnuma-devel
|
||||
libnftnl-devel
|
||||
libpwquality-devel
|
||||
libseccomp-devel
|
||||
libselinux-devel
|
||||
libxkbcommon-devel
|
||||
libxslt-tools
|
||||
libzstd-devel
|
||||
openssl-devel
|
||||
pam-devel
|
||||
pciutils-devel
|
||||
pcre-devel
|
||||
popt-devel
|
||||
python3-docutils
|
||||
python3
|
||||
python3-Jinja2
|
||||
python3-lxml
|
||||
python3-pefile
|
||||
python3-pyelftools
|
||||
python3-pytest
|
||||
qrencode-devel
|
||||
shadow
|
||||
system-group-obsolete
|
||||
system-user-bin
|
||||
system-user-daemon
|
||||
system-user-nobody
|
||||
system-user-root
|
||||
systemd-sysvinit
|
||||
timezone
|
||||
tpm2-0-tss-devel
|
||||
xen-devel
|
||||
zlib-devel
|
||||
@@ -3,14 +3,9 @@
|
||||
[Match]
|
||||
Distribution=ubuntu
|
||||
|
||||
[Distribution]
|
||||
Release=jammy
|
||||
Repositories=universe
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
libbpf0
|
||||
linux-virtual
|
||||
|
||||
BuildPackages=
|
||||
linux-tools-common
|
||||
+4
-7
@@ -5,15 +5,12 @@ Distribution=centos
|
||||
Release=8
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
python39
|
||||
python3.9dist(pefile)
|
||||
python3.9dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
|
||||
python3.9dist(psutil)
|
||||
python3.9dist(pytest)
|
||||
|
||||
BuildPackages=
|
||||
libgcrypt-devel # CentOS Stream 8 libgcrypt-devel doesn't ship a pkg-config file.
|
||||
platform-python
|
||||
python3.9dist(jinja2)
|
||||
python3.9dist(lxml)
|
||||
python3.9dist(pefile)
|
||||
python3.9dist(pyelftools)
|
||||
python3.9dist(pytest)
|
||||
python39
|
||||
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=centos
|
||||
Release=9
|
||||
|
||||
[Content]
|
||||
BuildPackages=
|
||||
pkgconfig(libgcrypt)
|
||||
platform-python
|
||||
python3dist(jinja2)
|
||||
python3dist(lxml)
|
||||
python3dist(pefile)
|
||||
python3dist(pyelftools)
|
||||
python3dist(pytest)
|
||||
@@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# mkosi adds its own ssh units via the --ssh switch so disable the default ones.
|
||||
disable ssh.service
|
||||
disable sshd.service
|
||||
|
||||
# These are started manually in integration tests so don't start them by default.
|
||||
disable dnsmasq.service
|
||||
disable isc-dhcp-server.service
|
||||
disable isc-dhcp-server6.service
|
||||
|
||||
# Pulled in via dracut-network by kexec-tools on Fedora.
|
||||
disable NetworkManager.service
|
||||
|
||||
# Make sure dbus-broker is started by default on Debian/Ubuntu.
|
||||
enable dbus-broker.service
|
||||
|
||||
# systemd-networkd is disabled by default on Fedora so make sure it is enabled.
|
||||
enable systemd-networkd.service
|
||||
@@ -0,0 +1,4 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# Make sure that services are disabled by default (primarily for Debian/Ubuntu).
|
||||
disable *
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
if [ "$1" = "build" ]; then
|
||||
. /etc/os-release
|
||||
|
||||
if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
|
||||
alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
alternatives --set python3 /usr/bin/python3.9
|
||||
fi
|
||||
|
||||
# Make sure the necessary test users are available in the build image. We do this here because the build
|
||||
# script does not run as root.
|
||||
for id in 1 2 3; do
|
||||
getent group $id >/dev/null || echo "g testgroup$id $id -" | systemd-sysusers -
|
||||
done
|
||||
fi
|
||||
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Output]
|
||||
Format=cpio
|
||||
# TODO: Switch to zstd once we stop building CentOS Stream 8.
|
||||
CompressOutput=xz
|
||||
|
||||
[Content]
|
||||
BaseTrees=mkosi.output/base
|
||||
MakeInitrd=yes
|
||||
|
||||
# Arch Linux doesn't split their gcc-libs package so we manually remove unneeded stuff here to make sure it
|
||||
# doesn't end up in the initrd.
|
||||
RemoveFiles=
|
||||
/usr/lib/libgfortran.so*
|
||||
/usr/lib/libgo.so*
|
||||
/usr/lib/libgomp.so*
|
||||
/usr/lib/libgphobos.so*
|
||||
/usr/lib/libobjc.so*
|
||||
/usr/lib/libstdc++.so*
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
if [ -d "$SRCDIR"/mkosi.kernel/ ]; then
|
||||
SRCDIR="$SRCDIR/mkosi.kernel"
|
||||
BUILDDIR="$BUILDDIR/mkosi.kernel"
|
||||
cd "$SRCDIR"
|
||||
mkdir -p "$BUILDDIR"
|
||||
|
||||
# Ensure fast incremental builds by fixating these values which usually change for each build.
|
||||
export KBUILD_BUILD_TIMESTAMP="Fri Jun 5 15:58:00 CEST 2015"
|
||||
export KBUILD_BUILD_HOST="mkosi"
|
||||
|
||||
scripts/kconfig/merge_config.sh -O "$BUILDDIR" \
|
||||
../mkosi.kernel.config \
|
||||
tools/testing/selftests/bpf/config.x86_64 \
|
||||
tools/testing/selftests/bpf/config
|
||||
|
||||
# Make sure systemd-boot boots this kernel and not the distro provided one by overriding the version.
|
||||
make O="$BUILDDIR" VERSION=99 -j "$(nproc)"
|
||||
|
||||
KERNEL_RELEASE=$(make O="$BUILDDIR" VERSION=99 -s kernelrelease)
|
||||
mkdir -p "$DESTDIR/usr/lib/modules/$KERNEL_RELEASE"
|
||||
make O="$BUILDDIR" VERSION=99 INSTALL_MOD_PATH="$DESTDIR/usr" modules_install
|
||||
make O="$BUILDDIR" VERSION=99 INSTALL_PATH="$DESTDIR/usr/lib/modules/$KERNEL_RELEASE" install
|
||||
mkdir -p "$DESTDIR/usr/lib/kernel/selftests"
|
||||
make -C tools/testing/selftests -j "$(nproc)" O="$BUILDDIR" VERSION=99 KSFT_INSTALL_PATH="$DESTDIR/usr/lib/kernel/selftests" SKIP_TARGETS="" install
|
||||
|
||||
mkdir -p "$DESTDIR"/usr/bin
|
||||
ln -sf /usr/lib/kernel/selftests/bpf/bpftool "$DESTDIR/usr/bin/bpftool"
|
||||
fi
|
||||
@@ -0,0 +1,38 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Content]
|
||||
BaseTrees=../../mkosi.output/base
|
||||
ExtraTrees=../../src:/root/src
|
||||
Initrds=../../mkosi.output/initrd.cpio.xz
|
||||
Packages=
|
||||
acl
|
||||
bash-completion
|
||||
coreutils
|
||||
diffutils
|
||||
dnsmasq
|
||||
dosfstools
|
||||
e2fsprogs
|
||||
findutils
|
||||
gcc # Sanitizer libraries
|
||||
gdb
|
||||
grep
|
||||
kbd
|
||||
kexec-tools
|
||||
less
|
||||
mtools
|
||||
nano
|
||||
nftables
|
||||
openssl
|
||||
qrencode
|
||||
sed
|
||||
strace
|
||||
tree
|
||||
util-linux
|
||||
valgrind
|
||||
wireguard-tools
|
||||
xfsprogs
|
||||
zsh
|
||||
|
||||
[Validation]
|
||||
Password=
|
||||
Autologin=yes
|
||||
@@ -0,0 +1,25 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
compsize
|
||||
dhcp
|
||||
f2fs-tools
|
||||
glib2
|
||||
iproute
|
||||
linux
|
||||
man-db
|
||||
openbsd-netcat
|
||||
openssh
|
||||
polkit
|
||||
python-pefile
|
||||
python-psutil
|
||||
python-pytest
|
||||
python3
|
||||
quota-tools
|
||||
shadow
|
||||
vim
|
||||
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=centos fedora
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
cryptsetup
|
||||
dhcp-server
|
||||
dnf
|
||||
glib2
|
||||
iproute
|
||||
iproute-tc
|
||||
kernel-core
|
||||
libcap-ng-utils
|
||||
netcat
|
||||
openssh-server
|
||||
p11-kit
|
||||
pam
|
||||
passwd
|
||||
polkit
|
||||
procps-ng
|
||||
quota
|
||||
vim-common
|
||||
@@ -0,0 +1,27 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=debian ubuntu
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
cryptsetup-bin
|
||||
dbus-broker
|
||||
default-dbus-session-bus
|
||||
f2fs-tools
|
||||
fdisk
|
||||
iproute2
|
||||
isc-dhcp-server
|
||||
libcap-ng-utils
|
||||
netcat-openbsd
|
||||
openssh-server
|
||||
passwd
|
||||
policykit-1
|
||||
procps
|
||||
python3
|
||||
python3-pefile
|
||||
python3-psutil
|
||||
python3-pytest
|
||||
quota
|
||||
xxd
|
||||
@@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=debian
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
linux-image-cloud-amd64
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=fedora
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
compsize
|
||||
f2fs-tools
|
||||
python3
|
||||
python3dist(pefile)
|
||||
python3dist(psutil)
|
||||
python3dist(pytest)
|
||||
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=opensuse
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
btrfs-progs
|
||||
cryptsetup
|
||||
dbus-broker
|
||||
f2fs-tools
|
||||
glibc-locale-base
|
||||
kernel-default
|
||||
libcap-ng-utils
|
||||
openssh-server
|
||||
python3
|
||||
python3-pefile
|
||||
python3-psutil
|
||||
python3-pytest
|
||||
quota
|
||||
shadow
|
||||
vim
|
||||
@@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=ubuntu
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
linux-virtual
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=centos
|
||||
Release=8
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
platform-python
|
||||
python3.9dist(pefile)
|
||||
python3.9dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
|
||||
python3.9dist(psutil)
|
||||
python3.9dist(pytest)
|
||||
python39
|
||||
+1
-6
@@ -6,13 +6,8 @@ Release=9
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
platform-python
|
||||
python3dist(pefile)
|
||||
python3dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
|
||||
python3dist(psutil)
|
||||
python3dist(pytest)
|
||||
|
||||
BuildPackages=
|
||||
pkgconfig(libgcrypt)
|
||||
python3dist(jinja2)
|
||||
python3dist(lxml)
|
||||
python3dist(pyelftools)
|
||||
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
alsa-lib
|
||||
fuse2
|
||||
libcap
|
||||
libcap-ng
|
||||
libelf
|
||||
libmnl
|
||||
numactl
|
||||
popt
|
||||
|
||||
BuildPackages=
|
||||
pahole
|
||||
python-docutils
|
||||
@@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
Distribution=centos fedora
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
alsa-lib
|
||||
elfutils-libelf
|
||||
fuse
|
||||
glibc.i686
|
||||
libcap
|
||||
libcap-ng
|
||||
libcap-ng-utils
|
||||
libmnl
|
||||
numactl-libs
|
||||
popt
|
||||
|
||||
BuildPackages=
|
||||
dwarves
|
||||
glibc-devel.i686
|
||||
glibc-static
|
||||
glibc-static.i686
|
||||
pkgconfig(alsa)
|
||||
pkgconfig(fuse)
|
||||
pkgconfig(libcap-ng)
|
||||
pkgconfig(libcap)
|
||||
pkgconfig(libelf)
|
||||
pkgconfig(libmnl)
|
||||
pkgconfig(numa)
|
||||
pkgconfig(openssl)
|
||||
pkgconfig(popt)
|
||||
python3-docutils
|
||||
@@ -0,0 +1,32 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
Distribution=debian ubuntu
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
fuse
|
||||
libasound2
|
||||
libc6-i386
|
||||
libcap-ng0
|
||||
libcap2
|
||||
libelf1
|
||||
libmnl0
|
||||
libnuma1
|
||||
libpopt0
|
||||
|
||||
BuildPackages=
|
||||
gcc-multilib
|
||||
libasound-dev
|
||||
libc6-dev
|
||||
libc6-dev-i686
|
||||
libcap-ng-dev
|
||||
libcap-dev
|
||||
libelf-dev
|
||||
libfuse-dev
|
||||
libmnl-dev
|
||||
libnuma-dev
|
||||
libpopt-dev
|
||||
pahole
|
||||
python3-docutils
|
||||
@@ -0,0 +1,9 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
Distribution=fedora
|
||||
|
||||
[Content]
|
||||
BuildPackages=
|
||||
libcap-static
|
||||
@@ -0,0 +1,35 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
Distribution=opensuse
|
||||
|
||||
[Content]
|
||||
Packages=
|
||||
fuse
|
||||
glibc-32bit
|
||||
libasound2
|
||||
libcap-ng0
|
||||
libcap2
|
||||
libelf1
|
||||
libmnl0
|
||||
libnuma1
|
||||
libpopt0
|
||||
|
||||
BuildPackages=
|
||||
alsa-devel
|
||||
dwarves
|
||||
fuse-devel
|
||||
gcc-32bit
|
||||
glibc-devel-32bit
|
||||
glibc-devel-static-32bit
|
||||
glibc-static
|
||||
libcap-devel
|
||||
libcap-ng-dev
|
||||
libelf-devel
|
||||
liblz4-dev
|
||||
libmnl-dev
|
||||
libnuma-devel
|
||||
pcre-devel
|
||||
popt-devel
|
||||
python3-docutils
|
||||
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
PathExists=mkosi.kernel/
|
||||
|
||||
[Content]
|
||||
BuildSources=./
|
||||
BuildPackages=
|
||||
bc
|
||||
binutils
|
||||
bison
|
||||
clang
|
||||
flex
|
||||
gcc
|
||||
lld
|
||||
llvm
|
||||
make
|
||||
make
|
||||
rsync
|
||||
tar
|
||||
@@ -73,3 +73,10 @@ fi
|
||||
|
||||
# Let tmpfiles.d/systemd-resolve.conf handle the symlink
|
||||
rm -f /etc/resolv.conf
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
|
||||
alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
alternatives --set python3 /usr/bin/python3.9
|
||||
fi
|
||||
Reference in New Issue
Block a user