Bug 1440251 - Building of rhsmcertd is broken at RHEL
Summary: Building of rhsmcertd is broken at RHEL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-07 16:54 UTC by Jiri Hnidek
Modified: 2017-08-01 19:22 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.19.7-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:22:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1579 None None None 2017-04-11 11:07:34 UTC
Red Hat Bugzilla 1435013 None None None Never
Red Hat Product Errata RHBA-2017:2083 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Internal Links: 1435013

Description Jiri Hnidek 2017-04-07 16:54:01 UTC
Description of problem:
When I tried to build subscription-manager using make, then build of rhsmcertd.c failed with build error.


Version-Release number of selected component (if applicable):

git master
commit: c3b5f85f4f84a88134bd0308f9b0fb13e5c8298c

How reproducible:
At RedHat/CentOS 7 git clone/pull subscription-manager and try to build it

Steps to Reproduce:
1. git clone git@github.com:candlepin/subscription-manager.git
2. make

Actual results:

cc -g -Wall  `pkg-config --cflags --libs glib-2.0` src/daemons/rhsmcertd.c -o bin/rhsmcertd
src/daemons/rhsmcertd.c: In function ‘main’:
src/daemons/rhsmcertd.c:528:47: error: ‘SYS_getrandom’ undeclared (first use in this function)
                 getrandom_num_bytes = syscall(SYS_getrandom, &seed, sizeof(unsigned long int), 0);
                                               ^
src/daemons/rhsmcertd.c:528:47: note: each undeclared identifier is reported only once for each function it appears in
src/daemons/rhsmcertd.c:534:47: warning: statement with no effect [-Wunused-value]
         initial_delay = INITIAL_DELAY_SECONDS + offset;
                                               ^
make: *** [rhsmcertd] Error 1


Additional info:
The getrandom() or SYS_getrandom can be used at Linux with kernel >= 3.17.0. This is not case of RHEL 5/6/7.

Comment 2 John Sefler 2017-04-10 18:16:08 UTC
This bug was introduced by the implementation of RFE Bug 1435013 and currently blocks 1435013 from being testable.

Comment 4 Rehana 2017-05-22 10:28:09 UTC
Reproducing the failure on : 
==========================

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

#  git checkout 4f78930f7ed2be3ad26fd8a9cc7447d01f6dafaa
Note: checking out '4f78930f7ed2be3ad26fd8a9cc7447d01f6dafaa'. 

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 4f78930... 1435013: Add splay to all checks done by rhsmcertd

# git status
# HEAD detached at 4f78930
nothing to commit, working directory clean

# make
cc -g -Wall  `pkg-config --cflags --libs glib-2.0` src/daemons/rhsmcertd.c -o bin/rhsmcertd
src/daemons/rhsmcertd.c: In function ‘main’:
src/daemons/rhsmcertd.c:528:47: error: ‘SYS_getrandom’ undeclared (first use in this function)
                 getrandom_num_bytes = syscall(SYS_getrandom, &seed, sizeof(unsigned long int), 0);
                                               ^
src/daemons/rhsmcertd.c:528:47: note: each undeclared identifier is reported only once for each function it appears in
src/daemons/rhsmcertd.c:534:47: warning: statement with no effect [-Wunused-value]
         initial_delay = INITIAL_DELAY_SECONDS + offset;
                                               ^
make: *** [rhsmcertd] Error 1

with latest checkout from master : 
===================================

#  git checkout master
Already on 'master'

# git status
# On branch master
nothing to commit, working directory clean

# make
cc -g -Wall `pkg-config --cflags glib-2.0` -DLIBEXECDIR='"/usr/libexec"' src/daemons/rhsmcertd.c -o bin/rhsmcertd  `pkg-config --libs glib-2.0`
cc -g -Wall `pkg-config --cflags "gtk+-3.0 libnotify gconf-2.0 dbus-glib-1"` src/rhsm_icon/rhsm_icon.c -o bin/rhsm-icon  `pkg-config --libs "gtk+-3.0 libnotify gconf-2.0 dbus-glib-1"`
./setup.py clean --all
running clean
'build/lib' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
./setup.py build --quiet --gtk-version=3 --rpm-version=1.20.0-1-33-g148fe8d
running build
running build_py
Building with GTK_VERSION=3 and RPM_VERSION=1.20.0-1-33-g148fe8d
creating build/lib
creating build/lib/rct
copying src/rct/__init__.py -> build/lib/rct
copying src/rct/cert_commands.py -> build/lib/rct
copying src/rct/cli.py -> build/lib/rct
copying src/rct/commands.py -> build/lib/rct
copying src/rct/manifest_commands.py -> build/lib/rct
copying src/rct/printing.py -> build/lib/rct
copying src/rct/version.py -> build/lib/rct
creating build/lib/rhsm_debug
copying src/rhsm_debug/__init__.py -> build/lib/rhsm_debug
copying src/rhsm_debug/cli.py -> build/lib/rhsm_debug
copying src/rhsm_debug/debug_commands.py -> build/lib/rhsm_debug
creating build/lib/rhsmlib
copying src/rhsmlib/__init__.py -> build/lib/rhsmlib
creating build/lib/subscription_manager
copying src/subscription_manager/__init__.py -> build/lib/subscription_manager
copying src/subscription_manager/action_client.py -> build/lib/subscription_manager
copying src/subscription_manager/async.py -> build/lib/subscription_manager
copying src/subscription_manager/base_action_client.py -> build/lib/subscription_manager
copying src/subscription_manager/base_plugin.py -> build/lib/subscription_manager
copying src/subscription_manager/cert_sorter.py -> build/lib/subscription_manager
copying src/subscription_manager/certlib.py -> build/lib/subscription_manager
copying src/subscription_manager/cli.py -> build/lib/subscription_manager
copying src/subscription_manager/content_action_client.py -> build/lib/subscription_manager
copying src/subscription_manager/cpuinfo.py -> build/lib/subscription_manager
copying src/subscription_manager/dbus_interface.py -> build/lib/subscription_manager
copying src/subscription_manager/entbranding.py -> build/lib/subscription_manager
copying src/subscription_manager/exceptions.py -> build/lib/subscription_manager
copying src/subscription_manager/factlib.py -> build/lib/subscription_manager
copying src/subscription_manager/file_monitor.py -> build/lib/subscription_manager
copying src/subscription_manager/ga_loader.py -> build/lib/subscription_manager
copying src/subscription_manager/healinglib.py -> build/lib/subscription_manager
copying src/subscription_manager/i18n.py -> build/lib/subscription_manager
copying src/subscription_manager/i18n_optparse.py -> build/lib/subscription_manager
copying src/subscription_manager/identity.py -> build/lib/subscription_manager
copying src/subscription_manager/identitycertlib.py -> build/lib/subscription_manager
copying src/subscription_manager/installedproductslib.py -> build/lib/subscription_manager
copying src/subscription_manager/isodate.py -> build/lib/subscription_manager
copying src/subscription_manager/jsonwrapper.py -> build/lib/subscription_manager
copying src/subscription_manager/listing.py -> build/lib/subscription_manager
copying src/subscription_manager/lock.py -> build/lib/subscription_manager
copying src/subscription_manager/overrides.py -> build/lib/subscription_manager
copying src/subscription_manager/packageprofilelib.py -> build/lib/subscription_manager
copying src/subscription_manager/plugins.py -> build/lib/subscription_manager
copying src/subscription_manager/printing_utils.py -> build/lib/subscription_manager
copying src/subscription_manager/productid.py -> build/lib/subscription_manager
copying src/subscription_manager/reasons.py -> build/lib/subscription_manager
copying src/subscription_manager/release.py -> build/lib/subscription_manager
copying src/subscription_manager/rhelentbranding.py -> build/lib/subscription_manager
copying src/subscription_manager/rhelproduct.py -> build/lib/subscription_manager
copying src/subscription_manager/utils.py -> build/lib/subscription_manager
copying src/subscription_manager/validity.py -> build/lib/subscription_manager
copying src/subscription_manager/version.py -> build/lib/subscription_manager
copying src/subscription_manager/cache.py -> build/lib/subscription_manager
copying src/subscription_manager/certdirectory.py -> build/lib/subscription_manager
copying src/subscription_manager/cp_provider.py -> build/lib/subscription_manager
copying src/subscription_manager/entcertlib.py -> build/lib/subscription_manager
copying src/subscription_manager/facts.py -> build/lib/subscription_manager
copying src/subscription_manager/injection.py -> build/lib/subscription_manager
copying src/subscription_manager/injectioninit.py -> build/lib/subscription_manager
copying src/subscription_manager/logutil.py -> build/lib/subscription_manager
copying src/subscription_manager/managercli.py -> build/lib/subscription_manager
copying src/subscription_manager/managerlib.py -> build/lib/subscription_manager
copying src/subscription_manager/repolib.py -> build/lib/subscription_manager
creating build/lib/rhsmlib/candlepin
copying src/rhsmlib/candlepin/__init__.py -> build/lib/rhsmlib/candlepin
copying src/rhsmlib/candlepin/api.py -> build/lib/rhsmlib/candlepin
creating build/lib/rhsmlib/compat
copying src/rhsmlib/compat/__init__.py -> build/lib/rhsmlib/compat
copying src/rhsmlib/compat/subprocess_compat.py -> build/lib/rhsmlib/compat
creating build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/__init__.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/base_object.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/constants.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/dbus_utils.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/exceptions.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/server.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/service_wrapper.py -> build/lib/rhsmlib/dbus
copying src/rhsmlib/dbus/util.py -> build/lib/rhsmlib/dbus
creating build/lib/rhsmlib/facts
copying src/rhsmlib/facts/__init__.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/cleanup.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/collection.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/cpuinfo.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/firmware_info.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/all.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/collector.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/custom.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/dmiinfo.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/host_collector.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/hwprobe.py -> build/lib/rhsmlib/facts
copying src/rhsmlib/facts/virt.py -> build/lib/rhsmlib/facts
creating build/lib/rhsmlib/services
copying src/rhsmlib/services/__init__.py -> build/lib/rhsmlib/services
copying src/rhsmlib/services/config.py -> build/lib/rhsmlib/services
creating build/lib/subscription_manager/api
copying src/subscription_manager/api/__init__.py -> build/lib/subscription_manager/api
copying src/subscription_manager/api/repos.py -> build/lib/subscription_manager/api
creating build/lib/subscription_manager/branding
copying src/subscription_manager/branding/__init__.py -> build/lib/subscription_manager/branding
copying src/subscription_manager/branding/redhat_branding.py -> build/lib/subscription_manager/branding
creating build/lib/subscription_manager/gui
copying src/subscription_manager/gui/__init__.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/allsubs.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/autobind.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/contract_selection.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/filter.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/importsub.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/installedtab.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/messageWindow.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/mysubstab.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/networkConfig.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/preferences.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/progress.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/redeem.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/reposgui.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/storage.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/utils.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/widgets.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/about.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/factsgui.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/managergui.py -> build/lib/subscription_manager/gui
copying src/subscription_manager/gui/registergui.py -> build/lib/subscription_manager/gui
creating build/lib/subscription_manager/migrate
copying src/subscription_manager/migrate/__init__.py -> build/lib/subscription_manager/migrate
copying src/subscription_manager/migrate/migrate.py -> build/lib/subscription_manager/migrate
creating build/lib/subscription_manager/model
copying src/subscription_manager/model/__init__.py -> build/lib/subscription_manager/model
copying src/subscription_manager/model/ent_cert.py -> build/lib/subscription_manager/model
creating build/lib/subscription_manager/plugin
copying src/subscription_manager/plugin/__init__.py -> build/lib/subscription_manager/plugin
copying src/subscription_manager/plugin/container.py -> build/lib/subscription_manager/plugin
creating build/lib/rhsmlib/dbus/facts
copying src/rhsmlib/dbus/facts/__init__.py -> build/lib/rhsmlib/dbus/facts
copying src/rhsmlib/dbus/facts/client.py -> build/lib/rhsmlib/dbus/facts
copying src/rhsmlib/dbus/facts/base.py -> build/lib/rhsmlib/dbus/facts
copying src/rhsmlib/dbus/facts/constants.py -> build/lib/rhsmlib/dbus/facts
creating build/lib/rhsmlib/dbus/objects
copying src/rhsmlib/dbus/objects/__init__.py -> build/lib/rhsmlib/dbus/objects
copying src/rhsmlib/dbus/objects/config.py -> build/lib/rhsmlib/dbus/objects
copying src/rhsmlib/dbus/objects/main.py -> build/lib/rhsmlib/dbus/objects
copying src/rhsmlib/dbus/objects/register.py -> build/lib/rhsmlib/dbus/objects
creating build/lib/subscription_manager/gui/data
creating build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/activation_key.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/allsubs.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/choose_server.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/confirmsubs.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/contract_selection.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/credentials.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/done_box.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/environment.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/filters.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/installed.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/mainwindow.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/manually_subscribe.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/mysubs.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/networkConfig.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/organization.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/preferences.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/progress.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/redeem.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/register_dialog.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/registration.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/registration_info.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/repositories.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/selectsla.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/subdetails.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/subdetailscontract.glade -> build/lib/subscription_manager/gui/data/glade
copying src/subscription_manager/gui/data/glade/factsdialog.glade -> build/lib/subscription_manager/gui/data/glade
creating build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/activation_key.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/allsubs.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/choose_server.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/confirmsubs.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/contract_selection.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/credentials.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/done_box.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/environment.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/filters.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/installed.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/mainwindow.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/manually_subscribe.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/mysubs.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/networkConfig.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/organization.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/preferences.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/progress.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/redeem.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/register_dialog.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/registration.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/registration_info.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/repositories.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/selectsla.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/subdetailscontract.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/factsdialog.ui -> build/lib/subscription_manager/gui/data/ui
copying src/subscription_manager/gui/data/ui/subdetails.ui -> build/lib/subscription_manager/gui/data/ui
creating build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/expiring.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/invalid.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/partial.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/system-physical-symbolic.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/system-virtual-symbolic.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/unknown.svg -> build/lib/subscription_manager/gui/data/icons
copying src/subscription_manager/gui/data/icons/valid.svg -> build/lib/subscription_manager/gui/data/icons
running build_trans
running build_template


Make is successfully completed, hence moving the bug to verified!!

Comment 5 errata-xmlrpc 2017-08-01 19:22:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083


Note You need to log in before you can comment on or make changes to this bug.