Running dns/ddclient on a 12-CURRENT router facility reveals some problems lately and investigating /usr/local/sbin/ddclient (PERL 5 script) reveals, that the SHEBANG header is comprised from: #!/usr/local/bin/perl -w #!/usr/local/local/bin/perl -w ###################################################################### # # DDCLIENT - a Perl client for updating DynDNS information # # Author: Paul Burry (paul+ddclient@burry.ca) [...] The second line seems clearly wrong.
Can you please address this with upstream. ddclient works as it is, and you haven't reported a bug that impacts anyone as best i can tell.
Why should I address something with upstream when it is clearly a fault of the port maintenance? The original perl main program's shebang is #!/usr/bin/perl -w #!/usr/local/bin/perl -w ###################################################################### [...] and after application of the patch (tagged post-patch) it is #!/usr/local/bin/perl -w #!/usr/local/local/bin/perl -w ###################################################################### [...] as reported. And now: who is to blame? Upstream? The problem is identified rather quickly: post-patch: @${GREP} -lR '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ 's|/usr|${PREFIX}|g' It is surely more of a cosmetic question, but I'm not sure about nasty side effects. It should be fixed - locally at FreeBSD's, not upstream. But how do you think about the attached patch? Also cosmetic (I'd prefer /usr/bin/env -S perl -w )? Regards, oh
Created attachment 197003 [details] Get rid of a wrong shebang statement in ddclient Delete a wrong shebang statement in ddclient.
My understanding is that it is not valid to have two shebang lines. My interpretation of your response is that you agree that this is a cosmetic change rather than a bug that impacts anyone. These two factors are behind my request that this be dealt with upstream. In terms of a patch, if one must be applied, it seems to me the optimum approach is to remove the second shebang from the source code, and use https://www.freebsd.org/doc/en/books/porters-handbook/uses-shebangfix.html
I agree, there should not be two #! lines, upstream needs to get rid of one and then we can let shebangfix do the rest
(In reply to Nathan from comment #5) To add on, I think i know why the 2nd line of #! in regards to Comment#0 is because of REINPLACE_CMD. I've seen sed do something similar when I was using sed to replace some text, and it made a bit redundant replacements
Actually looking at it, wouldn't need shebang fix. Get rid of: @${GREP} -lR '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ 's|/usr|${PREFIX}|g' do ${REINPLACE_CMD} -e '1d ; s,/usr/bin,${PREFIX}/bin,g' ${WRKSRC}/ddclient This will delete first #! leaving the correct path we need in FreeBSD, 2nd part fixes rest of /usr/bin in file
When I looked at ddclient after make patch, I didn't see any other use of /usr that we wanted changed to ${PREFIX} that wasn't handled in patch-ddclient already. This is all about a shebang.
Yup. then 2nd part of my REINPLACE_CMD wouldn't be needed if patch took care of rest
ping!
@Maintainer, Can you please produce a patch against the port if there is a change to be made or bug to be fixed
Alternatively, review and accept/not-accept attachment 197003 [details] with rationale in the latter case.
(In reply to Kubilay Kocak from comment #12) the patch is maintainer approved
QA looks fine.
A commit references this bug: Author: meta Date: Sun Oct 6 16:42:31 UTC 2019 New revision: 513895 URL: https://svnweb.freebsd.org/changeset/ports/513895 Log: dns/ddclient: Get rid of a wrong shebang statement in bin/ddclient. It has double shebang line and one is "#!/usr/local/local/bin/perl -w" This is definitely wrong. Also bumped PORTREVISION due to package content change. PR: 231277 Submitted by: koobs Reported by: O. Hartmann <ohartmann@walstatt.org> Approved by: maintainer MFH: 2019Q4 Changes: head/dns/ddclient/Makefile
A commit references this bug: Author: meta Date: Tue Oct 8 02:23:34 UTC 2019 New revision: 514023 URL: https://svnweb.freebsd.org/changeset/ports/514023 Log: MFH: r513895 dns/ddclient: Get rid of a wrong shebang statement in bin/ddclient. It has double shebang line and one is "#!/usr/local/local/bin/perl -w" This is definitely wrong. Also bumped PORTREVISION due to package content change. PR: 231277 Submitted by: koobs Reported by: O. Hartmann <ohartmann@walstatt.org> Approved by: maintainer Approved by: portmgr (miwi) Changes: _U branches/2019Q4/ branches/2019Q4/dns/ddclient/Makefile
Committed, thanks!