Bug #928
closedDependency problem with f15 / foreman.noarch 0:0.3rc1-1
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
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
Updated by D. Johnson over 13 years ago
- File 0002-Patch-spec-file-to-work-with-Fedora-15.patch 0002-Patch-spec-file-to-work-with-Fedora-15.patch added
Looks like wiki broke git patch, attaching as external file with git format-patch
Updated by Ohad Levy over 13 years ago
- Category set to Packaging
- Target version set to 0.3
Updated by D. Johnson over 13 years ago
- Status changed from New to Ready For Testing
- % Done changed from 0 to 100
Applied in changeset 471a7d5cddb0dd6ff97268632d0aca5e6ecc6fe4.
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
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
Updated by D. Johnson over 13 years ago
- File 0003-Corrected-Requires-line-to-work-with-f15-and-C5.patch 0003-Corrected-Requires-line-to-work-with-f15-and-C5.patch added
This should work for C5 now.
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
Updated by D. Johnson over 13 years ago
- File foreman.spec foreman.spec added
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)
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.
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
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
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)
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)
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.
Updated by Ohad Levy about 13 years ago
- Status changed from Feedback to Duplicate
Updated by Ohad Levy about 13 years ago
- Status changed from Duplicate to New
oops, this should not be a duplicate
Updated by Ohad Levy over 12 years ago
latest working rpms can be found at