Bug 247251 - New port: sysutils/pwol - a simple Wake-On-LAN tool
Summary: New port: sysutils/pwol - a simple Wake-On-LAN tool
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Niclas Zeising
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-14 10:58 UTC by Peter Eriksson
Modified: 2020-06-15 17:57 UTC (History)
1 user (show)

See Also:


Attachments
Initial diff for pwol 1.5 new port (415.51 KB, patch)
2020-06-14 10:58 UTC, Peter Eriksson
no flags Details | Diff
V2 of the diff for pwol (1.70 KB, patch)
2020-06-14 18:08 UTC, Peter Eriksson
no flags Details | Diff
Third time's the charm then? :-) (1.88 KB, patch)
2020-06-14 20:10 UTC, Peter Eriksson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2020-06-14 10:58:28 UTC
Created attachment 215540 [details]
Initial diff for pwol 1.5 new port

'pwol' is a small tool that can be used to send WoL packets to wake up hosts (or group of hosts) that also (optionally) can act as a Wake-On-Lan gateway for situations where you wish to forwards WOL packets but don't have a router that supports it. Also supports a fairly flexible configuration file.
Comment 1 Niclas Zeising freebsd_committer freebsd_triage 2020-06-14 16:16:18 UTC
Looks like you accidentally included the work dir in the diff.
Can you also update sysutils/Makefile and add your port?
Comment 2 Peter Eriksson 2020-06-14 18:08:21 UTC
Created attachment 215553 [details]
V2 of the diff for pwol

Drat. Ok, updated patch uploaded now. Sorry about that.

- Peter
Comment 3 Niclas Zeising freebsd_committer freebsd_triage 2020-06-14 19:15:34 UTC
Two more things, very minor.  Sorry for not noticing the first time around.

Poudriere warns that bin/pwol isn't stripped.  Usually you can just add INSTALL_TARGET=install-strip with autotools builds, but when I tested, it didn't work.  I suggest you add a post-install: target that strips the binary.  There are several examples in the ports tree.

Secondly etc/pwol.conf.sample might benefit from using @sample.  This needs a proper pkg-plist though, instead of PLIST_FILES.  Using @sample means that the file will be installed as .conf.sample, and also .conf if there is no such file previously.  It also means that on update or removal of the package, the file with the name .conf will only be altered if it is unchanged.
There is some more info on how this works here in the porter's handbook:
https://www.freebsd.org/doc/en/books/porters-handbook/book.html#plist-keywords-sample-example
Comment 4 Peter Eriksson 2020-06-14 20:10:42 UTC
Created attachment 215566 [details]
Third time's the charm then? :-)

Ok, fixed the stripping and the @sample stuff (I fixed the strip part in the original code instead since there was a couple of other (non-FreeBSD related) things I had to fix there at the same time anyway). 

Btw, I do test it with Poudriere locally. But I didn't see any error about the missed stripping of the installed binary? It talks a lot when doing builds though so I might be missing it somewhere in the output... Where should I be looking? :-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-06-15 17:55:26 UTC
A commit references this bug:

Author: zeising
Date: Mon Jun 15 17:54:35 UTC 2020
New revision: 538926
URL: https://svnweb.freebsd.org/changeset/ports/538926

Log:
  sysutils/pwol: Add new ports

  Add sysutils/pwol, a small tool that can be used to send WoL packages to
  wake up hosts or groups of hosts.  It can also act as a WoL gateway when you
  need to forward such packages but don't have a router that supports it.

  PR:		247251
  Submitted by:	Peter Eriksson

Changes:
  head/sysutils/Makefile
  head/sysutils/pwol/
  head/sysutils/pwol/Makefile
  head/sysutils/pwol/distinfo
  head/sysutils/pwol/pkg-descr
  head/sysutils/pwol/pkg-plist
Comment 6 Niclas Zeising freebsd_committer freebsd_triage 2020-06-15 17:57:02 UTC
(In reply to Peter Eriksson from comment #4)

When running poudriere testport, there is a make target, stage-qa, that's run that checks a couple of things.  It's run after the install target, but before the package target.

It starts with
====> Running Q/A tests (stage-qa)
but can be a little hard to find.  That's where I got the warning about the binary not being stripped.  It also warns about a bunch of other things, and tries to figure out if there's any libraries that you've linked to, but that the port doesn't depend on, for example.

Things look good now, port has been committed.  Thank you!