diff --git a/.gitignore b/.gitignore index 0f53774..40c17b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/lxc-*.tar.gz +#/lxc-*.tar.gz diff --git a/lxc-4.0.10.tar.gz b/lxc-4.0.10.tar.gz new file mode 100644 index 0000000..e69de29 diff --git a/lxc.spec b/lxc.spec index 401614e..af842ba 100644 --- a/lxc.spec +++ b/lxc.spec @@ -17,6 +17,7 @@ License: LGPLv2+ and GPLv2 URL: https://linuxcontainers.org/lxc Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz Source1: lxc-net +Source2: https://git.shrug.pw/neil/lxc-templates/archive/v1.0.0.tar.gz Patch0: lxc-2.0.7-fix-init.patch Patch1: lxc-4.0.1-fix-lxc-net.patch BuildRequires: make @@ -91,6 +92,17 @@ overhead of full virtualization. The %{name}-templates package contains templates for creating containers. +%package templates-extra +Summary: Extra Templates for %{name} +Requires: %{name}-templates%{?_isa} = %{version}-%{release} + +%description templates-extra +Linux Resource Containers provide process and resource isolation without the +overhead of full virtualization. + +The %{name}-templates-extra package contains extra templates for creating containers +previously available in the lxc-templates package, but are now considered +legacy. %package devel Summary: Development files for %{name} @@ -116,7 +128,6 @@ This package contains documentation for %{name}. %prep %autosetup -p1 -n %{name}-%{version} - %build autoreconf -vif %configure --with-distro=fedora \ @@ -141,6 +152,15 @@ autoreconf -vif %{make_build} +# build extra templates +tar -xf %{SOURCE2} +cd lxc-templates/ +autoreconf -vif +%configure + +%{make_build} + + %install %{make_install} mkdir -p %{buildroot}%{_sharedstatedir}/%{name} @@ -159,8 +179,15 @@ rm -rf %{buildroot}%{_libdir}/liblxc.la # lxc-net config file cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net +# lxc-templates from github +cd lxc-templates +%{make_install} +ls -v + %check make check +cd lxc-templates +make check %post libs @@ -239,10 +266,27 @@ make check %files templates +%{_datadir}/%{name}/templates/lxc-busybox +%{_datadir}/%{name}/templates/lxc-download +%{_datadir}/%{name}/templates/lxc-local +%{_datadir}/%{name}/templates/lxc-oci +%{_datadir}/%{name}/config/common* +%{_datadir}/%{name}/config/userns.conf +%{_datadir}/%{name}/config/nesting.conf +%{_datadir}/%{name}/config/oci.common.conf + +%files templates-extra +%exclude %{_datadir}/%{name}/templates/lxc-busybox +%exclude %{_datadir}/%{name}/templates/lxc-download +%exclude %{_datadir}/%{name}/templates/lxc-local +%exclude %{_datadir}/%{name}/templates/lxc-oci +%exclude %{_datadir}/%{name}/config/common* +%exclude %{_datadir}/%{name}/config/userns.conf +%exclude %{_datadir}/%{name}/config/nesting.conf +%exclude %{_datadir}/%{name}/config/oci.common.conf %{_datadir}/%{name}/templates/lxc-* %{_datadir}/%{name}/config/* - %files devel %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/lxc @@ -258,6 +302,9 @@ make check %changelog +* Thu May 19 2022 Neil Hanlon - 4.0.10-2 +- build additional templates into a templates-extra package + * Sat Sep 18 2021 Thomas Moschny - 4.0.10-1 - Update to 4.0.10. diff --git a/sources b/sources index a39404c..2755106 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (lxc-4.0.10.tar.gz) = ec3ccf344a91b50b30985562c54ad93d2db2d29c24d31da8e3a69e801c8bd23c1560274c1850c39eb7e984940ba86d3ebae75db136320d6bbc5eb03bda4c5318 +SHA512 (v1.0.0.tar.gz) = 6e0f4502097fac489010f70d9a99254d78e395534f7633fd05e0f5c26e9714a13d4930147e2cada0ba4c3c860410668bab1f652267a60f6ad06f12e5d6a8668a diff --git a/v1.0.0.tar.gz b/v1.0.0.tar.gz new file mode 100644 index 0000000..36ab4a5 Binary files /dev/null and b/v1.0.0.tar.gz differ