[384] | 1 | Summary: LinuxCOE SystemDesigner web interface
|
---|
| 2 | Name: PBPKG
|
---|
| 3 | Version: PBVER
|
---|
| 4 | Release: PBTAGPBSUF
|
---|
| 5 | License: GPL
|
---|
| 6 | URL: http://linuxcoe.sourceforge.net/
|
---|
| 7 | Group: PBGRP
|
---|
| 8 | # Copyright: 2000-2007 Hewlett-Packard Development Company, L.P
|
---|
| 9 | # Original Packager: Louis Bouchard <louis.bouchard@hp.com>
|
---|
| 10 | #
|
---|
| 11 | # Source Section
|
---|
| 12 | #
|
---|
| 13 | Source: PBSRC
|
---|
| 14 |
|
---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
---|
| 16 | BuildArch: noarch
|
---|
| 17 | Requires: perl, sudo, PBDEP
|
---|
| 18 |
|
---|
| 19 | %description
|
---|
| 20 | LinuxCOE SystemDesigner is a unifying web application that allows
|
---|
| 21 | a user to repeatably install, configure, and maintain different
|
---|
| 22 | Linux system installations. It's CGI-based interface provides means
|
---|
| 23 | to generate boot images for network or local media based installations,
|
---|
| 24 | save profiles that store custom installation preferences for later re-use,
|
---|
| 25 | and retrofit already deployed systems by overlaying other value-add components.
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | %prep
|
---|
| 29 | %setup -q
|
---|
| 30 |
|
---|
| 31 | %build
|
---|
| 32 | # For the moment done here. Would be better to give it to pb. Needs discussion
|
---|
| 33 | export httpdcfgdir=PBHTTPDCONF
|
---|
| 34 | export docrootdir=PBHTTPDDOCROOT
|
---|
| 35 | export httpd_user=PBHTTPDUSER
|
---|
| 36 | export httpd_group=PBHTTPDGROUP
|
---|
| 37 | export sudoers_cfg=PBSUDOERS
|
---|
| 38 | export webalias=PBWEBALIAS
|
---|
| 39 | export webworkdir=PBWEBWORKDIR
|
---|
| 40 |
|
---|
| 41 | # macro configure doesn't work. (Do not put a percent before the word)
|
---|
| 42 | ./configure --prefix=PBROOTINSTALL --sysconfdir=PBETCINSTALL --localstatedir=%{_var} --mandir=%{_mandir} --without-APACHECTL --without-SUDO --without-PERLMOD --without-MKISOFS --without-SENDMAIL
|
---|
| 43 | make
|
---|
| 44 |
|
---|
| 45 | %install
|
---|
| 46 | %{__rm} -rf %{buildroot}
|
---|
| 47 | make DESTDIR="$RPM_BUILD_ROOT" install
|
---|
| 48 | mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
|
---|
| 49 | export VARLOG=%{_var}/log
|
---|
| 50 | cat > $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/LinuxCOE << EOF
|
---|
| 51 | $VARLOG/* {
|
---|
| 52 | create 640 PBHTTPDUSER PBHTTPDGROUP
|
---|
| 53 | rotate 4
|
---|
| 54 | monthly
|
---|
| 55 | missingok
|
---|
| 56 | compress
|
---|
| 57 | prerotate
|
---|
| 58 | /etc/init.d/httpd closelogs > /dev/null 2>&1
|
---|
| 59 | endscript
|
---|
| 60 | postrotate
|
---|
| 61 | /etc/init.d/httpd closelogs > /dev/null 2>&1
|
---|
| 62 | endscript
|
---|
| 63 | }
|
---|
| 64 | EOF
|
---|
| 65 |
|
---|
| 66 | %post
|
---|
| 67 | #
|
---|
| 68 | # Invoke post action script
|
---|
| 69 | #
|
---|
| 70 | PBROOTINSTALL/bin/post-actions -i -v
|
---|
| 71 | /etc/init.d/httpd reload
|
---|
| 72 | if [ -x /usr/sbin/selinuxenabled ]; then
|
---|
| 73 | /usr/sbin/selinuxenabled
|
---|
| 74 | if [ $? -eq 0 ]; then
|
---|
| 75 | echo "WARNING: desactivating SELinux as it is not yet compatible with"
|
---|
| 76 | echo "LinuxCOE systemDesigner. You'll have to reboot to take it in account"
|
---|
| 77 | perl -pi -e 's/SELINUX=.*/SELINUX=disabled/' /etc/sysconfig/selinux
|
---|
| 78 | fi
|
---|
| 79 | fi
|
---|
| 80 |
|
---|
| 81 | # THis is not clear at the moment when doing -U updates
|
---|
| 82 | # this tend to be called after the %post above thus
|
---|
| 83 | # defeating that task :-(
|
---|
| 84 | #%preun
|
---|
| 85 | #if [ -x PBROOTINSTALL/bin/post-actions ]; then
|
---|
| 86 | #PBROOTINSTALL/bin/post-actions -u -v
|
---|
| 87 | #fi
|
---|
| 88 | #perl -pi -e 's/^PBHTTPDUSER.*//' /etc/sudoers
|
---|
| 89 | #/etc/init.d/httpd reload
|
---|
| 90 |
|
---|
| 91 | %clean
|
---|
| 92 | %{__rm} -rf $RPM_BUILD_ROOT
|
---|
| 93 |
|
---|
| 94 | %files
|
---|
| 95 | %defattr(-,root,root)
|
---|
| 96 | %config(noreplace) PBETCINSTALL
|
---|
| 97 | %config %{_sysconfdir}/logrotate.d/LinuxCOE
|
---|
| 98 | %doc AUTHORS ChangeLog COPYING INSTALL NEWS README
|
---|
| 99 | %{_var}/cache/*
|
---|
| 100 | %{_var}/log/*
|
---|
| 101 | %{_localstatedir}/*
|
---|
| 102 | PBROOTINSTALL
|
---|
| 103 |
|
---|
| 104 | %changelog
|
---|
| 105 | PBLOG
|
---|