Jira (PUP-4337) OpenBSD package provider does not correctly install packages

3 views
Skip to first unread message

Danny Roberts (JIRA)

unread,
Mar 29, 2015, 9:15:10 AM3/29/15
to puppe...@googlegroups.com
Danny Roberts created an issue
 
Puppet / Bug PUP-4337
OpenBSD package provider does not correctly install packages
Issue Type: Bug Bug
Affects Versions: PUP 3.6.2
Assignee: Kylo Ginsberg
Components: Client
Created: 2015/03/29 6:14 AM
Environment:

OpenBSD 5.6 amd64

Labels: openbsd package provider
Priority: Normal Normal
Reporter: Danny Roberts

Installing packages via Puppet on OpenBSD does not seem to work, here is the relevant part of the debug output from a run that tries to install bash & zsh packages:

```Debug: Executing '/usr/sbin/pkg_info -a'
Debug: Executing '/usr/sbin/pkg_info bash'
Debug: Executing '/usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64'
Notice: /Stage[main]/Bashprofile/Package[bash]/ensure: created
Debug: /Package[bash]: The container Class[Bashprofile] will propagate my refresh event
Debug: Executing '/usr/sbin/pkg_info zsh'
Debug: Executing '/usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64'
Notice: /Stage[main]/Main/Package[zsh]/ensure: created```

As you can see it reports a success but command that returned this success is actually a failure, here it is ran from the cli:

```# /usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64
quirks-2.9 signed on 2014-07-31T22:37:55Z
http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/ is empty
Can't find amd64```

I'm not really an OpenBSD guy but it seems the options being passed to pkg_add are not sufficient to install the package as it is not actually telling pkg_add what to install just where it should be installing from.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Danny Roberts (JIRA)

unread,
Mar 29, 2015, 9:16:10 AM3/29/15
to puppe...@googlegroups.com
Danny Roberts updated an issue
Change By: Danny Roberts
Installing packages via Puppet on OpenBSD does not seem to work, here is the relevant part of the debug output from a run that tries to install bash & zsh packages:

``` {quote}
Debug: Executing '/usr/sbin/pkg_info -a'
Debug: Executing '/usr/sbin/pkg_info bash'
Debug: Executing '/usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64'
Notice: /Stage[main]/Bashprofile/Package[bash]/ensure: created
Debug: /Package[bash]: The container Class[Bashprofile] will propagate my refresh event
Debug: Executing '/usr/sbin/pkg_info zsh'
Debug: Executing '/usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64'
Notice: /Stage[main]/Main/Package[zsh]/ensure: created
```
{quote}

As you can see it reports a success but command that returned this success is actually a failure, here it is ran from the cli:

``` {quote}
# /usr/sbin/pkg_add http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/amd64
quirks-2.9 signed on 2014-07-31T22:37:55Z
http://mirror.bytemark.co.uk/pub/OpenBSD/5.6/packages/ is empty
Can't find amd64
```
{quote}

I'm not really an OpenBSD guy but it seems the options being passed to pkg_add are not sufficient to install the package as it is not actually telling pkg_add what to install just where it should be installing from.

Kylo Ginsberg (JIRA)

unread,
Mar 29, 2015, 9:35:10 AM3/29/15
to puppe...@googlegroups.com
Kylo Ginsberg assigned an issue to Unassigned
Change By: Kylo Ginsberg
Assignee: Kylo Ginsberg

Kylo Ginsberg (JIRA)

unread,
Mar 29, 2015, 9:40:09 AM3/29/15
to puppe...@googlegroups.com

Jasper Lievisse Adriaanse (JIRA)

unread,
Mar 30, 2015, 5:02:11 AM3/30/15
to puppe...@googlegroups.com

Hi,

I will have a look at this the coming week. There are some other modifications to the package provider (from Sebastia@OpenBSD) that I will submit too which greatly improve the flavor handling.

Jasper Lievisse Adriaanse (JIRA)

unread,
Aug 21, 2015, 9:02:05 AM8/21/15
to puppe...@googlegroups.com

Hi,

Finally gotten around to looking into this.

To be clear, the title seems to suggest nothing can be installed with the
OpenBSD package provider, which is not true.

There are however issues when trying to install packages that don't actually
exist:

Info: Applying configuration version '1440161319'
Debug: Prefetching openbsd resources for package
Debug: Executing '/usr/sbin/pkg_info -a'
Debug: Executing '/usr/sbin/pkg_info sasquatch'
Debug: Executing '/usr/sbin/pkg_info -I sasquatch'
Debug: Executing '/usr/sbin/pkg_add -r sasquatch'
Notice: /Stage[main]/Main/Package[sasquatch]/ensure: created

Wether or not sasquatch exists in real life is another matter, but puppet
should indeed fail instead of reporting the package has been installed.

Note however:

obsidian:2001 pup-4337 % doas pkg_add -r sasquatch
Can't find sasquatch
obsidian:2002 pup-4337 % echo $?
0
obsidian:2003 pup-4337 %

And that's a bug in pkg_add(8). It should set the return value to something
non-zero. I'll submit a PR shortly which results in:

Error: pkg_add returned: Can't find sasquatch
Error: /Stage[main]/Main/Package[sasquatch]/ensure: change from absent to present failed: pkg_add returned: Can't find sasquatch
Notice: Finished catalog run in 4.65 seconds

This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Jasper Lievisse Adriaanse (JIRA)

unread,
Aug 21, 2015, 9:07:08 AM8/21/15
to puppe...@googlegroups.com

Kylo Ginsberg (JIRA)

unread,
Aug 21, 2015, 8:45:05 PM8/21/15
to puppe...@googlegroups.com
Kylo Ginsberg commented on Bug PUP-4337
 
Re: OpenBSD package provider does not correctly install packages

Jasper Lievisse Adriaanse we like to treat the ticket summary and description as "living" documents; i.e. we update them to be the best summary and description they can be when that makes sense. I'll take a stab at doing so here, but you know more than I so feel free to improve it further.

Thanks for looking into this!!!

Kylo Ginsberg (JIRA)

unread,
Aug 21, 2015, 8:45:07 PM8/21/15
to puppe...@googlegroups.com
Kylo Ginsberg updated an issue
 
OpenBSD package provider does not correctly fail for packages that don't exist
Change By: Kylo Ginsberg
Summary: OpenBSD package provider does not correctly  install  fail for  packages  that don't exist

Rob Browning (JIRA)

unread,
May 15, 2017, 6:24:07 PM5/15/17
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Labels: help_wanted openbsd package provider
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Rob Browning (JIRA)

unread,
May 15, 2017, 6:25:02 PM5/15/17
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Labels: help_wanted openbsd package provider  triaged

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:54:36 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Labels: help_wanted openbsd package provider  triaged

Jacob Helwig (JIRA)

unread,
Dec 5, 2017, 6:14:04 PM12/5/17
to puppe...@googlegroups.com
Jacob Helwig updated an issue
Change By: Jacob Helwig
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 10, 2021, 7:27:01 PM6/10/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-4337
 
Re: OpenBSD package provider does not correctly fail for packages that don't exist

It sounds like this issue was fixed upstream, so as long as pkg_add returns non-zero if the package doesn't exist, then puppet will do the right thing in https://github.com/puppetlabs/puppet/blob/2f14ddd269c26cba36771d9b3464c2c29422e46a/lib/puppet/provider/package/openbsd.rb#L167-L172. Since this hasn't been updated in a long time, I'm going to close this, but please reopen if it is still an issue.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages