[1] | 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} |
---|
[36] | 12 | Prereq: /usr/bin/fs, /usr/bin/pts |
---|
[1] | 13 | |
---|
| 14 | %description |
---|
| 15 | |
---|
| 16 | scripts.mit.edu locker administration system |
---|
| 17 | Contains: |
---|
| 18 | - Perl script for checking whether a user is a locker admin <admof> |
---|
| 19 | - setuid C program used to start a signup request <signup-scripts-frontend> |
---|
| 20 | - Perl script that handles signup requests <signup-scripts-backend> |
---|
| 21 | See http://scripts.mit.edu/wiki for more information. |
---|
| 22 | |
---|
| 23 | %prep |
---|
| 24 | %setup -q -n %{name} |
---|
| 25 | |
---|
| 26 | %build |
---|
[36] | 27 | ./configure --with-fs=/usr/bin/fs --with-pts=/usr/bin/pts |
---|
[1] | 28 | make |
---|
| 29 | |
---|
| 30 | %install |
---|
| 31 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
[11] | 32 | install -D modbashrc $RPM_BUILD_ROOT/usr/local/etc/modbashrc |
---|
| 33 | install -D modbash $RPM_BUILD_ROOT/usr/local/bin/modbash |
---|
[1] | 34 | install -D admof $RPM_BUILD_ROOT/usr/local/sbin/admof |
---|
| 35 | install -D signup-scripts-frontend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-frontend |
---|
| 36 | install -D signup-scripts-backend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-backend |
---|
| 37 | |
---|
| 38 | %clean |
---|
| 39 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
| 40 | |
---|
| 41 | %files |
---|
| 42 | %defattr(0644, root, root) |
---|
[11] | 43 | /usr/local/etc/modbashrc |
---|
[1] | 44 | %defattr(0755, root, root) |
---|
[11] | 45 | /usr/local/bin/modbash |
---|
[1] | 46 | /usr/local/sbin/admof |
---|
| 47 | /usr/local/sbin/signup-scripts-backend |
---|
| 48 | %defattr(4755, signup, signup) |
---|
| 49 | /usr/local/sbin/signup-scripts-frontend |
---|
| 50 | |
---|
| 51 | %pre |
---|
| 52 | groupadd signup |
---|
| 53 | useradd -g signup signup |
---|
| 54 | |
---|
| 55 | %post |
---|
| 56 | cat >>/etc/sudoers <<END |
---|
| 57 | signup ALL=(root) NOPASSWD: /usr/sbin/useradd |
---|
| 58 | signup ALL=(root) NOPASSWD: /usr/sbin/groupadd |
---|
[11] | 59 | signup ALL=(root) NOPASSWD: /usr/sbin/setquota |
---|
[1] | 60 | END |
---|
[11] | 61 | chmod 0440 /etc/sudoers |
---|
[1] | 62 | |
---|
| 63 | %preun |
---|
| 64 | touch /etc/sudoers.tmp |
---|
| 65 | chmod 600 /etc/sudoers.tmp |
---|
| 66 | grep -v "^signup" /etc/sudoers > /etc/sudoers.tmp |
---|
| 67 | mv /etc/sudoers.tmp /etc/sudoers |
---|
| 68 | |
---|
| 69 | %postun |
---|
| 70 | userdel -r signup |
---|
| 71 | |
---|
| 72 | %changelog |
---|
| 73 | |
---|
| 74 | * Sat Sep 30 2006 Jeff Arnold <jbarnold@MIT.EDU> 0.00 |
---|
| 75 | - prerelease |
---|