Bug 597601 - xorg-x11-fonts SRPM fails to build if user's shell is sh or ksh
Summary: xorg-x11-fonts SRPM fails to build if user's shell is sh or ksh
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-fonts (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Peter Hutterer
QA Contact: Desktop QE
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks: 842499
TreeView+ depends on / blocked
 
Reported: 2010-05-29 18:18 UTC by Quentin Barnes
Modified: 2015-11-18 05:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-18 05:45:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Quentin Barnes 2010-05-29 18:18:33 UTC
Description of problem:
The RHEL6Beta xorg-x11-fonts SRPM (xorg-x11-fonts-7.2-9.1.el6.src.rpm)
fails to build when using /bin/sh or /bin/ksh as the user's shell.
The xorg-x11-fonts.spec file has a bashism in it making the build
fail.  The bash redicection operator "&>" is unique to bash and its
use may cause other shells to fail.

I was surprised that the user's personal shell could affect the
outcome of an rpmbuild's spec file.  Hmmmm.  Maybe that's a more
serious problem.

Version-Release number of selected component (if applicable):
xorg-x11-fonts-7.2-9.1.el6


How reproducible:
100%

Steps to Reproduce:
1.  Extract the source RPM then build with either:
SHELL=/bin/sh rpmbuild -bb xorg-x11-fonts.spec
or
SHELL=/bin/ksh rpmbuild -bb xorg-x11-fonts.spec
2.
3.
  
Actual results:
From either /bin/ksh or /bin/sh build:
==========
SHELL=/bin/sh rpmbuild -bb --define "_topdir /home/qbarnes/lsrc/RedHat6Beta/topdir" SPECS/xorg-x11-fonts.spec
[...]
+ ENCODINGSDIR=/home/qbarnes/lsrc/RedHat6Beta/topdir/BUILDROOT/xorg-x11-fonts-7.2-9.1.el6.x86_64/usr/share/X11/fonts/encodings
+ pushd /home/qbarnes/lsrc/RedHat6Beta/topdir/BUILDROOT/xorg-x11-fonts-7.2-9.1.el6.x86_64/usr/share/X11/fonts/encodings
/var/tmp/rpm-tmp.C7Mh6J: line 58: pushd: /home/qbarnes/lsrc/RedHat6Beta/topdir/BUILDROOT/xorg-x11-fonts-7.2-9.1.el6.x86_64/usr/share/X11/fonts/encodings: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.C7Mh6J (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.C7Mh6J (%install)
==========

Expected results:
==========
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.bMnfeG
+ umask 022
+ cd /home/qbarnes/lsrc/RedHat6Beta/topdir/BUILD
+ cd xorg-x11-fonts-7.2
+ rm -rf /home/qbarnes/lsrc/RedHat6Beta/topdir/BUILDROOT/xorg-x11-fonts-7.2-9.1.el6.x86_64
+ exit 0
==========


Additional info:

To fix, just remove " &> /dev/null" from lines 380 and 384 in the
xorg-x11-fonts.spec file:
--- xorg-x11-fonts.spec-dist	2009-12-08 09:40:53.000000000 -0600
+++ xorg-x11-fonts.spec	2010-05-29 13:10:36.000000000 -0500
@@ -377,11 +377,11 @@
 # https://bugs.freedesktop.org/show_bug.cgi?id=6028
 {
     ENCODINGSDIR=$RPM_BUILD_ROOT%{_datadir}/X11/fonts/encodings
-    pushd "${ENCODINGSDIR}" &> /dev/null
+    pushd "${ENCODINGSDIR}"
     mkfontscale -n -e "${ENCODINGSDIR}" -e "${ENCODINGSDIR}/large"
     sed -i "s@$RPM_BUILD_ROOT@@" encodings.dir
     sed -i "s@$RPM_BUILD_ROOT@@" large/encodings.dir
-    popd &> /dev/null
+    popd
 }

Comment 5 RHEL Product and Program Management 2010-06-07 16:02:35 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 RHEL Product and Program Management 2010-07-15 14:26:09 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 8 RHEL Product and Program Management 2011-01-07 15:44:39 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 10 Suzanne Yeghiayan 2012-02-14 22:59:32 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 11 Peter Hutterer 2015-11-18 05:45:11 UTC
Closing, this is not something we will fix in this package for RHEL6. The appropriate fix for this issue would be at the rpmbuild level, but at this stage in the RHEL6 lifecycle this bug is unlikely to be fixed at that level.

If you would like Red Hat to re-consider your feature request, please re-open the feature request via appropriate support channels and provide additional supporting details about the importance of this feature.


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