Bug 197281 - unescaped RPM macros place excessive garbage text and misleading info into changelog
unescaped RPM macros place excessive garbage text and misleading info into ch...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xorg-x11-server (Show other bugs)
5
All Linux
medium Severity low
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
: 197283 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-29 16:53 EDT by Moritz Barsnick
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-30 05:24:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Moritz Barsnick 2006-06-29 16:53:15 EDT
Description of problem:
In the SPEC file, there are unescaped RPM macros, presumably "%version" and 
"%makeinstall". These are unfortunately expanded in the changelog (rpm -qp --
changelog $file.rpm), and are a bit annoying or misleading

Version-Release number of selected component (if applicable):
1.0.1-9.FC5.4

How reproducible:
Always

Steps to Reproduce:
1. rpm -qp --changelog xorg-x11-server-Xorg-1.0.1-9.FC5.4.i386.rpm

Actual results:
a)
* Thu Dec 22 2005 Mike A. Harris <mharris@redhat.com> 1.0.0-3
- Added "Provides: libxf86config-devel = 1.0.1-9.FC5.4" to sdk package.

b)
* Wed Aug 31 2005 Kristian Hogsberg <krh@redhat.com> 0.99.1-2.cvs20050830
- Go back to %spec -n, use new cvs snapshot that supports overriding
  moduledir during make install, use
  /usr/bin/make \
        prefix=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr \
        exec_prefix=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr 
\
        bindir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/bin 
\        sbindir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
sbin \
        sysconfdir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/etc 
\        datadir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
share \
        includedir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
include \
        libdir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/lib 
\        libexecdir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
libexec \
        localstatedir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/
var \
        sharedstatedir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/
usr/com \
        mandir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
share/man \
        infodir=/var/tmp/xorg-x11-server-1.0.1-9.FC5.4-root-brewbuilder/usr/
share/info \
  install.

Expected results:
a)
* Thu Dec 22 2005 Mike A. Harris <mharris@redhat.com> 1.0.0-3
- Added "Provides: libxf86config-devel = %version" to sdk package.

b)
* Wed Aug 31 2005 Kristian Hogsberg <krh@redhat.com> 0.99.1-2.cvs20050830
- Go back to %spec -n, use new cvs snapshot that supports overriding
  moduledir during make install, use %makeinstall.

Additional info:
These changelog entries change with every new build of the package. That's 
basically wrong in case a).

Case b) is just ... amusing? Annoying? Long?

Please always do % -> %% in the changelog section.

*****
BTW:

Preparing packages for installation...
        package xorg-x11-server-Xorg-1.0.1-9.fc5.1.1 (which is newer than xorg-
x11-server-Xorg-1.0.1-9.FC5.4) is already installed

Darn! You capitalized a relevant letter in the %{version} without bumping the 
epoch! ;-) Shall I file this against the component "rpm"? (Does it have any 
side effects on yum? I coincidentally selected to download the Update RPMs this 
time, and didn't use yum.)
Comment 1 Moritz Barsnick 2006-06-29 17:04:08 EDT
*** Bug 197283 has been marked as a duplicate of this bug. ***
Comment 2 Mike A. Harris 2006-06-30 05:24:58 EDT
These are of course inadvertent errors.  Since macro preprocessing happens
before anything else, rpm expands all macros everywhere without knowing
or caring what section of the spec file they're in.

Unfortunately us humans are used to brain-parsing the spec file in
sections, and the changelog is a text section.  ;o) 

Since to err is human, occasionally a spec file macro gets used in the
%changelog or %description sections or elsewhere that is inappropriate.  ;oP

I've fixed the problems in the X server spec file in CVS now, and have
sent a short email note to our internal development mailing lists to
remind everyone (including myself) of this common glitch.

Thanks for the report.  I'm releasing a new update to fix this issue.
Comment 3 Moritz Barsnick 2006-07-04 11:44:57 EDT
Thanks, resolution accepted. ;-)

BTW, my "BTW" remark in comment #0 regarding the "newer than" problem was 
reported separately in bug #197266 and of course also properly fixed. If you 
can point me to where these packaging guidelines are documented, I'll submit an 
RFE for rpmlint. :-) (I know I have some other packaging stuff--common gripes 
of mine--which might be "nice to have" guidelines.)

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