Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 22:00:26 -0800 (PST)
From:      Janos Mohacsi <mohacsi@niif.hu>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/48001: New port: ASpath-tree a IPv6 route stability and correctness monitoring tool
Message-ID:  <200302070600.h1760Qxb062333@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/48001; it has been noted by GNATS.

From: Janos Mohacsi <mohacsi@niif.hu>
To: Simon 'portlint' Schubert <corecode@corecode.ath.cx>
Cc: Janos Mohacsi <janos.mohacsi@bsd.hu>,
	<FreeBSD-gnats-submit@FreeBSD.org>, <edwin@FreeBSD.org>
Subject: Re: ports/48001: New port: ASpath-tree a IPv6 route stability and
 correctness monitoring tool
Date: Fri, 7 Feb 2003 06:51:22 +0100 (CET)

 On Fri, 7 Feb 2003, Simon 'portlint' Schubert wrote:
 
 > Lately Janos Mohacsi told:
 >
 > > sed 's/^X//' >aspathtree/pkg-plist << 'END-of-aspathtree/pkg-plist'
 > > Xaspathtree/etc/ASpath-tree.config.orig
 > > Xaspathtree/etc/ASpath-tree.config.bak
 
 I generated automatically the package files  after temporary installation.
 The .orig is created since it has patched. The .bak is created since it
 has SED-ed.
 
 >
 > woo? .orig && .bak?
 > [several follow]
 > > END-of-aspathtree/pkg-plist
 >
 > can't this be squeezed into a hier(7) conformant structure, using
 > ${PREFIX}/{bin,libexec(?),share}?
 
 It is a bit difficult, since the running program generates a large amount
 of data under its home directory in several places. The code is hardcoded
 to use its structure...
 
 
 >
 > > sed 's/^X//' >aspathtree/Makefile << 'END-of-aspathtree/Makefile'
 > > X# New ports collection makefile for:    aspathtree
 > > X# Date created:         06.05.2002
 > > X# Whom: Janos Mohacsi <janos.mohacsi@bsd.hu>
 > > X#
 > > X# $FreeBSD$
 > > X
 > > XPORTNAME=	aspathtree
 > > XPORTVERSION=	4.1
 > > XCATEGORIES=	ipv6 net
 >
 > first category must be a real one:
 > CATEGORIES=	net ipv6
 
 You are right. I will correct it.
 
 >
 > [...]
 > > XWRKSRC=			${WRKDIR}/ASpath-tree-v4.1/
 >
 > use ${PORTVERSION}?
 
 The previous version used ${WRKDIR}/aspathtree-v3_3/, if I remember well.
 I blindly replaced.
 How about:
 WRKSRC=			${WRKDIR}/ASpath-tree-v${PORTVERSION}/
 
 >
 > > XRESTRICTED=		"not redistributable, license agreement required"
 > > XNO_CDROM=	${RESTRICTED}
 > > XNO_PACKAGE=	${RESTRICTED}
 >
 > how about:
 >
 > RESTRICTED=		"not redistributable, license agreement required"
 >
 > .include <bsd.port.pre.mk>
 >
 > .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) IGNORE= "You need to
 > read the license and disclaimer on
 > http://carmen.ipv6.tilab.com/cgi-bin/download.pl?pkg=ASpath-tree and
 > download ${DISTFILES} into ${DISTDIR}" .endif
 
 Is it working under FREEBSD 4.x STABLE? I got strange messages if I use
 this method.
 
 >
 > > XNO_BUILD=	yes
 > > XUSE_PERL5=	yes
 > > XSCRIPTS_ENV+=	PERL5=${PERL5}
 > > XPKGMESSAGE=	${WRKDIR}/pkg-message
 > > X
 > > Xdo-fetch:
 > > X	@if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
 > > X	${ECHO} '======================================================='; \
 > > X	${ECHO} 'You need to read the license and disclaimer on '; \
 > > X	${ECHO} 'http://carmen.ipv6.tilab.com/cgi-bin/download.pl?pkg=ASpath-tree'; \
 > > X	${ECHO} 'and fetch on your own.'; \
 > > X	${ECHO} 'Once ${DISTFILES} has been downloaded, move it to '; \
 > > X	${ECHO} '${DISTDIR} and then restart this build '; \
 > > X	${ECHO} '======================================================='; \
 > > X	fi
 >
 > obsolete if you use above version. use ${TEST} instead of [ ?
 
 Portlint did not complain about using [.
 >
 > > Xdo-install:
 > > X	@if [ ! -d ${PREFIX}/aspathtree ]; then \
 > > X		${MKDIR} ${PREFIX}/aspathtree ; fi
 >
 > just ${MKDIR}?
 >
 > > X	${CP} -R ${WRKSRC}/* ${PREFIX}/aspathtree/
 > > X	${CHMOD} +x ${PREFIX}/aspathtree/update-rtree
 >
 > ${INSTALL_DATA},${INSTALL_SCRIPT}?
 
 The port has large amount of files. I have to write an installer script if
 I want to use ${INSTALL_DATA} and ${INSTALL_SCRIPT}. This way the .bak and
 .orig can be eliminated. However I saw several ports using simple ${CP}
 
 
 >
 > > Xpost-install:
 > > X	@${SED} -e "s:%%PREFIX%%:${PREFIX}:g" pkg-message >${PKGMESSAGE}
 > > X.if !defined(BATCH)
 > > X	@${ECHO}
 > > X	@${CAT} ${PKGMESSAGE}
 > > X	@${ECHO}
 > > X.endif
 >
 > this is not the preferred way of handling pkg-message. usual way would
 > be:
 >
 > post-install:
 > 	@${SED} -e 's#%%PREFIX%%#${PREFIX}#' ${PKGMESSAGE}
 >
 >
 > and not modify ${PKGMESSAGE} at all. if you insist in your way, use
 > ${.CURDIR}/pkg-message
 >
 > > sed 's/^X//' >aspathtree/files/patch-update-rtree << 'END-of-aspathtree/files/patch-update-rtree'
 > [...]
 > > X@@ -111,7 +112,7 @@
 > > X 	die "ERROR in configuration file: parameter HOMEDIR not correct!\n"    unless (-e "$HOMEDIR/update-rtree");
 > > X 	# enabling log to file if required
 > > X 	$LOGDIR = "$HOMEDIR/log";
 > > X-	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0777)};
 > > X+	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0775)};
 >
 > better log to /var/log/...?
 
 Maybe. But It is generating large amount of logs in several different
 files.
 
 >
 > > X 	if ($DEBUG) {
 > > X 		open(LOGFILE,"> $LOGDIR/runlog.txt");
 > > X 		print LOGFILE "ASpath-tree DEBUG log file\n\n";
 > > X@@ -229,28 +230,28 @@
 > > X
 > > X # Creating directories if required...
 >
 > does this mean that this program needs to run as root?
 
 No. I usually run under an unprivileged user. Manually chown-ing to that
 user the /usr/local/aspathtree. If you thing the makefile can generate a
 new user for that purpose.
 
 >
 > > sed 's/^X//' >aspathtree/pkg-message << 'END-of-aspathtree/pkg-message'
 > > XFor to configuration information please look at
 > > X%%PREFIX%%/aspathtree/readme.txt.
 > > X
 > > XCopy %%PREFIX%%/aspathtree/etc/ASpath-tree.config.dist to
 > > X%%PREFIX%%/etc/ASpath-tree.config
 > > Xand modify accordingly to your environment.
 >
 > how about installing right to ${PREFIX}/etc?
 
 Can be done. Probably better...
 
 >
 > > sed 's/^X//' >aspathtree/scripts/configure << 'END-of-aspathtree/scripts/configure'
 > > X#!/bin/sh
 > > X#
 > > X# $FreeBSD$
 > > X
 > > XFILES_CONF="update-rtree etc/ASpath-tree.config"
 > > X
 > > Xfor f in $FILES_CONF ; do
 > > X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
 > > X		s+%%PATHPERLBIN%%+${PERL5}+g >${WRKSRC}/${f}
 > > X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
 > > X		s+%%PREFIX%%+${PREFIX}+g >${WRKSRC}/${f}
 > > Xdone
 > > X
 > > X# rename to dist
 > > Xmv ${WRKSRC}/etc/ASpath-tree.config ${WRKSRC}/etc/ASpath-tree.config.dist
 > > END-of-aspathtree/scripts/configure
 >
 > how about in Makefile:
 >
 > USE_REINPLACE=	yes
 >
 > post-patch:
 > 	@${REINPLACE_CMD} -e 's#%%PATHPERLBIN%%#${PERL5}#; \
 > 		s#%%PREFIX%%#${PREFIX}#' ${WRKSRC}/update-rtree \
 > 			${WRKSRC}/etc/ASpath-tree-config
 >
 
 Better. Unfortunately the Porters' Handbook does not say anything about
 the USE_REINPLACE....
 
 Cheers,
 	Janos
 
 > cheers
 >   simon
 >
 > --
 > /"\   http://corecode.ath.cx/#donate
 > \ /
 >  \     ASCII Ribbon Campaign
 > / \  Against HTML Mail and News
 >
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




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