Commit graph

43 commits

Author SHA1 Message Date
Clayton Craft
45dec6cc73
pmos-base-ui: re-enable DNS filtering (MR 4846)
Alpine aports will have a patch[1] to fix the bug this was working around,
so let's re-enable it.

This reverts commit 4dac896160.

1. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61103

fixes #2601

Also see #1430
2024-06-04 09:42:33 -07:00
Clayton Craft
96e61da7a2
main/postmarketos-base-ui: audio backend improvements (MR 5145)
- Merge pulseaudio and audio-pulse subpkgs
  Just general cleanup, there's no reason to have a separate pulseaudio
  subpackage now since both were being installed anyways (one indirectly
  depended on the other)

- Add 'none' option for audio backend
  Some users might not want to have an audio backend installed taking
  up disk space. For example they're running a headless server or just
  don't want audio I/O, and PA + dependencies, which include mesa(!!)
  can be a lot... I measured 208MB

Note about drop the pulseaudio subpkg and it's "provides="...
This was done in 6e325417, when pmos-base-ui was split off from
pmos-base (3 years ago). I'm not sure how many people are still rocking
a 3yo pmOS install, but the original package (see 92e43e83) was only
pulled in by install_if, so I think the chance that it's in someone's
world file would be really really low.
2024-05-28 13:15:55 -07:00
Caleb Connolly
d35091be52
main/postmarketos-base-ui: initial support for systemd (MR 5171)
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>
2024-05-27 13:54:35 -07:00
Pablo Correa Gómez
f39d5a6291
main/postmarketos-base-ui: drop mvcfg (MR 5085)
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
2024-05-21 10:16:27 +02:00
Robert Eckelmann
d633f78749
main/postmarketos-base-ui: add font-twemoji as _pmb_recommends (MR 4755)
[ci:skip-build]: already built successfully in CI
2024-05-11 22:39:01 +02:00
Pablo Correa Gómez
4203227fd0
main/postmarketos-base-ui: add self-depend on base-ui-audio (MR 5091)
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
2024-05-08 11:16:48 -07:00
Pablo Correa Gómez
1cabc5fb2a
main/postmarketos-base-ui: disable wireplumber audio with pulseaudio (MR 5091)
This is necessary to avoid wireplumber messing with the sound when
pulseaudio is expected to take care of it.
2024-05-08 11:16:47 -07:00
Pablo Correa Gómez
b0d474ba3d
main/postmarketos-base-ui: add pipewire and wireplumber (MR 5091)
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
2024-05-08 11:16:46 -07:00
Brandon Boese
87d355e08d
main/postmarketos-base-ui: add audio subpackages (MR 5072) 2024-04-30 09:08:38 +09:00
Arnav Singh
4d4dc1baea
main/postmarketos-base-ui: fix tethering script when no UDC configured (MR 4907)
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
2024-03-11 13:53:18 -07:00
Arnav Singh
7fdf08a0ad
main/postmarketos-base-ui: remove tinydm-x11 subpackage (MR 4837)
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
2024-02-18 10:34:27 -08:00
Clayton Craft
4dac896160
pmos-base-ui: disable DNS filtering to work around dnsmasq hang (MR 4824)
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
2024-02-14 12:17:55 -08:00
Arnav Singh
518e62df34
main/postmarketos-base-ui: add tinydm subpackage to pull in xinit (MR 4814)
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
2024-02-12 11:27:33 -08:00
jane400
98af7cea03
main/postmarketos-base-ui: split usb-tethering into subpackage (MR 4788)
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.
2024-02-11 19:20:05 +01:00
Clayton Craft
75c679e139
pmos-base-ui: add flatpak subpkg to configure default repo (MR 4756) 2024-02-06 16:05:56 -08:00
Arnav Singh
ffd803d1dd
main/postmarketos-base-ui: read USB network interface name from configfs gadget (MR 4750)
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
2024-01-23 12:21:24 -08:00
Pablo Correa Gómez
1844030880
main/postmarketos-base-ui: reduce appealing of iwd wifi backend (MR4629)
We probably shouldn't recommend it when #2440 can happen to devices in
community.

[ci:skip-build] already built successfully in CI
2023-12-13 10:24:19 -08:00
Clayton Craft
be7e85bb0e
main/postmarketos-base-ui: Allow selecting WiFi backend (MR 4564)
With this change, users who build pmOS will be able to select a WiFi
backend (wpa_supplicant or iwd)

Also see: https://gitlab.com/postmarketOS/pmaports/-/issues/1379
2023-12-09 13:22:44 -08:00
Clayton Craft
bfa873343a
main/postmarketos-base-ui: setup cgroups on boot (MR 4585)
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
2023-12-01 10:24:28 -08:00
Dylan Van Assche
6002e51b70
postmarketos-base-ui: kill/restart unudhcpd unconditionally (MR 4354)
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
2023-08-28 22:50:26 +02:00
bademux
80fff9242a
main/postmarketos-initramfs: support custom IP addresses for USB net (MR 3349)
[ci:skip-build] already built successfully in CI
2023-08-23 13:06:15 -07:00
Willow Barraco
01a5c18735
main/postmarketos-base-ui: new qt-tweaks and qt-wayland submodules (MR 4242)
This is a refactorisation from the sxmo-common-qt_tweaks and
postmarketos-base-ui-phosh-qt_tweaks.
2023-07-17 13:08:58 -07:00
Arnav Singh
de08bca311
main/postmarketos-{base-ui,config-nftables}: reorganize NM configs and scripts (MR 4254)
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
2023-07-17 10:06:52 -07:00
Dylan Van Assche
4e0229f789
main/postmarketos-base-ui: randomize MAC address with NetworkManager (MR 4217)
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
2023-07-14 09:55:46 +02:00
Pablo Correa Gómez
ef00e24e5a
main/postmarketos-base-ui: depend on tzdata (MR 4175)
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
2023-06-12 07:46:29 +02:00
Luca Weiss
b2e5ad1670
main/postmarketos-base-ui: add supervisor to bluetooth service (MR 4136)
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
2023-05-31 08:05:38 +02:00
Dylan Van Assche
4b92e922ef
main/postmarketos-base-ui: enable USB tethering (MR 3819)
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
2023-05-21 19:42:14 +02:00
Clayton Craft
4b516916dc
pmos-base-ui-networkmanager: set up dnsmasq for filtering lookups (MR 3823)
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>
2023-04-29 23:40:52 -07:00
Luca Weiss
99553042ad
main/postmarketos-base-ui: configure openrc-settingsd for chronyd (MR 3953)
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
2023-04-12 16:53:15 +02:00
Clayton Craft
8c29eaed6e
main/pmos-base-ui: add postmarketos-default-camera dummy package (MR 3815)
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.
2023-03-01 08:42:45 +01:00
Raymond Hackley
c0db634e92
main/postmarketos-base-ui: networkmanager: depends on networkmanager{,-*} (MR 3749)
[ci:ignore-count]
[ci:skip-build]: already built successfully in CI
2023-01-06 21:53:28 +01:00
Clayton Craft
7327bd393f
main/*: depend on font-dejavu (MR 3521)
renamed in aports@ee78772612
2022-10-10 18:53:35 -07:00
Newbyte
fa048b7517
main/postmarketos-base-ui: run SDL in Wayland mode by default (MR 2669)
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
2022-10-09 15:23:59 +02:00
Raymond Hackley
829413ef71
main/postmarketos-base-ui-pulseaudio: depend on pulseaudio-utils (MR 3411)
start-pulseaudio-x11 uses pactl, which is not installed by default.
2022-09-08 13:56:06 +02:00
Clayton Craft
4a7e47013e
main/postmarketos-base-ui: simplify pulseaudio config (MR 3412)
config scripts in /etc/pulse/default.pa.d are loaded automatically by
default.pa
2022-09-08 09:15:22 +02:00
Luca Weiss
f117116be2
main/postmarketos-base-ui: add pmOS icon dependency (MR 2867)
Also properly sort the dependencies alphabetically while we're at it.
2022-01-21 01:09:59 +00:00
Antoni Aloy Torrens
bd178b8db3
main/postmarketos-base-ui: add Xwrapper script for X11 (MR 2773)
Xorg needs an Xwrapper.config script with the line 'needs_root_rights=yes' to get tinydm + sxmo to work
2021-12-19 21:46:02 +03:00
Oliver Smith
13a7778f94
main/postmarketos-base-ui: NetworkManager: hostname-mode=none (MR 2457)
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.
2021-08-24 14:37:41 +02:00
Bart Ribbers
323c909f8c
main/postmarketos-base-ui: add "$HOME/.local/bin" to $PATH (MR 2445)
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.
2021-08-18 17:05:02 +03:00
Dylan Van Assche
a40026d05e
postmarketos-base-ui: install obexd and obex-capabilities (MR 2245)
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.
2021-07-18 11:38:10 +03:00
Duje Mihanović
4f16edac7a
main/postmarketos-base-ui: Add ttf-dejavu to dependencies (MR 2341)
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
2021-07-12 10:36:43 -07:00
Newbyte
6d25d7f617
main/postmarketos-base: add Firefox env config to -tinydm subpackage (MR 2235)
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
2021-06-30 23:38:12 -07:00
Clayton Craft
6e325417de
postmarketos-base-ui: new aport (MR 2243)
This provides UI-specific config and dependencies for postmarketos-ui-*
packages.

fixes #1104
2021-06-23 13:00:00 +02:00