Bug #10162
Updated by Vincent MEMBRÉ almost 8 years ago
Two issues here, Upgrade from 4.0 -> 4.1.0.beta2. apache file Was: <pre> # rpm -qa rudder\* rudder-jetty-4.0.1.release-1.SLES.11 rudder-techniques-4.0.1.release-1.SLES.11 rudder-server-root-4.0.1.release-1.SLES.11 rudder-reports-4.0.1.release-1.SLES.11 rudder-inventory-ldap-4.0.1.release-1.SLES.11 rudder-webapp-4.0.1.release-1.SLES.11 rudder-agent-4.0.1.release-1.SLES.11 rudder-inventory-endpoint-4.0.1.release-1.SLES.11 </pre> Upgrade: <pre> # zypper -v up -r Rudder_4.1.0b2 Verbosity: 1 Initializing Target Checking whether to refresh metadata for Rudder_4.1.0b2 Loading repository data... Reading installed packages... Force resolution: No The following NEW package is going to be installed: rudder-server-relay 1398866025:4.1.0.beta2-1.SLES.11 The following packages are going to be upgraded: ncf 1398866025:1.0.0.201612071136-1.SLES.11 -> 1398866025:1.1.0.201702020005-1.SLES.11 ncf-api-virtualenv 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-agent 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-endpoint 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-ldap 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-jetty 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-reports 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-root 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-techniques 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-webapp 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 The following packages are not modified correctly on SLES: supported by their vendor: ncf 1398866025:1.1.0.201702020005-1.SLES.11 ncf-api-virtualenv 1398866025:4.1.0.beta2-1.SLES.11 rudder-agent 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-endpoint 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-ldap 1398866025:4.1.0.beta2-1.SLES.11 rudder-jetty 1398866025:4.1.0.beta2-1.SLES.11 rudder-reports 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-relay 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-root 1398866025:4.1.0.beta2-1.SLES.11 rudder-techniques 1398866025:4.1.0.beta2-1.SLES.11 rudder-webapp 1398866025:4.1.0.beta2-1.SLES.11 <pre> 10 packages to upgrade, 1 new. sed -i 's%^DocumentRoot /var/www$%DocumentRoot /srv/www%' /usr/src/rudder-packages/package/BUILD//usr/src/rudder-packages/package/SOURCES/rudder-apache-relay-common.conf Overall download size: 211.3 MiB. After the operation, 267.2 MiB will be freed. Continue? [y/n/? shows all options] (y): [..] Installing: rudder-server-relay-1398866025:4.1.0.beta2-1.SLES.11 [done] Additional rpm output: INFO: Creating the rudder user... Done INFO: Setting Apache HTTPd as a boot service... Done INFO: Stopping Apache HTTPd... Done sed: can't read /usr/src/rudder-packages/package/BUILD//usr/src/rudder-packages/package/SOURCES/rudder-apache-relay-common.conf: /var/tmp/rudder-server-relay-4.1.0.beta2-1.SLES.11-root-root/opt/rudder/etc/rudder-apache-relay-common.conf: No such file or directory </pre> And INFO: Importing existing webapp certificates... Done INFO: An old rudder virtual host file has been detected (rudder-vhost.conf), it will be moved to /var/backups. Done INFO: An old rudder virtual host file has been detected (rudder-vhost-ssl.conf), it will be moved to /var/backups. Done INFO: Starting Apache HTTPd...[Fri Feb 03 09:22:40 2017] [warn] module ssl_module is already loaded, skipping [Fri Feb 03 09:22:40 2017] [warn] module wsgi_module is already loaded, skipping Warning: DocumentRoot [/var/www] does not found after when packaging it (ie exist Warning: DocumentRoot [/var/www] does not exist Done ***************************************************************************************** INFO: rudder-server-relay setup complete. INFO: INFO: * If you are installing a root server, configuration is automatically done INFO: * If you are installing a simple relay, run: INFO: '/opt/rudder/bin/rudder-node-to-relay root' INFO: on RHEL, but would be your root server to complete this node transition to a relay server. INFO: Please look at the same on sles if it didn't fail before): documentation for details (Section 'Relay servers') ***************************************************************************************** [..] </pre> The issue is in this sed statement in the rpm scripts: <pre> install: cannot stat `/usr/src/rudder-packages/package/BUILD//usr/src/rudder-packages/package/SOURCES/rudder-apache-relay-common.conf': No such file or directory # rpm -q --scripts rudder-server-relay-4.1.0.beta2-1.SLES.11 | grep sed sed -i "/. \/etc\/sysconfig\/rudder-apache/d" /etc/sysconfig/apache2 sed -i "s%^DocumentRoot /var/www$%DocumentRoot /srv/www%" /var/tmp/rudder-server-relay-4.1.0.beta2-1.SLES.11-root-root/opt/rudder/etc/rudder-apache-relay-common.conf </pre> I suggest we should move the sed into the prepare section, where we prepare sources for build