[katello-devel] PATCH: katello-repos for distributing the .repo files

Jan Pazdziora jpazdziora at redhat.com
Wed Sep 14 15:52:22 UTC 2011


Hello,

attached please find a PATCH which creates new package katello-repos
which defines the correct underlying yum repositories for both
Katello, and Candlepin and Pulp.

The idea is that instead of wgetting three .repo files, user
installing Katello (and its dependencies) would only

	rpm -Uvh http://repos.fedorapeople.org/repos/katello/katello-repos-0.1.1-1.el6.noarch.rpm

or

	rpm -Uvh http://repos.fedorapeople.org/repos/katello/katello-repos-0.1.1-1.fc14.noarch.rpm

and they would get correct katello.repo, candlepin.repo, and
pulp.repo.

This should make it easier for Katello project to chose which bits
will be installed -- if Pulp testing bits are required by given
Katello release, we'd just change the enabled here and release new
katello-repos. Once Pulp and Candlepin start to do proper releases,
katello-repos will be able to point to specific Pulo and Candlepin
versioned repositories that it assumes to be used for proper
operation.

The installation of katello-repos package should not be a requirement
at any stage, it should just make it easier to run one rpm command
instead of three wgets.

-- 
Jan Pazdziora | adelton at #satellite*, #brno
Principal Software Engineer, Satellite Engineering, Red Hat
-------------- next part --------------
diff --git a/repos/fedora-candlepin.repo b/repos/fedora-candlepin.repo
new file mode 100644
index 0000000..4bb6ee4
--- /dev/null
+++ b/repos/fedora-candlepin.repo
@@ -0,0 +1,16 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+[candlepin]
+name=An open source entitlement management system.
+baseurl=http://repos.fedorapeople.org/repos/candlepin/candlepin/fedora-$releasever/$basearch/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+[candlepin-source]
+name=An open source entitlement management system. - Source
+baseurl=http://repos.fedorapeople.org/repos/candlepin/candlepin/fedora-$releasever/SRPMS
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+
diff --git a/repos/fedora-katello.repo b/repos/fedora-katello.repo
new file mode 100644
index 0000000..0ec5915
--- /dev/null
+++ b/repos/fedora-katello.repo
@@ -0,0 +1,16 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+[katello]
+name=integrates together a series of open source systems management tools
+baseurl=http://repos.fedorapeople.org/repos/katello/katello/fedora-$releasever/$basearch/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+[katello-source]
+name=integrates together a series of open source systems management tools - Source
+baseurl=http://repos.fedorapeople.org/repos/katello/katello/fedora-$releasever/SRPMS
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+
diff --git a/repos/fedora-pulp.repo b/repos/fedora-pulp.repo
new file mode 100644
index 0000000..663b6fa
--- /dev/null
+++ b/repos/fedora-pulp.repo
@@ -0,0 +1,19 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+# Community Releases
+[pulp]
+name=Pulp Community Releases
+baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/fedora-$releasever/$basearch/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+# Testing Builds (not necessarily nightly but more frequently than a full blown
+# community release)
+[pulp-testing]
+name=Pulp Testing Builds
+baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-$releasever/$basearch/
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+
diff --git a/repos/katello-repos.spec b/repos/katello-repos.spec
new file mode 100644
index 0000000..e374257
--- /dev/null
+++ b/repos/katello-repos.spec
@@ -0,0 +1,52 @@
+
+Name:           katello-repos
+Version:        0.1.1
+Release:        1%{?dist}
+Summary:        Definition of yum repositories for Katello
+
+Group:          Applications/Internet
+License:        GPLv2
+URL:            http://www.katello.org
+Source0:        %{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Requires:       puppet
+
+BuildArch:      noarch
+
+%description
+Defines yum repositories for Katello and its subprojects, Candlepin and Pulp.
+
+%prep
+%setup -q
+
+%build
+
+%install
+rm -rf %{buildroot}
+#prepare dir structure
+install -d -m 0755 %{buildroot}%{_sysconfdir}/yum.repos.d
+
+%if 0%{?fedora}
+install -m 644 fedora-katello.repo %{buildroot}%{_sysconfdir}/yum.repos.d/katello.repo
+install -m 644 fedora-candlepin.repo %{buildroot}%{_sysconfdir}/yum.repos.d/candlepin.repo
+install -m 644 fedora-pulp.repo %{buildroot}%{_sysconfdir}/yum.repos.d/pulp.repo
+%endif
+
+%if 0%{?rhel}
+install -m 644 rhel-katello.repo %{buildroot}%{_sysconfdir}/yum.repos.d/katello.repo
+install -m 644 rhel-candlepin.repo %{buildroot}%{_sysconfdir}/yum.repos.d/candlepin.repo
+install -m 644 rhel-pulp.repo %{buildroot}%{_sysconfdir}/yum.repos.d/pulp.repo
+%endif
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{_sysconfdir}/yum.repos.d/*.repo
+
+%changelog
+* Wed Sep 14 2011 Jan Pazdziora 0.1.1-1
+- Initial package.
+
diff --git a/repos/rhel-candlepin.repo b/repos/rhel-candlepin.repo
new file mode 100644
index 0000000..b4dbe1c
--- /dev/null
+++ b/repos/rhel-candlepin.repo
@@ -0,0 +1,16 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+[candlepin]
+name=An open source entitlement management system.
+baseurl=http://repos.fedorapeople.org/repos/candlepin/candlepin/epel-$releasever/$basearch/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+[candlepin-source]
+name=An open source entitlement management system. - Source
+baseurl=http://repos.fedorapeople.org/repos/candlepin/candlepin/epel-$releasever/SRPMS
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+
diff --git a/repos/rhel-katello.repo b/repos/rhel-katello.repo
new file mode 100644
index 0000000..67a2bf3
--- /dev/null
+++ b/repos/rhel-katello.repo
@@ -0,0 +1,16 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+[katello]
+name=integrates together a series of open source systems management tools
+baseurl=http://repos.fedorapeople.org/repos/katello/katello/6Server/x86_64/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+[katello-source]
+name=integrates together a series of open source systems management tools - Source
+baseurl=http://repos.fedorapeople.org/repos/katello/katello/6Server/SRPMS
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+
diff --git a/repos/rhel-pulp.repo b/repos/rhel-pulp.repo
new file mode 100644
index 0000000..78bdb76
--- /dev/null
+++ b/repos/rhel-pulp.repo
@@ -0,0 +1,19 @@
+# Place this file in your /etc/yum.repos.d/ directory
+
+# Community Releases
+[pulp]
+name=Pulp Community Releases
+baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/$releasever/$basearch/
+enabled=1
+skip_if_unavailable=1
+gpgcheck=0
+
+# Testing Builds (not necessarily nightly but more frequently than a full blown
+# community release)
+[pulp-testing]
+name=Pulp Testing Builds
+baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/testing/$releasever/$basearch/
+enabled=0
+skip_if_unavailable=1
+gpgcheck=0
+


More information about the katello-devel mailing list