1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
Daan De Meyer
56e6bf9e04 mkosi: Install selinux tools in main image instead of initramfs
Also install setools-console and policycoreutils instead of setools
which pulls in the kitchen sink. Also install selinux-policy-targeted
to make sure the right policy is installed.
2024-04-03 20:09:04 +02:00
Daan De Meyer
5ed030a7ac mkosi: Install git-core where possible
This avoids pulling in the perl kitchen sink.
2024-04-03 20:09:04 +02:00
Daan De Meyer
42e2ec23f4 mkosi: Use '-' instead of '.' to separate upstream version and debian revision
The debian revision starts after the '-' character, so make sure the
timestamp we append is treated as the revision instead of being a part
of the upstream version.
2024-04-02 12:31:34 +02:00
Daan De Meyer
e5cd051724 mkosi: Switch to linux-virtual on Ubuntu
This now finally has support for credentials and erofs so let's switch
to this much smaller kernel package that doesn't pull in linux-firmware.
2024-03-29 15:58:13 +01:00
Daan De Meyer
5524d2838c mkosi: Copy built packages to output directory
This allows the built packages to be inspected if needed, or installed
on the host system for anyone who's daring enough to do so.
2024-03-27 16:14:17 +01:00
Daan De Meyer
0a6bf709dd mkosi: Specify --without docs if needed for fedora/centos 2024-03-27 13:00:11 +01:00
Daan De Meyer
6327988d65 mkosi: Merge base and system images
The only reason to have these split up is to be able to build extension
images that use the base image as a base tree and install extra packages.
Until we have such a use case, let's merge the base and system images to
simplify things a bit.

We keep the mkosi.images/ directory to not cause too many conflicts with
the integration tests PR.
2024-03-27 12:20:50 +01:00
Richard Maw
23a617fd8a mkosi: Add selinux support to CentOS and Fedora initrds
The base initrd is also used by the system image
so selinux should be there even if not enabled by the base image.
2024-03-25 15:51:16 +00:00
Richard Maw
10ac38ddd3 mkosi: Remove testuser from base/mkosi.postinst.chroot
The testuser user is only needed for integration tests,
which are used in the system user and this config
can be provided as drop-ins instead of inline in postinst scripts.
2024-03-25 15:51:16 +00:00
Daan De Meyer
b21d56e82c mkosi: Use new environment variables for Arch
These were changed to be prefixed with _systemd_ so let's account
for that.
2024-03-25 12:06:50 +00:00
Daan De Meyer
d0327823d8 mkosi: Switch to Arch Linux packaging sources main branch
https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/merge_requests/8
was merged so let's switch branches to the main branch.
2024-03-22 16:51:37 +01:00
Daan De Meyer
97b191c49b mkosi: Disable debug package generation on Arch Linux
This is extremely slow since the latest pacman release, and since
we don't strip binaries, not really needed either.
2024-03-22 16:49:10 +01:00
Daan De Meyer
2d0b8e9fb6 mkosi: Make sure man and man-db are installed everywhere 2024-03-22 15:12:20 +01:00
Daan De Meyer
a1eeb4d753 mkosi: Install systemd-experimental in OpenSUSE initrd
systemd-repart is part of systemd-experimental and we need systemd-repart
in the initrd so let's install systemd-experimental in the initrd.
2024-03-18 16:20:15 +01:00
Daan De Meyer
bd9bec99d0 mkosi: Install python3-pefile in OpenSUSE image
ukify is part of systemd-experimental on OpenSUSE and not its own
package. Because the OpenSUSE systemd maintainers do not want to
introduce a python dependency for systemd-experimental, we have to
install python3-pefile manually to make sure ukify works properly.
2024-03-18 16:20:00 +01:00
Daan De Meyer
d1c29b517a mkosi: Allow booting without secure boot
Don't fail if SecureBoot is not enabled. Instead, only execute
the secure boot related checks if secure boot is actually enabled.
2024-03-13 23:42:34 +01:00
Daan De Meyer
37bd860c22 mkosi: Introduce packaging sources as submodules
By always cloning the latest branch commit, we can't bisect properly
using mkosi as when bisecting wildly different packaging sources will
be used compared to when the commit was merged. By using submodules, we
track individual commits which means when bisecting the same packaging
sources will be used.

We use git submodules as dependabot has support for automatically making
PRs to update git submodules. This commit also includes the necessary
dependabot configuration to enable this.

We make ubuntu/debian use the same submodule instead of adding the debian
packaging sources twice by introducing a new $PKG_SUBDIR environment variable
and using it instead of $DISTRIBUTION.
2024-03-13 12:07:49 +01:00
Daan De Meyer
d008a9cfad mkosi: Remove some leftover shell debugging 2024-03-13 12:07:09 +01:00
Daan De Meyer
4cc17467a1 mkosi: Use same pkg/ subdirectory for debian and ubuntu
Instead of cloning the same repository twice, let's make sure we
use the same directory for both debian/ubuntu.
2024-03-13 12:07:09 +01:00
Yu Watanabe
1d87a00a95 mkosi: fix typo
Follow-up for 4d0f1451b5.
2024-03-10 14:09:41 +09:00
Yu Watanabe
17be4d7b98 mkosi: fix typo
Follow-up for 4d0f1451b5.
2024-03-08 18:17:37 +01:00
Daan De Meyer
4d0f1451b5 Build distribution packages in mkosi
Instead of running meson install and hoping for the best, let's build
distribution packages from the downstream packaging specs. This gets
us the following:

- Vastly simplified mkosi scripts since we don't need a separate initrd
  image anymore but can just reuse the default mkosi initrd.
- Almost everything can move to the base image as its not the basis
  anymore for the initrd and as such we don't need to care about the
  size anymore.
- The systemd packages that get pulled in as dependencies of other
  packages get properly uninstalled and replaced with our packages that
  we built instead of just installing on top of an existing systemd
  installation with no guarantee that everything from that previous
  installation was removed.
- Much better testing coverage as what we're testing is much closer
  to what will actually be deployed in distributions.
- Immediate feedback if something we change breaks distribution packaging
- We get integration with the distribution for free as we'll automatically
  use the proper directories and such instead of having to hack this
  into a mkosi build script.
- ...
2024-03-07 10:47:19 +01:00
Daan De Meyer
bb478caa86 mkosi: Use specifier to refer to the output directory
Otherwise the output directory cannot be configured by users.
2024-03-05 19:42:18 +01:00
Frantisek Sumsal
e86b1a9b0f mkosi: make shellcheck happy 2024-03-05 12:41:30 +01:00
Frantisek Sumsal
193fa9d7fe Revert "mkosi: Don't fail on systemd-vconsole-setup.service failure for now"
This doesn't seem to fail anymore.

This reverts commit 84c7929cd4.
2024-03-05 12:18:40 +01:00
Frantisek Sumsal
d9c8cf40b5 Revert "mkosi: Disable cmdline addon test for now"
Let's see if this finally works.

This reverts commit e167a8283d.
2024-03-05 12:16:44 +01:00
Frantisek Sumsal
374fa8e853 mkosi: fix UKI addons test
The test hasn't been working for a while, since there's no /efi or /boot
in $DESTDIR.

Resolves: #31618
2024-03-05 12:16:44 +01:00
Daan De Meyer
317cb6f9b5 Install pacman in Arch Linux image
We install apt and dnf in the other images as well, so lets be
consistent and install pacman in the Arch image as well.
2024-02-09 12:41:54 +00:00
Daan De Meyer
dce5d31c75 mkosi: Stop using file provides with CentOS/Fedora
dnf5 does not download filelists metadata by default anymore as this
consists of a pretty big chunk of the repository metadata. Let's make
sure the filelists metadata doesn't have to be downloaded by dnf5 by
removing any usage of file provides from our package lists.
2024-01-31 09:50:54 +01:00
Daan De Meyer
868c3a71d7 mkosi: Use --auto-features=enabled for meson 2024-01-26 00:12:57 +01:00
Daan De Meyer
b6e8d086bd mkosi: Fix formatting in build script 2024-01-25 19:06:06 +01:00
Lennart Poettering
b68f4cade4 dissect: add --make-archive option to convert DDI to tarball 2024-01-25 18:47:39 +01:00
Luca Boccassi
d6bf9b612c mkosi: install libip4tc2 in debian/ubuntu
It's now a dlopen library and it is installed at build time via
libiptc-dev, but was never added to the running image.

Follow-up for 5b5f8f8b9a
2024-01-24 19:58:07 +00:00
Daan De Meyer
166bcaf95f mkosi: Use authselect local profile if it exists
authselect 1.5.0 removed the "minimal" profile and added the "local"
profile instead. Let's modify our post-installation script to take
these changes into account.
2024-01-22 11:42:52 +00:00
Daan De Meyer
52842bb2c5 mkosi: Build a directory image by default
Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```
2024-01-12 16:19:48 +01:00
Lennart Poettering
78cdb9b50a mkosi: also add ssh client, to make it easier to test ssh logins via AF_UNIX/AF_VSOCK 2024-01-11 16:05:20 +01:00
Daan De Meyer
8c018edb0a mkosi: Update to latest
The mkosi github action doesn't set up the host machine for building
full images anymore. Instead, only sufficient packages are installed
to be able to build tools trees so we configure a fedora tools tree
to build the actual images.
2024-01-09 14:58:34 +00:00
Lennart Poettering
b0936baf11 mkosi: don't turn off installation of our PAM snippets
Otherwise we don't get the new PAM snippet for the uid0 PAM stack
installed.
2023-12-21 19:14:43 +01:00
Daan De Meyer
53ea4d7a47 mkosi: Add strace and gdb to base image build packages
For debugging failing tests in combination with mkosi's --debug-shell.
2023-12-19 15:59:16 +01:00
Frantisek Sumsal
97e52d62fb Revert "mkosi: pin CentOS8 kernel to working version"
A fixed kernel finally landed on mirrors, so let's revert the C8S kernel
pin.

This reverts commit a64398b2ca.
2023-12-19 12:48:55 +00:00
Richard Maw
566f1000d1 mkosi: make sysvinit path inference consistent
The integration tests use /etc/rc.d/init.d if it exists
or falls back to /etc/init.d,
while the mkosi.build.chroot script dereferenced /etc/init.d.

This produces inconsistent results, as sometimes an image can be made
that has systemd built to expect /etc/init.d but /etc/rc.d/init.d
also exists.
2023-12-14 16:26:23 +00:00
Richard Maw
e07bbb8290 mkosi: Install locales in fedora
locale files are not generated on-demand in Fedora like they are in
Debian-like systems and are typically installed from package instead.

This is necessary for the locale tests,
which expect en_US.UTF-8 to be available.
2023-12-14 16:26:23 +00:00
Richard Maw
0947748555 mkosi: Add testuser and tar to system image
The integration tests are installed into the image
with the intention that it should be possible to run those tests,
but those tests require the named user testuser
and tar is needed for machined-import
2023-12-13 17:55:46 +00:00
Daan De Meyer
e0e523ea7f mkosi: Copy /boot into the ESP as well
Newer mkosi will start installing UKIs to /boot so prepare for that
by making sure we also copy /boot into the ESP.
2023-12-10 21:47:10 +01:00
Daan De Meyer
6ee9467d4c mkosi: Update comment why we can't use linux-kvm yet 2023-12-04 11:16:52 +01:00
Daan De Meyer
c417615c12 mkosi: Drop building custom kernel logic
Now that mkosi-kernel is a thing, this logic in systemd is just mostly
bitrotting since I just use mkosi-kernel these days. If I ever need to
hack on systemd and the kernel in tandem, I'll just add support for
building systemd to mkosi-kernel instead, so let's drop the support for
building a custom kernel in systemd's mkosi configuration.
2023-11-29 15:00:34 +00:00
Daan De Meyer
5fae156103 mkosi: Install integritysetup on CentOS/Fedora
Required for running integration tests
2023-11-29 10:54:18 +01:00
Daan De Meyer
a64398b2ca mkosi: pin CentOS8 kernel to working version
Newer kernels are affected by a regression that causes a kernel panic
on boot when using cgroupv2, so pin them for now. Can be reverted once
that problem is fixed.
2023-11-28 23:19:44 +01:00
Daan De Meyer
bcb335ac68 Update to mkosi v19
- Use mkosi.images/ instead of mkosi.presets/
- Use the .chroot suffix to run scripts in the image
- Use BuildSources= match for the kernel build
- Move 10-systemd.conf to mkosi.conf and rely on mkosi.local.conf
  for local configuration
2023-11-28 19:54:58 +01:00