]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
3 years agoMake sure --source-file-transfer-final works without a build script 941/head
Daan De Meyer [Tue, 29 Mar 2022 14:32:58 +0000 (16:32 +0200)] 
Make sure --source-file-transfer-final works without a build script

3 years agocentos: Rebuild the rpm db in bdb format on older centos releases
Daan De Meyer [Tue, 29 Mar 2022 14:30:16 +0000 (16:30 +0200)] 
centos: Rebuild the rpm db in bdb format on older centos releases

When building centos stream 8 images from Fedora, the resulting rpmdb
in the image is written in the sqlite format. The rpm version available
in centos stream 8 only supports reading the sqlite format but not writing
to it, which effectively makes installing rpm packages in the resulting
image impossible.

As a temporary workaround, we run rpm --rebuilddb inside the image to rebuild
the db in the older bdb format. Ideally we'd use the rpm from the host for this
but rpm has removed bdb support in newer versions so this isn't possible.

Luckily, we can remove this hack once we remove support for centos stream 8
and lower.

3 years agoMerge pull request #939 from behrmann/envrefactor
Daan De Meyer [Mon, 28 Mar 2022 08:58:20 +0000 (10:58 +0200)] 
Merge pull request #939 from behrmann/envrefactor

Make MkosiArgs.environment a dictionary

3 years agomake MkosiArgs.environment a dictionary 939/head
Joerg Behrmann [Sat, 26 Mar 2022 15:09:49 +0000 (16:09 +0100)] 
make MkosiArgs.environment a dictionary

3 years agorelax accepted types for run_work_space command
Joerg Behrmann [Sat, 26 Mar 2022 15:04:16 +0000 (16:04 +0100)] 
relax accepted types for run_work_space command

3 years agoAdd missing environments to prepare und postinst scripts 938/head
Joerg Behrmann [Sat, 26 Mar 2022 13:41:43 +0000 (14:41 +0100)] 
Add missing environments to prepare und postinst scripts

Fixes: #937
3 years agoci: Add back shellcheck
Daan De Meyer [Fri, 25 Mar 2022 12:18:15 +0000 (13:18 +0100)] 
ci: Add back shellcheck

Turns out the globbing wasn't done quite right. Fixed the globbing
so it applies to all shell scripts in the mkosi repository.

3 years agoci: Remove shellcheck step
Daan De Meyer [Fri, 25 Mar 2022 11:50:15 +0000 (12:50 +0100)] 
ci: Remove shellcheck step

We don't have any scripts to check anymore.

3 years agoMerge pull request #923 from DaanDeMeyer/remove-dracut-uki-script
Daan De Meyer [Fri, 25 Mar 2022 10:46:35 +0000 (11:46 +0100)] 
Merge pull request #923 from DaanDeMeyer/remove-dracut-uki-script

Remove dracut unified kernel image kernel-install script

3 years agoReplace dracut unified kernel image kernel-install script with objcopy 923/head
Daan De Meyer [Sat, 5 Mar 2022 15:51:21 +0000 (15:51 +0000)] 
Replace dracut unified kernel image kernel-install script with objcopy

When using objcopy, we can generate the initrd in the install phase
which is cached which speeds up builds of incremental images. We use
objcopy from the host system to avoid having to install binutils in
all generated images.

We also call kernel-install manually in opensuse, debian and ubuntu
builds to make sure we can find an initrd image to pass to objcopy.
By calling kernel-install, we also make sure that
--without-unified-kernel-images now works for these distros as well.

3 years agoFix unreachable code mypy typing error
Daan De Meyer [Tue, 22 Mar 2022 15:39:31 +0000 (16:39 +0100)] 
Fix unreachable code mypy typing error

3 years agoMerging CI tests with MkosiMachineTest class
gsegatti [Thu, 10 Mar 2022 17:38:10 +0000 (09:38 -0800)] 
Merging CI tests with MkosiMachineTest class

- Removing the usage of the file at /tests/pexpect/boot.py
- Replacing the build/boot process ownership to the mkosi/machine.py file.
- All tests will attempt to build a MkosiMachineTestCase class and run the test functions.
- We leverage the load_args() function from __init__.py in order to replace the if's from the ci.yml file.
- If a set of options is invalid, we skip such test.
- We also define a specific exception for a invalid combination of arguments to be parsed, named "MkosiNotSupportedException".
- MkosiNotSupportedException inherits MkosiException.

3 years agoRemove uneeded "name=" from EPEL repo definition
Justin Vreeland [Thu, 3 Mar 2022 00:09:03 +0000 (16:09 -0800)] 
Remove uneeded "name=" from EPEL repo definition

setup_dnf provides name= already

Before:

CentOS-8-stream - Plus                                                                    10 kB/s | 3.0 kB     00:00
CentOS-8-stream - PowerTools                                                              19 kB/s | 4.4 kB     00:00
name=Extra Packages for Enterprise Linux 8 - x86_64                                       10 kB/s | 4.7 kB     00:00

After:

CentOS-8-stream - Plus                                                                   5.3 kB/s | 3.0 kB     00:00
CentOS-8-stream - PowerTools                                                             8.1 kB/s | 4.4 kB     00:00
Extra Packages for Enterprise Linux 8 - x86_64                                           9.4 kB/s | 4.7 kB     00:00

Signed-off-by: Justin Vreeland <vreeland.justin@gmail.com>
3 years agogentoo: add homed flag to pambase
Paymon MARANDI [Tue, 8 Mar 2022 18:30:04 +0000 (13:30 -0500)] 
gentoo: add homed flag to pambase

[`upstream bug`](https://bugs.gentoo.org/832167):
sys-apps/systemd[homed] should depend on sys-auth/pambase[homed]

3 years agoAdding "shell" verb to Machine class.
gsegatti [Mon, 7 Mar 2022 15:29:06 +0000 (07:29 -0800)] 
Adding "shell" verb to Machine class.

Summary: Adding support for running Mkosi images from within the Machine class using "shell".
- What we do here is skip booting an image whenever using such verb. Then, for running commands, we utilise run_shell_cmdline()'s to leverage systemd-nspawn.
- We also add the shell run of the current set of tests to the CI.
- We add the "--pipe" option to the cmdline utilised by run_shell_cmdline() in case future scripts use Mkosi from outside a terminal.

3 years agoCentralize usage of suppress_stacktrace() and propagate returncode
Daan De Meyer [Mon, 7 Mar 2022 19:38:49 +0000 (19:38 +0000)] 
Centralize usage of suppress_stacktrace() and propagate returncode

Let's centralize the usage of suppress_stacktrace() to run_verb()
and make sure we properly propagate the returncode of the command
that failed.

3 years agodebian: Switch default release from unstable to testing
Daan De Meyer [Fri, 4 Mar 2022 20:57:24 +0000 (20:57 +0000)] 
debian: Switch default release from unstable to testing

Unstable is a bit too bleading edge. Let's switch to testing which
is roughly 5 days behind unstable so we don't get affected by
temporary issues that make it to unstable.

3 years agoProof of concept for integration testing
gsegatti [Mon, 28 Feb 2022 14:36:43 +0000 (06:36 -0800)] 
Proof of concept for integration testing

3 years agoRunning mypy in the tests/ folder and correcting errors raised by it.
gsegatti [Tue, 1 Mar 2022 10:46:51 +0000 (02:46 -0800)] 
Running mypy in the tests/ folder and correcting errors raised by it.

3 years agoCheck /dev/kvm more thoroughly.
Joerg Behrmann [Wed, 23 Feb 2022 08:16:47 +0000 (09:16 +0100)] 
Check /dev/kvm more thoroughly.

Some CI runners, among them apparently GA, present non-working KVM
devices. Let's try to open it, to see whether we can.

Fixes: #914
3 years agoci: Remove nspawn Arch workaround
Daan De Meyer [Fri, 25 Feb 2022 10:42:34 +0000 (10:42 +0000)] 
ci: Remove nspawn Arch workaround

3 years agoAdd PowerTools repo for CentOS Stream 8
Daan De Meyer [Thu, 24 Feb 2022 14:07:30 +0000 (14:07 +0000)] 
Add PowerTools repo for CentOS Stream 8

Enables installing development related packages (e.g. meson).

3 years agoRename --network-veth to --netdev (#909)
Daan De Meyer [Wed, 23 Feb 2022 16:23:41 +0000 (16:23 +0000)] 
Rename --network-veth to --netdev (#909)

Co-authored-by: Jörg Behrmann <behrmann@physik.fu-berlin.de>
3 years agoAdding an Enum class for verb comparison across Mkosi's code.
gsegatti [Tue, 22 Feb 2022 11:05:35 +0000 (03:05 -0800)] 
Adding an Enum class for verb comparison across Mkosi's code.

3 years agoPrint sfdisk spec if sfdisk fails
Daan De Meyer [Mon, 21 Feb 2022 18:07:20 +0000 (18:07 +0000)] 
Print sfdisk spec if sfdisk fails

3 years agoInstall a more specific match when --network-veth is used (#906)
Daan De Meyer [Fri, 18 Feb 2022 10:46:26 +0000 (10:46 +0000)] 
Install a more specific match when --network-veth is used (#906)

* Install a more specific match when --network-veth is used

When doing more complicated network stuff in a QEMU VM, the network
file we install starts matching stuff it shouldn't match. Let's narrow
the match down by driver so we don't accidentally match against stuff
we don't want to match against.

Co-authored-by: Jörg Behrmann <behrmann@physik.fu-berlin.de>
3 years agoAn integration testing mvp that allows building, booting, running and shutting down...
gsegatti [Wed, 26 Jan 2022 21:29:28 +0000 (13:29 -0800)] 
An integration testing mvp that allows building, booting, running and shutting down mkosi images via pexpect.

3 years agoFix needs_build() logic
Daan De Meyer [Mon, 14 Feb 2022 14:24:14 +0000 (14:24 +0000)] 
Fix needs_build() logic

We should only check the -f option if the verb is one of the verbs
that needs a build. With the current check, we start rebuilding an
image even if the verb is "summary".

3 years agoError when trying to build an image without --bootable and run it with qemu
Daan De Meyer [Fri, 11 Feb 2022 12:12:58 +0000 (12:12 +0000)] 
Error when trying to build an image without --bootable and run it with qemu

We can only check this when we're building the image, since when we're not
building the image it's not required to pass the --bootable option in order
to be able to use the qemu verb to run it in qemu.

This also fixes needs_build() to take the args.force option into account.
This fixes usage of needs_build() before unlink_output() is called.

3 years agoMerge pull request #902 from m0gg/gentoo-bootable-fix
Jörg Behrmann [Thu, 10 Feb 2022 13:32:58 +0000 (14:32 +0100)] 
Merge pull request #902 from m0gg/gentoo-bootable-fix

Use Gentoo.EMERGE_UPDATE_OPTS to allows the package manager to uninstall blockers.

3 years agoUse Gentoo.EMERGE_UPDATE_OPTS for invoke_emerge call to install pkgs_boot 902/head
Marcel Sackermann [Wed, 9 Feb 2022 21:06:27 +0000 (22:06 +0100)] 
Use Gentoo.EMERGE_UPDATE_OPTS for invoke_emerge call to install pkgs_boot

Using Gentoo.EMERGE_UPDATE_OPTS allows for greater maintainability than directly
specifying `--update` and `--deep`.

The configured `opts` for `invoke_emerge` enable the package manager to replace
blocking packages. This is required to successfully replace
`sys-kernel/installkernel-gentoo` (which is already installed in the gentoo
stage3 tar ball) with the requested `sys-kernel/installkernel-systemd-boot`.

3 years agoci: Add python integration tests job
Daan De Meyer [Thu, 3 Feb 2022 11:38:18 +0000 (11:38 +0000)] 
ci: Add python integration tests job

To run the actual integration tests, we need to have the mkosi
action and dependencies installed. Instead of running the integration
tests as part of the unit tests job, let's add a new job for these
integration tests where we install the necessary dependencies (including
mkosi itself) and then run all tests marked with "integration" in pytest.

3 years agoAdd `--update` and `--deep` to invoke_emerge call for pkgs_boot
Marcel Sackermann [Sun, 6 Feb 2022 17:11:46 +0000 (18:11 +0100)] 
Add `--update` and `--deep` to invoke_emerge call for pkgs_boot

When generating bootable images for gentoo, the emerge call to install
pkgs_boot fails for `sys-kernel/installkernel-systemd-boot`:

```
[…]
‣   Invoking emerge(1) inside stage3
!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.

 * IMPORTANT: 9 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.
[binary  N    ] app-arch/cpio-2.12-r1-1
[binary  N    ] sys-firmware/edk2-ovmf-202105-r2-1
[binary  N    ] dev-libs/elfutils-0.186-1
[binary  N    ] sys-kernel/installkernel-systemd-boot-1-1
[binary  N    ] sys-kernel/dracut-055-r4-2
[binary  N    ] virtual/libelf-3-1
[binary  N    ] sys-kernel/gentoo-kernel-bin-5.15.19-1
[binary  N    ] virtual/dist-kernel-5.15.19-1
[blocks B     ] sys-kernel/installkernel-gentoo ("sys-kernel/installkernel-gentoo" is soft blocking sys-kernel/installkernel-systemd-boot-1)
[blocks B     ] sys-kernel/installkernel-systemd-boot ("sys-kernel/installkernel-systemd-boot" is soft blocking sys-kernel/installkernel-gentoo-3)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-kernel/installkernel-gentoo-3-1:0/0::gentoo, installed) pulled in by
    sys-kernel/installkernel-gentoo required by (sys-kernel/gentoo-kernel-bin-5.15.19-1:5.15.19/5.15.19::gentoo, binary scheduled for merge) USE="initramfs -test"

  (sys-kernel/installkernel-systemd-boot-1-1:0/0::gentoo, binary scheduled for merge) pulled inby
    sys-kernel/installkernel-systemd-boot

‣ Error: Workspace command /usr/bin/emerge sys-kernel/installkernel-systemd-boot sys-kernel/gentoo-kernel-bin sys-firmware/edk2-ovmf --buildpkg=y --usepkg=y --keep-going=y --jobs=16 --load-average=15 --nospinner --quiet-build --quiet returned non-zero exit code 1.
‣  (Unmounting Package Cache)
‣  (Unmounting image)
‣  (Detaching /dev/loop0)
```

Adding `--update` and `--deep` allows to unmerge
`sys-kernel/installkernel-gentoo` and use `sys-kernel/installkernel-systemd-boot` instead.

3 years agoMake 9-stream the default for centos and centos_epel
Davide Cavalca [Thu, 3 Feb 2022 16:05:09 +0000 (08:05 -0800)] 
Make 9-stream the default for centos and centos_epel

3 years agoMerge pull request #868 from davide125/centos
Daan De Meyer [Thu, 3 Feb 2022 14:34:54 +0000 (14:34 +0000)] 
Merge pull request #868 from davide125/centos

Add support for CentOS Stream releases

3 years agoChange parse_args() arg type from List to Sequence
Daan De Meyer [Thu, 3 Feb 2022 10:08:55 +0000 (10:08 +0000)] 
Change parse_args() arg type from List to Sequence

We don't modify the passed args so we can use Sequence as the type
instead of List.

3 years agoMake 8-stream the default for centos and centos_epel 868/head
Davide Cavalca [Wed, 8 Dec 2021 15:26:04 +0000 (07:26 -0800)] 
Make 8-stream the default for centos and centos_epel

3 years agoAdd support for CentOS Stream releases
Davide Cavalca [Tue, 7 Dec 2021 18:46:31 +0000 (10:46 -0800)] 
Add support for CentOS Stream releases

3 years agoAdding sudo to both instances where pytest appears in the CI in order to allow testin...
gsegatti [Wed, 2 Feb 2022 16:54:57 +0000 (08:54 -0800)] 
Adding sudo to both instances where pytest appears in the CI in order to allow testing when going through functions that check for root privileges.

3 years agoci: Only run integration tests when the unit tests succeed
Daan De Meyer [Tue, 1 Feb 2022 19:31:46 +0000 (19:31 +0000)] 
ci: Only run integration tests when the unit tests succeed

To make this work, we need to combine both workflows. The CI workflow
now has two jobs, the unit-test job and the integration-test job.

The integration-tests job depends on the uni-tests job so that it only
runs when the unit-tests job succeeds.

3 years ago Initial framework for testing parse_args(), load_args(). Done using pytest. 896/head
gsegatti [Thu, 20 Jan 2022 10:33:34 +0000 (02:33 -0800)] 
 Initial framework for testing parse_args(), load_args(). Done using pytest.

3 years agoPytest framework for unit testing Mkosi's methods.
gsegatti [Fri, 14 Jan 2022 10:53:12 +0000 (02:53 -0800)] 
Pytest framework for unit testing Mkosi's methods.

3 years agoRemoval of Gentoo check
gsegatti [Mon, 24 Jan 2022 12:25:00 +0000 (04:25 -0800)] 
Removal of Gentoo check
The parse_args() method has a check for whether Gentoo's modules are currently installed.
While this allows the system to fail early, it makes unit testing dependable on installing such packages.
By removing this if() we're able to test argument parsing without on any distro with no package dependance.
Additionally, system's correctness ir preserved since this same check is done later on gentoo.py

3 years agoMerge pull request #890 from DaanDeMeyer/missing-format
Jörg Behrmann [Fri, 21 Jan 2022 12:33:53 +0000 (13:33 +0100)] 
Merge pull request #890 from DaanDeMeyer/missing-format

Fix missing format string specifiers

3 years agoFix missing format string specifiers 890/head
Daan De Meyer [Fri, 21 Jan 2022 12:12:54 +0000 (12:12 +0000)] 
Fix missing format string specifiers

3 years agoAdding --machine-id option.
gsegatti [Tue, 18 Jan 2022 16:07:49 +0000 (08:07 -0800)] 
Adding --machine-id option.

Update mkosi.md

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
3 years agobuild: check for BUILD_ID/VERSION_ID before adding systemd-boot workaround
Luca Boccassi [Tue, 18 Jan 2022 00:08:54 +0000 (00:08 +0000)] 
build: check for BUILD_ID/VERSION_ID before adding systemd-boot workaround

Instead of hard-coding the debian release, which breaks booting on
testing/bookworm, check os-release to see if BUILD_ID or VERSION_ID
are actually there.

3 years agoMerge pull request #885 from gsegatti/close-osrelease
Jörg Behrmann [Mon, 17 Jan 2022 17:44:38 +0000 (18:44 +0100)] 
Merge pull request #885 from gsegatti/close-osrelease

Closing etc/os-release

3 years agoClosing the etc/os-release file, which raises a warning when conducting unit tests... 885/head
gsegatti [Mon, 17 Jan 2022 17:03:54 +0000 (09:03 -0800)] 
Closing the etc/os-release file, which raises a warning when conducting unit tests, even in read only mode.

3 years agoSupport older versions of sfdisk without "grain" support
Daan De Meyer [Mon, 3 Jan 2022 16:29:12 +0000 (08:29 -0800)] 
Support older versions of sfdisk without "grain" support

If "grain" is not available, let's fall back to the default grain
size of 1 MiB. To check if "grain" is available, let's run sfdisk
against /dev/full and try to configure the "grain" which will fail
if "grain" is not supported.

3 years agoMerge pull request #877 from DaanDeMeyer/man
Daan De Meyer [Mon, 3 Jan 2022 13:11:03 +0000 (14:11 +0100)] 
Merge pull request #877 from DaanDeMeyer/man

Docs improvements

3 years agodocs: Update examples 877/head
Daan De Meyer [Thu, 23 Dec 2021 14:56:47 +0000 (15:56 +0100)] 
docs: Update examples

Use mkosi verbs instead of direct invocations of systemd-nspawn and qemu.

3 years agoaction: Fix libsolv in combination with rpm 4.17.0
Daan De Meyer [Mon, 3 Jan 2022 10:09:09 +0000 (11:09 +0100)] 
action: Fix libsolv in combination with rpm 4.17.0

This applies the patch from https://github.com/systemd/mkosi/issues/861#issuecomment-1003624115
until the issue is fixed upstream and the fix is released.

3 years agodocs: Move supported output formats section down a little
Daan De Meyer [Thu, 23 Dec 2021 14:32:43 +0000 (15:32 +0100)] 
docs: Move supported output formats section down a little

The verbs and execution flow are likely more important info to new
users than all the supported output formats so let's reorder the
sections accordingly.

3 years agodocs: Remove Other Features section
Daan De Meyer [Thu, 23 Dec 2021 14:29:45 +0000 (15:29 +0100)] 
docs: Remove Other Features section

This just lists some very specific features that are already
documented in their respective config options. Let's remove it
so we get rid of one more section that should be updated when we
add new features.

3 years agoFix mypy redundant cast typing error
Daan De Meyer [Mon, 20 Dec 2021 13:03:57 +0000 (14:03 +0100)] 
Fix mypy redundant cast typing error

3 years agoMerge pull request #871 from DaanDeMeyer/force
Daan De Meyer [Sun, 19 Dec 2021 12:05:34 +0000 (13:05 +0100)] 
Merge pull request #871 from DaanDeMeyer/force

Various improvements

3 years agoRemove unused verity_sig and verity_sig_size from MkosiArgs 871/head
Daan De Meyer [Wed, 8 Dec 2021 15:29:51 +0000 (16:29 +0100)] 
Remove unused verity_sig and verity_sig_size from MkosiArgs

3 years agoRemove unused ran_sfdisk field from MkosiArgs
Daan De Meyer [Wed, 8 Dec 2021 15:13:26 +0000 (16:13 +0100)] 
Remove unused ran_sfdisk field from MkosiArgs

3 years agoRemove releasever from MkosiArgs
Daan De Meyer [Wed, 8 Dec 2021 15:12:17 +0000 (16:12 +0100)] 
Remove releasever from MkosiArgs

Its scope is limited to a single function so just make it a local
variable.

3 years agoRename CommandLineArguments to MkosiArgs
Daan De Meyer [Wed, 8 Dec 2021 14:45:10 +0000 (15:45 +0100)] 
Rename CommandLineArguments to MkosiArgs

CommandLineArguments is a bad name as the stuff in it can also come
from config files.

3 years agoCI: Remove ext4, xfs and gpt_squashfs jobs
Daan De Meyer [Wed, 8 Dec 2021 14:23:38 +0000 (15:23 +0100)] 
CI: Remove ext4, xfs and gpt_squashfs jobs

We're running too many CI jobs, let's disable some that are similar
to others to reduce the strain on the CI.

3 years agoMerge pull request #869 from DaanDeMeyer/fix-typing
Jörg Behrmann [Wed, 8 Dec 2021 16:15:20 +0000 (17:15 +0100)] 
Merge pull request #869 from DaanDeMeyer/fix-typing

typing: Fix typing error when calling add_signer()

3 years agoCombine args.force and args.force_count
Daan De Meyer [Wed, 8 Dec 2021 14:20:53 +0000 (15:20 +0100)] 
Combine args.force and args.force_count

args.force becomes an integer which behaves the same as a bool.
args.force_count is removed and every usage of force_count is
replaced by force.

3 years agotyping: Fix typing error when calling add_signer() 869/head
Daan De Meyer [Wed, 8 Dec 2021 11:23:12 +0000 (12:23 +0100)] 
typing: Fix typing error when calling add_signer()

The add_signer() method of PKCS7SignatureBuilder only supports a
subset of the key types returned by load_pem_private_key() so let's
make sure the loaded key is of one of the supported types to fix
the error.

3 years agoMerge pull request #865 from DaanDeMeyer/fedora-keys
Jörg Behrmann [Mon, 6 Dec 2021 16:07:38 +0000 (17:07 +0100)] 
Merge pull request #865 from DaanDeMeyer/fedora-keys

fedora: Fedora >= 35 don't use short key IDs anymore

3 years agofedora: Bump default version to 35 865/head
Daan De Meyer [Mon, 6 Dec 2021 12:57:56 +0000 (13:57 +0100)] 
fedora: Bump default version to 35

3 years agofedora: Fedora >= 35 don't use short key IDs anymore
Daan De Meyer [Mon, 6 Dec 2021 11:30:08 +0000 (12:30 +0100)] 
fedora: Fedora >= 35 don't use short key IDs anymore

3 years agoBump version numbers for v12 v12
Zbigniew Jędrzejewski-Szmek [Tue, 30 Nov 2021 08:39:26 +0000 (09:39 +0100)] 
Bump version numbers for v12

3 years agoNEWS: add entries for v12
Zbigniew Jędrzejewski-Szmek [Tue, 30 Nov 2021 08:39:09 +0000 (09:39 +0100)] 
NEWS: add entries for v12

3 years agogentoo: unmerge baselayout early on.
Paymon MARANDI [Wed, 24 Nov 2021 17:36:59 +0000 (12:36 -0500)] 
gentoo: unmerge baselayout early on.

fixes ``Couldn't find '=sys-apps/baselayout-2.7' to unmerge``

intro:
there are 2 problems that require messing with baselayout package.
both are being worked on upstream [bug1][bug2].

1. `/etc/os-release` missing `VERSION_ID` which causes KUI generated by
   dracut/installkernel et al not being accepted by the firmware/bootloader.

2. `/usr` is not merged in stage3. but `baselayout` with `"USE=build
   -split-usr"` has a usrmerge layout.

[bug1] is fixed but that fix hasn't made it into the release.
[bug2] has 6 blocking bugs as of this writing.

we merge baselayout before copying stage3 tree over into `root` so the
usrmerge layout is in place.

source of the problem:
hard-coded baselayout version, "-2.7", was the source of the problem
which was inevitable to cause problem once upstream bumped the version
of baselayout they ship with stage3.

in the old logic we removed baselayout by hand during fetch_fix_stage3()
by removing members of baselaouy_qlist array from stage3 before copying
stage3 tree into `root`. this would cause the root to have two "slots"
of baselayout installed which the call to `emerge(1)` in `update_stage3`
would try to fix by removing the *bad* slot (=sys-apps/baselayout-2.7).

the new logic simply unmerges stage3's baselayout during
fetch_fix_stage3() using emerge(1).

[bug1]: https://bugs.gentoo.org/788190
[bug2]: https://bugs.gentoo.org/690294

Signed-off-by: Paymon MARANDI <darwinskernel@gmail.com>
3 years agoMerge pull request #860 from bluca/lintian
Daan De Meyer [Thu, 25 Nov 2021 09:41:30 +0000 (10:41 +0100)] 
Merge pull request #860 from bluca/lintian

Fix some Lintian warnings

3 years agoresources: add +x to bash scripts 860/head
Luca Boccassi [Wed, 24 Nov 2021 19:44:40 +0000 (19:44 +0000)] 
resources: add +x to bash scripts

3 years agomkosi: fix typos found by Lintian
Luca Boccassi [Wed, 24 Nov 2021 19:44:10 +0000 (19:44 +0000)] 
mkosi: fix typos found by Lintian

3 years agoNEWS: c11 is actually released now, fix the NEWS entry post-tag
Lennart Poettering [Wed, 24 Nov 2021 17:51:23 +0000 (18:51 +0100)] 
NEWS: c11 is actually released now, fix the NEWS entry post-tag

3 years agoBump version numbers for v11 v11
Zbigniew Jędrzejewski-Szmek [Wed, 24 Nov 2021 15:10:05 +0000 (16:10 +0100)] 
Bump version numbers for v11

3 years agoman: rebuild the man page
Zbigniew Jędrzejewski-Szmek [Wed, 24 Nov 2021 15:10:02 +0000 (16:10 +0100)] 
man: rebuild the man page

3 years agotools/do-a-release: rebuild the man page in a separate commit
Zbigniew Jędrzejewski-Szmek [Wed, 24 Nov 2021 15:06:53 +0000 (16:06 +0100)] 
tools/do-a-release: rebuild the man page in a separate commit

Otherwise the interesting changes are hidden behind a very long diff of
generated output.

3 years agoImport updated GPT partition UUID list from systemd
Daan De Meyer [Tue, 23 Nov 2021 12:22:56 +0000 (13:22 +0100)] 
Import updated GPT partition UUID list from systemd

Source: https://github.com/systemd/systemd/blob/244cab4a651d4a5b5d9f0275ef59b8273418ee51/src/shared/gpt.h

3 years agoNEWS: add entries for v11
Zbigniew Jędrzejewski-Szmek [Tue, 23 Nov 2021 17:01:44 +0000 (18:01 +0100)] 
NEWS: add entries for v11

3 years agoSet loglevel to something sane when --qemu-headless is set
Daan De Meyer [Fri, 12 Nov 2021 16:23:42 +0000 (16:23 +0000)] 
Set loglevel to something sane when --qemu-headless is set

Avoids spamming the console with kernel messages when using
--qemu-headless.

3 years agoci: Cancel in-progress jobs when new changes are pushed
Daan De Meyer [Wed, 10 Nov 2021 16:23:56 +0000 (16:23 +0000)] 
ci: Cancel in-progress jobs when new changes are pushed

Copied from https://github.com/systemd/systemd/pull/21293.

3 years agoAdd StandardOutput=tty to getty resources
Daan De Meyer [Wed, 10 Nov 2021 11:17:18 +0000 (11:17 +0000)] 
Add StandardOutput=tty to getty resources

Forgot to add these in #848.

3 years agoSet new TTYRows and TTYColumns properties when overriding getty units
Daan De Meyer [Wed, 27 Oct 2021 21:49:32 +0000 (22:49 +0100)] 
Set new TTYRows and TTYColumns properties when overriding getty units

Sometimes, it's not sufficient to set the LINES and COLUMNS environment
variables to configure the serial terminal size. To properly configure
the serial terminal size when the env variables are not sufficient, we
need to configure the tty size in the kernel as well. To accomplish this,
two new properties TTYRows and TTYCols were added to systemd. Let's set
these properties when we override the getty units so systemd properly
configures the kernel tty size for us when systemd's version is recent
enough.

Additionally, this commit updates the getty unit resources to include
the recent systemd change to how the TTY is passed to agetty. Without
this change, the tty size configured with TTYRows and TTYCols is reset
when systemd invokes agetty. See https://github.com/systemd/systemd/pull/21171
for more information.

3 years agoMerge pull request #850 from bluca/ssh_debian
Zbigniew Jędrzejewski-Szmek [Fri, 5 Nov 2021 13:54:05 +0000 (14:54 +0100)] 
Merge pull request #850 from bluca/ssh_debian

ssh: add agent-socket and port parameters

3 years agossh: do not print warning if networkd is not running on the host 850/head
Luca Boccassi [Tue, 2 Nov 2021 19:38:41 +0000 (19:38 +0000)] 
ssh: do not print warning if networkd is not running on the host

Tools like VSCode can use 'mkosi ssh' but use pexpect, so don't print
these warnings as it will break them.

3 years agossh: add port parameter
Luca Boccassi [Tue, 2 Nov 2021 01:18:58 +0000 (01:18 +0000)] 
ssh: add port parameter

When NetworkVeth is disabled, allow to simply connect on localhost:.

3 years agossh: optionally connect to ssh-agent
Luca Boccassi [Mon, 1 Nov 2021 23:38:37 +0000 (23:38 +0000)] 
ssh: optionally connect to ssh-agent

If a path to the ssh-agent socket (typically /run/user/1000/gnupg/S.gpg-agent.ssh) is passed,
connect to it to fetch the public key(s) with ssh-add -L and avoid passing
the key(s) manually to ssh.

3 years agodebian: do not try to enable resolved if systemd is not in the package list
Luca Boccassi [Tue, 2 Nov 2021 14:22:55 +0000 (14:22 +0000)] 
debian: do not try to enable resolved if systemd is not in the package list

It will not be installed, so it will fail

3 years agoFix --base-image and --base-packages combination
Luca Boccassi [Thu, 4 Nov 2021 12:59:33 +0000 (12:59 +0000)] 
Fix --base-image and --base-packages combination

args.base_packages defaults to 'True', so it's never 'None', so this
check was always false. Remove it.

3 years agossh: enable ssh.socket on Debian/Ubuntu
Luca Boccassi [Mon, 1 Nov 2021 23:32:20 +0000 (23:32 +0000)] 
ssh: enable ssh.socket on Debian/Ubuntu

On Debian/Ubuntu there's a socket plus templated service for the ssh
server, which works much more nicely than the fixed one. Use it.

3 years agomkosi: add utility functions to create unit dropin configs
Joerg Behrmann [Thu, 4 Nov 2021 13:37:14 +0000 (14:37 +0100)] 
mkosi: add utility functions to create unit dropin configs

3 years agomanifest: record the architecture field separately
Luca Boccassi [Thu, 4 Nov 2021 00:28:06 +0000 (00:28 +0000)] 
manifest: record the architecture field separately

We recently split this out in https://systemd.io/COREDUMP_PACKAGE_METADATA/
and the package-notes tooling, so split it out here too.

3 years agoRemove check=True argument from calls to run()
Daan De Meyer [Tue, 2 Nov 2021 12:27:26 +0000 (12:27 +0000)] 
Remove check=True argument from calls to run()

check=True is the default for our version of run() so let's not pass
check=True explicitly anywhere whenever we call run().

3 years agoMerge pull request #841 from bluca/manifest_debian
Daan De Meyer [Tue, 2 Nov 2021 14:37:07 +0000 (14:37 +0000)] 
Merge pull request #841 from bluca/manifest_debian

manifest: add support for deb distros

3 years agoCall flush() in a few more places
Daan De Meyer [Sun, 31 Oct 2021 21:01:28 +0000 (21:01 +0000)] 
Call flush() in a few more places

Since we never explicitly close these files, sometimes the stuff
we write to them doesn't seem to get flushed which causes the
files to be empty in the output directory. Add calls to flush()
to make sure the files aren't empty when mkosi finishes.

3 years agomanifest: add support for deb distros 841/head
Luca Boccassi [Sat, 16 Oct 2021 20:39:41 +0000 (21:39 +0100)] 
manifest: add support for deb distros

Use 'dpkg-query' and 'apt-get changelog' to get metadata and changelogs

3 years agobackend: optionally capture output with run_workspace_command
Luca Boccassi [Sun, 24 Oct 2021 16:40:22 +0000 (17:40 +0100)] 
backend: optionally capture output with run_workspace_command

3 years agogentoo: support gentoo (#717)
Paymon MARANDI [Thu, 21 Oct 2021 09:51:13 +0000 (05:51 -0400)] 
gentoo: support gentoo (#717)

Flow is the following:

we fetch stage3, untar it into the image's root and run emerge(1) from
within that root tree.

we _append_ our configurations to /etc/portage/env/mkosi.conf users
should not use that file since it, to some extend, documents what was
done during the image creation. users could instead drop-in their conf
file under mkosi.skeleton/etc/portage/env/ (say user.conf) and a pointer
under package.env/ (say user) with:
*/* user.conf

profile:
for now we only support 17.1/no-multilib; arm64 support is on the
roadmap.

3 years agoRevert "gentoo: support gentoo (#717)"
Zbigniew Jędrzejewski-Szmek [Thu, 21 Oct 2021 19:31:58 +0000 (21:31 +0200)] 
Revert "gentoo: support gentoo (#717)"

This reverts commit c4243b5b72c9f7ba08d3644586e49d2bbc0f8457.

The authorship was wrong.