079e5dda75
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxcfs?expand=0&rev=10
127 lines
4.2 KiB
RPMSpec
127 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package lxcfs
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: lxcfs
|
|
Version: 2.0.7
|
|
Release: 0
|
|
Summary: FUSE filesystem for LXC
|
|
License: Apache-2.0
|
|
Group: System/Management
|
|
Url: http://linuxcontainers.org
|
|
Source: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
|
|
Source1: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz.asc#/%{name}-%{version}.tar.gz.asc
|
|
Source2: %{name}.keyring
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: help2man
|
|
BuildRequires: libtool
|
|
BuildRequires: pam-devel
|
|
BuildRequires: pkg-config
|
|
BuildRequires: pkgconfig(fuse)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
LXCFS is a simple userspace filesystem designed to work around some current limitations of the Linux kernel.
|
|
|
|
Specifically, it's providing two main things
|
|
|
|
A set of files which can be bind-mounted over their /proc originals
|
|
to provide CGroup-aware values.
|
|
A cgroupfs-like tree which is container aware.
|
|
The code is pretty simple, written in C using libfuse and glib.
|
|
|
|
The main driver for this work was the need to run systemd based containers as a regular unprivileged user
|
|
while still allowing systemd inside the container to interact with cgroups.
|
|
|
|
Now with the introduction of the cgroup namespace in the Linux kernel, that part is no longer necessary
|
|
on recent kernels and focus is now on making containers feel more like a real independent system through
|
|
the proc masking feature.
|
|
|
|
%package -n pam_cgfs
|
|
Summary: CGroup FS pam module
|
|
Group: System/Libraries
|
|
|
|
%description -n pam_cgfs
|
|
When a user logs in, this pam module will create cgroups which the user may
|
|
administer, either for all controllers or for any controllers listed on the
|
|
command line.
|
|
|
|
%prep
|
|
%setup
|
|
|
|
%build
|
|
autoreconf --force --install
|
|
%configure --with-distro=suse
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot} %{?_smp_mflags}
|
|
install -d -m 0755 %{buildroot}%{_unitdir}
|
|
install -p -m 0644 config/init/systemd/*.service %{buildroot}%{_unitdir}/
|
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
|
ln -sf service %{buildroot}%{_sbindir}/rc%{name}
|
|
install -d -m 0755 %{buildroot}%{_includedir}/%{name}
|
|
rm bindings.h
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}/
|
|
|
|
# The shared library liblxcfs.so used by lxcfs is not supposed to be used by
|
|
# any other program. So we follow best practice and install it in
|
|
# /usr/lib/lxcfs. Note that lxcfs *expects* liblxcfs.so to be found in
|
|
# /usr/lib/lxcfs when it cannot find it in the lib.so path.
|
|
mkdir -p %{buildroot}/usr/lib/%{name}/
|
|
install -p -m 0755 .libs/liblxcfs.so %{buildroot}/usr/lib/%{name}/
|
|
rm -f %{buildroot}%{_libdir}/liblxcfs.so*
|
|
rm -f %{buildroot}%{_libdir}/liblxcfs.la
|
|
|
|
%pre
|
|
%service_add_pre lxcfs.service
|
|
|
|
%post
|
|
%service_add_post lxcfs.service
|
|
|
|
%preun
|
|
%service_del_preun lxcfs.service
|
|
|
|
%postun
|
|
%service_del_postun lxcfs.service
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS ChangeLog README COPYING
|
|
%{_sbindir}/*
|
|
%{_bindir}/*
|
|
%{_datadir}/lxc
|
|
%{_datadir}/%{name}
|
|
%{_mandir}/man1/*
|
|
%{_unitdir}/*
|
|
%dir %{_localstatedir}/lib/%{name}
|
|
|
|
# The lxcfs executable requires liblxcfs.so be installed. It calls dlopen() to
|
|
# dynamically reload the shared library on upgrade. This is important. Do *not*
|
|
# split into a separate package and do not turn this into a versioned shared
|
|
# library! (This shared library allows lxcfs to be updated without having to
|
|
# restart it which is good when you have important system containers running!)
|
|
%dir /usr/lib/%{name}
|
|
/usr/lib/%{name}/liblxcfs.so
|
|
|
|
%files -n pam_cgfs
|
|
%defattr(-,root,root)
|
|
/%{_lib}/security/pam_cgfs.so
|
|
|
|
%changelog
|