Bug 5285 - Investigate use of deprecated spec-file directives in our build system
Summary: Investigate use of deprecated spec-file directives in our build system
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.4.0
Assignee: Karl Mikaelsson
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks:
 
Reported: 2014-10-09 10:40 CEST by Aaron Sowry
Modified: 2015-04-28 17:23 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Aaron Sowry cendio 2014-10-09 10:40:33 CEST
The use of "%define noPayloadPrefix" has had potential real-world implications[1] on modern systems, for example. According to [2], this feature was removed in the latest version of RPM and was apparently only present for compatibility with rpm < 3.0.5 anyway (which is prehistoric, I don't think even RHEL5 uses anything this old).

We should investigate to make sure that this and other deprecated directives are removed from our build system, and that the resulting RPM packages are compliant with a modern version of the RPM spec.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1122004
[2] http://www.rpm.org/wiki/Releases/4.12.0
Comment 1 Peter Åstrand cendio 2014-10-09 11:04:15 CEST
We must stay compatible with LSB. This means, for example, that we must use package format version 3:

http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pkgformat.html:

major	 	

Value indicating the major version number of the file format version. This value shall be 3.
Comment 2 Karl Mikaelsson cendio 2015-02-06 10:11:58 CET
We don't only have to be compatible with LSB, we also have to be compatible with the eLux bastardized RPM format. Looking at LSB, it allows for a few things we disable:

> rpmlib(VersionedDependencies)	3.0.3-1
> rpmlib(PayloadFilesHavePrefix)4.0-1
> rpmlib(CompressedFileNames)	3.0.4-1
Comment 3 Karl Mikaelsson cendio 2015-02-06 10:11:58 CET
We don't only have to be compatible with LSB, we also have to be compatible with the eLux bastardized RPM format. Looking at LSB, it allows for a few things we disable:

> rpmlib(VersionedDependencies)	3.0.3-1
> rpmlib(PayloadFilesHavePrefix)4.0-1
> rpmlib(CompressedFileNames)	3.0.4-1
Comment 4 Karl Mikaelsson cendio 2015-02-06 10:12:57 CET
Will still need to investigate what features is OK for use with eLux packages.
Comment 5 Karl Mikaelsson cendio 2015-02-10 12:44:16 CET
(In reply to comment #3)
> rpmlib(VersionedDependencies)
> rpmlib(PayloadFilesHavePrefix)
> rpmlib(CompressedFileNames)

An autotest that monitors installed (server) RPM packages for rpmlib dependencies outside of these three was committed as r29959.
Comment 6 Karl Mikaelsson cendio 2015-02-11 17:48:07 CET
(In reply to comment #0)
> The use of "%define noPayloadPrefix" has had potential real-world
> implications[1] on modern systems, for example. According to [2], this feature
> was removed in the latest version of RPM and was apparently only present for
> compatibility with rpm < 3.0.5 anyway (which is prehistoric, I don't think even
> RHEL5 uses anything this old).
> 
> We should investigate to make sure that this and other deprecated directives
> are removed from our build system, and that the resulting RPM packages are
> compliant with a modern version of the RPM spec.
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1122004
> [2] http://www.rpm.org/wiki/Releases/4.12.0

Removing "%define _noPayloadPrefix 1" from our spec files creates an additional dependency on "rpmlib(PayloadFilesHavePrefix) <= 4.0-1".

This dependency is allowed by LSB 4.1. In fact, it was allowed by LSB 1.3, which was released more than 12 years ago, in December of 2002.
Comment 7 Karl Mikaelsson cendio 2015-02-18 11:20:46 CET
My conclusion about this: We can safely remove the _noPayloadPrefix=1 line from the spec files of all our packages, except for eLux packages. I've added bug 5435 to track this incompatibility.
Comment 8 Karl Mikaelsson cendio 2015-02-19 11:21:16 CET
(In reply to comment #7)
> My conclusion about this: We can safely remove the _noPayloadPrefix=1 line from
> the spec files of all our packages, except for eLux packages. I've added bug
> 5435 to track this incompatibility.

I've also added bug 5439 for removing both _noPayloadPrefix and --nodirtokens from our spec files.

With that, I consider this investigation to be complete.
Comment 9 Pierre Ossman cendio 2015-04-28 17:23:59 CEST
Investigation looks good, and the autotest seems fine. Closing.

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