Project

General

Profile

Actions

Bug #5651

closed

User story #5469: RHEL/CentOS 7 packages

SLES 11 packages on master/2.12 does not build due to missing dependencies

Added by Vincent MEMBRÉ over 9 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When building inventory-ldap package on master/2.12 an error occured on SLES 11:

06:08:20 rpmbuild --define "_topdir /usr/src/rudder-packages/package" --define "real_version 2.12.0.alpha1.git201410160421" -ba SPECS/*.spec
06:08:20 error: Failed build dependencies:
06:08:20     db4-devel is needed by rudder-inventory-ldap-2.12.0.alpha1.git201410160421-1.SLES.11.i586
06:08:20     libtool-ltdl-devel is needed by rudder-inventory-ldap-2.12.0.alpha1.git201410160421-1.SLES.11.i586
06:08:20 make: *** [buildpackage-rpm-build-rpmbuild] Error 1

I think Matthieu is the best to handle this.

Actions #1

Updated by Vincent MEMBRÉ over 9 years ago

  • Project changed from Rudder to 34
Actions #2

Updated by Matthieu CERDA over 9 years ago

  • Status changed from New to In progress
  • Priority changed from 2 to 1
  • Target version deleted (140)

That's a good one you got there, the SPEC conditions are wrong in there...

In a SPECfile, 0%{? on a macro means: "if the macro cannot be expanded, return 0 instead"

0 on a simple if means false, so it's OK.

0 on an integer comparison, well.. means 0, which is obviously less than anything else than itself.

So:

%if 0%{?sles_version} == 11
BuildRequires: libdb-4_5-devel libopenssl-devel
Requires: libdb-4_5
%endif

=> Condition OK (on rhel, will expand to 0, but we compare on an EXACT number.)

%if 0%{?rhel} < 7
BuildRequires: db4-devel openssl-devel libtool-ltdl-devel
Requires: db4
%endif

=> Fail, on SLES it will expand to 0. 0 is less that 7, so the condition is verified, and the (wrong) dependencies are applied...

Searching where do we have these...

Actions #3

Updated by Matthieu CERDA over 9 years ago

  • Target version set to 140

Problem is only on master :)

Actions #4

Updated by Matthieu CERDA over 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Benoît PECCATTE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/505
Actions #5

Updated by Matthieu CERDA over 9 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:fe9cfeb32828d557fd3475edce67443cfd9c1a34.

Actions #6

Updated by Jonathan CLARKE over 9 years ago

Applied in changeset commit:cb6e569cbc496631a28960d02e4539e568ce152e.

Actions #7

Updated by Matthieu CERDA over 9 years ago

  • Target version changed from 140 to 3.0.0~beta1
Actions #8

Updated by Vincent MEMBRÉ over 9 years ago

  • Project changed from 34 to Rudder
  • Parent task set to #5469
Actions #9

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.0.0~beta1 which was release on 01/12/2014.

Actions #10

Updated by Benoît PECCATTE about 9 years ago

  • Category set to Packaging
Actions

Also available in: Atom PDF