Jira (FACT-1883) facter 3.11.4 build broken on OpenBSD utmpx is not available

0 views
Skip to first unread message

Sebastian Reitenbach (JIRA)

unread,
Sep 17, 2018, 9:30:04 AM9/17/18
to puppe...@googlegroups.com
Sebastian Reitenbach created an issue
 
Facter / Bug FACT-1883
facter 3.11.4 build broken on OpenBSD utmpx is not available
Issue Type: Bug Bug
Affects Versions: FACT 3.11.4
Assignee: Unassigned
Created: 2018/09/17 6:29 AM
Environment:

OpenBSD 6.3 amd64

Priority: Normal Normal
Reporter: Sebastian Reitenbach

in the uptime resolver, facter 3.11.3 was just calling out to the "uptime" binary, in 3.11.4, that change to get the uptime via the utmpx interface, which apparently is not available on OpenBSD, and therefore breaks building.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Scott McClellan (JIRA)

unread,
Sep 18, 2018, 5:06:04 PM9/18/18
to puppe...@googlegroups.com

Scott McClellan (JIRA)

unread,
Sep 18, 2018, 5:06:04 PM9/18/18
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
Sep 18, 2018, 5:06:05 PM9/18/18
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
Sep 18, 2018, 5:10:03 PM9/18/18
to puppe...@googlegroups.com
Branan Riley assigned an issue to Unassigned
Change By: Branan Riley
Assignee: Branan Riley

Branan Riley (JIRA)

unread,
Sep 18, 2018, 5:10:04 PM9/18/18
to puppe...@googlegroups.com
Branan Riley commented on Bug FACT-1883
 
Re: facter 3.11.4 build broken on OpenBSD utmpx is not available

Hi Sebastian,

OpenBSD support in Facter is community-supported (and as you can tell by us breaking it, we don't have test infrastructure for it here at Puppet).

We'll happily take a pull request to fix this, but aren't likely to get around to it ourselves any time soon.

Sebastian Reitenbach (JIRA)

unread,
Sep 18, 2018, 5:39:07 PM9/18/18
to puppe...@googlegroups.com

Hi Brannan,

 

I guess adding a configure script, checking for availability of utmpx.h would be the most clean thing to do, however,

I'm not overly intimate with cmake, as well as c++ is not my most favourite language.

So, if the only thing I can come up with, would be a simple:

#ifdef _OpenBSD_

#else

...

 

also OK?

 

Branan Riley (JIRA)

unread,
Sep 18, 2018, 5:43:04 PM9/18/18
to puppe...@googlegroups.com
Branan Riley commented on Bug FACT-1883

Yeah, I think that would be fine. It looks like OpenBSD is likely to be the only platform without utmpx that we'd want to try to support.

Sebastian Reitenbach (JIRA)

unread,
Sep 26, 2018, 8:56:04 AM9/26/18
to puppe...@googlegroups.com

took me a while to get to it, but see: https://github.com/puppetlabs/facter/pull/1750

I went the I think more elegant route, adding a configure check, and defining HAVE_UTMPX_H in case the header file is found.

Based on that define, I compile the utmpx_file.cc and made some changes to the uptime_resolver.c, to only use the fallback

of calling the uptime binary when it's not available.

 

does that look good?

 

Branan Riley (JIRA)

unread,
Sep 27, 2018, 12:57:05 PM9/27/18
to puppe...@googlegroups.com

Gabriel Nagy (JIRA)

unread,
Jun 25, 2019, 3:58:02 AM6/25/19
to puppe...@googlegroups.com
Gabriel Nagy assigned an issue to Gabriel Nagy
Change By: Gabriel Nagy
Assignee: Gabriel Nagy
Team: Platform OS Puppet Romania
Sprint: PR - 2019-06-25

Gheorghe Popescu (JIRA)

unread,
Jul 1, 2019, 3:10:02 AM7/1/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages