diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-apps/rt | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-apps/rt')
-rw-r--r-- | www-apps/rt/Manifest | 1 | ||||
-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 | 11 | ||||
-rw-r--r-- | www-apps/rt/files/rt.init.d.2 | 51 | ||||
-rw-r--r-- | www-apps/rt/metadata.xml | 18 | ||||
-rw-r--r-- | www-apps/rt/rt-4.2.11.ebuild | 292 |
9 files changed, 486 insertions, 0 deletions
diff --git a/www-apps/rt/Manifest b/www-apps/rt/Manifest new file mode 100644 index 000000000000..7ce37abd846a --- /dev/null +++ b/www-apps/rt/Manifest @@ -0,0 +1 @@ +DIST rt-4.2.11.tar.gz 7537515 SHA256 dc07f32dd04a50bd9d0ff86a1f9fe3cd1a128f01cbbd018e5fa23a41ddfb87e6 SHA512 dec4db4c2e3ec8c167e6fde16817fb07441a297cbdf6e035f100aa94d9eb1831f11b8d4dbfb8376a5da689ff2378647de2a52683692f91d3ab6b1044aecd9c43 WHIRLPOOL aefeac9dd7cbf343f5a20f467a5b86d10a07e742475dc4d397b61c7499245862d9c67bd3406e419bccefa069a69aa3375b0e9fe0879d7a67899f99f978fb782a 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..c405974373fa --- /dev/null +++ b/www-apps/rt/files/rt.conf.d.2 @@ -0,0 +1,11 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# 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..9d45e40ef04c --- /dev/null +++ b/www-apps/rt/files/rt.init.d.2 @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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..1a61ca9bfee3 --- /dev/null +++ b/www-apps/rt/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>web-apps</herd> + <herd>proxy-maintainers</herd> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <maintainer> + <email>eric.joshua.martin@gmail.com</email> + <name>Eric Martin</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.11.ebuild b/www-apps/rt/rt-4.2.11.ebuild new file mode 100644 index 000000000000..0293dda01124 --- /dev/null +++ b/www-apps/rt/rt-4.2.11.ebuild @@ -0,0 +1,292 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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/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/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 + >=dev-perl/Locale-Maketext-Lexicon-0.32 + >=dev-perl/CGI-4 + >=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/DateManip + dev-perl/Devel-GlobalDestruction + dev-perl/Email-Address + dev-perl/Email-Address-List + dev-perl/File-ShareDir + dev-perl/File-Which + dev-perl/GD + dev-perl/GDGraph + dev-perl/GDTextUtil + 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-Password-Pronounceable + dev-perl/Time-modules + 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-autoformat + 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 + + ./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 +} |