main/devicepkg-utils: install default /etc/deviceinfo (MR 4283)

Previously, every device package would package its own /etc/deviceinfo
file, generating a conflict with every other device package. In a
previous commit we have moved the path to /usr/share/deviceinfo, but
we still want to install a sample "/etc/deviceinfo" file to guide
users on how to use the new features. This has the additional benefit
that there is only one of those files in the whole distro. However,
there is no dependency ordering between the device packages and
devicepkg-utils, so there's no warranty of which will be installed
first. Therefore, to avoid a conflict on most likely every user
upgrade, we use postmarketos-mvcfg.
This commit is contained in:
Pablo Correa Gómez 2023-07-30 10:13:51 +02:00 committed by Oliver Smith
parent 531dc8123d
commit 0b8814d156
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 24 additions and 2 deletions

View file

@ -1,16 +1,25 @@
pkgname=devicepkg-utils pkgname=devicepkg-utils
pkgver=0.2.0 pkgver=0.2.0
pkgrel=0 pkgrel=1
pkgdesc="Utilities for interacting with device packages" pkgdesc="Utilities for interacting with device packages"
url="https://postmarketos.org" url="https://postmarketos.org"
arch="noarch" arch="noarch"
license="MIT" license="MIT"
source="source_deviceinfo" depends="postmarketos-mvcfg"
install="$pkgname.pre-upgrade"
source="
etc-deviceinfo
source_deviceinfo
"
options="!check" options="!check"
package() { package() {
install -Dm644 "$srcdir"/source_deviceinfo -t "$pkgdir"/usr/share/misc install -Dm644 "$srcdir"/source_deviceinfo -t "$pkgdir"/usr/share/misc
install -Dm644 "$srcdir"/etc-deviceinfo "$pkgdir"/etc/deviceinfo
postmarketos-mvcfg-package "$pkgdir" "$pkgname"
} }
sha512sums=" sha512sums="
ef2181d7072b4ef62c11d3f50677fcd455e50cf89a3110e67fcaa6058ea695f101ded48b1442758494e3d23a97cdd93df6669656f329037020ba715af4341b55 etc-deviceinfo
a6e4f57280bed21fe3ac480eaa582c14fa8337d77386ff92c3e271818b5a028cac2a4f557ecfe9f7432e23a6dadd33bdc6b429a0e5e29cce2602b2a6e58a8bdd source_deviceinfo a6e4f57280bed21fe3ac480eaa582c14fa8337d77386ff92c3e271818b5a028cac2a4f557ecfe9f7432e23a6dadd33bdc6b429a0e5e29cce2602b2a6e58a8bdd source_deviceinfo
" "

View file

@ -0,0 +1,5 @@
#!/bin/sh
postmarketos-mvcfg-pre-upgrade \
devicepkg-utils \
/etc/deviceinfo

View file

@ -0,0 +1,8 @@
# Override settings from /usr/share/deviceinfo/deviceinfo with this file.
# After modifying: Some settings require running "mkinitfs" as root and/or
# a reboot to apply.
# Reference: https://postmarketos.org/deviceinfo
# Examples:
# deviceinfo_kernel_cmdline_append=" PMOS_NOSPLASH"
# deviceinfo_usb_network_function="ncm.usb0"