diff --git a/.gitignore b/.gitignore index 258ef5e..b571f18 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ lxc-0.7.2.tar.gz /lxc-1.1.3.tar.gz /lxc-1.1.4.tar.gz /lxc-1.1.5.tar.gz +/lxc-2.0.0.tar.gz diff --git a/lxc-2.0.0-remove-werror.patch b/lxc-2.0.0-remove-werror.patch new file mode 100644 index 0000000..b2da700 --- /dev/null +++ b/lxc-2.0.0-remove-werror.patch @@ -0,0 +1,12 @@ +diff -up lxc-2.0.0/configure.ac.orig lxc-2.0.0/configure.ac +--- lxc-2.0.0/configure.ac.orig 2016-04-06 19:59:42.000000000 +0200 ++++ lxc-2.0.0/configure.ac 2016-04-21 07:46:29.936382133 +0200 +@@ -626,7 +626,7 @@ AC_PROG_SED + LXC_CHECK_TLS + + if test "x$GCC" = "xyes"; then +- CFLAGS="$CFLAGS -Wall -Werror" ++ CFLAGS="$CFLAGS -Wall" + fi + + # Files requiring some variable expansion diff --git a/lxc.spec b/lxc.spec index 709afc4..3260b3f 100644 --- a/lxc.spec +++ b/lxc.spec @@ -34,8 +34,8 @@ %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: lxc -Version: 1.1.5 -Release: %{?prerel:0.}2%{?prerel:.%{prerel}}%{?dist} +Version: 2.0.0 +Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist} Summary: Linux Resource Containers Group: Applications/System License: LGPLv2+ and GPLv2 @@ -47,6 +47,7 @@ Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz %endif Patch0: lxc-1.1.0-fix-init.patch Patch1: lxc-1.1.4-fix-bootorder.patch +Patch2: lxc-2.0.0-remove-werror.patch BuildRequires: docbook-utils BuildRequires: docbook2X BuildRequires: doxygen @@ -64,8 +65,13 @@ BuildRequires: python3-devel >= 3.2 %if 0%{?with_systemd} BuildRequires: systemd %endif # with_systemd +# lxc-extra subpackage not needed anymore, lxc-ls has been rewriten in +# C and does not depend on the Python3 binding anymore +Provides: lxc-extra = %{version}-%{release} +Obsoletes: lxc-extra < 1.1.5-3 #if 0%{?prerel:1} -#BuildRequires: autoconf automake +# we patch configure.ac +BuildRequires: autoconf automake #endif %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -110,18 +116,6 @@ overhead of full virtualization. The python3-%{name} package contains the Python3 binding for %{name}. %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so - - -%package extra -Summary: Extra tools for %{name} -Group: Applications/System -Requires: python3-%{name}%{?_isa} = %{version}-%{release} - -%description extra -Linux Resource Containers provide process and resource isolation without the -overhead of full virtualization. - -This package contains tools needing the Python3 bindings. %endif # with_python3 @@ -188,12 +182,14 @@ This package contains documentation for %{name}. %patch0 -p1 # see rhbz#1263612 %patch1 -p1 +# -Wall with -Werror doesn't work well +%patch2 -p1 %build -%if 0%{?prerel:1} +#if 0%{?prerel:1} ./autogen.sh -%endif +#endif %configure --with-distro=fedora \ --enable-doc \ --enable-api-docs \ @@ -235,6 +231,13 @@ cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/ # cache dir mkdir -p %{buildroot}%{_localstatedir}/cache/%{name} +# on Fedora and EPEL>=7, move the completion file to %%{_datadir} +%if 0%{?fedora} || 0%{?rhel} >= 7 +install -d %{buildroot}%{_datadir}/bash-completion/completions/ +mv %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} \ + %{buildroot}%{_datadir}/bash-completion/completions/%{name} +%endif + %check make check @@ -245,6 +248,7 @@ make check %if 0%{?with_systemd} %systemd_post %{name}-net.service %systemd_post %{name}.service +%systemd_post %{name}@.service %else /sbin/chkconfig --add %{name}-net /sbin/chkconfig --add %{name} @@ -255,6 +259,7 @@ make check %if 0%{?with_systemd} %systemd_preun %{name}-net.service %systemd_preun %{name}.service +%systemd_preun %{name}@.service %else if [ $1 -eq 0 ]; then /sbin/service %{name}-net stop > /dev/null 2>&1 @@ -270,6 +275,7 @@ fi %if 0%{?with_systemd} %systemd_postun %{name}-net.service %systemd_postun %{name}.service +%systemd_postun %{name}@.service %else if [ $1 -ge 1 ]; then /sbin/service %{name}-net condrestart > /dev/null 2>&1 || : @@ -289,16 +295,14 @@ fi %exclude %{_mandir}/man1/%{name}-user-nic* %exclude %{_mandir}/*/man1/%{name}-user-nic* %{_datadir}/%{name}/%{name}.functions -%if 0%{?with_python3} -%exclude %{_bindir}/%{name}-ls -%exclude %{_bindir}/%{name}-start-ephemeral -%exclude %{_mandir}/man1/%{name}-ls* -%exclude %{_mandir}/man1/%{name}-start-ephemeral* -%exclude %{_mandir}/*/man1/%{name}-ls* -%exclude %{_mandir}/*/man1/%{name}-start-ephemeral* -%endif -%dir %{_sysconfdir}/bash_completion.d/ +%if 0%{?fedora} || 0%{?rhel} >= 7 +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/%{name} +%else +%dir %{_sysconfdir}/bash_completion.d %{_sysconfdir}/bash_completion.d/%{name} +%endif %files libs @@ -336,6 +340,7 @@ fi %endif %if 0%{?with_systemd} %{_unitdir}/%{name}.service +%{_unitdir}/%{name}@.service %{_unitdir}/%{name}-net.service %else %{_sysconfdir}/rc.d/init.d/%{name} @@ -347,15 +352,6 @@ fi %if 0%{?with_python3} %files -n python3-%{name} %{python3_sitearch}/* - - -%files extra -%{_bindir}/%{name}-ls -%{_bindir}/%{name}-start-ephemeral -%{_mandir}/man1/%{name}-ls* -%{_mandir}/man1/%{name}-start-ephemeral* -%{_mandir}/*/man1/%{name}-ls* -%{_mandir}/*/man1/%{name}-start-ephemeral* %endif # with_python3 @@ -386,6 +382,11 @@ fi %changelog +* Wed Apr 20 2016 Thomas Moschny - 2.0.0-1 +- Update to 2.0.0. +- Obsolete the -extra subpackage. +- Move the completion file to %%{_datadir}. + * Tue Mar 1 2016 Peter Robinson 1.1.5-2 - Power64 and s390(x) now have libseccomp support diff --git a/sources b/sources index c9349ce..532d2d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dd9684dde0a58ed13f4f49c855b79a1a lxc-1.1.5.tar.gz +04a7245a614cd3296b0ae9ceeeb83fbb lxc-2.0.0.tar.gz