1 | Summary: scripts.mit.edu locker administration system |
---|
2 | Group: Applications/System |
---|
3 | Name: lockeradm |
---|
4 | Version: 0.00 |
---|
5 | Release: scripts |
---|
6 | Vendor: The scripts.mit.edu Team (scripts@mit.edu) |
---|
7 | URL: http://scripts.mit.edu |
---|
8 | License: GPL |
---|
9 | Source: %{name}.tar.gz |
---|
10 | BuildRoot: %{_tmppath}/%(%{__id_u} -n)-%{name}-%{version}-root |
---|
11 | %define debug_package %{nil} |
---|
12 | |
---|
13 | %description |
---|
14 | |
---|
15 | scripts.mit.edu locker administration system |
---|
16 | Contains: |
---|
17 | - Perl script for checking whether a user is a locker admin <admof> |
---|
18 | - setuid C program used to start a signup request <signup-scripts-frontend> |
---|
19 | - Perl script that handles signup requests <signup-scripts-backend> |
---|
20 | See http://scripts.mit.edu/wiki for more information. |
---|
21 | |
---|
22 | %prep |
---|
23 | %setup -q -n %{name} |
---|
24 | |
---|
25 | %build |
---|
26 | ./configure |
---|
27 | make |
---|
28 | |
---|
29 | %install |
---|
30 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
31 | install -D admof $RPM_BUILD_ROOT/usr/local/sbin/admof |
---|
32 | install -D signup-scripts-frontend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-frontend |
---|
33 | install -D signup-scripts-backend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-backend |
---|
34 | install -D bashrc $RPM_BUILD_ROOT/usr/local/etc/bashrc |
---|
35 | |
---|
36 | %clean |
---|
37 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
38 | |
---|
39 | %files |
---|
40 | %defattr(0644, root, root) |
---|
41 | /usr/local/etc/bashrc |
---|
42 | %defattr(0755, root, root) |
---|
43 | /usr/local/sbin/admof |
---|
44 | /usr/local/sbin/signup-scripts-backend |
---|
45 | %defattr(4755, signup, signup) |
---|
46 | /usr/local/sbin/signup-scripts-frontend |
---|
47 | |
---|
48 | %pre |
---|
49 | groupadd signup |
---|
50 | useradd -g signup signup |
---|
51 | |
---|
52 | %post |
---|
53 | cat >>/etc/sudoers <<END |
---|
54 | signup ALL=(root) NOPASSWD: /usr/sbin/useradd |
---|
55 | signup ALL=(root) NOPASSWD: /usr/sbin/groupadd |
---|
56 | signup ALL=(root) NOPASSWD: /usr/sbin/edquota |
---|
57 | END |
---|
58 | |
---|
59 | %preun |
---|
60 | touch /etc/sudoers.tmp |
---|
61 | chmod 600 /etc/sudoers.tmp |
---|
62 | grep -v "^signup" /etc/sudoers > /etc/sudoers.tmp |
---|
63 | mv /etc/sudoers.tmp /etc/sudoers |
---|
64 | |
---|
65 | %postun |
---|
66 | userdel -r signup |
---|
67 | |
---|
68 | %changelog |
---|
69 | |
---|
70 | * Sat Sep 30 2006 Jeff Arnold <jbarnold@MIT.EDU> 0.00 |
---|
71 | - prerelease |
---|