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

Fix pdsh build on MacOSX #96

Merged
merged 10 commits into from
Jun 27, 2017
Merged

Fix pdsh build on MacOSX #96

merged 10 commits into from
Jun 27, 2017

Conversation

grondo
Copy link
Member

@grondo grondo commented Jun 26, 2017

This PR contains some fixes and cleanup for pdsh on Mac OSX.

There's still a problem building pdsh with genders support on osx, but other parts of pdsh build and are now being tested on the travis-ci osx builder.

Fixes #95

grondo added 10 commits June 26, 2017 10:13
A version of the `bool` type was defined in a couple places in
pdsh, and on some systems (OSX), different source files were
seeing different sizes for this type (int vs byte?), and this
caused segfaults when passing a structure full of bool types
to a function defined in another source file.

Fix this by including `stdbool.h` in macros.h and make sure all
sources using bool pull in macros.h, and remove any other bool
typedefs from pdsh sources.
Fix assignment of char to char * in hostname_create_with_suffix()
Drop getnetgrent_r in favor of more widely supported getnetgrent().

This function is called before threaded dsh context.
Do not bother initializing modules in _mod_initialize_modules_by_name
when an empty list is passed to the function.

This may also avoid a potential segfault in list_split.
In opt_args_early(), local variable pc is only used on linux systems
with GNU getopt to track setting of POSIXLY_CORRECT environment
variable. Suppress warnings on Mac OSX by wrapping the definition of
this variable in #ifdef __linux as with the rest of the code.
Fix a useless use of parentheses (compiler warning on osx) and
also bad formatting when checking for DSH_READING state.
Probably meant to ignore SIGPIPE not block it.
Check for missing base64 program and fall back to openssl if not
found. Since `openssl base64` outputs in PEM format with newlines,
use tr(1) to remove newlines and then wrap at desired long line
length.
Add OSX to travis-ci builds. Do not attempt to use the travis-ci
builder to install dependencies, which proabably aren't needed or
won't be used on OSX anyway.
@grondo grondo force-pushed the osx-fixes branch 3 times, most recently from 4531741 to 042c1d4 Compare June 26, 2017 17:41
@grondo
Copy link
Member Author

grondo commented Jun 27, 2017

@garlick, @chu11, either of you have time to quickly review this?

@garlick
Copy link
Member

garlick commented Jun 27, 2017

Looks good to me.

@grondo
Copy link
Member Author

grondo commented Jun 27, 2017

@garlick, thanks for checking

@grondo
Copy link
Member Author

grondo commented Jun 27, 2017

Now someone else can push the merge button, yay!

@garlick garlick merged commit 33485e5 into master Jun 27, 2017
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.

pdsh 2.32 segfault on OS X 10.11
2 participants