Changes to 'refs/tags/spacewalk-proxy-installer-0.9.2-1'
by Miroslav Suchý
Tag 'spacewalk-proxy-installer-0.9.2-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-03-04 10:47 +0000
Tagging package [spacewalk-proxy-installer] version [0.9.2-1] in directory [proxy/installer/].
Changes since rhn-client-tools-0.9.4-1:
Jan Pazdziora (4):
569233 - exit with error value upon error.
569233 - Actually there is no good reason to catch SystemExit and do sys.exit immediatelly, removing.
569233 - Actually, it is good to do that. And se.code is also nice.
570176 - disable caching the channel info during export.
Jason Lawer (1):
Added catch for NullPointerException when listing default directory
Justin Sherrill (11):
initial repo generation changes, precomputing package repodata
more repo update
improving speed of initial generation by about half
adding file back
fixing speed issue with inserting the blobs into the database
finish up some repo creation work
529962 - fixing issue with nav not showing the current tab having been selected
allowing colons within config macro arguments, and making it configurable
adding constraints to rhnReleaseChannelMap
enhancing the spacewalk-remove-channel script
removing mistaken item in query upgrade
Michael Mraka (2):
568293 - don't allow duplicated rows
568293 - let's fix rhnChecksum
Miroslav Suchý (7):
495680 - send 3 more dmi keys to rhnparent
569745 - send email using address set in targetEmail
do not care about sending email, transfer the worries to perl-MailTools
564352 - remove hal from code reading DMI
sort configure-proxy.sh options alphabeticaly
570431 - add option --start-services to skip starting proxy services after configuration
Automatic commit of package [spacewalk-proxy-installer] release [0.9.2-1].
---
backend/satellite_tools/disk_dumper/dumper.py | 20 -
backend/satellite_tools/disk_dumper/rhn-satellite-exporter | 2
backend/satellite_tools/spacewalk-remove-channel | 48 +++
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 23 -
java/code/src/com/redhat/rhn/common/conf/Config.java | 4
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 14 -
java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml | 43 +++
java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml | 32 +-
java/code/src/com/redhat/rhn/common/util/CompressionUtil.java | 79 +++++
java/code/src/com/redhat/rhn/common/util/MethodUtil.java | 1
java/code/src/com/redhat/rhn/common/util/test/CompressionUtilTest.java | 32 ++
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml | 5
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 8
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 13
java/code/src/com/redhat/rhn/frontend/dto/PackageDto.java | 85 ++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java | 1
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationValidation.java | 6
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 70 +++++
java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java | 61 ++++
java/code/src/com/redhat/rhn/manager/task/TaskManager.java | 17 +
java/code/src/com/redhat/rhn/taskomatic/task/ChannelRepodata.java | 1
java/code/src/com/redhat/rhn/taskomatic/task/repomd/ChannelRepodataWorker.java | 3
java/code/src/com/redhat/rhn/taskomatic/task/repomd/FilelistsXmlWriter.java | 41 ++-
java/code/src/com/redhat/rhn/taskomatic/task/repomd/OtherXmlWriter.java | 45 ++-
java/code/src/com/redhat/rhn/taskomatic/task/repomd/PrimaryXmlWriter.java | 132 ++++++----
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdWriter.java | 37 +-
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 31 +-
java/code/src/com/redhat/rhn/taskomatic/task/repomd/SimpleContentHandler.java | 2
java/code/src/com/redhat/rhn/taskomatic/task/repomd/UnescapingXmlSerializer.java | 58 ++++
java/code/webapp/WEB-INF/nav/system_detail.xml | 6
monitoring/PerlModules/NP/Gritch/Gritch.pm | 25 -
monitoring/SputLite/html/cgi-bin/upload_results.cgi | 12
monitoring/SputLite/lib/UploadResults.pm | 12
monitoring/eventReceivers/HttpsMX.pm | 36 --
proxy/installer/answers.txt | 4
proxy/installer/configure-proxy.sh | 100 ++++---
proxy/installer/configure-proxy.sh.sgml | 102 ++++---
proxy/installer/spacewalk-proxy-installer.spec | 5
rel-eng/packages/spacewalk-proxy-installer | 2
schema/spacewalk/common/tables/rhnPackageRepoData.sql | 36 ++
schema/spacewalk/common/tables/rhnReleaseChannelMap.sql | 7
schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql | 4
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql | 31 ++
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnChecksum-unique.sql | 13
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnReleaseChannelMap.sql | 2
45 files changed, 1017 insertions(+), 294 deletions(-)
---
14 years, 2 months
proxy/installer rel-eng/packages
by Miroslav Suchý
proxy/installer/spacewalk-proxy-installer.spec | 5 ++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit c690b95ab7ed90cdbd4a189a00f551a8c4544b19
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 4 11:47:02 2010 +0100
Automatic commit of package [spacewalk-proxy-installer] release [0.9.2-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec b/proxy/installer/spacewalk-proxy-installer.spec
index 82b11c9..39349e3 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.9.1
+Version: 0.9.2
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE answers.txt
%changelog
+* Thu Mar 4 2010 Miroslav Suchý <msuchy(a)redhat.com> 0.9.2-1
+- 570431 - add option --start-services
+
* Fri Feb 19 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.1-1
- 558628 - fixed configure-proxy script
- 558628 - made /cblr rewrites work over SSL
diff --git a/rel-eng/packages/spacewalk-proxy-installer b/rel-eng/packages/spacewalk-proxy-installer
index 929ad00..300eb2b 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-0.9.1-1 proxy/installer/
+0.9.2-1 proxy/installer/
14 years, 2 months
2 commits - proxy/installer
by Miroslav Suchý
proxy/installer/answers.txt | 4 +
proxy/installer/configure-proxy.sh | 100 +++++++++++++++++--------------
proxy/installer/configure-proxy.sh.sgml | 102 ++++++++++++++++++--------------
3 files changed, 119 insertions(+), 87 deletions(-)
New commits:
commit 82f4a714ec6fbb6923787ac3916658bb0c479268
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 4 11:35:32 2010 +0100
570431 - add option --start-services to skip starting proxy services after configuration
diff --git a/proxy/installer/answers.txt b/proxy/installer/answers.txt
index 67c7803..aefc5fb 100644
--- a/proxy/installer/answers.txt
+++ b/proxy/installer/answers.txt
@@ -30,3 +30,7 @@ HTTP_PASSWORD=
# these during proxy activation.
POPULATE_CONFIG_CHANNEL=Y
+# if you do not want to start services after configuration
+# set this variable to 0 or N
+START_SERVICES=Y
+
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index f60ff9f..339865a 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -62,6 +62,9 @@ options:
Password to be used for SSL CA certificate.
--ssl-state=SSL_STATE
State to be used in SSL certificate.
+ --start-services=1
+ 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
@@ -105,6 +108,7 @@ while [ $# -ge 1 ]; do
--monitoring-parent=*) MONITORING_PARENT_IP=$(echo $1 | cut -d= -f2-);;
--monitoring-parent-ip=*) MONITORING_PARENT_IP=$(echo $1 | cut -d= -f2-);;
--populate-config-channel=*) POPULATE_CONFIG_CHANNEL=$(echo $1 | cut -d= -f2-);;
+ --start-services=*) START_SERVICES=$(echo $1 | cut -d= -f2-);;
*) echo Error: Invalid option $1
esac
shift
@@ -286,6 +290,10 @@ if [ $? -eq 0 ]; then
mv /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.rpmsave
fi
+if [ -x /usr/sbin/rhn-proxy ]; then
+ /usr/sbin/rhn-proxy stop
+fi
+
$YUM_OR_UPDATE spacewalk-proxy-management
# check if package install successfully
rpm -q spacewalk-proxy-management >/dev/null
@@ -484,5 +492,12 @@ for service in squid httpd jabberd $MonitoringScout; do
/sbin/chkconfig --add $service
/sbin/chkconfig --level 345 $service on
done
-/usr/sbin/rhn-proxy restart
+# default is 1
+START_SERVICES=$(yes_no ${START_SERVICES:-1})
+if [ "$START_SERVICES" = "1" ]; then
+ /usr/sbin/rhn-proxy restart
+else
+ echo Skipping start of services.
+ echo Use "/usr/sbin/rhn-proxy start" to manualy start proxy.
+fi
diff --git a/proxy/installer/configure-proxy.sh.sgml b/proxy/installer/configure-proxy.sh.sgml
index af69f77..b97da31 100644
--- a/proxy/installer/configure-proxy.sh.sgml
+++ b/proxy/installer/configure-proxy.sh.sgml
@@ -185,6 +185,13 @@ provide a required response, default answer is used.</para>
</listitem>
</varlistentry>
<varlistentry>
+ <term>--start-services=START</term>
+ <listitem>
+ <para>1 or Y to start all services after configuration. This is default.</para>
+ <para>0 or N to not start services after configuration.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term>--traceback-email=TRACEBACK_EMAIL</term>
<listitem>
<para>Email to which tracebacks should be sent.</para>
@@ -317,6 +324,13 @@ provide a required response, default answer is used.</para>
</listitem>
</varlistentry>
<varlistentry>
+ <term>START_SERVICES</term>
+ <listitem>
+ <para>1 or Y to start all services after configuration. This is default.</para>
+ <para>0 or N to not start services after configuration.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term>INSTALL_MONITORING</term>
<listitem>
<para>Y if monitoring should be installed. Any other value means that monitoring will not be installed.</para>
commit 8356a4e1cc695357337fbc0190e43229bbd30454
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 4 11:01:15 2010 +0100
sort configure-proxy.sh options alphabeticaly
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index b1ccf9c..f60ff9f 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -14,63 +14,62 @@ options:
Indicates the location of an answer file to be use for answering
questions asked during the installation process. See man page for
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.
+ --force-own-ca
+ Do not use parent CA and force to create your own.
-h, --help
show this help message and exit
+ --http-password=HTTP_PASSWORD
+ The password to use for an authenticated proxy.
+ --http-proxy=HTTP_PROXY
+ 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.
--non-interactive
For use only with --answer-file. If the --answer-file doesn't
provide a required response, default answer is used.
-
- --version=VERSION
- Version of Spacewalk Proxy Server you want to activate.
+ --monitoring-parent=MONITORING_PARENT
+ Name of the parent for your scout. Usually the same value as in
+ 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}.
--rhn-parent=RHN_PARENT
Your parent Spacewalk server.
- --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
- to Spacewalk Proxy Server.
- --ca-chain=CA_CHAIN
- The CA cert used to verify the ssl connection to parent.
- --force-own-ca
- Do not use parent CA and force to create your own.
- --http-proxy=HTTP_PROXY
- HTTP proxy in host:port format, e.g. squid.redhat.com:3128
- --http-username=HTTP_USERNAME
- The username for an authenticated proxy.
- --http-password=HTTP_PASSWORD
- The password to use for an authenticated proxy.
--ssl-build-dir=SSL_BUILD_DIR
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
+ Common name to be used in SSL certificate.
+ --ssl-country=SSL_COUNTRY
+ Two letters country code to be used in SSL certificate.
+ --ssl-email=SSL_EMAIL
+ Email to be used in SSL certificate.
--ssl-org=SSL_ORG
Organization name to be used in SSL certificate.
--ssl-orgunit=SSL_ORGUNIT
Organization unit name to be used in SSL certificate.
- --ssl-common=SSL_COMMON
- Common name to be used in SSL certificate.
- --ssl-city=SSL_CITY
- City 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.
- --ssl-country=SSL_COUNTRY
- Two letters country code to be used in SSL certificate.
- --ssl-email=SSL_EMAIL
- Email to be used in SSL certificate.
- --ssl-password=SSL_PASSWORD
- Password to be used for SSL CA certificate.
- --install-monitoring=Y
- Y if monitoring should be installed. Any other value means that
- monitoring will not be installed.
- --enable-scout=1
- 1 to enable monitoring scout, 0 otherwise.
- --monitoring-parent=MONITORING_PARENT
- Name of the parent for your scout. Usually the same value as in
- 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}.
+ --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
+ to Spacewalk Proxy Server.
+ --version=VERSION
+ Version of Spacewalk Proxy Server you want to activate.
HELP
exit
}
diff --git a/proxy/installer/configure-proxy.sh.sgml b/proxy/installer/configure-proxy.sh.sgml
index 26b7b56..af69f77 100644
--- a/proxy/installer/configure-proxy.sh.sgml
+++ b/proxy/installer/configure-proxy.sh.sgml
@@ -64,40 +64,28 @@ provide a required response, default answer is used.</para>
<para>Following options can be set using answer file as well. See section ANSWER FILE.
</para>
<variablelist>
- <varlistentry>
- <term>--version=VERSION</term>
- <listitem>
- <para>Version of Spacewalk Proxy Server you want to activate.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>--rhn-parent=RHN_PARENT</term>
- <listitem>
- <para>Your parent Spacewalk server.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>--traceback-email=TRACEBACK_EMAIL</term>
+ <varlistentry>
+ <term>--ca-chain=CA_CHAIN</term>
<listitem>
- <para>Email to which tracebacks should be sent.</para>
+ <para>The CA cert used to verify the ssl connection to parent.</para>
</listitem>
- </varlistentry>
- <varlistentry>
- <term>--use-ssl=USE_SSL</term>
+ </varlistentry>
+ <varlistentry>
+ <term>--enable-scout=1</term>
<listitem>
- <para>1 if Spacewalk Proxy Server should communicate with parent over SSL. 0 otherwise. Even if disabled, client can still use SSL to connect to Spacewalk Proxy Server.</para>
+ <para>1 to enable monitoring scout, 0 otherwise.</para>
</listitem>
- </varlistentry>
+ </varlistentry>
<varlistentry>
- <term>--ca-chain=CA_CHAIN</term>
+ <term>--force-own-ca</term>
<listitem>
- <para>The CA cert used to verify the ssl connection to parent.</para>
+ <para>Do not use parent CA and force to create your own.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--force-own-ca</term>
+ <term>--http-password=HTTP_PASSWORD</term>
<listitem>
- <para>Do not use parent CA and force to create your own.</para>
+ <para>The password to use for an authenticated proxy.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -113,33 +101,39 @@ provide a required response, default answer is used.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--http-password=HTTP_PASSWORD</term>
+ <term>--install-monitoring=Y</term>
<listitem>
- <para>The password to use for an authenticated proxy.</para>
+ <para>Y if monitoring should be installed. Any other value means that monitoring will not be installed.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-build-dir=SSL_BUILD_DIR</term>
+ <term>--monitoring-parent=MONITORING_PARENT</term>
<listitem>
- <para>The directory where we build SSL certificate. Default is /root/ssl-build.</para>
+ <para>Name of the parent for your scout. Usually the same value as in RHN_PARENT.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-org=SSL_ORG</term>
+ <term>--monitoring-parent-ip=MONITORING_PARENT_IP</term>
<listitem>
- <para>Organization name to be used in SSL certificate.</para>
+ <para>IP address of MONITORING_PARENT</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-orgunit=SSL_ORGUNIT</term>
+ <term>--populate-config-channel=Y</term>
<listitem>
- <para>Organization unit name to be used in SSL certificate.</para>
+ <para>Y if config chanel should be created and configuration files in that channel updated. Configuration channel will be named rhn_proxy_config_${SYSTEM_ID}</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-common=SSL_COMMON</term>
+ <term>--rhn-parent=RHN_PARENT</term>
<listitem>
- <para>Common name to be used in SSL certificate.</para>
+ <para>Your parent Spacewalk server.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>--ssl-build-dir=SSL_BUILD_DIR</term>
+ <listitem>
+ <para>The directory where we build SSL certificate. Default is /root/ssl-build.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -149,9 +143,9 @@ provide a required response, default answer is used.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-state=SSL_STATE</term>
+ <term>--ssl-common=SSL_COMMON</term>
<listitem>
- <para>State to be used in SSL certificate.</para>
+ <para>Common name to be used in SSL certificate.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -167,39 +161,45 @@ provide a required response, default answer is used.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--ssl-password=SSL_PASSWORD</term>
+ <term>--ssl-org=SSL_ORG</term>
<listitem>
- <para>Password to be used for SSL CA certificate.</para>
+ <para>Organization name to be used in SSL certificate.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--install-monitoring=Y</term>
+ <term>--ssl-orgunit=SSL_ORGUNIT</term>
<listitem>
- <para>Y if monitoring should be installed. Any other value means that monitoring will not be installed.</para>
+ <para>Organization unit name to be used in SSL certificate.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--enable-scout=1</term>
+ <term>--ssl-password=SSL_PASSWORD</term>
<listitem>
- <para>1 to enable monitoring scout, 0 otherwise.</para>
+ <para>Password to be used for SSL CA certificate.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--monitoring-parent=MONITORING_PARENT</term>
+ <term>--ssl-state=SSL_STATE</term>
<listitem>
- <para>Name of the parent for your scout. Usually the same value as in RHN_PARENT.</para>
+ <para>State to be used in SSL certificate.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--monitoring-parent-ip=MONITORING_PARENT_IP</term>
+ <term>--traceback-email=TRACEBACK_EMAIL</term>
<listitem>
- <para>IP address of MONITORING_PARENT</para>
+ <para>Email to which tracebacks should be sent.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--populate-config-channel=Y</term>
+ <term>--use-ssl=USE_SSL</term>
<listitem>
- <para>Y if config chanel should be created and configuration files in that channel updated. Configuration channel will be named rhn_proxy_config_${SYSTEM_ID}</para>
+ <para>1 if Spacewalk Proxy Server should communicate with parent over SSL. 0 otherwise. Even if disabled, client can still use SSL to connect to Spacewalk Proxy Server.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>--version=VERSION</term>
+ <listitem>
+ <para>Version of Spacewalk Proxy Server you want to activate.</para>
</listitem>
</varlistentry>
</variablelist>
14 years, 2 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/conf/Config.java | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 3ce471ae218e26102e3b8b1dc76fb31202678641
Author: Jason Lawer <jlawer(a)redhat.com>
Date: Thu Mar 4 10:10:43 2010 +1000
Added catch for NullPointerException when listing default directory
diff --git a/java/code/src/com/redhat/rhn/common/conf/Config.java b/java/code/src/com/redhat/rhn/common/conf/Config.java
index eb5ee9a..89b3b65 100644
--- a/java/code/src/com/redhat/rhn/common/conf/Config.java
+++ b/java/code/src/com/redhat/rhn/common/conf/Config.java
@@ -400,6 +400,10 @@ public class Config {
if (f.isDirectory()) {
// bugzilla: 154517; only add items that end in .conf
File[] files = f.listFiles();
+ if (files == null) {
+ logger.error("Unable to list files in path : " + path);
+ return;
+ }
for (int i = 0; i < files.length; i++) {
if (files[i].getName().endsWith((".conf"))) {
fileList.add(files[i]);
14 years, 2 months
backend/satellite_tools
by Jan Pazdziora
backend/satellite_tools/disk_dumper/dumper.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit 816f19af7a5a2e6aca774a0cf96a7ff09a870221
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 3 15:38:34 2010 +0100
570176 - disable caching the channel info during export.
We shall no longer egnerate nor use channel cache files like
/var/cache/rhn/xml-channels/rhn-channel-101.xml as their content
is unreliable when --start-date / --end-date is used.
diff --git a/backend/satellite_tools/disk_dumper/dumper.py b/backend/satellite_tools/disk_dumper/dumper.py
index 8377577..80573bd 100644
--- a/backend/satellite_tools/disk_dumper/dumper.py
+++ b/backend/satellite_tools/disk_dumper/dumper.py
@@ -1038,7 +1038,7 @@ class CachedDumper(exportLib.BaseDumper):
self.cache_set(params, s.getvalue())
-class ChannelsDumper(CachedDumper, exportLib.ChannelsDumper):
+class ChannelsDumper(exportLib.ChannelsDumper):
_query_list_channels = rhnSQL.Statement("""
select c.id, c.org_id,
c.label, ca.label channel_arch, c.basedir, c.name,
@@ -1054,20 +1054,22 @@ class ChannelsDumper(CachedDumper, exportLib.ChannelsDumper):
and c.checksum_type_id = ct.id (+)
""")
def __init__(self, writer, channels):
- h = rhnSQL.prepare(self._query_list_channels)
- CachedDumper.__init__(self, writer, statement=h, params=channels)
- self._writer = writer
+ exportLib.ChannelsDumper.__init__(self, writer, channels)
- def _get_key(self, params):
- channel_id = params['channel_id']
- return "xml-channels/rhn-channel-%d.xml" % channel_id
-
- def _dump_subelement(self, data):
+ def dump_subelement(self, data):
log_debug(6, data)
#return exportLib.ChannelsDumper.dump_subelement(self, data)
c = _ChannelsDumper(self._writer, data)
c.dump()
+ def set_iterator(self):
+ if not self._channels:
+ # Nothing to do
+ return
+
+ h = rhnSQL.prepare(self._query_list_channels)
+ return QueryIterator(statement=h, params=self._channels)
+
class _ChannelsDumper(exportLib._ChannelDumper):
tag_name = 'rhn-channel'
14 years, 2 months
Changes to 'refs/tags/spacewalk-schema-0.8.15-1'
by Michael Mraka
Tag 'spacewalk-schema-0.8.15-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-03 09:34 +0000
Tagging package [spacewalk-schema] version [0.8.15-1] in directory [schema/spacewalk/].
Changes since spacewalk-backend-0.8.47-1:
Michael Mraka (3):
don't allow duplicated rows
568293 - don't allow duplicated rows
Automatic commit of package [spacewalk-schema] release [0.8.15-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnChecksum.sql | 4 +++-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql | 4 +++-
4 files changed, 11 insertions(+), 4 deletions(-)
---
14 years, 2 months
2 commits - schema/spacewalk
by Michael Mraka
schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql | 4 ++-
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnChecksum-unique.sql | 13 ++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit e6aba2e66d3e645936800b233f7802b2c6b29e88
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 2 14:07:47 2010 +0100
568293 - let's fix rhnChecksum
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnChecksum-unique.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnChecksum-unique.sql
new file mode 100644
index 0000000..c79f623
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnChecksum-unique.sql
@@ -0,0 +1,13 @@
+declare
+ index_not_exists exception;
+ pragma exception_init(index_not_exists, -01418);
+begin
+ execute immediate 'drop index rhnChecksum_chsum_idx';
+ execute immediate 'alter table rhnChecksum add constraint rhnChecksum_chsum_uq
+ unique (checksum, checksum_type_id)
+ using index tablespace [[32m_tbs]]';
+exception
+ when index_not_exists then
+ null; -- index was already dropped
+end;
+/
commit 277a81c34c0089d25dde14a87ae065c99d71032d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 2 13:29:31 2010 +0100
568293 - don't allow duplicated rows
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
index 7eb526b..1fac8df 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
@@ -28,6 +28,8 @@ rhnChecksum
enable row movement
;
-CREATE INDEX rhnChecksum_chsum_idx on rhnChecksum(checksum);
+alter table rhnChecksum add constraint rhnChecksum_chsum_uq
+ unique (checksum, checksum_type_id)
+ using index tablespace [[32m_tbs]];
CREATE SEQUENCE rhnChecksum_seq;
14 years, 2 months
Branch 'SPACEWALK-0.8' - 3 commits - rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnChecksum.sql | 4 +++-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql | 4 +++-
4 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 4b1b5eecbe08a7ad4a74949acfc4536ba7e08f94
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Mar 3 10:34:01 2010 +0100
Automatic commit of package [spacewalk-schema] release [0.8.15-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 6fd8d6d..ae89b21 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-0.8.14-1 schema/spacewalk/
+0.8.15-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 038c312..cedeec8 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 0.8.14
+Version: 0.8.15
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -58,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-schema-upgrade*
%changelog
+* Wed Mar 03 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.15-1
+- 568293 - don't allow duplicated rows
+
* Fri Feb 19 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.14-1
- more fixes of 0.7 -> 0.8 upgrade errors
commit 84c3e563ee3c0f56765edfc45528ab85ead63b7a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 2 13:29:31 2010 +0100
568293 - don't allow duplicated rows
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
index 7eb526b..1fac8df 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.7-to-spacewalk-schema-0.8/005-rhnChecksum-table.sql
@@ -28,6 +28,8 @@ rhnChecksum
enable row movement
;
-CREATE INDEX rhnChecksum_chsum_idx on rhnChecksum(checksum);
+alter table rhnChecksum add constraint rhnChecksum_chsum_uq
+ unique (checksum, checksum_type_id)
+ using index tablespace [[32m_tbs]];
CREATE SEQUENCE rhnChecksum_seq;
commit c9d3fd4cc43fdd708080bcd76a99b8ce619b5a50
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Feb 25 12:52:08 2010 +0100
don't allow duplicated rows
diff --git a/schema/spacewalk/common/tables/rhnChecksum.sql b/schema/spacewalk/common/tables/rhnChecksum.sql
index 7eb526b..1fac8df 100644
--- a/schema/spacewalk/common/tables/rhnChecksum.sql
+++ b/schema/spacewalk/common/tables/rhnChecksum.sql
@@ -28,6 +28,8 @@ rhnChecksum
enable row movement
;
-CREATE INDEX rhnChecksum_chsum_idx on rhnChecksum(checksum);
+alter table rhnChecksum add constraint rhnChecksum_chsum_uq
+ unique (checksum, checksum_type_id)
+ using index tablespace [[32m_tbs]];
CREATE SEQUENCE rhnChecksum_seq;
14 years, 2 months
schema/spacewalk
by Justin Sherrill
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql | 5 -----
1 file changed, 5 deletions(-)
New commits:
commit c820d345495c9beb87836bbdb0eebccb77b97ea7
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 2 16:22:26 2010 -0500
removing mistaken item in query upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql
index a2a6ca5..fcdff36 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/002-rhnPackageRepoData.sql
@@ -29,8 +29,3 @@ CREATE TABLE rhnPackageRepodata
DEFAULT (sysdate) NOT NULL
)
;
-
-CREATE UNIQUE INDEX rhn_pkey_rd_pk_uq
- ON rhnPackageKeyAssociation (package_id, key_id)
- TABLESPACE [[64k_tbs]];
-
14 years, 2 months
2 commits - backend/satellite_tools schema/spacewalk
by Justin Sherrill
backend/satellite_tools/spacewalk-remove-channel | 48 ++++++++--
schema/spacewalk/common/tables/rhnReleaseChannelMap.sql | 7 +
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnReleaseChannelMap.sql | 2
3 files changed, 50 insertions(+), 7 deletions(-)
New commits:
commit b59374531ee9a977b9e50395196e1f6047ffa92c
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 2 14:02:08 2010 -0500
enhancing the spacewalk-remove-channel script
- adding locking to conflict with itself and satellite-sync
- improved verbage of unsubscribing process to show the number of systems per channel instead of a global number
- fixed bug where rhnReleaseChannelMap entries would not be deleted
- fixed a typo or two
diff --git a/backend/satellite_tools/spacewalk-remove-channel b/backend/satellite_tools/spacewalk-remove-channel
index 5cbf367..050c9a4 100755
--- a/backend/satellite_tools/spacewalk-remove-channel
+++ b/backend/satellite_tools/spacewalk-remove-channel
@@ -29,6 +29,7 @@ _LIBPATH = "/usr/share/rhn"
if _LIBPATH not in sys.path:
sys.path.append(_LIBPATH)
+from rhn import rhnLockfile
from satellite_tools.progress_bar import ProgressBar
from common import CFG, initCFG, initLOG, log_debug, log_error
from server import rhnSQL
@@ -41,7 +42,7 @@ options_table = [
Option("-c", "--channel", action="append",
help="Delete this channel (can be present multiple times)"),
Option("-u", "--unsubscribe", action="store_true",
- help="Unsubscribe systems registered to the specificed channels"),
+ help="Unsubscribe systems registered to the specified channels"),
Option( "--justdb", action="store_true",
help="Delete only from the database, do not remove files from disk"),
Option( "--force", action="store_true",
@@ -50,13 +51,21 @@ options_table = [
help="Do not remove package metadata or packages from the filesystem (Not Recommended)"),
]
+LOCK = None
def main():
+ global LOCK
if os.getuid() != 0:
sys.stderr.write('ERROR: must be root to execute\n')
sys.exit(8)
+ try:
+ LOCK = rhnLockfile.Lockfile('/var/run/satellite-sync.pid')
+ except rhnLockfile.LockfileLockedException:
+ systemExit(1, "ERROR: either another instance of spacewalk-remove-channel is running, or a satellite-sync is currently taking place.")
+
+
global options_table
parser = OptionParser(option_list=options_table)
@@ -121,6 +130,7 @@ def main():
rhnSQL.rollback()
raise
rhnSQL.commit()
+ releaseLOCK()
return 0
def __serverCheck(labels, unsubscribe):
@@ -143,7 +153,9 @@ def __serverCheck(labels, unsubscribe):
if unsubscribe:
return __unsubscribeServers(labels)
- print("The following systems are subscribed to one or more of the specified channels:\n")
+ print("\nCurrently there are systems subscribed to one or more of the specified channels.")
+ print("If you would like to automatically unsubscribe these systems, simply use the --unusbscribe flag.\n")
+ print("The following systems were found to be subscribed:")
print 'org_id'.ljust(8),
print 'id'.ljust(14),
@@ -159,9 +171,9 @@ def __serverCheck(labels, unsubscribe):
def __unsubscribeServers(labels):
sql = """
- select distinct sc.server_id as server_id, C.id as channel_id, c.parent_channel
+ select distinct sc.server_id as server_id, C.id as channel_id, c.parent_channel, c.label
from rhnChannel c inner join
- rhnServerChannel sc on c.id = sc.channel_id
+ rhnServerChannel sc on c.id = sc.channel_id
where c.label in (%s) order by C.parent_channel
"""
params, bind_params = _bind_many(labels)
@@ -169,9 +181,21 @@ def __unsubscribeServers(labels):
h = rhnSQL.prepare(sql % (bind_params))
apply(h.execute, (), params)
list = h.fetchall_dict()
+
+ channel_counts = {}
+ for i in list:
+ if channel_counts.has_key(i['label']):
+ channel_counts[i['label']] = channel_counts[i['label']] + 1
+ else:
+ channel_counts[i['label']] = 1
+ print("\nThe following channels will have their systems unsubscibed:")
+ channel_list = channel_counts.keys()
+ channel_list.sort()
+ for i in channel_list:
+ print(i.ljust(40)),
+ print(str(channel_counts[i]).ljust(8))
- print("Unsubscribing systems (" + str(len(list)) + "):")
- pb = ProgressBar(prompt='Unsubscribing: ', endTag=' - complete\n',
+ pb = ProgressBar(prompt='Unsubscribing: ', endTag=' - complete',
finalSize=len(list), finalBarLength=40, stream=sys.stdout)
pb.printAll(1)
@@ -313,6 +337,7 @@ def delete_channels(channelLabels, force=0, justdb=0, skip_packages=0):
['rhnRegTokenChannels', 'channel_id'],
['rhnServerProfile', 'base_channel'],
['rhnKickstartableTree', 'channel_id'],
+ ['rhnReleaseChannelMap', 'channel_id'],
['rhnChannel', 'id'],
]
@@ -490,16 +515,27 @@ def _get_package_paths(package_ids, sources=0):
return pdict.keys()
+
+
+def releaseLOCK():
+ global LOCK
+ if LOCK:
+ LOCK.release()
+
+
+
if __name__ == '__main__':
try:
sys.exit(main() or 0)
except KeyboardInterrupt:
sys.stderr.write("\nUser interrupted process.\n")
+ releaseLOCK()
sys.exit(0)
except SystemExit:
# Normal exit
raise
except Exception, e:
+ releaseLOCK()
sys.stderr.write("\nERROR: unhandled exception occurred: (%s).\n" % e)
import traceback
traceback.print_exc()
commit 6d8f95c0ed1aca8ea0e2c9f932f544f2c8b3a017
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 2 12:53:56 2010 -0500
adding constraints to rhnReleaseChannelMap
diff --git a/schema/spacewalk/common/tables/rhnReleaseChannelMap.sql b/schema/spacewalk/common/tables/rhnReleaseChannelMap.sql
index dc571b8..108e86f 100644
--- a/schema/spacewalk/common/tables/rhnReleaseChannelMap.sql
+++ b/schema/spacewalk/common/tables/rhnReleaseChannelMap.sql
@@ -19,8 +19,13 @@ CREATE TABLE rhnReleaseChannelMap
product VARCHAR2(64) NOT NULL,
version VARCHAR2(64) NOT NULL,
release VARCHAR2(64) NOT NULL,
- channel_arch_id NUMBER NOT NULL,
+ channel_arch_id NUMBER NOT NULL
+ CONSTRAINT rhn_rcm_caid_fk
+ REFERENCES rhnChannelArch (id),
channel_id NUMBER NOT NULL
+ CONSTRAINT rhn_rcm_cid_fk
+ REFERENCES rhnChannel (id)
+ ON DELETE CASCADE
)
ENABLE ROW MOVEMENT
;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnReleaseChannelMap.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnReleaseChannelMap.sql
new file mode 100644
index 0000000..f871e71
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/003-rhnReleaseChannelMap.sql
@@ -0,0 +1,2 @@
+alter table rhnReleaseChannelMap add CONSTRAINT rhn_rcm_cid_fk FOREIGN KEY (channel_id) REFERENCES rhnChannel (id);
+alter table rhnReleaseChannelMap add CONSTRAINT rhn_rcm_caid_fk FOREIGN KEY (channel_arch_id) REFERENCES rhnChannelArch (id);
14 years, 2 months