Bug 241992 - net/nncp: Update to 5.0.0
Summary: net/nncp: Update to 5.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitri Goutnik
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2019-11-15 21:07 UTC by Sergey Matveev
Modified: 2019-11-17 11:55 UTC (History)
2 users (show)

See Also:


Attachments
Update patch from 4.0 to 5.0.0 (4.16 KB, patch)
2019-11-15 21:07 UTC, Sergey Matveev
stargrave: maintainer-approval+
Details | Diff
Update patch from 4.0 to 5.0.0 (4.20 KB, patch)
2019-11-15 21:41 UTC, Sergey Matveev
stargrave: maintainer-approval+
Details | Diff
nncp-5.0.0.patch (4.78 KB, patch)
2019-11-16 13:38 UTC, Dmitri Goutnik
stargrave: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Matveev 2019-11-15 21:07:12 UTC
Created attachment 209170 [details]
Update patch from 4.0 to 5.0.0

Update NNCP to 5.0.0.
Comment 1 Automation User 2019-11-15 21:26:12 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/96316817
Comment 2 Sergey Matveev 2019-11-15 21:41:23 UTC
Created attachment 209171 [details]
Update patch from 4.0 to 5.0.0
Comment 3 Dmitri Goutnik freebsd_committer 2019-11-16 12:09:14 UTC
(In reply to Sergey Matveev from comment #0)
Hi,

What is the rationale behind changing USES=go:no_targets to BUILD_DEPENDS=go:lang/go?
Comment 4 Sergey Matveev 2019-11-16 12:26:21 UTC
(In reply to Dmitri Goutnik from comment #3)
Greetings!

USES=go does not work for me:

===>  Building for nncp-5.0.0
can't load package: package nncp: no Go files in /usr/home/stargrave/work/nncp/ports/nncp/work/src/nncp

and work/src/nncp contains unpacked nncp tarball where there are no Go files on top of that directory, because its source code is in src/.

Moreover, as I understand, USES=go won't run ordinary make target that overrides GOPATH to use dependant source code provided inside tarball itself. Makefile invocation is also required to set default compiled-in values like Default{Cfg,Sendmail,Spool,Log}Path.

As I understand, USES=go is only applicable to Go code that can be installed using go get/install procedures, without any makefiles.
Comment 5 Dmitri Goutnik freebsd_committer 2019-11-16 13:38:58 UTC
Created attachment 209185 [details]
nncp-5.0.0.patch

(In reply to Sergey Matveev from comment #4)
> can't load package: package nncp: no Go files in /usr/home/stargrave/work/nncp/ports/nncp/work/src/nncp

That path doesn't look right, perhaps PORTSDIR was set to a wrong value?

The attached patch builds fine for me in poudriere, I also rearranged variables a bit according to the recommended order.

USES=go doesn't run any make targets and no_targets additionally instructs go.mk to not override default do-build/do-install so these tasks can be delegated to make. We assume that if an upstream provides a Makefile, they know better how to build/install their software (which is not always true for Go ports). go.mk role in this case is to add BUILD_DEPENDS and configure build environment (GO_BUILDFLAGS etc) which can be passed down to make as needed.

The problem with using BUILD_DEPENDS directly is that we have more that one Go port (there's also lang/go-devel) and hardcoded BUILD_DEPENDS=go:lang/go prevents easy go port selection.
Comment 6 Sergey Matveev 2019-11-17 08:58:39 UTC
(In reply to Dmitri Goutnik from comment #5)
I used native FreeBSD 12.0-RELEASE ports tree and seems that was the problem. I have checked out the latest ports and everything builds fine in it. Sorry for my silly mistake.
Comment 7 commit-hook freebsd_committer 2019-11-17 11:52:35 UTC
A commit references this bug:

Author: dmgk
Date: Sun Nov 17 11:51:58 UTC 2019
New revision: 517819
URL: https://svnweb.freebsd.org/changeset/ports/517819

Log:
  net/nncp: Update to 5.0.0

  Changes:	http://www.nncpgo.org/Release-5_002e0_002e0.html

  PR:		241992
  Submitted by:	Sergey Matveev <stargrave@stargrave.org> (maintainer)
  Approved by:	tz (mentor, implicit)

Changes:
  head/net/nncp/Makefile
  head/net/nncp/distinfo
  head/net/nncp/files/nncp-caller.in
  head/net/nncp/files/nncp-daemon.in
  head/net/nncp/files/nncp-toss.in
  head/net/nncp/files/pkg-deinstall.in
  head/net/nncp/files/pkg-message.in
Comment 8 Dmitri Goutnik freebsd_committer 2019-11-17 11:55:12 UTC
Committed, thanks!