X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=lxc.spec;h=1c0e53fd9dc5c505cede7a268107a04ef6dd2ba0;hb=46f2854ccf104cd01f1f8af1d821fe9f067eaf1b;hp=5f61d898919561c7aecec483d7cb0b54505874be;hpb=16cf226e8c180336ace8a5b9a4ab88ebf64b04e4;p=packages%2Flxc.git diff --git a/lxc.spec b/lxc.spec index 5f61d89..1c0e53f 100644 --- a/lxc.spec +++ b/lxc.spec @@ -12,15 +12,18 @@ Summary: Linux Containers userspace tools Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC) Name: lxc -Version: 1.0.0 -Release: 0.3 +Version: 1.0.7 +Release: 2 License: LGPL v2.1+ Group: Applications/System -Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz -# Source0-md5: 87a9d168a6e55326303cce3b2cb7f82e +Source0: https://www.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz +# Source0-md5: b48f468a9bef0e4e140dd723f0a65ad0 Source1: %{name}-pld.in.sh +Source2: %{name}.init +Source3: %{name}_macvlan.init +Source4: %{name}_macvlan.sysconfig Patch1: %{name}-pld.patch -URL: http://linuxcontainers.org/ +URL: https://www.linuxcontainers.org/ BuildRequires: autoconf >= 2.50 BuildRequires: automake BuildRequires: docbook-dtd30-sgml @@ -30,9 +33,11 @@ BuildRequires: gnutls-devel %{?with_apparmor:BuildRequires: libapparmor-devel} BuildRequires: libcap-devel %{?with_seccomp:BuildRequires: libseccomp-devel} +BuildRequires: libxslt-progs %{?with_lua:BuildRequires: lua51-devel >= 5.1} BuildRequires: pkgconfig %{?with_python:BuildRequires: python3-devel >= 3.2} +BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.612 BuildRequires: sed >= 4.0 Requires: rc-scripts >= 0.4.6 @@ -41,6 +46,7 @@ Suggests: gnupg Suggests: gnupg-plugin-keys_curl Suggests: gnupg-plugin-keys_hkp Suggests: net-tools +Suggests: python3-lxc Suggests: rsync BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -150,7 +156,9 @@ cp -p %{SOURCE1} templates/lxc-pld.in %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} +install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \ + -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} + %{__make} install \ SYSTEMD_UNIT_DIR=%{systemdunitdir} \ pcdatadir=%{_pkgconfigdir} \ @@ -161,23 +169,47 @@ install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} %{__rm} -r $RPM_BUILD_ROOT%{_docdir} +# apparmor profiles are not packaged, remove to avoid packagers confusion +%{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d + +# yum plugin, no idea where to package this +%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py + +install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc +install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc_macvlan +install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan + %if %{with python} %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc %endif %if %{with lua} -%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top +%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua5.1,' $RPM_BUILD_ROOT%{_bindir}/lxc-top %endif %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig +/sbin/chkconfig --add lxc +/sbin/chkconfig --add lxc_macvlan + +# %service lxc restart + +%preun +if [ "$1" = "0" ]; then + %service lxc stop + /sbin/chkconfig --del lxc + %service lxc_macvlan stop + /sbin/chkconfig --del lxc_macvlan +fi + %postun -p /sbin/ldconfig + %files %defattr(644,root,root,755) -%doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf +%doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf %attr(755,root,root) %{_bindir}/lxc-attach %attr(755,root,root) %{_bindir}/lxc-autostart %attr(755,root,root) %{_bindir}/lxc-cgroup @@ -198,23 +230,28 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/lxc-unshare %attr(755,root,root) %{_bindir}/lxc-usernsexec %attr(755,root,root) %{_bindir}/lxc-wait +%attr(755,root,root) %{_sbindir}/init.lxc %attr(755,root,root) %{_libdir}/liblxc.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1 %attr(754,root,root) /etc/rc.d/init.d/lxc +%attr(754,root,root) /etc/rc.d/init.d/lxc_macvlan + %{systemdunitdir}/lxc.service %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/rootfs %{_libdir}/%{name}/rootfs/README %attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup -%attr(755,root,root) %{_libdir}/%{name}/lxc-init %attr(755,root,root) %{_libdir}/%{name}/lxc-monitord %attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic +%attr(755,root,root) %{_libdir}/%{name}/lxc-autostart-helper %dir %{_sysconfdir}/lxc +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf %dir %{_datadir}/%{name} %{_datadir}/%{name}/lxc.functions %dir %{_datadir}/%{name}/config %{_datadir}/%{name}/config/centos.*.conf +%{_datadir}/%{name}/config/common.seccomp %{_datadir}/%{name}/config/debian.*.conf %{_datadir}/%{name}/config/fedora.*.conf %{_datadir}/%{name}/config/gentoo.*.conf @@ -266,6 +303,7 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1* %exclude %{_mandir}/ja/man1/lxc-top.1* + %if %{without python} # legacy version %attr(755,root,root) %{_bindir}/lxc-ls