Last change
on this file since 474 was 470, checked in by Bruno Cornec, 16 years ago |
- dploy-pxe requires syslinux (at least on rhel 5)
- dploy-pxe adds permission to mount/umount iso images via sudoers
- dploy-pxe now creates all required dirs under /tftpboot
- dploy-dhcp owns the /etc/dhcpd.conf file
- dploy-dhcp doesn't include by default a non-existent /etc/dploy/dhcp.conf file
(Those post install script should become real scripts launched by all install means)
|
File size:
1.8 KB
|
Rev | Line | |
---|
[388] | 1 | #
|
---|
| 2 | # $Id$
|
---|
| 3 | #
|
---|
[392] | 4 | %define perlvendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
|
---|
[388] | 5 |
|
---|
| 6 | Summary: dploy.org common tools
|
---|
| 7 | Summary(fr): Outils communs pour dploy.org
|
---|
| 8 |
|
---|
| 9 | Name: PBPKG
|
---|
| 10 | Version: PBVER
|
---|
| 11 | Release: PBTAGPBSUF
|
---|
| 12 | License: GPL
|
---|
| 13 | Group: PBGRP
|
---|
| 14 | Url: PBURL
|
---|
| 15 | Source: PBSRC
|
---|
| 16 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
---|
[429] | 17 | BuildArch: noarch
|
---|
[388] | 18 | Requires: openssh, PBDEP
|
---|
| 19 |
|
---|
| 20 | %description
|
---|
| 21 | PBDESC
|
---|
| 22 |
|
---|
| 23 | %description -l fr
|
---|
| 24 | Outils communs pour dploy.org
|
---|
| 25 |
|
---|
| 26 | %prep
|
---|
| 27 | %setup -q
|
---|
| 28 |
|
---|
[391] | 29 | %build
|
---|
| 30 | %{__perl} Makefile.PL INSTALLDIRS=vendor PBKEYWORD=${RPM_BUILD_ROOT}/PBFINALDIR
|
---|
| 31 | make
|
---|
| 32 |
|
---|
[388] | 33 | %install
|
---|
| 34 | %{__rm} -rf $RPM_BUILD_ROOT
|
---|
| 35 | export DESTDIR=$RPM_BUILD_ROOT
|
---|
| 36 | export PREFIX=%{_exec_prefix}
|
---|
| 37 | export CONFDIR=%{_sysconfdir}/PBPROJ
|
---|
[391] | 38 | make DESTDIR=$RPM_BUILD_ROOT install
|
---|
[388] | 39 | ./install.sh
|
---|
[391] | 40 | find ${RPM_BUILD_ROOT} -name perllocal.pod | xargs rm -f
|
---|
[388] | 41 |
|
---|
[391] | 42 |
|
---|
[388] | 43 | %clean
|
---|
| 44 | %{__rm} -rf $RPM_BUILD_ROOT
|
---|
| 45 |
|
---|
| 46 | %files
|
---|
| 47 | %defattr(-,dploy,dploy)
|
---|
| 48 | %doc ChangeLog
|
---|
[445] | 49 | %doc INSTALL COPYING README
|
---|
[388] | 50 | %config(noreplace) %{_sysconfdir}/PBPROJ
|
---|
[392] | 51 | %doc AUTHORS
|
---|
| 52 | #NEWS
|
---|
[388] | 53 |
|
---|
[391] | 54 | %{perlvendorlib}/*
|
---|
| 55 | #%{_bindir}/*
|
---|
| 56 | #%{_mandir}/man1/*
|
---|
| 57 | %{_mandir}/man3/*
|
---|
| 58 |
|
---|
[388] | 59 | %pre
|
---|
| 60 | # Create dploy Account and group if needed
|
---|
[470] | 61 | grep -qE '^dploy:' %{_sysconfdir}/group
|
---|
[388] | 62 | if [ $? -ne 0 ]; then
|
---|
[468] | 63 | groupadd dploy
|
---|
[388] | 64 | fi
|
---|
[470] | 65 | grep -qE '^dploy:' %{_sysconfdir}/passwd
|
---|
[388] | 66 | if [ $? -ne 0 ]; then
|
---|
[468] | 67 | useradd -g dploy dploy
|
---|
[388] | 68 | fi
|
---|
| 69 |
|
---|
| 70 | %post
|
---|
| 71 | # Open ssh access for dploy account with generated keys
|
---|
| 72 | mkdir -p ~dploy/.ssh
|
---|
| 73 | chmod 700 ~dploy/.ssh
|
---|
| 74 | keyf=~dploy/.ssh/authorized_keys
|
---|
| 75 | if [ -f $keyf ]; then
|
---|
| 76 | key=`cut -d' ' -f2 %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub`
|
---|
| 77 | grep -qE \'$key\' $keyf
|
---|
| 78 | if [ $? -ne 0 ]; then
|
---|
| 79 | cat %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub >> $keyf
|
---|
| 80 | fi
|
---|
| 81 | else
|
---|
| 82 | cp %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub $keyf
|
---|
| 83 | chown dploy:dploy $keyf
|
---|
| 84 | chmod 600 $keyf
|
---|
| 85 | fi
|
---|
| 86 |
|
---|
| 87 | %changelog
|
---|
| 88 | PBLOG
|
---|
Note:
See
TracBrowser
for help on using the repository browser.