Add upstream patch fixing the release url in the Fedora template.

This commit is contained in:
Thomas Moschny 2013-03-02 14:29:47 +01:00
parent c3b47dbd1e
commit c1ca5e5bde
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
commit 29e18143a07ffab7e85cb8db4dc39d394f0c6ea0
Author: Maximilian Seesslen <mes@seesslen.net>
Date: Fri Jan 4 16:36:07 2013 +0100
fixed RELEASE_URL for fedora releases higher than 16
The Url for the fedora-release RPM changed in release 17.
Signed-off-by: Maximilian Seesslen <mes@seesslen.net>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
index 366e776..684bb9c 100644
--- a/templates/lxc-fedora.in
+++ b/templates/lxc-fedora.in
@@ -149,7 +149,11 @@ download_fedora()
echo "Failed to get a mirror"
continue
fi
- RELEASE_URL="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm"
+ if [ "$release" -gt "16" ]; then
+ RELEASE_URL="$MIRROR_URL/Packages/f/fedora-release-$release-1.noarch.rpm"
+ else
+ RELEASE_URL="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm"
+ fi
echo "Fetching from $RELEASE_URL"
curl -f "$RELEASE_URL" > $INSTALL_ROOT/fedora-release-$release.noarch.rpm
if [ $? -ne 0 ]; then

View File

@ -1,11 +1,12 @@
Name: lxc Name: lxc
Version: 0.8.0 Version: 0.8.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Linux Resource Containers Summary: Linux Resource Containers
Group: Applications/System Group: Applications/System
License: LGPLv2+ License: LGPLv2+
URL: http://lxc.sourceforge.net URL: http://lxc.sourceforge.net
Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
Patch0: lxc-0.8.0-fedora-template.patch
BuildRequires: docbook-utils BuildRequires: docbook-utils
BuildRequires: kernel-headers BuildRequires: kernel-headers
BuildRequires: libcap-devel BuildRequires: libcap-devel
@ -74,6 +75,7 @@ This package contains documentation for %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
@ -140,6 +142,9 @@ make check
%changelog %changelog
* Sat Mar 2 2013 Thomas Moschny <thomas.moschny@gmx.de> - 0.8.0-2
- Add upstream patch fixing the release url in the Fedora template.
* Fri Feb 15 2013 Thomas Moschny <thomas.moschny@gmx.de> - 0.8.0-1 * Fri Feb 15 2013 Thomas Moschny <thomas.moschny@gmx.de> - 0.8.0-1
- Update to 0.8.0. - Update to 0.8.0.
- Modernize spec file. - Modernize spec file.