Bug 171150 - %rhbsys macro doesn't strip all hyphens from hostname
Summary: %rhbsys macro doesn't strip all hyphens from hostname
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 4
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-18 19:03 UTC by Charles R. Anderson
Modified: 2015-01-04 22:22 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2005-11-28 23:26:39 UTC


Attachments (Terms of Use)

Description Charles R. Anderson 2005-10-18 19:03:30 UTC
Description of problem:

The %rhbsys macro in the spec file tries to remove hyphens from the hostname of
the system on which the kernel is being built, but it fails to remove more than
one hyphen in a hostname that contains two or more hyphens.

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

2.6.13-1.1526_FC4

Actual results:

> hostname -s
some-hostname-with-many-hyphens
...
kernel-2.6.13-1.1526_FC4.cra@somehostname-with-many-hyphens.i686.rpm

Expected results:

> hostname -s
some-hostname-with-many-hyphens
...
kernel-2.6.13-1.1526_FC4.cra@somehostnamewithmanyhyphens.i686.rpm

Additional info:

The fix is to add a 'g' to the end of the sed pattern:

%define rhbsys  %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo
|| echo .`whoami`@`hostname -s|sed s/-//g`)

Comment 1 Dave Jones 2005-10-21 01:03:03 UTC
fixed in the errata that should go out tomorrow
(you can also get it from http://people.redhat.com/davej/kernels/Fedora/FC4/
before then)


Comment 2 Dave Jones 2005-11-10 19:43:31 UTC
2.6.14-1.1637_FC4 has been released as an update for FC4.
Please retest with this update, as a large amount of code has been changed in
this release, which may have fixed your problem.

Thank you.



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