Update to 3.0.0.
Language bindings are separate projects now. Update spec file and remove obsolete constructs.
This commit is contained in:
parent
a45065678e
commit
5380bc1faf
@ -1,33 +0,0 @@
|
||||
diff -up lxc-2.0.9/src/lxc/caps.h~ lxc-2.0.9/src/lxc/caps.h
|
||||
--- lxc-2.0.9/src/lxc/caps.h~ 2017-10-19 19:13:25.000000000 +0200
|
||||
+++ lxc-2.0.9/src/lxc/caps.h 2017-10-20 19:31:11.958292398 +0200
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
|
||||
#if HAVE_LIBCAP
|
||||
+#include <linux/types.h>
|
||||
#include <sys/capability.h>
|
||||
|
||||
extern int lxc_caps_down(void);
|
||||
diff -up lxc-2.0.9/src/lxc/conf.c~ lxc-2.0.9/src/lxc/conf.c
|
||||
--- lxc-2.0.9/src/lxc/conf.c~ 2017-10-19 19:13:25.000000000 +0200
|
||||
+++ lxc-2.0.9/src/lxc/conf.c 2017-10-20 19:31:54.505837167 +0200
|
||||
@@ -91,6 +91,7 @@
|
||||
#include "lsm/lsm.h"
|
||||
|
||||
#if HAVE_LIBCAP
|
||||
+#include <linux/types.h>
|
||||
#include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
diff -up lxc-2.0.9/src/lxc/start.c~ lxc-2.0.9/src/lxc/start.c
|
||||
--- lxc-2.0.9/src/lxc/start.c~ 2017-10-19 19:13:25.000000000 +0200
|
||||
+++ lxc-2.0.9/src/lxc/start.c 2017-10-20 19:32:21.793545209 +0200
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#if HAVE_LIBCAP
|
||||
+#include <linux/types.h>
|
||||
#include <sys/capability.h>
|
||||
#endif
|
||||
|
@ -1,10 +0,0 @@
|
||||
diff --git b/config/bash/lxc.in a/config/bash/lxc.in
|
||||
index 344d5cb..cbd1b79 100644
|
||||
--- b/config/bash/lxc.in
|
||||
+++ a/config/bash/lxc.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-_have lxc-start && {
|
||||
+have lxc-start && {
|
||||
_lxc_names() {
|
||||
COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
|
||||
}
|
171
lxc.spec
171
lxc.spec
@ -1,11 +1,3 @@
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%global with_systemd 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_seccomp 1
|
||||
%endif
|
||||
@ -16,35 +8,15 @@
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global luaver 5.3
|
||||
%else
|
||||
%global luaver 5.1
|
||||
%endif
|
||||
%global lualibdir %{_libdir}/lua/%{luaver}
|
||||
%global luapkgdir %{_datadir}/lua/%{luaver}
|
||||
|
||||
# for pre-releases
|
||||
#global prerel
|
||||
%global commit a467a845443054a9f75d65cf0a73bb4d5ff2ab71
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
||||
Name: lxc
|
||||
Version: 2.0.9
|
||||
Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist}.1
|
||||
Version: 3.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Linux Resource Containers
|
||||
Group: Applications/System
|
||||
License: LGPLv2+ and GPLv2
|
||||
URL: http://linuxcontainers.org
|
||||
%if 0%{?prerel:1}
|
||||
Source0: https://github.com/lxc/lxc/archive/%{commit}/%{name}-%{commit}.tar.gz
|
||||
%else
|
||||
URL: http://linuxcontainers.org/lxc
|
||||
Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
|
||||
%endif
|
||||
Patch0: lxc-2.0.7-fix-init.patch
|
||||
Patch1: lxc-2.0.6-fix-lxc-net.patch
|
||||
Patch2: lxc-2.0.8-fix_capability_h.patch
|
||||
Patch3: lxc-fix-bash-completion.patch
|
||||
BuildRequires: docbook2X
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: kernel-headers
|
||||
@ -54,23 +26,12 @@ BuildRequires: pkgconfig(libseccomp)
|
||||
%endif # with_seccomp
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig(lua)
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: pkgconfig(python3) >= 3.2
|
||||
%endif # with_python3
|
||||
%if 0%{?with_systemd}
|
||||
BuildRequires: systemd
|
||||
%endif # with_systemd
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: pkgconfig(bash-completion)
|
||||
%endif
|
||||
# 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
|
||||
%endif
|
||||
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
|
||||
@ -81,18 +42,13 @@ overhead of full virtualization.
|
||||
|
||||
%package libs
|
||||
Summary: Runtime library files for %{name}
|
||||
Group: System Environment/Libraries
|
||||
# rsync is called in bdev.c, e.g. by lxc-clone
|
||||
Requires: rsync
|
||||
%if 0%{?with_systemd}
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
%else
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): initscripts, chkconfig
|
||||
Requires(postun): initscripts
|
||||
%endif # with_systemd
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
|
||||
|
||||
%description libs
|
||||
@ -102,38 +58,8 @@ overhead of full virtualization.
|
||||
The %{name}-libs package contains libraries for running %{name} applications.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python%{python3_pkgversion}-%{name}
|
||||
Summary: Python binding for %{name}
|
||||
Group: System Environment/Libraries
|
||||
|
||||
%description -n python%{python3_pkgversion}-%{name}
|
||||
Linux Resource Containers provide process and resource isolation without the
|
||||
overhead of full virtualization.
|
||||
|
||||
The python%{python3_pkgversion}-%{name} package contains the Python3 binding for %{name}.
|
||||
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%package -n lua-%{name}
|
||||
Summary: Lua binding for %{name}
|
||||
Group: System Environment/Libraries
|
||||
Requires: lua-filesystem
|
||||
|
||||
%description -n lua-%{name}
|
||||
Linux Resource Containers provide process and resource isolation without the
|
||||
overhead of full virtualization.
|
||||
|
||||
The lua-%{name} package contains the Lua binding for %{name}.
|
||||
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}core\\.so\\.0
|
||||
|
||||
|
||||
%package templates
|
||||
Summary: Templates for %{name}
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
# Note: Requirements for the template scripts (busybox, dpkg,
|
||||
# debootstrap, rsync, openssh-server, dhclient, apt, pacman, zypper,
|
||||
@ -154,7 +80,6 @@ The %{name}-templates package contains templates for creating containers.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
@ -168,7 +93,6 @@ developing applications that use %{name}.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
@ -176,22 +100,12 @@ This package contains documentation for %{name}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{?!prerel:%{version}}%{?prerel:%{commit}}
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||
# fix build failure with broken sys/capabilities.h (see
|
||||
# e.g. rhbz#483548)
|
||||
%patch2 -p1
|
||||
# revert 3db8dd39 (see rhbz#1408173)
|
||||
%patch3 -p1
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
%if 0%{?prerel:1}
|
||||
./autogen.sh
|
||||
%endif
|
||||
%configure --with-distro=fedora \
|
||||
--enable-doc \
|
||||
--enable-api-docs \
|
||||
@ -199,22 +113,11 @@ This package contains documentation for %{name}.
|
||||
--docdir=%{_pkgdocdir} \
|
||||
--disable-rpath \
|
||||
--disable-apparmor \
|
||||
--disable-cgmanager \
|
||||
--enable-selinux \
|
||||
%if 0%{?with_seccomp}
|
||||
--enable-seccomp \
|
||||
%endif # with_seccomp
|
||||
--enable-lua \
|
||||
%if 0%{?with_python3}
|
||||
--enable-python \
|
||||
%else
|
||||
--disable-python \
|
||||
%endif # with_python3
|
||||
%if 0%{?with_systemd}
|
||||
--with-init-script=systemd \
|
||||
%else
|
||||
--with-init-script=sysvinit \
|
||||
%endif # with_systemd
|
||||
--disable-werror \
|
||||
# intentionally blank line
|
||||
|
||||
@ -228,11 +131,10 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
%install
|
||||
%{make_install}
|
||||
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
||||
chmod -x %{buildroot}%{luapkgdir}/lxc.lua
|
||||
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||
cp -a AUTHORS README %{!?_licensedir:COPYING} %{buildroot}%{_pkgdocdir}
|
||||
# docs
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}/api
|
||||
cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
|
||||
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
|
||||
|
||||
# cache dir
|
||||
@ -247,44 +149,23 @@ make check
|
||||
|
||||
|
||||
%post libs
|
||||
/sbin/ldconfig
|
||||
%if 0%{?with_systemd}
|
||||
%{ldconfig}
|
||||
%systemd_post %{name}-net.service
|
||||
%systemd_post %{name}.service
|
||||
%systemd_post %{name}@.service
|
||||
%else
|
||||
/sbin/chkconfig --add %{name}-net
|
||||
/sbin/chkconfig --add %{name}
|
||||
%endif # with_systemd
|
||||
|
||||
|
||||
%preun libs
|
||||
%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
|
||||
/sbin/chkconfig --del %{name}-net
|
||||
/sbin/service %{name} stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del %{name}
|
||||
fi
|
||||
%endif # with_systemd
|
||||
|
||||
|
||||
%postun libs
|
||||
/sbin/ldconfig
|
||||
%if 0%{?with_systemd}
|
||||
%{ldconfig}
|
||||
%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 || :
|
||||
/sbin/service %{name} condrestart > /dev/null 2>&1 || :
|
||||
fi
|
||||
%endif # with_systemd
|
||||
|
||||
|
||||
%files
|
||||
@ -298,14 +179,9 @@ fi
|
||||
%exclude %{_mandir}/man1/%{name}-user-nic*
|
||||
%exclude %{_mandir}/*/man1/%{name}-user-nic*
|
||||
%{_datadir}/%{name}/%{name}.functions
|
||||
%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,33 +212,13 @@ fi
|
||||
%dir %{_pkgdocdir}
|
||||
%{_pkgdocdir}/AUTHORS
|
||||
%{_pkgdocdir}/README
|
||||
%if 0%{?_licensedir:1}
|
||||
%license COPYING
|
||||
%else
|
||||
%{_pkgdocdir}/COPYING
|
||||
%endif
|
||||
%if 0%{?with_systemd}
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_unitdir}/%{name}@.service
|
||||
%{_unitdir}/%{name}-net.service
|
||||
%else
|
||||
%{_sysconfdir}/rc.d/init.d/%{name}
|
||||
%{_sysconfdir}/rc.d/init.d/%{name}-net
|
||||
%endif # with_systemd
|
||||
%dir %{_localstatedir}/cache/%{name}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python%{python3_pkgversion}-%{name}
|
||||
%{python3_sitearch}/*
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%files -n lua-%{name}
|
||||
%{lualibdir}/%{name}
|
||||
%{luapkgdir}/%{name}.lua
|
||||
|
||||
|
||||
%files templates
|
||||
%{_datadir}/%{name}/templates/lxc-*
|
||||
%{_datadir}/%{name}/config/*
|
||||
@ -379,12 +235,15 @@ fi
|
||||
# README, AUTHORS and COPYING intentionally duplicated because -doc
|
||||
# can be installed on its own.
|
||||
%{_pkgdocdir}/*
|
||||
%if 0%{?_licensedir:1}
|
||||
%license COPYING
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Apr 6 2018 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.0-1
|
||||
- Update to 3.0.0.
|
||||
- Language bindings are separate projects now.
|
||||
- Update spec file and remove obsolete constructs.
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (lxc-2.0.9.tar.gz) = c7c595fbc6163e500700b756ae30c96b70d41b9bf297a609622b5d5b8431171ed8db70fa8368c3b9650c86452820e9da7f329f9186ae75c24a7adb15d5826102
|
||||
SHA512 (lxc-3.0.0.tar.gz) = 21372e6fe4d38e2cf54707fab4133137793deff1dd500ed7ed02c03bbaa809de56c7490971594cddbdcb2b96f0c03ab5dfb43a8582a584598a12c5943b7ca490
|
||||
|
Loading…
Reference in New Issue
Block a user