Bug 1401231

Summary: Broken detection of toolchain features after upgrade of redhat-rpm-config
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: abokovoy, anoopcs, asn, awilliam, fweimer, gdeschner, james.hogarth, jhrozek, jrivera, lists, lmohanty, lslebodn, madam, pmatilai, riehecky, sbose, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:29:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1401175, 1401225, 1401226, 1401886    
Attachments:
Description Flags
Minimal changes required for building samba libraries asn: review+

Description Lukas Slebodnik 2016-12-03 18:41:45 UTC
Description of problem:
There was a change in redhat-rpm-config
diff -u -r 59/usr/lib/rpm/redhat/macros 60/usr/lib/rpm/redhat/macros
--- 59/usr/lib/rpm/redhat/macros        2016-12-03 19:11:47.961580325 +0100
+++ 60/usr/lib/rpm/redhat/macros        2016-12-03 19:11:58.676645157 +0100
@@ -147,7 +147,7 @@
 
 %__global_compiler_flags       -O2 -g -pipe -Wall -Werror=format-security -Wp,-_hardened_cflags}
 
-%__global_cflags       %{optflags}
+%__global_cflags       %{optflags} -Werror=implicit-function-declaration -Werro
 %__global_cxxflags     %{optflags}
 %__global_fflags       %{optflags} -I%_fmoddir
 %__global_fcflags      %{optflags} -I%_fmoddir


Version-Release number of selected component (if applicable):
All recent versions in rawhide.

How reproducible:
Deterministic

Steps to Reproduce:
1. rebuild samba or samba related libraries with redhat-rpm-config-60-1.fc26

Actual results:
build log contains
 CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int'
 //snip
 Checking for rpath library support       : not found 
 Checking for -Wl,--version-script support  : not found

Expected results:
 CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int'
 Checking for rpath library support       : ok  
 Checking for -Wl,--version-script support  : ok

Additional info:
I assume the fix will be the same for talloc, tevent, tdb, ldb

Comment 1 Lukas Slebodnik 2016-12-06 12:06:47 UTC
*** Bug 1401916 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Slebodnik 2016-12-06 18:47:06 UTC
Created attachment 1228666 [details]
Minimal changes required for building samba libraries

There are still failures in samba itself
e.g.
Checking for kernel change notify support
Checking for Linux kernel oplocks
Checking for kernel share modes

Checking whether we can use Linux thread-specific credentials                                   : not found 
Checking whether setreuid is available                                                          : not found 
Checking whether setresuid is available                                                         : not found 
Checking whether seteuid is available                                                           : not found 
Checking whether setuidx is available                                                           : /root/rpmbuild/BUILD/samba-4.5.1/source3/wscript:1059: error: the configuration failed (see '/root/rpmbuild/BUILD/samba-4.5.1/bin/config.log')

Comment 3 Adam Williamson 2016-12-06 19:21:14 UTC
could we just revert the redhat-rpm-config change and rebuild all packages built since that change for now, to unbreak things, and then re-consider this change at our leisure?

Comment 4 Lukas Slebodnik 2016-12-06 21:43:02 UTC
(In reply to Adam Williamson from comment #3)
> could we just revert the redhat-rpm-config change and rebuild all packages
> built since that change for now, to unbreak things, and then re-consider
> this change at our leisure?

I do not see a reason; there are already available patches which fixes configure time detection of features for samba libraries. Patches will unblock rebuilding of libtdb and libldb. But fedora prefers upstream first.

Comment 5 Adam Williamson 2016-12-07 00:09:13 UTC
Well, as Florian said in 1393492, this actually breaks all kinds of stuff, not just samba/ldb/tdb. I've reverted the change for now, as he said we should. I've also rebuilt ldb, tdb, gnome-shell, and sent retries of builds for several other packages that look like they failed due to this bug (either because of the changes themselves, or because they were missing tdb/ldb deps). Hopefully the next Rawhide compose should look quite a bit better, we'll see.

Comment 6 Lukas Slebodnik 2016-12-07 07:06:34 UTC
In this case you should move different ticket to ON_QA BZ1401228 which is filed against redhat-rpm-config.

Comment 7 Lukas Slebodnik 2016-12-07 07:08:17 UTC
I it submit too fast.
This BZ should track fixing of waf in samba to be more tolerant to stricter CFLAGS

Comment 8 Andreas Schneider 2016-12-12 09:34:33 UTC
Lukas. The patch you created, could you split it up into smaller commits and send them to samba-technical?

Comment 9 Lukas Slebodnik 2016-12-27 18:08:31 UTC
Done

Comment 10 Fedora End Of Life 2017-02-28 10:43:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 11 Fedora End Of Life 2018-05-03 08:16:53 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2018-05-29 11:29:11 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.