Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 09:37:10PM +0100, Stuart Henderson wrote:
> On 2021/05/07 15:23, Chris Bennett wrote:
> > On Fri, May 07, 2021 at 08:47:07PM +0100, Stuart Henderson wrote:
> > > > I don't want to make a big mess on the mailing list, so I think I'll
> > > > just submit these as WIP to the list as what the ports are called
> > > > and put the files for each group of new ports elsewhere for anyone to
> > > > look over first who wants to. Way too messy otherwise. This time I'm
> > > > going to get properly organized first.
> > > 
> > > Please send the tars on list rather than putting them elsewhere and
> > > asking people to look at them.
> > 
> > I was thinking more along the lines of just posting the Makefiles, at
> > least at first, and if they are OK, then put up the tars.
> 
> tars, please, so we can actually build them.
> 
> if I have 5 minutes free to look at a ports submission, I'll be looking
> for something where everything that I need to review it is in the mail.
> 
> > Is that OK or a bad idea? I'm just thinking that I'll get some simple
> > stuff wrong in the Makefiles the first time and leave a mess on the
> > list. I've never worked on a project this big, so just let me know
> > anything that's the best way.
> > 
> > A couple of the PGObject Makefiles were a bit complicated with the
> > postgresql testing parts. Our postgres testing module even needed a diff
> > for one of my Makefiles to work.
> 
> that's totally fine, the tree works together as a whole, sometimes other
> parts (either of ports or sometimes even src) need a bit of work in
> order to get a port working.
> 
> > I also have p5-PGObject-Util-DBAdmin, which I haven't submitted yet, that
> > seems to need an interactive test that uses the postgres user's password
> > and also has
> > pre-test:
> > mkdir ${WRKSRC}/t/var
> > 
> > The testing part from the port isn't creating the var directory.
> > portcheck complains about hardcoded paths for that.
> 
> The tools aren't always correct; portcheck whines about some things that
> aren't a problem; sometimes update-plist gets things wrong. Best thing
> to do in that case usually is to flag them in the mail.
> 
> 
> > I'm good with whatever works best.
> > Thanks,
> > Chris
> > 
> > 

OK, that's what I'll do.

Thanks,
Chris Bennett




Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 08:42:59PM +0100, Stuart Henderson wrote:
> On 2021/05/07 12:11, Steve Williams wrote:
> > Hi,
> > 
> > pkg_add(1) needs a "-D unsigned"
> > 
> > That's how I worked around it when I was playing with creating a new port.
> 
> -D unsigned is for special cases only (usually only when you are testing
> a package built by somebody else who you trust, or when testing upgrade
> paths for your own packages).
> 
> Installing from the ports tree does not use -D unsigned, it uses the
> TRUSTED_PKG_PATH mechanism instead. If this isn't working then there is
> something unusual in the setup which is preventing things from working
> correctly. The #1 candidate is a privilege escalation program (sudo or
> doas) that is not configured to pass environment variables through.
> 
> > > > /etc/doas.conf
> > > > permit setenv { \
> > > >  FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
> > > >  DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
> > > >  MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
> > > >  PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
> > > >  SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
> > > >  FAKE_TREE_OWNER=_pbuild } :wsrc
> 
> Please don't try enumerating all the variables used by ports; it may
> change sometime and it's easy to miss something. Just use keepenv
> (or for sudo use "SUDO=sudo -E" in mk.conf).
> 
> The other place where people often run into problems with doas is the
> order of parsing the lines, it is "last match wins".
> 

Wow! sudo -E did the trick.

Yes, I was worried about the "last match wins" rule.

--
Chris




Re: Problem getting unsigned package working on new port

2021-05-07 Thread Stuart Henderson
On 2021/05/07 15:23, Chris Bennett wrote:
> On Fri, May 07, 2021 at 08:47:07PM +0100, Stuart Henderson wrote:
> > > I don't want to make a big mess on the mailing list, so I think I'll
> > > just submit these as WIP to the list as what the ports are called
> > > and put the files for each group of new ports elsewhere for anyone to
> > > look over first who wants to. Way too messy otherwise. This time I'm
> > > going to get properly organized first.
> > 
> > Please send the tars on list rather than putting them elsewhere and
> > asking people to look at them.
> 
> I was thinking more along the lines of just posting the Makefiles, at
> least at first, and if they are OK, then put up the tars.

tars, please, so we can actually build them.

if I have 5 minutes free to look at a ports submission, I'll be looking
for something where everything that I need to review it is in the mail.

> Is that OK or a bad idea? I'm just thinking that I'll get some simple
> stuff wrong in the Makefiles the first time and leave a mess on the
> list. I've never worked on a project this big, so just let me know
> anything that's the best way.
> 
> A couple of the PGObject Makefiles were a bit complicated with the
> postgresql testing parts. Our postgres testing module even needed a diff
> for one of my Makefiles to work.

that's totally fine, the tree works together as a whole, sometimes other
parts (either of ports or sometimes even src) need a bit of work in
order to get a port working.

> I also have p5-PGObject-Util-DBAdmin, which I haven't submitted yet, that
> seems to need an interactive test that uses the postgres user's password
> and also has
> pre-test:
>   mkdir ${WRKSRC}/t/var
> 
> The testing part from the port isn't creating the var directory.
> portcheck complains about hardcoded paths for that.

The tools aren't always correct; portcheck whines about some things that
aren't a problem; sometimes update-plist gets things wrong. Best thing
to do in that case usually is to flag them in the mail.


> I'm good with whatever works best.
> Thanks,
> Chris
> 
> 



Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 08:47:07PM +0100, Stuart Henderson wrote:
> > I don't want to make a big mess on the mailing list, so I think I'll
> > just submit these as WIP to the list as what the ports are called
> > and put the files for each group of new ports elsewhere for anyone to
> > look over first who wants to. Way too messy otherwise. This time I'm
> > going to get properly organized first.
> 
> Please send the tars on list rather than putting them elsewhere and
> asking people to look at them.

I was thinking more along the lines of just posting the Makefiles, at
least at first, and if they are OK, then put up the tars.

Is that OK or a bad idea? I'm just thinking that I'll get some simple
stuff wrong in the Makefiles the first time and leave a mess on the
list. I've never worked on a project this big, so just let me know
anything that's the best way.

A couple of the PGObject Makefiles were a bit complicated with the
postgresql testing parts. Our postgres testing module even needed a diff
for one of my Makefiles to work.

I also have p5-PGObject-Util-DBAdmin, which I haven't submitted yet, that
seems to need an interactive test that uses the postgres user's password
and also has
pre-test:
mkdir ${WRKSRC}/t/var

The testing part from the port isn't creating the var directory.
portcheck complains about hardcoded paths for that.

I'm good with whatever works best.
Thanks,
Chris




Re: Problem getting unsigned package working on new port

2021-05-07 Thread Stuart Henderson
On 2021/05/07 14:35, Chris Bennett wrote:
> On Fri, May 07, 2021 at 12:11:17PM -0600, Steve Williams wrote:
> > Hi,
> > 
> > pkg_add(1) needs a "-D unsigned"
> > 
> > That's how I worked around it when I was playing with creating a new port.
> > 
> > Cheers,
> > Steve W.
> 
> That's OK for a port not being submitted, just for personal use.
> I did try adding it to FETCH_PACKAGES in /etc/mk.conf
> Didn't work with make install.
> 
> Everything works fine with this port except for the signature problem.
> 
> I'm just running this port which is at the bottom of a dependency list
> for LedgerSMB. That has a ton of new dependencies.
> I wanted to check if I have everything working right before creating
> chunks of each group in a single email.
> Obviously there is a problem with my setup.
> 
> I don't want to make a big mess on the mailing list, so I think I'll
> just submit these as WIP to the list as what the ports are called
> and put the files for each group of new ports elsewhere for anyone to
> look over first who wants to. Way too messy otherwise. This time I'm
> going to get properly organized first.

Please send the tars on list rather than putting them elsewhere and
asking people to look at them.



Re: Problem getting unsigned package working on new port

2021-05-07 Thread Stuart Henderson
On 2021/05/07 12:11, Steve Williams wrote:
> Hi,
> 
> pkg_add(1) needs a "-D unsigned"
> 
> That's how I worked around it when I was playing with creating a new port.

-D unsigned is for special cases only (usually only when you are testing
a package built by somebody else who you trust, or when testing upgrade
paths for your own packages).

Installing from the ports tree does not use -D unsigned, it uses the
TRUSTED_PKG_PATH mechanism instead. If this isn't working then there is
something unusual in the setup which is preventing things from working
correctly. The #1 candidate is a privilege escalation program (sudo or
doas) that is not configured to pass environment variables through.

> > > /etc/doas.conf
> > > permit setenv { \
> > >  FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
> > >  DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
> > >  MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
> > >  PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
> > >  SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
> > >  FAKE_TREE_OWNER=_pbuild } :wsrc

Please don't try enumerating all the variables used by ports; it may
change sometime and it's easy to miss something. Just use keepenv
(or for sudo use "SUDO=sudo -E" in mk.conf).

The other place where people often run into problems with doas is the
order of parsing the lines, it is "last match wins".



Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 12:11:17PM -0600, Steve Williams wrote:
> Hi,
> 
> pkg_add(1) needs a "-D unsigned"
> 
> That's how I worked around it when I was playing with creating a new port.
> 
> Cheers,
> Steve W.

That's OK for a port not being submitted, just for personal use.
I did try adding it to FETCH_PACKAGES in /etc/mk.conf
Didn't work with make install.

Everything works fine with this port except for the signature problem.

I'm just running this port which is at the bottom of a dependency list
for LedgerSMB. That has a ton of new dependencies.
I wanted to check if I have everything working right before creating
chunks of each group in a single email.
Obviously there is a problem with my setup.

I don't want to make a big mess on the mailing list, so I think I'll
just submit these as WIP to the list as what the ports are called
and put the files for each group of new ports elsewhere for anyone to
look over first who wants to. Way too messy otherwise. This time I'm
going to get properly organized first.

Thanks,
Chris




Re: Problem getting unsigned package working on new port

2021-05-07 Thread Steve Williams

Hi,

pkg_add(1) needs a "-D unsigned"

That's how I worked around it when I was playing with creating a new port.

Cheers,
Steve W.

On 07/05/2021 9:43 a.m., Chris Bennett wrote:

On Fri, May 07, 2021 at 07:04:49AM +, Dimitri Karamazov wrote:

On Fri, May 07, 2021 at 06:00:03AM +, Chris Bennett wrote:

I'm having an error getting doas make install. Also fails when using root
for make package and when I moved the directory over into /usr/ports/devel/

You must avoid using root for the ports work.
Also no need for 'doas make install', `make install` will call onto doas.


and mk.conf

CX ~ $ cat /etc/mk.conf
SUDO=/usr/bin/doas
FETCH_PACKAGES=-Dsnap
DISTDIR=/usr/distfiles
PACKAGE_REPOSITORY=/usr/packages
WRKOBJDIR=/usr/Pobj
LOCKDIR=/usr/Pobj/locks
#LOCK_VERBOSE=Yes

I've ran into such errors using non-default locations as above.
Why not set everything inside /usr/ports with all on different partitions
if necessary.


.include "/usr/ports/infrastructure/templates/mk.conf.template"

_-_

I see that a lot of changes have been made to porting.
I've been reading the manual pages for ports, package, packages, bsd.port.mk, 
etc.
I've also read the Porter's Handbook pages.

All of the make steps work fine, as they did before. I'm not sure exactly where 
to
look for this problem. I've been running sysupgrade for a long time. Might 
there be
some step that didn't take right (likely my fault) and I need to do a fresh 
install?

Hmm,
Chris Bennett

You don't need a fresh install, maybe refetch the ports tree at most.
This is all that is required in mk.conf, if you keep/mount in the default 
locations.

/etc/mk.conf
PORTS_PRIVSEP=Yes
SUDO=doas
FETCH_PACKAGES=-Dsnap

If sls is your default user, as root do:

# usermod sls -G wsrc
# chown -R sls:wsrc /usr/ports
# chmod 775 /usr/ports
# cd /usr/ports && make fix-permissions

You need to expand default example doas.conf as follows:
Set proper user in PORTS_TREE_OWNER below.
You can add TRUSTED_PKG_PATH and TERM below if required
for pkg_add/pkg_delete.

/etc/doas.conf
permit setenv { \
 FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
 DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
 MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
 PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
 SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
 FAKE_TREE_OWNER=_pbuild } :wsrc

Then you can use ports as your default user `sls`
$ make build
$ make package
$ make install

No luck.
Works fine for existing ports. My new port (super simple p5- )
keeps failing about signature.

At this point I'm clueless. Tired out too.

I looked at dpb too. Pretty much guessed at trying to make it build this
single port, but that didn't work. I don't really understand what options
it needs or if will work with things as-is right now.

Still, that really doesn't help with doing things the "normal" way.
Worst case, I can do a fresh install on the second hard drive.
But I really don't like not knowing or understanding what the problem is.

If I can't figure it out, I'll do a fresh install another day and see if that
fixes the problem.

Thanks,
Chris





Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 07:04:49AM +, Dimitri Karamazov wrote:
> On Fri, May 07, 2021 at 06:00:03AM +, Chris Bennett wrote:
> > I'm having an error getting doas make install. Also fails when using root
> > for make package and when I moved the directory over into /usr/ports/devel/
> 
> You must avoid using root for the ports work.
> Also no need for 'doas make install', `make install` will call onto doas.
> 
> > and mk.conf
> > 
> > CX ~ $ cat /etc/mk.conf
> > SUDO=/usr/bin/doas
> > FETCH_PACKAGES=-Dsnap
> > DISTDIR=/usr/distfiles
> > PACKAGE_REPOSITORY=/usr/packages
> > WRKOBJDIR=/usr/Pobj
> > LOCKDIR=/usr/Pobj/locks
> > #LOCK_VERBOSE=Yes
> 
> I've ran into such errors using non-default locations as above.
> Why not set everything inside /usr/ports with all on different partitions
> if necessary.
> 
> > 
> > .include "/usr/ports/infrastructure/templates/mk.conf.template"
> > 
> > _-_
> > 
> > I see that a lot of changes have been made to porting.
> > I've been reading the manual pages for ports, package, packages, 
> > bsd.port.mk, etc.
> > I've also read the Porter's Handbook pages.
> > 
> > All of the make steps work fine, as they did before. I'm not sure exactly 
> > where to
> > look for this problem. I've been running sysupgrade for a long time. Might 
> > there be
> > some step that didn't take right (likely my fault) and I need to do a fresh 
> > install?
> > 
> > Hmm,
> > Chris Bennett
> 
> You don't need a fresh install, maybe refetch the ports tree at most.
> This is all that is required in mk.conf, if you keep/mount in the default 
> locations.
> 
> /etc/mk.conf
> PORTS_PRIVSEP=Yes
> SUDO=doas
> FETCH_PACKAGES=-Dsnap
> 
> If sls is your default user, as root do:
> 
> # usermod sls -G wsrc
> # chown -R sls:wsrc /usr/ports
> # chmod 775 /usr/ports
> # cd /usr/ports && make fix-permissions
> 
> You need to expand default example doas.conf as follows:
> Set proper user in PORTS_TREE_OWNER below.
> You can add TRUSTED_PKG_PATH and TERM below if required
> for pkg_add/pkg_delete.
> 
> /etc/doas.conf
> permit setenv { \
> FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
> DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
> MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
> PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
> SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
> FAKE_TREE_OWNER=_pbuild } :wsrc
> 
> Then you can use ports as your default user `sls`
> $ make build
> $ make package
> $ make install

No luck.
Works fine for existing ports. My new port (super simple p5- )
keeps failing about signature.

At this point I'm clueless. Tired out too.

I looked at dpb too. Pretty much guessed at trying to make it build this
single port, but that didn't work. I don't really understand what options
it needs or if will work with things as-is right now.

Still, that really doesn't help with doing things the "normal" way.
Worst case, I can do a fresh install on the second hard drive.
But I really don't like not knowing or understanding what the problem is.

If I can't figure it out, I'll do a fresh install another day and see if that
fixes the problem.

Thanks,
Chris




Re: Problem getting unsigned package working on new port

2021-05-07 Thread Dimitri Karamazov
On Fri, May 07, 2021 at 06:00:03AM +, Chris Bennett wrote:
> I'm having an error getting doas make install. Also fails when using root
> for make package and when I moved the directory over into /usr/ports/devel/

You must avoid using root for the ports work.
Also no need for 'doas make install', `make install` will call onto doas.

> and mk.conf
> 
> CX ~ $ cat /etc/mk.conf
> SUDO=/usr/bin/doas
> FETCH_PACKAGES=-Dsnap
> DISTDIR=/usr/distfiles
> PACKAGE_REPOSITORY=/usr/packages
> WRKOBJDIR=/usr/Pobj
> LOCKDIR=/usr/Pobj/locks
> #LOCK_VERBOSE=Yes

I've ran into such errors using non-default locations as above.
Why not set everything inside /usr/ports with all on different partitions
if necessary.

> 
> .include "/usr/ports/infrastructure/templates/mk.conf.template"
> 
> _-_
> 
> I see that a lot of changes have been made to porting.
> I've been reading the manual pages for ports, package, packages, bsd.port.mk, 
> etc.
> I've also read the Porter's Handbook pages.
> 
> All of the make steps work fine, as they did before. I'm not sure exactly 
> where to
> look for this problem. I've been running sysupgrade for a long time. Might 
> there be
> some step that didn't take right (likely my fault) and I need to do a fresh 
> install?
> 
> Hmm,
> Chris Bennett

You don't need a fresh install, maybe refetch the ports tree at most.
This is all that is required in mk.conf, if you keep/mount in the default 
locations.

/etc/mk.conf
PORTS_PRIVSEP=Yes
SUDO=doas
FETCH_PACKAGES=-Dsnap

If sls is your default user, as root do:

# usermod sls -G wsrc
# chown -R sls:wsrc /usr/ports
# chmod 775 /usr/ports
# cd /usr/ports && make fix-permissions

You need to expand default example doas.conf as follows:
Set proper user in PORTS_TREE_OWNER below.
You can add TRUSTED_PKG_PATH and TERM below if required
for pkg_add/pkg_delete.

/etc/doas.conf
permit setenv { \
FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
FAKE_TREE_OWNER=_pbuild } :wsrc

Then you can use ports as your default user `sls`
$ make build
$ make package
$ make install



Re: Problem getting unsigned package working on new port

2021-05-07 Thread Chris Bennett
On Fri, May 07, 2021 at 07:04:49AM +, Dimitri Karamazov wrote:
> On Fri, May 07, 2021 at 06:00:03AM +, Chris Bennett wrote:
> > I'm having an error getting doas make install. Also fails when using root
> > for make package and when I moved the directory over into /usr/ports/devel/
> 
> You must avoid using root for the ports work.
> Also no need for 'doas make install', `make install` will call onto doas.
> 
> > and mk.conf
> > 
> > CX ~ $ cat /etc/mk.conf
> > SUDO=/usr/bin/doas
> > FETCH_PACKAGES=-Dsnap
> > DISTDIR=/usr/distfiles
> > PACKAGE_REPOSITORY=/usr/packages
> > WRKOBJDIR=/usr/Pobj
> > LOCKDIR=/usr/Pobj/locks
> > #LOCK_VERBOSE=Yes
> 
> I've ran into such errors using non-default locations as above.
> Why not set everything inside /usr/ports with all on different partitions
> if necessary.

This is one of those "Duh" moments! Those are seperate partitions.
/usr/ports/mystuff, too.
Why on earth I didn't leave those other ones also in the proper place is
a bit idiotic of me. I'll fix that and below after coffee.
Thanks,
Chris

> 
> > 
> > .include "/usr/ports/infrastructure/templates/mk.conf.template"
> > 
> > _-_
> > 
> > I see that a lot of changes have been made to porting.
> > I've been reading the manual pages for ports, package, packages, 
> > bsd.port.mk, etc.
> > I've also read the Porter's Handbook pages.
> > 
> > All of the make steps work fine, as they did before. I'm not sure exactly 
> > where to
> > look for this problem. I've been running sysupgrade for a long time. Might 
> > there be
> > some step that didn't take right (likely my fault) and I need to do a fresh 
> > install?
> > 
> > Hmm,
> > Chris Bennett
> 
> You don't need a fresh install, maybe refetch the ports tree at most.
> This is all that is required in mk.conf, if you keep/mount in the default 
> locations.
> 
> /etc/mk.conf
> PORTS_PRIVSEP=Yes
> SUDO=doas
> FETCH_PACKAGES=-Dsnap
> 
> If sls is your default user, as root do:
> 
> # usermod sls -G wsrc
> # chown -R sls:wsrc /usr/ports
> # chmod 775 /usr/ports
> # cd /usr/ports && make fix-permissions
> 
> You need to expand default example doas.conf as follows:
> Set proper user in PORTS_TREE_OWNER below.
> You can add TRUSTED_PKG_PATH and TERM below if required
> for pkg_add/pkg_delete.
> 
> /etc/doas.conf
> permit setenv { \
> FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
> DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
> MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
> PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
> SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 PORTS_TREE_OWNER=sls \
> FAKE_TREE_OWNER=_pbuild } :wsrc
> 
> Then you can use ports as your default user `sls`
> $ make build
> $ make package
> $ make install



Re: Problem getting unsigned package working on new port

2021-05-06 Thread James Cook
On Thu, May 06, 2021 at 08:58:40PM -0500, Chris Bennett wrote:
> On Fri, May 07, 2021 at 12:58:18AM +, James Cook wrote:
> > On Thu, May 06, 2021 at 07:02:10PM -0500, Chris Bennett wrote:
> > > I'm having an error getting doas make install. Also fails when using root
> > > for make package and when I moved the directory over into 
> > > /usr/ports/devel/
> > > 
> > > This is what is getting produced with make package:
> > > 
> > > CX p5-File-PathList $ tar zvf 
> > > /usr/packages/amd64/all/p5-File-PathList-1.04.tgz
> > > -r--r--r--  1 root wheel  518 May  6 17:47 +CONTENTS
> > > -r--r--r--  1 root wheel  602 May  6 17:47 +DESC
> > > -r--r--r--  1 root bin   5191 Dec 31  1969 
> > > libdata/perl5/site_perl/File/PathList.pm
> > > -r--r--r--  1 root bin   6216 Dec 31  1969 
> > > man/man3p/File::PathList.3p
> > > 
> > > CX all # tar xzvf p5-File-PathList-1.04.tgz
> > > +CONTENTS
> > > +DESC
> > > libdata/perl5/site_perl/File/PathList.pm
> > > man/man3p/File::PathList.3p
> > > 
> > > CX all # cat +CONTENTS
> > > @comment $OpenBSD: PLIST,v$
> > > @name p5-File-PathList-1.04
> > > @comment pkgpath=devel/p5-File-PathList ftp=yes
> > > @arch *
> > > +DESC
> > > @sha zVmYJtE6NhOnNIiaIO/Mg3dqWHUzbGSvEs4uCd9lAvQ=
> > > @size 602
> > > @depend devel/p5-Params-Util:p5-Params-Util-*:p5-Params-Util-1.07p2
> > > @cwd /usr/local
> > > libdata/perl5/site_perl/File/
> > > libdata/perl5/site_perl/File/PathList.pm
> > > @sha xPu9e1UGezN3CF1fdqjA9eWCPK0yALnGUj/3DA/UFjI=
> > > @size 5191
> > > @ts 1215675005
> > > @man man/man3p/File::PathList.3p
> > > @sha v3i5tb/ui1rMuD1cs5tt3H2RWq1mDmy1WGdc5B9cCUM=
> > > @size 6216
> > > @ts 1620344553
> > > 
> > > 
> > > I'm getting the following when doing doas make install:
> > > 
> > > CX p5-File-PathList $ MI
> > > doas (s...@mail.bennettconstruction.us) password: 
> > > ===>  Installing p5-File-PathList-1.04 from /usr/packages/amd64/all/
> > > doas (r...@mail.bennettconstruction.us) password: 
> > > quirks-4.9 signed on 2021-05-06T19:40:58Z
> > > quirks-4.6->4.9: ok
> > > file:/usr/packages/amd64/all/p5-File-PathList-1.04.tgz: unsigned package
> > 
> > I had a similar error, and fixed it by adding keepenv to my doas
> > config. I think the variable that needs to be passed through is
> > TRUSTED_PKG_PATH.
> > 
> > http://openbsd-archive.7691.n7.nabble.com/signify-error-when-installing-ports-on-current-td366895.html
> > 
> 
> I also thought that TRUSTED_PKG_PATH was likely the problem.
> 
> What exactly did you put in doas.conf?

I just have:

  permit persist keepenv falsifian

  # Adapted from the bsd.port.mk man page.
  permit keepenv nopass falsifian as _pbuild
  permit keepenv nopass falsifian as _pfetch

> I also untarred -current's /etc/example/doas.conf and didn't see anything 
> different from
> what I already had uncommented.
> 
> When I run make show=TRUSTED_PKG_PATH under /usr/ports/devel I get it
> from every port except my new one.

Sorry, this is beyond me.

-- 
James



Re: Problem getting unsigned package working on new port

2021-05-06 Thread Chris Bennett
On Fri, May 07, 2021 at 12:58:18AM +, James Cook wrote:
> On Thu, May 06, 2021 at 07:02:10PM -0500, Chris Bennett wrote:
> > I'm having an error getting doas make install. Also fails when using root
> > for make package and when I moved the directory over into /usr/ports/devel/
> > 
> > This is what is getting produced with make package:
> > 
> > CX p5-File-PathList $ tar zvf 
> > /usr/packages/amd64/all/p5-File-PathList-1.04.tgz
> > -r--r--r--  1 root wheel  518 May  6 17:47 +CONTENTS
> > -r--r--r--  1 root wheel  602 May  6 17:47 +DESC
> > -r--r--r--  1 root bin   5191 Dec 31  1969 
> > libdata/perl5/site_perl/File/PathList.pm
> > -r--r--r--  1 root bin   6216 Dec 31  1969 
> > man/man3p/File::PathList.3p
> > 
> > CX all # tar xzvf p5-File-PathList-1.04.tgz
> > +CONTENTS
> > +DESC
> > libdata/perl5/site_perl/File/PathList.pm
> > man/man3p/File::PathList.3p
> > 
> > CX all # cat +CONTENTS
> > @comment $OpenBSD: PLIST,v$
> > @name p5-File-PathList-1.04
> > @comment pkgpath=devel/p5-File-PathList ftp=yes
> > @arch *
> > +DESC
> > @sha zVmYJtE6NhOnNIiaIO/Mg3dqWHUzbGSvEs4uCd9lAvQ=
> > @size 602
> > @depend devel/p5-Params-Util:p5-Params-Util-*:p5-Params-Util-1.07p2
> > @cwd /usr/local
> > libdata/perl5/site_perl/File/
> > libdata/perl5/site_perl/File/PathList.pm
> > @sha xPu9e1UGezN3CF1fdqjA9eWCPK0yALnGUj/3DA/UFjI=
> > @size 5191
> > @ts 1215675005
> > @man man/man3p/File::PathList.3p
> > @sha v3i5tb/ui1rMuD1cs5tt3H2RWq1mDmy1WGdc5B9cCUM=
> > @size 6216
> > @ts 1620344553
> > 
> > 
> > I'm getting the following when doing doas make install:
> > 
> > CX p5-File-PathList $ MI
> > doas (s...@mail.bennettconstruction.us) password: 
> > ===>  Installing p5-File-PathList-1.04 from /usr/packages/amd64/all/
> > doas (r...@mail.bennettconstruction.us) password: 
> > quirks-4.9 signed on 2021-05-06T19:40:58Z
> > quirks-4.6->4.9: ok
> > file:/usr/packages/amd64/all/p5-File-PathList-1.04.tgz: unsigned package
> 
> I had a similar error, and fixed it by adding keepenv to my doas
> config. I think the variable that needs to be passed through is
> TRUSTED_PKG_PATH.
> 
> http://openbsd-archive.7691.n7.nabble.com/signify-error-when-installing-ports-on-current-td366895.html
> 

I also thought that TRUSTED_PKG_PATH was likely the problem.

What exactly did you put in doas.conf?
I also untarred -current's /etc/example/doas.conf and didn't see anything 
different from
what I already had uncommented.

When I run make show=TRUSTED_PKG_PATH under /usr/ports/devel I get it
from every port except my new one.

CX devel # cat /etc/doas.conf   
  
# $OpenBSD: doas.conf,v 1.1 2016/09/03 11:58:32 pirofti Exp $
# Configuration sample file for doas(1).
# See doas.conf(5) for syntax and examples.

# Non-exhaustive list of variables needed to build release(8) and ports(7)
permit nopass setenv { \
FTPMODE PKG_CACHE PKG_PATH SM_PATH SSH_AUTH_SOCK \
DESTDIR DISTDIR FETCH_CMD FLAVOR GROUP MAKE MAKECONF \
MULTI_PACKAGES NOMAN OKAY_FILES OWNER PKG_DBDIR \
PKG_DESTDIR PKG_TMPDIR PORTSDIR RELEASEDIR SHARED_ONLY \
SUBPACKAGE WRKOBJDIR SUDO_PORT_V1 } :wsrc

# Allow wheel by default
permit keepenv :wheel

# Allow sls by pkg_add and pkg_delete
#permit nopass sls as root cmd /usr/sbin/pkg_add
#permit nopass sls as root cmd /usr/sbin/pkg_delete

permit nopass _syslogd as root cmd /usr/local/sbin/sshlockout

permit root
permit nopass _pfbadhost cmd /sbin/pfctl args -nf /etc/pf.conf
permit nopass _pfbadhost cmd /sbin/pfctl args -t pfbadhost -T replace -f 
/etc/pf-badhost.txt
 # Optional rule for authlog scanning
permit nopass _pfbadhost cmd /usr/bin/zcat args -f /var/log/authlog 
/var/log/authlog.0.gz


--
Chris




Re: Problem getting unsigned package working on new port

2021-05-06 Thread James Cook
On Thu, May 06, 2021 at 07:02:10PM -0500, Chris Bennett wrote:
> I'm having an error getting doas make install. Also fails when using root
> for make package and when I moved the directory over into /usr/ports/devel/
> 
> This is what is getting produced with make package:
> 
> CX p5-File-PathList $ tar zvf 
> /usr/packages/amd64/all/p5-File-PathList-1.04.tgz
> -r--r--r--  1 root wheel  518 May  6 17:47 +CONTENTS
> -r--r--r--  1 root wheel  602 May  6 17:47 +DESC
> -r--r--r--  1 root bin   5191 Dec 31  1969 
> libdata/perl5/site_perl/File/PathList.pm
> -r--r--r--  1 root bin   6216 Dec 31  1969 
> man/man3p/File::PathList.3p
> 
> CX all # tar xzvf p5-File-PathList-1.04.tgz
> +CONTENTS
> +DESC
> libdata/perl5/site_perl/File/PathList.pm
> man/man3p/File::PathList.3p
> 
> CX all # cat +CONTENTS
> @comment $OpenBSD: PLIST,v$
> @name p5-File-PathList-1.04
> @comment pkgpath=devel/p5-File-PathList ftp=yes
> @arch *
> +DESC
> @sha zVmYJtE6NhOnNIiaIO/Mg3dqWHUzbGSvEs4uCd9lAvQ=
> @size 602
> @depend devel/p5-Params-Util:p5-Params-Util-*:p5-Params-Util-1.07p2
> @cwd /usr/local
> libdata/perl5/site_perl/File/
> libdata/perl5/site_perl/File/PathList.pm
> @sha xPu9e1UGezN3CF1fdqjA9eWCPK0yALnGUj/3DA/UFjI=
> @size 5191
> @ts 1215675005
> @man man/man3p/File::PathList.3p
> @sha v3i5tb/ui1rMuD1cs5tt3H2RWq1mDmy1WGdc5B9cCUM=
> @size 6216
> @ts 1620344553
> 
> 
> I'm getting the following when doing doas make install:
> 
> CX p5-File-PathList $ MI
> doas (s...@mail.bennettconstruction.us) password: 
> ===>  Installing p5-File-PathList-1.04 from /usr/packages/amd64/all/
> doas (r...@mail.bennettconstruction.us) password: 
> quirks-4.9 signed on 2021-05-06T19:40:58Z
> quirks-4.6->4.9: ok
> file:/usr/packages/amd64/all/p5-File-PathList-1.04.tgz: unsigned package

I had a similar error, and fixed it by adding keepenv to my doas
config. I think the variable that needs to be passed through is
TRUSTED_PKG_PATH.

http://openbsd-archive.7691.n7.nabble.com/signify-error-when-installing-ports-on-current-td366895.html

-- 
James



Re: Problem getting unsigned package working on new port

2021-05-06 Thread Erling Westenvik
On Thu, May 06, 2021 at 07:02:10PM -0500, Chris Bennett wrote:
> I'm having an error getting doas make install. Also fails when using root
> for make package and when I moved the directory over into /usr/ports/devel/
> [...]
> file:/usr/packages/amd64/all/p5-File-PathList-1.04.tgz: unsigned package

I'm out of league but perhaps throwing -Dunsigned into the soup
somewhere might help?

Good luck!
Erling