]> git.pld-linux.org Git - packages/lxcfs.git/blob - lxcfs.spec
3f8ad8b0802d5159a755b3a56a8947a75bb47537
[packages/lxcfs.git] / lxcfs.spec
1 Summary:        FUSE filesystem for LXC
2 Name:           lxcfs
3 Version:        2.0.2
4 Release:        0.1
5 License:        Apache v2.0
6 Group:          Applications/System
7 Source0:        https://linuxcontainers.org/downloads/lxcfs/%{name}-%{version}.tar.gz
8 # Source0-md5:  fea9124c9d6d7370e12c4a3f0d405541
9 URL:            https://linuxcontainers.org/lxcfs/
10 Patch0:         0001-skip-empty-entries-under-proc-self-cgroup.patch
11 BuildRequires:  help2man
12 BuildRequires:  libfuse-devel
13 BuildRequires:  pam-devel
14 BuildRequires:  pkg-config
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         _libexecdir     %{_prefix}/lib
18
19 %description
20 LXCFS is a simple userspace filesystem designed to work around some
21 current limitations of the Linux kernel.
22
23 Specifically, it's providing two main things:
24 - A set of files which can be bind-mounted over their /proc originals
25   to provide CGroup-aware values.
26 - A cgroupfs-like tree which is container aware.
27
28 The code is pretty simple, written in C using libfuse and glib.
29
30 The main driver for this work was the need to run systemd based
31 containers as a regular unprivileged user while still allowing systemd
32 inside the container to interact with cgroups.
33
34 Now with the introduction of the cgroup namespace in the Linux kernel,
35 that part is no longer necessary on recent kernels and focus is now on
36 making containers feel more like a real independent system through the
37 proc masking feature.
38
39 %package -n pam-pam_cgfs
40 Summary:        CGroup FS pam module
41 Group:          Libraries
42
43 %description -n pam-pam_cgfs
44 When a user logs in, this pam module will create cgroups which the
45 user may administer, either for all controllers or for any controllers
46 listed on the command line.
47
48 %prep
49 %setup -q
50 %patch0 -p1
51
52 %build
53 %configure \
54         --with-distro=suse \
55
56 %{__make} %{?_smp_mflags}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %{__make} install \
61         DESTDIR=$RPM_BUILD_ROOT
62
63 install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{_libexecdir},%{_includedir}/%{name},%{_localstatedir}/lib/%{name}}
64
65 cp -p config/init/systemd/*.service $RPM_BUILD_ROOT%{systemdunitdir}
66
67 # The shared library liblxcfs.so used by lxcfs is not supposed to be used by
68 # any other program. So we follow best practice and install it in
69 # %{_prefix}/lib/lxcfs. Note that lxcfs *expects* liblxcfs.so to be found in
70 # %{_prefix}/lib/lxcfs when it cannot find it in the lib.so path.
71 install -p .libs/liblxcfs.so $RPM_BUILD_ROOT%{_libexecdir}
72 rm $RPM_BUILD_ROOT%{_libdir}/liblxcfs.so*
73 rm $RPM_BUILD_ROOT%{_libdir}/liblxcfs.la
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %if 0
79 %pre
80 %service_add_pre lxcfs.service
81
82 %post
83 %service_add_post lxcfs.service
84
85 %preun
86 %service_del_preun lxcfs.service
87
88 %postun
89 %service_del_postun lxcfs.service
90 %endif
91
92 %files
93 %defattr(644,root,root,755)
94 %doc AUTHORS ChangeLog README
95 %attr(755,root,root) %{_bindir}/lxcfs
96 %{_mandir}/man1/lxcfs.1*
97 %{systemdunitdir}/lxcfs.service
98 %dir %{_datadir}/%{name}
99 %attr(755,root,root) %{_datadir}/%{name}/lxc.mount.hook
100 %attr(755,root,root) %{_datadir}/%{name}/lxc.reboot.hook
101 %dir %{_localstatedir}/lib/%{name}
102
103 %{_datadir}/lxc/config/common.conf.d/00-lxcfs.conf
104
105 # The lxcfs executable requires liblxcfs.so be installed. It calls dlopen() to
106 # dynamically reload the shared library on upgrade. This is important. Do *not*
107 # split into a separate package and do not turn this into a versioned shared
108 # library! (This shared library allows lxcfs to be updated without having to
109 # restart it which is good when you have important system containers running!)
110 %{_libexecdir}/liblxcfs.so
111
112 %files -n pam-pam_cgfs
113 %defattr(644,root,root,755)
114 /%{_lib}/security/pam_cgfs.so
This page took 0.064363 seconds and 2 git commands to generate.