Bug 258979 - security/pkcs11-tools: update to 2.5.0
Summary: security/pkcs11-tools: update to 2.5.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: Nuno Teixeira
URL: https://github.com/Mastercard/pkcs11-...
Depends on:
Reported: 2021-10-07 07:53 UTC by Eric Devolder
Modified: 2021-10-09 03:25 UTC (History)
2 users (show)

See Also:

Patch to upgrade from 2.4.2 to 2.5.0 (1.91 KB, patch)
2021-10-07 07:53 UTC, Eric Devolder
no flags Details | Diff
Patch to upgrade from 2.4.2 to 2.5.0 rev 2 (2.30 KB, patch)
2021-10-07 18:04 UTC, Eric Devolder
no flags Details | Diff
small fixes sample diff (2.75 KB, patch)
2021-10-08 07:24 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Devolder 2021-10-07 07:53:06 UTC
Created attachment 228493 [details]
Patch to upgrade from 2.4.2 to 2.5.0
Comment 1 Nuno Teixeira freebsd_committer 2021-10-07 08:19:31 UTC

'portlint -C' gives this warning:
WARN: Makefile: [15]: possible direct use of command "automake" found. Use ${AUTOMAKE} instead and set USES=autoreconf and GNU_CONFIGURE=yes
WARN: Makefile: [12]: possible direct use of command "autoconf" found. Use ${AUTOCONF} instead and set USES=autoreconf and GNU_CONFIGURE=yes
WARN: Makefile: [14]: possible direct use of command "autoconf" found. Use ${AUTOCONF} instead and set USES=autoreconf and GNU_CONFIGURE=yes
0 fatal errors and 3 warnings found.

Porter's Handbook says:
17.4. autoreconf

Possible arguments: (none), build

Runs autoreconf. It encapsulates the aclocal, autoconf, autoheader, automake, autopoint, and libtoolize commands. Each command applies to ${AUTORECONF_WRKSRC}/configure.ac or its old name, ${AUTORECONF_WRKSRC}/configure.in. If configure.ac defines subdirectories with their own configure.ac using AC_CONFIG_SUBDIRS, autoreconf will recursively update those as well. The :build argument only adds build time dependencies on those tools but does not run autoreconf. A port can set AUTORECONF_WRKSRC if WRKSRC does not contain the path to configure.ac.

I think that this way we can remove build dependencies:
BUILD_DEPENDS=  autoconf-archive>0:devel/autoconf-archive \
                autoconf>0:devel/autoconf \
                automake>0:devel/automake \

since they are implicit in USES:autoreconf?
Comment 2 Eric Devolder 2021-10-07 11:59:07 UTC
(In reply to Nuno Teixeira from comment #1)
Hi Nuno,

let me run the linter against the package and check this out. I guess I'll provide another patch.
Comment 3 Eric Devolder 2021-10-07 18:04:24 UTC
Created attachment 228502 [details]
Patch to upgrade from 2.4.2 to 2.5.0 rev 2

2nd version, trying to partially address the linter warning issues (see comments for an explanation).
Comment 4 Eric Devolder 2021-10-07 18:07:21 UTC
IMO the linter warnings are not relevant in this case: "possible direct use of command" is wrongly raised because it detects the command names in  BUILD_DEPENDS variable, which happen to be the package names as well.

Unfortunately, adding autoreconf to USES doesn't solve the problem entirely, as autoreconf does not include "autoconf-archive"; that last dependency must remain in order for the project to build (during bootstrap phase of the build, macros from autoconf-archives are deployed into the project).

I have nevertheless added autoreconf to uses, this simplifies a bit the BUILD_DEPENDS variable. But one (false positive) warning remains with the linter.
Comment 5 Nuno Teixeira freebsd_committer 2021-10-08 06:49:37 UTC
Good so far.

Just some minor changes that I think they make sense:

1. use "autoreconf:build" instead of "autoreconf" to tell ports that it is only needed in build phase

2. alphabetical order in USES:
+USES=          autoreconf:build bison compiler:c11 libtool:build pkgconfig ssl
-USES=          bison compiler:c11 libtool:build pkgconfig ssl autoreconf:build

3. move INSTALL_TARGET to Make block:
# Configure block

# Make block


Comment 6 Nuno Teixeira freebsd_committer 2021-10-08 07:11:04 UTC
4. remove ".include <bsd.port.options.mk>" from port Makefile. IMO its rare to use in recent ports.
Comment 7 Nuno Teixeira freebsd_committer 2021-10-08 07:24:35 UTC
Created attachment 228511 [details]
small fixes sample diff

I've tested this sample diff and builds are ok, please take a look at test results:
Comment 8 Eric Devolder 2021-10-08 15:00:02 UTC
Hi Nuno,

Results looks good. (I also tried on my own poudriere ;-) 

It's all clear from my perspective.
Comment 9 Nuno Teixeira freebsd_committer 2021-10-08 15:40:02 UTC

I will need maintainer approval on a patch so I can commit or if you like to change anything more, please submit a new one.

Comment 10 Eric Devolder 2021-10-08 21:21:50 UTC
I suppose I am the maintainer? If so, I approve the patch.
Comment 11 commit-hook freebsd_committer 2021-10-09 03:20:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c4e05fc73c157dd7ab54126189b92f509da87b34

commit c4e05fc73c157dd7ab54126189b92f509da87b34
Author:     Eric Devolder <eric.devolder@gmail.com>
AuthorDate: 2021-10-09 03:07:00 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2021-10-09 03:18:36 +0000

    security/pkcs11-tools: update to 2.5.0

     - Use USES=autoreconf:build instead of BUILD_DEPENDS autoconf and
     - Remove ".include <bsd.port.options.mk>" from Makefile
     - Reorder some variables and put it in correct blocks


    PR:             258979

 security/pkcs11-tools/Makefile | 16 ++++++----------
 security/pkcs11-tools/distinfo | 14 +++++++-------
 2 files changed, 13 insertions(+), 17 deletions(-)
Comment 12 Nuno Teixeira freebsd_committer 2021-10-09 03:25:09 UTC
Committed thanks!