1 |
commit: 480ea096393f2fe727ba247d555ea85911baadc3 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 2 11:38:16 2022 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 22:49:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=480ea096 |
7 |
|
8 |
www-apps/rt: migrate to glep-81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/781527 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/24865 |
13 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
14 |
|
15 |
.../rt/{rt-4.4.4-r1.ebuild => rt-4.4.4-r2.ebuild} | 54 +++------------------- |
16 |
1 file changed, 6 insertions(+), 48 deletions(-) |
17 |
|
18 |
diff --git a/www-apps/rt/rt-4.4.4-r1.ebuild b/www-apps/rt/rt-4.4.4-r2.ebuild |
19 |
similarity index 83% |
20 |
rename from www-apps/rt/rt-4.4.4-r1.ebuild |
21 |
rename to www-apps/rt/rt-4.4.4-r2.ebuild |
22 |
index 8f0b49e9cc7a..efcf278b94c6 100644 |
23 |
--- a/www-apps/rt/rt-4.4.4-r1.ebuild |
24 |
+++ b/www-apps/rt/rt-4.4.4-r2.ebuild |
25 |
@@ -1,9 +1,9 @@ |
26 |
-# Copyright 1999-2021 Gentoo Authors |
27 |
+# Copyright 1999-2022 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
EAPI=6 |
31 |
|
32 |
-inherit webapp depend.apache user |
33 |
+inherit webapp depend.apache |
34 |
|
35 |
DESCRIPTION="RT is an enterprise-grade ticketing system" |
36 |
HOMEPAGE="https://www.bestpractical.com/rt/" |
37 |
@@ -17,8 +17,9 @@ REQUIRED_USE="^^ ( mysql postgres )" |
38 |
RESTRICT="test" |
39 |
|
40 |
DEPEND=" |
41 |
+ acct-group/rt |
42 |
+ acct-user/rt |
43 |
>=dev-lang/perl-5.10.1 |
44 |
- |
45 |
>=dev-perl/Apache-Session-1.53 |
46 |
>=dev-perl/CGI-4 |
47 |
>=dev-perl/CSS-Squish-0.06 |
48 |
@@ -141,46 +142,6 @@ RDEPEND="${DEPEND} |
49 |
|
50 |
need_httpd_cgi |
51 |
|
52 |
-add_user_rt() { |
53 |
- # add new user |
54 |
- # suexec2 requires uid >= 1000; enewuser is of no help here |
55 |
- # From: Mike Frysinger <vapier@g.o> |
56 |
- # Date: Fri, 17 Jun 2005 08:41:44 -0400 |
57 |
- # i'd pick a 5 digit # if i were you |
58 |
- |
59 |
- local euser="rt" |
60 |
- |
61 |
- # first check if username rt exists |
62 |
- if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then |
63 |
- # check uid |
64 |
- rt_uid=$(egetent passwd "${euser}" | cut -d: -f3) |
65 |
- if $(expr ${rt_uid} '<' 1000 > /dev/null); then |
66 |
- ewarn "uid of user rt is less than 1000. suexec2 will not work." |
67 |
- ewarn "If you want to use FastCGI, please delete the user 'rt'" |
68 |
- ewarn "from your system and re-emerge www-apps/rt" |
69 |
- fi |
70 |
- return 0 # all is well |
71 |
- fi |
72 |
- |
73 |
- # add user |
74 |
- # stolen from enewuser |
75 |
- local pwrange euid |
76 |
- |
77 |
- pwrange=$(seq 10001 11001) |
78 |
- for euid in ${pwrange} ; do |
79 |
- [[ -z $(egetent passwd ${euid}) ]] && break |
80 |
- done |
81 |
- if [[ ${euid} == "11001" ]]; then |
82 |
- # she gets around, doesn't she? |
83 |
- die "No available uid's found" |
84 |
- fi |
85 |
- |
86 |
- elog " - Userid: ${euid}" |
87 |
- |
88 |
- enewuser rt ${euid} -1 /dev/null rt |
89 |
- return 0 |
90 |
-} |
91 |
- |
92 |
pkg_setup() { |
93 |
webapp_pkg_setup |
94 |
|
95 |
@@ -189,16 +150,13 @@ pkg_setup() { |
96 |
ewarn "make sure to read the related upgrade documentation in" |
97 |
ewarn "${ROOT}usr/share/doc/${PF}." |
98 |
ewarn |
99 |
- |
100 |
- enewgroup rt |
101 |
- add_user_rt || die "Could not add user" |
102 |
} |
103 |
|
104 |
src_prepare() { |
105 |
# add Gentoo-specific layout |
106 |
cat "${FILESDIR}"/config.layout-gentoo >> config.layout |
107 |
- sed -e "s|PREFIX|${ED}/${MY_HOSTROOTDIR}/${PF}|g" \ |
108 |
- -e "s|HTMLDIR|${ED}/${MY_HTDOCSDIR}|g" \ |
109 |
+ sed -e "s|PREFIX|${EPREFIX}/${MY_HOSTROOTDIR}/${PF}|g" \ |
110 |
+ -e "s|HTMLDIR|${EPREFIX}/${MY_HTDOCSDIR}|g" \ |
111 |
-e 's|/\+|/|g' \ |
112 |
-i ./config.layout || die 'config sed failed' |