1 |
commit: 5d0dbd9eee066baf0c291697bfd4b1a9673525c9 |
2 |
Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net> |
3 |
AuthorDate: Wed Feb 2 22:22:48 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 6 15:17:34 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d0dbd9e |
7 |
|
8 |
media-tv/gentoo-vdr-scripts: migrate to GLEP-81 |
9 |
|
10 |
move from eclass user to acct-user/acct-group packages |
11 |
fix systemd tmpfile handling |
12 |
fix many typos |
13 |
|
14 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
15 |
Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net> |
16 |
Closes: https://github.com/gentoo/gentoo/pull/24059 |
17 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
18 |
|
19 |
media-tv/gentoo-vdr-scripts/Manifest | 1 + |
20 |
.../files/systemd-fix-environment.patch | 18 +++++ |
21 |
.../gentoo-vdr-scripts/files/systemd-tmpfiles.conf | 3 + |
22 |
.../gentoo-vdr-scripts-2.8-r1.ebuild | 76 ++++++++++++++++++++++ |
23 |
4 files changed, 98 insertions(+) |
24 |
|
25 |
diff --git a/media-tv/gentoo-vdr-scripts/Manifest b/media-tv/gentoo-vdr-scripts/Manifest |
26 |
index 790df2ca456b..73f54d566e10 100644 |
27 |
--- a/media-tv/gentoo-vdr-scripts/Manifest |
28 |
+++ b/media-tv/gentoo-vdr-scripts/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST gentoo-vdr-scripts-2.8.tar.bz2 49662 BLAKE2B 1a49d03441c991f6aa08cefc3b6d3a926a18ef7cb6c97bef886f922901f681ab95e9b60648d3930136148dafdf87f702d564e5a89fb6945ef9ed0cec1c2fbbaa SHA512 587bfc329efb92f1d9d9f87b3eb88ff9c74f92587d20c1489e67c861c769f9cb307bd6314aa88dc7d2a1400bc408033b913093b8f219fa59857638f2d062eecf |
31 |
+DIST gentoo-vdr-scripts-2.8.tbz2 49484 BLAKE2B 6b746e69ae396225c7def07d4d177f71690793eeac51202f8a5c33c20a089d6537e84ed2784f8b85cf04285fbf7288f26bfa45b7e984f8ad18ad54d122fe5b94 SHA512 3d47b8d048ae8c1e218ba825731f73562ee34e02388361f41fcc9aec5b4d54c6f66338b26cf17742b39c86a9676bf26bc9b6b2bd3249b798e1e3de61eb8ef355 |
32 |
|
33 |
diff --git a/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch b/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch |
34 |
new file mode 100644 |
35 |
index 000000000000..b3ebb58bc994 |
36 |
--- /dev/null |
37 |
+++ b/media-tv/gentoo-vdr-scripts/files/systemd-fix-environment.patch |
38 |
@@ -0,0 +1,18 @@ |
39 |
+diff -Naur gentoo-vdr-scripts-2.8.orig/etc/sudoers.d/vdr gentoo-vdr-scripts-2.8/etc/sudoers.d/vdr |
40 |
+--- gentoo-vdr-scripts-2.8.orig/etc/sudoers.d/vdr 2019-12-15 01:04:54.000000000 +0100 |
41 |
++++ gentoo-vdr-scripts-2.8/etc/sudoers.d/vdr 2021-05-29 16:26:34.623489561 +0200 |
42 |
+@@ -1 +1,2 @@ |
43 |
+ vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh |
44 |
++vdr ALL=NOPASSWD:/bin/systemctl daemon-reload |
45 |
+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 |
46 |
+--- gentoo-vdr-scripts-2.8.orig/usr/share/vdr/systemd/vdr-systemd_helper.sh 2019-12-15 01:04:54.000000000 +0100 |
47 |
++++ gentoo-vdr-scripts-2.8/usr/share/vdr/systemd/vdr-systemd_helper.sh 2021-05-29 17:19:16.810413833 +0200 |
48 |
+@@ -105,7 +105,7 @@ |
49 |
+ # as the user under which vdr will run is controlled by systemd |
50 |
+ sed -e "s:'-u' 'vdr' ::" -i ${SYSTEMD_ENV_FILE} |
51 |
+ |
52 |
+- sync |
53 |
++ sudo systemctl daemon-reload |
54 |
+ eend "--start-pre" |
55 |
+ elif [ "$1" = "--start-post" ]; then |
56 |
+ ebegin "--start-post" |
57 |
|
58 |
diff --git a/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf b/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf |
59 |
new file mode 100644 |
60 |
index 000000000000..ee0910b6dfe8 |
61 |
--- /dev/null |
62 |
+++ b/media-tv/gentoo-vdr-scripts/files/systemd-tmpfiles.conf |
63 |
@@ -0,0 +1,3 @@ |
64 |
+d %HOME%/tmp 0755 vdr vdr - |
65 |
+d /var/cache/vdr 0755 vdr vdr - |
66 |
+ |
67 |
|
68 |
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 |
69 |
new file mode 100644 |
70 |
index 000000000000..0dcd0874358a |
71 |
--- /dev/null |
72 |
+++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.8-r1.ebuild |
73 |
@@ -0,0 +1,76 @@ |
74 |
+# Copyright 2022 Gentoo Authors |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+EAPI=8 |
78 |
+ |
79 |
+inherit tmpfiles user-info |
80 |
+ |
81 |
+DESCRIPTION="Scripts necessary for use of VDR as a set-top-box" |
82 |
+HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-vdr-scripts.git/about/" |
83 |
+SRC_URI="https://gitweb.gentoo.org/proj/gentoo-vdr-scripts.git/snapshot/${P}.tar.bz2 -> ${P}.tbz2" |
84 |
+ |
85 |
+LICENSE="GPL-2" |
86 |
+SLOT="0" |
87 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
88 |
+ |
89 |
+DEPEND=" |
90 |
+ acct-group/vdr |
91 |
+ acct-user/vdr" |
92 |
+RDEPEND="${DEPEND} |
93 |
+ app-admin/sudo |
94 |
+ sys-process/wait_on_pid" |
95 |
+BDEPEND="${DEPEND}" |
96 |
+ |
97 |
+PATCHES=( "${FILESDIR}/systemd-fix-environment.patch" ) |
98 |
+ |
99 |
+pkg_setup() { |
100 |
+ VDR_HOME="$(egethome vdr)" |
101 |
+ echo "VDR_HOME=${VDR_HOME}" |
102 |
+} |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ default |
106 |
+ cp "${FILESDIR}"/systemd-tmpfiles.conf "${WORKDIR}/${PN}.conf" || die |
107 |
+ sed -i -e "s|%HOME%|$VDR_HOME|" "${WORKDIR}/${PN}.conf" || die |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ default |
112 |
+ diropts -ovdr -gvdr |
113 |
+ keepdir "${VDR_HOME}" |
114 |
+ keepdir "${VDR_HOME}/shutdown-data" |
115 |
+ keepdir "${VDR_HOME}/merged-config-files" |
116 |
+ keepdir "${VDR_HOME}/dvd-images" |
117 |
+ dotmpfiles "${WORKDIR}/${PN}.conf" |
118 |
+} |
119 |
+ |
120 |
+pkg_postinst() { |
121 |
+ tmpfiles_process "${PN}.conf" |
122 |
+ |
123 |
+ elog "${CATEGORY}/${PN} supports an init script" |
124 |
+ elog "to start a X server" |
125 |
+ elog "Please refer for detailed info to" |
126 |
+ elog "/usr/share/doc/${PF}/README.x11-setup\n" |
127 |
+ |
128 |
+ elog "systemd is supported by ${CATEGORY}/${PN}" |
129 |
+ elog "Read about it in /usr/share/doc/${PF}/README.systemd" |
130 |
+ |
131 |
+ elog "Plugins which should be used are configured in" |
132 |
+ elog "the config-file /etc/conf.d/vdr.plugins" |
133 |
+ elog "or enable/disable them with \"eselect vdr-plugin\".\n" |
134 |
+ |
135 |
+ if [[ -f "${EROOT}"/etc/conf.d/vdr.dvdswitch ]] && |
136 |
+ grep -q ^DVDSWITCH_BURNSPEED= "${EROOT}"/etc/conf.d/vdr.dvdswitch |
137 |
+ then |
138 |
+ ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch" |
139 |
+ ewarn "This no longer has any effect, please use" |
140 |
+ ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd" |
141 |
+ fi |
142 |
+ |
143 |
+ if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${EROOT}"/etc/sudoers; then |
144 |
+ ewarn "Please remove the following deprecated line from /etc/sudoers:" |
145 |
+ ewarn " vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh" |
146 |
+ ewarn "sudoers handling is now supported by:" |
147 |
+ ewarn "/etc/sudoers.d/vdr" |
148 |
+ fi |
149 |
+} |