Bug 9888 - Use generic check for OpenBSD platform.
Summary: Use generic check for OpenBSD platform.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.0.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 12:46 UTC by Vadim Zhukov
Modified: 2013-05-29 09:45 UTC (History)
0 users

See Also:


Attachments
Patch to fix issue (1.83 KB, patch)
2013-05-16 12:46 UTC, Vadim Zhukov
no flags Details
Patch to fix issue (2.30 KB, patch)
2013-05-16 14:42 UTC, Vadim Zhukov
no flags Details
Revision with fixed logic (2.31 KB, patch)
2013-05-16 14:48 UTC, Vadim Zhukov
no flags Details
Patch to fix issue via git format-patch (2.70 KB, patch)
2013-05-17 08:42 UTC, Vadim Zhukov
no flags Details
cherry-pick for 4.0 (3.06 KB, patch)
2013-05-21 14:51 UTC, Björn Jacke
lars: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Zhukov 2013-05-16 12:46:01 UTC
Created attachment 8890 [details]
Patch to fix issue

In a few places, the build infrastructure checks if it is running under OpenBSD. Unfortunately, it does a bad thing, comparing with either "openbsd4" or "openbsd5" (or both). OpenBSD versioning is different from many other projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the right approach will be to check that platform name starts with "openbsd" instead. This is also the thing OpenBSD developers do when patching other software, so this patch is consistent with already existing practicies.
Comment 1 Björn Jacke 2013-05-16 14:25:39 UTC
this looks not right to me:

-    if sys.platform != "openbsd4":
+    if sys.platform.startswith("openbsd"):
Comment 2 Vadim Zhukov 2013-05-16 14:42:49 UTC
Created attachment 8895 [details]
Patch to fix issue

Sorry, missed one of the sub-patches. Here is a new, full patch.
Comment 3 Vadim Zhukov 2013-05-16 14:43:18 UTC
(In reply to comment #1)
> this looks not right to me:
> 
> -    if sys.platform != "openbsd4":
> +    if sys.platform.startswith("openbsd"):

Oops, will fix ASAP.
Comment 4 Vadim Zhukov 2013-05-16 14:48:43 UTC
Created attachment 8896 [details]
Revision with fixed logic

Here is a new version, now with fixed logic. I'm not sure that this problematic chunk should be keeped here, either, but I cannot test on GCC2 and/or GCC3 OpenBSD architectures to make this clear. I will fill another issue if I get more info regarding -Wl,--as-needed, okay?
Comment 5 Vadim Zhukov 2013-05-17 08:42:57 UTC
Created attachment 8899 [details]
Patch to fix issue via git format-patch
Comment 6 Björn Jacke 2013-05-21 14:51:34 UTC
Created attachment 8907 [details]
cherry-pick for 4.0

fixed in master with 2fda6c47f4aa46dbb42028732207a94821881c67. 4.0 patch attached. Lars, please review+ and reassign to Karo if okay ...
Comment 7 Lars Müller 2013-05-21 14:57:20 UTC
Comment on attachment 8907 [details]
cherry-pick for 4.0

Looks ok as discussed some days back.
Comment 8 Lars Müller 2013-05-21 14:59:51 UTC
Passing to Karo for further processing.
Comment 9 Karolin Seeger 2013-05-27 11:56:52 UTC
Pushed to autobuild-v4-0-test.
Comment 10 Karolin Seeger 2013-05-29 09:45:27 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!