[lxc] Add upstream patch fixing the release url in the Fedora template.

Thomas Moschny thm at fedoraproject.org
Sat Mar 2 13:46:42 UTC 2013


commit c1ca5e5bdeb4f9cab58a8281f65c4745694cfa3f
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Sat Mar 2 14:29:47 2013 +0100

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

 lxc-0.8.0-fedora-template.patch |   28 ++++++++++++++++++++++++++++
 lxc.spec                        |    7 ++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/lxc-0.8.0-fedora-template.patch b/lxc-0.8.0-fedora-template.patch
new file mode 100644
index 0000000..dd2b928
--- /dev/null
+++ b/lxc-0.8.0-fedora-template.patch
@@ -0,0 +1,28 @@
+commit 29e18143a07ffab7e85cb8db4dc39d394f0c6ea0
+Author: Maximilian Seesslen <mes at 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 at seesslen.net>
+    Acked-by: Serge E. Hallyn <serge.hallyn at 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
diff --git a/lxc.spec b/lxc.spec
index e680941..3e2f6de 100644
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,11 +1,12 @@
 Name:           lxc
 Version:        0.8.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Linux Resource Containers
 Group:          Applications/System
 License:        LGPLv2+
 URL:            http://lxc.sourceforge.net
 Source0:        http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
+Patch0:         lxc-0.8.0-fedora-template.patch
 BuildRequires:  docbook-utils
 BuildRequires:  kernel-headers
 BuildRequires:  libcap-devel
@@ -74,6 +75,7 @@ This package contains documentation for %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 
 
 %build
@@ -140,6 +142,9 @@ make check
 
 
 %changelog
+* Sat Mar  2 2013 Thomas Moschny <thomas.moschny at 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 at gmx.de> - 0.8.0-1
 - Update to 0.8.0.
 - Modernize spec file.


More information about the scm-commits mailing list