Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FACT-1883) Fix compilation on platforms without utmpx #1750

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

buzzdeee
Copy link
Contributor

On systems, that don't have utmpx.h, i.e. OpenBSD, don't use it.
Looking at utmpx for the uptime resolver was introduced
in 3.11.4, but the fallback to just run the uptime command
is still there. So if no utmpx is around, only run the
uptime command.

@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@branan
Copy link

branan commented Sep 27, 2018

Hi @buzzdeee, thanks for this patch!

It looks like the right fix to me, there are just a couple of minor things:

  • Your commit message isn't in the right format. We have automated tooling that relies on the format of things. The preferred form is (FACT-1883) Fix compilation on platforms without utmpx (or something like that)
  • This should probably be targeted at the 3.11.x branch, so that it can land in all affected release streams.

If you're not particularly familiar with git, I can help you with making those changes.

@puppetcla
Copy link

CLA signed by all contributors.

On systems, that don't have utmpx.h, i.e. OpenBSD, don't use it.
Looking at utmpx for the uptime resolver was introduced
in 3.11.4, but the fallback to just run the uptime command
is still there. So if no utmpx is around, only run the
uptime command.
@buzzdeee
Copy link
Contributor Author

Hi @branan , I just commit --amend the patch, and push -f
hope it's fine now.

cheers,
Sebastian

@geoffnichols geoffnichols requested a review from a team May 10, 2019 20:52
@GabrielNagy GabrielNagy reopened this Jun 24, 2019
@GabrielNagy
Copy link
Contributor

Hi @buzzdeee!

Sorry for this being ignored for so long. If you still want this merged, please rebase the commit on 3.11.x, to have it get into puppet5 as well.

Otherwise, this looks good to me.

@GabrielNagy GabrielNagy changed the title Fix for FACT-1883 (FACT-1883) Fix compilation on platforms without utmpx Jun 24, 2019
@GabrielNagy
Copy link
Contributor

jenkins please test this on debian8-64a,debian8-32a,debian9-64a,debian9-32a,fedora28-64a,fedora29-64a,redhat5-64a,centos6-64a,centos6-32a,redhat7-64a,redhat8-64a,redhatfips7-64a,sles11-64a,sles11-32a,sles12-64a,sles15-64a,ubuntu1404-64a,ubuntu1404-32a,ubuntu1604-64a,ubuntu1604-32a,ubuntu1804-64a

@buzzdeee
Copy link
Contributor Author

Hi @GabrielNagy

not sure what you mean with:
If you still want this merged, please rebase the commit on 3.11.x, to have it get into puppet5 as well

OpenBSD recent snapshot has Puppet 5.5.14, and facter 3.14.0.
Older OpenBSD versions may have some older puppet and facter versions
installed, but those packages contain that patch.
Since OpenBSD current is already 3.14.X, I don't see a need to rebase
on 3.11.X, or may may miss the point.
I maintain the puppet related packages for OpenBSD, and I definately
won't go and touch/backport that to older versions ;)

What's this failing acceptance test, I don't seem to be able to see what's going wrong there.
Something I could/should fix?

cheers,
Sebastian

@GabrielNagy
Copy link
Contributor

That's understandable, since this was a bug fix of sorts I thought you may have wanted to merge it to the older facter versions as well.

We'll merge this to master then 👍. Acceptance tests failing are not related, because this change only impacts the build process the Travis checks should suffice.

@GabrielNagy GabrielNagy merged commit 7a7f3bd into puppetlabs:master Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants