This fixes a bug where template presets with a specified instance were
not being handled. The install script previously parsed the entire line,
including the instance(s) and ran 'systemctl preset' on it all, e.g.
'systemctl preset unudhcpd@.service usb0'.
The script will now:
- detect lines that contain a template + instance(s)
- diff the instances
- run preset on template@instance for all added or removed instances
Template presets that don't have any instances specified in the preset
file (because they have a DefaultInstance= set) are treated just like
any other unit since we can run preset on those and it enables the
template with the default instance.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9026>
According to systemd.preset, which I totally should have read before, we
were not specifying the instance correctly which resulted in this unit
not actually being enabled by default.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9026>
Upstream cups has support for generating/installing sysuser config but
it's not yet in a release version. Backport the patch to when it gets
into a release, we'll know to drop the patch.
Fixes#4649
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8875>
Unfortunately we can't build fwupd with only unit files, we have to link
against systemd for sd-notify support or else the units probably aren't
going to be properly managed.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
[ci:skip-vercheck] pkgver/pkgrel match upstream
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7245>
No package in aports or pmaports directly depends on eudev
anymore, meaning that this eudev provide is not needed and
only the udev virtual package provide is needed.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8974>
This uses some lightweight tools with systemd-inhibit to block sleep and
shutdown when apk is running. This is being installed in a new subpkg
that is pulled in only when apk-tools is installed, so that this is not
installed on duranium.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8672>
compat-sysv-interfaces is meant for systems that
already have technical debt from switching from
sysv. postmarketOS does not have this, so this
is not needed.
All this option does is enable runlevels 0-6
and install legacy.conf, which also doesn't
work with our packaging because it installs
symlinks who's target only exists in
subpackages.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8996>
Before this change, systemd package depends on other compression
libraries, but does not depend on libbz2. Let's also make it depend
on libbz2.
This also makes bzip2-dev explicitly installed on build, like other
compression libraries like lz4-dev, xz-dev, zlib-dev, and zstd-dev.
Currently, it is indirectly installed as glib-dev depends on it.
So the makedepends= change does not effectively changes anything.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8926>
Even though systemd-dev provides eudev-dev, it doesn't make sense
to keep these dependencies, since we fully control the systemd
repo and don't need to work around these things. Most of these
packages depend on systemd-dev anyways, making this second
dependency useless.
This frees up some room for modifying the provides of systemd to
better integrate with the regular repo in the future.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
[ci:skip-vercheck]: enabling package for arch
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8902>
This fixes two issues:
1. I was investigating why currently, pmbootstrap build --force
libcamera would fail. It turns out that the problem was possible to
reduce down to apk add eudev-dev resulting in installing eudev-dev
instead of systemd-dev, even with the systemd repository enabled.
This is because apk actually thinks it has a higher version:
name <eudev-dev> selected from selectable list
select_package: eudev-dev (requirers=1, autosel=1, iif=0, order_id=0x40005807)
consider systemd-dev-261_rc4-r0 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=100, installed=0
prefer existing package
choose as new provider
consider eudev-dev-3.2.14-r6 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=100, installed=0
select latest by requested name (greater)
choose as new provider
consider libudev-zero-dev-1.0.4-r0 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=20, installed=0
select latest by requested name (less)
selecting: eudev-dev-3.2.14-r6, available: 1
assign eudev-dev to eudev-dev-3.2.14-r6
disqualify_package: systemd-dev-261_rc4-r0 (conflicting provides)
disqualify_package: libudev-zero-dev-1.0.4-r0 (conflicting provides)
And why is that? It's because we have two providers here: One is
eudev-dev with a provider version of 3.2.14-r6, and the other is
systemd-dev with a provider version that is empty. This then results
in apk thinking the version number is greater, as seen above in the
verbose output. An unversioned provides= for an exact package name
match will never, ever, ever have any effect, even if the priority is
set super high, because the version number comparison is before apk
even starts looking at provider priorities.
Therefore, we should not have unversioned provides for eudev,
eudev-dev, eudev-libs and udev. Since those have fairly low version
numbers, we can just provide them with systemd's version number and
we'll be fine. This will now result in apk actually installing
systemd-dev when eudev-dev is prompted for installation.
2. After fixing the aforementioned issue, I noticed that I couldn't
build anything anymore. This is because my dependency tree would pull
in systemd and systemd-udev - completely normal. However, both
systemd and systemd-udev were providing eudev, and apk will refuse to
install two packages that provide the same thing at the same time.
The fix for this is to just not provide eudev in the top-level
systemd package and rather let systemd-udev do that.
With this, I can now finally build libcamera again!
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8857>
initramfs starts USB NCM gadget and unudhcpd for SSH login.
This requires special handling since unudhpcd is unmanaged by the
service manager until the userspace is started. Once entered in userspace,
the usb-moded-developer-mode needs to be activated which configures
NetworkManager and starts unudhcpd under the service manager.
This way, a full handover is possible and the gadgets can be properly
switched without any leftovers from the initramfs due to the unmanaged
situation.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8553>
In the previous commits,
- enabled bootloader support on 32-bit architectures,
- fixed libpwquality dependency,
- enabled libarchive and zlib supports,
- enabled xen kexec support,
- enabled valgrind support,
- added systemd-tests subpackage,
- added upstream build support.
So, let's bump the pkgrel to make them take effects.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8718>
For https://github.com/systemd/systemd/pull/39823
The upstream systemd's mkosi build requires that systemd-boot and ukify
are also built from the upstream source files.
Also, mkosi needs to pass specific source and build directories,
override default meson options, and so on. To support them, this adds
several extra environment variables support:
- $_systemd_upstream,
- $_meson_extra_configure_options,
- $_meson_builddir,
- $_upstream_srcdir.
Note, postmarketOS image built with mkosi already enables usr-merge. Hence
several symlink paths are changed when $_systemd_upstream is set.
This should not change any behavior when the above environment variables
are _not_ set.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8718>