Friday, September 09, 2022

Re: webfsd Port

Hi Omar,

Thanks for the help and feed back.

I have made an rd.d script for myself but am unsure if it is too customized. I'll try to generalize it and and it to the port.

Bill

> On Sep 9, 2022, at 4:48 AM, Omar Polo <op@omarpolo.com> wrote:
>
> Hello,
>
> On 2022/09/08 22:31:02 -0400, William Rusnack <williamrusnack@gmail.com <mailto:williamrusnack@gmail.com>> wrote:
>> Hi,
>>
>> This is my first port and I have tried my best to follow the guide and man pages, but still have a few questions.
>>
>> Security Recommendations Bullet 2 "Any software to be…": Is there a recommended tool to scan for these buffer overflow problems?
>>
>> I was trying to use MANPREFIX but only get an empty string with `make show=MANPREFIX`. Is this normal?
>>
>> When running `/usr/ports/infrastructure/bin/portcheck` I get the following warning:
>> ```
>> manual pages should go under ${PREFIX}/man/ rather than under ${PREFIX}/share/man/
>> ```
>> I tried using `MAKE_FLAGS` and `Fake_FLAGS` to change set the variable `mandir` in package's GNUmakefile to fix this but portcheck still gives this warning.
>>
>> Also, a helpful improvement to the guide in Instruction 9 Section 3 would be to mention `post-install` and `${INSTALL_MAN}`.
>>
>> Thanks for the help.
>
> It's not a bad first submission :)
>
> Here's some possible improvements to it:
>
> - once you're happy with the makefile, all the comments can be
> dropped (unless they're needed to specify something very peculiar
> about the port.)
>
> - We don't use `PORTNAME', just define DISTFILE or, like in this
> case, the GH_* variables
>
> - the HOMEPAGE is set by default by the GH_* variables
>
> - for simple C ports like this the default COMPILER is likely to be
> fine, so no need to change it
>
> - we also don't usually install the license files unless there's a
> particular reason. webfsd is released under the GPLv2, so I don't
> think it's needed.
>
> Now, to be fair, this is not exactly a "standard port". It's not
> difficult to tame, but it has a (new to me) mechanics of a GNU
> makefile that does a configure step too. That's probably why you
> didn't manage to fix the `mandir' variable.
>
> I've defined MAKE_FLAGS with mandir and `verbose=yes' (it's useful to
> see what commands the build tool is issuing) and added a do-configure
> target. I'm also defining the `mimefile' to point to
> /usr/share/misc/mime.types, it seems to be happy with it.
>
> During the compilation the C compiler complained about a mismatch in
> some format strings. OpenBSD uses 64bit long time_t (aka `long long'
> here) while webfds assumes that time_t is `long'. I've included a
> patch to fix this.
>
> I've also tweaked a bit the DESCR: I prefer if it doesn't refer
> directly to the reader ("You can use it..."), but that's just me, it's
> just a proposal.
>
> I'm attaching a tarball with the updated port. How are you using this
> software? It could be useful to include an rc.d(8) script or it's
> expected to be run only as a command-line program?
>
>
> Thanks,
>
> Omar Polo
>
> <webfsd.tar.gz>

No comments:

Post a Comment