proxy/installer/configure-proxy.sh | 63 ++++++++++++++-----------
proxy/installer/spacewalk-proxy-installer.spec | 8 ++-
rel-eng/packages/spacewalk-proxy-installer | 2
3 files changed, 44 insertions(+), 29 deletions(-)
New commits:
commit 2f2831bf41510524dcd2e86d5f2e580ff791e7f2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:56:58 2013 +0100
Automatic commit of package [spacewalk-proxy-installer] release [1.10.1-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec
b/proxy/installer/spacewalk-proxy-installer.spec
index 937f617..912842e 100644
--- a/proxy/installer/spacewalk-proxy-installer.spec
+++ b/proxy/installer/spacewalk-proxy-installer.spec
@@ -2,7 +2,7 @@ Name: spacewalk-proxy-installer
Summary: Spacewalk Proxy Server Installer
Group: Applications/Internet
License: GPLv2
-Version: 1.10.0
+Version: 1.10.1
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -96,6 +96,12 @@ spacewalk-pylint $RPM_BUILD_ROOT/usr/share/rhn
%doc LICENSE answers.txt
%changelog
+* Fri Mar 29 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.10.1-1
+- 896125 - make Y/N values optional
+- 896125 - report extra commandline arguments
+- 896125 - fail if answer file is not readable
+- Purging %%changelog entries preceding Spacewalk 1.0, in active packages.
+
* Thu Feb 21 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.9.2-1
- made proxy installer systemd ready
diff --git a/rel-eng/packages/spacewalk-proxy-installer
b/rel-eng/packages/spacewalk-proxy-installer
index 990b7f7..546ca81 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-1.9.2-1 proxy/installer/
+1.10.1-1 proxy/installer/
commit 70ce35834d5deee6a5c5f3ee994c6b920a970014
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:23:34 2013 +0100
fixed indent
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 38de16a..eade904 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -42,9 +42,9 @@ options:
Create config chanel and save configuration files to that channel.
Configuration channel name is rhn_proxy_config_\${SYSTEM_ID}.
--rhn-parent=RHN_PARENT
- Your parent Spacewalk server.
+ Your parent Spacewalk server.
--ssl-build-dir=SSL_BUILD_DIR
- The directory where we build SSL certificate. Default is /root/ssl-build
+ The directory where we build SSL certificate. Default is /root/ssl-build
--ssl-city=SSL_CITY
City to be used in SSL certificate.
--ssl-common=SSL_COMMON
@@ -54,18 +54,18 @@ options:
--ssl-email=SSL_EMAIL
Email to be used in SSL certificate.
--ssl-org=SSL_ORG
- Organization name to be used in SSL certificate.
+ Organization name to be used in SSL certificate.
--ssl-orgunit=SSL_ORGUNIT
- Organization unit name to be used in SSL certificate.
+ Organization unit name to be used in SSL certificate.
--ssl-password=SSL_PASSWORD
Password to be used for SSL CA certificate.
--ssl-state=SSL_STATE
- State to be used in SSL certificate.
+ State to be used in SSL certificate.
--ssl-cname=CNAME_ALIAS
- Cname alias of the machine. Can be specified multiple times.
+ Cname alias of the machine. Can be specified multiple times.
--start-services[=N]
- 1 or Y to start all services after configuration. This is default.
- 0 or N to not start services after configuration.
+ 1 or Y to start all services after configuration. This is default.
+ 0 or N to not start services after configuration.
--traceback-email=TRACEBACK_EMAIL
Email to which tracebacks should be sent.
--use-ssl
commit 265c47f05c1a82cc354908acb41cc40836a9453c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:05:48 2013 +0100
896125 - fixed configure-proxy.sh help
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index b9725de..38de16a 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -16,8 +16,8 @@ options:
for an example and documentation.
--ca-chain=CA_CHAIN
The CA cert used to verify the ssl connection to parent.
- --enable-scout=1
- 1 to enable monitoring scout, 0 otherwise.
+ --enable-scout
+ Enable monitoring scout.
--force-own-ca
Do not use parent CA and force to create your own.
-h, --help
@@ -28,9 +28,8 @@ options:
HTTP proxy in host:port format, e.g. squid.redhat.com:3128
--http-username=HTTP_USERNAME
The username for an authenticated proxy.
- --install-monitoring=Y
- Y if monitoring should be installed. Any other value means that
- monitoring will not be installed.
+ --install-monitoring
+ Install and enable monitoring.
--non-interactive
For use only with --answer-file. If the --answer-file doesn't
provide a required response, default answer is used.
@@ -39,9 +38,9 @@ options:
RHN_PARENT.
--monitoring-parent-ip=MONITORING_PARENT_IP
IP address of MONITORING_PARENT
- --populate-config-channel=Y
- Y if config chanel should be created and configuration files in that channel
- updated. Configuration channel will be named rhn_proxy_config_\${SYSTEM_ID}.
+ --populate-config-channel
+ Create config chanel and save configuration files to that channel.
+ Configuration channel name is rhn_proxy_config_\${SYSTEM_ID}.
--rhn-parent=RHN_PARENT
Your parent Spacewalk server.
--ssl-build-dir=SSL_BUILD_DIR
@@ -64,14 +63,14 @@ options:
State to be used in SSL certificate.
--ssl-cname=CNAME_ALIAS
Cname alias of the machine. Can be specified multiple times.
- --start-services=1
+ --start-services[=N]
1 or Y to start all services after configuration. This is default.
0 or N to not start services after configuration.
--traceback-email=TRACEBACK_EMAIL
Email to which tracebacks should be sent.
- --use-ssl=USE_SSL
- 1 if Spacewalk Proxy Server should communicate with parent over SSL.
- 0 otherwise. Even if disabled, client can still use SSL to connect
+ --use-ssl
+ Let Spacewalk Proxy Server communicate with parent over SSL.
+ Even if it is disabled client can still use SSL to connect
to Spacewalk Proxy Server.
--version=VERSION
Version of Spacewalk Proxy Server you want to activate.
commit 663e3053f0dec9f531b189b6eb2af0ebda06057d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:11:01 2013 +0100
896125 - make Y/N values optional
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 26ab92e..b9725de 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -95,7 +95,7 @@ parse_answer_file () {
INTERACTIVE=1
CNAME_INDEX=0
-OPTS=$(getopt
--longoptions=help,answer-file:,non-interactive,version:,rhn-parent:,traceback-email:,use-ssl:,ca-chain:,force-own-ca,http-proxy:,http-username:,http-password:,ssl-build-dir:,ssl-org:,ssl-orgunit:,ssl-common:,ssl-city:,ssl-state:,ssl-country:,ssl-email:,ssl-password:,ssl-cname:,install-monitoring:,enable-scout:,monitoring-parent:,monitoring-parent-ip:,populate-config-channel:,start-services:
-n ${0##*/} -- h "$@")
+OPTS=$(getopt
--longoptions=help,answer-file:,non-interactive,version:,rhn-parent:,traceback-email:,use-ssl::,ca-chain:,force-own-ca,http-proxy:,http-username:,http-password:,ssl-build-dir:,ssl-org:,ssl-orgunit:,ssl-common:,ssl-city:,ssl-state:,ssl-country:,ssl-email:,ssl-password:,ssl-cname:,install-monitoring::,enable-scout::,monitoring-parent:,monitoring-parent-ip:,populate-config-channel::,start-services::
-n ${0##*/} -- h "$@")
if [ $? != 0 ] ; then
print_help
@@ -111,7 +111,7 @@ while : ; do
--version) VERSION=$2; shift;;
--rhn-parent) RHN_PARENT="$2"; shift;;
--traceback-email) TRACEBACK_EMAIL="$2"; shift;;
- --use-ssl) USE_SSL="$2"; shift;;
+ --use-ssl) USE_SSL="${2:-1}"; shift;;
--ca-chain) CA_CHAIN="$2"; shift;;
--force-own-ca) FORCE_OWN_CA=1;;
--http-proxy) HTTP_PROXY="$2"; shift;;
@@ -127,12 +127,12 @@ while : ; do
--ssl-email) SSL_EMAIL="$2"; shift;;
--ssl-password) SSL_PASSWORD="$2"; shift;;
--ssl-cname) SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname="$2"; shift;;
- --install-monitoring) INSTALL_MONITORING="$2"; shift;;
- --enable-scout) ENABLE_SCOUT="$2"; shift;;
+ --install-monitoring) INSTALL_MONITORING="${2:-Y}"; shift;;
+ --enable-scout) ENABLE_SCOUT="${2:-1}"; shift;;
--monitoring-parent) MONITORING_PARENT_IP="$2"; shift;;
--monitoring-parent-ip) MONITORING_PARENT_IP="$2"; shift;;
- --populate-config-channel) POPULATE_CONFIG_CHANNEL="$2"; shift;;
- --start-services) START_SERVICES="$2"; shift;;
+ --populate-config-channel) POPULATE_CONFIG_CHANNEL="${2:-Y}"; shift;;
+ --start-services) START_SERVICES="${2:-Y}"; shift;;
--) shift;
if [ $# -gt 0 ] ; then
echo "Error: Extra arguments found: $@"
commit f32c64d0e8cfec08dd47f2d127472828ad4c6ec2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:11:57 2013 +0100
896125 - report extra commandline arguments
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 8756c62..26ab92e 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -133,7 +133,13 @@ while : ; do
--monitoring-parent-ip) MONITORING_PARENT_IP="$2"; shift;;
--populate-config-channel) POPULATE_CONFIG_CHANNEL="$2"; shift;;
--start-services) START_SERVICES="$2"; shift;;
- --) shift; break;;
+ --) shift;
+ if [ $# -gt 0 ] ; then
+ echo "Error: Extra arguments found: $@"
+ print_help
+ exit 1
+ fi
+ break;;
*) echo Error: Invalid option $1; exit 1;;
esac
shift
commit c7cf84c51d84a28f099bff21e52fa7b99ad98994
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 29 14:06:36 2013 +0100
896125 - fail if answer file is not readable
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 7166878..8756c62 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -82,6 +82,10 @@ HELP
parse_answer_file () {
local FILE="$1"
local ALIAS
+ if [ ! -r "$FILE" ] ; then
+ echo "Answer file '$FILE' is not readable."
+ exit 1
+ fi
. "$FILE"
for ALIAS in ${SSL_CNAME[@]}; do
SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$ALIAS