3 commits - client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/etc-conf/Makefile | 5 ++++-
client/rhel/rhn-client-tools/rhn-client-tools.spec | 14 +++++++++++++-
client/rhel/rhn-client-tools/rhn_register.desktop | 10 ++++++++++
rel-eng/packages/rhn-client-tools | 2 +-
4 files changed, 28 insertions(+), 3 deletions(-)
New commits:
commit 73e7fd971625d652626a22b73200f92d2168f22e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Mar 30 13:39:28 2009 +0200
Automatic commit of package [rhn-client-tools] release [0.4.23-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 249a4bc..699072c 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -5,7 +5,7 @@ Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.
Source1: rhn_register.desktop
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.4.22
+Version: 0.4.23
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -205,7 +205,7 @@ rm -rf $RPM_BUILD_ROOT
%{_desktopdir}/rhn_register.desktop
%changelog
-* Mon Mar 30 2009 Miroslav Suchy <msuchy(a)redhat.com>
+* Mon Mar 30 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.4.23-1
- 490438 - add .desktop file, own allowed-actions dir
* Mon Mar 16 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.4.22-1
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 1b32b45..8fd0126 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.4.22-1 client/rhel/rhn-client-tools/
+0.4.23-1 client/rhel/rhn-client-tools/
commit 0cd6ea34fccb64cc380962750bbd5fe8632562c6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Mar 30 13:38:06 2009 +0200
490438 - own allowed-actions dir
diff --git a/client/rhel/rhn-client-tools/etc-conf/Makefile b/client/rhel/rhn-client-tools/etc-conf/Makefile
index f90bf9a..544d0f8 100644
--- a/client/rhel/rhn-client-tools/etc-conf/Makefile
+++ b/client/rhel/rhn-client-tools/etc-conf/Makefile
@@ -13,13 +13,16 @@ SECURITY_DIR = $(PREFIX)/etc/security/console.apps
CONFIG_DIR = $(PREFIX)/etc/sysconfig/rhn
MACROS_DIR = $(PREFIX)/etc/rpm/
CAPS_DIR = $(PREFIX)/etc/sysconfig/rhn/clientCaps.d
+ALLOWED_ACTIONS_SCRIPT = $(PREFIX)/etc/sysconfig/rhn/allowed-actions/script
+ALLOWED_ACTIONS_CONFIG = $(PREFIX)/etc/sysconfig/rhn/allowed-actions/configfiles
LOGROTATE_DIR = $(PREFIX)/etc/logrotate.d
YUM_REPO_DIR = $(PREFIX)/etc/yum.repos.d
# all dirs
DIRS = $(PAMD_DIR) $(SECURITY_DIR) $(CONFIG_DIR) \
$(LOGROTATE_DIR) $(YUM_REPO_DIR)\
- $(MACROS_DIR) $(CAPS_DIR)
+ $(MACROS_DIR) $(CAPS_DIR) $(ALLOWED_ACTIONS_SCRIPT) \
+ $(ALLOWED_ACTIONS_CONFIG)
# INSTALL scripts
INSTALL = install -p --verbose
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index d77e267..249a4bc 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -103,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_sysconfdir}/sysconfig/rhn
%dir %{_sysconfdir}/sysconfig/rhn/clientCaps.d
+%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions
+%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/configfiles
+%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/script
%config(noreplace) %{_sysconfdir}/sysconfig/rhn/up2date
%config(noreplace) %{_sysconfdir}/logrotate.d/up2date
%config(noreplace) %{_sysconfdir}/rpm/macros.up2date
@@ -203,7 +206,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Mar 30 2009 Miroslav Suchy <msuchy(a)redhat.com>
-- 490438 - add .desktop file
+- 490438 - add .desktop file, own allowed-actions dir
* Mon Mar 16 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.4.22-1
- use macros insted hardcoded paths
commit 1d7459a75ee53596a87140760892aea0027e304d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Mar 30 12:27:40 2009 +0200
490438 - add .desktop file
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 7e885e1..d77e267 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -2,6 +2,7 @@ Summary: Support programs and libraries for Red Hat Network or Spacewalk
License: GPLv2
Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
+Source1: rhn_register.desktop
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
Version: 0.4.22
@@ -25,6 +26,7 @@ Conflicts: up2date
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: intltool
+BuildRequires: desktop-file-utils
%description
Red Hat Network Client Tools provides programs and libraries to allow your
@@ -77,9 +79,12 @@ make -f Makefile.rhn-client-tools install VERSION=%{version}-%{release} PREFIX=$
mkdir -p $RPM_BUILD_ROOT/var/lib/up2date
+desktop-file-install --dir=${RPM_BUILD_ROOT}%{_desktopdir} --vendor=rhn %{SOURCE1}
+
%find_lang %{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -194,8 +199,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/24x24/apps/up2date.png
%{_datadir}/icons/hicolor/32x32/apps/up2date.png
%{_datadir}/icons/hicolor/48x48/apps/up2date.png
+%{_desktopdir}/rhn_register.desktop
%changelog
+* Mon Mar 30 2009 Miroslav Suchy <msuchy(a)redhat.com>
+- 490438 - add .desktop file
+
* Mon Mar 16 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.4.22-1
- use macros insted hardcoded paths
diff --git a/client/rhel/rhn-client-tools/rhn_register.desktop b/client/rhel/rhn-client-tools/rhn_register.desktop
new file mode 100644
index 0000000..d8f5240
--- /dev/null
+++ b/client/rhel/rhn-client-tools/rhn_register.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=rhn_register
+GenericName=Registering for software updated
+Comment=Register to Spacewalk/Satellite/Red Hat Network.
+Exec=rhn_register
+Icon=up2date
+Terminal=false
+Type=Application
+Categories=Settings;
15 years
3 commits - backend/satellite_tools
by Milan Zazrivec
backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 2b88c5e2f36168c143205b4bd18dc13d40e45a3d
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Mar 30 11:58:21 2009 +0200
485698 - be consistent in long options syntax description
diff --git a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
index 3023c09..1cdae09 100644
--- a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
+++ b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
@@ -158,7 +158,7 @@ A tool that exports satellite content into a directory in an XML format. That co
</listitem>
</varlistentry>
<varlistentry>
- <term>-p --print-configuration</term>
+ <term>-p, --print-configuration</term>
<listitem>
<para>Print the configuration and exit.</para>
</listitem>
commit a5ff38524c1c3b35e5eb8b72f107a6b7793c13a9
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Mar 30 11:55:31 2009 +0200
485698 - correct the -d / --dir syntax description in manual page
diff --git a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
index 95fe912..3023c09 100644
--- a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
+++ b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
@@ -103,7 +103,7 @@ A tool that exports satellite content into a directory in an XML format. That co
<RefSect1><Title>Options</Title>
<variablelist>
<varlistentry>
- <term>-d --dir</term>
+ <term>-dDIR, --dir=DIR</term>
<listitem>
<para>Place the exported information into this directory.</para>
</listitem>
commit 655f6165469c7b799fdb32b8a7b79d18a32d70dc
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Mar 30 11:42:11 2009 +0200
485698 - -h option missing in manual page
diff --git a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
index 4375e14..95fe912 100644
--- a/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
+++ b/backend/satellite_tools/disk_dumper/rhn-satellite-exporter.sgml
@@ -224,7 +224,7 @@ A tool that exports satellite content into a directory in an XML format. That co
</listitem>
</varlistentry>
<varlistentry>
- <term>--help</term>
+ <term>-h, --help</term>
<listitem>
<para>Show help message and exit.</para>
</listitem>
15 years
Changes to 'refs/tags/spacewalk-proxy-installer-0.5.24-1'
by Michael Mraka
Tag 'spacewalk-proxy-installer-0.5.24-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2009-03-30 08:01 +0000
Tagging package [spacewalk-proxy-installer] version [0.5.24-1] in directory [proxy/installer/].
Changes since osad-5.9.10-1-27:
---
0 files changed
---
15 years
proxy/installer rel-eng/packages
by Michael Mraka
proxy/installer/spacewalk-proxy-installer.spec | 5 ++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 70c7a6b91570a9ab836c91685a8a3281c5620ad2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Mar 30 10:01:36 2009 +0200
Automatic commit of package [spacewalk-proxy-installer] release [0.5.24-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec b/proxy/installer/spacewalk-proxy-installer.spec
index afae88e..402e716 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: 0.5.23
+Version: 0.5.24
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE answers.txt
%changelog
+* Mon Mar 30 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.5.24-1
+- reformated configure-proxy.sh
+
* Thu Mar 26 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.5.23-1
- 486125 - if some option is present in answer file, use it even if empty
- remove dependency on httpd which conflict with older proxies, let
diff --git a/rel-eng/packages/spacewalk-proxy-installer b/rel-eng/packages/spacewalk-proxy-installer
index 9854c61..8d9ed2b 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-0.5.23-1 proxy/installer/
+0.5.24-1 proxy/installer/
15 years
13 commits - proxy/installer
by Michael Mraka
proxy/installer/configure-proxy.sh | 154 +++++++++++++++++++++++--------------
1 file changed, 98 insertions(+), 56 deletions(-)
New commits:
commit aba79d8c16b0c187350e96f155037c5cb5828e31
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 01:17:55 2009 +0100
replaced /etc/squid with SQUID_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index d8e82d9..b3c3c44 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -101,7 +101,7 @@ HTTPDCONF_DIR=/etc/httpd/conf
HTTPDCONFD_DIR=/etc/httpd/conf.d
HTMLPUB_DIR=/var/www/html/pub
JABBERD_DIR=/etc/jabberd
-
+SQUID_DIR=/etc/squid
SYSTEM_ID=$(/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2)
@@ -223,7 +223,7 @@ SQUID_SIZE=$(df -P /var/spool/squid | awk '{a=$4} END {printf("%d", a * 60 / 100
sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/c2s.xml > $JABBERD_DIR/c2s.xml
sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/sm.xml > $JABBERD_DIR/sm.xml
sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid $SQUID_SIZE 16 256|g" \
- < $DIR/squid.conf > /etc/squid/squid.conf
+ < $DIR/squid.conf > $SQUID_DIR/squid.conf
sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
-e "s/\${session.http_proxy}/$HTTP_PROXY/g" \
-e "s/\${session.http_proxy_username}/$HTTP_USERNAME/g" \
@@ -323,7 +323,7 @@ if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
$HTTPDCONFD_DIR/ssl.conf \
$RHNCONF_DIR/rhn.conf \
$RHNCONF_DIR/cluster.ini \
- /etc/squid/squid.conf \
+ $SQUID_DIR/squid.conf \
$HTTPDCONFD_DIR/cobbler-proxy.conf \
$HTTPDCONF_DIR/httpd.conf \
$HTTPDCONFD_DIR/rhn_proxy.conf \
commit 5d76154a8aa74985af5145f18c3d7e03be3ffe5d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 01:11:24 2009 +0100
don't mix `...` and $(...)
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 635059d..d8e82d9 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -29,7 +29,7 @@ INTERACTIVE=1
while [ $# -ge 1 ]; do
case $1 in
--help | -h) print_help;;
- --answer-file=*) . `echo $1 | cut -d= -f2`;;
+ --answer-file=*) . $(echo $1 | cut -d= -f2);;
--non-interactive) INTERACTIVE=0;;
esac
shift
@@ -103,10 +103,10 @@ HTMLPUB_DIR=/var/www/html/pub
JABBERD_DIR=/etc/jabberd
-SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
+SYSTEM_ID=$(/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2)
DIR=/usr/share/doc/proxy/conf-template
-HOSTNAME=`hostname`
+HOSTNAME=$(hostname)
default_or_input "Proxy version to activate" VERSION $(rpm -q --queryformat %{version} spacewalk-proxy-installer|cut -d. -f1-2)
@@ -206,7 +206,7 @@ if [ $MONITORING -eq 0 ]; then
#and with cluster.ini
echo "Configuring monitoring."
default_or_input "Monitoring parent" MONITORING_PARENT "$RHN_PARENT"
- RESOLVED_IP=`/usr/bin/getent hosts $RHN_PARENT | cut -f1 -d' '`
+ RESOLVED_IP=$(/usr/bin/getent hosts $RHN_PARENT | cut -f1 -d' ')
default_or_input "Monitoring parent IP" MONITORING_PARENT_IP "$RESOLVED_IP"
default_or_input "Enable monitoring scout" ENABLE_SCOUT "Y/n"
ENABLE_SCOUT=$(yes_no $ENABLE_SCOUT)
@@ -276,12 +276,12 @@ else
echo "Using CA key at $SSL_BUILD_DIR/RHN-ORG-PRIVATE-SSL-KEY."
fi
-RPM_CA=`grep noarch $SSL_BUILD_DIR/latest.txt`
+RPM_CA=$(grep noarch $SSL_BUILD_DIR/latest.txt)
if [ ! -f $SSL_BUILD_DIR/$RPM_CA ]; then
echo "Generating distributable RPM for CA public certificate:"
/usr/bin/rhn-ssl-tool --gen-ca -q --rpm-only --dir="$SSL_BUILD_DIR"
- RPM_CA=`grep noarch $SSL_BUILD_DIR/latest.txt`
+ RPM_CA=$(grep noarch $SSL_BUILD_DIR/latest.txt)
fi
if [ ! -f $HTMLPUB_DIR/$RPM_CA ] || [ ! -f $HTMLPUB_DIR/RHN-ORG-TRUSTED-SSL-CERT ]; then
@@ -303,7 +303,7 @@ echo "Generating SSL key and public certificate:"
config_error $? "SSL key generation failed!"
echo "Installing SSL certificate for Apache and Jabberd:"
-rpm -Uv `/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm`
+rpm -Uv $(/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm)
mv $HTTPDCONFD_DIR/ssl.conf $HTTPDCONFD_DIR/ssl.conf.bak
sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile $HTTPDCONF_DIR/ssl.crt/server.crt|g" \
commit b1c1fa89fb931bdb4ed71eedcbcc5c0e34bf31c7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 01:03:42 2009 +0100
let's do math inside awk
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 1e80f23..635059d 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -218,7 +218,7 @@ fi
# df -P give free space in kB
# * 60 / 100 is 60% of that space
# / 1024 is to get value in MB
-SQUID_SIZE=$(( `df -P /var/spool/squid | awk '{a=$4} END {print a}'` * 60 / 100 / 1024 ))
+SQUID_SIZE=$(df -P /var/spool/squid | awk '{a=$4} END {printf("%d", a * 60 / 100 / 1024)}')
sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/c2s.xml > $JABBERD_DIR/c2s.xml
sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/sm.xml > $JABBERD_DIR/sm.xml
commit e58f05817f8324ae44efd1bf792b5185e986385f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:57:10 2009 +0100
command args formated more readable way
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index d9bebfe..1e80f23 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -77,7 +77,13 @@ yes_no() {
config_error () {
if [ $1 -gt 0 ]; then
echo "$2 Installation interrupted."
- /usr/bin/rhn-proxy-activate --server="$RHN_PARENT" --http-proxy="$HTTP_PROXY" --http-proxy-username="$HTTP_USERNAME" --http-proxy-password="$HTTP_PASSWORD" --ca-cert="$CA_CHAIN" --deactivate --non-interactive
+ /usr/bin/rhn-proxy-activate \
+ --server="$RHN_PARENT" \
+ --http-proxy="$HTTP_PROXY" \
+ --http-proxy-username="$HTTP_USERNAME" \
+ --http-proxy-password="$HTTP_PASSWORD" \
+ --ca-cert="$CA_CHAIN" \
+ --deactivate --non-interactive
exit $1
fi
}
@@ -159,7 +165,13 @@ default_or_input "Country code" SSL_COUNTRY ''
default_or_input "Email" SSL_EMAIL "$TRACEBACK_EMAIL"
-/usr/bin/rhn-proxy-activate --server="$RHN_PARENT" --http-proxy="$HTTP_PROXY" --http-proxy-username="$HTTP_USERNAME" --http-proxy-password="$HTTP_PASSWORD" --ca-cert="$CA_CHAIN" --version="$VERSION" --non-interactive
+/usr/bin/rhn-proxy-activate --server="$RHN_PARENT" \
+ --http-proxy="$HTTP_PROXY" \
+ --http-proxy-username="$HTTP_USERNAME" \
+ --http-proxy-password="$HTTP_PASSWORD" \
+ --ca-cert="$CA_CHAIN" \
+ --version="$VERSION" \
+ --non-interactive
config_error $? "Proxy activation failed!"
$YUM_OR_UPDATE spacewalk-proxy-management
@@ -249,9 +261,15 @@ fi
if [ ! -f $SSL_BUILD_DIR/RHN-ORG-PRIVATE-SSL-KEY ]; then
echo "Generating CA key and public certificate:"
- /usr/bin/rhn-ssl-tool --gen-ca -q --dir="$SSL_BUILD_DIR" --set-common-name="$SSL_COMMON" \
- --set-country="$SSL_COUNTRY" --set-city="$SSL_CITY" --set-state="$SSL_STATE" \
- --set-org="$SSL_ORG" --set-org-unit="$SSL_ORGUNIT" --set-email="$SSL_EMAIL" \
+ /usr/bin/rhn-ssl-tool --gen-ca -q \
+ --dir="$SSL_BUILD_DIR" \
+ --set-common-name="$SSL_COMMON" \
+ --set-country="$SSL_COUNTRY" \
+ --set-city="$SSL_CITY" \
+ --set-state="$SSL_STATE" \
+ --set-org="$SSL_ORG" \
+ --set-org-unit="$SSL_ORGUNIT" \
+ --set-email="$SSL_EMAIL" \
$RHNSSLTOOLPWD
config_error $? "CA certificate generation failed!"
else
@@ -272,9 +290,15 @@ if [ ! -f $HTMLPUB_DIR/$RPM_CA ] || [ ! -f $HTMLPUB_DIR/RHN-ORG-TRUSTED-SSL-CERT
fi
echo "Generating SSL key and public certificate:"
-/usr/bin/rhn-ssl-tool --gen-server -q --no-rpm --set-hostname "$HOSTNAME" --dir="$SSL_BUILD_DIR" \
- --set-country="$SSL_COUNTRY" --set-city="$SSL_CITY" --set-state="$SSL_STATE" \
- --set-org="$SSL_ORG" --set-org-unit="$SSL_ORGUNIT" --set-email="$SSL_EMAIL" \
+/usr/bin/rhn-ssl-tool --gen-server -q --no-rpm \
+ --set-hostname "$HOSTNAME" \
+ --dir="$SSL_BUILD_DIR" \
+ --set-country="$SSL_COUNTRY" \
+ --set-city="$SSL_CITY" \
+ --set-state="$SSL_STATE" \
+ --set-org="$SSL_ORG" \
+ --set-org-unit="$SSL_ORGUNIT" \
+ --set-email="$SSL_EMAIL" \
$RHNSSLTOOLPWD
config_error $? "SSL key generation failed!"
@@ -292,12 +316,21 @@ CHANNEL_LABEL="rhn_proxy_config_$SYSTEM_ID"
default_or_input "Create and populate configuration channel $CHANNEL_LABEL?" POPULATE_CONFIG_CHANNEL 'Y/n'
POPULATE_CONFIG_CHANNEL=$(yes_no $POPULATE_CONFIG_CHANNEL)
if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
- rhncfg-manager create-channel --server-name "$RHN_PARENT" rhn_proxy_config_$SYSTEM_ID
- rhncfg-manager update --server-name "$RHN_PARENT" --channel=rhn_proxy_config_$SYSTEM_ID \
- $HTTPDCONFD_DIR/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
- $HTTPDCONFD_DIR/cobbler-proxy.conf $HTTPDCONF_DIR/httpd.conf $HTTPDCONFD_DIR/rhn_proxy.conf \
- $HTTPDCONFD_DIR/proxy_broker.conf $HTTPDCONFD_DIR/proxy_redirect.conf \
- $JABBERD_DIR/c2s.xml $JABBERD_DIR/sm.xml
+ rhncfg-manager create-channel --server-name "$RHN_PARENT" \
+ rhn_proxy_config_$SYSTEM_ID
+ rhncfg-manager update --server-name "$RHN_PARENT" \
+ --channel=rhn_proxy_config_$SYSTEM_ID \
+ $HTTPDCONFD_DIR/ssl.conf \
+ $RHNCONF_DIR/rhn.conf \
+ $RHNCONF_DIR/cluster.ini \
+ /etc/squid/squid.conf \
+ $HTTPDCONFD_DIR/cobbler-proxy.conf \
+ $HTTPDCONF_DIR/httpd.conf \
+ $HTTPDCONFD_DIR/rhn_proxy.conf \
+ $HTTPDCONFD_DIR/proxy_broker.conf \
+ $HTTPDCONFD_DIR/proxy_redirect.conf \
+ $JABBERD_DIR/c2s.xml \
+ $JABBERD_DIR/sm.xml
fi
echo "Enabling Spacewalk Proxy."
commit 8607736d2cd38687a4540963d676fa2b5b0a09c4
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:48:03 2009 +0100
replaced /etc/httpd/conf with HTTPDCONF_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 84bbdcf..d9bebfe 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -91,6 +91,7 @@ if [ -f /usr/bin/yum ]; then
fi
SYSCONFIG_DIR=/etc/sysconfig/rhn
RHNCONF_DIR=/etc/rhn
+HTTPDCONF_DIR=/etc/httpd/conf
HTTPDCONFD_DIR=/etc/httpd/conf.d
HTMLPUB_DIR=/var/www/html/pub
JABBERD_DIR=/etc/jabberd
@@ -281,8 +282,8 @@ echo "Installing SSL certificate for Apache and Jabberd:"
rpm -Uv `/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm`
mv $HTTPDCONFD_DIR/ssl.conf $HTTPDCONFD_DIR/ssl.conf.bak
-sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
- -e "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key|g" \
+sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile $HTTPDCONF_DIR/ssl.crt/server.crt|g" \
+ -e "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile $HTTPDCONF_DIR/ssl.key/server.key|g" \
-e "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|"
< $HTTPDCONFD_DIR/ssl.conf.bak > $HTTPDCONFD_DIR/ssl.conf
@@ -294,7 +295,7 @@ if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
rhncfg-manager create-channel --server-name "$RHN_PARENT" rhn_proxy_config_$SYSTEM_ID
rhncfg-manager update --server-name "$RHN_PARENT" --channel=rhn_proxy_config_$SYSTEM_ID \
$HTTPDCONFD_DIR/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
- $HTTPDCONFD_DIR/cobbler-proxy.conf /etc/httpd/conf/httpd.conf $HTTPDCONFD_DIR/rhn_proxy.conf \
+ $HTTPDCONFD_DIR/cobbler-proxy.conf $HTTPDCONF_DIR/httpd.conf $HTTPDCONFD_DIR/rhn_proxy.conf \
$HTTPDCONFD_DIR/proxy_broker.conf $HTTPDCONFD_DIR/proxy_redirect.conf \
$JABBERD_DIR/c2s.xml $JABBERD_DIR/sm.xml
fi
commit 562466f5be96fd005206b0f15d6b37824b023376
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:44:13 2009 +0100
replaced /etc/jabberd with JABBERD_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 450e002..84bbdcf 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -93,6 +93,8 @@ SYSCONFIG_DIR=/etc/sysconfig/rhn
RHNCONF_DIR=/etc/rhn
HTTPDCONFD_DIR=/etc/httpd/conf.d
HTMLPUB_DIR=/var/www/html/pub
+JABBERD_DIR=/etc/jabberd
+
SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
@@ -205,8 +207,8 @@ fi
# / 1024 is to get value in MB
SQUID_SIZE=$(( `df -P /var/spool/squid | awk '{a=$4} END {print a}'` * 60 / 100 / 1024 ))
-sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/c2s.xml > /etc/jabberd/c2s.xml
-sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/sm.xml > /etc/jabberd/sm.xml
+sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/c2s.xml > $JABBERD_DIR/c2s.xml
+sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/sm.xml > $JABBERD_DIR/sm.xml
sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid $SQUID_SIZE 16 256|g" \
< $DIR/squid.conf > /etc/squid/squid.conf
sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
@@ -294,7 +296,7 @@ if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
$HTTPDCONFD_DIR/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
$HTTPDCONFD_DIR/cobbler-proxy.conf /etc/httpd/conf/httpd.conf $HTTPDCONFD_DIR/rhn_proxy.conf \
$HTTPDCONFD_DIR/proxy_broker.conf $HTTPDCONFD_DIR/proxy_redirect.conf \
- /etc/jabberd/c2s.xml /etc/jabberd/sm.xml
+ $JABBERD_DIR/c2s.xml $JABBERD_DIR/sm.xml
fi
echo "Enabling Spacewalk Proxy."
commit 0b1bce2eef8c3b0681956527e7714326c4a1493d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:41:50 2009 +0100
cat | sed is rarely needed
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index dfd5b40..450e002 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -205,12 +205,11 @@ fi
# / 1024 is to get value in MB
SQUID_SIZE=$(( `df -P /var/spool/squid | awk '{a=$4} END {print a}'` * 60 / 100 / 1024 ))
-cat $DIR/c2s.xml | sed "s/\${session.hostname\}/$HOSTNAME/g" > /etc/jabberd/c2s.xml
-cat $DIR/sm.xml | sed "s/\${session.hostname\}/$HOSTNAME/g" > /etc/jabberd/sm.xml
-cat $DIR/squid.conf | sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid $SQUID_SIZE 16 256|g" \
- > /etc/squid/squid.conf
-cat $DIR/rhn.conf | \
- sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
+sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/c2s.xml > /etc/jabberd/c2s.xml
+sed "s/\${session.hostname\}/$HOSTNAME/g" < $DIR/sm.xml > /etc/jabberd/sm.xml
+sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid $SQUID_SIZE 16 256|g" \
+ < $DIR/squid.conf > /etc/squid/squid.conf
+sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
-e "s/\${session.http_proxy}/$HTTP_PROXY/g" \
-e "s/\${session.http_proxy_username}/$HTTP_USERNAME/g" \
-e "s/\${session.http_proxy_password}/$HTTP_PASSWORD/g" \
@@ -218,13 +217,12 @@ cat $DIR/rhn.conf | \
-e "s/\${session.traceback_mail}/$TRACEBACK_EMAIL/g" \
-e "s/\${session.use_ssl:0}/$USE_SSL/g" \
-e "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
- > $RHNCONF_DIR/rhn.conf
-cat $DIR/cluster.ini | \
- sed -e "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
+ < $DIR/rhn.conf > $RHNCONF_DIR/rhn.conf
+sed -e "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
-e "s/\${session.rhn_monitoring_parent_ip}/$MONITORING_PARENT_IP/g" \
-e "s/\${session.rhn_monitoring_parent}/$MONITORING_PARENT/g" \
-e "s/\${session.scout_shared_key}/$SCOUT_SHARED_KEY/g" \
- > $RHNCONF_DIR/cluster.ini
+ < cat $DIR/cluster.ini > $RHNCONF_DIR/cluster.ini
#Setup the cobbler stuff, needed to use koan through a proxy
@@ -281,10 +279,10 @@ echo "Installing SSL certificate for Apache and Jabberd:"
rpm -Uv `/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm`
mv $HTTPDCONFD_DIR/ssl.conf $HTTPDCONFD_DIR/ssl.conf.bak
-cat $HTTPDCONFD_DIR/ssl.conf.bak | \
- sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
+sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
-e "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key|g" \
- -e "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|" > $HTTPDCONFD_DIR/ssl.conf
+ -e "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|"
+ < $HTTPDCONFD_DIR/ssl.conf.bak > $HTTPDCONFD_DIR/ssl.conf
CHANNEL_LABEL="rhn_proxy_config_$SYSTEM_ID"
commit adbbdbdc947df94740c921090810de1442bf318d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:34:39 2009 +0100
replace sed |sed | sed | ... with only one sed -e -e -e
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index efce6c5..dfd5b40 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -209,19 +209,21 @@ cat $DIR/c2s.xml | sed "s/\${session.hostname\}/$HOSTNAME/g" > /etc/jabberd/c2s.
cat $DIR/sm.xml | sed "s/\${session.hostname\}/$HOSTNAME/g" > /etc/jabberd/sm.xml
cat $DIR/squid.conf | sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid $SQUID_SIZE 16 256|g" \
> /etc/squid/squid.conf
-cat $DIR/rhn.conf | sed "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
- | sed "s/\${session.http_proxy}/$HTTP_PROXY/g" \
- | sed "s/\${session.http_proxy_username}/$HTTP_USERNAME/g" \
- | sed "s/\${session.http_proxy_password}/$HTTP_PASSWORD/g" \
- | sed "s/\${session.rhn_parent}/$RHN_PARENT/g" \
- | sed "s/\${session.traceback_mail}/$TRACEBACK_EMAIL/g" \
- | sed "s/\${session.use_ssl:0}/$USE_SSL/g" \
- | sed "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
+cat $DIR/rhn.conf | \
+ sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
+ -e "s/\${session.http_proxy}/$HTTP_PROXY/g" \
+ -e "s/\${session.http_proxy_username}/$HTTP_USERNAME/g" \
+ -e "s/\${session.http_proxy_password}/$HTTP_PASSWORD/g" \
+ -e "s/\${session.rhn_parent}/$RHN_PARENT/g" \
+ -e "s/\${session.traceback_mail}/$TRACEBACK_EMAIL/g" \
+ -e "s/\${session.use_ssl:0}/$USE_SSL/g" \
+ -e "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
> $RHNCONF_DIR/rhn.conf
-cat $DIR/cluster.ini | sed "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
- | sed "s/\${session.rhn_monitoring_parent_ip}/$MONITORING_PARENT_IP/g" \
- | sed "s/\${session.rhn_monitoring_parent}/$MONITORING_PARENT/g" \
- | sed "s/\${session.scout_shared_key}/$SCOUT_SHARED_KEY/g" \
+cat $DIR/cluster.ini | \
+ sed -e "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
+ -e "s/\${session.rhn_monitoring_parent_ip}/$MONITORING_PARENT_IP/g" \
+ -e "s/\${session.rhn_monitoring_parent}/$MONITORING_PARENT/g" \
+ -e "s/\${session.scout_shared_key}/$SCOUT_SHARED_KEY/g" \
> $RHNCONF_DIR/cluster.ini
@@ -279,10 +281,10 @@ echo "Installing SSL certificate for Apache and Jabberd:"
rpm -Uv `/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm`
mv $HTTPDCONFD_DIR/ssl.conf $HTTPDCONFD_DIR/ssl.conf.bak
-cat $HTTPDCONFD_DIR/ssl.conf.bak \
- | sed "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
- | sed "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key|g" \
- | sed "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|" > $HTTPDCONFD_DIR/ssl.conf
+cat $HTTPDCONFD_DIR/ssl.conf.bak | \
+ sed -e "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
+ -e "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key|g" \
+ -e "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|" > $HTTPDCONFD_DIR/ssl.conf
CHANNEL_LABEL="rhn_proxy_config_$SYSTEM_ID"
commit 4d331d61b1da51824bf951f8a6941d9cbfefa321
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:28:41 2009 +0100
replaced /var/www/html/pub with HTMLPUB_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index efa67c8..efce6c5 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -92,6 +92,7 @@ fi
SYSCONFIG_DIR=/etc/sysconfig/rhn
RHNCONF_DIR=/etc/rhn
HTTPDCONFD_DIR=/etc/httpd/conf.d
+HTMLPUB_DIR=/var/www/html/pub
SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
@@ -262,9 +263,9 @@ if [ ! -f $SSL_BUILD_DIR/$RPM_CA ]; then
RPM_CA=`grep noarch $SSL_BUILD_DIR/latest.txt`
fi
-if [ ! -f /var/www/html/pub/$RPM_CA ] || [ ! -f /var/www/html/pub/RHN-ORG-TRUSTED-SSL-CERT ]; then
- echo "Copying CA public certificate to /var/www/html/pub for distribution to clients:"
- cp $SSL_BUILD_DIR/RHN-ORG-TRUSTED-SSL-CERT $SSL_BUILD_DIR/$RPM_CA /var/www/html/pub/
+if [ ! -f $HTMLPUB_DIR/$RPM_CA ] || [ ! -f $HTMLPUB_DIR/RHN-ORG-TRUSTED-SSL-CERT ]; then
+ echo "Copying CA public certificate to $HTMLPUB_DIR for distribution to clients:"
+ cp $SSL_BUILD_DIR/RHN-ORG-TRUSTED-SSL-CERT $SSL_BUILD_DIR/$RPM_CA $HTMLPUB_DIR/
fi
echo "Generating SSL key and public certificate:"
commit 46a978924da8b8b8c4d41f4d70de6b78ba6f5983
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:24:53 2009 +0100
replace /etc/httpd/conf.d with HTTPDCONFD_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index a2f5caa..efa67c8 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -91,6 +91,7 @@ if [ -f /usr/bin/yum ]; then
fi
SYSCONFIG_DIR=/etc/sysconfig/rhn
RHNCONF_DIR=/etc/rhn
+HTTPDCONFD_DIR=/etc/httpd/conf.d
SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
@@ -228,8 +229,8 @@ PROTO="http";
if [ $USE_SSL -eq 1 ]; then
PROTO="https"
fi
-echo "ProxyPass /cobbler_api $PROTO://$RHN_PARENT/cobbler_api" > /etc/httpd/conf.d/cobbler-proxy.conf
-echo "ProxyPassReverse /cobbler_api $PROTO://$RHN_PARENT/cobbler_api" >> /etc/httpd/conf.d/cobbler-proxy.conf
+echo "ProxyPass /cobbler_api $PROTO://$RHN_PARENT/cobbler_api" > $HTTPDCONFD_DIR/cobbler-proxy.conf
+echo "ProxyPassReverse /cobbler_api $PROTO://$RHN_PARENT/cobbler_api" >> $HTTPDCONFD_DIR/cobbler-proxy.conf
# lets do SSL stuff
SSL_BUILD_DIR="/root/ssl-build"
@@ -276,11 +277,11 @@ config_error $? "SSL key generation failed!"
echo "Installing SSL certificate for Apache and Jabberd:"
rpm -Uv `/usr/bin/rhn-ssl-tool --gen-server --rpm-only --dir="$SSL_BUILD_DIR" 2>/dev/null |grep noarch.rpm`
-mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.bak
-cat /etc/httpd/conf.d/ssl.conf.bak \
+mv $HTTPDCONFD_DIR/ssl.conf $HTTPDCONFD_DIR/ssl.conf.bak
+cat $HTTPDCONFD_DIR/ssl.conf.bak \
| sed "s|^SSLCertificateFile /etc/pki/tls/certs/localhost.crt$|SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt|g" \
| sed "s|^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key$|SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key|g" \
- | sed "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|" > /etc/httpd/conf.d/ssl.conf
+ | sed "s|</VirtualHost>|SSLProxyEngine on\n</VirtualHost>|" > $HTTPDCONFD_DIR/ssl.conf
CHANNEL_LABEL="rhn_proxy_config_$SYSTEM_ID"
@@ -289,9 +290,9 @@ POPULATE_CONFIG_CHANNEL=$(yes_no $POPULATE_CONFIG_CHANNEL)
if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
rhncfg-manager create-channel --server-name "$RHN_PARENT" rhn_proxy_config_$SYSTEM_ID
rhncfg-manager update --server-name "$RHN_PARENT" --channel=rhn_proxy_config_$SYSTEM_ID \
- /etc/httpd/conf.d/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
- /etc/httpd/conf.d/cobbler-proxy.conf /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/rhn_proxy.conf \
- /etc/httpd/conf.d/proxy_broker.conf /etc/httpd/conf.d/proxy_redirect.conf \
+ $HTTPDCONFD_DIR/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
+ $HTTPDCONFD_DIR/cobbler-proxy.conf /etc/httpd/conf/httpd.conf $HTTPDCONFD_DIR/rhn_proxy.conf \
+ $HTTPDCONFD_DIR/proxy_broker.conf $HTTPDCONFD_DIR/proxy_redirect.conf \
/etc/jabberd/c2s.xml /etc/jabberd/sm.xml
fi
commit 33d7ea9ef9366ca14c42c2fd7596258047f92ca6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:21:48 2009 +0100
replace /etc/rhn with RHNCONF_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 5ae3bc4..a2f5caa 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -90,6 +90,7 @@ if [ -f /usr/bin/yum ]; then
[ "$INTERACTIVE" = "0" ] && YUM_OR_UPDATE="$YUM_OR_UPDATE -y"
fi
SYSCONFIG_DIR=/etc/sysconfig/rhn
+RHNCONF_DIR=/etc/rhn
SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
@@ -192,7 +193,7 @@ if [ $MONITORING -eq 0 ]; then
default_or_input "Monitoring parent IP" MONITORING_PARENT_IP "$RESOLVED_IP"
default_or_input "Enable monitoring scout" ENABLE_SCOUT "Y/n"
ENABLE_SCOUT=$(yes_no $ENABLE_SCOUT)
- MSG=$(echo -n "Your scout shared key (can be found on parent\nin /etc/rhn/cluster.ini as key scoutsharedkey)")
+ MSG=$(echo -n "Your scout shared key (can be found on parent\nin $RHNCONF_DIR/cluster.ini as key scoutsharedkey)")
default_or_input "$MSG" SCOUT_SHARED_KEY ''
fi
@@ -214,12 +215,12 @@ cat $DIR/rhn.conf | sed "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_
| sed "s/\${session.traceback_mail}/$TRACEBACK_EMAIL/g" \
| sed "s/\${session.use_ssl:0}/$USE_SSL/g" \
| sed "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
- > /etc/rhn/rhn.conf
+ > $RHNCONF_DIR/rhn.conf
cat $DIR/cluster.ini | sed "s/\${session.enable_monitoring_scout:0}/$ENABLE_SCOUT/g" \
| sed "s/\${session.rhn_monitoring_parent_ip}/$MONITORING_PARENT_IP/g" \
| sed "s/\${session.rhn_monitoring_parent}/$MONITORING_PARENT/g" \
| sed "s/\${session.scout_shared_key}/$SCOUT_SHARED_KEY/g" \
- > /etc/rhn/cluster.ini
+ > $RHNCONF_DIR/cluster.ini
#Setup the cobbler stuff, needed to use koan through a proxy
@@ -288,7 +289,7 @@ POPULATE_CONFIG_CHANNEL=$(yes_no $POPULATE_CONFIG_CHANNEL)
if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
rhncfg-manager create-channel --server-name "$RHN_PARENT" rhn_proxy_config_$SYSTEM_ID
rhncfg-manager update --server-name "$RHN_PARENT" --channel=rhn_proxy_config_$SYSTEM_ID \
- /etc/httpd/conf.d/ssl.conf /etc/rhn/rhn.conf /etc/rhn/cluster.ini /etc/squid/squid.conf \
+ /etc/httpd/conf.d/ssl.conf $RHNCONF_DIR/rhn.conf $RHNCONF_DIR/cluster.ini /etc/squid/squid.conf \
/etc/httpd/conf.d/cobbler-proxy.conf /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/rhn_proxy.conf \
/etc/httpd/conf.d/proxy_broker.conf /etc/httpd/conf.d/proxy_redirect.conf \
/etc/jabberd/c2s.xml /etc/jabberd/sm.xml
commit 9b590abafa9891a662cdfa62d530e778d328c78a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:17:42 2009 +0100
replace /etc/sysconfig/rhn with $SYSCONFIG_DIR
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index e1070d1..5ae3bc4 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -89,15 +89,16 @@ if [ -f /usr/bin/yum ]; then
# add -y for non-interactive installation
[ "$INTERACTIVE" = "0" ] && YUM_OR_UPDATE="$YUM_OR_UPDATE -y"
fi
+SYSCONFIG_DIR=/etc/sysconfig/rhn
-SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt /etc/sysconfig/rhn/systemid | cut -d- -f2`
+SYSTEM_ID=`/usr/bin/xsltproc /usr/share/rhn/get_system_id.xslt $SYSCONFIG_DIR/systemid | cut -d- -f2`
DIR=/usr/share/doc/proxy/conf-template
HOSTNAME=`hostname`
default_or_input "Proxy version to activate" VERSION $(rpm -q --queryformat %{version} spacewalk-proxy-installer|cut -d. -f1-2)
-default_or_input "RHN Parent" RHN_PARENT $(awk -F= '/serverURL=/ {split($2, a, "/")} END { print a[3]}' /etc/sysconfig/rhn/up2date)
+default_or_input "RHN Parent" RHN_PARENT $(awk -F= '/serverURL=/ {split($2, a, "/")} END { print a[3]}' $SYSCONFIG_DIR/up2date)
if [ "$RHN_PARENT" == "rhn.redhat.com" ]; then
RHN_PARENT="xmlrpc.rhn.redhat.com"
@@ -112,7 +113,7 @@ default_or_input "Traceback email" TRACEBACK_EMAIL ''
default_or_input "Use SSL" USE_SSL 'Y/n'
USE_SSL=$(yes_no $USE_SSL)
-default_or_input "CA Chain" CA_CHAIN $(awk -F'[=;]' '/sslCACert=/ {a=$2} END { print a}' /etc/sysconfig/rhn/up2date)
+default_or_input "CA Chain" CA_CHAIN $(awk -F'[=;]' '/sslCACert=/ {a=$2} END { print a}' $SYSCONFIG_DIR/up2date)
if ! /sbin/runuser apache -s /bin/sh --command="[ -r $CA_CHAIN ]" ; then
echo Error: File $CA_CHAIN is not readable by apache user.
commit 5ee5023293c03958f00d8dc1337ad9f25d92f518
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Mar 28 00:08:25 2009 +0100
call set | grep only once
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 036f3e7..e1070d1 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -46,10 +46,12 @@ default_or_input () {
#var_a=${var_b:-word}
#which is like: var_a = $var_b ? word
DEFAULT=${CURRENT_VALUE:-$DEFAULT}
+ local VARIABLE_ISSET=$(set | grep "^$VARIABLE=")
+
echo -n "$MSG [$DEFAULT]: "
- if [ "$INTERACTIVE" = "1" -a -z "`set | grep \"^$VARIABLE=\"`" ]; then
+ if [ "$INTERACTIVE" = "1" -a -z "$VARIABLE_ISSET" ]; then
read INPUT
- elif [ -z "`set | grep \"^$VARIABLE=\"`" ]; then
+ elif [ -z "$VARIABLE_ISSET" ]; then
echo $DEFAULT
else
eval "DEFAULT=\$$VARIABLE"
15 years
java/code
by Mike McCune
java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 0ac211ebe2be23ef7b25ef71be232b06a4368813
Author: Mike McCune <mmccune(a)gmail.com>
Date: Fri Mar 27 16:19:50 2009 -0700
checkstyle
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
index 9e601c9..9c0aecc 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
@@ -24,6 +24,8 @@ import com.redhat.rhn.frontend.struts.RequestContext;
* the data to show on the page.
* <p/>
* See the Spacewalk wiki for more information on how to work with ListTag 3.0.
+ *
+ * @version $Rev$
*/
public interface Listable {
15 years
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/action/errata/test/CloneErrataActionTest.java | 6 +--
java/code/webapp/WEB-INF/struts-config.xml | 16 ----------
2 files changed, 3 insertions(+), 19 deletions(-)
New commits:
commit 71c5cc32dbad3e93a3980046766277b69eb4e1c7
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Mar 27 17:05:50 2009 -0400
fixing unit test and removing unneeded strust entry
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/test/CloneErrataActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/errata/test/CloneErrataActionTest.java
index 775ae7a..bf78a46 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/test/CloneErrataActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/test/CloneErrataActionTest.java
@@ -50,8 +50,8 @@ public class CloneErrataActionTest extends RhnMockStrutsTestCase {
request.addParameter("dispatch", "Clone Errata");
actionPerform();
- verifyForwardPath("/errata/manage/CloneErrata.do?channel=");
- verifyActionMessage("errata.applynone");
+ verifyForwardPath("/errata/manage/CloneErrata.do");
+ verifyActionMessage("emptyselectionerror");
}
public void testNonEmptySet() throws Exception {
@@ -76,6 +76,6 @@ public class CloneErrataActionTest extends RhnMockStrutsTestCase {
request.addParameter("dispatch", "Clone Errata");
actionPerform();
- verifyForward("clone");
+ verifyForward("default");
}
}
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 068e5ad..eb5f5ad 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1847,22 +1847,6 @@
<forward name="continue"
path="/errata/manage/CloneConfirm.do" redirect="true" />
</action>
-
- <action path="/errata/manage/CloneErrataSubmit"
- scope="request"
- name="cloneErrataForm"
- input="/WEB-INF/pages/errata/cloneerrata.jsp"
- parameter="dispatch"
- type="com.redhat.rhn.frontend.action.errata.CloneErrataAction"
- className="com.redhat.rhn.frontend.struts.RhnActionMapping">
- <set-property property="acls" value="user_role(channel_admin)"/>
- <forward name="default"
- path="/errata/manage/CloneErrata.do" redirect="true"/>
- <forward name="error"
- path="/WEB-INF/pages/errata/cloneerrata.jsp" />
- <forward name= "clone"
- path="/errata/manage/CloneConfirm.do" redirect="true" />
- </action>
<action path="/errata/manage/CloneConfirm"
scope="request"
15 years
java/code
by jdob
java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java | 21 +++++-----
1 file changed, 12 insertions(+), 9 deletions(-)
New commits:
commit c9d135934f1e2e4ae1c81ed6459814cfdec15017
Author: Jason Dobies <jason.dobies(a)redhat.com>
Date: Fri Mar 27 17:02:53 2009 -0500
Updated docs
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
index ac981e6..9e601c9 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/helper/Listable.java
@@ -15,21 +15,24 @@
package com.redhat.rhn.frontend.taglibs.list.helper;
-import com.redhat.rhn.frontend.struts.RequestContext;
-
import java.util.List;
+import com.redhat.rhn.frontend.struts.RequestContext;
/**
- *
- * @author paji
- * Listable
- * @version $Rev$
+ * Interface used to tie an action into ListTag 3.0 (known for a while as "new List Tag").
+ * This interface allows the List*Helper classes to interact with the action to retrieve
+ * the data to show on the page.
+ * <p/>
+ * See the Spacewalk wiki for more information on how to work with ListTag 3.0.
*/
public interface Listable {
+
/**
- * The dataresult associated to a set
- * @param context the request context
- * @return a List of Selectable or Identifiable objects
+ * Returns the data to display on the web page.
+ *
+ * @param context the request context; will not be <code>null</code>
+ * @return a List of {@link com.redhat.rhn.frontend.struts.Selectable} or
+ * {@link com.redhat.rhn.domain.Identifiable} objects.
*/
List getResult(RequestContext context);
}
15 years
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java | 7 ++++---
java/code/src/com/redhat/rhn/frontend/action/systems/test/ErrataActionTest.java | 4 +++-
2 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit ed01429526233dfaa4314d917e79c0484a11f934
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Mar 27 16:42:39 2009 -0400
couple of unit test fixes
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
index 23b344f..b41ac58 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
@@ -23,6 +23,7 @@ import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.server.test.ServerFactoryTest;
import com.redhat.rhn.frontend.action.systems.monitoring.ProbesListSetupAction;
import com.redhat.rhn.frontend.dto.monitoring.ServerProbeDto;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
import com.redhat.rhn.manager.monitoring.MonitoringManager;
import com.redhat.rhn.testing.ActionHelper;
import com.redhat.rhn.testing.RhnBaseTestCase;
@@ -55,8 +56,8 @@ public class ProbesListSetupActionTest extends RhnBaseTestCase {
ah.setupClampListBounds();
ActionForward af = ah.executeAction();
assertEquals("default", af.getName());
- assertNotNull(ah.getRequest().getAttribute("pageList"));
- DataResult dr = (DataResult) ah.getRequest().getAttribute("pageList");
+ DataResult dr = (DataResult) ah.getRequest().getAttribute(ListHelper.DATA_SET);
+ assertNotNull(dr);
assertTrue(dr.size() > 0);
assertTrue(dr.getStart() == 1);
assertTrue(dr.getEnd() > 0);
@@ -85,7 +86,7 @@ public class ProbesListSetupActionTest extends RhnBaseTestCase {
ah.setupClampListBounds();
ActionForward af = ah.executeAction();
assertEquals("default", af.getName());
- DataResult dr = (DataResult) ah.getRequest().getAttribute("pageList");
+ DataResult dr = (DataResult) ah.getRequest().getAttribute(ListHelper.DATA_SET);
assertTrue(dr.size() == 0);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/test/ErrataActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/test/ErrataActionTest.java
index d167ebc..3db6ecb 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/test/ErrataActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/test/ErrataActionTest.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.frontend.action.systems.test;
+import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.channel.test.ChannelFactoryTest;
@@ -56,7 +57,8 @@ public class ErrataActionTest extends RhnMockStrutsTestCase {
String pathInfo = "/systems/details/ErrataList";
setRequestPathInfo(pathInfo);
addSubmitted();
- addRequestParameter(RequestContext.DISPATCH, Boolean.toString(true));
+ addRequestParameter(RequestContext.DISPATCH,
+ LocalizationService.getInstance().getMessage("errata.jsp.apply"));
// Create System
Server server = ServerFactoryTest.createTestServer(user, true);
15 years
playpen/README
by Mike McCune
playpen/README | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit bbfd3c824c4760447c9f10e24eadf4113fa51651
Author: Mike McCune <mmccune(a)gmail.com>
Date: Fri Mar 27 13:17:37 2009 -0700
test commit
diff --git a/playpen/README b/playpen/README
index c177a97..1b6100b 100644
--- a/playpen/README
+++ b/playpen/README
@@ -1 +1,3 @@
directory to hold prototype projects.
+
+none of this stuff gets shipped with spacewalk RPMs.
15 years