Compare commits

..

No commits in common. "a1dbe3556f75ecb4285d24feac5697c7505fd91d" and "3e1a76dded7a959dad0e35d4e8834f545b616592" have entirely different histories.

4 changed files with 60 additions and 117 deletions

View File

@ -1,15 +0,0 @@
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)

View File

@ -1,5 +1,6 @@
--- ./config/init/systemd/lxc-net.service.in.orig 2023-07-25 23:00:11.000000000 +0100
+++ ./config/init/systemd/lxc-net.service.in 2024-01-26 16:13:15.237248935 +0000
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
--- 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 @@
[Unit]
Description=LXC network bridge setup
@ -7,4 +8,4 @@
+Wants=network-online.target
Before=lxc.service
Documentation=man:lxc
ConditionVirtualization=!lxc

153
lxc.spec
View File

@ -1,66 +1,50 @@
%if 0%{?fedora}
%bcond_without seccomp
%bcond_without static_init
%global with_seccomp 1
%global with_static_init 1
%endif
%if 0%{?rhel} >= 7
%ifarch %{ix86} x86_64 %{arm} aarch64
%bcond_without seccomp
%global with_seccomp 1
%endif
%endif
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Name: lxc
Version: 6.0.3
Release: 1%{?dist}
Version: 4.0.12
Release: 6%{?dist}
Summary: Linux Resource Containers
# Automatically converted from old format: LGPLv2+ and GPLv2 - review is highly recommended.
License: LicenseRef-Callaway-LGPLv2+ AND GPL-2.0-only
License: LGPLv2+ and GPLv2
URL: https://linuxcontainers.org/lxc
Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
Source1: lxc-net
Patch0: lxc-2.0.7-fix-init.patch
Patch1: lxc-4.0.1-fix-lxc-net.patch
BuildRequires: cmake
BuildRequires: make
BuildRequires: docbook2X
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: glibc-headers
BuildRequires: kernel-headers
BuildRequires: libcap
BuildRequires: libcap-devel
%if %{?with_seccomp}
BuildRequires: pkgconfig(libseccomp)
%endif
BuildRequires: libselinux-devel
BuildRequires: meson >= 0.61
BuildRequires: openssl-devel
BuildRequires: pam
%if 0%{?with_seccomp}
BuildRequires: pkgconfig(libseccomp)
%endif # with_seccomp
BuildRequires: libcap-devel
BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: systemd-devel
BuildRequires: pkgconfig(dbus-1)
%if %{?with_static_init}
BuildRequires: openssl-devel
BuildRequires: libtool
BuildRequires: systemd
BuildRequires: pkgconfig(bash-completion)
%if 0%{?with_static_init}
BuildRequires: libcap-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
# C and does not depend on the Python3 binding anymore
Provides: lxc-extra = %{version}-%{release}
Obsoletes: lxc-extra < 1.1.5-3
# https://bugzilla.redhat.com/show_bug.cgi?id=2274215
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
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%description
Linux Resource Containers provide process and resource isolation without the
@ -130,70 +114,70 @@ This package contains documentation for %{name}.
%prep
%autosetup -p1
%autosetup -p1 -n %{name}-%{version}
%build
%meson \
-D examples=true \
-D man=true \
-D tools=true \
-D commands=true \
-D capabilities=true \
-D openssl=true \
-D selinux=true \
autoreconf -vif
%configure --with-distro=fedora \
--enable-doc \
--enable-api-docs \
--disable-silent-rules \
--docdir=%{_pkgdocdir} \
--disable-rpath \
--disable-static \
--disable-apparmor \
--enable-selinux \
--enable-capabilities \
--enable-pam \
--enable-openssl \
%if 0%{?with_seccomp}
-D seccomp=true \
%endif
-D memfd-rexec=true \
-D thread-safety=true \
-D dbus=true \
-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
--enable-seccomp \
%endif # with_seccomp
--with-init-script=systemd \
--disable-werror \
# intentionally blank line
cd doc/api/ && doxygen
%{make_build}
%install
%meson_install
%{make_install}
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
# docs
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/
# cache dir
mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
# remove libtool .a file
rm -r %{buildroot}%{_libdir}/liblxc.a
# remove libtool .la file
rm -rf %{buildroot}%{_libdir}/liblxc.la
# lxc-net config file
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%check
make check
%post libs
%{?ldconfig}
%systemd_post %{name}-net.service
%systemd_post %{name}.service
%systemd_post lxc-monitord.service
%preun libs
%systemd_preun %{name}-net.service
%systemd_preun %{name}.service
%systemd_preun lxc-monitord.service
%postun libs
%{?ldconfig}
%systemd_postun %{name}-net.service
%systemd_postun %{name}.service
%systemd_postun lxc-monitord.service
%files
@ -209,7 +193,7 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_datadir}/%{name}/%{name}.functions
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/_%{name}
%{_datadir}/bash-completion/completions/%{name}
%{_datadir}/bash-completion/completions/%{name}-*
@ -225,9 +209,9 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_libexecdir}/%{name}
# fixme: should be in libexecdir?
%{_sbindir}/init.%{name}
%if %{?with_static_init}
%if 0%{?with_static_init}
%{_sbindir}/init.%{name}.static
%endif
%endif # with_static_init
%{_bindir}/%{name}-autostart
%{_sharedstatedir}/%{name}
%dir %{_sysconfdir}/%{name}
@ -246,15 +230,13 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%{_mandir}/*/man8/pam_cgfs*
%dir %{_pkgdocdir}
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/README.md
%{_pkgdocdir}/examples
%{_pkgdocdir}/README
%license COPYING
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}-net.service
%{_unitdir}/%{name}-monitord.service
%dir %{_localstatedir}/cache/%{name}
%{_libdir}/security/pam_cgfs.so
/%{_lib}/security/pam_cgfs.so
%files templates
@ -277,31 +259,6 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-net
%changelog
* Sat Feb 15 2025 Sérgio Basto <sergio@serjux.com> - 6.0.3-1
- Update lxc to 6.0.3 (#2333359)
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Sep 21 2024 Sérgio Basto <sergio@serjux.com> - 6.0.2-1
- Update lxc to 6.0.2 (#2313692)
* 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

View File

@ -1 +1 @@
SHA512 (lxc-6.0.3.tar.gz) = 4ed41155b74afa135ae8e01f55a8cbbc7284a80e9789aaa2e69264d6b90a6527baf51f9c68dd3364aa83e7939d070f5c7dad924c751927783e883adce539fbdf
SHA512 (lxc-4.0.12.tar.gz) = 04437d9c891cd3a22f756c42f05e97398772587175d65aff9d394f0f3e810efc5c1fe7077c39573de3ec259e0605bc2a7ea51093613b2cef908372ae338df19d