Setting tag procprotect-0.4-7
[procprotect.git] / procprotect.spec
1 %define name procprotect
2 %define version 0.4
3 %define taglevel 7
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 # when no custom kernel is being built, kernel_version is defined but empty
11 %define _with_planetlab_kernel %{?kernel_version:1}%{!?kernel_version:0}
12 %if ! %{_with_planetlab_kernel}
13 # compute this with "rpm -q --qf .. kernel-devel" when with the stock kernel
14 # this line below
15 #%define module_release %( rpm -q --qf "%{version}" kernel-headers )
16 # causes recursive macro definition no matter how much you quote
17 %define percent %
18 %define braop \{
19 %define bracl \}
20 %define kernel_version %( rpm -q --qf %{percent}%{braop}version%{bracl} kernel-headers )
21 %define kernel_release %( rpm -q --qf %{percent}%{braop}release%{bracl} kernel-headers )
22 %define kernel_arch %( rpm -q --qf %{percent}%{braop}arch%{bracl} kernel-headers )
23 %endif
24
25 # this is getting really a lot of stuff, could be made simpler probably
26 %define release %{kernel_version}.%{kernel_release}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
27
28 %define kernel_id %{kernel_version}-%{kernel_release}.%{kernel_arch}
29 %define kernelpath /usr/src/kernels/%{kernel_id}
30
31
32 Vendor: PlanetLab
33 Packager: PlanetLab Central <support@planet-lab.org>
34 Distribution: PlanetLab %{plrelease}
35 URL: %{SCMURL}
36
37 Summary: Proc fs acls
38 Name: %{name}
39 Version: %{version}
40 Release: %{release}
41 License: GPL
42 Group: System Environment/Kernel
43 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
44 Source0: procprotect-%{version}.tar.gz
45 Requires: kernel = %{kernel_version}-%{kernel_release}
46
47 %description
48 ACLs for protecting entries in the proc filesystem.
49
50 %prep 
51 %setup -q
52
53 %build
54 make -C %{kernelpath} V=1 M=$(pwd) KVER=%{kernel_id} modules
55
56 %install
57 install -D -m 755 procprotect.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/procprotect/procprotect.ko
58 install -D -m 644 procprotect.conf $RPM_BUILD_ROOT/etc/modules-load.d/procprotect.conf
59 install -D -m 644 procprotect.service $RPM_BUILD_ROOT/usr/lib/systemd/system/procprotect.service
60 install -D -m 755 procprotect.init $RPM_BUILD_ROOT/usr/sbin/procprotect.init
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
66 /lib/modules/%{kernel_id}
67 /etc/modules-load.d/procprotect.conf
68 /usr/sbin/procprotect.init
69 /usr/lib/systemd/system/procprotect.service
70
71 %post
72 /sbin/depmod -a %{kernel_id}
73 /bin/systemctl enable procprotect.service
74
75 %postun
76
77 %changelog
78 * Fri Apr 03 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-7
79 - only cleaned up the systemd unit file to get rid of ControlGroup:
80
81 * Wed Feb 18 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-6
82 - moved pathname from stack to heap, and robustified
83
84 * Wed Jul 16 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-5
85 - tweak for building against a home-made kernel
86
87 * Mon Apr 28 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-4
88 - change to specfile only, for running depmod with right kernel version
89
90 * Fri Mar 21 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-3
91 - guarded against some hypothetically possible errors
92
93 * Wed Aug 28 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.4-2
94 - * Bug fixes that should lead to increased stability
95 - * Install via make and make install
96
97 * Mon Aug 19 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.4-1
98 - working version with kernels 3.10
99
100 * Tue May 21 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-4
101 - Compatibility with kernel 3.9
102
103 * Wed Apr 24 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-3
104 - - Support for arbitrating writes to entries in /proc
105 - - Compatibility fixes to support kernel 3.8
106 - - Fixed a slippery race condition that may have been responsible an for intermittent kernel crash, and was causing fedora 18 build tests to fail
107
108 * Wed Apr 24 2013 Sapan Bhatia <sapanb@cs.princeton.edu> - procprotect-0.3-2
109
110 * Thu Feb 21 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.3-1
111 - changes for kernel 3.6.2
112
113 * Mon Nov 26 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.1-3
114 - Fixed bad security loophole in write path
115
116 * Mon Jul 09 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - procprotect-0.1-2
117 - module to get loaded at boot-time
118