[Bug 269524] security/opencryptoki: 'make stage' as regular user fails to install p11sak_defined_attrs.conf.sample

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Feb 2023 05:35:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269524

            Bug ID: 269524
           Summary: security/opencryptoki: 'make stage' as regular user
                    fails to install p11sak_defined_attrs.conf.sample
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: hrs@FreeBSD.org
          Reporter: jcfyecrayz@liamekaens.com
          Assignee: hrs@FreeBSD.org
             Flags: maintainer-feedback?(hrs@FreeBSD.org)

Doing 'make -C security/opencryptoki stage' as a regular user (who is not in
the _pkcs11 group), results in the following error:

 .
 .
test -f
/usr/ports/security/opencryptoki/work/stage/usr/local/etc/opencryptoki/p11sak_defined_attrs.conf.sample
|| /usr/bin/install -c -g _pkcs11 -m 0640
./usr/sbin/p11sak/p11sak_defined_attrs.conf
/usr/ports/security/opencryptoki/work/stage/usr/local/etc/opencryptoki/p11sak_defined_attrs.conf.sample
|| true
install:
/usr/ports/security/opencryptoki/work/stage/usr/local/etc/opencryptoki/p11sak_defined_attrs.conf.sample:
chown/chgrp: Operation not permitted
 .
 .

The build does not fail at that point because the actual command in the
opencryptoki-3.19.0/Makefile has "|| true".  It's not clear why the '|| true'
is there, but it is caught later when 'make install' runs:

===>   Registering installation for opencryptoki-3.19.0 as automatic
pkg-static: Unable to access file
/usr/ports/security/opencryptoki/work/stage/usr/local/etc/opencryptoki/p11sak_defined_attrs.conf.sample:No
such file or directory
pkg-static: Fail to apply keyword 'sample'
*** Error code 1


This happened with the update to 3.19.0 (ports
e83df13905e945f1b776a84ff8abfeda29f04743) which added the -g _pkcs11 to the
install line in the Makefile.  That is not necessary since the sample entry for
p11sak_defined_attrs.conf specifies the group ownership in pkg-plist (and will
be set correctly when the package is installed).

-- 
You are receiving this mail because:
You are the assignee for the bug.