Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2007 07:42:37 GMT
From:      Nick Barkas<snb@threerings.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/111179: [patch] [maintainer] devel/otrs update to 2.1.6 and switch to statically assigned UID/GID
Message-ID:  <200704030742.l337gb8U007320@www.freebsd.org>
Resent-Message-ID: <200704030750.l337o386045627@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         111179
>Category:       ports
>Synopsis:       [patch] [maintainer] devel/otrs update to 2.1.6 and switch to statically assigned UID/GID
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 03 07:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Nick Barkas
>Release:        FreeBSD 6.1 i386
>Organization:
Three Rings Design
>Environment:
FreeBSD maguro.moduli.net 6.1-SECURITY FreeBSD 6.1-SECURITY #0: Mon Aug 28 05:21:08 UTC 2006     root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The current OTRS port does not use a static UID or GID assigned in /usr/ports/UIDs and /usr/ports/GIDs. This patch causes OTRS to use UID and GID 121 when it creates a new user, as that number is currently unassigned. In addition to my patch below, appropriate lines will have to be added to the UIDs and GIDs files.

Also, this upgrades to the latest release of OTRS, 2.1.6.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN otrs.orig/Makefile otrs/Makefile
--- otrs.orig/Makefile	Sun Feb 25 04:04:56 2007
+++ otrs/Makefile	Tue Apr  3 00:07:57 2007
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	otrs
-PORTVERSION=	2.1.3
-PORTREVISION=	1
+PORTVERSION=	2.1.6
 CATEGORIES=	devel
 MASTER_SITES=	http://ftp.otrs.org/pub/otrs/ \
 		ftp://ftp.samurai.com/pub/otrs/ \
diff -urN otrs.orig/distinfo otrs/distinfo
--- otrs.orig/distinfo	Wed Nov 22 19:26:35 2006
+++ otrs/distinfo	Tue Apr  3 00:10:06 2007
@@ -1,3 +1,3 @@
-MD5 (otrs-2.1.3.tar.gz) = 669b48aff1d9609520875cdc955e2101
-SHA256 (otrs-2.1.3.tar.gz) = 296fd91f78adce211c3524c873b07bfa42b7aaef825448a2e98c7fb81bc5beda
-SIZE (otrs-2.1.3.tar.gz) = 13003457
+MD5 (otrs-2.1.6.tar.gz) = eaa4e097c7bbcb47e834841456c2f778
+SHA256 (otrs-2.1.6.tar.gz) = bc87c91813cf8f5b1b61abfdcde3714ed1ee2229b30a44419345b7113d06db1f
+SIZE (otrs-2.1.6.tar.gz) = 13088325
diff -urN otrs.orig/files/patch-bin-SetPermissions.sh otrs/files/patch-bin-SetPermissions.sh
--- otrs.orig/files/patch-bin-SetPermissions.sh	Thu Jul 27 11:20:46 2006
+++ otrs/files/patch-bin-SetPermissions.sh	Wed Dec 31 16:00:00 1969
@@ -1,15 +0,0 @@
---- bin/SetPermissions.sh.orig	Fri Jul 21 21:03:43 2006
-+++ bin/SetPermissions.sh	Fri Jul 21 21:07:02 2006
-@@ -55,9 +55,10 @@
- echo "chown -R $WEBUSER:$OTRSGROUP $OTRSDEST"
- chown $WEBUSER:$OTRSGROUP $OTRSDEST
- chown -R $WEBUSER:$OTRSGROUP $OTRSDEST
--echo "chmod -R og+rw $OTRSDEST"
--chmod ug+wr $OTRSDEST
-+echo "chmod -R og+rw $OTRSDEST/*"
- chmod -R ug+wr $OTRSDEST
-+# procmail does not like the home directory to be group writeable
-+chmod g-w $OTRSDEST
- 
- # set the $HOME to the OTRS user
- echo "chown $OTRSUSER:$OTRSGROUP $OTRSDEST"
diff -urN otrs.orig/files/pkg-install.in otrs/files/pkg-install.in
--- otrs.orig/files/pkg-install.in	Wed Jul  5 10:15:24 2006
+++ otrs/files/pkg-install.in	Mon Apr  2 23:57:13 2007
@@ -7,12 +7,14 @@
 WWWGRP="www"
 OTRS_USER="otrs"
 OTRS_GROUP="otrs"
+OTRS_UID=121
+OTRS_GID=121
 
 case $2 in
 PRE-INSTALL)
 
 	if ! pw groupshow -n ${OTRS_GROUP} >/dev/null 2>&1; then
-		if pw groupadd -n ${OTRS_GROUP}; then
+		if pw groupadd -n ${OTRS_GROUP} -g ${OTRS_GID}; then
 			echo "Added group \"${OTRS_GROUP}\"."
 		else
 			echo "Adding group \"${OTRS_GROUP}\" failed..."
@@ -22,7 +24,7 @@
 
 	if ! id -u ${OTRS_USER} >/dev/null 2>&1; then
 		if pw useradd -n ${OTRS_USER} -g ${OTRS_GROUP} \
-		-G ${WWWGRP} -h - -s /bin/csh \
+		-u ${OTRS_UID} -G ${WWWGRP} -h - -s /bin/csh \
 		-d ${PKG_PREFIX}/otrs -c "OTRS Administrator" ; then
 			echo "Added user \"${OTRS_USER}\"."
 		else
diff -urN otrs.orig/pkg-plist otrs/pkg-plist
--- otrs.orig/pkg-plist	Wed Nov 22 19:26:35 2006
+++ otrs/pkg-plist	Tue Apr  3 00:26:10 2007
@@ -16,6 +16,7 @@
 otrs/bin/PostMasterPOP3.pl
 otrs/bin/RebuildTicketIndex.pl
 otrs/bin/SetPermissions.sh
+otrs/bin/StatsExportToOPM.pl
 otrs/bin/UnlockTickets.pl
 otrs/bin/XMLMaster.pl
 otrs/bin/mkStats.pl
@@ -587,6 +588,7 @@
 otrs/Kernel/System/Ticket/Number/Random.pm
 otrs/Kernel/System/Ticket/Permission/GroupCheck.pm
 otrs/Kernel/System/Ticket/Permission/OwnerCheck.pm
+otrs/Kernel/System/Ticket/Permission/ResponsibleCheck.pm
 otrs/Kernel/System/User/Preferences/DB.pm
 otrs/Kernel/System/Web/InterfaceAgent.pm
 otrs/Kernel/System/Web/InterfaceCustomer.pm

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704030742.l337gb8U007320>