Browse Source

lxc-5.0.1-1

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
2fa2a00b34
1 changed files with 66 additions and 87 deletions
  1. 66 87
      l/lxc/lxc-vl.spec

+ 66 - 87
l/lxc/lxc-vl.spec

@@ -1,9 +1,6 @@
 %bcond_with systemd
+%bcond_with python3
 %bcond_with lua
-%global with_python3 0
-%if %{with systemd}
-%global with_systemd 0
-%endif
 
 %global luaver 5.4
 %global lualibdir %{_libdir}/lua/%{luaver}
@@ -12,7 +9,7 @@
 %define _unpackaged_files_terminate_build 1
 
 Name:           lxc
-Version:        4.0.11
+Version:        5.0.1
 Release:        1%{?_dist_release}%{?with_systemd:.systemd}
 Summary:        Linux Resource Containers
 Summary(ja):    Linux リソースコンテナ
@@ -28,8 +25,12 @@ Source11:       vinelinux.common.conf
 Source12:       vinelinux.userns.conf
 
 Patch0:         0001-fix-initscript.patch
+# https://github.com/lxc/lxc/commit/d83051ea6a0df1dbaa255be1291b739f3a2f7f09
+Patch1:         lxc-glibc-2.36.patch
 Patch100:       0002-fix-launching-dnsmasq.patch
 
+BuildRequires:  meson
+BuildRequires:  cmake
 BuildRequires:  docbook-utils
 BuildRequires:  docbook2X
 BuildRequires:  doxygen
@@ -42,24 +43,25 @@ BuildRequires:  libtool
 BuildRequires:  lua-devel
 %endif
 BuildRequires:  perl-XML-SAX
-%if 0%{?with_python3}
+%if %{with python3}
 BuildRequires:  python3-devel >= 3.2
 BuildRequires:  python3-rpm-macros
 %endif # with_python3
-%if 0%{?with_systemd}
-BuildRequires:  systemd
+%if %{with systemd}
+BuildRequires:  systemd-devel
 %endif # with_systemd
 # for lxc-top
 %if %{with lua}
 Requires:       lua-%{name}%{?_isa} = %{version}-%{release}
 Requires:       lua-alt-getopt
 %endif
-%if !0%{?with_systemd}
+%if !%{with systemd}
 Requires:       libcgroup
 %endif
 Obsoletes:      lxc-extra < 3.0.0
 Obsoletes:      lxc-lua < 3.0.0
 Obsoletes:      python3-lxc < 3.0.0
+Obsoletes:      lxc-doc < 5.0.0
 
 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
 
@@ -72,7 +74,7 @@ overhead of full virtualization.
 Summary:        Runtime library files for %{name}
 Summary(ja):    %{name}のランタイムライブラリ
 Group:          virtualization
-%if 0%{?with_systemd}
+%if %{with systemd}
 Requires(post): systemd
 Requires(preun): systemd
 Requires(postun): systemd
@@ -90,7 +92,7 @@ overhead of full virtualization.
 The %{name}-libs package contains libraries for running %{name} applications.
 
 
-%if 0%{?with_python3}
+%if %{with python3}
 %package        -n python3-%{name}
 Summary:        Python binding for %{name}
 Summary(ja):    %{name} の Python バインディング
@@ -150,7 +152,6 @@ Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
 # is missing. Moving each template to its own subpackage on the other
 # hand would be overkill.
 
-
 %description    templates
 Linux Resource Containers provide process and resource isolation without the
 overhead of full virtualization.
@@ -173,117 +174,106 @@ The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
 
-%package        doc
-Summary:        Documentation for %{name}
-Summary(ja):    %{name} のドキュメント
-Group:          documentation
-BuildArch:      noarch
-
-%description    doc
-This package contains documentation for %{name}.
+%debug_package
 
 
 %prep
 %setup -q -n %{name}-%{version}
-%if !0%{?with_systemd}
+%if !%{with systemd}
 %patch0 -p1
 %endif
+%patch1 -p1
 %patch100 -p1
 
 
 %build
-./autogen.sh
-%configure --with-distro=centos \
-           --enable-doc \
-           --enable-api-docs \
-           --disable-silent-rules \
-           --docdir=%{_pkgdocdir} \
-           --disable-werror \
-           --disable-rpath \
-           --disable-static \
-           --disable-apparmor \
-           --disable-selinux \
-           --enable-capabilities \
-           --enable-examples \
-           --enable-bash \
-%if %{with lua}
-           --enable-lua \
-%endif
-%if 0%{?with_python3}
-           --enable-python \
-%endif # with_python3
-%if 0%{?with_systemd}
-           --with-init-script=systemd \
+%meson \
+	-Dapparmor=false \
+	-Dselinux=false \
+%if %{with systemd}
+	-Dinit-script=systemd \
 %else
-           --with-init-script=sysvinit \
+	-Dinit-script=sysvinit \
+	-Dsd-bus=disabled \
 %endif # with_systemd
-           %{nil}
+	%{nil}
 
-make %{?_smp_mflags}
+%meson_build
 
 
 %install
-%{make_install}
-make DESTDIR=%{buildroot} install
+%meson_install
+
 mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
 %if %{with lua}
 chmod -x %{buildroot}%{luapkgdir}/lxc.lua
 %endif
 
 rm -rf rpmdoc
-mkdir -p rpmdoc/api
-cp -a doc/api/html/* rpmdoc/api/
+mkdir -p rpmdoc
 mv -f %{buildroot}%{_docdir}/lxc/examples rpmdoc/
 
 # cache dir
 mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
 
 rm -rf %{buildroot}%{_datadir}/lxc/selinux
+find %{buildroot}%{_libdir} -name "*.a" -delete
 
 # install vinelinux template
 install -m775 %{SOURCE10} %{buildroot}%{_datadir}/lxc/templates/
 install -m775 %{SOURCE11} %{buildroot}%{_datadir}/lxc/config/
 install -m775 %{SOURCE12} %{buildroot}%{_datadir}/lxc/config/
 
-rm -f %{buildroot}%{_libdir}/liblxc.{a,la}
+%if !%{with systemd}
+mkdir -p %{buildroot}%{_initdir}
+mv -f %{buildroot}%{_sysconfdir}/init.d/* %{buildroot}%{_initdir}/
+chmod 755 %{buildroot}%{_initdir}/*
+%endif # with_systemd
 
 
 %check
-make check
+%meson_test
 
 
 %post libs
-%if 0%{?with_systemd}
+%if %{with systemd}
 %systemd_post %{name}-net.service
 %systemd_post %{name}.service
 %systemd_post %{name}@.service
+%systemd_post %{name}-monitord.service
 %else
-/sbin/chkconfig --add %{name}
+/sbin/chkconfig --add %{name}-net
+/sbin/chkconfig --add %{name}-containers
+if [ $1 -gt 1 -a -x %{initdir}/%{name} ]; then
+        /sbin/service %{name} stop > /dev/null 2>&1
+        /sbin/chkconfig --del %{name}
+fi
 %endif # with_systemd
 
-
 %preun libs
-%if 0%{?with_systemd}
+%if %{with systemd}
 %systemd_preun %{name}-net.service
 %systemd_preun %{name}.service
 %systemd_preun %{name}@.service
+%systemd_preun %{name}-monitord.service
 %else
 if [ $1 -eq 0 -o -x /bin/systemctl ]; then
-        /sbin/service %{name} stop > /dev/null 2>&1
-        /sbin/chkconfig --del %{name}
+        /sbin/service %{name}-containers stop > /dev/null 2>&1
+        /sbin/service %{name}-net stop > /dev/null 2>&1
+        /sbin/chkconfig --del %{name}-containers
+        /sbin/chkconfig --del %{name}-net
 fi
 %endif # with_systemd
 
-
 %postun libs
-%if 0%{?with_systemd}
+%if %{with systemd}
 %systemd_postun %{name}-net.service
 %systemd_postun %{name}.service
 %systemd_postun %{name}@.service
-
+%systemd_postun %{name}-monitord.service
 %else
 if [ $1 -ge 1 ]; then
-        /sbin/service %{name} condrestart > /dev/null 2>&1 || :
+        /sbin/service %{name}-container condrestart > /dev/null 2>&1 || :
 fi
 %endif # with_systemd
 
@@ -302,7 +292,7 @@ fi
 %exclude %{_mandir}/man1/%{name}-user-nic*
 %exclude %{_mandir}/*/man1/%{name}-user-nic*
 %{_datadir}/%{name}/%{name}.functions
-%if 0%{?with_python3}
+%if %{with python3}
 %exclude %{_bindir}/%{name}-device
 %exclude %{_bindir}/%{name}-ls
 %exclude %{_mandir}/man1/%{name}-device*
@@ -310,9 +300,9 @@ fi
 %exclude %{_mandir}/*/man1/%{name}-device*
 %exclude %{_mandir}/*/man1/%{name}-ls*
 %endif
-%dir %{_sysconfdir}/bash_completion.d/
-%{_sysconfdir}/bash_completion.d/*
-
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/*
 
 %files libs
 %dir %{_datadir}/%{name}
@@ -338,22 +328,17 @@ fi
 %{_mandir}/man7/%{name}*
 %{_mandir}/*/man5/%{name}*
 %{_mandir}/*/man7/%{name}*
-%if 0%{?with_systemd}
-%{_unitdir}/%{name}.service
-%{_unitdir}/%{name}@.service
-%{_unitdir}/%{name}-net.service
+%if %{with systemd}
+%{_unitdir}/*.service
 %else
-%{_sysconfdir}/rc.d/init.d/%{name}
-%{_sysconfdir}/rc.d/init.d/%{name}-net
+%{_initdir}/*
 %endif # with_systemd
 %dir %{_localstatedir}/cache/%{name}
 
-
-%if 0%{?with_python3}
+%if %{with python3}
 %files -n python3-%{name}
 %{python3_sitearch}/*
 
-
 %files extra
 %{_bindir}/%{name}-device
 %{_bindir}/%{name}-ls
@@ -363,40 +348,34 @@ fi
 %{_mandir}/*/man1/%{name}-ls*
 %endif # with_python3
 
-
 %if %{with lua}
 %files -n lua-%{name}
 %{lualibdir}/%{name}
 %{luapkgdir}/%{name}.lua
 %endif
 
-
 %files templates
 %{_datadir}/%{name}/templates/lxc-*
 %{_datadir}/%{name}/config/*
 
-
 %files devel
 %{_libdir}/pkgconfig/%{name}.pc
 %{_includedir}/lxc
 %{_libdir}/liblxc.so
 
 
-%files doc
-%license COPYING LICENSE*
-%doc AUTHORS MAINTAINERS README*
-%doc rpmdoc/api
-
-
 %changelog
+* Thu Oct 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
+- new upstream release.
+
 * Thu Nov 04 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.11-1
-- new upstream release,
+- new upstream release.
 
 * Wed May 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.9-1
-- new upstream release,
+- new upstream release.
 
 * Mon Aug 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.4-1
-- new upstream release,
+- new upstream release.
 - added systemd support (disabled as default).
 
 * Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.0-1