Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  2 Dec 2006 02:23:33 +0100 (CET)
From:      trasz <trasz@pin.if.uz.zgora.pl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/106170: [MAINTAINER] net/wired: fix handling of configuration files
Message-ID:  <20061202012333.C753839DBA@pin.if.uz.zgora.pl>
Resent-Message-ID: <200612020130.kB21UAcI052259@freefall.freebsd.org>

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

>Number:         106170
>Category:       ports
>Synopsis:       [MAINTAINER] net/wired: fix handling of configuration files
>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:   Sat Dec 02 01:30:09 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     trasz
>Release:        FreeBSD 6.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD pin.if.uz.zgora.pl 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #0: Wed Nov 15 19:16:30 CET 2006
>Description:
${LOCALBASE}/wired/{users,groups,news,banlist} are actually configuration
files, so treat them as such.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- wired-1.3.1_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/wired/Makefile /home/trasz/wired/Makefile
--- /usr/ports/net/wired/Makefile	Thu Nov 23 23:36:05 2006
+++ /home/trasz/wired/Makefile	Sat Dec  2 02:20:38 2006
@@ -7,11 +7,12 @@
 
 PORTNAME=	wired
 PORTVERSION=	1.3.1
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	http://www.zankasoftware.com/dist/
 
 MAINTAINER=	trasz@pin.if.uz.zgora.pl
-COMMENT=	Wired Server
+COMMENT=	Wired server
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
@@ -30,6 +31,18 @@
 	fi
 	@if [ ! -f ${PREFIX}/wired/etc/resolv.conf ]; then \
 		${CP} -p ${PREFIX}/wired/etc/resolv.conf.sample ${PREFIX}/wired/etc/resolv.conf ; \
+	fi
+	@if [ ! -f ${PREFIX}/wired/banlist ]; then \
+		${CP} -p ${PREFIX}/wired/banlist.sample ${PREFIX}/wired/banlist ; \
+	fi
+	@if [ ! -f ${PREFIX}/wired/groups ]; then \
+		${CP} -p ${PREFIX}/wired/groups.sample ${PREFIX}/wired/groups ; \
+	fi
+	@if [ ! -f ${PREFIX}/wired/news ]; then \
+		${CP} -p ${PREFIX}/wired/news.sample ${PREFIX}/wired/news ; \
+	fi
+	@if [ ! -f ${PREFIX}/wired/users ]; then \
+		${CP} -p ${PREFIX}/wired/users.sample ${PREFIX}/wired/users ; \
 	fi
 	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
diff -ruN --exclude=CVS /usr/ports/net/wired/files/patch-Makefile.in /home/trasz/wired/files/patch-Makefile.in
--- /usr/ports/net/wired/files/patch-Makefile.in	Thu Nov 23 23:36:05 2006
+++ /home/trasz/wired/files/patch-Makefile.in	Sat Dec  2 02:20:37 2006
@@ -1,5 +1,5 @@
 --- Makefile.in.orig	Sun Jun 18 15:08:08 2006
-+++ Makefile.in	Thu Nov 23 21:07:15 2006
++++ Makefile.in	Sat Dec  2 02:07:59 2006
 @@ -12,8 +12,8 @@
  
  WD_VERSION		= @WD_VERSION@
@@ -20,7 +20,27 @@
  	chmod +x $@
  
  $(rundir)/etc/wired.conf: $(top_srcdir)/wired/wired.conf.in
-@@ -145,15 +145,15 @@
+@@ -129,31 +129,31 @@
+ 	fi
+ 
+ 	if [ ! -f $(installdir)/banlist ]; then \
+-		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/banlist $(installdir)/; \
++		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/banlist $(installdir)/banlist.sample; \
+ 	fi
+ 
+ 	if [ ! -f $(installdir)/groups ]; then \
+-		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/groups $(installdir)/; \
++		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/groups $(installdir)/groups.sample; \
+ 	fi
+ 
+ 	if [ ! -f $(installdir)/news ]; then \
+-		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/news $(installdir)/; \
++		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/news $(installdir)/news.sample; \
+ 	fi
+ 
+ 	if [ ! -f $(installdir)/users ]; then \
+-		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/users $(installdir)/; \
++		$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/users $(installdir)/users.sample; \
  	fi
  
  	if [ ! -f $(installdir)/etc/wired.conf ]; then \
diff -ruN --exclude=CVS /usr/ports/net/wired/pkg-plist /home/trasz/wired/pkg-plist
--- /usr/ports/net/wired/pkg-plist	Thu Nov 23 23:36:05 2006
+++ /home/trasz/wired/pkg-plist	Sat Dec  2 02:20:38 2006
@@ -9,10 +9,18 @@
 @exec if [ ! -f %D/wired/etc/resolv.conf ] ; then cp -p %D/%F %B/resolv.conf; fi
 wired/files/Uploads/.wired/type
 wired/files/Drop Box/.wired/type
-wired/banlist
-wired/groups
-wired/news
-wired/users
+@unexec if cmp -s %D/wired/banlist.sample %D/wired/banlist; then rm -f %D/wired/banlist; fi
+wired/banlist.sample
+@exec if [ ! -f %D/wired/banlist ] ; then cp -p %D/%F %B/banlist; fi
+@unexec if cmp -s %D/wired/groups.sample %D/wired/groups; then rm -f %D/wired/groups; fi
+wired/groups.sample
+@exec if [ ! -f %D/wired/groups ] ; then cp -p %D/%F %B/groups; fi
+@unexec if cmp -s %D/wired/news.sample %D/wired/news; then rm -f %D/wired/news; fi
+wired/news.sample
+@exec if [ ! -f %D/wired/news ] ; then cp -p %D/%F %B/news; fi
+@unexec if cmp -s %D/wired/users.sample %D/wired/users; then rm -f %D/wired/users; fi
+wired/users.sample
+@exec if [ ! -f %D/wired/users ] ; then cp -p %D/%F %B/users; fi
 sbin/hl2wired
 sbin/wired
 bin/wiredctl
--- wired-1.3.1_1.patch ends here ---

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



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