Date: Sat, 23 Aug 2014 22:10:33 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r365835 - in head/databases/gnats4: . files Message-ID: <201408232210.s7NMAXnX077563@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Sat Aug 23 22:10:32 2014 New Revision: 365835 URL: http://svnweb.freebsd.org/changeset/ports/365835 QAT: https://qat.redports.org/buildarchive/r365835/ Log: Stage databases/gnats4 and assign new maintainer PR: 192881 Submitted by: Chris Hutchinson I am sure many people wanted to see this port die, but Chris wanted to save it. Unfortunately his PR only contained about 2% of the work needed to properly stage it. I had to overhaul it with the changes to numerous to recount. Some big ticket items: converted to OptionsNG the EMACS and CLIENT_ONLY knobs (the ability to define the exact EMACS version is lost, it just takes the default. There are only 2 EMACS versions anyway). The chown/mode changes where moved from vendor makefile to pkg-plist. I also leveraged @sample keyword for the two conf files. Added: head/databases/gnats4/files/extrapatch-gnats__edit-pr.sh - copied unchanged from r365476, head/databases/gnats4/files/extrapatch-gnats::edit-pr.sh Deleted: head/databases/gnats4/files/extrapatch-gnats::edit-pr.sh Modified: head/databases/gnats4/Makefile head/databases/gnats4/files/patch-gnats__Makefile.in head/databases/gnats4/pkg-plist Modified: head/databases/gnats4/Makefile ============================================================================== --- head/databases/gnats4/Makefile Sat Aug 23 22:08:30 2014 (r365834) +++ head/databases/gnats4/Makefile Sat Aug 23 22:10:32 2014 (r365835) @@ -1,32 +1,29 @@ # Created by: Oliver Eikemeier <eikemeier@fillmore-labs.com> # $FreeBSD$ -PORTNAME= gnats -PORTVERSION= 4.1.0 -PORTREVISION= 2 -CATEGORIES= databases devel -MASTER_SITES= ${MASTER_SITE_GNU} +PORTNAME= gnats +PORTVERSION= 4.1.0 +PORTREVISION= 3 +CATEGORIES= databases devel +MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= gnats +PKGNAMESUFFIX= 4 -MAINTAINER= ports@FreeBSD.org -COMMENT= GNATS, the GNU Problem Report Management System +MAINTAINER= portmaster@bsdforge.com +COMMENT= GNATS, the GNU Problem Report Management System -GNU_CONFIGURE= yes -USES= gmake makeinfo +GNU_CONFIGURE= yes +USES= gmake makeinfo +USE_GCC= any +USERS= gnats -LATEST_LINK= ${PKGNAMEPREFIX}gnats4${PKGNAMESUFFIX} -CONFLICTS= gnats-3.* - -PKGMESSAGE= ${WRKDIR}/pkg-message -PKGINSTALL= ${WRKDIR}/pkg-install +PKGMESSAGE= ${WRKDIR}/pkg-message +PKGINSTALL= ${WRKDIR}/pkg-install .ifdef WANT_FREEFALL_CFG EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-* - GNATSDBDIR= ${DATADIR} - CONFIGURE_ARGS+= --with-gnats-default-db=${GNATSDBDIR}/gnats-db - WITH_SUBMITTER_ID= current-users WITH_ORGANIZATION= FreeBSD WITH_GNATSD_SERVICE= support @@ -48,38 +45,30 @@ CONFIGURE_ARGS+= --with-organization=${W CONFIGURE_ARGS+= --with-gnats-service=${WITH_GNATSD_SERVICE} .endif -PLIST_SUB= GNATSDBDIR=${GNATSDBDIR} - -MAN1= edit-pr.1 query-pr.1 send-pr.1 -MAN5= databases.5 dbconfig.5 -MAN7= gnats.7 -MAN8= delete-pr.8 getclose.8 file-pr.8 gen-index.8 gnatsd.8 \ - install-sid.8 mkcat.8 mkdb.8 pr-edit.8 queue-pr.8 rmcat.8 -INFO= gnats-faq gnats -DOCFILES= NEWS UPGRADING - -.ifdef WITH_EMACS_PORT -USE_EMACS= yes -EMACS_PORT_NAME= ${WITH_EMACS_PORT} -CONFIGURE_ARGS+= --with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR} -.else -PLIST_SUB+= EMACS_SITE_LISPDIR="@comment " +PLIST_SUB= GNATSDBDIR=${GNATSDBDIR} +INFO= gnats-faq gnats +PORTDOCS= NEWS UPGRADING + +OPTIONS_DEFINE= DOCS EMACS SERVER +OPTIONS_DEFAULT=SERVER +OPTIONS_SUB= yes +EMACS_USE= EMACS=yes +EMACS_DESC= Add support for default version of EMACS +SERVER_DESC= Install the gnats server too + +.include <bsd.port.options.mk> + +.if ! ${PORT_OPTIONS:MSERVER} +ALL_TARGET= all-tools +INSTALL_TARGET= install-tools .endif -.ifdef CLIENT_ONLY -ALL_TARGET= all-tools -INSTALL_TARGET= install-tools -PLIST_SUB+= SERVER="@comment " -PKGNAMESUFFIX= -client -CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-4.* +.if ${PORT_OPTIONS:MEMACS} +CONFIGURE_ARGS+=--with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR} .else -PLIST_SUB+= SERVER="" -CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-client-4.* +PLIST_SUB+= EMACS_SITE_LISPDIR="@comment " .endif -OPTIONS_DEFINE= DOCS - -NO_STAGE= yes pre-everything:: .if !defined(PACKAGE_BUILDING) && !defined(WANT_FREEFALL_CFG) @${ECHO} "=============================================================" @@ -89,7 +78,6 @@ pre-everything:: @${ECHO} "WITH_SUBMITTER_ID=unknown default submitter-id" @${ECHO} "WITH_ORGANIZATION='unknown' default organization" @${ECHO} "WITH_GNATSD_SERVICE=support default gnatsd port name" - @${ECHO} "WITH_EMACS_PORT=emacs with Emacs support" @${ECHO} @${ECHO} "=============================================================" @${ECHO} @@ -100,26 +88,22 @@ pre-configure: post-build: @for doc in pkg-message pkg-install; do \ - ${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ + ${SED} -e 's,%%PREFIX%%,${STAGEDIR}${PREFIX},g' \ -e 's,%%GNATSDBDIR%%,${GNATSDBDIR},g' \ - ${PKGDIR}/$${doc} >${WRKDIR}/$${doc} ; \ + ${PKGDIR}/$${doc} >${WRKDIR}/$${doc}; \ done pre-install: - @${MKDIR} ${PREFIX}/libexec/gnats - @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/gnats post-install: -.ifndef CLIENT_ONLY - @for conf in databases gnatsd.host_access; do \ - [ -f ${PREFIX}/etc/gnats/$${conf} ] \ - || ${CP} ${PREFIX}/etc/gnats/$${conf}.default ${PREFIX}/etc/gnats/$${conf}; \ - done +.if ${PORT_OPTIONS:MSERVER} + ${MV} ${STAGEDIR}${ETCDIR}/databases.default \ + ${STAGEDIR}${ETCDIR}/databases.sample + ${MV} ${STAGEDIR}${ETCDIR}/gnatsd.host_access.default \ + ${STAGEDIR}${ETCDIR}/gnatsd.host_access.sample .endif - @${MKDIR} ${DOCSDIR} - @for doc in ${DOCFILES}; do \ - ${INSTALL_DATA} ${WRKSRC}/$${doc} ${DOCSDIR}; \ - done - @${CAT} ${PKGMESSAGE} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) .include <bsd.port.mk> Copied: head/databases/gnats4/files/extrapatch-gnats__edit-pr.sh (from r365476, head/databases/gnats4/files/extrapatch-gnats::edit-pr.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/gnats4/files/extrapatch-gnats__edit-pr.sh Sat Aug 23 22:10:32 2014 (r365835, copy of r365476, head/databases/gnats4/files/extrapatch-gnats::edit-pr.sh) @@ -0,0 +1,265 @@ +--- gnats/edit-pr.sh.orig Sun May 26 16:32:02 2002 ++++ gnats/edit-pr.sh Sat Dec 6 02:43:44 2003 +@@ -5,6 +5,8 @@ + # Contributed by Jeffrey Osier (jeffrey@cygnus.com). + # Majorly revised by Bob Manson (manson@juniper.net). + # Further improvements by Dirk Bergstrom (dirk@juniper.net). ++# Patches for the FreeBSD Project by Ceri Davies (ceri@FreeBSD.org), ++# based on work by Paul Richards (paul@FreeBSD.org). + # + # This file is part of GNU GNATS. + # +@@ -24,9 +26,12 @@ + + debug_print=false # or echo to get output. + BINDIR=xBINDIRx ++DATE=`LC_TIME=C date` # Some prstats tools rely on this format ++GNATS_ROOT=${GNATS_ROOT:-/usr/local/share/gnats/gnats-db}; export GNATS_ROOT + LIBEXECDIR=xLIBEXECDIRx + GNATS_PORT= + locked= ++rc=0 + version=xVERSIONx + + usage=" +@@ -99,28 +104,23 @@ + + *) + if [ "`echo $1 | grep /`" != "" ]; then +- pr_id=`echo $1 | awk -F"/" '{print $2}' -` ++ pr=`echo $1 | awk -F"/" '{print $2}' -` + else +- pr_id=$1 ++ pr=$1 + fi ++ prs="$prs $pr" + ;; + esac + shift + done + ++chng_tpl="${GNATS_ROOT}/gnats-adm/edit-pr-msg" ++ + # set command here to always pass host and port, and directory if supplied + QUERY_PR="$BINDIR/query-pr $GNATS_HOST $GNATS_PORT $GNATS_DB $EDIT_USER $EDIT_PASSWD" + PR_ADDR="$QUERY_PR --responsible-address" + PR_EDIT="$LIBEXECDIR/gnats/pr-edit $GNATS_HOST $GNATS_PORT $EDIT_USER $EDIT_PASSWD $GNATS_DB" + +-# These traps take care of deleting all the /tmp files +-trap 'rm -f $new.old $change_msg $fixfil' 0 +-# Don't delete $new on error signals +-trap 'if [ "$locked" != "" ]; then \ +- $PR_EDIT --unlock $pr_id ; \ +- locked= ; \ +- fi' 1 2 3 13 15 +- + # find a user name + if [ "$USER" != "" ]; then + me=$USER +@@ -138,85 +138,45 @@ + full_me="$me" + fi + ++for pr_id in $prs ; do ++ ++epdir=`mktemp -d /tmp/epXXXXXX || exit 75` ++chng_msg="$epdir/chng.$pr_id.$$" + # new = temp file to use for editing +-new="/tmp/ep$$" +-newtmp="/tmp/ep$$.tp" +-change_msg="/tmp/ep$$.ch" +-fixfil="/tmp/ep$$.fx" ++new="$epdir/$pr_id.ep$$" ++change_msg="$epdir/ep$$.$pr_id.ch" ++keepnew= ++ ++# These traps take care of deleting all the /tmp files ++trap 'rm -f $new.old $change_msg chng_msg; rmdir $epdir 2>/dev/null' 0 ++trap 'if [ "$locked" != "" ]; then \ ++ $PR_EDIT --unlock $pr_id ; \ ++ locked= ; \ ++ fi; \ ++ rm -f $new.old $change_msg chng_msg; rmdir $epdir 2>/dev/null' 1 2 3 13 15 ++ + + # lock the pr + $debug_print "Locking $pr_id." +-lock=`$PR_EDIT --lock=$full_me --process=$$ $pr_id 2>&1 > $new` ++lock=`$PR_EDIT --lock=$me --process=$$ $pr_id 2>&1 > $new` + locked=t + + if [ "$lock" != "" ] ; then ++ echo "Failed to lock PR $pr_id" + echo $lock +- exit 0 ++ rc=1 ++ rm -r $epdir ++ continue + fi + +-rm -f $fixfil +- +-# Now add any missing fields, along with a description. +- +-$QUERY_PR --list-fields | while read field +-do +- grep -i "^>${field}:" "$new" > /dev/null 2>&1 +- if [ $? != 0 ] +- then +- $QUERY_PR --field-flags "$field" | grep -i readonly > /dev/null 2>&1 +- if [ $? != 0 ] +- then +- type="`$QUERY_PR --field-type $field`" +- case $type in +- [Ee][Nn][Uu][Mm]) +- values=`$QUERY_PR --valid-values $field | tr '\n' ' ' | sed 's/ *$//g; s/ / | /g;s/^/[ /;s/$/ ]/;` +- valslen=`echo "$values" | wc -c` +- if [ "$valslen" -gt 160 ] +- then +- desc="<`$QUERY_PR --field-description $field` (one line)>"; +- else +- desc="<${values} (one line)>"; +- fi +- dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'` +- echo "/^>${field}:/ s/${dpat}//" >> $fixfil +- echo "/>${field}: ${desc}" >> $new; +- ;; +- [Mm][Uu][Ll][Tt][Ii][Tt][Ee][Xx][Tt]) +- desc=" <`$QUERY_PR --field-description $field` (multiple lines)>"; +- dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'` +- echo "s/^${dpat}//" >> $fixfil +- echo ">${field}:" >> $new; +- echo "$desc" >> $new; +- ;; +- *) +- desc="<`$QUERY_PR --field-description $field` (one line)>" +- dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'` +- echo "/^>${field}:/ s/${dpat}//" >> $fixfil +- echo ">${field}: ${desc}" >> $new +- ;; +- esac +- else +- prevfld="$field"; +- fi +- fi +-done +- + # here's where we actually call the editor. + cp $new $new.old + $VISUAL $new + if cmp -s $new.old $new ; then + echo "edit-pr: PR not changed" + $PR_EDIT --unlock $pr_id +- exit 0 +-fi +- +-if [ -f $fixfil ] +-then +- sed -f $fixfil < $new > $newtmp +- mv $newtmp $new +- sed -f $fixfil < $new.old > $newtmp +- mv $newtmp $new.old +- rm -f $fixfil ++ rm -r $epdir ++ continue + fi + + # error-check output by calling pr-edit --check; if mistakes exist, +@@ -233,7 +193,7 @@ + echo "PR $pr_id not updated: changed file is in $new.changed" + mv $new $new.changed + $PR_EDIT --unlock $pr_id +- exit 0 ++ continue 2 + ;; + esac + $VISUAL $new +@@ -242,24 +202,37 @@ + fi + done + +-exec 3<&0 +- + # + # Find out what fields have changed; if the changed field requires a + # change reason, then ask about it. + # +-$LIBEXECDIR/gnats/diff-prs $new.old $new | while read field ++ ++changed_fields=`$LIBEXECDIR/gnats/diff-prs $new.old $new` ++for field in $changed_fields + do + flags=`$QUERY_PR --field-flags $field` || echo "edit-pr: Invalid field name $field" 1>&2; + + if echo "$flags" | grep -i "requirechangereason" > /dev/null 2>&1 + then +- echo ">${field}-Changed-Why:" >> $change_msg; +- echo "Why did the $field field change? (Ctrl-D to end)"; +- cat 0<&3 >> $change_msg; ++ $debug_print "Doing $field change." ++ echo ">$field-Changed-Why: " >> $change_msg ++ if [ -e $chng_msg ]; then ++ echo "Re-use last message (y/n)?" ++ read yesno ++ if [ "$yesno" != "y" ]; then ++ sed "s/%%ITEM%%/$field/" $chng_tpl > $chng_msg ++ fi ++ else ++ sed "s/%%ITEM%%/$field/" $chng_tpl > $chng_msg ++ fi ++ $VISUAL $chng_msg ++ sed '/^GNATS:/d' $chng_msg >> $change_msg + fi + done + ++echo "" >> $change_msg ++echo "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=$pr_id" >> $change_msg ++ + if [ -f $change_msg ] + then + cat $change_msg >> $new +@@ -269,12 +242,12 @@ + # Submit the changed PR. + # + while true; do +- if $PR_EDIT --email-addr "$full_me" $pr_id < $new ++ if $PR_EDIT --email-addr "$me" $pr_id < $new + then + echo "Edit successful" + # we need to unlock the PR + $PR_EDIT --unlock $pr_id +- exit 0 ++ break + else + echo "Problems with edit submission." + fi +@@ -284,9 +257,11 @@ + case "$input" in + a*) + echo "Cancelling edit. Changed PR is in $new." +- # we need to ulock the PR no matter what ++ # we need to unlock the PR no matter what + $PR_EDIT --unlock $pr_id +- exit 1 ;; ++ keepnew=y ++ rc=1 ++ break 2 ;; + r*) + break ;; + *) +@@ -296,6 +271,13 @@ + done + done + +-rm -f $new ++rm -f $chng_msg $new.old $change_msg ++if [ "$keepnew" != "y" ]; then ++ rm -f $new ++ rmdir $epdir ++fi ++keepnew= ++ ++done # for pr_id in $prs + +-exit 0 ++exit $rc Modified: head/databases/gnats4/files/patch-gnats__Makefile.in ============================================================================== --- head/databases/gnats4/files/patch-gnats__Makefile.in Sat Aug 23 22:08:30 2014 (r365834) +++ head/databases/gnats4/files/patch-gnats__Makefile.in Sat Aug 23 22:10:32 2014 (r365835) @@ -1,6 +1,6 @@ ---- gnats/Makefile.in.orig Thu Feb 24 22:35:55 2005 -+++ gnats/Makefile.in Mon Aug 1 15:08:51 2005 -@@ -93,7 +93,7 @@ +--- gnats/Makefile.in.orig 2005-02-24 20:35:55 UTC ++++ gnats/Makefile.in +@@ -93,7 +93,7 @@ M4 = @M4@ INSTALL = $(srcdir)/../install-sh -c INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -9,7 +9,7 @@ INSTALL_DATA = @INSTALL_DATA@ SUB_INSTALL = `echo $(INSTALL) | sed 's,^\([^/]\),../\1,'` -@@ -109,6 +109,7 @@ +@@ -109,6 +109,7 @@ bindir = @bindir@ libdir = @libdir@ libexecdir = @libexecdir@ statedir = @datadir@ @@ -17,7 +17,7 @@ sysconfdir = @sysconfdir@ program_transform_name = -@@ -162,7 +163,7 @@ +@@ -162,7 +163,7 @@ all-gnats: all-tools gnatsd queue-pr mai check-db delete-pr dbconfig gnats-databases gnats-pwconv $(EXTRA_STUFF) all-tools: libgnats.a query-pr pr-age pr-edit edit-pr file-pr getclose \ @@ -26,22 +26,18 @@ libgnats.a: $(LIBOBJS) -rm -f tmplibgnats.a libgnats.a -@@ -368,15 +369,17 @@ +@@ -368,15 +369,11 @@ install-tools: install-tools-arch-indep install-tools-arch-dep: install-tools-bin install-tools-arch-indep: all-tools - $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)/gnats + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sharedstatedir)/gnats $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sysconfdir)/gnats/defaults - @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ - echo "chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \ - chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats ; \ -+ echo "chown $(GNATS_USER) $(DESTDIR)$(sharedstatedir)/gnats" ; \ -+ chown $(GNATS_USER) $(DESTDIR)$(sharedstatedir)/gnats ; \ - else \ +- else \ - echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \ -+ echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(sharedstatedir)/gnats" ; \ -+ fi + @if [ x"$(lispdir)" != x ]; then \ + $(INSTALL_DATA) $(srcdir)/gnats.el $(DESTDIR)$(lispdir)/gnats.el ; \ fi @@ -49,7 +45,7 @@ for i in categories submitters responsible gnatsd.user_access addresses states classes dbconfig ; do \ if [ -f "$$i" ] ; then \ $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir)/gnats/defaults/$$i ; \ -@@ -391,7 +394,7 @@ +@@ -391,17 +388,9 @@ install-tools-bin: all-tools $(INSTALL_SCRIPT) edit-pr $(DESTDIR)$(bindir)/edit-pr $(INSTALL_SCRIPT) diff-prs $(DESTDIR)$(libexecdir)/gnats/diff-prs $(INSTALL_SCRIPT) mail-agent $(DESTDIR)$(libexecdir)/gnats/mail-agent @@ -57,44 +53,72 @@ + $(INSTALL_SCRIPT) file-pr $(DESTDIR)$(libexecdir)/gnats/file-pr $(INSTALL_PROGRAM) pr-age $(DESTDIR)$(libexecdir)/gnats/pr-age $(INSTALL_PROGRAM) pr-edit $(DESTDIR)$(libexecdir)/gnats/pr-edit - @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ -@@ -409,29 +412,29 @@ +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +- echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/pr-edit" ; \ +- echo "chmod 4555 $(DESTDIR)$(libexecdir)/gnats/pr-edit" ; \ +- chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/pr-edit ; \ +- chmod 4555 $(DESTDIR)$(libexecdir)/gnats/pr-edit ; \ +- else \ +- echo "*** Warning: Must make pr-edit suid $(DESTDIR)$(GNATS_USER)" ; \ +- fi + + EXTRA_INSTALL = + +@@ -409,33 +398,9 @@ install-gnats: install-gnats-bin install install-gnats-arch-dep: install-gnats-bin $(EXTRA_INSTALL) install-gnats-arch-indep: all-gnats install-tools-arch-indep - @if [ -f $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ]; then \ - echo "Not putting gnats-databases file in $(DESTDIR)$(GLOBAL_DB_LIST_FILE), it's already there." ; \ -+ @if [ -f $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default ]; then \ -+ echo "Not putting gnats-databases file in $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default, it's already there." ; \ - true ; \ - else \ - if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ - $(INSTALL_DATA) -o $(GNATS_USER) gnats-databases \ +- true ; \ +- else \ +- if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +- $(INSTALL_DATA) -o $(GNATS_USER) gnats-databases \ - $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \ -+ $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default ; \ - else \ +- else \ - $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \ - echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GLOBAL_DB_LIST_FILE)" ; \ -+ $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default ; \ -+ echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default" ; \ - fi \ - fi +- fi \ +- fi - @if [ -f $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ]; then \ - echo "Not putting gnats.host_access file in $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE), it's already there." ; \ -+ @if [ -f $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default ]; then \ -+ echo "Not putting gnats.host_access file in $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default, it's already there." ; \ - true ; \ - else \ - if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ - $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.host_access \ +- true ; \ +- else \ +- if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.host_access \ - $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \ -+ $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default ; \ - else \ - $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \ +- else \ +- $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \ - $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \ - echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE)" ; \ -+ $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default ; \ -+ echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default" ; \ - fi \ - fi - @echo "*** If you're a first-time user, you'll want to create a new database"; +- fi \ +- fi +- @echo "*** If you're a first-time user, you'll want to create a new database"; +- @echo "*** with $(libexecdir)/gnats/mkdb." ++ $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default ++ $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \ ++ $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default + + install-gnats-bin: all-gnats install-tools-bin + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libexecdir)/gnats +@@ -450,20 +415,6 @@ install-gnats-bin: all-gnats install-too + $(INSTALL_PROGRAM) gen-index $(DESTDIR)$(libexecdir)/gnats/gen-index + $(INSTALL_SCRIPT) mail-query $(DESTDIR)$(libexecdir)/gnats/mail-query + $(INSTALL_PROGRAM) gnats-pwconv $(DESTDIR)$(libexecdir)/gnats/gnats-pwconv +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +- echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/queue-pr $(DESTDIR)$(libexecdir)/gnats/file-pr $(DESTDIR)$(libexecdir)/gnats/gen-index" ; \ +- echo "chmod 4555 $(DESTDIR)$(libexecdir)/gnats/queue-pr $(DESTDIR)$(libexecdir)/gnats/file-pr $(DESTDIR)$(libexecdir)/gnats/gen-index" ; \ +- echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gnatsd" ; \ +- echo "chmod 555 $(DESTDIR)$(libexecdir)/gnats/gnatsd" ; \ +- chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/queue-pr ; \ +- chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gen-index ; \ +- chmod 4555 $(DESTDIR)$(libexecdir)/gnats/queue-pr ; \ +- chmod 4555 $(DESTDIR)$(libexecdir)/gnats/gen-index ; \ +- chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gnatsd ; \ +- chmod 555 $(DESTDIR)$(libexecdir)/gnats/gnatsd ; \ +- else \ +- echo "*** Warning: must make queue-pr and gen-index suid $(GNATS_USER)." ; \ +- fi + + # regex.c is pretty badly broken, and I don't feel like fixing it. + regex.o: $(srcdir)/regex.c Modified: head/databases/gnats4/pkg-plist ============================================================================== --- head/databases/gnats4/pkg-plist Sat Aug 23 22:08:30 2014 (r365834) +++ head/databases/gnats4/pkg-plist Sat Aug 23 22:10:32 2014 (r365835) @@ -1,14 +1,14 @@ +@owner gnats +@mode 4555 bin/edit-pr +@owner +@mode bin/getclose bin/install-sid bin/query-pr bin/send-pr -%%SERVER%%@unexec if cmp -s %D/etc/gnats/databases %D/etc/gnats/databases.default; then rm -f %D/etc/gnats/databases; fi -%%SERVER%%etc/gnats/databases.default -%%SERVER%%@exec [ -f %B/databases ] || cp %B/%f %B/databases -%%SERVER%%@unexec if cmp -s %D/etc/gnats/gnatsd.host_access %D/etc/gnats/gnatsd.host_access.default; then rm -f %D/etc/gnats/gnatsd.host_access; fi -%%SERVER%%etc/gnats/gnatsd.host_access.default -%%SERVER%%@exec [ -f %B/gnatsd.host_access ] || cp %B/%f %B/gnatsd.host_access +%%SERVER%%@sample etc/gnats/databases.sample +%%SERVER%%@sample etc/gnats/gnatsd.host_access.sample etc/gnats/defaults/addresses etc/gnats/defaults/categories etc/gnats/defaults/classes @@ -18,16 +18,18 @@ etc/gnats/defaults/responsible etc/gnats/defaults/states etc/gnats/defaults/submitters etc/gnats/send-pr.conf -@dirrm etc/gnats/defaults -@dirrmtry etc/gnats %%SERVER%%libexec/gnats/at-pr %%SERVER%%libexec/gnats/check-db %%SERVER%%libexec/gnats/delete-pr libexec/gnats/diff-prs libexec/gnats/file-pr +@owner gnats +@mode 4555 %%SERVER%%libexec/gnats/gen-index -%%SERVER%%libexec/gnats/gnats-pwconv %%SERVER%%libexec/gnats/gnatsd +@owner +@mode +%%SERVER%%libexec/gnats/gnats-pwconv libexec/gnats/mail-agent %%SERVER%%libexec/gnats/mail-query %%SERVER%%libexec/gnats/mkcat @@ -36,11 +38,27 @@ libexec/gnats/pr-age libexec/gnats/pr-edit %%SERVER%%libexec/gnats/queue-pr %%SERVER%%libexec/gnats/rmcat +man/man1/edit-pr.1.gz +man/man1/query-pr.1.gz +man/man1/send-pr.1.gz +man/man5/databases.5.gz +man/man5/dbconfig.5.gz +man/man7/gnats.7.gz +man/man8/delete-pr.8.gz +man/man8/getclose.8.gz +man/man8/file-pr.8.gz +man/man8/gen-index.8.gz +man/man8/gnatsd.8.gz +man/man8/install-sid.8.gz +man/man8/mkcat.8.gz +man/man8/mkdb.8.gz +man/man8/pr-edit.8.gz +man/man8/queue-pr.8.gz +man/man8/rmcat.8.gz +%%EMACS_SITE_LISPDIR%%/gnats.el +@exec mkdir -p %%GNATSDBDIR%%/gnats && chown -R gnats %%GNATSDBDIR%% +@dirrm etc/gnats/defaults +@dirrmtry etc/gnats @dirrm libexec/gnats -@exec mkdir -p %%GNATSDBDIR%% -@exec chown gnats %%GNATSDBDIR%% +@dirrmtry %%GNATSDBDIR%%/gnats @dirrmtry %%GNATSDBDIR%% -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/UPGRADING -%%PORTDOCS%%@dirrm %%DOCSDIR%% -%%EMACS_SITE_LISPDIR%%/gnats.el
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408232210.s7NMAXnX077563>