Compare commits

...

7 Commits

Author SHA1 Message Date
Neil Hanlon
d2f5ee52fb
fix url in spec 2022-08-06 10:48:12 -04:00
Neil Hanlon
04cf9ef2bd
bump to -4 and build rocky 2022-08-06 10:33:14 -04:00
Neil Hanlon
636041c920
update to fix rocky patch 2022-08-04 11:19:01 -04:00
Neil Hanlon
2145844a6e
fix rocky patch 2022-08-04 10:46:25 -04:00
Neil Hanlon
42f662f817
Add rockylinux template 2022-08-04 10:40:12 -04:00
9e1633717c
add copr build config 2022-05-19 17:06:47 -04:00
6a29114bb8
Add extra templates and split them into a new package 2022-05-19 17:06:38 -04:00
4 changed files with 73 additions and 3 deletions

15
.copr/Makefile Normal file
View File

@ -0,0 +1,15 @@
rpmbuild_src = $(shell rpmbuild --eval '%{_sourcedir}')
.PHONY: prepare srpm rpm
prepare:
dnf -y install rpmdevtools rpm-build
cp *.patch $(rpmbuild_src)
cp lxc-net $(rpmbuild_src)
spectool -g -R $(spec)
srpm: prepare
rpmbuild -bs --define "_srcrpmdir $(outdir)" $(spec)
rpm: prepare
rpmbuild -bb --define "_rpmdir $(outdir)" $(spec)

1
.gitignore vendored
View File

@ -1 +1,2 @@
/lxc-*.tar.gz
/v1.*.tar.gz

View File

@ -11,12 +11,13 @@
Name: lxc
Version: 4.0.10
Release: 1%{?dist}
Release: 5%{?dist}
Summary: Linux Resource Containers
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/neilhanlon/lxc-templates/archive/v1.0.4.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,15 @@ make check
%changelog
* Thu Aug 04 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-4
- fix rocky template patch
* Thu Aug 04 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-3
- add a rockylinux template
* Thu May 19 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-2
- build additional templates into a templates-extra package
* Sat Sep 18 2021 Thomas Moschny <thomas.moschny@gmx.de> - 4.0.10-1
- Update to 4.0.10.

View File

@ -1 +1,2 @@
SHA512 (lxc-4.0.10.tar.gz) = ec3ccf344a91b50b30985562c54ad93d2db2d29c24d31da8e3a69e801c8bd23c1560274c1850c39eb7e984940ba86d3ebae75db136320d6bbc5eb03bda4c5318
SHA512 (v1.0.4.tar.gz) = 2a7ad3f7e1ceb5fb8a094796590f3786953c2ff57d3f3d7285a3a918725df0b02ee2526de25cd4491d1a677279e3a8507da7886d6d01102f9f1908351abb19c4