From 1fc44c52f80caae38fade4a62af73a2afad6db7b Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 4 Dec 2016 21:58:55 +0100 Subject: [PATCH] Enable python3 on epel7 builds. - Fix dependency on network-online.target for lxc-net.service. --- lxc-2.0.6-fix-lxc-net.patch | 11 +++++++++++ lxc.spec | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 lxc-2.0.6-fix-lxc-net.patch diff --git a/lxc-2.0.6-fix-lxc-net.patch b/lxc-2.0.6-fix-lxc-net.patch new file mode 100644 index 0000000..684cee3 --- /dev/null +++ b/lxc-2.0.6-fix-lxc-net.patch @@ -0,0 +1,11 @@ +diff -up lxc-2.0.6/config/init/systemd/lxc-net.service.in.orig lxc-2.0.6/config/init/systemd/lxc-net.service.in +--- lxc-2.0.6/config/init/systemd/lxc-net.service.in.orig 2016-11-23 20:15:59.000000000 +0100 ++++ lxc-2.0.6/config/init/systemd/lxc-net.service.in 2016-12-04 21:55:24.149093437 +0100 +@@ -1,6 +1,7 @@ + [Unit] + Description=LXC network bridge setup + After=network-online.target ++Wants=network-online.target + Before=lxc.service + + [Service] diff --git a/lxc.spec b/lxc.spec index f5ecff3..8a8d204 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 7 %global with_python3 1 %endif @@ -31,7 +31,7 @@ Name: lxc Version: 2.0.6 -Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist} +Release: %{?prerel:0.}2%{?prerel:.%{prerel}}%{?dist} Summary: Linux Resource Containers Group: Applications/System License: LGPLv2+ and GPLv2 @@ -42,6 +42,7 @@ Source0: https://github.com/lxc/lxc/archive/%{commit}/%{name}-%{commit}.t Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz %endif Patch0: lxc-2.0.1-fix-init.patch +Patch1: lxc-2.0.6-fix-lxc-net.patch BuildRequires: docbook2X BuildRequires: doxygen BuildRequires: kernel-headers @@ -100,15 +101,15 @@ The %{name}-libs package contains libraries for running %{name} applications. %if 0%{?with_python3} -%package -n python3-%{name} +%package -n python%{python3_pkgversion}-%{name} Summary: Python binding for %{name} Group: System Environment/Libraries -%description -n python3-%{name} +%description -n python%{python3_pkgversion}-%{name} Linux Resource Containers provide process and resource isolation without the overhead of full virtualization. -The python3-%{name} package contains the Python3 binding for %{name}. +The python%{python3_pkgversion}-%{name} package contains the Python3 binding for %{name}. %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so %endif # with_python3 @@ -175,6 +176,7 @@ This package contains documentation for %{name}. %prep %setup -q -n %{name}-%{?!prerel:%{version}}%{?prerel:%{commit}} %patch0 -p1 +%patch1 -p1 %build @@ -342,7 +344,7 @@ fi %if 0%{?with_python3} -%files -n python3-%{name} +%files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/* %endif # with_python3 @@ -374,6 +376,10 @@ fi %changelog +* Sun Dec 4 2016 Thomas Moschny - 2.0.6-2 +- Enable python3 on epel7 builds. +- Fix dependency on network-online.target for lxc-net.service. + * Sat Dec 3 2016 Thomas Moschny - 2.0.6-1 - Update to 2.0.6.