Bug 1172005
Summary: | .postinstall | ||
---|---|---|---|
Product: | [Retired] JBoss Web Server 3 | Reporter: | Libor Fuka <lfuka> |
Component: | unspecified | Assignee: | Weinan Li <weli> |
Status: | CLOSED EOL | QA Contact: | Libor Fuka <lfuka> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.0.0 | CC: | mbabacek, mturk, pslavice |
Target Milestone: | Beta | ||
Target Release: | 3.0.0 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-27 18:37:23 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1178630 |
Description
Libor Fuka
2014-12-09 08:19:26 UTC
Fix: [weli@dhcp-66-78-87 jws-compose]$ git diff diff --git a/jws-compose.spec b/jws-compose.spec index 9403a02..e0eb852 100644 --- a/jws-compose.spec +++ b/jws-compose.spec @@ -224,6 +224,8 @@ unzip -q %{_javadir}/jbossas-fordev/httpd-%{httpdversion}.zip cp -pr %{_docdir}/%{httpd}-%{httpdversion}/{ABOUT_APACHE,README,CHANGES,LICENSE,VERSIONING,NOTICE} httpd/ cp %{SOURCE4} httpd/.postinstall +sed -i -e 's/${pkgdir}/%{zipname}-%{ews_major}.%{ews_minor}/g' httpd/.postinstall + chmod 755 httpd/.postinstall httpd/sbin/* sed -i -e '/# Source ..\/conf\/httpd.conf/,/fi/d' httpd/sbin/apachectl sed -i -e 's:my $installbuilddir = $libdir . "/%{httpd}/build";:my $installbuilddir = "$ENV{EWS_HOME}/httpd/lib/build";:' \ diff --git a/postinstall b/postinstall index 23eab74..a3b9560 100644 --- a/postinstall +++ b/postinstall @@ -42,15 +42,8 @@ if [ -f 'conf.d/mod_cluster.conf' ]; then sed -i -e "s:MemManagerFile cache/mod_cluster:MemManagerFile $currentDir/cache/mod_cluster:" conf.d/mod_cluster.conf fi -#JBPAPP-9746 -if [ -f 'conf.d/mod_snmp.conf.sample' ]; then - mkdir -p $currentDir/var/cache/mod_snmp - sed -i -e "s:SNMPVar /var/cache/mod_snmp:SNMPVar $currentDir/var/cache/mod_snmp:" conf.d/mod_snmp.conf.sample - sed -i -e "s:SNMPConf /etc/httpd/conf.d/snmpd:SNMPConf $currentDir/conf.d/snmpd:" conf.d/mod_snmp.conf.sample -fi - #JBPAPP-9381 -sed -i -e "s:/var/www:jboss-ews-2.1/httpd/www:g" -e "s:/etc/httpd:jboss-ews-2.1/httpd:g" www/error/noindex.html +sed -i -e "s:/var/www:${pkgdir}/httpd/www:g" -e "s:/etc/httpd:${pkgdir}/httpd:g" www/error/noindex.html #JBPAPP-9446 sed -i -e "s:LoadModule proxy_balancer_module:#LoadModule proxy_balancer_module:" conf/httpd.conf Verified locally: [weli@dhcp-66-78-87 x86_64]$ unzip -l ./usr/share/java/jbossas-fordev/jws-httpd-3.0.0-RHEL6-x86_64.zip | grep postinstall 1594 12-11-2014 16:23 jws-3.0/httpd/.postinstall [weli@dhcp-66-78-87 x86_64]$ unzip ./usr/share/java/jbossas-fordev/jws-httpd-3.0.0-RHEL6-x86_64.zip jws-3.0/httpd/.postinstall Archive: ./usr/share/java/jbossas-fordev/jws-httpd-3.0.0-RHEL6-x86_64.zip inflating: jws-3.0/httpd/.postinstall [weli@dhcp-66-78-87 x86_64]$ cat jws-3.0/httpd/.postinstall #!/bin/sh # umask 077 if [ ! -f /etc/pki/tls/private/localhost.key ] ; then openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > /etc/pki/tls/private/localhost.key 2> /dev/null fi FQDN=`hostname` if [ "x${FQDN}" = "x" ]; then FQDN=localhost.localdomain fi if [ ! -f /etc/pki/tls/certs/localhost.crt ] ; then cat << EOF | openssl req -new -key /etc/pki/tls/private/localhost.key \ -x509 -days 365 -set_serial $RANDOM \ -out /etc/pki/tls/certs/localhost.crt 2>/dev/null -- SomeState SomeCity SomeOrganization SomeOrganizationalUnit ${FQDN} root@${FQDN} EOF fi currentDir=`pwd` sed -i -e "s: modules/: $currentDir/modules/:g" -e "s:/var/www:$currentDir/www:g" -e "s:ServerRoot \"/etc/httpd\":ServerRoot \"$currentDir\":" conf/httpd.conf cat > .tmppostinstallfile << EOF # the options for httpd command OPTIONS="-f $currentDir/conf/httpd.conf -E $currentDir/logs/httpd.log" # the library path export LD_LIBRARY_PATH=$currentDir/lib EOF sed -i -e "s:HTTPD='./httpd':HTTPD='$currentDir/sbin/httpd':g" -e "/HTTPD=/r .tmppostinstallfile" sbin/apachectl rm -f .tmppostinstallfile #JBPAPP-9446 if [ -f 'conf.d/mod_cluster.conf' ]; then sed -i -e "s:MemManagerFile cache/mod_cluster:MemManagerFile $currentDir/cache/mod_cluster:" conf.d/mod_cluster.conf fi #JBPAPP-9381 sed -i -e "s:/var/www:jws-3.0/httpd/www:g" -e "s:/etc/httpd:jws-3.0/httpd:g" www/error/noindex.html #JBPAPP-9446 sed -i -e "s:LoadModule proxy_balancer_module:#LoadModule proxy_balancer_module:" conf/httpd.conf Verified with DR0.1 RHEL6 and RHEL7 |