summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dummer <martin.dummer@gmx.net>2022-02-02 23:22:48 +0100
committerJoonas Niilola <juippis@gentoo.org>2022-02-06 17:17:34 +0200
commit5d0dbd9eee066baf0c291697bfd4b1a9673525c9 (patch)
tree0febe348944ce564ebe8662a2b8a18b4da7f4ed9 /media-tv/gentoo-vdr-scripts
parentacct-user/vdr: fix creation of user (diff)
downloadgentoo-5d0dbd9eee066baf0c291697bfd4b1a9673525c9.tar.gz
gentoo-5d0dbd9eee066baf0c291697bfd4b1a9673525c9.tar.bz2
gentoo-5d0dbd9eee066baf0c291697bfd4b1a9673525c9.zip
media-tv/gentoo-vdr-scripts: migrate to GLEP-81
move from eclass user to acct-user/acct-group packages fix systemd tmpfile handling fix many typos Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Martin Dummer <martin.dummer@gmx.net> Closes: https://github.com/gentoo/gentoo/pull/24059 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-tv/gentoo-vdr-scripts')
-rw-r--r--media-tv/gentoo-vdr-scripts/Manifest1
-rw-r--r--media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch18
-rw-r--r--media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf3
-rw-r--r--media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.8-r1.ebuild76
4 files changed, 98 insertions, 0 deletions
diff --git a/media-tv/gentoo-vdr-scripts/Manifest b/media-tv/gentoo-vdr-scripts/Manifest
index 790df2ca456b..73f54d566e10 100644
--- a/media-tv/gentoo-vdr-scripts/Manifest
+++ b/media-tv/gentoo-vdr-scripts/Manifest
@@ -1 +1,2 @@
DIST gentoo-vdr-scripts-2.8.tar.bz2 49662 BLAKE2B 1a49d03441c991f6aa08cefc3b6d3a926a18ef7cb6c97bef886f922901f681ab95e9b60648d3930136148dafdf87f702d564e5a89fb6945ef9ed0cec1c2fbbaa SHA512 587bfc329efb92f1d9d9f87b3eb88ff9c74f92587d20c1489e67c861c769f9cb307bd6314aa88dc7d2a1400bc408033b913093b8f219fa59857638f2d062eecf
+DIST gentoo-vdr-scripts-2.8.tbz2 49484 BLAKE2B 6b746e69ae396225c7def07d4d177f71690793eeac51202f8a5c33c20a089d6537e84ed2784f8b85cf04285fbf7288f26bfa45b7e984f8ad18ad54d122fe5b94 SHA512 3d47b8d048ae8c1e218ba825731f73562ee34e02388361f41fcc9aec5b4d54c6f66338b26cf17742b39c86a9676bf26bc9b6b2bd3249b798e1e3de61eb8ef355
diff --git a/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch b/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch
new file mode 100644
index 000000000000..b3ebb58bc994
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch
@@ -0,0 +1,18 @@
+diff -Naur gentoo-vdr-scripts-2.8.orig/etc/sudoers.d/vdr gentoo-vdr-scripts-2.8/etc/sudoers.d/vdr
+--- gentoo-vdr-scripts-2.8.orig/etc/sudoers.d/vdr 2019-12-15 01:04:54.000000000 +0100
++++ gentoo-vdr-scripts-2.8/etc/sudoers.d/vdr 2021-05-29 16:26:34.623489561 +0200
+@@ -1 +1,2 @@
+ vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh
++vdr ALL=NOPASSWD:/bin/systemctl daemon-reload
+diff -Naur gentoo-vdr-scripts-2.8.orig/usr/share/vdr/systemd/vdr-systemd_helper.sh gentoo-vdr-scripts-2.8/usr/share/vdr/systemd/vdr-systemd_helper.sh
+--- gentoo-vdr-scripts-2.8.orig/usr/share/vdr/systemd/vdr-systemd_helper.sh 2019-12-15 01:04:54.000000000 +0100
++++ gentoo-vdr-scripts-2.8/usr/share/vdr/systemd/vdr-systemd_helper.sh 2021-05-29 17:19:16.810413833 +0200
+@@ -105,7 +105,7 @@
+ # as the user under which vdr will run is controlled by systemd
+ sed -e "s:'-u' 'vdr' ::" -i ${SYSTEMD_ENV_FILE}
+
+- sync
++ sudo systemctl daemon-reload
+ eend "--start-pre"
+ elif [ "$1" = "--start-post" ]; then
+ ebegin "--start-post"
diff --git a/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf b/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf
new file mode 100644
index 000000000000..ee0910b6dfe8
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf
@@ -0,0 +1,3 @@
+d %HOME%/tmp 0755 vdr vdr -
+d /var/cache/vdr 0755 vdr vdr -
+
diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.8-r1.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.8-r1.ebuild
new file mode 100644
index 000000000000..0dcd0874358a
--- /dev/null
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.8-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit tmpfiles user-info
+
+DESCRIPTION="Scripts necessary for use of VDR as a set-top-box"
+HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-vdr-scripts.git/about/"
+SRC_URI="https://gitweb.gentoo.org/proj/gentoo-vdr-scripts.git/snapshot/${P}.tar.bz2 -> ${P}.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+
+DEPEND="
+ acct-group/vdr
+ acct-user/vdr"
+RDEPEND="${DEPEND}
+ app-admin/sudo
+ sys-process/wait_on_pid"
+BDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/systemd-fix-environment.patch" )
+
+pkg_setup() {
+ VDR_HOME="$(egethome vdr)"
+ echo "VDR_HOME=${VDR_HOME}"
+}
+
+src_prepare() {
+ default
+ cp "${FILESDIR}"/systemd-tmpfiles.conf "${WORKDIR}/${PN}.conf" || die
+ sed -i -e "s|%HOME%|$VDR_HOME|" "${WORKDIR}/${PN}.conf" || die
+}
+
+src_install() {
+ default
+ diropts -ovdr -gvdr
+ keepdir "${VDR_HOME}"
+ keepdir "${VDR_HOME}/shutdown-data"
+ keepdir "${VDR_HOME}/merged-config-files"
+ keepdir "${VDR_HOME}/dvd-images"
+ dotmpfiles "${WORKDIR}/${PN}.conf"
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+
+ elog "${CATEGORY}/${PN} supports an init script"
+ elog "to start a X server"
+ elog "Please refer for detailed info to"
+ elog "/usr/share/doc/${PF}/README.x11-setup\n"
+
+ elog "systemd is supported by ${CATEGORY}/${PN}"
+ elog "Read about it in /usr/share/doc/${PF}/README.systemd"
+
+ elog "Plugins which should be used are configured in"
+ elog "the config-file /etc/conf.d/vdr.plugins"
+ elog "or enable/disable them with \"eselect vdr-plugin\".\n"
+
+ if [[ -f "${EROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
+ grep -q ^DVDSWITCH_BURNSPEED= "${EROOT}"/etc/conf.d/vdr.dvdswitch
+ then
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
+ ewarn "This no longer has any effect, please use"
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
+ fi
+
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${EROOT}"/etc/sudoers; then
+ ewarn "Please remove the following deprecated line from /etc/sudoers:"
+ ewarn " vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
+ ewarn "sudoers handling is now supported by:"
+ ewarn "/etc/sudoers.d/vdr"
+ fi
+}