Not sure if dropping the networkmanager-openrc dependency causes issues.
Otherwise, make the elogind subpackage conflict with systemd-logind.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
All these config update are there since 2021. Having them there
serves no purpose, apart from increasing packaging complexity and
have some unnecessary files under /etc
So that we can warranty that any of the packages is installed by
default. In addition, make sure that pipewire-pulse can never be
installed together with
postmarketos-base-ui-audio-pulseaudio. pipewire-pulse provides
pulseaudio, so installations that have pipewire-pulse already
installed would end up in a very weird position otherwise.
Fixes 87d355e08d
[ci:skip-build]: already built successfully in CI
These are increasingly needed for camera and screen sharing/recording
tasks. To make the development easier and future-proof, install them
by default. They can now be removed from the audio subpackage
Fixes#2785
Reading the `ifname` of a gadget that has not been configured with a UDC
succeeds with the content `(unnamed net_device)` instead of failing.
So we need to explicitly check that a UDC was configured before we read
the interface name.
Ref: #2648
[ci:skip-build]: already built successfully in CI
This reverts commit 518e62df34
"main/postmarketos-base-ui: add tinydm subpackage to pull in xinit (MR 4814)"
aports/tinydm now provides its own -x11 subpackage to do this since
7df6d02609
Crappy workaround, it's better than having DNS broken...
See: https://gitlab.com/postmarketOS/pmaports/-/issues/2601
Also removed it from shellcheck, because SC doesn't like all of the
unused/unreachable things after the `exit 0`. This commit should be
reverted when the issue is actually fixed later...
[ci:skip-build] already built successfully in CI
tinydm uses startx for Xorg UIs, which is provided by the xinit package.
The xinit package used to be pulled in automatically by
the xorg-server package, but this stopped being the case with
1fd2d70696
this allows to opt-out of usb-tethering on pmOS devices with
`apk add !postmarketos-base-ui-networkmanager-usb-tethering`
this is useful for developers with laptops on pmOS / dailydriving
those laptops on pmOS.
[ci:skip-build]: Already built successfully in CI.
The configfs gadget can provide the actual interface name, which may not be
the default "usb0" since another gadget driver might have claimed "usb0".
This code is based on the `start_unudhcpd` function in `init_functions.sh`
[ci:skip-build] already built successfully in CI
Allows things like podman/docker to work out of the box.
I looked at /etc/init.d/cgroups, and having this service enabled isn't a
problem if the kernel doesn't have cgroup support... in that situation,
the service script just simply exits (success).
[ci:skip-build] already built successfully in CI
In some cases, the dispatcher script fails if unudhcpd is already running.
Forcefully killing unudhcpd resolves the issue.
Fixes#2267.
Tested-by: Sicelo A. Mhlongo <absicsz@gmail.com>
[ci:skip-build]: already built successfully in CI
1. Move all configs from /etc/NetworkManager/conf.d to
/usr/lib/NetworkManager/conf.d since the latter is more appropriate for
distribution-provided config files. In particular this means apk will
update them when the package file is changed rather than creating
`.apk-new` files. If a user wants to override such a file, they can create
a file with the same name under /etc/NetworkManager/conf.d
2. Move all dispatcher scripts from /etc/NetworkManager/dispatcher.d to
/usr/lib/NetworkManager/dispatcher.d for the same reason.
3. Rename all configs to have a "50-" prefix so that users can add their own
"99-" overrides with a guarantee that they'll be processed after
distribution-provided configs.
4. Rename dispatcher scripts to have a "50-" prefix instead of "85-" and "99-"
since they're distribution-provided files.
5. Move 50-tethering.conf from the base-ui package to
the base-ui-networkmanager package.
There are also some device packages that put config files without a numeric
prefix in /etc/NetworkManager/conf.d . This MR doesn't change those.
[ci:skip-build] already built successfully in CI
Configure NetworkManager to randomize the MAC address during WLAN scans
and of WLAN and Ethernet ifaces per connection. This reduces the
possible tracking that might occur based on MAC addresses with WiFi
hotspots. This matches the behavior of Android: it uses a random MAC
address during a WLAN scan and a random one per connection.
[ci:skip-build]: already built successfully in CI
Most UIs already implicitly depend on this in some way, and from the
user-facing point of view, it is sensible to have the full DB of timezones
available, in case the user wants to swap timezone or requires working
with them in different ways. Having it as a explicit dependency makes more
sense than relying on backward dependencies.
Background: https://gitlab.com/postmarketOS/pmaports/-/issues/2168#note_1426261355
[ci:skip-build]: already built successfully in CI
Due to an issue, probably in bluez, the bluetooth service often fails to
start on boot. Restarting the service later make bluez start correctly.
While adding the service supervisor for just this issue isn't a great
solution, in any case having a supervisor on such an important system
service is good, and it fixes this issue also by restarting the
bluetooth service after the first failure on boot.
May 30 08:05:56 fairphone-fp4 daemon.info bluetoothd[1420]: Bluetooth daemon 5.66
May 30 08:05:56 fairphone-fp4 daemon.err bluetoothd[1420]: src/main.c:main() Unable to get on D-Bus
Also while we're editing the list of subpackages make sure they're
ordered alphabetically.
[ci:skip-build]: already built successfully in CI
USB tethering allows users to use their phone's WiFi or WWAN interface
as an access point for the device they connect the phone with over USB.
This way, they can use their data plan with a laptop or desktop when
regular Internet access is absent.
Configure NetworkManager to manage the usb0 iface from initfs so users
can configure it in GNOME Settings or KDE. Include a NetworkManager
dispatcher script as well to handle postmarketOS' setup with unudhcpd as
we want to provide an SSH login over USB when tethering is disabled. If
tethering is enabled, unudhpcd is stopped and its functionality is taken
over by NetworkManager through an instance of dnsmasq. NetworkManager
will also configure the necessary settings to allow IP forwarding and
firewall rules during tethering. Once disabled, NetworkManager cleans up
these settings and our dispatcher script starts unudhcpd again.
Due to upstream changes, NetworkManager requires networkmanager-dnsmasq
subpackage as dependency as dnsmasq needs DBus support for
NetworkManager. Without it, NetworkManager will silently fail spawning
dnsmasq instances.
[ci:skip-build]: already built successfully in CI
This uses a dispatcher script to configure filtering A and AAAA records
based on which IP versions are routable on the NM primary connection.
gojq is preferred over the 'standard' jq because it's considerably
faster... the dispatcher script took 0.89s on my L5 with jq, and 0.07s
with gojq. the difference is probably greater on slower phones... so it
seemed worth installing it.
fixes#1430
Co-authored-by: Arnavion <me@arnavion.dev>
We need to tell openrc-settingsd which ntp service to use, otherwise
it'll default to busybox ntpd which we don't want.
Additionally make sure openrc-settingsd service gets launched at boot
with the post-install/post-upgrade script.
[ci:skip-build]: already built successfully in CI
This is a dummy package that other packages can install_if on to install
the appropriate camera app for the device/UI. It's intended to be added
to pmb_recommends= for pmos-ui-* packages that want to have a camera by
default.
This is possible now that all SDL (1) applications use sdl12-compat
instead of "classic" SDL 1.2. Note that this only is applied to user
interfaces that use Wayland and are launched through tinydm.
See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12739
Disable the hostname management feature of NetworkManager. This isn't
useful for the postmarketOS use case, where we set one hostname in
/etc/hostname via pmbootstrap and want it to be used. (It makes more
sense for normal PCs, which may just have the hostname 'localhost' at
the end of the installation and then not be unique in the network.)
NetworkManager is supposed to only change the hostname if it is set to
localhost, however this detection does not work properly in
postmarketOS. I've skimmed through sources of elogind, NetworkManager
and OpenRC a bit and found that in OpenRC the definitive location to put
the hostname is /etc/hostname. The other path, /etc/conf.d/hostname, is
just a fallback. Experiments show that setting something in
/etc/conf.d/hostname does prevent NM from setting a hostname offered by
the DHCP server, but it's not clear to my why this happens. I suspect
elogind + dbus. Disabling this feature we don't need anyway seems like a
good approach to me without wasting too much time here.
This directory is specified by the XDG Base Directory specification
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).
Quoting:
> User-specific executable files may be stored in $HOME/.local/bin.
> Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.
So let's actually do this. This way also binaries installed by e.g. Pip
or Cargo will be usable out-of-the-box rather than that the user has to
figure out why it's not appearing in their PATH.
Install obex-capabilities and a modified DBus Service
for BlueZ's obexd when BlueZ OBEX support is installed.
UIs depending on BlueZ are now also depending on
bluez-obexd for OBEX support through various MRs at Alpine.
This package used to be installed through osk-sdl, but now osk-sdl is only
installed when FDE is enabled, and so when it is not enabled the system has no
fonts to use, which means UIs like Sway and Weston have broken fonts. This
commit fixes the issue.
[ci:skip-build] already built successfully in CI
Currently, this only sets Firefox to run in Wayland mode, but in the
future it might be used to make e.g. SDL applications run in Wayland
mode.
SDL applications are not set to run in Wayland mode right no as
SDL 1.2 uses the same environment variable as SDL 2.0 for
controlling video driver (SDL_VIDEODRIVER) and SDL 1.2 does not
support Wayland and crashes if an invalid value is provided for
SDL_VIDEODRIVER, and as such setting SDL_VIDEODRIVER=wayland
globally would break all SDL 1.2 applications. This will however be
fixed once SDL 1.2 is replaced by sdl12-compat in Alpine, as
sdl12-compat implements the SDL 1.2 API and ABI via SDL 2.0 and as
such supports Wayland. As such, once this happens we can start
setting SDL_VIDEODRIVER=wayland.
[ci:skip-build] already built successfully in CI