Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1543853

Summary: net-snmp: Fedora build flags only partially applied
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: net-snmpAssignee: Josef Ridky <jridky>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: jridky, jsafrane, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: net-snmp-5.8-3.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-02 08:25:58 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-02-09 12:28:42 UTC
net-snmp-5.7.3-33.fc28 does not fully apply the Fedora build flags from redhat-rpm-config.  Specifically, /usr/bin/snmpget and other programs are not linked as PIE:

# eu-readelf -h /usr/bin/snmpget
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Ident Version:                     1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           AMD x86-64
  Version:                           1 (current)
  Entry point address:               0x401180
  Start of program headers:          64 (bytes into file)
  Start of section headers:          9808 (bytes into file)
  Flags:                             
  Size of this header:               64 (bytes)
  Size of program header entries:    56 (bytes)
  Number of program headers entries: 11
  Size of section header entries:    64 (bytes)
  Number of section headers entries: 29
  Section header string table index: 28

The type should be DYN, not EXEC.

More information about RPM macros to set CFLAGS and LDFLAGS is available here:
https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md

Comment 1 Fedora End Of Life 2018-02-20 15:23:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Fedora Update System 2018-11-30 08:27:35 UTC
net-snmp-5.8-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b60fdc1998

Comment 3 Fedora Update System 2018-11-30 08:27:48 UTC
net-snmp-5.8-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-042156f164

Comment 4 Fedora Update System 2018-12-01 01:37:42 UTC
net-snmp-5.8-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b60fdc1998

Comment 5 Fedora Update System 2018-12-01 02:42:21 UTC
net-snmp-5.8-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-042156f164

Comment 6 Fedora Update System 2018-12-02 08:25:58 UTC
net-snmp-5.8-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.