Commit graph

74 commits

Author SHA1 Message Date
Clayton Craft
4136eeae5a
postmarketos-base: add nofde subpackage (MR 2278) 2021-06-26 16:28:08 -07:00
Clayton Craft
92e43e8324
postmarketos-base: remove UI-specific config/dependencies (MR 2243)
These will be included in a new postmarketos-base-ui package
2021-06-23 13:00:00 +02:00
Clayton Craft
a83a0a0726
postmarketos-base: add nftables as dependency (MR 2060)
This enables the firewall by default, and could be split off into a
future ui-base package so that the firewall (among other things) are
enabled only when UIs are installed.
2021-06-14 14:30:50 -07:00
Ignacy Kuchciński
7fb10635e0
main/*: fix outdated url variables (MR 2226)
[ci:skip-vercheck]
2021-06-06 19:02:54 +02:00
Dylan Van Assche
5e562fdbc6
main/postmarketos-base: add pulseaudio config
Automatically switch to a connected USB or
Bluetooth audio device and duck the main volume
when a notification is received.
2021-06-02 18:58:04 +02:00
Oliver Smith
f3b949296d
main/postmarketos-base: alsa playing -> no inhibit (MR 2216)
Don't suspend the device while alsa is playing. I ran this for two days
in combination with suspend time set to 1 min on the pinephone and it
works great. Finally no suspend while VLC is playing podcasts.
2021-06-02 01:26:47 +02:00
Bart Ribbers
9387842aec
main/postmarketos-base: remove networkmanager from depends (MR 2174) 2021-05-24 11:39:07 +02:00
Dylan Van Assche
8330d2a552
main/postmarketos-base: add dependency on wireless-regdb (MR 1974)
CRDA in the kernel requires a regulatory database to be available
to configure the WiFi card correctly following the regulations in
each possible environment.
2021-02-23 14:54:49 +01:00
Martijn Braam
f099d73fc8
main/postmarketos-base: update motd for the cheatsheet (MR 1961) 2021-02-21 11:47:07 +01:00
Oliver Smith
6e7b75abb5
main/postmarketos-base: add dummy post-upgrade (MR 1964)
Add post-upgrade file with a warning, so we don't symlink it to the
post-install script.
[ci:skip-vercheck]: no need to rebuild the package

Related: build.postmarketos.org#85
2021-02-17 17:49:58 -08:00
Oliver Smith
e4ef9fba72
main/postmarketos-base: retire devmappings service (MR 1820)
Remove devmappings service. The original purpose of this service was to
ensure that /boot is mounted properly after the initramfs passed control
to OpenRC, because the initramfs used to umount /boot before that. With
/etc/fstab alone, /boot get not get mounted with subpartitions (which we
use on Android devices), if util-linux >= 2.33 was installed (MR 115).

Nowadays, we don't umount /boot in the initramfs before passing control
to OpenRC anymore (MR 1398). So this service isn't needed anymore, and
prevented the previous pmOS_inst_boot <> pmOS_boot patch from working
correctly.
2021-01-27 16:12:27 +01:00
Martijn Braam
3ac6f21c6c
main/postmarketos-base: ship os-release (MR 1522)
Ship the /etc/os-release file from the postmarketos-base package instead
of having it generated by pmbootstrap.
2021-01-07 23:42:49 +01:00
clayton craft
5a06a6bb06
postmarketos-base: replace elogind suspend hook with sleep-inhibitor (MR 1825)
This adds sleep-inhibitor as a dependency when elogind is present, and
installs a conf for it with some plugins enabled that are beneficial to
devices running pmOS. The elogind suspend hook is dropped.

This resolves issues where suspend is aborted in the hook *after*
PrepareForSleep is sent over dbus (which might cause some things to
disable radios/modems, etc for suspend).

The 'period' in the conf is in minutes, a value of 0.1 is 6 seconds,
which seems reasonable for releasing the lock when conditions for
inhibiting no longer apply, without spinning the CPU too frequently.
2020-12-28 00:36:35 +01:00
Oliver Smith
f430dae13b
main/postmarketos-base: add tinydm config (MR 1795)
Set postmarketOS default UID in tinydm config, so tinydm can be
upstreamed to Alpine without hardcoding the pmOS default UID in the
tinydm packaging.
2020-12-07 18:21:28 -08:00
Oliver Smith
8b7adeddf3
main/postmarketos-base: remove post-install config overrides (MR 1713)
Do not change config files in post-install scripts anymore (with sed
commands or by other means). Instead, ship the files inside the packages
and use "replaces", so apk allows the package to overwrite files from
other packages:
https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#replaces

Notes on specific files:
* /etc/elogind/logind.conf: original file only consists of commented out
  compile defaults. Copy them over for now. In the future we should be
  able to install our own config into a .d directory, without all the
  comments: 8358fc5950
* /etc/fstab: original file only has /dev/cdrom and /dev/usbdisk
  entries, which are not useful for postmarketOS:
  https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/alpine-baselayout/APKBUILD
* /etc/motd: reformat the text, add link to the chat
* /etc/conf.d/syslog: original file only contained 'SYSLOGD_OPTS="-t"',
  make the override file as if the sed statement from post-install was
  executed
* /etc/wpa_supplicant/wpa_supplicant.conf: post-install script touches
  this file. We probably added it back in 2017 in relation to enabling
  D-Bus (though the PR does not mention it explicity), but at least with
  the current init.d script of NetworkManager, we can simply have '-u' in
  wpa_supplicant_args:
  https://github.com/postmarketOS/pmbootstrap/pull/578
  https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/wpa_supplicant/wpa_supplicant.initd
* /etc/sudoers: base on original /etc/sudoers, but remove all the
  commented out stuff except for the visudo note at the top. We could
  also put a file in /etc/sudoers.d, but since the wheel line is present
  in the original /etc/sudoers and only commented out, it would be kind
  of unexpected to enable it in a file in /etc/sudoers.d. I prefer this
  stripped down version of the file, that is easy to read.
2020-12-03 13:11:03 +01:00
Oliver Smith
c8a79d6fa6
main/postmarketos-base: fix install_if for subpkgs (MR 1713)
Instead of install_if="$pkgname xorg-server" etc, it should be
install_if="$pkgname=$pkgver-r$pkgrel xorg-server".

Reference: https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#install_if
2020-12-03 13:11:03 +01:00
Oliver Smith
0105a1d8ef
main/postmarketos-base: put full path in filenames (MR 1713)
Refactor the install code to be generic, so we only need to add the new
path in one place when adding a new file. Put the full path into the
filename to make this possible.

I've tried to mimic the final directory structure in the aport first
(e.g. $pkgdir/sbin/swapfile -> main/postmarketos-base/sbin/swapfile),
but that leads to conflicts as abuild only takes the filename for
checksums (conflict with etc/conf.d/swapfile):
https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10013

We don't really need checksum verification for the files shipped in the
same directory (not downloaded), but nevertheless this is a bug. It
leads to confusing behavior and might be fixed by letting abuild demand
that there is only one source file with the same name, as I suggested in
the issue linked above. So let's avoid this altogether with the flat
file name.
2020-12-03 13:11:03 +01:00
clayton craft
c37012a909
postmarketos-base: add elogind hook to conditionally cancel suspend (MR 1665)
This hook will cancel a suspend if:
        - There's an open ssh connection to the system
        - apk database is locked
2020-11-13 00:33:31 -08:00
clayton craft
81fc6a0bed
postmarketos-base: enable rfkill service (MR 1693)
This enabled the rfkill service, part of util-linux, that saves/restores
radio device state on shutdown/boot.

fixed #836
2020-11-09 15:09:32 +01:00
Bart Ribbers
aced152afc
main/postmarketos-base: depend on dnsmasq (MR 1438)
dnsmasq is required by NetworkManager for WiFi Hotspot to work.
2020-08-23 12:31:22 +02:00
Bart Ribbers
7b58ed7fce
main/postmarketos-base: stop the power key from shutting down devices (MR 1499)
Pressing power button should not power off a device. Although it is
expected on desktops and laptops, it isn't expected on phones and
tablets. Instead it should just turn off the screen or go into a deep
sleep, but that isn't handled by elogind. So let elogind just ignore the
button altogether.

Also re-order the dependencies alphabetically while we're touching the
package anyway
2020-08-22 22:41:41 +02:00
Oliver Smith
784782f543
main/postmarketos-base: keep /etc/fstab (MR 1398)
Only add a comment, do not try to mount the root or boot partitions
anymore. The initramfs is doing this already.

Related: https://postmarketos.org/fstab
2020-07-08 18:02:49 +02:00
Oliver Smith
58ae4df2ef
main/postmarketos-base: rm write_unless_modified (MR 1398)
Get rid of the "write_unless_modified" code, which was supposed to only
change /etc/fstab, /etc/issue, /etc/motd if the user did not modify it.

This is nice in theory, but we have a bug report where the code did not
do what it should (apk audit possibly failed due to a qemu bug?), and
then it lead to strange bugs related to not having the expected
/etc/fstab installed.

Fixes: #661, #258
2020-07-08 18:02:49 +02:00
Federico Amedeo Izzo
0e502a5139
postmarketos-base: disable swclock for all devices, enable it for nokia-n900 and samsung-i9070 (MR 1166) 2020-05-23 17:57:27 +02:00
Bart Ribbers
98f9320f35
main/postmarketos-base: remove unnecessary dependencies (!1018)
These dependencies don't belong here.
- iw: should be installed by the user themselves when wanted
- nano: should be installed by the user themselves when wanted
- pulseaudio: should be installed by the UI meta packages that need it
  instead
- pulseaudio-alsa: should automatically be installed when both
  PulseAudio and alsa are installed

https://gitlab.alpinelinux.org/alpine/aports/merge_requests/4820
2020-03-03 21:39:27 +03:00
Pops Dylan
7b7c1db0ff
main/postmarketos-base: remove initstepslew from chrony configuration (!838)
Comment out the initstepslew line in /etc/chrony/chrony.conf.
initstepslew can delay booting while chrony sets the time. The
makestep 1 -1 line in the configuration also causes chrony to step
the time (whenever the offset is greater than 1s), making
initstepslew redundant.
2019-12-30 18:34:14 +01:00
Drew DeVault
32de4f4536
main/postmarketos-base: trim down dependencies (!806)
htop and tmux don't belong in this package, and dbus is a transitive
dependency via networkmanager et al, and so it doesn't need to be
specified here.
2019-12-11 17:29:07 +01:00
Pops Dylan
4c67611c90
postmarketos-base: configure getty using deviceinfo_getty variable (!771)
On some devices a getty should run on the serial console.
Configure the getty by setting the deviceinfo_getty variable. The
format is "<port>;<baud rate>". For example, "ttyS0;115200".

A post-installation trigger in postmarketos-base checks
/etc/deviceinfo, and modifies /etc/inittab if the device should run
a getty.
2019-12-07 01:32:23 +01:00
Danct12
0cff86852d
main/postmarketos-base: networkmanager permission fix (!777)
This patch fixes nmtui and nm-applet not authorized to control
networking.

Signed-off-by: Danct12 <danct12@disroot.org>
2019-12-05 22:53:30 +01:00
Bart Ribbers
5e3a2dd7a6
main/postmarketos-base: add pulseaudio and pulseaudio-alsa to enable audio (!621) 2019-09-20 15:41:25 +02:00
Oliver Smith
17292f4f5e
main/postmarketos-base: fix wpa_supplicant config (!365)
Fix wifi on htc-ace by properly setting nl80211 before wext.

/etc/conf.d/wpa_supplicant is supposed to get modified twice with the
current code in the post-install file. The first one was patched
recently to set nl80211 before wext, but that change does not work in
practice, for two reasons:

1. The code block does not even get executed, because apk reports that
   /etc/conf.d/wpa_supplicant was already modified (by a package that
   was installed before, in its post-install script? I could not find
   out which one does that though).
2. Even if it worked, the second code block would revert the change and
   put wext before nl80211 again.

Fix this by removing the first code block, and changing the order in the
second one. Make it easier to catch such errors in the future, by
printing, which files get modified, or get skipped. Set "#!/bin/sh -e",
so the script can not fail silently.

When doing pmbootstrap -y zap and then pmbootstrap install, the output
looks like this:

(141/151) Installing postmarketos-base (3-r26)
Executing postmarketos-base-3-r26.post-install
- Modifying: /etc/fstab
- Modifying: /etc/issue
- Modifying: /etc/motd
- Modifying: /etc/conf.d/syslog
- Modifying: /etc/conf.d/wpa_supplicant
- Modifying: /etc/sudoers
- Modifying: /etc/chrony/chrony.conf
2019-06-30 02:00:08 +02:00
Danct12
aff352d9c3
main/postmarketos-base: ignore confusing p2p0 interface (!344)
On some devices (mainly the ones that uses wcnss-wlan), there is another
interface beside wlan0, which is p2p0. It is used for Wi-Fi Direct, but
beside that, this might also cause confusion to other users as well. And
also you cannot connect into any network with this interface.
2019-05-14 22:24:26 +02:00
Alexey Min
6818cd6bac postmarketos-base: add deferred-initcalls openrc service (!338)
This script triggers late initialization of some platform
drivers that cannot be probed at boot time, because for
example they use firmware blobs on partitions that are
not mounted during early kernel startup.

Disabled by default, can be enabled on per-device basis.
2019-05-02 21:07:31 +00:00
Luca Weiss
40d110fcc9 Change default NetworkManager DHCP client to dhcpcd (!278)
Remove the override in ouya-ouya (and in postmarketos-base) and add an
override for raspbery-pi3

Fixes #210
2019-03-29 14:53:47 +01:00
Matthias Berndt
83bdddad4c
postmarketos-base: nl80211 before wext in wpa_supplicant (!264)
Fixes wifi on htc-vision.
2019-03-09 22:33:33 +01:00
Robert Yang
e76bd07487 postmarketos-base: Make NetworkManager conf more easily overridable (!260)
Later conf files override earlier ones. With this change, device specific
packages can ship their own NetworkManager configs that override the
postmarketos config.

Example: 10-samsung-p4wifi.conf would override 00-postmarketos.conf
2019-03-07 11:09:05 -05:00
Matthias Berndt
f0f6db1bae
pmos-base: skip failures in devmappings.initd (!164)
Continue even if some kpartx commands fail. This is necessary for the
htc vision and perhaps other devices.
2019-01-22 07:30:44 +01:00
Robert Yang
6d25c1bef6 postmarketos-base: Add openrc service that creates partition mappings (!115)
When util-linux v2.32 updated v2.33, remounting a partition stopped
working.

  mount -n -o remount,rw /
  mount: /: can't find LABEL="pmOS_root".

This service will add the pmOS rootfs partitions to device mapper so that
the remount root partition will succeed.

Fixes issue #156
2018-12-26 12:08:36 -05:00
Oliver Smith
c2f57b050e
bump pkgrel 2018-11-27 07:47:11 +01:00
Sebastian Fleer
e7f828b07f
networkmanager: use built in dhcp client
Network Manager does not support dhcpcd with IPv6. Fixes issue #45
2018-11-27 07:47:11 +01:00
Oliver Smith
a31244d28a Remove github.com references
* Travis and Coveralls badges
* aports: instead of <https://github.com/postmarketOS>, use
  <https://postmarketos.org>
* References to full URLs to issues and pull requests replaced with
  a hash and the number
* grsec check: simplify error message, remove link to github issue
  (nobody is using that anymore anyway)
2018-06-30 09:00:48 +02:00
Bhushan Shah
0e3f710b86 main/postmarketos-base: Disable randomizing mac address while scanning
While this feature is nifty, it doesn't really work with most mobile
wireless drivers. Wireless drivers decide to go in "weird" state when
the mac address changes at runtime.

I remember talking to someone in IRC about this and getting it disabled.
not sure how this ended up here.

See: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1681513

This option is not working with most of the wireless drivers normally.
For example e.g it doesn't really play nice with one of my laptop's
wireless driver.
2018-06-25 22:53:22 +02:00
Oliver Smith
340a17d98f Set all of user's groups in "pmbootstrap install" (#1432)
The postmarketos-base package used to make the user part of the "video"
and "audio" groups. However, this did not work reliably, and we were
adding the "wheel" group in "pmbootstrap install" anyway.

Now all groups get added in "pmbootstrap install", and the names of the
groups have been moved to `pmb.config.install_user_groups`.
2018-04-23 20:52:03 +00:00
Daniele Debernardi
19df13804c Remove /etc/network/interfaces and networking service from device packages (#1293)
This is not necessary anymore since there is now NetworkManager.
2018-03-05 21:18:13 +00:00
Martijn Braam
6caeba319e postmarketos-base: Enable NetworkManager by default (#388) 2018-03-04 11:07:21 +00:00
Oliver Smith
e654a995e6 device packages: depend on postmarketos-base (#1258)
* device-*: add postmarketos-base to depends
* aportgen: add postmarketos-base to depends
* Add test case
* postmarketos-base: Don't depend on devicepkg
* msm-fb-refresher: Enable service in post-install
2018-02-25 18:40:54 +00:00
Pierre Rudloff
0685ccaee7 gp-peak: Add support for osk-sdl and audio (#1243)
* gp-peak: Add support for osk-sdl
* gp-peak: Move non-kernel files to device-gp-peak
* gp-peak: Add audio support
Manually trigger the udev rules for audio devices and add the default user to the audio group
2018-02-22 23:36:24 +00:00
Pierre Rudloff
eb6ab4c641 gp-peak: display and touch screen (#1226)
Adds a /etc/local.d/ script in order to work around
udev being broken with this kernel.
2018-02-18 01:42:46 +00:00
clayton craft
a6c9c353ff Install dbus by default (#783)
Since we are starting it on boot, and wpa_supplicant is being run in 'dbus mode', it makes sense to have it installed by default.
2017-10-18 19:02:28 +00:00
Oliver Smith
8d927d43bb postmarketos-base-x11: Less dependencies (#720) 2017-10-14 23:14:19 +00:00