mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
alarm/kodi-rpi to 19.0-7
Major change here is moving kodi.service from system.slice into user.slice. Several positive tangibles include: * Ability to use USB drives directly in Kodi GUI. * More simplistic use/configuration of pulseaudio for more advanced setups. Another effect of this change is that calling `systemctl reboot` will not result in a gracefully exit and some profile data will be lost since systemd frankly, brutally kills user.slice cgs. In principal this is no different than data loss occurring from a user doing work when a sysadmin issues a reboot command without prior warning. The newly included man page and post_upgrade message will inform users of this and suggest several alternatives. This commit also introduces a simplification to packaging by using a versioned upstream source for init files instead of providing these six files on a per- -package-basis.
This commit is contained in:
parent
d2b3a61ef1
commit
405cf30158
7 changed files with 27 additions and 94 deletions
|
@ -1,5 +0,0 @@
|
|||
SUBSYSTEM=="vc-sm",GROUP="video",MODE="0660"
|
||||
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
|
||||
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
|
||||
SUBSYSTEM=="dma_heap", KERNEL=="linux*", GROUP="video", MODE="0660"
|
||||
SUBSYSTEM=="dma_heap", KERNEL=="system", GROUP="video", MODE="0660"
|
|
@ -15,7 +15,7 @@ pkgname=(
|
|||
'kodi-rpi-eventclients' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-dev'
|
||||
)
|
||||
pkgver=19.0
|
||||
pkgrel=6
|
||||
pkgrel=7
|
||||
arch=('armv7h' 'aarch64')
|
||||
url="https://github.com/popcornmix/xbmc/tree/gbm"
|
||||
license=('GPL2')
|
||||
|
@ -31,17 +31,7 @@ makedepends=(
|
|||
'libinput' 'libxkbcommon' 'linux-raspberrypi4-headers'
|
||||
)
|
||||
_codename=Matrix
|
||||
# Found on their respective github release pages. One can check them against
|
||||
# what is pulled down when not specifying them in the cmake step.
|
||||
# $CHROOT/build/kodi-git/src/kodi-build/build/download
|
||||
#
|
||||
# https://github.com/xbmc/FFmpeg/tags
|
||||
# https://github.com/xbmc/libdvdcss/tags
|
||||
# https://github.com/xbmc/libdvdnav/tags
|
||||
# https://github.com/xbmc/libdvdread/tags
|
||||
#
|
||||
# fmt and crossguid can be found http://mirrors.kodi.tv/build-deps/sources/
|
||||
#
|
||||
_init_version=1.126
|
||||
_libdvdcss_version="1.4.2-Leia-Beta-5"
|
||||
_libdvdnav_version="6.0.0-Leia-Alpha-3"
|
||||
_libdvdread_version="6.0.0-Leia-Alpha-3"
|
||||
|
@ -65,12 +55,8 @@ source=(
|
|||
"http://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/spdlog-$_spdlog_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz"
|
||||
kodi.service
|
||||
99-kodi.rules
|
||||
polkit.rules
|
||||
"ArchARM-kodi-init-v$_init_version.tar.gz::https://github.com/graysky2/kodi-standalone-service/archive/v$_init_version.tar.gz"
|
||||
kodi.config.txt
|
||||
sysusers.conf
|
||||
tmpfiles.conf
|
||||
use-mcpu-avoiding-march-and-mtune.patch
|
||||
0001-mcpu-cortex-application-to-ffmpeg.patch
|
||||
)
|
||||
|
@ -98,12 +84,8 @@ sha256sums=('92adf716d9d42b9b8cb86b997fb7a98a95fbb782f2db218cba54c4cd3c759527'
|
|||
'1789b97e790da8f2cb5ff827d15580878c8629fd889f5f038d7524dca43eacc9'
|
||||
'b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a'
|
||||
'5ad9f95c53e8f29853c1fefa0a20a301be4045e2c7ae49d1164bc74d94155627'
|
||||
'bb8f0c0fd03ff7c13c0503f2c96f86772d8bbd05adbc97d5b383f603a98456c0'
|
||||
'61a0648d4a5086f560ceb4e020f82472d00b99398f2cacba94fad3e96c4c362a'
|
||||
'5d38a895ee7b93689fab79124a3aad23a5e3e643abd08878d778d04066c8d26f'
|
||||
'7bc26a77a06c45b740e840f14414c5d4588b323280a8a238c6a6d7a5498adb05'
|
||||
'ca91d35bf6d87ed6e43f366a87babf26eed9f186ca362edb59ae242fc62b3692'
|
||||
'f521b98232e5035b7cada46cf03975b8d753e93d0802bf22913fceed769f9d96'
|
||||
'9c5e79ed8719cd032a3b17dac585aeff28a198e37af1da9af68ef1b86bab4d18'
|
||||
'16d6c79ff3a3d3653f21d77a36326a0335c8cec49a9c06dbc2de0ed143e50a9f'
|
||||
'76eafede11af936bb554932b2be71ce91d4bf1c07107d847500ebbf3ff7d7245')
|
||||
|
||||
|
@ -220,23 +202,28 @@ package_kodi-rpi() {
|
|||
-P cmake_install.cmake
|
||||
done
|
||||
|
||||
# fix permissions necessary for accelerated video playback
|
||||
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/usr/lib/udev/rules.d/99-kodi.rules"
|
||||
|
||||
# systemd manages kodi user
|
||||
install -Dm644 "$srcdir"/sysusers.conf "$pkgdir/usr/lib/sysusers.d/kodi.conf"
|
||||
install -Dm644 "$srcdir"/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/kodi.conf"
|
||||
|
||||
# systemd service and polkit rules
|
||||
install -Dm0644 "$srcdir/kodi.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
||||
install -Dm0644 "$srcdir/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
||||
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
||||
|
||||
# setup video drivers for kodi-gbm
|
||||
install -Dm0644 "$srcdir/kodi.config.txt" "$pkgdir/boot/kodi.config.txt"
|
||||
|
||||
# rpi4 wants 512 MB of memory
|
||||
sed -i 's/@@@/512/' "$pkgdir/boot/kodi.config.txt"
|
||||
|
||||
_initshit="$srcdir/kodi-standalone-service-$_init_version/arm"
|
||||
|
||||
# fix permissions necessary for accelerated video playback
|
||||
install -Dm0644 "$_initshit/udev/99-kodi.rules" "$pkgdir/usr/lib/udev/rules.d/99-kodi.rules"
|
||||
|
||||
# systemd manages kodi user
|
||||
install -Dm644 "$_initshit"/init/sysusers.conf "$pkgdir/usr/lib/sysusers.d/kodi.conf"
|
||||
install -Dm644 "$_initshit"/init/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/kodi.conf"
|
||||
|
||||
# systemd service and polkit rules
|
||||
install -Dm0644 "$_initshit/init/kodi.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
||||
install -Dm0644 "$_initshit/polkit/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
||||
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
||||
|
||||
# man page
|
||||
install -Dm0644 "$_initshit/doc/kodi.service.1" "$pkgdir/usr/share/man/man1/kodi.service.1"
|
||||
}
|
||||
|
||||
package_kodi-rpi-eventclients() {
|
||||
|
|
|
@ -17,6 +17,11 @@ post_install() {
|
|||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
# version 19.0-7 moves kodi.service to user.slice so warn users about data loss
|
||||
if (($(vercmp 19.0-7 $2) > 0)); then
|
||||
echo "-> kodi.service now runs in systemd's user.slice, see man kodi.service for"
|
||||
echo "-> important info on how to reboot or shutdown the system to avoid data loss!"
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
[Unit]
|
||||
Description=Kodi standalone (GBM)
|
||||
After=remote-fs.target network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
|
||||
Wants=network-online.target polkit.service upower.service
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
User=kodi
|
||||
Group=kodi
|
||||
EnvironmentFile=-/etc/conf.d/kodi-standalone
|
||||
TTYPath=/dev/tty1
|
||||
Environment=WINDOWING=gbm
|
||||
ExecStart=/usr/bin/kodi-standalone
|
||||
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-gbm
|
||||
Restart=on-abort
|
||||
StandardInput=tty
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
Alias=display-manager.service
|
|
@ -1,15 +0,0 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (subject.user == "kodi") {
|
||||
polkit.log("action=" + action);
|
||||
polkit.log("subject=" + subject);
|
||||
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id.indexOf("org.freedesktop.udisks2.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,16 +0,0 @@
|
|||
# override these settings by copying this to /etc/sysusers.d/ and modifying it therein
|
||||
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g kodi - -
|
||||
u kodi - "Kodi User" /var/lib/kodi
|
||||
|
||||
# supplemental groups
|
||||
m kodi audio
|
||||
m kodi disk
|
||||
m kodi input
|
||||
m kodi network
|
||||
m kodi optical
|
||||
m kodi power
|
||||
m kodi storage
|
||||
m kodi tty
|
||||
m kodi video
|
|
@ -1,3 +0,0 @@
|
|||
#Type Path Mode User Group Age Argument
|
||||
d /var/lib/kodi 0750 kodi kodi - -
|
||||
Z /var/lib/kodi - kodi kodi - -
|
Loading…
Reference in a new issue