d0266560ca06d076c8079680fe88255f0e4e9a3a
[procprotect.git] / procprotect.spec
1 %define name procprotect
2 %define version 0.4
3 %define taglevel 1
4
5 ### legacy from locally-built kernels, used to define these
6 # kernel_release : 1.fc16  (24 is then the planetlab taglevel)
7 # kernel_version : 3.3.7
8 # kernel_arch :    i686 | x86_64
9
10 # compute this with "rpm -q --qf .. kernel-devel" when with the stock kernel
11 # this line below
12 #%define module_release %( rpm -q --qf "%{version}" kernel-headers )
13 # causes recursive macro definition no matter how much you quote
14 %define percent %
15 %define braop \{
16 %define bracl \}
17 %define kernel_version %( rpm -q --qf %{percent}%{braop}version%{bracl} kernel-headers )
18 %define kernel_release %( rpm -q --qf %{percent}%{braop}release%{bracl} kernel-headers )
19 %define kernel_arch %( rpm -q --qf %{percent}%{braop}arch%{bracl} kernel-headers )
20
21 # this is getting really a lot of stuff, could be made simpler probably
22 %define release %{kernel_version}.%{kernel_release}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
23
24 %define kernel_id %{kernel_version}-%{kernel_release}.%{kernel_arch}
25 %define kernelpath /usr/src/kernels/%{kernel_id}
26
27
28 Vendor: PlanetLab
29 Packager: PlanetLab Central <support@planet-lab.org>
30 Distribution: PlanetLab %{plrelease}
31 URL: %{SCMURL}
32
33 Summary: Proc fs acls
34 Name: %{name}
35 Version: %{version}
36 Release: %{release}
37 License: GPL
38 Group: System Environment/Kernel
39 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
40 Source0: procprotect-%{version}.tar.gz
41
42 %description
43 ACLs for protecting entries in the proc filesystem.
44
45 %prep 
46 %setup -q
47
48 %build
49 make -C %{kernelpath} V=1 M=$(pwd) modules
50
51 %install
52 install -D -m 755 procprotect.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/procprotect/procprotect.ko
53 install -D -m 644 procprotect.conf $RPM_BUILD_ROOT/etc/modules-load.d/procprotect.conf
54 install -D -m 644 procprotect.service $RPM_BUILD_ROOT/usr/lib/systemd/system/procprotect.service
55 install -D -m 755 procprotect.init $RPM_BUILD_ROOT/usr/sbin/procprotect.init
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 /lib/modules/%{kernel_id}
62 /etc/modules-load.d/procprotect.conf
63 /usr/sbin/procprotect.init
64 /usr/lib/systemd/system/procprotect.service
65
66 %post
67 /sbin/depmod -a
68 /bin/systemctl enable procprotect.service
69
70 %postun
71
72 %changelog
73 * Mon Aug 19 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-1
74 - working version with kernels 3.10
75
76 * Tue May 21 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-4
77 - Compatibility with kernel 3.9
78
79 * Wed Apr 24 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-3
80 - - Support for arbitrating writes to entries in /proc
81 - - Compatibility fixes to support kernel 3.8
82 - - Fixed a slippery race condition that may have been responsible an for intermittent kernel crash, and was causing fedora 18 build tests to fail
83
84 * Wed Apr 24 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-2
85
86 * Thu Feb 21 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.3-1
87 - changes for kernel 3.6.2
88
89 * Mon Nov 26 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.1-3
90 - Fixed bad security loophole in write path
91
92 * Mon Jul 09 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.1-2
93 - module to get loaded at boot-time
94