There are two ports here, one is popt (another getopt library) and logrotate (another newsyslog.) Thanks. How-To-Repeat: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # . # ./files # ./files/md5 # ./pkg # ./pkg/COMMENT # ./pkg/DESCR # ./pkg/PLIST # ./patches # ./Makefile # echo c - . mkdir -p . > /dev/null 2>&1 echo c - ./files mkdir -p ./files > /dev/null 2>&1 echo x - ./files/md5 sed 's/^X//' >./files/md5 << 'END-of-./files/md5' XMD5 (popt-1.4-1.src.rpm) = a4a87c369b0d7aa7cfa5ee575efeccfd END-of-./files/md5 echo c - ./pkg mkdir -p ./pkg > /dev/null 2>&1 echo x - ./pkg/COMMENT sed 's/^X//' >./pkg/COMMENT << 'END-of-./pkg/COMMENT' XA getopt(3) like library with a number of enhancements, from Redhat. END-of-./pkg/COMMENT echo x - ./pkg/DESCR sed 's/^X//' >./pkg/DESCR << 'END-of-./pkg/DESCR' XQuoted from README file: X XThis is the popt command line option parsing library. While it is similiar Xto getopt(3), it contains a number of enhancements, including: X X 1) popt is fully reentrant X 2) popt can parse arbitrary argv[] style arrays while X getopt(2) makes this quite difficult X 3) popt allows users to alias command line arguments X 4) popt provides convience functions for parsting strings X into argv[] style arrays END-of-./pkg/DESCR echo x - ./pkg/PLIST sed 's/^X//' >./pkg/PLIST << 'END-of-./pkg/PLIST' Xshare/locale/sk/LC_MESSAGES/popt.mo Xshare/locale/ro/LC_MESSAGES/popt.mo Xlib/libpopt.la Xlib/libpopt.a Xinclude/popt.h END-of-./pkg/PLIST echo c - ./patches mkdir -p ./patches > /dev/null 2>&1 echo x - ./Makefile sed 's/^X//' >./Makefile << 'END-of-./Makefile' X# New ports collection makefile for: popt X# Version required: 1.4 X# Date Created: 29 Dec 1999 X# Whom: Yuan-Chen Cheng <ycheng@sinica.edu.tw> X# X# $FreeBSD$ X# X XDISTNAME= popt-1.4 XCATEGORIES= devel XMASTER_SITES= ftp://ftp.redhat.com/pub/redhat/current/SRPMS/SRPMS/ XEXTRACT_SUFX= -1.src.rpm X XMAINTAINER= ycheng@sinica.edu.tw X XLIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext X XUSE_GMAKE= yes XGNU_CONFIGURE= yes X XMAN3= popt.3 XMANCOMPRESSED= no X Xdo-extract: X @${RM} -rf ${WRKDIR} X @${MKDIR} ${WRKDIR} X @rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR}; cpio -i) X @tar -xzf ${WRKDIR}/${DISTNAME}.tar.gz -C ${WRKDIR} X X.include <bsd.port.mk> END-of-./Makefile exit ====================================================== # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # . # ./files # ./files/md5 # ./files/syslog # ./files/logrotate.conf # ./pkg # ./pkg/COMMENT # ./pkg/DESCR # ./pkg/PLIST # ./patches # ./patches/patch-aa # ./patches/patch-ab # ./patches/patch-ac # ./patches/patch-ad # ./Makefile # echo c - . mkdir -p . > /dev/null 2>&1 echo c - ./files mkdir -p ./files > /dev/null 2>&1 echo x - ./files/md5 sed 's/^X//' >./files/md5 << 'END-of-./files/md5' XMD5 (logrotate-3.3-1.src.rpm) = 3a399653214c9dd6b23363d4ff68b633 END-of-./files/md5 echo x - ./files/syslog sed 's/^X//' >./files/syslog << 'END-of-./files/syslog' X/var/cron/log { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/amd.log { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/kerberos.log { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/lpd-errs { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/maillog { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/sendmail.st { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/messages { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/slip.log { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} X X/var/log/ppp.log { X postrotate X /usr/bin/killall -HUP syslogd X endscript X} END-of-./files/syslog echo x - ./files/logrotate.conf sed 's/^X//' >./files/logrotate.conf << 'END-of-./files/logrotate.conf' X# see "man logrotate" for details X# rotate log files weekly Xweekly X X# keep 4 weeks worth of backlogs Xrotate 4 X X# send errors to root Xerrors root X X# create new (empty) log files after rotating old ones Xcreate X X# uncomment this if you want your log files compressed Xcompress X X# RPM packages drop log rotation information into this directory Xinclude /usr/local/etc/logrotate.d X X/var/log/lastlog { X monthly X rotate 1 X} X X# system-specific logs may be configured here END-of-./files/logrotate.conf echo c - ./pkg mkdir -p ./pkg > /dev/null 2>&1 echo x - ./pkg/COMMENT sed 's/^X//' >./pkg/COMMENT << 'END-of-./pkg/COMMENT' XRotates, compresses, removes and mails system log files. END-of-./pkg/COMMENT echo x - ./pkg/DESCR sed 's/^X//' >./pkg/DESCR << 'END-of-./pkg/DESCR' XRotates, compresses, removes and mails system log files. X XI try to make it work just like /usr/sbin/newsyslog. XWith logrotate, you can mail syslog and execute command Xbefore or after logrotate. END-of-./pkg/DESCR echo x - ./pkg/PLIST sed 's/^X//' >./pkg/PLIST << 'END-of-./pkg/PLIST' Xsbin/logrotate Xetc/logrotate.conf Xetc/logrotate.d/syslog END-of-./pkg/PLIST echo c - ./patches mkdir -p ./patches > /dev/null 2>&1 echo x - ./patches/patch-aa sed 's/^X//' >./patches/patch-aa << 'END-of-./patches/patch-aa' X--- config.c.orig Tue Dec 28 15:24:25 1999 X+++ config.c Tue Dec 28 15:26:54 1999 X@@ -1,9 +1,7 @@ X-#include <alloca.h> X #include <ctype.h> X #include <dirent.h> X #include <errno.h> X #include <fcntl.h> X-#include <getopt.h> X #include <glob.h> X #include <grp.h> X #include <pwd.h> END-of-./patches/patch-aa echo x - ./patches/patch-ab sed 's/^X//' >./patches/patch-ab << 'END-of-./patches/patch-ab' X--- Makefile.orig Wed Dec 30 03:29:13 1998 X+++ Makefile Tue Dec 28 15:35:52 1999 X@@ -2,11 +2,13 @@ X CVSTAG = r$(subst .,-,$(VERSION)) X CFLAGS = -Wall -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) X PROG = logrotate X-BINDIR = /usr/sbin X-MANDIR = /usr/man X+BINDIR = sbin X+MANDIR = man X MAN = logrotate.8 X LOADLIBES = -lpopt X X+LOADLIBES += -L/usr/local/lib X+CFLAGS += -I/usr/local/include X #-------------------------------------------------------------------------- X X OBJS = logrotate.o log.o config.o basenames.o X@@ -40,8 +42,8 @@ X [ -d $(PREFIX)/$(MANDIR) ] || mkdir -p $(PREFIX)/$(MANDIR) X [ -d $(PREFIX)/$(MANDIR)/man8 ] || mkdir -p $(PREFIX)/$(MANDIR)/man8 X X- install -s -m 755 $(PROG) $(PREFIX)/$(BINDIR) X- install -m 644 $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN) X+ install -c -s -m 755 $(PROG) $(PREFIX)/$(BINDIR) X+ install -c -m 644 $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN) X X co: X co RCS/*,v END-of-./patches/patch-ab echo x - ./patches/patch-ac sed 's/^X//' >./patches/patch-ac << 'END-of-./patches/patch-ac' X--- logrotate.c.orig Thu Jun 17 04:37:19 1999 X+++ logrotate.c Wed Dec 29 11:31:57 1999 X@@ -1,9 +1,7 @@ X-#include <alloca.h> X #include <ctype.h> X #include <dirent.h> X #include <errno.h> X #include <fcntl.h> X-#include <getopt.h> X #include <popt.h> X #include <stdio.h> X #include <stdlib.h> X@@ -457,6 +455,9 @@ X hasErrors = 1; X } X } X+ X+ message(MESS_DEBUG, "sleep 10 to wait daemon close log\n"); X+ sleep(10); X X if (!hasErrors && !log->rotateCount) { X message(MESS_DEBUG, "removing rotated log (rotateCount == 0)"); END-of-./patches/patch-ac echo x - ./patches/patch-ad sed 's/^X//' >./patches/patch-ad << 'END-of-./patches/patch-ad' X--- logrotate.h.orig Tue Dec 28 15:55:44 1999 X+++ logrotate.h Tue Dec 28 15:55:56 1999 X@@ -12,7 +12,7 @@ X #define LOG_FLAG_MISSINGOK (1 << 5) X #define LOG_FLAG_MAILFIRST (1 << 6) X X-#define DEFAULT_MAIL_COMMAND "/bin/mail -s" X+#define DEFAULT_MAIL_COMMAND "/usr/bin/mail -s" X #define COMPRESS_COMMAND "gzip -9" X #define COMPRESS_EXT ".gz" X #define UNCOMPRESS_PIPE "gunzip" END-of-./patches/patch-ad echo x - ./Makefile sed 's/^X//' >./Makefile << 'END-of-./Makefile' X# New ports collection makefile for: logrotate X# Version required: 3.3 X# Date Created: 29 Dec 1999 X# Whom: Yuan-Chen Cheng <ycheng@sinica.edu.tw> X# X# $FreeBSD$ X# X XDISTNAME= logrotate-3.3 XCATEGORIES= sysutils XMASTER_SITES= ftp://ftp.redhat.com/pub/redhat/current/SRPMS/SRPMS/ XEXTRACT_SUFX= -1.src.rpm X XMAINTAINER= ycheng@sinica.edu.tw X XBUILD_DEPENDS= ${LOCALBASE}/lib/libpopt.a:${PORTSDIR}/devel/popt X XUSE_GMAKE= yes XMAN8= logrotate.8 XMANCOMPRESSED= no X Xdo-extract: X @${RM} -rf ${WRKDIR} X @${MKDIR} ${WRKDIR} X @rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR}; cpio -i) X @tar -xzf ${WRKDIR}/${DISTNAME}.tar.gz -C ${WRKDIR} X Xpost-install: X ${MKDIR} ${PREFIX}/etc/logrotate.d X ${CP} ${FILESDIR}/logrotate.conf ${PREFIX}/etc/ X ${CP} ${FILESDIR}/syslog ${PREFIX}/etc/logrotate.d/ X X.include <bsd.port.mk> END-of-./Makefile exit
Responsible Changed From-To: gnats-admin->freebsd-ports Misfiled PR.
State Changed From-To: open->closed Committed, thanks!