summaryrefslogtreecommitdiff
path: root/www-apps/rt/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/rt/files
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/rt/files')
-rw-r--r--www-apps/rt/files/config.layout-gentoo26
-rw-r--r--www-apps/rt/files/postinstall-en.txt19
-rw-r--r--www-apps/rt/files/reconfig56
-rw-r--r--www-apps/rt/files/rt-makefile-serialize-install-prereqs.patch12
-rw-r--r--www-apps/rt/files/rt.conf.d.210
-rw-r--r--www-apps/rt/files/rt.init.d.250
6 files changed, 173 insertions, 0 deletions
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 $?
+}