RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1638396 - rebuild fails if DISTRO variable is exported
Summary: rebuild fails if DISTRO variable is exported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: realmd
Version: 7.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks: 1747454
TreeView+ depends on / blocked
 
Reported: 2018-10-11 13:04 UTC by Karel Srot
Modified: 2020-09-29 20:35 UTC (History)
3 users (show)

Fixed In Version: realmd-0.16.1-12.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1747454 (view as bug list)
Environment:
Last Closed: 2020-09-29 20:35:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4014 0 None None None 2020-09-29 20:35:45 UTC

Description Karel Srot 2018-10-11 13:04:26 UTC
Description of problem:

I had find out that having variable DISTRO set in the environment would break realmd rebuild.

Version-Release number of selected component (if applicable):
realmd-0.16.1-11.el7.src.rpm

How reproducible:
# export DISTRO=foo
# rpmbuild --rebuild realmd-0.16.1-11.el7.src.rpm
...
...
/usr/bin/install -c -m 644 ./service/realmd-foo.conf /root/rpmbuild/BUILDROOT/realmd-0.16.1-11.el7.x86_64/usr/lib64/realmd/realmd-distro.conf
/usr/bin/install: cannot stat './service/realmd-foo.conf': No such file or directory
make[3]: *** [install-service] Error 1
make[3]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.yGUro6 (%install)

I do not know what is the exact purpose of this variable in the MAKEFILE so probably the result is expected. I did identify this bug accidentally due to a conflict with our test environment that exports this variable.

Comment 1 Sumit Bose 2018-10-11 14:59:07 UTC
This is an interaction with the configure script which uses DISTRO as a variable, too:

# Distro Detection

AC_ARG_WITH([distro],
            [AS_HELP_STRING([--with-distro],
                            [Configure for a specific distribution (eg: redhat)]
                           )],
            [DISTRO=$withval])

if test -z $DISTRO; then
    AC_CHECK_FILE(/etc/redhat-release, [DISTRO="redhat"])
    AC_CHECK_FILE(/etc/debian_version, [DISTRO="debian"])
    AC_CHECK_FILE(/etc/SuSE-release, [DISTRO="suse"])

    # Not customized for these yet
    dnl AC_CHECK_FILE(/etc/gentoo-release, [DISTRO="gentoo"])
    dnl AC_CHECK_FILE(/etc/slackware-version, [DISTRO="slackware"])

fi

if test -z $DISTRO; then
    AC_MSG_ERROR([Couldn't detect the distro to configure for. Specify one with --with-distro])
fi

AC_SUBST(DISTRO)


So if DISTRO is set and --with-distro is not used when calling configure the value of DISTRO is used in the Makefile to select the distribution specific defaults.

Comment 2 Sumit Bose 2019-11-28 17:59:27 UTC
Master:
 - 506887297ea33339d8ad8b274be643d220bf22f8

Comment 5 shridhar 2020-06-01 12:17:00 UTC
Tested with

~]# yum install automake autoconf intltool gettext-devel glib2-devel openldap-devel polkit-devel krb5-devel systemd-devel xmlto -y
~]# yum install gcc -y
~]# yum install glibc-devel

blade-12 ~]# rpmbuild --rebuild realmd-0.16.1-12.el7.src.rpm 
Installing realmd-0.16.1-12.el7.src.rpm
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root

[....]

PASS: test-settings 1 /realmd/settings/string
PASS: test-settings 2 /realmd/settings/double
PASS: test-settings 3 /realmd/settings/boolean
make[5]: Entering directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make  all-recursive
make[6]: Entering directory `/root/rpmbuild/BUILD/realmd-0.16.1'
Making all in po
make[7]: Entering directory `/root/rpmbuild/BUILD/realmd-0.16.1/po'
make[7]: Nothing to be done for `all'.
make[7]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1/po'
make[7]: Entering directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[7]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[6]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[5]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
============================================================================
Testsuite summary for realmd 0.16.1
============================================================================
# TOTAL: 101
# PASS:  101
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[4]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[3]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[2]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
make[1]: Leaving directory `/root/rpmbuild/BUILD/realmd-0.16.1'
+ exit 0
Processing files: realmd-0.16.1-12.el7.x86_64

[....]

Wrote: /root/rpmbuild/RPMS/x86_64/realmd-debuginfo-0.16.1-12.el7.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.Q98wT6
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd realmd-0.16.1
+ /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/realmd-0.16.1-12.el7.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.MVIY2C
+ umask 022
+ cd /root/rpmbuild/BUILD
+ rm -rf realmd-0.16.1
+ exit 0
[root@qe-blade-12 ~]# 


Marking verified.

Comment 7 errata-xmlrpc 2020-09-29 20:35:34 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 (realmd bug fix and enhancement update), 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-2020:4014


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