-
Notifications
You must be signed in to change notification settings - Fork 250
/
lxcfs.spec.in
77 lines (67 loc) · 1.98 KB
/
lxcfs.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Set with_systemd on distros that use it, so we can install the service
# file, otherwise the sysvinit script will be installed
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
%global with_systemd 1
%define init_script systemd
#
# BuildRequires systemd-units on fedora and rhel
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7
BuildRequires: systemd-units
%endif
#
# BuildRequires systemd on openSUSE and SUSE
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%endif
%else
%global with_systemd 0
%define init_script sysvinit
%endif
Summary: Linux Containers File System
Name: {{PROJECT}}
Version: {{PROJECT_VERSION}}
Release: 1%{?dist}
URL: https://linuxcontainers.org/lxcfs/downloads/
Source0: %{name}-%{version}.tar.gz
License: LGPL 2.1+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: docbook2X
BuildRequires: doxygen
BuildRequires: fuse-devel
Requires: fuse-libs
%description
LXCFS is a simple userspace filesystem designed to work around some current limitations of the Linux kernel.
%prep
%setup -q
%build
%configure \
--with-init-script=%{init_script}
%{make_build}
#Modify mount hook command if running on RHEL 7 to skip cgroup mounts for stability reasons.
%if 0%{?rhel} == 7
sed -i 's/\/lxc.mount.hook/\/lxc.mount.hook --skip-cgroup-mounts/g' share/00-lxcfs.conf
%endif
%install
[ %{buildroot} != "/" ] && rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%clean
[ %{buildroot} != "/" ] && rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%dir %{_sharedstatedir}/%{name}
%if %{with_systemd}
/lib/systemd/system/%{name}.service
%endif
%{_bindir}/%{name}
%config(noreplace) %{_datarootdir}/lxc/config/common.conf.d/00-%{name}.conf
%{_datarootdir}/%{name}/lxc.mount.hook
%{_datarootdir}/%{name}/lxc.reboot.hook
%{_libdir}/%{name}/liblxcfs.la
%{_libdir}/%{name}/liblxcfs.so
%changelog
* Wed Jan 30 2019 Tom Parrott <[email protected]> - 3.1.0
- Initial RPM release.