diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/rt |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/rt')
-rw-r--r-- | www-apps/rt/Manifest | 13 | ||||
-rw-r--r-- | www-apps/rt/files/config.layout-gentoo | 26 | ||||
-rw-r--r-- | www-apps/rt/files/postinstall-en.txt | 19 | ||||
-rw-r--r-- | www-apps/rt/files/reconfig | 56 | ||||
-rw-r--r-- | www-apps/rt/files/rt-makefile-serialize-install-prereqs.patch | 12 | ||||
-rw-r--r-- | www-apps/rt/files/rt.conf.d.2 | 10 | ||||
-rw-r--r-- | www-apps/rt/files/rt.init.d.2 | 50 | ||||
-rw-r--r-- | www-apps/rt/metadata.xml | 24 | ||||
-rw-r--r-- | www-apps/rt/rt-4.2.12-r1.ebuild | 295 | ||||
-rw-r--r-- | www-apps/rt/rt-4.4.1.ebuild | 300 |
10 files changed, 805 insertions, 0 deletions
diff --git a/www-apps/rt/Manifest b/www-apps/rt/Manifest new file mode 100644 index 000000000000..62e87835d3f1 --- /dev/null +++ b/www-apps/rt/Manifest @@ -0,0 +1,13 @@ +AUX config.layout-gentoo 741 SHA256 1a880f8fd268519371b5321c5a80db30c0da07c2ab474e773141953403e8ae03 SHA512 d3cb968a528ccb19f64ef249f2df503e82d1763a22ea939cd202b9a0626c1d335e2b8a8db65b191e2cff105926e422670c6d435b579069a10d9c433e6bd1e0fb WHIRLPOOL e707ac51542c6b65747c20d148a45d6f33776312c19772bc54fe49c73873f5215e05987e3008940d75d3b4b2996ae75a763aa3cd0b3cf01dc65dea503fba6525 +AUX postinstall-en.txt 620 SHA256 ac1d1fba05ce479b40e5248042b3e1da8d5695b5382d04e4082063c199a13a82 SHA512 473acd53f962299a96b012b6c6e044590feb347efed208158ac8a1d4722c673fcddde2487556cf40fb97d201608fe066a9c243cd3f1682bea5e4039a4b5fb8dd WHIRLPOOL b905ef6ec00028efdc2ddee839989796c3386e71dcf990cae6251103d618d79243edfbd75bb6100598bcb98d14bf22e7dcea5424b292f636bb2832ca1702460f +AUX reconfig 2133 SHA256 82743e18319eafecf66c5b804c193d9ca3c72d8fc41a9493b1ae91b8e14b5fe3 SHA512 bfeedd02918240fb1b79fe9a5f62b6bda85e3f9df2c55dd9a93deb490495bb269579a999a71bd135fe43f247774039e34947c39689461ef4083b482f02fa3c56 WHIRLPOOL 9e9c4138dc4337174e3f67813d1926c7c88228bdd5747af8df15e6dee4547bdd165f19df25dce4fd523a9fdc6bbd389eee4495146bbb055fdcaab0c384317579 +AUX rt-makefile-serialize-install-prereqs.patch 596 SHA256 2fb732ffb622e2c6d8a96d6bfce895c58436bb8aa9830b6fe693ed19d5e68bfb SHA512 0ae2ad3ac5faf7ecc65545cfbba210034a2f532c4b1fa82b37956731b35d7e42e3d3ca4714834f2797ecec7292f19dca0be295ad92ed3931374d07af02ed10a1 WHIRLPOOL b849522781db1bc71a0be48c0d351e4a13eb4811d632e79896f375ce3e72e940eebffca15ae3a53f10762056537593b7d9e89b02eba10105b12d30fe9aa6502a +AUX rt.conf.d.2 229 SHA256 73988366beb98516b12c842f51e322d95317c1d2d10fb292fcc0b97a34ccd6ee SHA512 4823a8241837d3b642149f3f81c16258811132bdcc515096de347ca1da14cf18d7791f10851682e55205e206f335c322926c4dd01ace30f7cb254995b48ea8e9 WHIRLPOOL aa6fa30dacd16d795ade86469ec3de7ebbe910eb9f863e2bba1c8ec118d19000b300b47a489c57e51f573ef79a3edbde18c9d08c8dc0cb9dff91dd95fb3defd6 +AUX rt.init.d.2 1318 SHA256 bbcf2e95cbcae37a240e9ae30b016d9dccd857f27367a34bf343e47be77df9b4 SHA512 ec7249e73e9efdcb1716e8ba3bf33d4791bf4e386b3c60207f5c1a37b8b456be8c0cd550bbe0645a9aa46afeb1c3331b3425bb9f5ef8b95b71f52f99f1244b91 WHIRLPOOL 06a5edb36eeacf105ab2e0f67c6505f8eb310a5ed12fd1f7b48ecdab473a3d276b11b28a71ebe6d207b8e23c410375c5305f97087a93505e65698f85e30176ee +DIST rt-4.2.12.tar.gz 7537620 SHA256 e21220c609706dc9977a13309d78a4d9171455ae823cf549311342cedd837264 SHA512 e816c5481bdb158209bd78bc82af4abc0243af500abe55ae3aac666259e983282d82577de6207899745b4781fb0a50d3094901a248e7ac958dd852343b6f2676 WHIRLPOOL 726d6f7c92bdd120ae3c0463181cef3ade9c705ac23dbb93bf1a262ebc4d0d2f07144a67d04a06c3127dead7ad7e6b50f3966e2969bc8c0199507af4af854fec +DIST rt-4.4.1.tar.gz 9057212 SHA256 f87329911020e01b39948070aec2bd7abf0c81641f0cf2f25e01c690a19f24f5 SHA512 2cb797e013b14201ececec2c408257fe3a998fefdafd0944efda0236caac40be4cc45878cbda7bf9ae82b3757de6167263db2b90331d925db1f916a8420adf94 WHIRLPOOL 2d5530cc57a1a02a2429b59c07459da3cd71b3b9596588f8f6010c67e74a56bde9793c0fd2d8c6d0bf2171930e0352fd723a40fa0d5bd815c1d596ba9802c450 +EBUILD rt-4.2.12-r1.ebuild 7508 SHA256 e9877fe3b9dda989e026a2570e3450457a092e10a4dbfa65cf12167f5c004b97 SHA512 1627e7017e512c1016689c34d3a2edd0a41461ffa2ce27f76428afdcc68876998c397edcdc8c6383677975fdbead35680d4a770142f4ec5540c81314018ed550 WHIRLPOOL 698657baedd7f2f196e405ee0555835258e4d692da7ace317809de326af15c3c2bfb7752733ba9b58479f290f08404ca64d80c6436a92664ced455bd26dfd2f2 +EBUILD rt-4.4.1.ebuild 7629 SHA256 e99b3546c915f373abcec8df33656ba5eb75d6d211b4539d5b3926261bd30d0b SHA512 8a2f291926499e5df9f4a60351ffea0aa9d92534c13ae54fcc3d8a4c9e37d46989be43d6f3f06d1641bb88e6feb5df707b892063064927b9ff5971b9f41e2db5 WHIRLPOOL 8d35dab50459db7483d7dbb053ef5ec4bb6e3d461c5d8b01f8c21d81ba308dd78bf33a526479f7ed2e3826f64043dc281d0268984c37dc677a5d5c640474a2e1 +MISC ChangeLog 5643 SHA256 86dac0e4e5f704cca8d46acd354d7d62ffc13acb8acaa3c17b609c337d9b7baa SHA512 1db44fdc3c4f6bd24ff2413bae3ddb58642d16387baa5133a6cb65cc07566877a589ef6f3e1c3d8501b9775b956094646ba5b71f1e375f53af3fcdcbf339a7cc WHIRLPOOL 1b69c1f95ea6c29a784936b6efb7339a8b091632a6fd5f113cfd23400683896318250c47c2a5e4a8555e4cea6a4b6f2b6d48c6abfafdf703247f6ad80a452c9c +MISC ChangeLog-2015 15966 SHA256 c34772eb85e51a1ec90b625a870670bcd6dc912dd2ae583eddc93a01d8e650dd SHA512 fbf740b91a1f93c53f02c492121158696ec7ea82c491823929c7e4552ff0cae4a7498b1771f3e6903383672804170392948e7e981aa29f018e849c3c103b8737 WHIRLPOOL 57608c0a0a052d3e47b3b014b9e9c65c8be20fa13f639de8c7bc276418b8f08b093d8bda6d9406f29de87610bc8d11f2bc192b76b487ecd13598096fb07ca9e0 +MISC metadata.xml 767 SHA256 59ad02388643162eb8663e16a2d10d7f394d06213a5dc955736f7000d494517e SHA512 b74eee6a8e221bff8d7512aacf7ae8ddc01b4aa9fd3b8ceb000d399f4516dddb8db6f602c8e0311d3624b09501660f6121c0d98f1ee0c22e26f2aa587df44e82 WHIRLPOOL 1ecacafed294df79bbc43d8479669d81dbc59e7ee99d47ab0a6d06926f77967febb8f0e98818c42007d756b2563649b7cb6cd7f75cbb18cff635b85c932de700 diff --git a/www-apps/rt/files/config.layout-gentoo b/www-apps/rt/files/config.layout-gentoo new file mode 100644 index 000000000000..39dde0a3a7ba --- /dev/null +++ b/www-apps/rt/files/config.layout-gentoo @@ -0,0 +1,26 @@ + +<Layout Gentoo> + prefix: PREFIX + exec_prefix: ${prefix} + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + sysconfdir: ${prefix}/etc + mandir: ${prefix}/man + libdir: ${prefix}/lib + datadir: ${prefix}/share + htmldir: HTMLDIR + fontdir: ${datadir}/fonts + lexdir: ${datadir}/po + manualdir: ${datadir}/doc + staticdir: ${datadir}/static + localstatedir: ${prefix}/var + logfiledir: ${localstatedir}/log + masonstatedir: ${localstatedir}/mason_data + sessionstatedir: ${localstatedir}/session_data + customdir: ${prefix}/local + custometcdir: ${customdir}/etc + customhtmldir: ${customdir}/html + customlexdir: ${customdir}/po + customstaticdir: ${customdir}/static + customlibdir: ${customdir}/lib +</Layout> diff --git a/www-apps/rt/files/postinstall-en.txt b/www-apps/rt/files/postinstall-en.txt new file mode 100644 index 000000000000..daa11ed9d14c --- /dev/null +++ b/www-apps/rt/files/postinstall-en.txt @@ -0,0 +1,19 @@ +Please follow the Gentoo install guide found at: + + https://wiki.gentoo.org/wiki/Request_Tracker + +Your local config files are located here: + + ${VHOST_ROOT}/${PN}-${PVR}/etc + +************************************************************************ +* NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE * +************************************************************************ + +Some file locations have changed. Everything is now installed, for real +this time, into: + + ${VHOST_ROOT} + +RT executables are no longer in /usr/bin. You may need to modify your +existing configuration files accordingly. diff --git a/www-apps/rt/files/reconfig b/www-apps/rt/files/reconfig new file mode 100644 index 000000000000..9a1919965386 --- /dev/null +++ b/www-apps/rt/files/reconfig @@ -0,0 +1,56 @@ +#!/bin/bash +PF=${PN}-${PVR} + +die() { + echo "#####" + echo $1 + echo "#####" + exit 1 +} + +if [ $1 = "install" ]; then + # So, some craziness happens during the install process. First, we + # have doubled slashes, which the ebuild dutifully removes, but + # then, at some point, ${ED} is removed including its trailing + # slash, which leaves us with relative path references. That's why + # we remove the leading slash instead of the trailing slash in the + # variables below so that the sed statement will actually match + # what we mean. + echo "Replacing ${ROOT#/}${MY_HOSTROOTDIR#/} with ${VHOST_ROOT}/${PF}" + echo "Replacing ${ROOT#/}${MY_HTDOCSDIR#/} with ${MY_INSTALLDIR}" + echo "Replacing RT_DIR with ${VHOST_ROOT}/${PF}" + + for file in $(find ${VHOST_ROOT}/${PF} -type f) ; do + sed -e "s|${ROOT#/}${MY_HOSTROOTDIR#/}/${PF}|${VHOST_ROOT}/${PF}|g" \ + -e "s|${ROOT#/}${MY_HTDOCSDIR#/}|${MY_INSTALLDIR}|g" \ + -e "s|RT_DIR|${VHOST_ROOT}/${PF}|g" \ + -i "${file}" || die + done + + echo + echo "If you're upgrading RT, you may need to update your database." + echo "Take a look in:" + echo + echo " ${VHOST_ROOT}/${PF}/upgrade" + echo + echo "Iterate through each sub-directory, in order, whose name is greater" + echo "than your previously installed RT version, and run the following" + echo "commands:" + echo + for step in schema acl insert ; do + echo " ${VHOST_ROOT}/${PF}/sbin/rt-setup-database \\" + echo " --action ${step} --dba DBSUPERUSER --prompt-for-dba-password \\" + echo " --datadir ${VHOST_ROOT}/${PF}/upgrade/<version> " + echo + done + echo "Note that some upgrade directories don't have all 3 items (schema," + echo "acl, insert) and you can skip them safely." + echo + echo "Don't forget to read the online installation guide for more details" +elif [ $1 = "clean" ]; then + echo "Please examine the contents of the following directories and delete" + echo "anything that is no longer necessary:" + echo + echo " ${VHOST_ROOT}/${PF}" + echo " ${MY_INSTALLDIR}" +fi diff --git a/www-apps/rt/files/rt-makefile-serialize-install-prereqs.patch b/www-apps/rt/files/rt-makefile-serialize-install-prereqs.patch new file mode 100644 index 000000000000..d0488918d5f9 --- /dev/null +++ b/www-apps/rt/files/rt-makefile-serialize-install-prereqs.patch @@ -0,0 +1,12 @@ +diff -Naruw rt-4.2.11.orig/Makefile.in rt-4.2.11/Makefile.in +--- rt-4.2.11.orig/Makefile.in 2015-04-27 20:56:16.000000000 -0400 ++++ rt-4.2.11/Makefile.in 2015-05-14 13:50:05.279292835 -0400 +@@ -359,6 +359,8 @@ + rm -rf $(DESTDIR)$(MASON_DATA_PATH)/etc/* + rm -rf $(DESTDIR)$(MASON_DATA_PATH)/obj/* + ++.NOTPARALLEL: testdeps config-install dirs files-install fixperms instruct ++ + install: testdeps config-install dirs files-install fixperms instruct + + files-install: libs-install etc-install config-install bin-install sbin-install html-install doc-install font-install po-install static-install diff --git a/www-apps/rt/files/rt.conf.d.2 b/www-apps/rt/files/rt.conf.d.2 new file mode 100644 index 000000000000..d5bc65394734 --- /dev/null +++ b/www-apps/rt/files/rt.conf.d.2 @@ -0,0 +1,10 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/rt + +RTUSER=rt +RTGROUP=lighttpd + +# set RTPATH to rt's root +RTPATH=/var/www/localhost/@@PF@@ diff --git a/www-apps/rt/files/rt.init.d.2 b/www-apps/rt/files/rt.init.d.2 new file mode 100644 index 000000000000..84e304efe17d --- /dev/null +++ b/www-apps/rt/files/rt.init.d.2 @@ -0,0 +1,50 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use mysql postgresql lighttpd +} + +FCGI_SOCKET_PATH=${RTPATH}/var/appSocket +PIDFILE=${RTPATH}/var/pid + +start() { + checkpath -d "${RTPATH}/var" -m 0755 -o "${RTUSER}:${RTGROUP}" + + ebegin "Starting RT" + rm -f ${FCGI_SOCKET_PATH} + start-stop-daemon --start \ + --exec ${RTPATH}/bin/mason_handler.fcgi \ + --pidfile ${PIDFILE} --user "${RTUSER}:${RTGROUP}" \ + --background --make-pidfile --chdir ${RTPATH} \ + --stdout "${RTPATH}/var/service.log" \ + --stderr "${RTPATH}/var/service.log" \ + --env "PATH=$PATH" --env "FCGI_SOCKET_PATH=${FCGI_SOCKET_PATH}" \ + --wait 1500 + + if [ "$?" != "0" ]; then + eerror "${SVCNAME} failed to start. Please see ${RTPATH}/var/service.log for the reason." + eend 1 + return 1 + fi + + # make sure lighttpd can use the socket + for i in {0..10}; do + [ -a ${FCGI_SOCKET_PATH} ] && break + sleep 1 + done + + if [ -a ${FCGI_SOCKET_PATH} ]; then + chmod g+rwx ${FCGI_SOCKET_PATH} + eend 0 + else + eend 1 + fi +} + +stop() { + ebegin "Stopping RT" + start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} diff --git a/www-apps/rt/metadata.xml b/www-apps/rt/metadata.xml new file mode 100644 index 000000000000..f1d1d6173dc8 --- /dev/null +++ b/www-apps/rt/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <maintainer type="person"> + <email>eric.joshua.martin@gmail.com</email> + <name>Eric Martin</name> + </maintainer> + <maintainer type="project"> + <email>web-apps@gentoo.org</email> + <name>Gentoo Webapps</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="lighttpd">Add <pkg>www-servers/lighttpd</pkg> support</flag> + </use> + <longdescription>RT is an enterprise-grade ticketing system</longdescription> +</pkgmetadata> diff --git a/www-apps/rt/rt-4.2.12-r1.ebuild b/www-apps/rt/rt-4.2.12-r1.ebuild new file mode 100644 index 000000000000..011c42d01899 --- /dev/null +++ b/www-apps/rt/rt-4.2.12-r1.ebuild @@ -0,0 +1,295 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit webapp eutils depend.apache user + +DESCRIPTION="RT is an enterprise-grade ticketing system" +HOMEPAGE="http://www.bestpractical.com/rt/" +SRC_URI="http://download.bestpractical.com/pub/${PN}/release/${P}.tar.gz" + +KEYWORDS="~amd64" +LICENSE="GPL-2" +IUSE="mysql +postgres fastcgi lighttpd" +REQUIRED_USE="^^ ( mysql postgres )" + +RESTRICT="test" + +DEPEND=" + >=dev-lang/perl-5.10.1 + + >=dev-perl/Apache-Session-1.53 + >=dev-perl/CGI-4 + >=dev-perl/CSS-Squish-0.06 + >=dev-perl/Class-Accessor-0.34 + >=dev-perl/Class-ReturnValue-0.550.0-r1 + >=dev-perl/DBI-1.37 + >=dev-perl/Date-Extract-0.02 + >=dev-perl/DateTime-Format-Natural-0.67 + >=dev-perl/Devel-StackTrace-1.19 + >=dev-perl/HTML-FormatText-WithLinks-0.14 + >=dev-perl/HTML-Mason-1.43 + >=dev-perl/HTML-Scrubber-0.08 + >=dev-perl/HTTP-Server-Simple-0.34 + >=dev-perl/HTTP-Server-Simple-Mason-0.14 + >=dev-perl/Locale-Maketext-Lexicon-0.32 + >=dev-perl/Log-Dispatch-2.410.0 + >=dev-perl/MIME-tools-5.425 + >=dev-perl/MailTools-1.60 + >=dev-perl/Module-Versions-Report-1.05 + >=dev-perl/Role-Basic-0.12 + >=dev-perl/Symbol-Global-Name-0.04 + >=dev-perl/Text-Quoted-2.80.0 + >=dev-perl/Text-WikiFormat-0.76 + >=dev-perl/Tree-Simple-1.04 + >=dev-perl/XML-RSS-1.05 + >=dev-perl/DBIx-SearchBuilder-1.660.0 + >=virtual/perl-Digest-MD5-2.27 + >=virtual/perl-Encode-2.730.0 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-Getopt-Long-2.24 + >=virtual/perl-Locale-Maketext-1.06 + >=virtual/perl-Storable-2.08 + dev-perl/CGI-Emulate-PSGI + dev-perl/CGI-PSGI + dev-perl/Cache-Simple-TimedExpiry + dev-perl/Calendar-Simple + dev-perl/Convert-Color + dev-perl/Crypt-Eksblowfish + dev-perl/Crypt-SSLeay + dev-perl/Crypt-X509 + dev-perl/DBD-SQLite + dev-perl/Data-GUID + dev-perl/Data-ICal + dev-perl/Date-Manip + dev-perl/Devel-GlobalDestruction + dev-perl/Email-Address + dev-perl/Email-Address-List + dev-perl/File-ShareDir + dev-perl/File-Which + dev-perl/GDGraph + dev-perl/GDTextUtil + dev-perl/GD[png,gif] + dev-perl/GnuPG-Interface + dev-perl/GraphViz + dev-perl/HTML-Format + dev-perl/HTML-FormatText-WithLinks-AndTables + dev-perl/HTML-Mason-PSGIHandler + dev-perl/HTML-Parser + dev-perl/HTML-Quoted + dev-perl/HTML-RewriteAttributes + dev-perl/HTML-Tree + dev-perl/IPC-Run3 + dev-perl/JSON + dev-perl/JavaScript-Minifier + dev-perl/MIME-Types + dev-perl/Module-Refresh + dev-perl/Mozilla-CA + dev-perl/Net-CIDR + dev-perl/PerlIO-eol + dev-perl/Plack + dev-perl/Regexp-Common-net-CIDR + dev-perl/Regexp-IPv6 + dev-perl/Starlet + dev-perl/String-ShellQuote + dev-perl/TermReadKey + dev-perl/Text-Autoformat + dev-perl/Text-Password-Pronounceable + dev-perl/Time-ParseDate + dev-perl/TimeDate + dev-perl/UNIVERSAL-require + dev-perl/libwww-perl + dev-perl/Locale-Maketext-Fuzzy + dev-perl/Net-Server + dev-perl/Regexp-Common + dev-perl/Text-Template + dev-perl/Text-Wrapper + virtual/perl-Digest + virtual/perl-File-Temp + virtual/perl-Scalar-List-Utils + virtual/perl-Time-HiRes + virtual/perl-libnet + + fastcgi? ( + dev-perl/FCGI + dev-perl/FCGI-ProcManager + ) + !lighttpd? ( + dev-perl/Apache-DBI + !fastcgi? ( >=www-apache/mod_perl-2 ) + ) + lighttpd? ( dev-perl/FCGI ) + mysql? ( >=dev-perl/DBD-mysql-2.1018 ) + postgres? ( >=dev-perl/DBD-Pg-1.43 ) +" + +RDEPEND="${DEPEND} + virtual/mta + !lighttpd? ( ${APACHE2_DEPEND} ) + lighttpd? ( + >=www-servers/lighttpd-1.3.13 + sys-apps/openrc + ) +" + +need_httpd_cgi + +add_user_rt() { + # add new user + # suexec2 requires uid >= 1000; enewuser is of no help here + # From: Mike Frysinger <vapier@gentoo.org> + # Date: Fri, 17 Jun 2005 08:41:44 -0400 + # i'd pick a 5 digit # if i were you + + local euser="rt" + + # first check if username rt exists + if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then + # check uid + rt_uid=$(egetent passwd "${euser}" | cut -d: -f3) + if $(expr ${rt_uid} '<' 1000 > /dev/null); then + ewarn "uid of user rt is less than 1000. suexec2 will not work." + ewarn "If you want to use FastCGI, please delete the user 'rt'" + ewarn "from your system and re-emerge www-apps/rt" + fi + return 0 # all is well + fi + + # add user + # stolen from enewuser + local pwrange euid + + pwrange=$(seq 10001 11001) + for euid in ${pwrange} ; do + [[ -z $(egetent passwd ${euid}) ]] && break + done + if [[ ${euid} == "11001" ]]; then + # she gets around, doesn't she? + die "No available uid's found" + fi + + elog " - Userid: ${euid}" + + enewuser rt ${euid} -1 /dev/null rt + return 0 +} + +pkg_setup() { + webapp_pkg_setup + + ewarn + ewarn "If you are upgrading from an existing RT installation" + ewarn "make sure to read the related upgrade documentation in" + ewarn "${ROOT}usr/share/doc/${PF}." + ewarn + + enewgroup rt + add_user_rt || die "Could not add user" +} + +src_prepare() { + # add Gentoo-specific layout + cat "${FILESDIR}"/config.layout-gentoo >> config.layout + sed -e "s|PREFIX|${ED}/${MY_HOSTROOTDIR}/${PF}|g" \ + -e "s|HTMLDIR|${ED}/${MY_HTDOCSDIR}|g" \ + -e 's|/\+|/|g' \ + -i ./config.layout || die 'config sed failed' + + # don't need to check dev dependencies + sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" \ + -i sbin/rt-test-dependencies.in || die 'dev sed failed' + + epatch "${FILESDIR}/rt-makefile-serialize-install-prereqs.patch" +} + +src_configure() { + local web + local myconf + local depsconf + + if use mysql ; then + myconf="--with-db-type=mysql --with-db-dba=root" + depsconf="--with-MYSQL" + elif use postgres ; then + myconf="--with-db-type=Pg --with-db-dba=postgres" + depsconf="--with-PG" + else + die "Pick a database backend" + fi + + if use fastcgi ; then + myconf+=" --with-web-handler=fastcgi" + web="apache" + depsconf+=" --with-FASTCGI" + elif use lighttpd ; then + myconf+=" --with-web-handler=fastcgi" + web="lighttpd" + depsconf+=" --with-FASTCGI" + else + myconf+=" --with-web-handler=modperl2" + web="apache" + depsconf+=" --with-MODPERL2" + fi + # Any loading Date::Manip from here on + # may fail if TZ=Factory as it is on gentoo install + # media ( affects install as well ) + export TZ=UTC + + ./configure --enable-layout=Gentoo \ + --with-bin-owner=rt \ + --with-libs-owner=rt \ + --with-libs-group=rt \ + --with-rt-group=rt \ + --with-web-user=${web} \ + --with-web-group=${web} \ + ${myconf} + + # check for missing deps and ask to report if something is broken + /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t + if grep -q "MISSING" "${T}"/t; then + ewarn "Missing Perl dependency!" + ewarn + cat "${T}"/t | grep MISSING + ewarn + ewarn "Please run perl-cleaner. If the problem persists," + ewarn "please file a bug in the Gentoo Bugzilla with the information above" + die "Missing dependencies." + fi +} + +src_compile() { :; } + +src_install() { + webapp_src_preinst + emake install + + dodoc -r docs/* + # Disable compression because `perldoc` doesn't decompress transparently + docompress -x /usr/share/doc + + # make sure we don't clobber existing site configuration + rm -f "${ED}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm + + # fix paths + find "${ED}" -type f -print0 | xargs -0 sed -i -e "s:${ED}::g" + + # copy upgrade files + insinto "${MY_HOSTROOTDIR}/${PF}" + doins -r etc/upgrade + + if use lighttpd ; then + newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN} + newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN} + sed -i -e "s/@@PF@@/${PF}/g" "${ED}"/etc/conf.d/${PN} || die + fi + + # require the web server's permissions + webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var + webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var/mason_data/obj + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_hook_script "${FILESDIR}"/reconfig + + webapp_src_install +} diff --git a/www-apps/rt/rt-4.4.1.ebuild b/www-apps/rt/rt-4.4.1.ebuild new file mode 100644 index 000000000000..352322924004 --- /dev/null +++ b/www-apps/rt/rt-4.4.1.ebuild @@ -0,0 +1,300 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit webapp eutils depend.apache user + +DESCRIPTION="RT is an enterprise-grade ticketing system" +HOMEPAGE="http://www.bestpractical.com/rt/" +SRC_URI="http://download.bestpractical.com/pub/${PN}/release/${P}.tar.gz" + +KEYWORDS="~amd64" +LICENSE="GPL-2" +IUSE="mysql +postgres fastcgi lighttpd" +REQUIRED_USE="^^ ( mysql postgres )" + +RESTRICT="test" + +DEPEND=" + >=dev-lang/perl-5.10.1 + + >=dev-perl/Apache-Session-1.53 + >=dev-perl/CGI-4 + >=dev-perl/CSS-Squish-0.06 + >=dev-perl/Class-Accessor-0.34 + >=dev-perl/Class-ReturnValue-0.550.0-r1 + >=dev-perl/DBI-1.37 + >=dev-perl/Date-Extract-0.02 + >=dev-perl/DateTime-Format-Natural-0.67 + >=dev-perl/Devel-StackTrace-1.19 + >=dev-perl/HTML-FormatText-WithLinks-0.14 + >=dev-perl/HTML-Mason-1.43 + >=dev-perl/HTML-Scrubber-0.08 + >=dev-perl/HTTP-Server-Simple-0.34 + >=dev-perl/HTTP-Server-Simple-Mason-0.14 + >=dev-perl/Locale-Maketext-Lexicon-0.32 + >=dev-perl/Log-Dispatch-2.410.0 + >=dev-perl/MIME-tools-5.425 + >=dev-perl/MailTools-1.60 + >=dev-perl/Module-Versions-Report-1.05 + >=dev-perl/Role-Basic-0.12 + >=dev-perl/Symbol-Global-Name-0.04 + >=dev-perl/Text-Quoted-2.80.0 + >=dev-perl/Text-WikiFormat-0.76 + >=dev-perl/Tree-Simple-1.04 + >=dev-perl/XML-RSS-1.05 + >=dev-perl/DBIx-SearchBuilder-1.660.0 + >=virtual/perl-Digest-MD5-2.27 + >=virtual/perl-Encode-2.730.0 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-Getopt-Long-2.24 + >=virtual/perl-Locale-Maketext-1.06 + >=virtual/perl-Storable-2.08 + dev-perl/Business-Hours + dev-perl/CGI-Emulate-PSGI + dev-perl/CGI-PSGI + dev-perl/Cache-Simple-TimedExpiry + dev-perl/Calendar-Simple + dev-perl/Convert-Color + dev-perl/Crypt-Eksblowfish + dev-perl/Crypt-SSLeay + dev-perl/Crypt-X509 + dev-perl/CSS-Minifier-XS + dev-perl/Data-Page-Pageset + dev-perl/DBD-SQLite + dev-perl/Data-GUID + dev-perl/Data-ICal + dev-perl/Date-Manip + dev-perl/Devel-GlobalDestruction + dev-perl/Email-Address + dev-perl/Email-Address-List + dev-perl/File-ShareDir + dev-perl/File-Which + dev-perl/GDGraph + dev-perl/GDTextUtil + dev-perl/GD[png,gif] + dev-perl/GnuPG-Interface + dev-perl/GraphViz + dev-perl/HTML-Format + dev-perl/HTML-FormatText-WithLinks-AndTables + dev-perl/HTML-Mason-PSGIHandler + dev-perl/HTML-Parser + dev-perl/HTML-Quoted + dev-perl/HTML-RewriteAttributes + dev-perl/HTML-Tree + dev-perl/IPC-Run3 + dev-perl/JSON + dev-perl/JavaScript-Minifier-XS + dev-perl/MIME-Types + dev-perl/Module-Refresh + dev-perl/Mozilla-CA + dev-perl/Net-CIDR + dev-perl/PerlIO-eol + dev-perl/Plack + dev-perl/Regexp-Common-net-CIDR + dev-perl/Regexp-IPv6 + dev-perl/Scope-Upper + dev-perl/Starlet + dev-perl/String-ShellQuote + dev-perl/TermReadKey + dev-perl/Text-Autoformat + dev-perl/Text-Password-Pronounceable + dev-perl/Time-ParseDate + dev-perl/TimeDate + dev-perl/UNIVERSAL-require + dev-perl/libwww-perl + dev-perl/Locale-Maketext-Fuzzy + dev-perl/Net-IP + dev-perl/Net-Server + dev-perl/Regexp-Common + dev-perl/Text-Template + dev-perl/Text-Wrapper + virtual/perl-Digest + virtual/perl-File-Temp + virtual/perl-Scalar-List-Utils + virtual/perl-Time-HiRes + virtual/perl-libnet + + fastcgi? ( + dev-perl/FCGI + dev-perl/FCGI-ProcManager + ) + !lighttpd? ( + dev-perl/Apache-DBI + !fastcgi? ( >=www-apache/mod_perl-2 ) + ) + lighttpd? ( dev-perl/FCGI ) + mysql? ( >=dev-perl/DBD-mysql-2.1018 ) + postgres? ( >=dev-perl/DBD-Pg-1.43 ) +" + +RDEPEND="${DEPEND} + virtual/mta + !lighttpd? ( ${APACHE2_DEPEND} ) + lighttpd? ( + >=www-servers/lighttpd-1.3.13 + sys-apps/openrc + ) +" + +need_httpd_cgi + +add_user_rt() { + # add new user + # suexec2 requires uid >= 1000; enewuser is of no help here + # From: Mike Frysinger <vapier@gentoo.org> + # Date: Fri, 17 Jun 2005 08:41:44 -0400 + # i'd pick a 5 digit # if i were you + + local euser="rt" + + # first check if username rt exists + if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then + # check uid + rt_uid=$(egetent passwd "${euser}" | cut -d: -f3) + if $(expr ${rt_uid} '<' 1000 > /dev/null); then + ewarn "uid of user rt is less than 1000. suexec2 will not work." + ewarn "If you want to use FastCGI, please delete the user 'rt'" + ewarn "from your system and re-emerge www-apps/rt" + fi + return 0 # all is well + fi + + # add user + # stolen from enewuser + local pwrange euid + + pwrange=$(seq 10001 11001) + for euid in ${pwrange} ; do + [[ -z $(egetent passwd ${euid}) ]] && break + done + if [[ ${euid} == "11001" ]]; then + # she gets around, doesn't she? + die "No available uid's found" + fi + + elog " - Userid: ${euid}" + + enewuser rt ${euid} -1 /dev/null rt + return 0 +} + +pkg_setup() { + webapp_pkg_setup + + ewarn + ewarn "If you are upgrading from an existing RT installation" + ewarn "make sure to read the related upgrade documentation in" + ewarn "${ROOT}usr/share/doc/${PF}." + ewarn + + enewgroup rt + add_user_rt || die "Could not add user" +} + +src_prepare() { + # add Gentoo-specific layout + cat "${FILESDIR}"/config.layout-gentoo >> config.layout + sed -e "s|PREFIX|${ED}/${MY_HOSTROOTDIR}/${PF}|g" \ + -e "s|HTMLDIR|${ED}/${MY_HTDOCSDIR}|g" \ + -e 's|/\+|/|g' \ + -i ./config.layout || die 'config sed failed' + + # don't need to check dev dependencies + sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" \ + -i sbin/rt-test-dependencies.in || die 'dev sed failed' + + epatch "${FILESDIR}/rt-makefile-serialize-install-prereqs.patch" +} + +src_configure() { + local web + local myconf + local depsconf + + if use mysql ; then + myconf="--with-db-type=mysql --with-db-dba=root" + depsconf="--with-MYSQL" + elif use postgres ; then + myconf="--with-db-type=Pg --with-db-dba=postgres" + depsconf="--with-PG" + else + die "Pick a database backend" + fi + + if use fastcgi ; then + myconf+=" --with-web-handler=fastcgi" + web="apache" + depsconf+=" --with-FASTCGI" + elif use lighttpd ; then + myconf+=" --with-web-handler=fastcgi" + web="lighttpd" + depsconf+=" --with-FASTCGI" + else + myconf+=" --with-web-handler=modperl2" + web="apache" + depsconf+=" --with-MODPERL2" + fi + # Any loading Date::Manip from here on + # may fail if TZ=Factory as it is on gentoo install + # media ( affects install as well ) + export TZ=UTC + + ./configure --enable-layout=Gentoo \ + --with-bin-owner=rt \ + --with-libs-owner=rt \ + --with-libs-group=rt \ + --with-rt-group=rt \ + --with-web-user=${web} \ + --with-web-group=${web} \ + ${myconf} + + # check for missing deps and ask to report if something is broken + /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t + if grep -q "MISSING" "${T}"/t; then + ewarn "Missing Perl dependency!" + ewarn + cat "${T}"/t | grep MISSING + ewarn + ewarn "Please run perl-cleaner. If the problem persists," + ewarn "please file a bug in the Gentoo Bugzilla with the information above" + die "Missing dependencies." + fi +} + +src_compile() { :; } + +src_install() { + webapp_src_preinst + emake install + + dodoc -r docs/* + # Disable compression because `perldoc` doesn't decompress transparently + docompress -x /usr/share/doc + + # make sure we don't clobber existing site configuration + rm -f "${ED}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm + + # fix paths + find "${ED}" -type f -print0 | xargs -0 sed -i -e "s:${ED}::g" + + # copy upgrade files + insinto "${MY_HOSTROOTDIR}/${PF}" + doins -r etc/upgrade + + if use lighttpd ; then + newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN} + newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN} + sed -i -e "s/@@PF@@/${PF}/g" "${ED}"/etc/conf.d/${PN} || die + fi + + # require the web server's permissions + webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var + webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var/mason_data/obj + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_hook_script "${FILESDIR}"/reconfig + + webapp_src_install +} |