Created attachment 233694 [details] patch to remove asciidoc dependency and make MANPAGES user selectable Latest update to nut-2.8.0 pulls in unnecessary dependency to asciidoc. Remove asciidoc dependency as it is not needed - see below. While here make MANPAGES user selectable and adopt pkg-plist accordingly. Description: Pre-built manpages are already bundled with nut-2.8.0. They are never regenerated, no matter if asciidoc is available. configure output from a system without asciidoc and MANPAGES selected: checking if asciidoc version can build manpages (minimum required 8.6.3)... no checking if we have all the tools mandatory for man page regeneration... no checking whether to build and install documentation... man=auto configure: Got explicit list of document formats to build or not: man=auto checking desire and ability to build man documentation... auto checking if we can build man... no configure: WARNING: Unable to build man documentation, but can install pre-built distributed copies configure: Skipping build of man documentation (check for 'skip' results above) checking whether to build specific documentation format(s)... no .... build and install documentation: man=auto build specific documentation format(s): no Result: Bundled manpages will be installed. Add MANPAGES to OPTIONS_DEFAULT to make the port behave as before MANPAGES.
Good find, can you please use the recommened way to define this as recommended by porters handbook? https://docs.freebsd.org/en/books/porters-handbook/book/#options-configure_on "5.13.3.3.3. OPT_CONFIGURE_ON and OPT_CONFIGURE_OFF" Have you tested this patch using Poudriere?
I tried MANPAGES_CONFIGURE_ON and MANPAGES_CONFIGURE_OFF first, but found it not working. make -V CONFIGURE_ARGS didn't contain the arguments defined. Maybe related to the direct ".include <bsd.port.options.mk>" ? No Poudriere, sorry. I've tested only on two systems by hand. One system without asciidoc installed and the other system with asciidoc installed. Both where tested with MANPAGES selected and unselected. make check-plist was fine for all tests.
No worries. I'll build a patch from scratch.
Created attachment 233699 [details] complete refactoring of sysutils/nut to handle OPTIONS the standard way Second attempt - complete OPTION refactoring Worked fine during my limited tests but definitely needs a look by someone else and a poudriere run.
This patch changes a lot of things and needs to be committed in three different commits. I will cobble up three separate commits from this, and perform the same work on nut-devel.
Created attachment 233711 [details] Seven sysutils/nut* commits The attached file, seven sysutils/nut* commits, addresses all six issues discussed in this PR, plus another discovered in the sysutils/nut port when the Makefile from sysutils/nut-devel was ported to sysutils/nut on April 27 for the 2.8.0 upgrade. The seven addressed issues are: * bb8de06bcae0 6edc3a37211a 2022-05-03 - (HEAD -> nut) sysutils/nut*: Add MANPAGES option | * b65146340fa7 c5b0a297ed72 2022-05-03 - sysutils/nut: Remove redundant BUILD_DEPENDS | * 7bbd99eb4d62 8048be1bdfd0 2022-05-03 - sysutils/nut*: Convert to options helpers | * b875ff1b30f7 987cf9a1e5ca 2022-05-03 - sysutils/nut: Remove redundant install-strip INSTALL TARGET | * dce06b1ffd3b a7ed329d3cc4 2022-05-03 - sysutils/nut*: Use canned options descriptions | * 1546d925c63a 863d26d852f9 2022-05-03 - sysutils/nut*: Add license | * d8fce30879a9 c6d0b9368e84 2022-05-03 - sysutils/nut: Remove redundant EXTRACT_ONLY definition | The patches were applied to sysutils/nut and sysutils/nut-devel.
Created attachment 233712 [details] Pet portlint Please also apply this pet portlint patch. It and the next patch complete the series.
Created attachment 233713 [details] Register conflicts Not specifically documented in this PR but the two nut ports should register conflicts against each other. This is the last patch in the series.
Created attachment 233714 [details] IPMI patch Thanks for your work on this. There are still some points: BUILD_DEPENDS= asciidoc:textproc/asciidoc is still in there but should be removed completely NEON_CONFIGURE_OFF= --disable-neon should be removed, as configure knows nothing about this argument PDU_CONFIGURE_ON= --with-powerman PDUCONFIGURE_OFF= --without-powerman Typo: either PDUCONFIGURE_OFF => PDU_CONFIGURE_OFF or convert to _WITH PDU_CONFIGURE_WITH= powerman USB_CONFIGURE_ON= --with-usb=auto should be converted to USB_CONFIGURE_WITH= usb=auto This sets --without-usb automatically when USB is not selected and prevents automatic build of USB support if required dependecies are installed. USB_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp USB_CONFIGURE_WITH= snmp should be SNMP_LIB_DEPENDS and SNMP_CONFIGURE_WITH Manpages for CGI, NEON, IPMIPSU, PDU, SERIAL, SNMP and USB miss prepending %%MANPAGES%% in pkg-plist. Please take a look at the attached patch for IPMI handling. There is no need for OPTIONS_SINGLE=IPMI and no need for separate IPMIPSU and FREEIPMI options. Either you enable IPMI support and you get the IPMIPSU driver and IPMI support in eg. nut-scanner or you disable it and get it not. There is no way to get IPMIPSU driver without IPMI support in eg. nut-scanner or the other way round. So we can simply modify it to be a normal IPMI OPTION.
Re: asciidoc: If you look at my commit logs you will see why. asciidoc is needed for nut-devel and thus it remains there. But it is not needed in nut. Read the docs in the doc/ directory. They say asciidoc is needed. Good catches on the others.
Sorry, my fault. I missed that asciidoc is removed from nut and only remains in nut-devel. That's completely fine.
Created attachment 233724 [details] Fixup both nut purts This should fix both ports. Give it a try.
Looks good so far, except the latest IPMI changes are missing. ;-) One thing a thought about: Would it be wise to add SSL_OFF_CONFIGURE_ON= --without-ssl SSL_OFF_CONFIGURE_OFF= --with-ssl ? It may be a bit redundat but just to make sure that SSL support is really turned on or off without relying on configure doing the right thing.
We don't need that.
Reviewing the patch it appears that some of my other unrelated work was committed in 916e90103e3729a623bda3be324a37da3c6f8d68. I'll rebase again and remove those two patches from that commit.
Created attachment 233725 [details] To be committed next week This will be committed sometime next week.
(In reply to Cy Schubert from comment #16) Thanks a lot. Would you please add the IPMI changes from comment #9 too? Can you make the asciidoc dependency in nut-devel to be a MANPAGES only dependency: MANPAGES_BUILD_DEPENDS= asciidoc:textproc/asciidoc
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d6f4ee06c5f668af7615300159d803462da965cd commit d6f4ee06c5f668af7615300159d803462da965cd Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-04 04:18:28 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:28 +0000 sysutils/nut*: Add MANPAGES option Provide a MANPAGES option to allow users wishing a leaner install to deselect them. PR: 263751 Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> sysutils/nut-devel/Makefile | 7 +- sysutils/nut-devel/pkg-plist | 296 +++++++++++++++++++++---------------------- sysutils/nut/Makefile | 7 +- sysutils/nut/pkg-plist | 296 +++++++++++++++++++++---------------------- 4 files changed, 306 insertions(+), 300 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=429c33beb4e96656d0bac5cc9dc1006670d1b62a commit 429c33beb4e96656d0bac5cc9dc1006670d1b62a Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-03 15:53:38 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:26 +0000 sysutils/nut*: Add license Add license definitions. PR: 263751 Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> sysutils/nut-devel/Makefile | 6 +++++- sysutils/nut/Makefile | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=18e2107b05e7f116596f177da4550a91ba6b9f02 commit 18e2107b05e7f116596f177da4550a91ba6b9f02 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-04 04:43:05 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:28 +0000 sysutils/nut*: Pet portlint Adjust Makefile as suggested by portlint. PR: 263751 sysutils/nut-devel/Makefile | 2 +- sysutils/nut/Makefile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f63fdcf8eaea50c190123b8ea00e3d7b4eaf32ef commit f63fdcf8eaea50c190123b8ea00e3d7b4eaf32ef Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-04 03:22:28 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:27 +0000 sysutils/nut*: Convert to options helpers Modernize the sysutils/nut* ports replacing old-school options with options helpers, cleaning up the Makefiles a lot. PR: 263751 Reported by: dizzy sysutils/nut-devel/Makefile | 137 +++++++---------------- sysutils/nut-devel/pkg-plist | 251 +++++++++++++++++++++--------------------- sysutils/nut/Makefile | 135 +++++++---------------- sysutils/nut/pkg-plist | 252 +++++++++++++++++++++---------------------- 4 files changed, 325 insertions(+), 450 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=43094d715023b1ef9a233fa8ff35e73a01c29df9 commit 43094d715023b1ef9a233fa8ff35e73a01c29df9 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-03 15:28:37 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:26 +0000 sysutils/nut: Remove redundant EXTRACT_ONLY definition EXTRACT_ONLY is redundant and does nothing in this port. PR: 263751 Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> sysutils/nut/Makefile | 1 - 1 file changed, 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f75bec470e4ef6b2fd72a0c40d8d28cb0e513a66 commit f75bec470e4ef6b2fd72a0c40d8d28cb0e513a66 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-04 03:58:24 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:27 +0000 sysutils/nut: Remove redundant BUILD_DEPENDS Remove unused asciidoc BUILD_DEPENDS from sysutils/nut as its man pages are already preformatted. Also, add a comment to the sysutils/nut-devel port Makefile informing developers to remove the BUILD_DEPENDS when copying/merging the -devel port to the main port when a new release of nut is committed. PR: 263751 Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> sysutils/nut-devel/Makefile | 3 +++ sysutils/nut/Makefile | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3c17b06cc193f3f7b2175601ce0b4950ac07bf17 commit 3c17b06cc193f3f7b2175601ce0b4950ac07bf17 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-03 15:57:02 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:26 +0000 sysutils/nut*: Use canned options descriptions Remove the descriptions already documented in Mk/bsd.options.desc.mk. PR: 263751 Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> sysutils/nut-devel/Makefile | 3 --- sysutils/nut/Makefile | 3 --- 2 files changed, 6 deletions(-)