# Source0-md5: fea9124c9d6d7370e12c4a3f0d405541
URL: https://linuxcontainers.org/lxcfs/
Patch0: 0001-skip-empty-entries-under-proc-self-cgroup.patch
+Patch1: pld.patch
BuildRequires: help2man
BuildRequires: libfuse-devel
BuildRequires: pam-devel
BuildRequires: pkg-config
+BuildRequires: pld-release
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _libexecdir %{_prefix}/lib
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%configure \
- --with-distro=suse \
+ --with-distro=pld
-%{__make} %{?_smp_mflags}
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{_libexecdir},%{_includedir}/%{name},%{_localstatedir}/lib/%{name}}
-cp -p config/init/systemd/*.service $RPM_BUILD_ROOT%{systemdunitdir}
-
# 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
# %{_prefix}/lib/lxcfs. Note that lxcfs *expects* liblxcfs.so to be found in
%attr(755,root,root) %{_bindir}/lxcfs
%{_mandir}/man1/lxcfs.1*
%{systemdunitdir}/lxcfs.service
+%attr(754,root,root) /etc/rc.d/init.d/lxcfs
%dir %{_datadir}/%{name}
%attr(755,root,root) %{_datadir}/%{name}/lxc.mount.hook
%attr(755,root,root) %{_datadir}/%{name}/lxc.reboot.hook
--- /dev/null
+upstreamed: https://github.com/lxc/lxcfs/pull/133
+
+--- lxcfs-2.0.2/configure.ac~ 2016-06-28 21:27:44.000000000 +0300
++++ lxcfs-2.0.2/configure.ac 2016-08-26 00:14:40.468048818 +0300
+@@ -66,6 +66,7 @@
+ AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva")
+ AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva")
+ AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
++ AC_CHECK_FILE(/etc/pld-release,with_distro="pld")
+ fi
+ with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
+
+@@ -76,7 +77,7 @@
+ ubuntu)
+ distroconf=default.conf.ubuntu
+ ;;
+- redhat|centos|fedora|oracle|oracleserver)
++ redhat|centos|fedora|oracle|oracleserver|pld)
+ distroconf=default.conf.libvirt
+ ;;
+ *)
+@@ -108,6 +109,9 @@
+ ubuntu)
+ init_script=upstart,systemd,sysvinit
+ ;;
++ pld)
++ init_script=systemd,sysvinit
++ ;;
+ slackware)
+ echo -n "Warning: bsd init job not yet implemented"
+ init_script=