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 114 additions and 123 deletions

1
.gitignore vendored
View File

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

View File

@ -1,5 +1,6 @@
--- ./config/init/systemd/lxc-net.service.in.orig 2023-07-25 23:00:11.000000000 +0100 diff -up lxc-4.0.1/config/init/systemd/lxc-net.service.in.orig lxc-4.0.1/config/init/systemd/lxc-net.service.in
+++ ./config/init/systemd/lxc-net.service.in 2024-01-26 16:13:15.237248935 +0000 --- lxc-4.0.1/config/init/systemd/lxc-net.service.in.orig 2020-04-06 21:15:17.000000000 +0200
+++ lxc-4.0.1/config/init/systemd/lxc-net.service.in 2020-04-10 18:31:54.277490764 +0200
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
[Unit] [Unit]
Description=LXC network bridge setup Description=LXC network bridge setup
@ -7,4 +8,4 @@
+Wants=network-online.target +Wants=network-online.target
Before=lxc.service Before=lxc.service
Documentation=man:lxc Documentation=man:lxc
ConditionVirtualization=!lxc

226
lxc.spec
View File

@ -1,66 +1,51 @@
%if 0%{?fedora} %if 0%{?fedora}
%bcond_without seccomp %global with_seccomp 1
%bcond_without static_init %global with_static_init 1
%endif %endif
%if 0%{?rhel} >= 7 %if 0%{?rhel} >= 7
%ifarch %{ix86} x86_64 %{arm} aarch64 %ifarch %{ix86} x86_64 %{arm} aarch64
%bcond_without seccomp %global with_seccomp 1
%endif %endif
%endif %endif
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Name: lxc Name: lxc
Version: 6.0.3 Version: 4.0.10
Release: 1%{?dist} Release: 5%{?dist}
Summary: Linux Resource Containers Summary: Linux Resource Containers
# Automatically converted from old format: LGPLv2+ and GPLv2 - review is highly recommended. License: LGPLv2+ and GPLv2
License: LicenseRef-Callaway-LGPLv2+ AND GPL-2.0-only
URL: https://linuxcontainers.org/lxc URL: https://linuxcontainers.org/lxc
Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
Source1: lxc-net 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 Patch0: lxc-2.0.7-fix-init.patch
Patch1: lxc-4.0.1-fix-lxc-net.patch Patch1: lxc-4.0.1-fix-lxc-net.patch
BuildRequires: make
BuildRequires: cmake
BuildRequires: docbook2X BuildRequires: docbook2X
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: glibc-headers
BuildRequires: kernel-headers BuildRequires: kernel-headers
BuildRequires: libcap
BuildRequires: libcap-devel
%if %{?with_seccomp}
BuildRequires: pkgconfig(libseccomp)
%endif
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: meson >= 0.61 %if 0%{?with_seccomp}
BuildRequires: openssl-devel BuildRequires: pkgconfig(libseccomp)
BuildRequires: pam %endif # with_seccomp
BuildRequires: libcap-devel
BuildRequires: pam-devel BuildRequires: pam-devel
BuildRequires: pkg-config BuildRequires: openssl-devel
BuildRequires: systemd-devel BuildRequires: libtool
BuildRequires: pkgconfig(dbus-1) BuildRequires: systemd
%if %{?with_static_init} BuildRequires: pkgconfig(bash-completion)
%if 0%{?with_static_init}
BuildRequires: libcap-static BuildRequires: libcap-static
BuildRequires: glibc-static BuildRequires: glibc-static
%endif %endif # with_static_init
# we are patching configure.ac
BuildRequires: autoconf automake libtool
# lxc-extra subpackage not needed anymore, lxc-ls has been rewriten in # lxc-extra subpackage not needed anymore, lxc-ls has been rewriten in
# C and does not depend on the Python3 binding anymore # C and does not depend on the Python3 binding anymore
Provides: lxc-extra = %{version}-%{release} Provides: lxc-extra = %{version}-%{release}
Obsoletes: lxc-extra < 1.1.5-3 Obsoletes: lxc-extra < 1.1.5-3
# https://bugzilla.redhat.com/show_bug.cgi?id=2274215 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Requires: lxc-libs%{?_isa} = %{version}-%{release}
Requires: lxcfs
Requires: openssl
Requires: rsync
# Requires: dnsmasq
# Requires: bridge-utils
# Needed to create openSUSE containers using template.
# Recommends: build
# Recommends: criu >= 2.0
%description %description
Linux Resource Containers provide process and resource isolation without the Linux Resource Containers provide process and resource isolation without the
@ -107,6 +92,17 @@ overhead of full virtualization.
The %{name}-templates package contains templates for creating containers. 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 %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
@ -130,70 +126,85 @@ This package contains documentation for %{name}.
%prep %prep
%autosetup -p1 %autosetup -p1 -n %{name}-%{version}
%build %build
%meson \ autoreconf -vif
-D examples=true \ %configure --with-distro=fedora \
-D man=true \ --enable-doc \
-D tools=true \ --enable-api-docs \
-D commands=true \ --disable-silent-rules \
-D capabilities=true \ --docdir=%{_pkgdocdir} \
-D openssl=true \ --disable-rpath \
-D selinux=true \ --disable-static \
--disable-apparmor \
--enable-selinux \
--enable-capabilities \
--enable-pam \
--enable-openssl \
%if 0%{?with_seccomp} %if 0%{?with_seccomp}
-D seccomp=true \ --enable-seccomp \
%endif %endif # with_seccomp
-D memfd-rexec=true \ --with-init-script=systemd \
-D thread-safety=true \ --disable-werror \
-D dbus=true \ # intentionally blank line
-D tests=false \
-D init-script=systemd \
-D systemd-unitdir=%{_unitdir} \
-D distrosysconfdir=sysconfig \
-D pam-cgroup=true \
-D runtime-path=%{_rundir} \
%{nil}
%meson_build
cd doc/api/ && doxygen %{make_build}
# build extra templates
tar -xf %{SOURCE2}
cd lxc-templates/
autoreconf -vif
%configure
%{make_build}
%install %install
%meson_install %{make_install}
mkdir -p %{buildroot}%{_sharedstatedir}/%{name} mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
# docs # docs
mkdir -p %{buildroot}%{_pkgdocdir}/api mkdir -p %{buildroot}%{_pkgdocdir}/api
cp -a AUTHORS README.md %{buildroot}%{_pkgdocdir} cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/ cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
# cache dir # cache dir
mkdir -p %{buildroot}%{_localstatedir}/cache/%{name} mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
# remove libtool .a file # remove libtool .la file
rm -r %{buildroot}%{_libdir}/liblxc.a rm -rf %{buildroot}%{_libdir}/liblxc.la
# lxc-net config file # lxc-net config file
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net 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 %post libs
%{?ldconfig}
%systemd_post %{name}-net.service %systemd_post %{name}-net.service
%systemd_post %{name}.service %systemd_post %{name}.service
%systemd_post lxc-monitord.service
%preun libs %preun libs
%systemd_preun %{name}-net.service %systemd_preun %{name}-net.service
%systemd_preun %{name}.service %systemd_preun %{name}.service
%systemd_preun lxc-monitord.service
%postun libs %postun libs
%{?ldconfig}
%systemd_postun %{name}-net.service %systemd_postun %{name}-net.service
%systemd_postun %{name}.service %systemd_postun %{name}.service
%systemd_postun lxc-monitord.service
%files %files
@ -209,8 +220,7 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_datadir}/%{name}/%{name}.functions %{_datadir}/%{name}/%{name}.functions
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/_%{name} %{_datadir}/bash-completion/completions/%{name}
%{_datadir}/bash-completion/completions/%{name}-*
%files libs %files libs
@ -225,9 +235,9 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_libexecdir}/%{name} %{_libexecdir}/%{name}
# fixme: should be in libexecdir? # fixme: should be in libexecdir?
%{_sbindir}/init.%{name} %{_sbindir}/init.%{name}
%if %{?with_static_init} %if 0%{?with_static_init}
%{_sbindir}/init.%{name}.static %{_sbindir}/init.%{name}.static
%endif %endif # with_static_init
%{_bindir}/%{name}-autostart %{_bindir}/%{name}-autostart
%{_sharedstatedir}/%{name} %{_sharedstatedir}/%{name}
%dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}
@ -246,22 +256,37 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_mandir}/*/man8/pam_cgfs* %{_mandir}/*/man8/pam_cgfs*
%dir %{_pkgdocdir} %dir %{_pkgdocdir}
%{_pkgdocdir}/AUTHORS %{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/README.md %{_pkgdocdir}/README
%{_pkgdocdir}/examples
%license COPYING %license COPYING
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service %{_unitdir}/%{name}@.service
%{_unitdir}/%{name}-net.service %{_unitdir}/%{name}-net.service
%{_unitdir}/%{name}-monitord.service
%dir %{_localstatedir}/cache/%{name} %dir %{_localstatedir}/cache/%{name}
%{_libdir}/security/pam_cgfs.so /%{_lib}/security/pam_cgfs.so
%files templates %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}/templates/lxc-*
%{_datadir}/%{name}/config/* %{_datadir}/%{name}/config/*
%files devel %files devel
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/lxc %{_includedir}/lxc
@ -277,51 +302,14 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%changelog %changelog
* Sat Feb 15 2025 Sérgio Basto <sergio@serjux.com> - 6.0.3-1 * Thu Aug 04 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-4
- Update lxc to 6.0.3 (#2333359) - fix rocky template patch
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-2 * Thu Aug 04 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - add a rockylinux template
* Sat Sep 21 2024 Sérgio Basto <sergio@serjux.com> - 6.0.2-1 * Thu May 19 2022 Neil Hanlon <neil@shrug.pw> - 4.0.10-2
- Update lxc to 6.0.2 (#2313692) - build additional templates into a templates-extra package
* Mon Sep 02 2024 Miroslav Suchý <msuchy@redhat.com> - 6.0.1-2
- convert license to SPDX
* Fri Jul 19 2024 Sérgio Basto <sergio@serjux.com> - 6.0.1-1
- Update lxc to 6.0.1 (#2097935)
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Apr 09 2024 Sérgio Basto <sergio@serjux.com> - 5.0.3-2
- (#2274215) force lxc requires lxc-libs
- Add more Requires
* Fri Jan 26 2024 Sérgio Basto <sergio@serjux.com> - 5.0.3-1
- Update lxc to 5.0.3 (inspired in https://build.opensuse.org/package/show/Virtualization:containers/lxc)
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu May 26 2022 Thomas Moschny <thomas.moschny@gmx.de> - 4.0.12-1
- Update to 4.0.12.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Sep 18 2021 Thomas Moschny <thomas.moschny@gmx.de> - 4.0.10-1 * Sat Sep 18 2021 Thomas Moschny <thomas.moschny@gmx.de> - 4.0.10-1
- Update to 4.0.10. - Update to 4.0.10.

View File

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