X-Git-Url: http://git.onelab.eu/?p=procprotect.git;a=blobdiff_plain;f=procprotect.spec;h=0edf5eee9c010a475ecff59ab26c48d6b3943854;hp=6128f7134ccde9fd68807eb98fa5600cf93d33f5;hb=HEAD;hpb=194681285be4f9c75d02cc11d83f46cd3f56cb0a diff --git a/procprotect.spec b/procprotect.spec index 6128f71..0edf5ee 100644 --- a/procprotect.spec +++ b/procprotect.spec @@ -1,12 +1,15 @@ %define name procprotect %define version 0.4 -%define taglevel 1 +%define taglevel 7 ### legacy from locally-built kernels, used to define these # kernel_release : 1.fc16 (24 is then the planetlab taglevel) # kernel_version : 3.3.7 # kernel_arch : i686 | x86_64 +# when no custom kernel is being built, kernel_version is defined but empty +%define _with_planetlab_kernel %{?kernel_version:1}%{!?kernel_version:0} +%if ! %{_with_planetlab_kernel} # compute this with "rpm -q --qf .. kernel-devel" when with the stock kernel # this line below #%define module_release %( rpm -q --qf "%{version}" kernel-headers ) @@ -17,6 +20,7 @@ %define kernel_version %( rpm -q --qf %{percent}%{braop}version%{bracl} kernel-headers ) %define kernel_release %( rpm -q --qf %{percent}%{braop}release%{bracl} kernel-headers ) %define kernel_arch %( rpm -q --qf %{percent}%{braop}arch%{bracl} kernel-headers ) +%endif # this is getting really a lot of stuff, could be made simpler probably %define release %{kernel_version}.%{kernel_release}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} @@ -38,6 +42,7 @@ License: GPL Group: System Environment/Kernel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Source0: procprotect-%{version}.tar.gz +Requires: kernel = %{kernel_version}-%{kernel_release} %description ACLs for protecting entries in the proc filesystem. @@ -46,12 +51,13 @@ ACLs for protecting entries in the proc filesystem. %setup -q %build -make -C %{kernelpath} V=1 M=$(pwd) modules +make -C %{kernelpath} V=1 M=$(pwd) KVER=%{kernel_id} modules %install install -D -m 755 procprotect.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/procprotect/procprotect.ko -mkdir -p $RPM_BUILD_ROOT/etc/modules-load.d -install -m 644 procprotect.conf $RPM_BUILD_ROOT/etc/modules-load.d/procprotect.conf +install -D -m 644 procprotect.conf $RPM_BUILD_ROOT/etc/modules-load.d/procprotect.conf +install -D -m 644 procprotect.service $RPM_BUILD_ROOT/usr/lib/systemd/system/procprotect.service +install -D -m 755 procprotect.init $RPM_BUILD_ROOT/usr/sbin/procprotect.init %clean rm -rf $RPM_BUILD_ROOT @@ -59,13 +65,35 @@ rm -rf $RPM_BUILD_ROOT %files /lib/modules/%{kernel_id} /etc/modules-load.d/procprotect.conf +/usr/sbin/procprotect.init +/usr/lib/systemd/system/procprotect.service %post -/sbin/depmod -a +/sbin/depmod -a %{kernel_id} +/bin/systemctl enable procprotect.service %postun %changelog +* Fri Apr 03 2015 Thierry Parmentelat - procprotect-0.4-7 +- only cleaned up the systemd unit file to get rid of ControlGroup: + +* Wed Feb 18 2015 Thierry Parmentelat - procprotect-0.4-6 +- moved pathname from stack to heap, and robustified + +* Wed Jul 16 2014 Thierry Parmentelat - procprotect-0.4-5 +- tweak for building against a home-made kernel + +* Mon Apr 28 2014 Thierry Parmentelat - procprotect-0.4-4 +- change to specfile only, for running depmod with right kernel version + +* Fri Mar 21 2014 Thierry Parmentelat - procprotect-0.4-3 +- guarded against some hypothetically possible errors + +* Wed Aug 28 2013 Sapan Bhatia - procprotect-0.4-2 +- * Bug fixes that should lead to increased stability +- * Install via make and make install + * Mon Aug 19 2013 Thierry Parmentelat - procprotect-0.4-1 - working version with kernels 3.10