Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/otrs/
Date: Tue, 02 Jan 2018 19:12:05
Message-Id: 1514920312.b65a13b5515413ad93155a165a9029a884804eef.whissi@gentoo
1 commit: b65a13b5515413ad93155a165a9029a884804eef
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 2 19:11:16 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 2 19:11:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b65a13b5
7
8 www-apps/otrs: Security cleanup
9
10 Bug: https://bugs.gentoo.org/640548
11 Package-Manager: Portage-2.3.19, Repoman-2.3.6
12
13 www-apps/otrs/Manifest | 1 -
14 www-apps/otrs/otrs-5.0.23.ebuild | 154 ---------------------------------------
15 2 files changed, 155 deletions(-)
16
17 diff --git a/www-apps/otrs/Manifest b/www-apps/otrs/Manifest
18 index 09404be2d16..0bea4d3beaa 100644
19 --- a/www-apps/otrs/Manifest
20 +++ b/www-apps/otrs/Manifest
21 @@ -1,2 +1 @@
22 -DIST otrs-5.0.23.tar.bz2 20617459 BLAKE2B 3c57ae5462d78e8f8ecb5f3db031725f5f51d8dafc850cc445a415b1a03023f67d0b209c5bee71318665986ac3ef0b460dee944c23e8aa177cabcc54cf72f384 SHA512 c6ae594178e1f0eb59b87a8d08b610940ba7ad0a44699ba73568c6844a49fc03e2486bce393aaf0dd78da9c64790b9fae72cfad65c9c6955c0524fbf27b95d7e
23 DIST otrs-5.0.25.tar.bz2 20671315 BLAKE2B 045037411039f480434e7c36ab84b63ec0c119e39cc6918ba05d9a7c92e5c940545412dc2824fc427199b384dece34793d2b60fadafec302f67581aabdc5ac82 SHA512 1e68471f071265d963c51ab5a6510a9a9b23d3de87e10eb58b9f9ca937500f4fdf68a7e911f9509244e4cbf43e1658c95dbaba83160d736ea0116167f3361e37
24
25 diff --git a/www-apps/otrs/otrs-5.0.23.ebuild b/www-apps/otrs/otrs-5.0.23.ebuild
26 deleted file mode 100644
27 index 172bd42f6b4..00000000000
28 --- a/www-apps/otrs/otrs-5.0.23.ebuild
29 +++ /dev/null
30 @@ -1,154 +0,0 @@
31 -# Copyright 1999-2017 Gentoo Foundation
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI="6"
35 -
36 -inherit user systemd
37 -
38 -DESCRIPTION="OTRS is an Open source Ticket Request System"
39 -HOMEPAGE="https://www.otrs.com/"
40 -SRC_URI="https://ftp.otrs.org/pub/${PN}/${P}.tar.bz2"
41 -
42 -LICENSE="AGPL-3+"
43 -KEYWORDS="~amd64 ~x86"
44 -IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap"
45 -SLOT="0"
46 -
47 -REQUIRED_USE="|| ( mysql postgres )"
48 -
49 -DEPEND="media-libs/libpng:0"
50 -
51 -RDEPEND="dev-perl/Apache-Reload
52 - dev-perl/Archive-Zip
53 - dev-perl/DBI
54 - dev-perl/IO-Socket-SSL
55 - dev-perl/JSON-XS
56 - dev-perl/LWP-UserAgent-Determined
57 - dev-perl/Mail-POP3Client
58 - dev-perl/Mail-IMAPClient
59 - >dev-perl/Net-DNS-0.60
60 - dev-perl/Template-Toolkit
61 - dev-perl/Text-CSV_XS
62 - dev-perl/TimeDate
63 - dev-perl/XML-Parser
64 - dev-perl/YAML-LibYAML
65 - apache2? (
66 - mod_perl? (
67 - www-servers/apache:2
68 - =www-apache/libapreq2-2* www-apache/mod_perl
69 - )
70 - !fastcgi? ( !mod_perl? ( www-servers/apache:2[suexec] ) )
71 - )
72 - fastcgi? (
73 - dev-perl/FCGI
74 - virtual/httpd-fastcgi
75 - )
76 - !fastcgi? ( !apache2? ( virtual/httpd-cgi ) )
77 - gd? (
78 - dev-perl/GD
79 - dev-perl/GDTextUtil
80 - dev-perl/GDGraph
81 - )
82 - ldap? ( dev-perl/perl-ldap )
83 - mysql? ( dev-perl/DBD-mysql )
84 - postgres? ( dev-perl/DBD-Pg )
85 - pdf? (
86 - >=dev-perl/PDF-API2-0.73
87 - virtual/perl-Compress-Raw-Zlib
88 - )
89 - soap? (
90 - dev-perl/SOAP-Lite
91 - !=dev-perl/SOAP-Lite-0.711
92 - !=dev-perl/SOAP-Lite-0.712
93 - )
94 - "
95 -
96 -OTRS_HOME="/var/lib/otrs"
97 -
98 -pkg_setup() {
99 - # The enewuser otrs will fail if apache isn't there, but it's an optional dep
100 - # so we create the apache user here just in case
101 - enewgroup apache 81
102 - enewuser apache 81 -1 /var/www apache
103 - enewuser otrs -1 -1 "${OTRS_HOME}" apache
104 -}
105 -
106 -src_prepare() {
107 - rm -r "${S}/scripts"/auto_* || die
108 -
109 - pushd Kernel >/dev/null || die
110 - local i
111 - for i in *.dist; do
112 - cp "${i}" $(basename "${i}" .dist) || die
113 - done
114 - popd >/dev/null || die
115 -
116 - # Fix broken png file (and see pngfix help for exit codes)
117 - pngfix -q --out=out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png"
118 - if [[ $? -gt 15 ]]; then
119 - die "pngfix failed"
120 - fi
121 - mv -f out.png "${S}/var/httpd/htdocs/skins/Agent/default/img/otrs-verify.png" || die
122 -
123 - sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \
124 - || die "sed failed"
125 -
126 - sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" "${S}"/Kernel/Config/Defaults.pm \
127 - || die "sed failed"
128 -
129 - grep -lR "/opt" "${S}"/scripts | \
130 - xargs sed -i -e "s:/opt/otrs:${EPREFIX%/}${OTRS_HOME}:g" \
131 - || die "sed failed"
132 -
133 - echo "CONFIG_PROTECT=\"${EPREFIX%/}${OTRS_HOME}/Kernel/Config.pm \
134 - ${EPREFIX%/}${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}" || die
135 -
136 - eapply_user
137 -}
138 -
139 -# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred
140 -pkg_config() {
141 - einfo "Installing cronjobs"
142 - crontab -u otrs "${EROOT%/}"/usr/share/doc/${PF}/crontab || die
143 -}
144 -
145 -src_install() {
146 - dodoc CHANGES.md README*
147 -
148 - insinto "${OTRS_HOME}"
149 - doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \
150 - Custom Kernel bin scripts var
151 -
152 - cat "${S}"/var/cron/*.dist > "${T}"/crontab || die
153 - insinto /usr/share/doc/${PF}/
154 - doins "${T}"/crontab
155 -
156 - local a
157 - for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable
158 - do
159 - keepdir "${OTRS_HOME}/var/${a}"
160 - done
161 - doenvd "${T}/50${PN}"
162 -
163 - systemd_dounit "${FILESDIR}/otrs.service"
164 -}
165 -
166 -pkg_postinst() {
167 - einfo "Setting correct permissions ..."
168 - /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.SetPermissions.pl "${EROOT%/}${OTRS_HOME}" \
169 - --otrs-user=otrs \
170 - --web-group=apache \
171 - || die "Could not set permissions"
172 -
173 - einfo "Installation done!"
174 - elog "1) Rebuild your config now by running the following commands:"
175 - elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild"
176 - elog "sudo -u otrs /usr/bin/env perl "${EROOT%/}${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete"
177 - elog ""
178 - elog "2) Enable cronjobs with the following command:"
179 - elog "crontab -u otrs crontab"
180 - elog ""
181 - elog "3) systemd users: enable and start OTRS daemon:"
182 - elog "systemctl enable otrs"
183 - elog "systemctl start otrs"
184 -}