Project

General

Profile

Actions

Bug #928

closed

Dependency problem with f15 / foreman.noarch 0:0.3rc1-1

Added by D. Johnson over 13 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Packaging
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

New clean, bare install of F15, 'yum install foreman' after adding both stable and unstable repos:

Loaded plugins: downloadonly, etckeeper
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package foreman.noarch 0:0.3rc1-1 will be installed
--> Processing Dependency: rubygem(rake) >= 0.8.3 for package: foreman-0.3rc1-1.noarch
--> Processing Dependency: rubygem(json) for package: foreman-0.3rc1-1.noarch
--> Processing Dependency: rubygem(sqlite3-ruby) for package: foreman-0.3rc1-1.noarch
Package rubygem-sqlite3-ruby is obsoleted by rubygem-sqlite3, but obsoleting package does not provide for requirements
--> Processing Dependency: rubygem(rest-client) for package: foreman-0.3rc1-1.noarch
--> Running transaction check
---> Package foreman.noarch 0:0.3rc1-1 will be installed
--> Processing Dependency: rubygem(sqlite3-ruby) for package: foreman-0.3rc1-1.noarch
Package rubygem-sqlite3-ruby is obsoleted by rubygem-sqlite3, but obsoleting package does not provide for requirements
---> Package rubygem-json.x86_64 0:1.4.6-3.fc15 will be installed
---> Package rubygem-rake.noarch 0:0.9.0-0.3.beta.4.fc15 will be installed
---> Package rubygem-rest-client.noarch 0:1.6.1-2.fc15 will be installed
--> Processing Dependency: rubygem(mime-types) >= 1.16 for package: rubygem-rest-client-1.6.1-2.fc15.noarch
--> Running transaction check
---> Package foreman.noarch 0:0.3rc1-1 will be installed
--> Processing Dependency: rubygem(sqlite3-ruby) for package: foreman-0.3rc1-1.noarch
Package rubygem-sqlite3-ruby is obsoleted by rubygem-sqlite3, but obsoleting package does not provide for requirements
---> Package rubygem-mime-types.noarch 0:1.16-3.fc15 will be installed
--> Finished Dependency Resolution
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest


Files

0002-Patch-spec-file-to-work-with-Fedora-15.patch 0002-Patch-spec-file-to-work-with-Fedora-15.patch 925 Bytes Looks like wiki broke git patch, attaching as external file with git format-patch D. Johnson, 05/23/2011 11:03 AM
0003-Corrected-Requires-line-to-work-with-f15-and-C5.patch 0003-Corrected-Requires-line-to-work-with-f15-and-C5.patch 1019 Bytes Corrected patch for spec file. D. Johnson, 05/29/2011 04:29 PM
foreman.spec foreman.spec 8.34 KB full spec file D. Johnson, 06/22/2011 12:29 AM

Related issues 2 (0 open2 closed)

Is duplicate of Foreman - Bug #1190: RPM from repositories does not work on fresh Fedora 15Duplicate09/28/2011Actions
Is duplicate of Foreman - Bug #1661: Dependency problem with f16 / foreman.noarch 0:0.4.2-0.1 Resolved05/30/2012Actions
Actions #1

Updated by D. Johnson over 13 years ago

This should allow it to build on both RHEL systems (old package name) as well as Fedora 15+ systems:

diff --git a/extras/spec/foreman.spec b/extras/spec/foreman.spec
index 88af005..0afcc2e 100644
--- a/extras/spec/foreman.spec
++ b/extras/spec/foreman.spec
@ -18,7 +18,11 @ Requires: ruby(abi) = 1.8
Requires: rubygems
Requires: rubygem(rake) >= 0.8.3
Requires: puppet >= 0.24.4
if ! (0{?fedora} > 14 || 0%{?rhel} > 5)
Requires: rubygem(sqlite3)
%else
Requires: rubygem(sqlite3-ruby)
+%endif
Requires: rubygem(rest-client)
Requires: rubygem(json)
Requires(pre): shadow-utils

Actions #2

Updated by D. Johnson over 13 years ago

Looks like wiki broke git patch, attaching as external file with git format-patch

Actions #3

Updated by Ohad Levy over 13 years ago

  • Category set to Packaging
  • Target version set to 0.3
Actions #4

Updated by D. Johnson over 13 years ago

  • Status changed from New to Ready For Testing
  • % Done changed from 0 to 100
Actions #5

Updated by Ohad Levy over 13 years ago

  • Status changed from Ready For Testing to Feedback
  • Assignee set to D. Johnson

this does not seem to work on rhel5 :


--> Running transaction check
---> Package foreman.noarch 0:0.3rc2-2 set to be updated
--> Processing Dependency: rubygem(sqlite3) for package: foreman
---> Package foreman-proxy.noarch 0:0.2rc1-1 set to be updated
--> Finished Dependency Resolution
foreman-0.3rc2-2.noarch from foreman-testing has depsolving problems
  --> Missing Dependency: rubygem(sqlite3) is needed by package foreman-0.3rc2-2.noarch (foreman-testing)
Error: Missing Dependency: rubygem(sqlite3) is needed by package foreman-0.3rc2-2.noarch (foreman-testing)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
[root@infra ~]# yum upgrade --enablerepo=foreman-testing --enablerepo=foreman
[root@infra ~]# cat /etc/issue
CentOS release 5.6 (Final)
Kernel \r on an \m
Actions #6

Updated by D. Johnson over 13 years ago

on that system, can you run this command please?

rpm --eval 'F = 0%{?fedora} EL = 0%{?rhel}'

It should return something like: F = 0 EL = 05

Actions #8

Updated by Ohad Levy over 13 years ago

  • Target version changed from 0.3 to 0.4
Actions #9

Updated by Robin Powell over 13 years ago

I am currently having this problem with the foreman repo (see http://pastie.org/private/udydkbocjfqsss3yvmfpg for the actual error output).

The output of the requested rpm command is:

root# rpm --eval 'F = 0%{?fedora} EL = 0%{?rhel}'
F = 015 EL = 0

Is there a way I can work around this now?

-Robin

Actions #10

Updated by D. Johnson over 13 years ago

Here is the .spec file diff:

% diff u ../foreman.spec foreman.spec
--
../foreman.spec 2011-06-07 02:55:10.000000000 -0500
+++ foreman.spec 2011-06-21 23:15:35.578125407 -0500
@ -3,13 +3,13 @

Name:           foreman
Version: 0.3
-Release: 1
+Release: 1%{?dist}
Summary: Systems Management web application
Group:          Applications/System
License: GPLv3+
URL: http://theforeman.org
Source0: http://github.com/ohadlevy/%{name}/tarball/%{name}-0.3.tar.bz2
+Source0: http://github.com/ohadlevy/%{name}/tarball/%{name}
.tar.bz2
BuildRoot: %{_tmppath}/
{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
@ -18,7 +18,11 @
Requires: rubygems
Requires: rubygem(rake) >= 0.8.3
Requires: puppet >= 0.24.4
-Requires: rubygem(sqlite3-ruby)
if (0{?fedora} > 14 || 0%{?rhel} > 6)
+Requires: rubygem(sqlite3)
%else
Requires: rubygem(sqlite3-ruby)
%endif
Requires: rubygem(rest-client)
Requires: rubygem(json)
Requires(pre): shadow-utils

RPM test files, located at http://fenris02.fedorapeople.org/foreman/

Please let me know if they work for you. (Both f15 and el5 are there, choose the one that matches your install)

Actions #11

Updated by D. Johnson over 13 years ago

Erg. Redmine ate the diff, that did not work out.

Affected line should read:

Source0: http://github.com/ohadlevy/%{name}/tarball/%{name}-%{version}.tar.bz2

Attached .spec file appears ok, but I cannot change the mimetype to text/plain.

Actions #12

Updated by Robin Powell over 13 years ago

Confirmed successful installation. Can't speak beyond that yet as I've no idea what I'm doing. :)

-Robin

Actions #13

Updated by Marcello de Sousa over 13 years ago

The logic here is broken.

With the current extras/spec/foreman.spec:

%if ! (0%{?fedora} > 14 || 0%{?rhel} > 5) 
Requires:       rubygem(sqlite3) 
%else 
Requires:       rubygem(sqlite3-ruby) 
%endif 

if the variables are not defined they will get a value of "0". Consequently the default requirement will be: rubygem(sqlite3) and that breaks installations that have been working before.
My quick and dirty solution is to change it to:
%if (100%{?fedora} < 15 || 100%{?rhel} < 6)
Requires:       rubygem(sqlite3) 
%else 
Requires:       rubygem(sqlite3-ruby) 
%endif 

This will make it work again in CentOS.

As extra info, in CentOS when testing these values I get:

>  rpm --eval 'F = XXX%{?fedora} EL = XXX%{?rhel}'
F = XXX EL = XXX

Actions #14

Updated by Marcello de Sousa over 13 years ago

Ok, so the last suggestion didn't seem to fix it for everyone (as discussed on the IRC)...
I think it would be nice if we could recap what is exactly the problem and the affected versions. This is not clear now...

The important point is that the default situation should be the previous working one where:
Requires: rubygem(sqlite3-ruby)

In RHEL5 and CentOS5 machines here I see these variables are not defined.

[root@server ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Kernel \r on an \m

[root@server ~]# rpm --eval 'F = 0%{?fedora} EL = 0%{?rhel}'
F = 0 EL = 0

On both I see "rubygem-sqlite3-ruby" available, so the proposed default value work:
Requires: rubygem(sqlite3-ruby)

Actions #15

Updated by D. Johnson over 13 years ago

RPM test files, located at http://fenris02.fedorapeople.org/foreman/

Please let me know if they work for you. (Both f15 and el5 are there, choose the one that matches your install)

Actions #16

Updated by Ohad Levy over 13 years ago

  • Target version deleted (0.4)

ok, this is not a release blocker, but we need to get a new yum repo structure.

since foreman 0.5 would be targeted to migration into fedora (or at least would hopefully stop bundling everything inside and migrate to rails 3), I'm removign the target version.

Actions #17

Updated by Ohad Levy about 13 years ago

  • Status changed from Feedback to Duplicate
Actions #18

Updated by Ohad Levy about 13 years ago

  • Status changed from Duplicate to New

oops, this should not be a duplicate

Actions #19

Updated by Ohad Levy over 12 years ago

latest working rpms can be found at

http://people.redhat.com/jmontleo/foreman/

Actions #20

Updated by Ohad Levy over 12 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF