]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
5 years agoadd basic support for --repositories option for Arch Linux 398/head
Julien Nicoulaud [Sat, 18 Jan 2020 12:43:22 +0000 (13:43 +0100)] 
add basic support for --repositories option for Arch Linux

5 years agomkosi: fix wrong url to get Fedora's keys
Ronny Chevalier [Wed, 15 Jan 2020 13:11:47 +0000 (14:11 +0100)] 
mkosi: fix wrong url to get Fedora's keys

Fedora's website recently moved the keys from

    https://getfedora.org/static/[KEY]

to

    https://getfedora.org/static/keys/[KEY]

Unfortunately, they are not redirecting the URL, so it results in a 404.
It means that mkosi fails installing packages when the keys are not
stored locally, because it fails to get them from the website.

5 years agomkosi: use threads for .tar.xz creation
Alexander Ried [Wed, 8 Jan 2020 04:58:02 +0000 (05:58 +0100)] 
mkosi: use threads for .tar.xz creation

5 years agoMerge pull request #392 from poettering/minimal-fs
Lennart Poettering [Mon, 6 Jan 2020 17:39:04 +0000 (18:39 +0100)] 
Merge pull request #392 from poettering/minimal-fs

add support for building "minimized" file system images

5 years agomypy: add missing type information 392/head
Joerg Behrmann [Fri, 13 Dec 2019 15:30:57 +0000 (16:30 +0100)] 
mypy: add missing type information

5 years agodocs: document new features
Lennart Poettering [Fri, 13 Dec 2019 13:53:43 +0000 (14:53 +0100)] 
docs: document new features

5 years agoci: generate more different images
Lennart Poettering [Fri, 13 Dec 2019 09:35:25 +0000 (10:35 +0100)] 
ci: generate more different images

This generates images in all formats we support except as btrfs
subvolume.

It also add tests for the two flavours that support "minimized" images.

5 years agoci: use different ppa for python 3.6
Lennart Poettering [Fri, 13 Dec 2019 09:50:34 +0000 (10:50 +0100)] 
ci: use different ppa for python 3.6

Apparently the maintainer of the old PPA had enough. Thankfully there's
an alternative one.

5 years agomkosi: support old btrfs-tools on semaphore
Lennart Poettering [Fri, 13 Dec 2019 10:11:46 +0000 (11:11 +0100)] 
mkosi: support old btrfs-tools on semaphore

5 years agomkosi: introduce --with-network=strict
Lennart Poettering [Fri, 13 Dec 2019 08:26:26 +0000 (09:26 +0100)] 
mkosi: introduce --with-network=strict

This is like --with-network but also tells "dnf" not to use networking.
This adds a minimal level of reproducability: if the package cache in
mkosi.cache/ is populated once, every rebuild should produce very
similar images.

5 years agomkosi: incremental builds are not supported for squashfs or minimized file systems
Lennart Poettering [Thu, 12 Dec 2019 20:44:00 +0000 (21:44 +0100)] 
mkosi: incremental builds are not supported for squashfs or minimized file systems

This was never supported for squashfs, but failed badly. Let's generate
a nice error instead.

(The thing with these builds are that while we build these images we
don't mount the final file systems inside the image file. Instead we
mount a temporary directory in /var/tmp that is packed up only much
later. This makes caching harder, since it's not just one dir or file we
need to cache but the image *and* this directory. We can add support for
this eventually, but for now let's just friendly decline operation. It's
not too limiting, as in particular minimization is mostly an
optimization that is only useful on final builds, not on test builds so
much, while incremental mode is useful for test builds but not so much
for final builds.)

5 years agomkosi: optionally allow 'minimization' of generated file systems
Lennart Poettering [Thu, 12 Dec 2019 20:35:00 +0000 (21:35 +0100)] 
mkosi: optionally allow 'minimization' of generated file systems

This will use resize2fs or mkfs.btrfs support for creating "minimal"
images, i.e. file systems that have enough space for out payload but not
more.

5 years agomkosi: show whether we are in the first or second stage
Lennart Poettering [Thu, 12 Dec 2019 17:21:35 +0000 (18:21 +0100)] 
mkosi: show whether we are in the first or second stage

5 years agomkosi: force 256byte inodes on ext4
Lennart Poettering [Thu, 12 Dec 2019 17:18:46 +0000 (18:18 +0100)] 
mkosi: force 256byte inodes on ext4

Let's add some reproducability. The inode size has effects on the mtime
granularity, fscrypt support and more. mkfs.ext4's internal heuristic
for determining the inode size hence has some weird effects where mtime
problems suddenly arise when you build smaller images. Let's fix that,
and stick to a fixed size, most powerful inode size.

5 years agomkosi: add missing double whitespace between functions
Lennart Poettering [Thu, 12 Dec 2019 17:18:31 +0000 (18:18 +0100)] 
mkosi: add missing double whitespace between functions

5 years agoAdd location of OVMF.fd on recent Debian systems
Antonio Terceiro [Thu, 28 Nov 2019 15:14:26 +0000 (12:14 -0300)] 
Add location of OVMF.fd on recent Debian systems

5 years agoMerge pull request #386 from poettering/mkosi-default
Lucas De Marchi [Thu, 21 Nov 2019 17:05:06 +0000 (09:05 -0800)] 
Merge pull request #386 from poettering/mkosi-default

mkosi: having a "defaults" file is optional, hence conditionalize MKOSI_DEFAULT

5 years agomkosi: having a "defaults" file is optional, hence conditionalize MKOSI_DEFAULT 386/head
Lennart Poettering [Wed, 20 Nov 2019 09:10:21 +0000 (10:10 +0100)] 
mkosi: having a "defaults" file is optional, hence conditionalize MKOSI_DEFAULT

Follow-up for b067223c0de3ca814abac0ba6459d4916fd15746

5 years agoMerge pull request #382 from craftyguy/console_pipe
Lucas De Marchi [Tue, 12 Nov 2019 19:11:09 +0000 (11:11 -0800)] 
Merge pull request #382 from craftyguy/console_pipe

Use console=pipe in install_grub() when calling nspawn

5 years agoMerge pull request #381 from behrmann/arch_base_metapackage
Lucas De Marchi [Mon, 11 Nov 2019 22:43:22 +0000 (14:43 -0800)] 
Merge pull request #381 from behrmann/arch_base_metapackage

arch: use base package instead of base group

5 years agoFix literal asterisks in markdown documentation
JoelColledge [Fri, 8 Nov 2019 14:39:45 +0000 (15:39 +0100)] 
Fix literal asterisks in markdown documentation

5 years agoUse console=pipe in install_grub() when calling nspawn 382/head
Clayton Craft [Sat, 9 Nov 2019 19:50:12 +0000 (11:50 -0800)] 
Use console=pipe in install_grub() when calling nspawn

The mount bind to /dev on the host conflicts with this patch in systemd,
which doesn't expect /dev/console to exist:
https://github.com/systemd/systemd/commit/3acc84ebd9aebe8cf1771b42644ebbfbecdfaa37

The result is that nspawn dies because it is unable to create a symlink
at /dev/console. This adds a new parameter when calling nspawn to
prevent it from attempting to create/use /dev/console since the default
behavior is to create/use /dev/console and install_grub() doesn't seem to
require an interactive console in order to install grub.

Fixes #380

5 years agoarch: use base package instead of base group 381/head
Joerg Behrmann [Fri, 8 Nov 2019 09:41:02 +0000 (10:41 +0100)] 
arch: use base package instead of base group

Arch has changed its base package group to a meta package that pulls in several
other packages as dependencies. It is slimmer than the package group was before
and necessary to request support, so we can (and should) install it in full.

https://www.archlinux.org/news/base-group-replaced-by-mandatory-base-package-manual-intervention-required/

Original-Author: @keur
Closes: #377
5 years agoMerge pull request #378 from johannbg/FEDORA31
Lennart Poettering [Thu, 31 Oct 2019 15:25:30 +0000 (16:25 +0100)] 
Merge pull request #378 from johannbg/FEDORA31

Fedora31

5 years agoUpdate to Fedora31 378/head
Jóhann B. Guðmundsson [Thu, 31 Oct 2019 15:02:42 +0000 (15:02 +0000)] 
Update to Fedora31

5 years agoAdd Fedora31
Jóhann B. Guðmundsson [Thu, 31 Oct 2019 15:02:04 +0000 (15:02 +0000)] 
Add Fedora31

5 years agoOptionally include the .git directory with the files it contains
James Shubin [Wed, 18 Sep 2019 07:17:04 +0000 (03:17 -0400)] 
Optionally include the .git directory with the files it contains

When copying files in from git, using copy-git-cached ignores the files
in the .git/ directory. This introduces a copy-git-more option that also
pulls those files in. This is useful for builds that use `git describe`
or another git command for their version number or tests. With this
feature they can now query it.

5 years agoAdd flag to skip (second) final image build phase
James Shubin [Wed, 18 Sep 2019 07:09:31 +0000 (03:09 -0400)] 
Add flag to skip (second) final image build phase

This adds a new flag to cause the (second) final stage to be skipped.
This is useful for when you're more interested in the build artifacts
being built in the correct environment, and less interested in the final
image.

5 years agoRespect TMPDIR variable
Michal Sekletár [Thu, 17 Oct 2019 09:36:52 +0000 (11:36 +0200)] 
Respect TMPDIR variable

Fixes #332

5 years agoMerge pull request #355 from stejoo/centos_epel
Lennart Poettering [Wed, 16 Oct 2019 09:37:55 +0000 (11:37 +0200)] 
Merge pull request #355 from stejoo/centos_epel

mkosi: Fix centos_epel mirror configuration

5 years agomkosi: pass architecture to debbootstrap and map to Debian names
Joerg Behrmann [Mon, 7 Oct 2019 16:49:45 +0000 (18:49 +0200)] 
mkosi: pass architecture to debbootstrap and map to Debian names

5 years agoAdd support for Photon OS
Anish Swaminathan [Fri, 23 Aug 2019 17:10:53 +0000 (22:40 +0530)] 
Add support for Photon OS

Please see https://vmware.github.io/photon/

Known limitations:

1. The gpg key is not published on the web, so VMWARE-RPM-GPG-KEY should be present in the host
2. No uefi boot supported yet

```

initramfs 2.0-4.ph3 posttrans
Creating /boot/initrd.img-4.19.65-2.ph3

Complete!
‣ Unmounting API VFS...
‣ Unmounting API VFS complete.
‣ Installing Photon complete.
‣ Assigning hostname...
‣ Assigning hostname complete.
‣ Installing boot loader...
Installing for i386-pc platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.65-2.ph3
Found initrd image: /boot/initrd.img-4.19.65-2.ph3
done
‣ Installing boot loader complete.
‣ Unmounting Package Cache...
‣ Unmounting Package Cache complete.
‣ Cleaning dnf metadata...
‣ Resetting machine ID...
‣ Resetting machine ID complete.
‣ Removing random seed...
‣ Removing random seed complete.
‣ Unmounting image...
‣ Unmounting image complete.
‣ Mounting image...
‣ Mounting image complete.
‣ Unmounting image...
‣ Unmounting image complete.
‣ Detaching image file...
‣ Detaching image file complete.
‣ Linking image file...
‣ Changing ownership of output file /home/sus/photon-mkosi/mkosi.output/fedora.raw to user sus (acquired from sudo)...
‣ Successfully changed ownership of /home/sus/photon-mkosi/mkosi.output/fedora.raw.
‣ Successfully linked /home/sus/photon-mkosi/mkosi.output/fedora.raw.
‣ Resulting image size is 1.0G, consumes 503.0M.
‣ Processing default complete.

```

5 years agoFix type error on args variable (#368)
Jörg Behrmann [Fri, 11 Oct 2019 09:36:20 +0000 (11:36 +0200)] 
Fix type error on args variable (#368)

The CommandLineArguments are in a instead of args, so the hasattr check will
always fail. Skip using hasattr since a will have set directory from parse_args

5 years agoAdd env to build that specifies which "default" we're using
James Shubin [Fri, 20 Sep 2019 19:38:04 +0000 (15:38 -0400)] 
Add env to build that specifies which "default" we're using

It's not possible to determine which "mkosi.default" we're using, when
using a single "mkosi.build" script with `mkosi --default <file> build`
so this adds a variable that allows the build script to know which one
is being used.

5 years agomkosi: do RNG pass-through automatically for qemu
Lennart Poettering [Thu, 8 Aug 2019 09:04:38 +0000 (11:04 +0200)] 
mkosi: do RNG pass-through automatically for qemu

Let's not starve our instances of entropy needlessly, if it's easy to fix.

5 years agoAdd the ability to set pre-hashed root passwords
Joerg Behrmann [Tue, 10 Sep 2019 09:19:49 +0000 (11:19 +0200)] 
Add the ability to set pre-hashed root passwords

5 years agoFix typo in source comments
James Shubin [Wed, 18 Sep 2019 07:11:37 +0000 (03:11 -0400)] 
Fix typo in source comments

6 years agoFix epel_url to use baseurl instead of mirrorlist 355/head
Stefan Joosten [Thu, 22 Aug 2019 11:56:10 +0000 (13:56 +0200)] 
Fix epel_url to use baseurl instead of mirrorlist

6 years agoFix centosplus_url repository selection
Stefan Joosten [Thu, 22 Aug 2019 10:04:48 +0000 (12:04 +0200)] 
Fix centosplus_url repository selection

6 years agoMerge pull request #354 from lnussel/master
Lennart Poettering [Thu, 15 Aug 2019 10:31:09 +0000 (12:31 +0200)] 
Merge pull request #354 from lnussel/master

openSUSE fixes

6 years agocall zypper with mount_api_vfs context 354/head
Ludwig Nussel [Thu, 15 Aug 2019 08:58:14 +0000 (10:58 +0200)] 
call zypper with mount_api_vfs context

6 years agorename opensuse default repos
Ludwig Nussel [Thu, 15 Aug 2019 07:34:11 +0000 (09:34 +0200)] 
rename opensuse default repos

Use repo names consistent with openSUSE

6 years agoread os-release's ID_LIKE to find openSUSE
Ludwig Nussel [Thu, 15 Aug 2019 07:25:07 +0000 (09:25 +0200)] 
read os-release's ID_LIKE to find openSUSE

Nowadays ID is opensuse-leap, opensuse-tumbleweed or various other
values for different flavors

6 years agostrip quotes from /etc/os-release values
Ludwig Nussel [Thu, 15 Aug 2019 07:18:44 +0000 (09:18 +0200)] 
strip quotes from /etc/os-release values

6 years agoadd full basic repo and epel for better centos container building (#346)
Sequencer [Thu, 8 Aug 2019 09:11:26 +0000 (09:11 +0000)] 
add full basic repo and epel for better centos container building (#346)

split centos with epel into two distro: centos, centos_epel.

6 years agoMerge pull request #350 from fsateler/manpages
Lennart Poettering [Mon, 8 Jul 2019 10:42:12 +0000 (12:42 +0200)] 
Merge pull request #350 from fsateler/manpages

Add command to generate a manpage

6 years agomkosi.md: convert emdash into regular dash 350/head
Felipe Sateler [Mon, 8 Jul 2019 02:21:33 +0000 (22:21 -0400)] 
mkosi.md: convert emdash into regular dash

Otherwise pandoc emits a manpage that cannot be parsed by lexgrog

Detected by lintian

6 years agoAdd custom command to build the manpage
Felipe Sateler [Mon, 8 Jul 2019 02:29:00 +0000 (22:29 -0400)] 
Add custom command to build the manpage

Remembering the exact pandoc incantation is annoying

6 years agoMerge pull request #345 from johannbg/quantum-leap
Lucas De Marchi [Thu, 27 Jun 2019 01:10:58 +0000 (18:10 -0700)] 
Merge pull request #345 from johannbg/quantum-leap

FIX #159, #133

6 years agoFIX #159, #133 345/head
Jóhann B. Guðmundsson [Thu, 20 Jun 2019 09:39:17 +0000 (09:39 +0000)] 
FIX #159, #133

6 years agoMerge pull request #338 from lucasdemarchi/tip-fix-bootprotocols
Lucas De Marchi [Fri, 24 May 2019 19:50:53 +0000 (12:50 -0700)] 
Merge pull request #338 from lucasdemarchi/tip-fix-bootprotocols

Fix BootProtocols parsing

6 years agoMerge pull request #336 from behrmann/fix/333
Lucas De Marchi [Fri, 24 May 2019 19:49:21 +0000 (12:49 -0700)] 
Merge pull request #336 from behrmann/fix/333

mkosi: provide default xbootldr_partno

6 years agoFix BootProtocols parsing 338/head
Lucas De Marchi [Fri, 17 May 2019 04:05:35 +0000 (21:05 -0700)] 
Fix BootProtocols parsing

Mark it with the same action as other lists, otherwise its parsing from
a config file is broken.

6 years agoMerge pull request #341 from lucasdemarchi/tip-fix-semaphore
Lucas De Marchi [Fri, 24 May 2019 19:40:10 +0000 (12:40 -0700)] 
Merge pull request #341 from lucasdemarchi/tip-fix-semaphore

Fix semaphore CI

6 years agogitignore: add .pyc 341/head
Lucas De Marchi [Fri, 24 May 2019 08:45:03 +0000 (01:45 -0700)] 
gitignore: add .pyc

6 years agoFix pytest
Lucas De Marchi [Fri, 24 May 2019 06:58:07 +0000 (23:58 -0700)] 
Fix pytest

It was failing due to not being able to access the cache directories
created by mkosi. Since we are running mkosi as root, let's do the same
for pytest.

6 years agomkosi: provide default xbootldr_partno in argument parsing 336/head
Joerg Behrmann [Wed, 22 May 2019 08:55:48 +0000 (10:55 +0200)] 
mkosi: provide default xbootldr_partno in argument parsing

Fixes #333

6 years agoMerge pull request #330 from afreof/improve-args-parsing
Lucas De Marchi [Tue, 30 Apr 2019 23:10:22 +0000 (16:10 -0700)] 
Merge pull request #330 from afreof/improve-args-parsing

Improve args parsing

6 years agoMerge pull request #307 from keszybz/revert-unmount-recursive
Lucas De Marchi [Tue, 30 Apr 2019 23:09:52 +0000 (16:09 -0700)] 
Merge pull request #307 from keszybz/revert-unmount-recursive

Do not allow dd to create output file

6 years agoDo not allow dd to create the output file 307/head
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 12:54:07 +0000 (13:54 +0100)] 
Do not allow dd to create the output file

Something went wrong on my machine and /dev/loop8p2 was not present,
even though loop8 and loop8p1 were. (I think the loopback device was
mounted somewhere and the kernel wouldn't reread the partition table.)
Since we are running as root, we can easily create a new file in /dev.
Let's avoid this.

6 years agobump version numbers for v5 v5
Lennart Poettering [Tue, 30 Apr 2019 15:25:31 +0000 (17:25 +0200)] 
bump version numbers for v5

6 years agoDisable COW (for btrfs) on qcow2 files
Lénaïc Huard [Mon, 18 Mar 2019 22:02:16 +0000 (23:02 +0100)] 
Disable COW (for btrfs) on qcow2 files

According to qemu-img(1):

    Btrfs has low performance when hosting a VM image file,
    even more when the guest on the VM also using btrfs as file
    system.
    Turning off COW is a way to mitigate this bad performance.

This is the reason of the disable_cow() function, but this function
applies only to the raw file. So, let’s disable COW also on the qcow2
one.

6 years agoCommit empty `mkosi.cache` and `mkosi.output` directories
Lénaïc Huard [Mon, 18 Mar 2019 22:25:38 +0000 (23:25 +0100)] 
Commit empty `mkosi.cache` and `mkosi.output` directories

The goal is to benefit from a package cache right after having checked
mkosi out.

6 years agoCall pytest from ci/semaphore.sh 330/head
Adrian Freihofer [Mon, 25 Feb 2019 21:49:08 +0000 (22:49 +0100)] 
Call pytest from ci/semaphore.sh

6 years agoAdd unit tests for argument and config file parsing
Adrian Freihofer [Sun, 20 Jan 2019 10:07:30 +0000 (11:07 +0100)] 
Add unit tests for argument and config file parsing

This adds 53 tests for the parse_args function. Just run pytest-3
in the root directory of this project to execute all tests.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoman page: cover ! in lists
Adrian Freihofer [Sun, 24 Feb 2019 11:54:01 +0000 (12:54 +0100)] 
man page: cover ! in lists

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: handle kernel_cmd as space separated list
Adrian Freihofer [Sat, 2 Mar 2019 14:18:23 +0000 (15:18 +0100)] 
parse_args: handle kernel_cmd as space separated list

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: Support [foo,bar] syntax
Adrian Freihofer [Sat, 2 Mar 2019 14:47:20 +0000 (15:47 +0100)] 
parse_args: Support [foo,bar] syntax

For comma separated lists also the list syntax is common in
ini files.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: major refactoring and improvements
Adrian Freihofer [Sun, 24 Feb 2019 15:49:24 +0000 (16:49 +0100)] 
parse_args: major refactoring and improvements

The man page describes the powerful configuration approach
based on a mkosi.default file and several file in a
mkosi.default.d folder as well as command line arguments.
This does not work for many parameters. The problem is that
argparse is called before config files are loaded.
For some values the implementation basically looks like:
  a = False   # argparse lines
  ...
  if a is None:  # config file loading, lower priority
      a = True

This new implementation delegates loading of mkosi.default files
to python's argparse.ArgumentParser. According to docummentation
ArgumentParser supports loading of settings from files by
overloading the convert_arg_line_to_args function. The function
gets one line from the config file and returns the corresponding
command line counterpart. For example WithTest=yes found in a
defaults file would be converted to ['--with-tests', 'yes'].

Unfortunately this line by line conversion is not really compatible
with python's configparser module which works file wise. To stay
with ArgumentParser and ConfigParser the new ArgumentParserMkosi
overloads the undocumented _read_args_from_files function of the
ArgumentParser. This function is called for each @ prefixed
command line argument.

The new implementation supports unlimited number of mkosi.default
files. The files are loaded according their alphabetical priority.
Command line arguments are processed with highest priority.

The second problem solved by this patch is data type conversion
for settings loaded from mkosi.default files. Since ArgumentParser
handles all settings, data type conversion is always done by
ArgumentParser.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: Add compatibility options, set defaults
Adrian Freihofer [Sun, 24 Feb 2019 15:24:40 +0000 (16:24 +0100)] 
parse_args: Add compatibility options, set defaults

Support (or prepare to support) WithTests and BuildDirectory
arguments as stated in the man page.

Ensure repositories is always a list.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: verb arg has no attributes
Adrian Freihofer [Wed, 27 Feb 2019 21:21:43 +0000 (22:21 +0100)] 
parse_args: verb arg has no attributes

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: Improve handling of boolean arguments
Adrian Freihofer [Sun, 13 Jan 2019 11:55:21 +0000 (12:55 +0100)] 
parse_args: Improve handling of boolean arguments

First step to handle boolean configuration parameters from
mkosi.default files as well as from command line arguments. The
implementation supports multiple definitions of one argument. The
last value gets priority. Examples:
  --foo=yes --foo=no  --> args.foo=False
  --foo               --> args.foo=True
  --without-foo       --> args.foo=False
  --foo --without-foo --> args.foo=False

Purpose:
Let argparse import mkosi.default files in a future commit.

Make parse_boolean function case-insensitive.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoUse constants for commands
Adrian Freihofer [Sun, 24 Feb 2019 12:42:29 +0000 (13:42 +0100)] 
Use constants for commands

Refactoring without changes

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoMove ArgumentParser creation to function
Adrian Freihofer [Sun, 24 Feb 2019 12:26:03 +0000 (13:26 +0100)] 
Move ArgumentParser creation to function

Refactoring without changes

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agogitignore: __pycache__, PyDev
Adrian Freihofer [Tue, 22 Jan 2019 23:14:09 +0000 (00:14 +0100)] 
gitignore: __pycache__, PyDev

- ingnore __pycache__ in subfolders
- ignore PyDev project and temporary files

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoparse_args: Support removing list entries with ! prefix
Adrian Freihofer [Thu, 24 Jan 2019 23:26:16 +0000 (00:26 +0100)] 
parse_args: Support removing list entries with ! prefix

Entries added handled by the ListAction class may be prefixed with
! to remove an entry if it is already in the list.
!* removes all entries from the list.

Examples:
- mkosi -p httpd -p !httpd
  has no effect

- mkosi -p vi -p emacs -p nano -p "!*,httpd"
  Only the httpd package will be added to the image.

Note: This function becomes even more useful if the configuration
      files are also processed by argparse. This will be the case
      with a subsequent commit.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoAdd COMMANDS section to summary
Adrian Freihofer [Sun, 13 Jan 2019 12:21:32 +0000 (13:21 +0100)] 
Add COMMANDS section to summary

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoMerge pull request #326 from poettering/xbootldr
Lennart Poettering [Thu, 7 Mar 2019 11:10:19 +0000 (12:10 +0100)] 
Merge pull request #326 from poettering/xbootldr

support for "xbootldr" partitions

6 years agoMerge pull request #331 from llucax/btrfs-progs
Zbigniew Jędrzejewski-Szmek [Thu, 28 Feb 2019 15:56:09 +0000 (16:56 +0100)] 
Merge pull request #331 from llucax/btrfs-progs

Debian: Use btrfs-progs instead of btrfs-tools

6 years agoci: Add a test for ubuntu image using btrfs 331/head
Leandro Lucarella [Thu, 28 Feb 2019 14:40:53 +0000 (11:40 -0300)] 
ci: Add a test for ubuntu image using btrfs

6 years agoDebian: Use btrfs-progs instead of btrfs-tools
Leandro Lucarella [Thu, 28 Feb 2019 14:06:05 +0000 (11:06 -0300)] 
Debian: Use btrfs-progs instead of btrfs-tools

The package was renamed some time ago (around March 2016)[1]. The
package btrfs-progs is available from Stretch[2] but it's also in Jessie
backports[3]; in Ubuntu it was introduced in Bionic[4], so it's probably
more appropriate to use the new name.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780081
[2] https://packages.debian.org/stretch/btrfs-progs
[3] https://packages.debian.org/jessie-backports/btrfs-progs
[4] https://packages.ubuntu.com/bionic/btrfs-progs

6 years agoMerge pull request #328 from lucasdemarchi/tip-bind
Lucas De Marchi [Wed, 27 Feb 2019 20:53:06 +0000 (12:53 -0800)] 
Merge pull request #328 from lucasdemarchi/tip-bind

Turn root into a mountpoint

6 years agoTurn root into a mountpoint 328/head
Lucas De Marchi [Tue, 19 Feb 2019 21:59:31 +0000 (13:59 -0800)] 
Turn root into a mountpoint

By doing this we can safely rely on mount --recursive doing the right
thing.

6 years agomkosi: take a BSD lock on the workspace directory while running
Lennart Poettering [Fri, 18 Jan 2019 16:14:30 +0000 (17:14 +0100)] 
mkosi: take a BSD lock on the workspace directory while running

This makes use of the new logic here:

https://github.com/systemd/systemd/pull/11482

(And on older systems has no effect, but that shouldn't hurt either)

Fixes: #252
6 years agoMerge pull request #329 from afreof/minor-improvements
Zbigniew Jędrzejewski-Szmek [Mon, 25 Feb 2019 06:48:40 +0000 (07:48 +0100)] 
Merge pull request #329 from afreof/minor-improvements

Minor improvements

6 years agoDo not redefine built-in 'type' 329/head
Adrian Freihofer [Sun, 13 Jan 2019 16:25:18 +0000 (17:25 +0100)] 
Do not redefine built-in 'type'

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine built-in id
Adrian Freihofer [Sun, 13 Jan 2019 16:12:01 +0000 (17:12 +0100)] 
Do not redefine built-in id

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine built-in bytes
Adrian Freihofer [Sun, 13 Jan 2019 16:09:36 +0000 (17:09 +0100)] 
Do not redefine built-in bytes

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoRemove unused variable
Adrian Freihofer [Sun, 13 Jan 2019 16:06:05 +0000 (17:06 +0100)] 
Remove unused variable

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoRemove unused variable
Adrian Freihofer [Sun, 13 Jan 2019 16:05:25 +0000 (17:05 +0100)] 
Remove unused variable

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine built-in sum
Adrian Freihofer [Sun, 13 Jan 2019 15:56:09 +0000 (16:56 +0100)] 
Do not redefine built-in sum

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoCosmetics: intentation
Adrian Freihofer [Sun, 13 Jan 2019 15:53:15 +0000 (16:53 +0100)] 
Cosmetics: intentation

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoCosmetics: unused variable
Adrian Freihofer [Sun, 13 Jan 2019 15:52:45 +0000 (16:52 +0100)] 
Cosmetics: unused variable

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine name 'uuid'
Adrian Freihofer [Sun, 13 Jan 2019 15:48:07 +0000 (16:48 +0100)] 
Do not redefine name 'uuid'

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not override run_build_script function
Adrian Freihofer [Sun, 13 Jan 2019 15:35:31 +0000 (16:35 +0100)] 
Do not override run_build_script function

Does not change anything. It's a renaming of a function parameter
from run_build_script to do_run_build_script to resolve the name
clashing with function run_build_script.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoCosmetics: Fix intentation
Adrian Freihofer [Sun, 13 Jan 2019 15:26:36 +0000 (16:26 +0100)] 
Cosmetics: Fix intentation

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine built-in dir, type
Adrian Freihofer [Sun, 13 Jan 2019 15:25:57 +0000 (16:25 +0100)] 
Do not redefine built-in dir, type

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoDo not redefine built-in bytes
Adrian Freihofer [Sun, 13 Jan 2019 15:25:14 +0000 (16:25 +0100)] 
Do not redefine built-in bytes

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
6 years agoMerge pull request #327 from lucasdemarchi/tip-arch
Lucas De Marchi [Wed, 20 Feb 2019 16:23:01 +0000 (08:23 -0800)] 
Merge pull request #327 from lucasdemarchi/tip-arch

Fix archlinux on output type directory

6 years agoarch: kill dirmngr only 327/head
Lucas De Marchi [Tue, 19 Feb 2019 21:54:56 +0000 (13:54 -0800)] 
arch: kill dirmngr only

Using fuser to identify processes using a path doesn't work as I wanted:
it relies on the filesystem mounted there. The outcome is that when
using "-t directory" it will try to kill all processes using that
filesystem rather than processes using files under that path.

Even by bind-mounting root so it's always a mountpoint, it doesn't work.
So instead of killing everything, pinpoint what process pacman/pacstrap
left running and kill only that one.

Right now this means telling dirmngr to exit.