summaryrefslogtreecommitdiffstats
path: root/main/rt4
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-07-06 10:21:15 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-07-06 10:24:35 +0300
commit0e902e56b891ec024aba7b56e4edf0010d359cd0 (patch)
tree0d1e9f7a9420b36a13d5f662c9aa41a8ca22c0c5 /main/rt4
parent2a12c1f8d7a9d2a292f74b915bd3ab55ecc4b3bc (diff)
downloadaports-0e902e56b891ec024aba7b56e4edf0010d359cd0.tar.bz2
aports-0e902e56b891ec024aba7b56e4edf0010d359cd0.tar.xz
main/rt4: create rt4 user, fix package permissions
* also add a patch to allow overriding of envelope-from from a template
Diffstat (limited to 'main/rt4')
-rw-r--r--main/rt4/0001-email-allow-envelope-from-overriding-from-templates.patch50
-rw-r--r--main/rt4/APKBUILD15
-rw-r--r--main/rt4/rt4.pre-install5
3 files changed, 66 insertions, 4 deletions
diff --git a/main/rt4/0001-email-allow-envelope-from-overriding-from-templates.patch b/main/rt4/0001-email-allow-envelope-from-overriding-from-templates.patch
new file mode 100644
index 000000000..a7bbf33d9
--- /dev/null
+++ b/main/rt4/0001-email-allow-envelope-from-overriding-from-templates.patch
@@ -0,0 +1,50 @@
+From f2f3542e163c534a437944089b801f6134c6b02a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 6 Jul 2011 09:56:57 +0300
+Subject: [PATCH] email: allow envelope from overriding from templates
+
+Add X-RT-Envelope-From header that will override the envelope
+from if using sendmailpipe mail sending.
+---
+ lib/RT/Interface/Email.pm | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
+index 620ca60..8bd94eb 100644
+--- a/lib/RT/Interface/Email.pm
++++ b/lib/RT/Interface/Email.pm
+@@ -343,7 +343,10 @@ sub SendEmail {
+
+ my $msgid = $args{'Entity'}->head->get('Message-ID') || '';
+ chomp $msgid;
+-
++
++ my $envelope_from = $args{'Entity'}->head->get('X-RT-Envelope-From');
++ chomp $envelope_from;
++
+ # If we don't have any recipients to send to, don't send a message;
+ unless ( $args{'Entity'}->head->get('To')
+ || $args{'Entity'}->head->get('Cc')
+@@ -408,16 +411,16 @@ sub SendEmail {
+
+ # SetOutgoingMailFrom
+ if ( RT->Config->Get('SetOutgoingMailFrom') ) {
+- my $OutgoingMailAddress;
++ my $OutgoingMailAddress = $envelope_from;
+
+ if ($TicketObj) {
+ my $QueueName = $TicketObj->QueueObj->Name;
+ my $QueueAddressOverride = RT->Config->Get('OverrideOutgoingMailFrom')->{$QueueName};
+
+ if ($QueueAddressOverride) {
+- $OutgoingMailAddress = $QueueAddressOverride;
++ $OutgoingMailAddress ||= $QueueAddressOverride;
+ } else {
+- $OutgoingMailAddress = $TicketObj->QueueObj->CorrespondAddress;
++ $OutgoingMailAddress ||= $TicketObj->QueueObj->CorrespondAddress;
+ }
+ }
+
+--
+1.7.1
+
diff --git a/main/rt4/APKBUILD b/main/rt4/APKBUILD
index 8645d2916..da69f0a71 100644
--- a/main/rt4/APKBUILD
+++ b/main/rt4/APKBUILD
@@ -2,8 +2,10 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rt4
pkgver=4.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="Request Tracker - issue and bug tracker"
+pkgusers="rt4"
+pkggroups="rt4"
url="http://www.bestpractical.com/rt"
arch="noarch"
license="GPLv2+"
@@ -68,9 +70,10 @@ depends="perl
"
makedepends="$depends"
-install=""
+install="$pkgname.pre-install"
subpackages=""
-source="http://www.bestpractical.com/pub/rt/release/rt-$pkgver.tar.gz"
+source="http://www.bestpractical.com/pub/rt/release/rt-$pkgver.tar.gz
+ 0001-email-allow-envelope-from-overriding-from-templates.patch"
_builddir="$srcdir"/rt-$pkgver
prepare() {
@@ -115,6 +118,9 @@ EOF
build() {
cd "$_builddir"
./configure --enable-layout=Alpine \
+ --with-rt-group=rt4 \
+ --with-web-group=rt4 \
+ --with-web-user=rt4 \
|| return 1
make || return 1
}
@@ -124,4 +130,5 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
-md5sums="bde89fbdadf7b709fb13f32638848b9d rt-4.0.1.tar.gz"
+md5sums="bde89fbdadf7b709fb13f32638848b9d rt-4.0.1.tar.gz
+ed9ba8bd09e68f4af1095aeedbe7a18b 0001-email-allow-envelope-from-overriding-from-templates.patch"
diff --git a/main/rt4/rt4.pre-install b/main/rt4/rt4.pre-install
new file mode 100644
index 000000000..245b32e28
--- /dev/null
+++ b/main/rt4/rt4.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S rt4 2>/dev/null
+adduser -S -s /bin/false -G rt4 -D -H -g "Request Tracker 4 user" rt4 2>/dev/null
+exit 0