Bug 171951 - update port: security/fwknop FireWall KNock OPerator
update port: security/fwknop FireWall KNock OPerator
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD ports mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 15:00 UTC by sean.greven
Modified: 2012-11-27 21:41 UTC (History)
0 users

See Also:


Attachments
file.shar (2.86 KB, text/plain)
2012-09-25 15:00 UTC, sean.greven
no flags Details
fwknop.shar.txt (2.89 KB, text/plain)
2012-10-24 07:41 UTC, sean.greven
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description sean.greven 2012-09-25 15:00:31 UTC
Updated the port from 1.8.3 to 2.0.3, changes include a migration from perl to C, support for ipfw and pf.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2012-09-25 15:01:27 UTC
Class Changed
From-To: change-request->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Raphael Kubo da Costa freebsd_committer 2012-10-21 12:24:13 UTC
A few comments about the patch:

 o You have added fwknopd.in, but don't seem to use or install it. Plus,
   shouldn't you preprocess it instead of hardcoding the installation
   paths?

 o IIRC ports normally do not install info/dir, as it can cause
   conflicts.

 o Instead of specifying info/libfko.info in the plist, you could use
   the INFO variable in the Makefile.
Comment 3 sean.greven 2012-10-24 07:35:03 UTC
>Submitter-Id:	current-users
>Originator:	Sean Greven
>Organization:	Private
>Confidential:	no
>Synopsis:	ports/171951: update port: security/fwknop FireWall KNock OPerator
>Severity:	non-critical
>Priority:	low
>Category:	ports
>Class:		maintainer-update
>Release:	9.0-RELEASE
>Environment:	FreeBSD FreeBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Update to port fwknop port
Repair RC_SUBR file to use SUB_LIST expansions instead of hard-coding paths
Modify the plist file, to remove reference to info/dir
Added INFO= line to the Makefile, and removed explicit installation of libfko
>How-To-Repeat:

>Fix:

# 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:
#
#	fwknop
#	fwknop/Makefile
#	fwknop/pkg-descr
#	fwknop/files
#	fwknop/files/fwknopd.in
#	fwknop/distinfo
#	fwknop/pkg-plist
#
echo c - fwknop
mkdir -p fwknop > /dev/null 2>&1
echo x - fwknop/Makefile
sed 's/^X//' >fwknop/Makefile << '32b12b67eb0e26ad796b15a92793de9a'
X# New ports collection makefile for:	fwknop
X#
X# Date created:				23 Nov 2007
X# Whom:					Sean Greven<sean.greven@gmail.com>
X#
X# $FreeBSD: ports/security/fwknop/Makefile,v 1.6 2012/07/25 11:24:09 cs Exp $
X#
X
XPORTNAME=	fwknop
XPORTVERSION=	2.0.3
XPORTREVISION=	2
XCATEGORIES=	security
XMASTER_SITES=	http://www.cipherdyne.org/fwknop/download/
X
XMAINTAINER=	sean.greven@gmail.com
XCOMMENT=	SPA implementation for Linux and FreeBSD
X
XOPTIONS_DEFINE=  GPGME
XOPTIONS_DEFAULT= GPGME
XGPGME_DESC=	Build support for gpgme
XMAN8=		fwknop.8 fwknopd.8
XINFO=		libfko
XMANCOMPRESSED=	no
XGNU_CONFIGURE=  yes
XUSE_RC_SUBR=	fwknopd
X
X.include <bsd.port.options.mk>
X
X.if ${PORT_OPTIONS:MGPGME}
XBUILD_DEPENDS+=	gpgme:${PORTSDIR}/security/gpgme
X.endif
X
X.include <bsd.port.mk>
32b12b67eb0e26ad796b15a92793de9a
echo x - fwknop/pkg-descr
sed 's/^X//' >fwknop/pkg-descr << '13964009feac0ad08251c1452d402a44'
Xfwknop,"FireWall KNock OPerator", implements Single Packet Authorization (SPA). 
XWWW: http://www.cipherdyne.org/fwknop/
13964009feac0ad08251c1452d402a44
echo c - fwknop/files
mkdir -p fwknop/files > /dev/null 2>&1
echo x - fwknop/files/fwknopd.in
sed 's/^X//' >fwknop/files/fwknopd.in << 'bd83b5a2110c5ae1f9e7fa38c0d855fe'
X#!/bin/sh
X#
X# $FreeBSD: ports/security/fwknop
X#
X# PROVIDE: fwknopd
X# REQUIRE: LOGIN
X
X#
X# Add the following lines to /etc/rc.conf to enable fwknopd:
X#
X#fwknopd_enable="YES"
X#
X# See fwknopd(8) for flags
X#
X
X. /etc/rc.subr
X
Xname=fwknopd
Xrcvar=fwknopd_enable
X
Xcommand=%%PREFIX%%/sbin/fwknopd
Xrequired_files=%%PREFIX%%/etc/fwknop/access.conf
X
Xstart_precmd=start_precmd
Xstop_postcmd=stop_postcmd
X
Xextra_commands="reload"
X
Xstart_precmd()
X{
X}
X
Xstop_postcmd()
X{
X}
X
X# read settings, set default values
Xload_rc_config $name
X: ${fwknopd_enable="NO"}
X
Xrun_rc_command "$1"
bd83b5a2110c5ae1f9e7fa38c0d855fe
echo x - fwknop/distinfo
sed 's/^X//' >fwknop/distinfo << 'bf6907faa0a1dae87540bb613cfc0d66'
XSHA256 (fwknop-2.0.3.tar.gz) = f7f306a66c641020e7c7a820eaa3743e2700ddee6e26cca37440db95df56b986
XSIZE (fwknop-2.0.3.tar.gz) = 904769
bf6907faa0a1dae87540bb613cfc0d66
echo x - fwknop/pkg-plist
sed 's/^X//' >fwknop/pkg-plist << 'b899a2992e3cfe7ddf20f6368e8ddfc6'
Xbin/fwknop
X%%ETCDIR%%/access.conf
X%%ETCDIR%%/fwknopd.conf
Xinclude/fko.h
Xlib/libfko.a
Xlib/libfko.la
Xlib/libfko.so
Xlib/libfko.so.0
Xsbin/fwknopd
X@dirrm %%ETCDIR%%
b899a2992e3cfe7ddf20f6368e8ddfc6
exit
Comment 4 sean.greven 2012-10-24 07:41:28 UTC
I have re-submitted the .shar file as a pr via the web interface.  It unfortunately doesn't cater for cc lines.

I am attaching the new .shar file for reference

Regards Sean

----- Original Message -----
From: "Raphael Kubo da Costa" <rakuco@FreeBSD.org>
To: "Sean Greven" <sean.greven@gmail.com>
Sent: Wednesday, October 24, 2012 12:20:35 AM
Subject: Re: ports/171951: update port: security/fwknop FireWall KNock OPerator

Sean Greven <sean.greven@gmail.com> writes:

> Hi there
>
> Thank you very much for the reply.
>
> I do need to apologise up front, I am not 100% up to scratch yet on
> the port mechanism, I have used it for years, but some of the
> mechanics allude me. So any criticism is welcome. I hope you don't
> mind me asking a few questions.

Sure, sorry for the delay on my side, and thanks for the effort :-)

>> A few comments about the patch:
>>
>>  o You have added fwknopd.in, but don't seem to use or install it. Plus,
>>    shouldn't you preprocess it instead of hardcoding the installation
>>    paths?
>
> I understood that the fwknopd.in file would be copied to the
> auto-startup rc.d directory as part of bsd.port.mk? I certainly
> appears to do that. I will certainly modify the .in file to preprocess
> the fwknop.in file, But I would appreciate it if you could perhaps
> just give me an understanding, if my assumption is incorrect, or it
> should be installed explicitly.

Sorry, I did not notice you set USE_RC_SUBR there, so yes, it is
installed. However, according to [1] you should indeed not hardcode
paths and use SUB_LIST expansions instead.

[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html

>  o IIRC ports normally do not install info/dir, as it can cause
>    conflicts.
>
> I am sorry, was unaware, I used ports-mgmt/genplist to generate the
> plist and it added the info/dir as well as the libfko.info lines into
> the plist. I have modified the shar file, to rectify the issues you
> mentioned. Should I submit a PR again with the updated shar file?

Yes, please. Don't forget to CC both bug-followup@FreeBSD.org and me in
your PR reply, otherwise either I won't notice the update or it won't be
registered in the PR page.
Comment 5 Raphael Kubo da Costa freebsd_committer 2012-11-27 21:32:01 UTC
portlint complained about some spaces being used instead of tabs in the
Makefile, as well as the lack of USE_LDCONFIG=yes now that the port
installs a .so file. I've fixed those and will commit everything. Thanks
and sorry for the delay!
Comment 6 Raphael Kubo da Costa freebsd_committer 2012-11-27 21:41:47 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!