Bug 246163

Summary: devel/frink: fixes BROKEN - provides working MASTER_SITES
Product: Ports & Packages Reporter: Chris Hutchinson <portmaster>
Component: Individual Port(s)Assignee: Mikhail Teterin <mi>
Status: Closed FIXED    
Severity: Affects Some People CC: darius, mi, mi
Priority: --- Flags: koobs: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff to fix MASTER_SITES
none
Eliminate compiler warnings - and fix some errors
none
files/Makefile.bsd
none
build output after applying Mikhail's diff
none
svn diff for devel/frink based on current work, and input from others involved here
none
build run against most recent svn diff I submitted
none
patch: pets pkg-fallout, adds LICENSE
portmaster: maintainer-approval+
patch for devel/frink; pets pkg-fallout, adds LICENSE, no PORTREVISION bump portmaster: maintainer-approval+

Description Chris Hutchinson 2020-05-04 07:36:06 UTC
Created attachment 214090 [details]
svn diff to fix MASTER_SITES

This port is currently marked BROKEN for lack of a
working MASTER_SITES. This pr(1) fixes that.

I use this port. So felt compelled to fix it.

CHANGES

Makefile
MASTER_SITES

That's it. Thanks!
Comment 1 Antoine Brodin freebsd_committer 2020-05-05 09:25:44 UTC
This is an abandonware,  we do not need this in the ports tree.
Comment 2 Mikhail Teterin freebsd_committer 2020-05-05 13:19:47 UTC
Hi, Chris, and thank you for your help. I apologize for antoine@ abruptness -- and factually-incorrect statement, and will look into means of recovering the port soon.

The tarball are still downloadable -- via FTP -- from the original site using a browser (such as Firefox), but our fetch(1) fails. Something is wrong with the upstream's server, that needs investigating.

Would you like to be made the port's maintainer?
Comment 3 Chris Hutchinson 2020-05-05 17:11:00 UTC
(In reply to Mikhail Teterin from comment #2)
Yes, please.

@antoine
As to "abandonware". That statement can hardly be true
if someone, anyone wants to continue to use/maintain it.

Thanks! :-)

--Chris
Comment 4 darius 2020-05-25 04:12:49 UTC
We use this at work (since we use a lot of Tcl on FreeBSD) in a Jenkins job.

While you could reasonably argue the original author has abandoned it, the tool is still very useful and produces superior error messages to Tcl for things like missing braces and the like.

We could host the distfile at work as well if that would help.
Comment 5 Chris Hutchinson 2020-05-25 04:50:38 UTC
(In reply to darius from comment #4)
I've spoken with the author offline, and he indicates
that the fact that it was actually available in the
first place was a bit of a fluke. But was happy to take
advantage of it as long as it lasted. I won't have any
trouble hosting the source, as I've been doing for other
ports I maintain for some 10yrs. But if you'd like to
provide an additional link. That would be great.

Thanks for piping up.

--Chris
Comment 6 Mikhail Teterin freebsd_committer 2020-05-26 05:10:49 UTC
Created attachment 214862 [details]
Eliminate compiler warnings - and fix some errors

Gentlemen, please, try using frink with this patch dropped into files/ directory.

If we are to restore the port, may as well ensure clean compilation... Thank you!
Comment 7 darius 2020-05-26 06:37:59 UTC
(In reply to Mikhail Teterin from comment #6)
Thanks, that fixes most warnings but I still get..
make[2]: "/usr/share/mk/bsd.opts.mk" line 101: warning: "NO_MAN is defined, but deprecated. Please use MK_MAN=no instead."

and..
vars.c:202:32: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
    VarData *blp = (VarData *) malloc(sizeof(VarData));
                               ^
vars.c:202:32: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
1 warning generated.

Both are fixed by replacing files/Makefile.bsd with the attached version.
Comment 8 darius 2020-05-26 06:38:41 UTC
Created attachment 214863 [details]
files/Makefile.bsd
Comment 9 Mikhail Teterin freebsd_committer 2020-05-26 14:21:02 UTC
(In reply to darius from comment #7)
> make[2]: "/usr/share/mk/bsd.opts.mk" line 101: warning: "NO_MAN is defined, but deprecated. Please use MK_MAN=no instead."

That's a warning from make -- not compiler. I'm hesitant to use MK_MAN, because I remember it not working with earlier FreeBSD-releases...

> Both are fixed by replacing files/Makefile.bsd with the attached version.

Yes, thank you, I also define HAVE_STDLIB here -- and set WARNS=7 -- but my request was to test the resulting executable for regressions...

Does the program still work for you after patching? The author has no self-test suit, and I ran it on a couple of .tcl scripts here -- but I don't regularly use it, so I'm asking for testing.

Please, advise.
Comment 10 darius 2020-05-26 23:46:45 UTC
(In reply to Mikhail Teterin from comment #9)
Hi Mikhail,
Yes, it does work and produces the same output - sorry I didn't mention that earlier.
For MK_MAN - I don't think any supported version of FreeBSD would choke on it.
Comment 11 Chris Hutchinson 2020-05-27 03:03:53 UTC
Created attachment 214895 [details]
build output after applying  Mikhail's diff

Well for what it's worth I chopped your diff up
into proper port patch files, and found I needed to
replace NO_MAN with MK_MAN= no.
The file attached is a build run on the port. Warnings
still exist. But the port seems to work as intended. If
the warnings left are considered acceptable. I'll whip
up a proper svn diff and attach it.

--Chris

P.S. MK_MAN= no is supported on 11. So it's fine.
Comment 12 Chris Hutchinson 2020-05-27 20:16:32 UTC
Created attachment 214931 [details]
svn diff for devel/frink based on current work, and input from others involved here

OK here's an svn diff based on work I've done, as well as
current work, and comments in this pr.

I'm also including the output of a build run based on the same.

The errors emitted are simply caused by function names
having not been declared before use/call. But otherwise have
no ill affect on run/use.

--Chris
Comment 13 Chris Hutchinson 2020-05-27 20:18:20 UTC
Created attachment 214932 [details]
build run against most recent svn diff I submitted

Here's the output of the build run against the
svn diff (patch) I just submitted.

--Chris
Comment 14 Mikhail Teterin freebsd_committer 2020-06-01 01:08:09 UTC
> frink.c:800:5: warning: implicit declaration of function 'flushOutput' is invalid in C99 [-Wimplicit-function-declaration]

Strange, I do not see these here -- neither on 11.3, nor on 12.1...

> I chopped your diff up into proper port patch files

portlint, kind of, twists your arm into doing that, but I resist -- because I prefer to group patches together by the problems they mean to address.

Anyway, committing the thing now -- have to restore it from the Attic first :(
Comment 15 commit-hook freebsd_committer 2020-06-01 01:27:16 UTC
A commit references this bug:

Author: mi
Date: Mon Jun  1 01:26:27 UTC 2020
New revision: 537453
URL: https://svnweb.freebsd.org/changeset/ports/537453

Log:
  Restore devel/frink. Hand over the maintainership to the PR-submitter.
  Fix compiler warnings.

  PR:		246163
  Submitted by:	Chris Hutchinson

Changes:
  head/devel/Makefile
  head/devel/frink/
  head/devel/frink/Makefile
  head/devel/frink/files/Makefile.bsd
  head/devel/frink/files/patch-warnings
Comment 16 Chris Hutchinson 2020-06-01 04:00:50 UTC
@Mikhail

Thank you very much for all the time, and work
you put into this! :-)

--Chris
Comment 17 Chris Hutchinson 2020-06-05 07:06:11 UTC
(In reply to commit-hook from comment #15)
Why wasn't my patch (svn diff) applied?
The latest patch I submitted should have been
the one used to update this port. But clearly
wasn't.

From pkg-fallout@:
===>  Building for frink-2.2.2p4_1
make[1]: "/usr/share/mk/bsd.opts.mk" line 102: "NO_MAN is defined, but deprecated. Please use MK_MAN=no instead."
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Taking a look at the freebsd svn tree also
confirms that my proposed changes were not applied.

Please apply my latest provided svn diff so this
port works, and builds properly.

Thanks.

--Chris
Comment 18 Chris Hutchinson 2020-06-05 15:44:43 UTC
Created attachment 215258 [details]
patch: pets pkg-fallout, adds LICENSE

OK while the patch committed violates the ports
framework etiquette. It's tidier, and gets the
job done. BUT it omitted some things, and prevents
the port from building.
The patch I'm attaching to this pr fixes them;

CHANGES

NO_MAN=	regretfully ==> MK_MAN=	no
adds LICENSE

That's it.

Thanks! :-)

--Chris
Comment 19 Kubilay Kocak freebsd_committer freebsd_triage 2020-06-09 02:56:17 UTC
^Triage: Assign to committer resolving/resolved (comment 15)
Comment 20 Kubilay Kocak freebsd_committer freebsd_triage 2020-06-09 02:57:15 UTC
^Triage: Re-open. Chris

@Mikhail Chris (maintainer) has submitted a new patch to fix the build issue
Comment 21 Kubilay Kocak freebsd_committer freebsd_triage 2020-06-09 02:58:16 UTC
*** Bug 247101 has been marked as a duplicate of this bug. ***
Comment 22 Mikhail Teterin freebsd_committer 2020-06-09 03:18:45 UTC
(In reply to Chris Hutchinson from comment #18)

> OK while the patch committed violates the ports framework etiquette.

I don't believe, etiquette prescribes one approach over another...

> It's tidier, and gets the job done.

Thank you.

> BUT it omitted some things, and prevents the port from building.

This part puzzles me... Though a compiler warning may cause the build to fail (depending on one's -Werror setting), a make warning should not...

Indeed, these two exist already:

http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/frink-2.2.2p4_1.txz
http://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/frink-2.2.2p4_1.txz

I cannot find the package for 13 -- is that the release, which turns a make-warning into an error?..

As for the patch, do you think, a PORTREVISION bump is warranted over something so trivial as an explicit license-declaration?
Comment 23 Chris Hutchinson 2020-06-09 03:43:53 UTC
Hello All,
I indicated in comment #11 that MK_MAN=(yes|no) was
required, and is also supported in 11. But somehow
it got lost. :-)
Anyway; Because it wasn't included, the port will no
longer build:

[package - head-i386-default][devel/frink] Failed for frink-2.2.2p4_1 in build
Log URL:        http://beefy17.nyi.freebsd.org/data/head-i386-default/p538136_s361880/logs/frink-2.2.2p4_1.log
Build URL:      http://beefy17.nyi.freebsd.org/build.html?mastername=head-i386-default&build=p538136_s361880

[package - head-amd64-default][devel/frink] Failed for frink-2.2.2p4_1 in build
Log URL:        http://beefy18.nyi.freebsd.org/data/head-amd64-default/p538136_s361880/logs/frink-2.2.2p4_1.log
Build URL:      http://beefy18.nyi.freebsd.org/build.html?mastername=head-amd64-default&build=p538136_s361880

The final (most recent) patch I provided here, will:
1) fix MK_MAN entry
2) add the required LICENSE stanza(s)

and the ports framework will once again smile upon this port. :-)

That's it.

Thanks! :-)

--Chris
Comment 24 Mikhail Teterin freebsd_committer 2020-06-09 03:47:53 UTC
(In reply to Chris Hutchinson from comment #23)
> The final (most recent) patch I provided here, will:
> 1) fix MK_MAN entry
> 2) add the required LICENSE stanza(s)

It will also bump PORTREVISION, forcing people to rebuild, and mirrors -- to host another copy. Do you think the 2) warrants the revision bump?
Comment 25 Chris Hutchinson 2020-06-09 03:55:22 UTC
> It will also bump PORTREVISION,
Crap! I forgot to mention that. Sorry. :-(
> forcing people to rebuild, and mirrors -- to host another copy. Do you think > the 2) warrants the revision bump?
My rational on that, is that if it isn't working as
has been committed. The package builders should get
a hint that the (port)revision has been updated to
create a *working* version.
If I am wrong in this regard. Please feel free to
correct that. :-)

Thanks! :-)

--Chris
Comment 26 Chris Hutchinson 2020-06-09 04:07:10 UTC
Created attachment 215383 [details]
patch for devel/frink; pets pkg-fallout, adds LICENSE, no PORTREVISION bump

Same patch as last one. But without PORTREVISION bump
in case that is the preferred route. :-)

--Chris
Comment 27 commit-hook freebsd_committer 2020-06-10 03:30:17 UTC
A commit references this bug:

Author: mi
Date: Wed Jun 10 03:29:46 UTC 2020
New revision: 538365
URL: https://svnweb.freebsd.org/changeset/ports/538365

Log:
  Fix build on HEAD, where the NO_MAN-knob is no longer valid. Add
  license-declaration.

  PR:		246163
  Submitted by:	Chris Hutchinson

Changes:
  head/devel/frink/Makefile
  head/devel/frink/files/Makefile.bsd
Comment 28 Mikhail Teterin freebsd_committer 2020-06-10 03:31:18 UTC
Committed, thanks! I had to swap around the last two LICENSE-lines, because portlint was complaining about them being "out of order".
Comment 29 Chris Hutchinson 2020-06-10 04:47:51 UTC
(In reply to Mikhail Teterin from comment #28)
Thanks, Mikhail! :-)