Looking for a portfile review before submitting (rbldnsd)

Blair Zajac blair at orcaware.com
Wed Jun 10 18:01:08 PDT 2009


Scott Haneda wrote:
> Hello, I have made a portfile, looking for a quick review, and any 
> suggestions for cleanup.
> 
> 1) How do I decide the category, can someone show me a list, and suggest 
> the correct one for this?  I see bind9 is in "net", perhaps this should 
> also be in "net"?
> 
> 2) Do I really need the extract.suffix?  I lean on simpler being better.
> 
> 3) How do the permissions I chose look in the destroot phase?
> 
> 4) I want ahead and installed some notes and other misc files that were 
> in the download, should I even bother?  Is this the correct location to 
> put them?
> 
> 5) should I call this rbldnsd-server?  It is a server, it does not 
> include a launchd item due to the nature of how it is started being so 
> custom.
> 
> 6) If I wanted to include a sample zone file for this, where would the 
> best place be to store that, and what is the correct suggested naming 
> convention for the name of that sample file?  rbldnsd.zone.sample?
> 
> * I would love to hear any other suggestions.  So far, this runs and 
> builds out clean and fine for me.
> 
> 
> # $Id$
> 
> PortSystem          1.0
> 
> name                rbldnsd
> version             0.996b
> categories          sysutils
> maintainers         hostwizard.com:scott
> master_sites        http://www.corpit.ru/mjt/rbldnsd/
> homepage            http://www.corpit.ru/mjt/rbldnsd.html
> distfiles           ${name}_${version}${extract.suffix}
> extract.suffix      .tar.tgz
> 
> description         rbldnsd is a small and fast DNS daemon which \
>                    is especially made to serve DNSBL zone
> 
> long_description    The daemon can serve both IP-based (ordb.org, 
> dsbl.org etc) \
>                    and name-based (rfc-ignorant.org) blocklists. Unlike 
> DJB's \
>                    rbldns, it has ability to specify individual values 
> for every \
>                    entry, can serve as many zones on a single IP address 
> as you \
>                    wish, and, finally, it is a real nameserver: it can 
> reply to \
>                    DNS metadata requests. The daemon keeps all zones in 
> memory \
>                    for faster operations, but its memory usage is very 
> efficient, \
>                    especially for repeated TXT values which are stored 
> only once.
> 
> checksums           md5     9a0f26f3b33764c325a96bd4c61b26fa \
>                    sha1    9cfe6cf01c54088cecc3a02902c721ee714f1c28 \
>                    rmd160  15be588fb4051f0526084425b586ea7986b6493a
> 
>                    configure.pre_args-delete --prefix=${prefix}
> 
> 
> pre-destroot {
>        addgroup _rbldnsd
>        set gid [existsgroup _rbldnsd]
>        adduser _rbldnsd gid=${gid} realname=rbldnsd home=${prefix}/sbin
> }

Do we need a new user for this daemon?  How about just using nobody?

> destroot {
>     ########## These perms are obviously wrong, fix them later
> 
>     # Install binary
>     xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/sbin
> 
>     # Install man page 'rbldnsd.8'
>     xinstall -m 0640 ${worksrcpath}/${name}.8 
> ${destroot}${prefix}/share/man/man8
> 
>     # Install misc files
>     xinstall -d ${prefix}/share/doc/${name}/

Need ${destroot}

>     xinstall -m 0640 -W ${worksrcpath} \
>             NEWS README.user TODO \
>             ${prefix}/share/doc/${name}/

Need ${destroot}

> 
> }
> 
> post-activate {
>     ui_msg "
>     
> ========================================================================
>     ${name} has been installed correctly
>     You can find ${name} at ${prefix}/sbin/${name}
> 
>     Please see the man page `man ${name}` for detailed setup instructions.
> 
>     You will need a launchd plist file to start the server.  Please create
>     one based on your specific needs.
> 
>     ${name} does not have a configuration file, all configuration files
>     are specified as arguments to the startup of ${name}
> 
>     You can find additional files of interest in:
>          ${prefix}/share/doc/${name}/NEWS
>          ${prefix}/share/doc/${name}/README.user
>          ${prefix}/share/doc/${name}/TODO
> 
>     See ${homepage} for more information.
>     
> ========================================================================"
> }

This is redundant information I think, all portfiles behave the same way, so I 
don't see why it should be printed.

Regards,
Blair


More information about the macports-dev mailing list