]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
6 years agoci: add simple script for running CI tests in semaphore 286/head
Lennart Poettering [Sun, 11 Nov 2018 20:05:43 +0000 (21:05 +0100)] 
ci: add simple script for running CI tests in semaphore

For now, it just builds an Ubuntu image

6 years agomkosi: use debootstrap's --merged-usr switch only if supported
Lennart Poettering [Sun, 11 Nov 2018 20:04:22 +0000 (21:04 +0100)] 
mkosi: use debootstrap's --merged-usr switch only if supported

This allows us to run mkosi on Semaphore, which only provides us with
Ubuntu 16.04 as newest release, where this swich isn't known yet.

6 years agoBump required Python version everywhere
Lucas Werkmeister [Sat, 10 Nov 2018 11:43:01 +0000 (12:43 +0100)] 
Bump required Python version everywhere

The required Python version was bumped to 3.6 in e965e58a3f (because we
now use f-strings), but README.md and setup.py weren’t updated.

6 years agoMerge pull request #283 from keszybz/f-strings
Lennart Poettering [Tue, 6 Nov 2018 21:53:14 +0000 (00:53 +0300)] 
Merge pull request #283 from keszybz/f-strings

Use f-strings and some minor cleanups

6 years agoBump required python version to 3.6 283/head
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 21:44:35 +0000 (22:44 +0100)] 
Bump required python version to 3.6

f-strings are a syntax error with older versions anyway, but let's bump
the version string for any human readers.

6 years agoAdd mkosi.py as symlink to mkosi
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 16:52:49 +0000 (17:52 +0100)] 
Add mkosi.py as symlink to mkosi

This is useful during development to allow 'import mkosi', for
example to test import functions and such. In the future it'll also
be useful if we grow any unittests.

6 years agoUse f-strings
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 16:35:26 +0000 (17:35 +0100)] 
Use f-strings

I kept or switched to .format in a few places where the arguments were
more complicated.

6 years agoRemove left-over debug statement
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 16:14:19 +0000 (17:14 +0100)] 
Remove left-over debug statement

6 years agoFix arch reference in error message
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 16:08:03 +0000 (17:08 +0100)] 
Fix arch reference in error message

6 years agoMerge pull request #281 from keszybz/snap-support
Lennart Poettering [Tue, 6 Nov 2018 16:20:22 +0000 (19:20 +0300)] 
Merge pull request #281 from keszybz/snap-support

Missing bits to allow snaps to be generated using mkosi

6 years agoMerge pull request #282 from lucasdemarchi/tip-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 15:59:09 +0000 (16:59 +0100)] 
Merge pull request #282 from lucasdemarchi/tip-fixes

Fixes for latest merges

6 years agoCall 'mkosi.finalize' script 281/head
Zbigniew Jędrzejewski-Szmek [Sun, 4 Nov 2018 13:17:55 +0000 (14:17 +0100)] 
Call 'mkosi.finalize' script

This is similar to 'mkosi.postinst', but is called in the host. This
makes it much easier to copy-in files. It is also much quicker when
creating images for a foreign architecture.

v2:
- s/postinst2/finalize/g
- call the script first with "build" too
- pass the root directory as $BUILDROOT (like rpmbuild) and not as
  a positional argument. (This is easier to consume for scripts and
  also easier to extend with additional variables in the future.)
- update to use args_find_path()

6 years agoAllow forcing the installation architecture
Zbigniew Jędrzejewski-Szmek [Thu, 25 Oct 2018 16:05:05 +0000 (18:05 +0200)] 
Allow forcing the installation architecture

v2:
- s/arch/architecture/g
- add an optional line in the status output

6 years agoMake mksquashfs args configurable
Zbigniew Jędrzejewski-Szmek [Mon, 22 Oct 2018 07:42:41 +0000 (09:42 +0200)] 
Make mksquashfs args configurable

For example, snaps have to be generated with "-noappend -no-xattrs
-no-fragments -comp xz". The last argument is configurable through
Compress=xz, but the other ones weren't so far. Let's just override the
mksquashfs executable. To be nice and flexible, 'mkosi.mksquashfs-tool'
will be autodetected. It may be also specified explicitly:

  [Output]
  Mksquashfs=/some/special/mksquashfs

If specfied explicitly, an argument list may be included:

  [Output]
  Mksquashfs=mksquashfs -noappend -no-xattrs -no-fragments

When args are present, they replace "-noappend" that we add by default.
The arguments for compression (-comp xx) is always added if configured
by Compress=. This makes the two settings orthogonal.

6 years agoUse a common helper function to discover paths
Zbigniew Jędrzejewski-Szmek [Tue, 6 Nov 2018 12:02:51 +0000 (13:02 +0100)] 
Use a common helper function to discover paths

This is actually more readable because the variable name definitions
and paths are defined at one place and not spread over all the itty
bitty functions.

I used '' for the variable names and "" for paths. I think that makes
the two types of arguments a bit more distinguishable.

6 years agoFix wrong type to link_output 282/head
Lucas De Marchi [Tue, 6 Nov 2018 08:25:36 +0000 (00:25 -0800)] 
Fix wrong type to link_output

$ sudo mkosi --default /dev/null -d fedora -r 29 -t directory -p dnf
...
Traceback (most recent call last):
  File "/bin/mkosi", line 3959, in <module>
    main()
  File "/bin/mkosi", line 3949, in main
    build_stuff(args)
  File "/bin/mkosi", line 3809, in build_stuff
    link_output(args, workspace, raw or tar)
  File "/bin/mkosi", line 2478, in link_output
    os.rename(os.path.join(workspace, "root"), args.output)
  File "/usr/lib64/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not TemporaryDirectory

6 years agoFix broken bootable images
Lucas De Marchi [Mon, 5 Nov 2018 22:13:35 +0000 (14:13 -0800)] 
Fix broken bootable images

We need to bring in systemd-udev to the packages list if the image is
bootable, not if we are going to run the build script.

$ sudo mkosi -d fedora -r 29 -t raw_ext4 -b
...
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/mkosi-a9r063jq/root/usr/lib/systemd/boot/efi/systemd-bootx64.efi'

This could maybe be in make_rpm_list(), but the packages names for
Mageia are different than the ones for Centos/Fedora.

6 years agoRevert "Remove now-redundant check if partno is None"
Lucas De Marchi [Mon, 5 Nov 2018 22:14:04 +0000 (14:14 -0800)] 
Revert "Remove now-redundant check if partno is None"

This reverts commit 13052e658e95c5913bc11c9398faf24e60143d88.

luks_setup_all() depends on this function returning None in case
partno is None. Fixing it in the caller overly complicates it.
Let's fix the breakage and maybe later rework the code.

$ sudo mkosi -d fedora -r 29 -t raw_ext4 -b
...
subprocess.CalledProcessError: Command '['mkfs.ext4', '-L', 'home', '-M', '/home', '/dev/loop0pNone']' returned non-zero exit status 1.

To avoid the mistake again, annotate partno parameter as being
optional.

6 years agoMerge pull request #275 from keszybz/squashfs
Lennart Poettering [Sat, 3 Nov 2018 08:22:16 +0000 (11:22 +0300)] 
Merge pull request #275 from keszybz/squashfs

Plain squashfs image output and making final images leaner

6 years agogitignore: add password file and mypy cache 275/head
Zbigniew Jędrzejewski-Szmek [Wed, 31 Oct 2018 16:45:56 +0000 (17:45 +0100)] 
gitignore: add password file and mypy cache

6 years agodnf: use a shorter form for nodocs
Zbigniew Jędrzejewski-Szmek [Thu, 25 Oct 2018 15:55:46 +0000 (17:55 +0200)] 
dnf: use a shorter form for nodocs

6 years agofedora/centos: do no install systemd and passwd by default
Zbigniew Jędrzejewski-Szmek [Mon, 22 Oct 2018 09:51:36 +0000 (11:51 +0200)] 
fedora/centos: do no install systemd and passwd by default

There is no reason to require passwd to be installed. Depending on
what the image is used for, user logins through with traditional
authentication might be completely unnecessary. Similarly, systemd is
only useful when the image is to be booted (under qemu or as a
container). But when args.bootable is true, systemd-udev will pull in
systemd anyway. So let's just reduce the packages we always pull in to
the minimum that defines each distro. Any additional packages should
be pulled in through the project configuration.

6 years agoRemove yum/dnf/rpm metadata after installation
Zbigniew Jędrzejewski-Szmek [Mon, 22 Oct 2018 09:13:23 +0000 (11:13 +0200)] 
Remove yum/dnf/rpm metadata after installation

Dnf data is removed if dnf is not installed into the image, and similarly
for the other tools.

I didn't implement this functionality for Debian/Ubuntu/Arch, because I
don't know enough about those distros, but is should be easy to add.

The arguments that are passwd to build_image() and friends are made
keyword-only. There's now three arguments, and this way there's less
chance of mistake.

v2:
- When deciding whether to keep dnf or rpm data, check if path exists

Checking if the dnf/rpm packages are in the requested list is nice,
but inadequate. For example, somebody could specifyg a @group or just
another package that pulls those in. Checking if the executables are
present in the image would work in those cases too.

6 years agoRework how dnf/yum package list is generated
Zbigniew Jędrzejewski-Szmek [Mon, 22 Oct 2018 08:18:44 +0000 (10:18 +0200)] 
Rework how dnf/yum package list is generated

Two obvious bugs are fixed:
- boot_packages were always used, because run_build_script was used in a
conditional, but this name wasn't a local variable but the global function, so
it was always true ('run_build_script=True|False' wasn't passed down properly
to invoke_yum()/invoke_dnf()).
- in invoke_yum() xfsprogs wasn't added like in install_dnf().

Generating the list of packages first instead of interleaving that with
other args seems cleaner and easier to debug. The code to do that is now
shared between yum and dnf.

6 years agoRemove empty line at the beggining of functions
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 18:01:28 +0000 (20:01 +0200)] 
Remove empty line at the beggining of functions

Some functions had it, without any apparent pattern. Normal Python
coding style does not include this.

6 years agoWith --shell, pass --read-only through to systemd-nspawn
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 17:32:24 +0000 (19:32 +0200)] 
With --shell, pass --read-only through to systemd-nspawn

It seems systemd-nspawn has a bug where --read-only doesn't actually
work, but this should not hurt in either case.

Edit: https://github.com/systemd/systemd/pull/10481 for systemd-nspawn.

6 years agoMake compression type configurable
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 17:19:37 +0000 (19:19 +0200)] 
Make compression type configurable

This allows the in-fs compression algorithm to be selected: e.g. zstd
is better in pretty much all cases than zlib or xz. Lz4 might be a
good choice if speed is very important, etc.

Exact algorithms supported by both the tools and the kernel vary, so only
a general check if the algorithm name is known is done.

Note: support for zstd was added to fs/squahsfs in linux v4.13-rc5-4-g87bf54bb43.
But it seems that mksquashfs in F28 does not support zstd. Strange.

6 years agoDo not ignore negative command-line switches
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 16:26:15 +0000 (18:26 +0200)] 
Do not ignore negative command-line switches

"is None" should be used, otherwise setting something to "no" on the command-line
would be overwritten by the defaults file.

6 years agoAdd -t squasfsh: raw squashfs filesystems
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 13:00:50 +0000 (15:00 +0200)] 
Add -t squasfsh: raw squashfs filesystems

v2:
- rename 'squashfs' to 'plain_squashfs'
- add .is_squashfs() helper

6 years agoRename RAW_FORMATS to is_disk() and RAW_RW_FS_FORMATS to is_disk_rw()
Zbigniew Jędrzejewski-Szmek [Fri, 19 Oct 2018 13:21:08 +0000 (15:21 +0200)] 
Rename RAW_FORMATS to is_disk() and RAW_RW_FS_FORMATS to is_disk_rw()

The new names actually reflect the meaning. I chose "is_disk" over
"is_gpt" because it is more general and will also work if we decide to
generate other disk formats, e.g. ISO images or disks with DOS
partitions.

6 years agoRename --format members from raw_* to gpt_*
Zbigniew Jędrzejewski-Szmek [Fri, 19 Oct 2018 13:13:35 +0000 (15:13 +0200)] 
Rename --format members from raw_* to gpt_*

They are not "raw" in any meaningful way, since the filesystems are
packaged in a disk image with a gpt partition. I know that "raw" comes
from qemu, where it used to mean e.g. not-qcow2, but since we don't
produce qcow2 or any of the other formats, here it is just misleading.

Also, use auto() to number OutputFormat members and don't show compat names
in help output.

v2:
- add .__repr__() and .__str__() and .from_string() to make the --help
  output message and the error message when an unknown type is given nicer.

6 years agoAdd --debug=run
Zbigniew Jędrzejewski-Szmek [Fri, 19 Oct 2018 12:47:14 +0000 (14:47 +0200)] 
Add --debug=run

The option is written in a way that allows additional selectors to be added
easily. This patch adds just one: --debug=run, that simply prints all commands
as they are executed similarly to make.

6 years agoRemove workaround to always install docs
Zbigniew Jędrzejewski-Szmek [Fri, 19 Oct 2018 11:36:27 +0000 (13:36 +0200)] 
Remove workaround to always install docs

It was added in cf359facaeb with no explanation. Should be OK nowadays.

6 years agoMerge pull request #279 from keszybz/pr272-rework
Zbigniew Jędrzejewski-Szmek [Fri, 2 Nov 2018 18:18:34 +0000 (19:18 +0100)] 
Merge pull request #279 from keszybz/pr272-rework

Fix typing in partition() function

6 years agoRemove now-redundant check if partno is None 279/head
Zbigniew Jędrzejewski-Szmek [Fri, 2 Nov 2018 18:04:00 +0000 (19:04 +0100)] 
Remove now-redundant check if partno is None

6 years agotyping: use non-None types for partition()
Zygmunt Krynicki [Wed, 24 Oct 2018 10:04:03 +0000 (12:04 +0200)] 
typing: use non-None types for partition()

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6 years agoMerge pull request #278 from poettering/qcow2
Zbigniew Jędrzejewski-Szmek [Fri, 2 Nov 2018 17:59:40 +0000 (18:59 +0100)] 
Merge pull request #278 from poettering/qcow2

optionally convert output to qcow2

6 years agomkosi: optionally convert resulting image to qcow2 278/head
Lennart Poettering [Thu, 1 Nov 2018 09:25:55 +0000 (10:25 +0100)] 
mkosi: optionally convert resulting image to qcow2

Fixes: #218
6 years agomkosi: fix checks whether configuration settings are already set
Lennart Poettering [Thu, 1 Nov 2018 09:25:20 +0000 (10:25 +0100)] 
mkosi: fix checks whether configuration settings are already set

6 years agoMerge pull request #277 from lucasdemarchi/tip-fix-symlink
Lennart Poettering [Thu, 1 Nov 2018 09:31:10 +0000 (10:31 +0100)] 
Merge pull request #277 from lucasdemarchi/tip-fix-symlink

Misc fixes

6 years agoFix output dir creation 277/head
Rafael Antognolli [Fri, 20 Jul 2018 20:54:16 +0000 (13:54 -0700)] 
Fix output dir creation

The cache dir is created inside the output dir, so we need to create the
output dir at least before that. Fix the following error:

$ sudo mkosi -d fedora -r 29 -t directory -O bla --default /dev/null

Traceback (most recent call last):
  File "/bin/mkosi", line 3767, in <module>
    main()
  File "/bin/mkosi", line 3757, in main
    build_stuff(args)
  File "/bin/mkosi", line 3573, in build_stuff
    setup_package_cache(args)
  File "/bin/mkosi", line 2412, in setup_package_cache
    d = tempfile.TemporaryDirectory(dir=os.path.dirname(args.output), prefix=".mkosi-")
  File "/usr/lib64/python3.7/tempfile.py", line 788, in __init__
    self.name = mkdtemp(suffix, prefix, dir)
  File "/usr/lib64/python3.7/tempfile.py", line 366, in mkdtemp
    _os.mkdir(file, 0o700)
FileNotFoundError: [Errno 2] No such file or directory: '/home/lucas/p/mkosi/bla/.mkosi-l3oxfchg'

6 years agoFix defaults symlink
Lucas De Marchi [Wed, 31 Oct 2018 23:55:34 +0000 (16:55 -0700)] 
Fix defaults symlink

configs/ got moved to mkosi.files but the symlink was left behind.

6 years agoMerge pull request #276 from poettering/rndseed
Lennart Poettering [Wed, 31 Oct 2018 19:36:15 +0000 (20:36 +0100)] 
Merge pull request #276 from poettering/rndseed

drop random seed in built images, and other fixlets

6 years agomkosi: if/elif simplifications 276/head
Lennart Poettering [Wed, 31 Oct 2018 17:53:14 +0000 (18:53 +0100)] 
mkosi: if/elif simplifications

6 years agomkosi: remove random seed file in images
Lennart Poettering [Wed, 31 Oct 2018 17:48:09 +0000 (18:48 +0100)] 
mkosi: remove random seed file in images

If the random seed is part of the image, then each time it is run would
start with the same pool hence the entropy would be much smaller.

6 years agomkosi: use the usual way to show start/finish of one of the steps for the password...
Lennart Poettering [Wed, 31 Oct 2018 17:39:54 +0000 (18:39 +0100)] 
mkosi: use the usual way to show start/finish of one of the steps for the password setting too

6 years agomkosi: strictly require offline operation from systemctl
Lennart Poettering [Wed, 31 Oct 2018 17:39:06 +0000 (18:39 +0100)] 
mkosi: strictly require offline operation from systemctl

It's very likely systemctl will run in one of the scripts. Let's always
make sure it never even tries to talk to PID, simply as a matter of
robustness.

Fixes: #262
6 years agoMerge pull request #273 from zyga/args-type
Zbigniew Jędrzejewski-Szmek [Thu, 25 Oct 2018 15:18:23 +0000 (17:18 +0200)] 
Merge pull request #273 from zyga/args-type

Begin type-checking parsed command line arguments

6 years agoMerge pull request #264 from lucasdemarchi/tip-arch
Zbigniew Jędrzejewski-Szmek [Thu, 25 Oct 2018 09:55:23 +0000 (11:55 +0200)] 
Merge pull request #264 from lucasdemarchi/tip-arch

Fix archlinux

6 years agoRecursively unmount
Lucas De Marchi [Sat, 6 Oct 2018 01:17:24 +0000 (18:17 -0700)] 
Recursively unmount

We always want to unmount anything left on the root mountpoint. Just
use the --recursive switch from umount.

6 years agoAdd type annotations for esp_partno 273/head
Zygmunt Krynicki [Wed, 24 Oct 2018 11:36:30 +0000 (13:36 +0200)] 
Add type annotations for esp_partno

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6 years agoAdd type annotations to swap_partno
Zygmunt Krynicki [Wed, 24 Oct 2018 11:35:09 +0000 (13:35 +0200)] 
Add type annotations to swap_partno

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6 years agoAdd CommandLineArguments type
Zygmunt Krynicki [Wed, 24 Oct 2018 11:33:09 +0000 (13:33 +0200)] 
Add CommandLineArguments type

This patch adds a new type that is the result of parsing command line
arguments via argparse.ArgumentParser.parse_args(). This type will gain
typed attributes that will allow to type check all the functions using
it, gradually, one by one.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6 years agoMerge pull request #271 from keszybz/fedora-29-update
Lennart Poettering [Wed, 24 Oct 2018 09:58:34 +0000 (11:58 +0200)] 
Merge pull request #271 from keszybz/fedora-29-update

Update Fedora defaults to 29

6 years agofedora: import new keys 271/head
Zbigniew Jędrzejewski-Szmek [Wed, 24 Oct 2018 09:03:27 +0000 (11:03 +0200)] 
fedora: import new keys

This also makes during rawhide installs we'll check with the F30 key.

6 years agofedora: use F29 as default
Zbigniew Jędrzejewski-Szmek [Wed, 24 Oct 2018 09:00:52 +0000 (11:00 +0200)] 
fedora: use F29 as default

6 years agofedora: remove glibc-minimal-langpack from package list
Zbigniew Jędrzejewski-Szmek [Wed, 24 Oct 2018 08:50:14 +0000 (10:50 +0200)] 
fedora: remove glibc-minimal-langpack from package list

It is now included in the list inside mkosi, so no need to repeat it here.

6 years agofedora: add new dir and make mkosi.default just a symlink
Zbigniew Jędrzejewski-Szmek [Wed, 24 Oct 2018 08:52:53 +0000 (10:52 +0200)] 
fedora: add new dir and make mkosi.default just a symlink

Contributors from other distros will probably want to add similar
configs, so it makes sense to "demote" the Fedora config. A new dir is
created to avoid cluttering the root directory with those files.

6 years agoAdd static type annotations
Zygmunt Krynicki [Fri, 19 Oct 2018 13:22:27 +0000 (15:22 +0200)] 
Add static type annotations

This patch adds a lot of type annotations, as compatible with mypy
0.620. The type checking is not perfect as many places use loosely typed
argparse.Namespace and I didn't want to introduce any changes there.

Some errors reported by mypy now show missing None checks but I also
decided not to fix them and make the review more complex. This patch
should only annotate types, nothing else.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6 years agoMerge pull request #268 from eliasp/ubuntu-bootable-gpt-dracut
Lucas Werkmeister [Fri, 19 Oct 2018 12:31:24 +0000 (14:31 +0200)] 
Merge pull request #268 from eliasp/ubuntu-bootable-gpt-dracut

Make Ubuntu GPT images bootable

6 years agoUbuntu/GPT-Boot: Include dracut bug workaround comment in conf file 268/head
Elias Probst [Thu, 18 Oct 2018 23:14:06 +0000 (01:14 +0200)] 
Ubuntu/GPT-Boot: Include dracut bug workaround comment in conf file

6 years agoUbuntu/GPT-Boot: Make `install_boot_loader_ubuntu()` use the identical function for...
Elias Probst [Thu, 18 Oct 2018 23:07:21 +0000 (01:07 +0200)] 
Ubuntu/GPT-Boot: Make `install_boot_loader_ubuntu()` use the identical function for Debian

6 years agoFedora: install glibc-minimal-langpack
Zbigniew Jędrzejewski-Szmek [Thu, 18 Oct 2018 12:20:37 +0000 (14:20 +0200)] 
Fedora: install glibc-minimal-langpack

By forcing the installation of glibc-minimal-langpack we avoid glibc-all-langpacks
which is quite large. See
https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot.

While at it, configure the locale as C.utf8 so we don't get the
default which is POSIX.

6 years agoUbuntu/GPT-Boot: Remove TODO list item
Elias Probst [Wed, 17 Oct 2018 22:15:37 +0000 (00:15 +0200)] 
Ubuntu/GPT-Boot: Remove TODO list item

6 years agoUbuntu/GPT-Boot: Add workaround for dracut bug wrt crc32 module
Elias Probst [Wed, 17 Oct 2018 22:03:50 +0000 (00:03 +0200)] 
Ubuntu/GPT-Boot: Add workaround for dracut bug wrt crc32 module

6 years agoUbuntu/GPT-Boot: Add + execute bootloader installation for Ubuntu
Elias Probst [Wed, 17 Oct 2018 22:03:17 +0000 (00:03 +0200)] 
Ubuntu/GPT-Boot: Add + execute bootloader installation for Ubuntu

6 years agoUbuntu/GPT-Boot: Correct the Kernel image pkg name on Ubuntu
Elias Probst [Wed, 17 Oct 2018 21:59:30 +0000 (23:59 +0200)] 
Ubuntu/GPT-Boot: Correct the Kernel image pkg name on Ubuntu

6 years agoUbuntu/GPT-Boot: Add `universe` repo for Ubuntu to allow `dracut` installation
Elias Probst [Wed, 17 Oct 2018 15:08:18 +0000 (17:08 +0200)] 
Ubuntu/GPT-Boot: Add `universe` repo for Ubuntu to allow `dracut` installation

6 years agoUbuntu/GPT-Boot: Don't die creating a bootable Ubuntu image
Elias Probst [Wed, 17 Oct 2018 22:00:44 +0000 (00:00 +0200)] 
Ubuntu/GPT-Boot: Don't die creating a bootable Ubuntu image

6 years agoReorganize and expand OVMF firmware locations
Lucas Werkmeister [Mon, 12 Feb 2018 21:40:25 +0000 (22:40 +0100)] 
Reorganize and expand OVMF firmware locations

Add architecture-specific paths before generic ones (they’re more likely
to be correct for the current architecture), and add some paths from the
Arch Linux `ovmf` (“extra” repository) and `edk2-ovmf` (Arch User
Repository) packages.

6 years agomkosi: fix to enable Fedora rawhide support
Chris Patterson [Tue, 13 Feb 2018 16:07:07 +0000 (11:07 -0500)] 
mkosi: fix to enable Fedora rawhide support

The Fedora repos require using the release version of 'rawhide' in the URLs,
while mkosi currently forces you to select a specific version number, e.g. 28.
You can not install Fedora '28', but you can install 'rawhide', using the gpg
keys for release version '28'.

These changes:
(1) Assume the latest (known) version when --release=rawhide, but warn the user
(2) Allow user to override a specific rawhide version with the option
--release=rawhide-<version>

Signed-off-by: Chris Patterson <cjp256@gmail.com>
6 years agoMerge pull request #265 from lucasdemarchi/tip-clear
Zbigniew Jędrzejewski-Szmek [Thu, 11 Oct 2018 06:10:02 +0000 (08:10 +0200)] 
Merge pull request #265 from lucasdemarchi/tip-clear

Allow to run on qemu >= 2.12

6 years agoLog command line run on qemu 265/head
Lucas De Marchi [Mon, 8 Oct 2018 23:07:29 +0000 (16:07 -0700)] 
Log command line run on qemu

This makes it easier to debug and customize what we are running when
calling qemu. And example customization might be:

sudo mkosi --default mkosi.fedora qemu \
    -drive if=pflash,format=raw,file=myvars.fd

6 years agoubuntu: fix docs removal
Asbjørn Apeland [Wed, 10 Oct 2018 07:30:30 +0000 (09:30 +0200)] 
ubuntu: fix docs removal

systemd-nspawn fails to spawn `rm`
systemd-nspawn succeeds to spawn `/bin/rm`

6 years agoAllow to run qemu >= 2.12
Lucas De Marchi [Mon, 8 Oct 2018 23:01:57 +0000 (16:01 -0700)] 
Allow to run qemu >= 2.12

While trying to call "mkosi qemu" on a Clear Linux host it reported

    qemu: could not load PC BIOS '/usr/share/qemu/OVMF_CODE.fd'

Cross checking with my Fedora host the only real difference I see is the
qemu version. Changing it to pass a pflash drive directly makes it work
and also make it explicit that the it is a readonly device.

6 years agoRecursively unmount 264/head
Lucas De Marchi [Sat, 6 Oct 2018 01:17:24 +0000 (18:17 -0700)] 
Recursively unmount

We always want to unmount anything left on the root mountpoint. Just
use the --recursive switch from umount.

6 years agoarchlinux: kill any leftover process
Lucas De Marchi [Sat, 6 Oct 2018 01:07:41 +0000 (18:07 -0700)] 
archlinux: kill any leftover process

By adding some debugs I noticed pacstrap leaves dirmngr running. Kill
any leftover process.

6 years agoTwo minor comment fixes
Lucas Werkmeister [Sun, 9 Sep 2018 12:04:57 +0000 (14:04 +0200)] 
Two minor comment fixes

We usually start comments in uppercase, as far as I can tell. (Follow-up
for #263.)

6 years agoMerge pull request #263 from terceiro/debian-optimize
Lucas Werkmeister [Sun, 9 Sep 2018 12:03:59 +0000 (14:03 +0200)] 
Merge pull request #263 from terceiro/debian-optimize

Optimize size of Debian rootfs

6 years agodebian: also remove docs installed by debootstrap 263/head
Antonio Terceiro [Fri, 7 Sep 2018 14:53:24 +0000 (11:53 -0300)] 
debian: also remove docs installed by debootstrap

On my tests, this reduces a minimal Debian stable rootfs from ~204 MB to
~157 MB

6 years agodebian: remove unecessary conditional
Antonio Terceiro [Fri, 7 Sep 2018 14:23:30 +0000 (11:23 -0300)] 
debian: remove unecessary conditional

extra_packages is initialized unconditionally to an non-empty list a few
lines above, so the conditional will always be true

7 years agoMerge pull request #260 from BlackYoup/cenots
Lucas De Marchi [Wed, 1 Aug 2018 05:05:48 +0000 (22:05 -0700)] 
Merge pull request #260 from BlackYoup/cenots

centos: fix typo in updates repository base url

7 years agocentos: fix typo in updates repository base url 260/head
Arnaud Lefebvre [Tue, 31 Jul 2018 23:33:46 +0000 (01:33 +0200)] 
centos: fix typo in updates repository base url

7 years agoRemove `pcmciautils` from the filtered packages for archlinux
Robin B [Mon, 9 Jul 2018 01:11:58 +0000 (03:11 +0200)] 
Remove `pcmciautils` from the filtered packages for archlinux

`pcmciautils` was dropped from the base group and the official repositories for good, there is no need to explicitly remove it from the list

7 years agoMerge pull request #254 from keszybz/fedora-update
Lennart Poettering [Tue, 19 Jun 2018 10:38:41 +0000 (12:38 +0200)] 
Merge pull request #254 from keszybz/fedora-update

Fedora update

7 years agofedora: use F28, it is the latest version 254/head
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jun 2018 10:16:05 +0000 (12:16 +0200)] 
fedora: use F28, it is the latest version

7 years agofedora: cut down on the installation set size
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jun 2018 10:15:40 +0000 (12:15 +0200)] 
fedora: cut down on the installation set size

By installing glibc-minimal-langpack we avoid the installation of glibc-all-langpacks
(glibc requires glibc-langpack (provided by all langpacks) and suggests
glibc-all-langpacks (so that is the default when there is nothing else to
satisfy the require). By forcing a different langpack package, we avoid the
installation of any others.

git-core is similar to git, but does not pull in some lisp and perl stuff.

kernel-core is similar to kernel, but does not include some fancy drivers.

7 years agoFix file descriptor leak (#250)
Lucas Werkmeister [Sat, 19 May 2018 11:12:04 +0000 (13:12 +0200)] 
Fix file descriptor leak (#250)

See also #249.

(The conversion of string concatenation to two writes makes this snippet
more similar to the cmdline snippet below; perhaps we can later refactor
it into a helper function, similar to systemd’s write_string_file().)

7 years agoUse path strings instead of pathlib.Path objects
Filipe Brandenburger [Fri, 2 Mar 2018 06:10:18 +0000 (22:10 -0800)] 
Use path strings instead of pathlib.Path objects

The methods in os and shutil only accept pathlib.Path objects starting
with Python 3.6, so revert those changes to keep compatibility with
Python 3.5.

7 years agoREADME: add e2fsprogs and xfsprogs to package list (#242)
Lucas Werkmeister [Sun, 18 Feb 2018 16:38:50 +0000 (17:38 +0100)] 
README: add e2fsprogs and xfsprogs to package list (#242)

7 years agoRename "Post Installation Script" to "Postinstall script" (#235)
Zbigniew Jędrzejewski-Szmek [Mon, 12 Feb 2018 15:07:55 +0000 (16:07 +0100)] 
Rename "Post Installation Script" to "Postinstall script" (#235)

The short version is pretty well established in packaging world, and
anyway "post-installation" or even "postinstallation" would be more
correct than "post installation" as an adjective.

7 years agoMerge pull request #238 from poettering/pxz
Lucas De Marchi [Mon, 12 Feb 2018 15:06:22 +0000 (07:06 -0800)] 
Merge pull request #238 from poettering/pxz

mkosi: use pxz instead of xz if it's installed

7 years agomkosi: use pxz instead of xz if it's installed 238/head
Lennart Poettering [Mon, 12 Feb 2018 12:59:55 +0000 (13:59 +0100)] 
mkosi: use pxz instead of xz if it's installed

Fixes: #227
7 years agoREADME.md: Update for new raw_xfs, and renamed raw_ext4 options
Naadir Jeewa [Mon, 12 Feb 2018 12:51:56 +0000 (12:51 +0000)] 
README.md: Update for new raw_xfs, and renamed raw_ext4 options

7 years agoMerge pull request #231 from randomvariable/xfs_support
Lennart Poettering [Mon, 12 Feb 2018 12:20:09 +0000 (13:20 +0100)] 
Merge pull request #231 from randomvariable/xfs_support

Add XFS root support

7 years agomkosi: Add XFS root support 231/head
Naadir Jeewa [Sun, 11 Feb 2018 15:51:59 +0000 (15:51 +0000)] 
mkosi: Add XFS root support

Root size is 1300Mib in this case because of additional metadata

Signed-off-by: Naadir Jeewa <naadir@randomvariable.co.uk>
7 years agomkosi: Rename raw_gpt output format to raw_ext4
Naadir Jeewa [Sun, 11 Feb 2018 15:51:34 +0000 (15:51 +0000)] 
mkosi: Rename raw_gpt output format to raw_ext4

Removes confusion when adding support for additional filesystems.
raw_gpt is still supported as an output format

Signed-off-by: Naadir Jeewa <naadir@randomvariable.co.uk>
7 years agoMerge pull request #234 from keszybz/check-architecture-lazily
Lucas Werkmeister [Sun, 11 Feb 2018 14:08:41 +0000 (15:08 +0100)] 
Merge pull request #234 from keszybz/check-architecture-lazily

Check architecture lazily

7 years agoMerge pull request #223 from gdiscry/fix/install_arch
Zbigniew Jędrzejewski-Szmek [Sat, 10 Feb 2018 18:02:56 +0000 (19:02 +0100)] 
Merge pull request #223 from gdiscry/fix/install_arch

Improve the Arch Linux installation

7 years agoCheck architecture lazily 234/head
Zbigniew Jędrzejewski-Szmek [Sat, 10 Feb 2018 17:24:52 +0000 (18:24 +0100)] 
Check architecture lazily

Before this patch, mkosi wouldn't even run --help on a platform that
wasn't amd64 or arm64. That's unnecessarily harsh, a lot of functionality
is platform-independent and will work anywhere.