lxc/lxc.spec

375 lines
11 KiB
RPMSpec
Raw Normal View History

%global _release 2021091702
2019-09-30 11:03:07 -04:00
Name: lxc
Version: 4.0.3
2019-11-06 19:42:19 +08:00
Release: %{_release}
2019-09-30 11:03:07 -04:00
Summary: Linux Containers userspace tools
License: LGPLv2+
URL: https://github.com/lxc/lxc
Source0: https://linuxcontainers.org/downloads/lxc/lxc-4.0.3.tar.gz
Patch0001: 0001-huawei-adapt-to-huawei-4.0.3.patch
Patch0002: 0002-add-mount-label-for-rootfs.patch
Patch0003: 0003-format-code-and-verify-mount-mode.patch
Patch0004: 0004-Removes-the-definition-of-the-thread-attributes-obje.patch
Patch0005: 0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch
Patch0006: 0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch
Patch0007: 0007-Using-string-type-instead-of-security_context_t-beca.patch
Patch0008: 0008-hook-pass-correct-mount-dir-as-root-to-hook.patch
Patch0009: 0009-cgroup-refact-cgroup-manager-to-single-file.patch
Patch0010: 0010-cgfsng-adjust-log-level-from-error-to-warn.patch
Patch0011: 0011-rootfs-add-make-private-for-root.path-parent.patch
Patch0012: 0012-mount-make-possible-to-bind-mount-proc-and-sys-fs.patch
Patch0013: 0013-use-path-based-unix-domain-sockets-instead-of-abstra.patch
Patch0014: 0014-api-add-get-container-metrics-api.patch
Patch0015: 0015-Streaming-IO-solution-optimization-and-enhancement.patch
Patch0016: 0016-avoid-using-void-pointers-in-caclulation.patch
Patch0017: 0017-fix-compilation-errors-without-libcap.patch
Patch0018: 0018-IO-fix-io-data-miss-when-exec-with-pipes.patch
Patch0019: 0019-metrics-add-total_inactive_file-metric-for-memory.patch
Patch0020: 0020-support-cgroup-v2.patch
Patch0021: 0021-support-isula-exec-workdir.patch
Patch0022: 0022-print-error-message-if-process-workdir-failed.patch
Patch0023: 0023-log-support-long-syslog-tag.patch
Patch0024: 0024-log-adjust-log-level-from-error-to-warn.patch
Patch0025: 0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch
Patch0026: 0026-coredump-fix-coredump-when-cgroup-get-return-error.patch
Patch0027: 0027-add-help-for-new-arguments.patch
Patch0028: 0028-seccomp-init-and-destroy-notifier.cookie.patch
Patch0029: 0029-just-use-origin-loop-if-do-not-have-io.patch
2019-09-30 11:03:07 -04:00
2019-11-06 19:42:19 +08:00
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
2019-09-30 11:03:07 -04:00
BuildRequires: pkgconfig(libseccomp)
2019-11-06 19:42:19 +08:00
BuildRequires: libcap libcap-devel libselinux-devel yajl yajl-devel
BuildRequires: pkgconfig(bash-completion)
2019-09-30 11:03:07 -04:00
Requires: lxc-libs = 4.0.3-%{release}
%package libs
Summary: Runtime library files for %{name}
2019-09-30 11:03:07 -04:00
Requires: rsync
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description libs
Linux Resource Containers provide process and resource isolation without the
overhead of full virtualization.
The %{name}-libs package contains libraries for running %{name} applications.
2019-12-25 15:57:42 +08:00
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/lxc-4.0.3}
2019-09-30 11:03:07 -04:00
%description
Containers are insulated areas inside a system, which have their own namespace
for filesystem, network, PID, IPC, CPU and memory allocation and which can be
created using the Control Group and Namespace features included in the Linux
kernel.
2019-11-06 19:42:19 +08:00
This package provides the lxc-* tools and libraries for running lxc
2019-09-30 11:03:07 -04:00
applications, which can be used to start a single daemon in a container, or to
boot an entire "containerized" system, and to manage and debug your containers.
%package devel
2019-11-06 19:42:19 +08:00
Summary: Development files for lxc
Requires: lxc = 4.0.3-%{release}
2019-09-30 11:03:07 -04:00
Requires: pkgconfig
%description devel
2019-11-06 19:42:19 +08:00
The lxc-devel package contains header files ,library and templates needed for
2019-09-30 11:03:07 -04:00
development of the Linux containers.
%package help
2019-11-06 19:42:19 +08:00
Summary: Documentation and templates for lxc
2019-09-30 11:03:07 -04:00
BuildArch: noarch
%description help
2019-11-06 19:42:19 +08:00
This package contains documentation for lxc for creating containers.
2019-09-30 11:03:07 -04:00
%prep
%autosetup -n lxc-4.0.3 -Sgit -p1
2019-09-30 11:03:07 -04:00
%build
2019-11-20 19:19:07 +08:00
%configure --enable-doc --enable-api-docs \
2019-09-30 11:03:07 -04:00
--disable-silent-rules --docdir=%{_pkgdocdir} --disable-rpath \
--disable-static --disable-apparmor --enable-selinux \
--enable-seccomp \
--with-init-script=systemd --disable-werror
%{make_build}
%install
%{make_install}
2019-11-20 19:19:07 +08:00
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
mkdir -p %{buildroot}%{_datadir}/%{name}/__pycache__
touch %{buildroot}%{_datadir}/%{name}/__pycache__/%{name}
2019-09-30 11:03:07 -04:00
2019-11-20 19:19:07 +08:00
for file in $(find %{buildroot}/usr/bin/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
2019-09-30 11:03:07 -04:00
do
chrpath -d ${file}
done
2019-11-20 19:19:07 +08:00
for file in $(find %{buildroot}/usr/sbin/* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
2019-09-30 11:03:07 -04:00
do
chrpath -d ${file}
done
2019-11-20 19:19:07 +08:00
for file in $(find %{buildroot}/usr/libexec/lxc/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
2019-09-30 11:03:07 -04:00
do
chrpath -d ${file}
done
chrpath -d %{buildroot}/usr/lib64/liblxc.so
2020-08-03 11:11:51 +08:00
chmod +x %{buildroot}/usr/lib64/liblxc.so
2019-09-30 11:03:07 -04:00
# docs
mkdir -p %{buildroot}%{_pkgdocdir}/api
cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
# cache dir
2019-11-20 19:19:07 +08:00
mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
2019-09-30 11:03:07 -04:00
if [ ! -d %{buildroot}%{_sysconfdir}/sysconfig ]
then
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
touch %{buildroot}%{_sysconfdir}/sysconfig/%{name}
fi
2019-09-30 11:03:07 -04:00
# remove libtool .la file
rm -rf %{buildroot}%{_libdir}/liblxc.la
2019-12-13 15:46:36 +08:00
rm -rf %{buildroot}%{_sbindir}/init.%{name}.static
rm -rf %{buildroot}%{_sysconfdir}/default/%{name}
2019-09-30 11:03:07 -04:00
%check
make check
%post
%preun
%postun
%files
%defattr(-,root,root)
2019-11-20 19:19:07 +08:00
%{_bindir}/%{name}-*
%{_datadir}/%{name}/%{name}.functions
2019-09-30 11:03:07 -04:00
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
2019-11-06 19:42:19 +08:00
%{_datadir}/bash-completion/completions/lxc
%files libs
%defattr(-,root,root)
2019-09-30 11:03:07 -04:00
%{_libdir}/liblxc.so
%{_libdir}/liblxc.so.*
2019-11-20 19:19:07 +08:00
%{_libdir}/%{name}
%{_libexecdir}/%{name}
%{_sbindir}/init.%{name}
%{_sharedstatedir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/default.conf
%config(noreplace) %{_sysconfdir}/lxc/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
2019-11-20 19:19:07 +08:00
2019-09-30 11:03:07 -04:00
%dir %{_pkgdocdir}
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/README
%license COPYING
2019-11-20 19:19:07 +08:00
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}-net.service
%dir %{_localstatedir}/cache/%{name}
2019-09-30 11:03:07 -04:00
%files devel
%defattr(-,root,root)
2019-11-20 19:19:07 +08:00
%{_includedir}/%{name}/*
%{_libdir}/pkgconfig/%{name}.pc
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/hooks
%{_datadir}/%{name}/lxc-patch.py*
%{_datadir}/%{name}/selinux
%dir %{_datadir}/%{name}/templates
%{_datadir}/%{name}/templates/lxc-*
%dir %{_datadir}/%{name}/config
%{_datadir}/%{name}/config/*
%dir %{_datadir}/%{name}/__pycache__
%{_datadir}/%{name}/__pycache__/*
2019-09-30 11:03:07 -04:00
%files help
%dir %{_pkgdocdir}
%{_pkgdocdir}/*
2019-11-20 19:19:07 +08:00
%{_mandir}/man1/%{name}*
%{_mandir}/*/man1/%{name}*
%{_mandir}/man5/%{name}*
%{_mandir}/man7/%{name}*
%{_mandir}/*/man5/%{name}*
%{_mandir}/*/man7/%{name}*
2019-12-25 15:57:42 +08:00
%changelog
* Fri Sep 17 2021 haozi007<liuhao27@huawei.com> - 4.0.3-2021091702
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:just use origin loop if do not have io
* Fri Sep 17 2021 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.0.3-2021091701
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:seccomp init and destroy notifier.cookie
* Thu Aug 26 2021 haozi007 <liuhao27@huawei.com> - 4.0.3-2021082601
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add help info for new arguments
* Sat Jun 12 2021 lifeng <lifeng68@huawei.com> - 4.0.3-2021061201
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix coredump
* Tue Jun 01 2021 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.0.3-2021060101
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:adjust log level
* Thu Mar 13 2021 lifeng <lifeng68@huawei.com> - 4.0.3-2021051301
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:adjust log level
* Sat Mar 08 2021 haozi007 <liuhao27@huawei.com> - 4.0.3-2021050802
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:support long syslog tag
* Sat Mar 08 2021 wangfengtu <wangfengtu@huawei.com> - 4.0.3-2021050801
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:print error message if process workdir failed
* Wed Apr 07 2021 wangfengtu <wangfengtu@huawei.com> - 4.0.3-2021040701
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:some patches missing in series.conf
* Thu Mar 11 2021 wangfengtu <wangfengtu@huawei.com> - 4.0.3-2021031102
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: support isula exec --workdir
* Wed Mar 31 2021 wangfengtu <wangfengtu@huawei.com> - 4.0.3-2021033101
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: support cgroup v2
* Thu Jan 28 2021 lifeng <lifeng68@huawei.com> - 4.0.3-2021012801
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add inactive file total metrics
* Wed Jan 21 2021 lifeng <lifeng68@huawei.com> - 4.0.3-2021012001
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: fix io data miss when exec with pipes
* Tue Jan 2021 wujing <wujing50@huawei.com> - 4.0.3-2021010501
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: fix compilation errors without libcap
* Thu Dec 24 2020 wujing <wujing50@huawei.com> - 4.0.3-2020122401
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Streaming IO solution optimization and enhancement
* Tue Dec 15 2020 lifeng <lifeng68@huawei.com> - 4.0.3-2020121501
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add get container metrics api to get the stat
* Mon Dec 07 2020 wujing <wujing50@huawei.com> - 4.0.3-2020120701
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: use path based unix domain sockets instead of abstract namespace sockets
* Fri Nov 27 2020 lifeng <lifeng68@openeuler.org> - 4.0.3-2020112701
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: mount: make possible to bind mount /proc and /sys/fs.
- 1. add check whether have /proc mounts entry, if has, skip the auto
- 2. mount cgroup before do mount entrys
- 3. pass if the mount on top of /proc and the source of the mount is a proc filesystem
* Fri Nov 13 2020 lifeng <lifeng68@openeuler.org> - 4.0.3-2020111701
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add make private for root.path parent
* Fri Nov 13 2020 lifeng <lifeng68@openeuler.org> - 4.0.3-2020111301
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: adjust log level from error to warn
* Tue Nov 3 2020 lifeng <lifeng68@openeuler.org> - 4.0.3-2020110301
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: 1. fix hook root dir error and refact cgroup
* Sat Oct 10 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020101001
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add patchs to series.conf
* Fri Sep 25 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020092501
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Code optimization
* Fri Sep 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020091101
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: modify source0 address
* Wed Sep 02 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020090101
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: modify source0 address
2020-08-03 11:11:51 +08:00
* Mon Aug 03 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020080301
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add debug packages
* Mon Apr 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020071501
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: update lxc to 4.0.3