1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/rt6: new aport

This commit is contained in:
Wen Heping 2025-06-21 12:45:36 +00:00 committed by Celeste
parent ee6e564bd0
commit 6624ef0c16
5 changed files with 276 additions and 0 deletions

View file

@ -0,0 +1,61 @@
From 16205e84a3b6de87dbe46a03174c2d75f1d1d544 Mon Sep 17 00:00:00 2001
From: Kory Prince <korylprince@gmail.com>
Date: Thu, 22 Mar 2018 13:00:02 -0500
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 | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
--- a/lib/RT/Interface/Email.pm.orig
+++ b/lib/RT/Interface/Email.pm
@@ -755,8 +755,15 @@
}
sub _OutgoingMailFrom {
- my $TicketObj = shift;
+ my (%args) = (
+ Ticket => undef,
+ envelope_from => undef,
+ @_,
+ );
+ my $TicketObj = $args{'Ticket'};
+ my $envelope_from = $args{'envelope_from'};
+
my $MailFrom = RT->Config->Get('SetOutgoingMailFrom');
my $OutgoingMailAddress = $MailFrom =~ /\@/ ? $MailFrom : undef;
my $Overrides = RT->Config->Get('OverrideOutgoingMailFrom') || {};
@@ -769,8 +776,9 @@
if ($QueueAddressOverride) {
$OutgoingMailAddress = $QueueAddressOverride;
} else {
- $OutgoingMailAddress ||= $Queue->CorrespondAddress
- || RT->Config->Get('CorrespondAddress');
+ $OutgoingMailAddress ||= $envelope_from
+ || $Queue->CorrespondAddress
+ || RT->Config->Get('CorrespondAddress');
}
}
elsif ($Overrides->{'Default'}) {
@@ -839,6 +847,9 @@
my $msgid = Encode::decode( "UTF-8", $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')
@@ -923,7 +934,7 @@
@args = shellwords( RT->Config->Get('SendmailArguments') );
if ( RT->Config->Get('SetOutgoingMailFrom') ) {
- my $OutgoingMailAddress = _OutgoingMailFrom($TicketObj);
+ my $OutgoingMailAddress = _OutgoingMailFrom($TicketObj,$envelope_from );
push @args, "-f", $OutgoingMailAddress if $OutgoingMailAddress;
}
}

188
testing/rt6/APKBUILD Normal file
View file

@ -0,0 +1,188 @@
# Contributor: Wen Heping <wenhepingalpine@sohu.com>
# Maintainer: Wen Heping <wenhepingalpine@sohu.com>
pkgname=rt6
pkgver=6.0.0
pkgrel=0
pkgdesc="Request Tracker - issue and bug tracker"
pkgusers="rt6"
pkggroups="rt6"
url="https://bestpractical.squarespace.com/request-tracker"
arch="noarch"
license="GPL-2.0-or-later"
options="!check" # need to install the RT_Config module
depends="perl
font-droid
perl-apache-session
perl-business-hours
perl-cache-simple-timedexpiry
perl-cgi
perl-cgi-emulate-psgi
perl-cgi-psgi
perl-class-accessor
perl-convert-color
perl-crypt-eksblowfish
perl-crypt-ssleay
perl-crypt-x509
perl-css-inliner
perl-css-minifier-xs
perl-css-squish
perl-data-guid
perl-data-ical
perl-data-page-pageset
perl-date-extract
perl-date-manip
perl-datetime
perl-datetime-format-natural
perl-datetime-locale
perl-dbd-mysql
perl-dbd-pg
perl-dbi
perl-dbix-searchbuilder
perl-devel-globaldestruction
perl-devel-stacktrace
perl-digest-sha1
perl-email-address
perl-email-address-list
perl-encode-detect
perl-encode-hanextra
perl-fcgi
perl-fcgi-procmanager
perl-file-sharedir
perl-file-which
perl-getopt-long
perl-hash-merge
perl-hash-merge-extra
perl-html-formatexternal
perl-html-formatter
perl-html-formattext-withlinks
perl-html-formattext-withlinks-andtables
perl-html-gumbo
perl-html-mason
perl-html-mason-psgihandler
perl-html-parser
perl-html-quoted
perl-html-rewriteattributes>=0.05
perl-html-scrubber
perl-html-tree
perl-imager
perl-ipc-run3
perl-javascript-minifier
perl-javascript-minifier-xs
perl-json
perl-list-moreutils
perl-locale-maketext-fuzzy
perl-locale-maketext-lexicon
perl-log-dispatch
perl-lwp-protocol-https
perl-mailtools
perl-mime-tools
perl-mime-types
perl-module-path
perl-module-refresh
perl-module-versions-report
perl-moose
perl-moosex-nonmoose
perl-moosex-role-parameterized
perl-mozilla-ca
perl-net-cidr
perl-net-ip
perl-parallel-forkmanager
perl-path-dispatcher
perl-plack
perl-pod-parser
perl-regexp-common-net-cidr
perl-regexp-ipv6
perl-role-basic
perl-scope-upper
perl-starlet
perl-string-shellquote
perl-sub-exporter
perl-symbol-global-name
perl-term-readkey
perl-text-password-pronounceable
perl-text-quoted
perl-text-template
perl-text-wikiformat
perl-text-worddiff
perl-text-wrapper
perl-time-hires
perl-time-parsedate
perl-tree-simple
perl-universal-require
perl-web-machine
perl-xml-rss
"
makedepends="autoconf"
install="$pkgname.pre-install $pkgname.pre-upgrade"
source="https://download.bestpractical.com/pub/rt/release/rt-$pkgver.tar.gz
rt-varpath.patch
0001-email-allow-envelope-from-overriding-from-templates.patch
"
builddir="$srcdir"/rt-$pkgver
prepare() {
default_prepare
sed -i -e 's_$RT::BasePath/share/fonts/_/usr/share/fonts/TTF/_g' \
"$builddir"/etc/RT_Config.pm*
cat <<-'EOF' >> config.layout
# Alpine directory layout.
<Layout Alpine>
prefix: /usr
exec_prefix: $prefix
bindir: $exec_prefix/bin
sbindir: $exec_prefix/sbin
sysconfdir: /etc/rt6
mandir: $prefix/share/man
plugindir: $prefix/lib/rt6/plugins
libdir: $prefix/lib/rt6/
datadir: $prefix/share/rt6
htmldir: $datadir/html
fontdir: $datadir/fonts
lexdir: $datadir/po
staticdir: $datadir/static
manualdir: $datadir/doc
localstatedir: /var
logfiledir: $localstatedir/log
masonstatedir: $localstatedir/cache/mason_data
sessionstatedir: $localstatedir/cache/session_data
customdir: $prefix/local
custometcdir: $customdir/etc
customhtmldir: $customdir/html
customlexdir: $customdir/po
customlibdir: $customdir/lib
customplugindir: $customdir/plugins
</Layout>
EOF
}
build() {
autoconf
./configure \
--build=$CBUILD \
--host=$CHOST \
--enable-layout=Alpine \
--with-rt-group=rt6 \
--with-web-group=rt6 \
--with-web-user=rt6 \
--disable-gpg \
--disable-graphviz
make testdeps
make
}
package() {
make -j1 DESTDIR="$pkgdir" install
# delete the droid fonts as we get them from ttf-droid
rm -rf "${pkgdir:?}"/usr/share/rt6/fonts/ \
"${pkgdir:?}"/usr/local
}
sha512sums="
ce6e2f5a2b41a13eede05941d17dbf6672b41fb764f97a11ec518723704030dc90e70c417bcc94d205f4de9ac8cb9bac98d6d52c29737135ba57e21cd5551d15 rt-6.0.0.tar.gz
42d41f0c185f190476f8707ce70e0085513d95d7dd3da816e9e1e966994c5e108fe6107379e6017dccbfc2d32cdd0bad0a839b514da3184e84f30e7ecc2f44b8 rt-varpath.patch
643a429edda3be93f4613ea0ea5acb7070716d2629325465a0c7590a9b04acadeaae1136cb5b254baba17886ac0c995fd496af11313b73100ccbbf360d4b52da 0001-email-allow-envelope-from-overriding-from-templates.patch
"

View file

@ -0,0 +1,20 @@
--- a/configure.ac
+++ b/configure.ac
@@ -376,7 +376,7 @@ AC_SUBST([RT_ETC_PATH], ${exp_sysconfd
AC_SUBST([CONFIG_FILE_PATH], ${exp_sysconfdir})
AC_SUBST([RT_BIN_PATH], ${exp_bindir})
AC_SUBST([RT_SBIN_PATH], ${exp_sbindir})
-AC_SUBST([RT_VAR_PATH], ${exp_localstatedir})
+AC_SUBST([RT_VAR_PATH], ${exp_datadir})
AC_SUBST([RT_MAN_PATH], ${exp_mandir})
AC_SUBST([RT_FONT_PATH], ${exp_fontdir})
AC_SUBST([RT_PLUGIN_PATH], ${exp_plugindir})
@@ -428,7 +428,7 @@ AC_SUBST([RT_PLUGIN_PATH_R], ${exp_plug
AC_SUBST([CONFIG_FILE_PATH_R], ${exp_sysconfdir})
AC_SUBST([RT_BIN_PATH_R], ${exp_bindir})
AC_SUBST([RT_SBIN_PATH_R], ${exp_sbindir})
-AC_SUBST([RT_VAR_PATH_R], ${exp_localstatedir})
+AC_SUBST([RT_VAR_PATH_R], ${exp_datadir})
AC_SUBST([RT_MAN_PATH_R], ${exp_mandir})
AC_SUBST([RT_FONT_PATH_R], ${exp_fontdir})
AC_SUBST([MASON_DATA_PATH_R], ${exp_masonstatedir})

View file

@ -0,0 +1,6 @@
#!/bin/sh
addgroup -S rt6 2>/dev/null
adduser -S -D -H -s /sbin/nologin -G rt6 -g "Request Tracker 6 user" rt6 2>/dev/null
exit 0

1
testing/rt6/rt6.pre-upgrade Symbolic link
View file

@ -0,0 +1 @@
rt6.pre-install