(file) Return to lsb-pegasus.spec.in CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

  1 konrad.r 1.1 #%/////////////////////////////////////////////////////////////////////////////
  2              #
  3              # Copyright (c) 2004 BMC Software, Hewlett-Packard Company, IBM,
  4              # The Open Group, Tivoli Systems
  5              #
  6              # Permission is hereby granted, free of charge, to any person obtaining a copy
  7              # of this software and associated documentation files (the "Software"), to
  8              # deal in the Software without restriction, including without limitation the
  9              # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10              # sell copies of the Software, and to permit persons to whom the Software is
 11              # furnished to do so, subject to the following conditions:
 12              # 
 13              # THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14              # ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15              # "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16              # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17              # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18              # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19              # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21              #
 22 konrad.r 1.1 #==============================================================================
 23              #
 24              # Author: Konrad Rzeszutek <konradr@us.ibm.com>
 25              #
 26              #%/////////////////////////////////////////////////////////////////////////////
 27              #
 28              # Package spec for OpenPegasus 2.4
 29              #
 30              Summary: WBEM Services for Linux
 31              Name: lsb-pegasus
 32              Version: 2.4
 33              Release: 1
 34              Group: Systems Management/Base
 35              Vendor: OpenSource Org
 36              Copyright: Open Group Pegasus Open Source
 37              BuildRoot: @INSTALLDIR@
 38              Requires: openssl-devel >= 0.9.6 lsb >= 1.3
 39              Provides: cimserver lsb-pegasus
 40              
 41              %description
 42              WBEM Services for Red Hat Linux enables management solutions that deliver
 43 konrad.r 1.1 increased control of enterprise resources. WBEM is a platform and resource
 44              independent DMTF standard that defines a common information model and
 45              communication protocol for monitoring and controlling resources from diverse
 46              sources.
 47              
 48              
 49              %pre
 50              
 51              %install
 52              
 53              %post
 54              chmod 755 /etc/init.d/lsb-pegasus
 55              /usr/lib/lsb/install_initd /etc/init.d/lsb-pegasus
 56              
 57              CN="Common Name"
 58              EMAIL="test@email.address"
 59              HOSTNAME=`uname -n`
 60              sed -e "s/$CN/$HOSTNAME/"  \
 61                  -e "s/$EMAIL/root@$HOSTNAME/" /var/opt/lsb-pegasus/ssl.orig \
 62                  > /var/opt/lsb-pegasus/ssl.cnf
 63              chmod 644 /var/opt/lsb-pegasus/ssl.cnf
 64 konrad.r 1.1 chown bin /var/opt/lsb-pegasus/ssl.cnf
 65              chgrp bin /var/opt/lsb-pegasus/ssl.cnf
 66              
 67              openssl req -x509 -days 365 -newkey rsa:2048 \
 68                 -nodes -config /var/opt/lsb-pegasus/ssl.cnf   \
 69                 -keyout /etc/opt/lsb-pegasus/key.pem -out /etc/opt/lsb-pegasus/cert.pem 
 70              
 71              cat /etc/opt/lsb-pegasus/key.pem > /etc/opt/lsb-pegasus/file_2048.pem
 72              cat /etc/opt/lsb-pegasus/cert.pem > /etc/opt/lsb-pegasus/server_2048.pem
 73              cat /etc/opt/lsb-pegasus/cert.pem > /etc/opt/lsb-pegasus/client_2048.pem
 74              chmod 700 /etc/opt/lsb-pegasus/*.pem
 75              
 76              rm -f /etc/opt/lsb-pegasus/key.pem /etc/opt/lsb-pegasus/cert.pem
 77              
 78              if [ -f /etc/opt/lsb-pegasus/server.pem ] 
 79              then
 80                  echo "WARNING: /etc/opt/lsb-pegasus/server.pem SSL Certificate file already exists."
 81              else
 82                  cp /etc/opt/lsb-pegasus/server_2048.pem /etc/opt/lsb-pegasus/server.pem
 83                  cp /etc/opt/lsb-pegasus/file_2048.pem /etc/opt/lsb-pegasus/file.pem
 84                  chmod 400 /etc/opt/lsb-pegasus/server.pem /etc/opt/lsb-pegasus/file.pem
 85 konrad.r 1.1 fi
 86              
 87              if [ -f /etc/opt/lsb-pegasus/client.pem ]
 88              then
 89                  echo "WARNING: /etc/opt/lsb-pegasus/client.pem SSL Certificate trust store already exists."
 90              else
 91                  cp /etc/opt/lsb-pegasus/client_2048.pem /etc/opt/lsb-pegasus/client.pem
 92                  chmod 400 /etc/opt/lsb-pegasus/client.pem
 93              fi
 94              
 95              %postun
 96              /usr/lib/lsb/remove_initd /etc/init.d/lsb-pegasus
 97              
 98              %files
 99              
100              %attr ( - bin bin) /opt/lsb-pegasus
101              %attr ( - bin bin) /etc/opt/lsb-pegasus
102              %attr ( - bin bin) /etc/init.d/lsb-pegasus
103              %attr ( - bin bin) /etc/pam.d/wbem
104              %attr ( - bin bin) /var/opt/lsb-pegasus/

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2