backend/Makefile.defs
| 14
backend/common/rhn_rpm.py
| 2
backend/satellite_tools/Makefile
| 11
backend/satellite_tools/reports.py
| 108 +++++
backend/satellite_tools/reports/data/inventory
| 114 +++++
backend/satellite_tools/satsync.py
| 31 -
backend/satellite_tools/spacewalk-report
| 168 +++++++
backend/satellite_tools/spacewalk-report.sgml
| 119 +++++
backend/satellite_tools/sync_handlers.py
| 9
backend/server/importlib/backend.py
| 5
backend/spacewalk-backend.spec
| 55 ++
branding/spacewalk-branding.spec
| 6
client/rhel/rhnsd/rhnsd.spec
| 5
client/tools/osad/osad.spec
| 17
client/tools/spacewalk-koan/spacewalk-koan.spec
| 6
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
| 13
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
| 5
java/code/src/com/redhat/rhn/domain/channel/Channel.java
| 39 +
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
| 58 +-
java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
| 16
java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
| 32 +
java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
| 105 ++++
java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
| 42 +
java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
| 3
java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml
| 9
java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
| 21
java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java
| 15
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
| 46 +-
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
| 10
java/code/src/com/redhat/rhn/frontend/dto/kickstart/KickstartDto.java
| 23 -
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
| 15
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
| 3
java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java
| 75 +++
java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
| 16
java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
| 11
java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
| 41 -
java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java
| 38 +
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
| 8
java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
| 15
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
| 14
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileSyncCommand.java
| 4
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
| 43 +-
java/code/src/com/redhat/rhn/manager/satellite/UpgradeCommand.java
| 105 ++++
java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
| 59 ++
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
| 8
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
| 28 -
java/code/src/com/redhat/rhn/webapp/RhnServletListener.java
| 12
java/code/src/org/cobbler/SystemRecord.java
| 9
java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
| 13
java/code/webapp/WEB-INF/pages/kickstart/kickstarts.jsp
| 16
java/code/webapp/WEB-INF/struts-config.xml
| 1
java/spacewalk-java.spec
| 43 +-
monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
| 4
monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
| 9
monitoring/SatConfig/bootstrap/npBootstrap.pl
| 3
monitoring/SatConfig/cluster/PhysCluster.pm
| 2
monitoring/SatConfig/general/NOCpulse-ini
| 215 ++++++++++
monitoring/SatConfig/general/SatConfig-general.spec
| 9
monitoring/nocpulse-common/nocpulse-common.spec
| 4
monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
| 29 +
monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
| 24 -
proxy/installer/cluster.ini
| 1
proxy/proxy/spacewalk-proxy.spec
| 6
rel-eng/lib/spacewalk/releng/builder.py
| 4
rel-eng/packages/SatConfig-general
| 2
rel-eng/packages/osad
| 2
rel-eng/packages/perl-NOCpulse-OracleDB
| 2
rel-eng/packages/perl-NOCpulse-Probe
| 2
rel-eng/packages/rhnsd
| 2
rel-eng/packages/spacewalk
| 2
rel-eng/packages/spacewalk-backend
| 2
rel-eng/packages/spacewalk-branding
| 2
rel-eng/packages/spacewalk-config
| 2
rel-eng/packages/spacewalk-java
| 2
rel-eng/packages/spacewalk-koan
| 2
rel-eng/packages/spacewalk-monitoring
| 2
rel-eng/packages/spacewalk-proxy
| 2
rel-eng/packages/spacewalk-schema
| 2
rel-eng/packages/spacewalk-selinux
| 2
rel-eng/packages/spacewalk-setup
| 2
rel-eng/packages/spacewalk-web
| 2
satellite/install/install.pl
| 5
schema/spacewalk/blend
| 43 --
schema/spacewalk/common/data/rhnChecksumType.sql
| 37 +
schema/spacewalk/common/tables/rhnChannel.sql
| 2
schema/spacewalk/common/tables/rhnChecksumType.sql
| 39 +
schema/spacewalk/common/tables/tables.deps
| 3
schema/spacewalk/oracle/end.sql
| 20
schema/spacewalk/oracle/start.sql
| 18
schema/spacewalk/oracle/triggers/rhnChecksumType.sql
| 31 +
schema/spacewalk/spacewalk-schema.spec
| 5
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
| 44 ++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
| 37 +
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
| 7
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-upgrade_kickstart_profiles.sql
| 20
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/999-pgport.sql
| 15
selinux/spacewalk-selinux/spacewalk-selinux.spec
| 6
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml
| 2
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml
| 4
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini
| 1
spacewalk/config/spacewalk-config.spec
| 6
spacewalk/package/spacewalk.spec
| 11
spacewalk/setup/bin/spacewalk-setup
| 9
spacewalk/setup/spacewalk-setup.spec
| 7
web/html/applications/rhn-proxy/4.0/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/4.0/httpd/httpd.conf
| 5
web/html/applications/rhn-proxy/4.0/httpd/rhn_proxy.conf
| 3
web/html/applications/rhn-proxy/4.0/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/4.1/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/4.1/httpd/httpd.conf
| 5
web/html/applications/rhn-proxy/4.1/httpd/rhn_proxy.conf
| 3
web/html/applications/rhn-proxy/4.1/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/4.2/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/4.2/httpd/httpd.conf
| 5
web/html/applications/rhn-proxy/4.2/httpd/rhn_proxy.conf
| 4
web/html/applications/rhn-proxy/4.2/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/5.0/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/5.0/httpd/httpd.conf
| 5
web/html/applications/rhn-proxy/5.0/httpd/rhn_proxy.conf
| 3
web/html/applications/rhn-proxy/5.0/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/5.1/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/5.1/httpd/rhn_proxy.conf
| 2
web/html/applications/rhn-proxy/5.1/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/5.2/httpd/cobbler-proxy.conf
| 9
web/html/applications/rhn-proxy/5.2/httpd/rhn_proxy.conf
| 2
web/html/applications/rhn-proxy/5.2/install-rhn-proxy.xml
| 6
web/html/applications/rhn-proxy/5.3/cluster.ini
| 1
web/spacewalk-web.spec
| 5
128 files changed, 2234 insertions(+), 299 deletions(-)
New commits:
commit e9f7add24397969f3fe2057f69b953e02e6e2c87
Author: Jeff Ortel <jortel(a)redhat.com>
Date: Fri Jul 24 16:19:57 2009 -0500
Fix syntax error; add rhnChecksumType to pgsql upgrade script; formalize start/end
scripts; add clean.sql processing to blend.
diff --git a/schema/spacewalk/blend b/schema/spacewalk/blend
index d7f2009..33a4e54 100755
--- a/schema/spacewalk/blend
+++ b/schema/spacewalk/blend
@@ -67,11 +67,20 @@ Lines may be joined by (\).
SPECIAL FILES
-start.sql - If found in the root current directory, the contents of this file is
- inserted at the beginning of the output.
-
-end.sql - If found in the root current directory, the contents of this file is
- appended to the end of the output.
+clean.sql - If found in the current directory, the contents of this file is
+ inserted at the beginning of the output. This file is expected
+ to contain commands to clean (clear) the database before schema
+ installation.
+
+start.sql - If found in the current directory, the contents of this file is
+ inserted at the beginning of the output (after clean.sql). This
+ file is expected to contain commands used to condition the database
+ or database session to schema installation.
+
+end.sql - If found in the current directory, the contents of this file is
+ appended to the end of the output. This file contains commands
+ to commit or post process the installed schema such as commit inserted
+ data or to exit an application used for the installation.
"""
import sys, os, re
@@ -351,12 +360,16 @@ class Writer:
self.aggregated = aggregated
def write(self, sorted, output):
- self.start(output)
+ self.copy('clean.sql', output, True)
+ self.copy('start.sql', output, True)
for p in sorted:
self.copy(p, output)
- self.end(output)
+ self.copy('end.sql', output, True)
- def copy(self, path, output):
+ def copy(self, path, output, optional=False):
+ if optional:
+ if not os.path.exists(path):
+ return
f = open(path)
output.write(self.comment % path)
for line in f.readlines():
@@ -370,20 +383,6 @@ class Writer:
continue
output.write(line)
f.close()
-
- def start(self, output):
- if os.path.exists('start.sql'):
- f = open('start.sql')
- content = f.read()
- output.write(content)
- f.close()
-
- def end(self, output):
- if os.path.exists('end.sql'):
- f = open('end.sql')
- content = f.read()
- output.write(content)
- f.close()
class Oracle(Writer):
diff --git a/schema/spacewalk/common/tables/rhnChecksumType.sql
b/schema/spacewalk/common/tables/rhnChecksumType.sql
index 2afa492..da9908b 100644
--- a/schema/spacewalk/common/tables/rhnChecksumType.sql
+++ b/schema/spacewalk/common/tables/rhnChecksumType.sql
@@ -15,16 +15,15 @@
CREATE TABLE rhnChecksumType
(
- id NUMBER PRIMARY KEY
- USING INDEX TABLESPACE [[64k_tbs]],
- label VARCHAR2(32) NOT NULL
- CONSTRAINT rhn_checksumtype_label_uq UNIQUE
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_checksumtype_id_pk PRIMARY KEY
USING INDEX TABLESPACE [[64k_tbs]],
+ label VARCHAR2(32) NOT NULL,
description VARCHAR2(64) NOT NULL,
- created DATE
- DEFAULT (sysdate) NOT NULL,
- modified DATE
- DEFAULT (sysdate) NOT NULL,
+ created DATE NOT NULL
+ DEFAULT (sysdate),
+ modified DATE NOT NULL
+ DEFAULT (sysdate)
)
ENABLE ROW MOVEMENT
;
@@ -33,5 +32,8 @@ CREATE INDEX rhn_checksumtype_label_id_idx
ON rhnChecksumType( label, id )
TABLESPACE [[64k_tbs]];
+ALTER TABLE rhnChecksumType
+ ADD CONSTRAINT rhn_checksumtype_label_uq UNIQUE (label);
+
CREATE SEQUENCE rhn_checksum_id_seq;
diff --git a/schema/spacewalk/oracle/end.sql b/schema/spacewalk/oracle/end.sql
index 3a0912d..4a4f93e 100644
--- a/schema/spacewalk/oracle/end.sql
+++ b/schema/spacewalk/oracle/end.sql
@@ -1,2 +1,18 @@
-commit;
-exit
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+COMMIT;
+EXIT
+
diff --git a/schema/spacewalk/oracle/start.sql b/schema/spacewalk/oracle/start.sql
new file mode 100644
index 0000000..a1e60f7
--- /dev/null
+++ b/schema/spacewalk/oracle/start.sql
@@ -0,0 +1,18 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+SET ECHO ON
+WHENEVER SQLERROR EXIT
+
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/999-pgport.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/999-pgport.sql
index 4e0bb3c..5e23fa9 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/999-pgport.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/999-pgport.sql
@@ -9981,3 +9981,18 @@ ALTER TABLE WEB_USER_SITE_TYPE MODIFY DESCRIPTION NOT NULL;
--
ALTER TABLE WEB_USER_SITE_TYPE DROP CONSTRAINT WUST_TYPE_NN;
ALTER TABLE WEB_USER_SITE_TYPE MODIFY TYPE NOT NULL;
+
+--
+-- RHNCHECKSUMTYPE
+--
+ALTER TABLE RHNCHECKSUMTYPE DROP CONSTRAINT RHN_CHECKSUMTYPE_ID_NN;
+ALTER TABLE RHNCHECKSUMTYPE MODIFY ID NOT NULL;
+ALTER TABLE RHNCHECKSUMTYPE DROP CONSTRAINT RHN_CHECKSUMTYPE_LABEL_NN;
+ALTER TABLE RHNCHECKSUMTYPE MODIFY LABEL NOT NULL;
+ALTER TABLE RHNCHECKSUMTYPE DROP CONSTRAINT RHN_CHECKSUMTYPE_DESC_NN;
+ALTER TABLE RHNCHECKSUMTYPE MODIFY DESCRIPTION NOT NULL;
+ALTER TABLE RHNCHECKSUMTYPE DROP CONSTRAINT RHN_CHECKSUMTYPE_CREAT_NN;
+ALTER TABLE RHNCHECKSUMTYPE MODIFY CREATED NOT NULL;
+ALTER TABLE RHNCHECKSUMTYPE DROP CONSTRAINT RHN_CHECKSUMTYPE_MOD_NN;
+ALTER TABLE RHNCHECKSUMTYPE MODIFY MODIFIED NOT NULL;
+
commit 4340595fade498e7acf1ef2a32c7e1e11d38aab4
Merge: f0e6f23... 4dd6305...
Author: Jeff Ortel <jortel(a)redhat.com>
Date: Fri Jul 24 12:56:03 2009 -0500
Merge branch 'master' into pgsql
Conflicts:
schema/spacewalk/rhnsat/tables/rhnChannel.sql
spacewalk/setup/bin/spacewalk-setup
diff --cc schema/spacewalk/common/data/rhnChecksumType.sql
index 0000000,0000000..a788487
new file mode 100644
--- /dev/null
+++ b/schema/spacewalk/common/data/rhnChecksumType.sql
@@@ -1,0 -1,0 +1,37 @@@
++--
++-- Copyright (c) 2008 Red Hat, Inc.
++--
++-- This software is licensed to you under the GNU General Public License,
++-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
++-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
++-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
++-- along with this software; if not, see
++--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
++--
++-- Red Hat trademarks are not licensed under GPLv2. No permission is
++-- granted to use or replicate Red Hat trademarks that are incorporated
++-- in this software or its documentation.
++--
++--
++--
++--
++
++
++insert into rhnChecksumType (id, label, description) values
++ (rhn_checksum_id_seq.nextval, 'md5', 'md5' );
++insert into rhnChecksumType (id, label, description) values
++ (rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
++insert into rhnChecksumType (id, label, description) values
++ (rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
++insert into rhnChecksumType (id, label, description) values
++ (rhn_checksum_id_seq.nextval, 'sha-384', 'sha384' );
++insert into rhnChecksumType (id, label, description) values
++ (rhn_checksum_id_seq.nextval, 'sha-512', 'sha512' );
++
++commit;
++
++--
++--
++-- Revision 1.1 2009/06/26 11:00:17 pkilambi
++--
++
diff --cc schema/spacewalk/common/tables/rhnChannel.sql
index de3dd04,0000000..ab83082
mode 100644,000000..100644
--- a/schema/spacewalk/common/tables/rhnChannel.sql
+++ b/schema/spacewalk/common/tables/rhnChannel.sql
@@@ -1,95 -1,0 +1,97 @@@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+
+CREATE TABLE rhnChannel
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_channel_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ parent_channel NUMBER
+ CONSTRAINT rhn_channel_parent_ch_fk
+ REFERENCES rhnChannel (id),
+ org_id NUMBER
+ CONSTRAINT rhn_channel_org_fk
+ REFERENCES web_customer (id),
+ channel_arch_id NUMBER NOT NULL
+ CONSTRAINT rhn_channel_caid_fk
+ REFERENCES rhnChannelArch (id),
+ label VARCHAR2(128) NOT NULL,
+ basedir VARCHAR2(256) NOT NULL,
+ name VARCHAR2(256) NOT NULL,
+ summary VARCHAR2(500) NOT NULL,
+ description VARCHAR2(4000),
+ product_name_id NUMBER
+ CONSTRAINT rhn_channel_product_name_ch_fk
+ REFERENCES rhnProductName (id),
+ gpg_key_url VARCHAR2(256),
+ gpg_key_id VARCHAR2(14),
+ gpg_key_fp VARCHAR2(50),
+ end_of_life DATE,
++ checksum_type_id NUMBER CONSTRAINT rhn_channel_checksum_fk
++ REFERENCES rhnChecksumType(id),
+ receiving_updates CHAR(1)
+ DEFAULT ('Y') NOT NULL
+ CONSTRAINT rhn_channel_ru_ck
+ CHECK (receiving_updates in ( 'Y' , 'N'
)),
+ last_modified DATE
+ DEFAULT (sysdate) NOT NULL,
+ channel_product_id NUMBER
+ CONSTRAINT rhn_channel_cpid_fk
+ REFERENCES rhnChannelProduct (id),
+ channel_access VARCHAR2(10)
+ DEFAULT ('private'),
+ maint_name VARCHAR2(128),
+ maint_email VARCHAR2(128),
+ maint_phone VARCHAR2(128),
+ support_policy VARCHAR2(256),
+ created DATE
+ DEFAULT (sysdate) NOT NULL,
+ modified DATE
+ DEFAULT (sysdate) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_channel_label_uq
+ ON rhnChannel (label)
+ TABLESPACE [[64k_tbs]];
+
+CREATE UNIQUE INDEX rhn_channel_name_uq
+ ON rhnChannel (name)
+ TABLESPACE [[64k_tbs]];
+
+CREATE INDEX rhn_channel_org_idx
+ ON rhnChannel (org_id, id)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_channel_url_id_idx
+ ON rhnChannel (label, id)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_channel_parent_id_idx
+ ON rhnChannel (parent_channel, id)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_channel_access_idx
+ ON rhnChannel (channel_access)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_channel_id_seq START WITH 101;
+
diff --cc schema/spacewalk/common/tables/rhnChecksumType.sql
index 0000000,0000000..2afa492
new file mode 100644
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnChecksumType.sql
@@@ -1,0 -1,0 +1,37 @@@
++--
++-- Copyright (c) 2008 Red Hat, Inc.
++--
++-- This software is licensed to you under the GNU General Public License,
++-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
++-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
++-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
++-- along with this software; if not, see
++--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
++--
++-- Red Hat trademarks are not licensed under GPLv2. No permission is
++-- granted to use or replicate Red Hat trademarks that are incorporated
++-- in this software or its documentation.
++--
++
++CREATE TABLE rhnChecksumType
++(
++ id NUMBER PRIMARY KEY
++ USING INDEX TABLESPACE [[64k_tbs]],
++ label VARCHAR2(32) NOT NULL
++ CONSTRAINT rhn_checksumtype_label_uq UNIQUE
++ USING INDEX TABLESPACE [[64k_tbs]],
++ description VARCHAR2(64) NOT NULL,
++ created DATE
++ DEFAULT (sysdate) NOT NULL,
++ modified DATE
++ DEFAULT (sysdate) NOT NULL,
++)
++ENABLE ROW MOVEMENT
++;
++
++CREATE INDEX rhn_checksumtype_label_id_idx
++ ON rhnChecksumType( label, id )
++ TABLESPACE [[64k_tbs]];
++
++CREATE SEQUENCE rhn_checksum_id_seq;
++
diff --cc schema/spacewalk/common/tables/tables.deps
index 5d2616f,0000000..0dd3d79
mode 100644,000000..100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@@ -1,303 -1,0 +1,304 @@@
+#
+# Copyright (c) 2008 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Dependencies for table objects in this (namespace) directory.
+# See: ../../README for details.
+# No TABS, PLEASE!
+#
+
+path = . class types
+
+PXTSessions :: web_contact
+rhnAction :: rhnActionType web_customer web_contact
+rhnActionScript :: rhnAction
+rhnActionClientOptions :: rhnAction rhnClientConfigOption
+rhnActionConfigChannel :: rhnServerAction rhnConfigChannel
+rhnActionConfigDate :: rhnAction
+rhnActionConfigDateFile :: rhnAction
+rhnActionConfigFileName :: rhnServerAction rhnConfigFileName rhnConfigFileFailure
\
+ rhnConfigRevision
+rhnActionConfigRevision :: rhnAction rhnServer rhnConfigRevision
rhnConfigFileFailure
+rhnActionConfigRevisionResult :: rhnActionConfigRevision
+rhnActionDaemonConfig :: rhnAction
+rhnActionErrataUpdate :: rhnAction rhnErrata
+rhnActionKickstart :: rhnAction rhnKickstartableTree
+rhnActionKickstartFileList :: rhnActionKickstart rhnFileList
+rhnActionKickstartGuest :: rhnActionKickstart rhnKickstartSession
rhnKickstartableTree
+rhnActionPackage :: rhnPackage rhnPackageName rhnPackageArch rhnAction
+rhnActionPackageAnswerfile :: rhnActionPackage
+rhnActionPackageDelta :: rhnPackageDelta
+rhnActionPackageOrder :: rhnActionPackage
+rhnActionPackageRemovalFailure :: rhnServer rhnAction rhnPackageName \
+ rhnPackageEVR rhnPackageCapability
+rhnActionTransactions :: rhnAction rhnTransaction
+rhnActionVerifyResult :: rhnAction rhnPackageName rhnPackageEVR \
+ rhnPackageCapability
+rhnActivationKey :: rhnRegToken rhnKickstartSession
+rhnArchTypeActions :: rhnArchType rhnActionType
+rhnAppInstallSession :: rhnAppInstallInstance
+rhnAppInstallSessionData :: rhnAppInstallSession
+rhnBlacklistObsoletes :: rhnChannel rhnPackageName rhnChannelPackage \
+ rhnPackage
+rhnCache :: rhnCacheKey
+rhnCacheTimestamps :: rhnCacheKey rhnCache
- rhnChannel :: web_customer rhnChannelArch rhnChannelProduct
rhnProductName
++rhnChannel :: web_customer rhnChannelArch rhnChannelProduct \
++ rhnProductName rhnChecksumType
+rhnChannelArch :: rhnArchType
+rhnChannelDownloads :: rhnChannel rhnDownloads
+rhnChannelComps :: rhnChannel
+rhnChannelCloned :: rhnChannelComps
+rhnChannelErrata :: rhnChannel rhnErrata
+rhnChannelFamily :: web_customer
+rhnChannelFamilyLicenseConsent :: rhnChannelFamily web_contact rhnServer
+rhnChannelFamilyMembers :: rhnChannel rhnChannelFamily
+rhnChannelFamilyVirtSubLevel :: rhnChannelFamily rhnVirtSubLevel
+rhnPrivateChannelFamily :: web_customer rhnChannelFamily
+rhnPublicChannelFamily :: rhnChannelFamily
+rhnChannelPackage :: rhnChannel rhnPackage
+rhnChannelPackageArchCompat :: rhnPackageArch rhnChannelArch
+rhnChannelPermission :: rhnChannelPermissionRole rhnChannel web_contact
+rhnChannelRelationship :: rhnRelationshipType rhnChannel
+rhnChannelTrust :: rhnChannel
+rhnClientCapability :: rhnClientCapabilityName
+rhnClientOptionVersionMap :: rhnClientConfigOption rhnPackageEVR
+rhnConfigFile :: rhnConfigChannel rhnConfigFileState rhnConfigFileName
+rhnConfigFile_foreignkeys :: rhnConfigRevision
+rhnConfigChannel :: web_customer rhnConfigChannelType
+rhnConfigRevision :: rhnConfigFile rhnConfigInfo rhnConfigContent
rhnConfigFileType
+rhnCpu :: rhnServer rhnCpuArch
+rhnCryptoKey :: rhnCryptoKeyType
+rhnCryptoKeyKickstart :: rhnCryptoKey rhnKSData
+rhnDevice :: rhnServer
+rhnDistChannelMap :: rhnChannel rhnChannelArch
+rhnDownloads :: rhnChannelFamily rhnFile rhnDownloadType
+rhnDumpSnapshotChannel :: rhnDumpSnapshot rhnChannel
+rhnDumpSnapshotChannelErrata :: rhnDumpSnapshotChannel rhnErrata
+rhnDumpSnapshotChannelPackage :: rhnDumpSnapshotChannel rhnPackage
+rhnDumpSnapshotChannelPkgSrc :: rhnDumpSnapshotChannel rhnPackageSource
+rhnDumpSnapshotChannelKSTree :: rhnDumpSnapshotChannel rhnKickstartableTree
+rhnEmailAddress :: rhnEmailAddressState web_contact
+rhnEntitlementQueue :: web_customer
+rhnErrata :: web_customer rhnErrataSeverity
+rhnErrataBuglist :: rhnErrata
+rhnErrataBuglistTmp :: rhnErrataTmp
+rhnErrataCVE :: rhnErrata rhnCVE
+rhnErrataCVETmp :: rhnErrataTmp rhnCVE
+rhnErrataFile :: rhnErrata rhnErrataFileType
+rhnErrataFileChannel :: rhnChannel rhnErrataFile rhnChannelErrata
+rhnErrataFilePackage :: rhnPackage rhnErrataFile rhnErrataPackage
+rhnErrataFilePackageSource :: rhnErrataFile rhnPackageSource rhnErrataPackage
+rhnErrataFileTmp :: rhnErrataTmp rhnErrataFileType
+rhnErrataFileChannelTmp :: rhnErrataFileTmp rhnChannel
+rhnErrataFilePackageTmp :: rhnErrataFileTmp rhnChannel
+rhnErrataKeyword :: rhnErrata
+rhnErrataKeywordTmp :: rhnErrataTmp
+rhnErrataPackage :: rhnPackage rhnErrata
+rhnErrataPackageTmp :: rhnPackage rhnErrataTmp
+rhnErrataRelationship :: rhnRelationshipType rhnErrata
+rhnErrataRelationshipTmp :: rhnRelationshipType rhnErrataTmp rhnErrata
+rhnErrataClonedTmp :: rhnErrataTmp
+rhnErrataTmp :: web_customer
+rhnFile :: web_customer
+rhnFileLocation :: rhnFile
+rhnGrailComponents :: rhnUserGroupType
+rhnGrailComponentChoices :: web_contact
+rhnKSData :: web_customer
+rhnKickstartableTree :: rhnChannel rhnKSTreeType web_customer \
+ rhnKSInstallType
+rhnKickstartCommand :: rhnKSData rhnKickstartCommandName
+rhnKickstartDefaults :: rhnKSData rhnKickstartableTree rhnServerProfile \
+ rhnKickstartVirtualizationType
+rhnKickstartDefaultRegToken :: rhnKSData rhnRegToken
+rhnKickstartPackages :: rhnPackageName rhnKSData
+rhnKickstartPreserveFileList :: rhnKSData rhnFileList
+rhnKickstartScript :: rhnKSData
+rhnKickstartSession :: rhnKSData web_customer rhnServer rhnAction \
+ rhnKickstartSessionState rhnServerProfile \
+ rhnKickstartVirtualizationType
+rhnKickstartSessionHistory :: rhnKickstartSession rhnKickstartSessionState
+rhnKSTreeFile :: rhnKickstartableTree rhnChannelErrata rhnErrata
+rhnKSRawData :: rhnKSData
+rhnKickstartTimezone :: rhnKSInstallType
+rhnMessage :: rhnMessageType rhnMessagePriority
+rhnMonitor :: rhnServer rhnMonitorGranularity
+rhnOrgChannelSettings :: web_customer rhnChannel rhnOrgChannelSettingsType
+rhnOrgEntitlements :: rhnOrgEntitlementType
+rhnOrgErrataCacheQueue :: web_customer
+rhnOrgInfo :: rhnServerGroupType
+rhnOrgState :: rhnOrgAvailableStates web_customer
+rhnOrgStateTransitions :: rhnOrgAvailableStates
+rhnOrgQuota :: web_customer
+rhnPackage :: rhnPackageName rhnPackageEVR rhnPackageArch \
+ rhnPackageGroup rhnSourceRPM web_customer
+rhnPackageArch :: rhnArchType
+rhnPackageDeltaElement :: rhnPackageDelta rhnTransactionPackage
+rhnPackageEVR :: evr_t
+rhnPackageChangelog :: rhnPackage
+rhnPackageConflicts :: rhnPackage rhnPackageCapability
+rhnPackageFile :: rhnPackage rhnPackageCapability
+rhnPackageKeyAssociation :: rhnPackageKey rhnPackage
+rhnPackageKey :: rhnPackageKeyType rhnPackageProvider
+rhnPackageObsoletes :: rhnPackage rhnPackageCapability
+rhnPackageNEVRA :: rhnPackageName rhnPackageEVR rhnPackageArch
+rhnPackageProvides :: rhnPackage rhnPackageCapability
+rhnPackageRequires :: rhnPackage rhnPackageCapability
+rhnPackageSenseMap :: rhnPackageSense
+rhnPackageSource :: web_customer rhnSourceRPM rhnFile rhnPackageGroup
+rhnPackageSyncBlacklist :: rhnPackageName web_customer
+rhnPathChannelMap :: rhnChannel
+rhnProduct :: rhnProductLine
+rhnProductChannel :: rhnChannel rhnProduct
+rhnProxyInfo :: rhnServer
+rhnPushClient :: rhnServer rhnPushClientState
+rhnRam :: rhnServer
+rhnRegToken :: rhnServerGroupType
+rhnRegTokenChannels :: rhnRegToken rhnChannel
+rhnRegTokenConfigChannels :: rhnRegToken rhnConfigChannel
+rhnRegTokenEntitlement :: rhnRegToken rhnServerGroupType
+rhnRegTokenGroups :: rhnRegToken rhnServerGroup
+rhnRegTokenPackages :: rhnRegToken rhnPackageName
+rhnRepoRegenQueue :: rhnSatelliteCert rhnSatelliteChannelFamily
rhnSatelliteInfo
+rhnRevision :: rhnConfigFile rhnConfigContent rhnConfigInfo
+
+rhnSatelliteInfo :: rhnServer
+rhnSatelliteServerGroup :: rhnServer rhnServerGroup
+rhnSavedSearch :: rhnSavedSearchType web_contact
+rhnServer :: rhnServerArch web_contact web_customer \
+ rhnProvisionState
+rhnServerAction :: rhnServer rhnAction rhnActionStatus
+rhnServerActionPackageResult :: rhnActionPackage
+rhnServerActionScriptResult :: rhnActionScript rhnServer
+rhnServerArch :: rhnArchType
+rhnServerChannel :: rhnServer rhnChannel
+rhnServerChannelArchCompat :: rhnServerArch rhnChannelArch
+rhnServerConfigChannel :: rhnServer rhnConfigChannel
+rhnServerCustomDataValue :: rhnCustomDataKey
+rhnServerDMI :: rhnServer
+rhnServerGroup :: rhnServerGroupType web_customer
+rhnServerGroupMembers :: rhnServer rhnServerGroup
+rhnServerGroupNotes :: web_contact rhnServerGroup
+rhnServerGroupTypeFeature :: rhnFeature rhnServerGroupType
+rhnServerHistory :: rhnServer
+rhnServerInfo :: rhnServer
+rhnServerUuid :: rhnServer
+rhnServerInstallInfo :: rhnServer
+rhnServerLocation :: rhnServer
+rhnServerNeededCache :: web_customer rhnServer rhnErrata
+rhnServerNetwork :: rhnServer
+rhnServerNotes :: rhnServer web_contact
+rhnServerPackage :: rhnServer rhnPackageArch rhnPackageName rhnPackageEVR
+rhnServerPackageArchCompat :: rhnPackageArch rhnServerArch
+rhnServerPath :: rhnServer
+rhnServerPrefs :: rhnServer
+rhnServerPreserveFileList :: rhnServer rhnFileList
+rhnServerProfile :: web_customer rhnChannel rhnServerProfileType
+rhnServerProfilePackage :: rhnServerProfile rhnPackageName rhnPackageEVR
+rhnServerTokenRegs :: rhnRegToken rhnServer
+rhnServerServerGroupArchCompat :: rhnServerGroupType rhnServerArch
+rhnServiceChannelFamilyMap :: rh_product
+rhnServiceServerGroupMap :: rh_product rhnServerGroupType
+rhnSet :: web_contact
+rhnSGTypeBaseAddonCompat :: rhnServerGroupType
+rhnSGTypeVirtSubLevel :: rhnServerGroupType rhnVirtSubLevel
+rhnSnapshot :: web_customer rhnSnapshotInvalidReason
+rhnSnapshotChannel :: rhnSnapshot rhnChannel
+rhnSnapshotConfigChannel :: rhnSnapshot rhnConfigChannel
+rhnSnapshotConfigRevision :: rhnSnapshot rhnConfigRevision
+rhnSnapshotPackage :: rhnSnapshot
+rhnSnapshotServerGroup :: rhnServerGroup rhnSnapshot
+rhnSnapshotTag :: rhnSnapshot rhnTag
+rhnSNPErrataQueue :: rhnErrata
+rhnSNPServerQueue :: rhnServer
+rhnSolarisPackage :: rhnPackage
+rhnSolarisPatch :: rhnPackage rhnSolarisPatchType
+rhnSolarisPatchPackages :: rhnPackage rhnPackageNEVRA
+rhnSolarisPatchedPackages :: rhnPackage rhnPackageNEVRA rhnServer
+rhnSolarisPatchSetMembers :: rhnPackage rhnSolarisPatchSet
+rhnSsmOperationServer :: rhnSsmOperation
+rhnSurveyQuestionResponse :: rhnSurveyQuestion
+rhnSurveyQuestion :: rhnSurvey
+rhnTag :: rhnTagName web_customer
+rhnTransaction :: rhnServer
+rhnTransactionElement :: rhnTransactionPackage rhnTransaction
+rhnTransactionPackage :: rhnTransactionOperation rhnPackageArch \
+ rhnPackageEVR rhnPackageName
+rhnUserFeedback :: web_contact
+rhnUserGroupMembers :: web_contact rhnUserGroup
+rhnUserGroup :: web_customer rhnUserGroupType
+rhnUserInfo :: web_contact rhnTimezone
+rhnUserInfoPane :: rhnInfoPane web_contact
+rhnUserServerGroupPerms :: web_contact rhnServerGroup
+rhnUserServerPerms :: web_contact rhnServer
+rhnUserServerPrefs :: web_contact rhnServer
+rhnUserMessage :: web_contact rhnMessage rhnUserMessageStatus
+rhnUserSurveyStatus :: rhnUserSurveyStatusType
+rhnVersionInfo :: rhnPackageName rhnPackageEVR
+rhnVirtualInstance :: rhnServer
+rhnVirtualInstanceInfo :: rhnVirtualInstance rhnVirtualInstanceType \
+ rhnVirtualInstanceState
+rhnVirtualInstanceInstallLog :: rhnKickstartSession
+rhnVirtualInstanceEventLog :: rhnVirtualInstance rhnVirtualInstanceEventType \
+ rhnVirtualInstanceState
+rhnVisibleObjects :: PXTSessions
+rhnWebContactChangeLog :: rhnWebContactChangeState
+rhn_check_probe :: rhnServer rhn_probe rhn_sat_cluster
+rhn_check_suite_probe :: rhn_check_suites
+rhn_check_suites :: web_customer
+rhn_command :: rhn_command_groups rhn_command_class \
+ rhn_command_requirements
+rhn_command_parameter :: rhn_command rhn_widget rhn_semantic_data_type
+rhn_command_param_threshold :: rhn_command rhn_metrics rhn_threshold_type
+rhn_command_queue_execs :: rhn_command_queue_instances rhn_command_target
+rhn_command_queue_instances :: rhn_command_queue_commands
+rhn_command_queue_params :: rhn_command_queue_instances
+rhn_command_queue_sessions :: web_contact
+rhn_command_target :: web_customer
+rhn_config_macro :: rhn_environment
+rhn_config_parameter :: rhn_config_group rhn_config_security_type
+rhn_contact_group_members :: rhn_contact_methods rhn_contact_groups
+rhn_contact_groups :: web_customer rhn_strategies \
+ rhn_notification_formats
+rhn_contact_methods :: web_contact rhn_method_types rhn_pager_types \
+ rhn_sat_cluster rhn_schedules rhn_time_zone_names \
+ rhn_notification_formats rhnTimezone rhnUserInfo
+rhn_db_environment :: rhn_environment
+rhn_host_check_suites :: rhn_check_suites rhn_host_probe
+rhn_host_monitoring :: rhn_server_monitoring_info rhn_interface_monitoring
+rhn_host_probe :: rhnServer rhn_probe rhn_sat_cluster
+rhn_interface_monitoring :: rhnServerNetInterface
+rhn_ll_netsaint :: rhn_sat_cluster
+rhn_metrics :: rhn_command_class rhn_units
+rhn_notification_formats :: web_customer
+rhn_os_commands_xref :: rhn_command rhn_os
+rhn_probe :: rhn_command web_customer rhn_probe_types
+rhn_probe_param_value :: rhn_probe rhn_command_parameter
+rhn_redirect_criteria :: rhn_redirects rhn_redirect_match_types
+rhn_redirect_email_targets :: rhn_redirects
+rhn_redirect_group_targets :: rhn_contact_groups rhn_redirects
+rhn_redirect_method_targets :: rhn_contact_methods rhn_redirects
+rhn_redirects :: web_contact web_customer rhn_redirect_types
+rhn_sat_cluster :: rhn_command_target web_customer rhn_physical_location
+rhn_sat_cluster_probe :: rhn_probe rhn_sat_cluster
+rhn_sat_node :: rhn_command_target rhn_sat_cluster
+rhn_sat_node_probe :: rhn_probe rhn_sat_node
+rhn_schedule_days :: rhn_schedules
+rhn_schedules :: web_customer rhn_schedule_types
+rhn_schedule_weeks :: rhn_schedules
+rhn_server_monitoring_info :: rhnServer rhn_os
+rhn_service_probe_origins :: rhn_check_suite_probe rhn_probe
+rhn_snmp_alert :: rhn_sat_cluster
+rhn_units :: rhn_quanta
+rhn_url_probe :: rhn_probe
+rhn_url_probe_step :: rhn_url_probe
+web_contact :: web_customer
+web_user_contact_permission :: web_contact
+web_user_site_info :: web_contact web_user_site_type
+web_user_personal_info :: web_contact web_user_prefix
+web_customer_product :: rh_product web_product_valid_numbers
diff --cc schema/spacewalk/oracle/triggers/rhnChecksumType.sql
index 0000000,0000000..78cf5fb
new file mode 100644
--- /dev/null
+++ b/schema/spacewalk/oracle/triggers/rhnChecksumType.sql
@@@ -1,0 -1,0 +1,31 @@@
++--
++-- Copyright (c) 2008 Red Hat, Inc.
++--
++-- This software is licensed to you under the GNU General Public License,
++-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
++-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
++-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
++-- along with this software; if not, see
++--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
++--
++-- Red Hat trademarks are not licensed under GPLv2. No permission is
++-- granted to use or replicate Red Hat trademarks that are incorporated
++-- in this software or its documentation.
++--
++
++create or replace trigger
++rhn_checksumtype_mod_trig
++before insert or update on rhnChecksumType
++for each row
++begin
++ :new.modified := sysdate;
++end;
++/
++show errors
++
++--
++--
++-- Revision 1.1 2009/06/26 10:39:17 pkilambi
++-- add schema to hold checksum types
++--
++
diff --cc spacewalk/setup/bin/spacewalk-setup
index 577bb64,7695584..8beb96b
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@@ -938,28 -942,18 +938,34 @@@ sub load_satellite_certificate
}
sub populate_initial_configs {
- my $opts = shift;
- my $answers = shift;
+ my $opts = shift;
+ my $answers = shift;
- my %nls_database_paramaters =
Spacewalk::Setup::get_nls_database_parameters($answers);
+ # TODO: This may need to be addressed. Can query this for postgresql with
+ # "show client_encoding;":
+ my $charset = 'UTF8';
+ if ($answers{'db-backend'} eq 'oracle') {
+ my %nls_database_paramaters =
Spacewalk::Setup::get_nls_database_parameters($answers);
+ $charset = $nls_database_paramaters{NLS_CHARACTERSET};
+ }
+
+ # Define some db specific settings:
+ my $hibernate_dialect = "org.hibernate.dialect.Oracle9iDialect";
+ my $hibernate_driver = "oracle.jdbc.driver.OracleDriver";
+ my $hibernate_url = "jdbc:oracle:thin:@" .
$answers->{"db-host"} . ":" . $answers->{"db-port"} .
":" . $answers->{"db-sid"};
+ if ($answers->{'db-backend'} eq 'postgresql') {
+ $hibernate_dialect = "org.hibernate.dialect.PostgreSQLDialect";
+ $hibernate_driver = "org.postgresql.Driver";
+ $hibernate_url = "jdbc:postgresql://" .
$answers->{"db-host"} . ":" . $answers->{"db-port"} .
"/" . $answers->{"db-sid"};
+ }
- my %config_opts =
+ # Check where jabberd's lib dir is, can vary on x86_64:
+ my $jabberdLibDir = "/usr/lib/jabberd/";
+ if (-d "/usr/lib64/jabberd/") {
+ $jabberdLibDir = "/usr/lib64/jabberd";
+ }
+
+ my %config_opts =
(
mount_point => $answers->{'mount-point'} ||
'/var/satellite',
kickstart_mount_point => $answers->{'kickstart-mount-point'} ||
$answers->{'mount-point'} || '/var/satellite',
commit 4dd630505f3866ccea60cd28e594000fc200cfdf
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 16:41:22 2009 +0200
Automatic commit of package [spacewalk-backend] release [0.6.24-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 01c3eef..9cb3117 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.23
+Version: 0.6.24
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -572,6 +572,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Jul 24 2009 Jan Pazdziora 0.6.24-1
+- add spacewalk-report script and inventory report.
+
* Thu Jul 23 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.23-1
- 513432, 513435 : Our channel family import is written such that we compare
and resync the red hat channel families. But in iss case we can have provate
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index bfb1562..85034a3 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.23-1 backend/
+0.6.24-1 backend/
commit 5b824796fe66357ed1e99008e260db66e4cf791d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 16:13:16 2009 +0200
reporting: add man page for spacewalk-report.
diff --git a/backend/satellite_tools/spacewalk-report.sgml
b/backend/satellite_tools/spacewalk-report.sgml
new file mode 100644
index 0000000..5f8c5c2
--- /dev/null
+++ b/backend/satellite_tools/spacewalk-report.sgml
@@ -0,0 +1,119 @@
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+
+<refentry>
+
+<RefMeta>
+<RefEntryTitle>spacewalk-report</RefEntryTitle><manvolnum>8</manvolnum>
+</RefMeta>
+
+<RefNameDiv>
+<RefName><command>spacewalk-report</command></RefName>
+<RefPurpose>
+Generate reports from Spacewalk server in csv format
+</RefPurpose>
+</RefNameDiv>
+
+<RefSynopsisDiv>
+<Synopsis>
+ <cmdsynopsis>
+ <command>spacewalk-report</command>
+
<arg>--db=<replaceable>connect_string</replaceable></arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>spacewalk-report</command>
+ <sbr />
+ <group>
+ <arg>--multival-on-rows</arg>
+
<arg>--multival-separator=<replaceable>separator-string</replaceable></arg>
+ </group>
+ <sbr />
+
<arg>--db=<replaceable>connect-string</replaceable></arg>
+ <sbr />
+ <arg
choice='plain'><replaceable>report-name</replaceable></arg>
+ <sbr />
+ <arg>--list-fields</arg>
+ <sbr />
+ <arg choice='plain'>other report specific options</arg>
+ </cmdsynopsis>
+</Synopsis>
+</RefSynopsisDiv>
+
+<RefSect1><Title>Description</Title>
+<para>
+ The <command>spacewalk-report</command> command can be used to
+ generate canned reports from Spacewalk server database. The report
+ which will be generated is selected by specifying its name as
+ a parameter to <command>spacewalk-report</command>.
+</para>
+
+<para>
+ The command takes some general options, specified on the command
+ line before the report name. Each report may have a set of
+ report-specific options, those are placed on the command line
+ after the report name.
+</para>
+
+<para>
+ If the report name is not specified, list of available report
+ names is printed, one name per line.
+</para>
+
+<RefSect1><Title>General Options</Title>
+<variablelist>
+ <varlistentry>
+ <term>--multival-on-rows</term>
+ <listitem>
+ <para>If certain field can have multiple values, you can
+ use this option to have records for the entity repeated
+ in output in the form of cartesian product. By default,
+ those multiple values are presented on one row in one
+ field, separated by semicolon.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+
<term>--multival-separator=<replaceable>separator-string</replaceable></term>
+ <listitem>
+ <para>If multiple values are output on one row (the
+ default), this option can change the string which
+ separates multiple values in one field. The default is
+ semicolon.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+
<term>--db=<replaceable>connect-string</replaceable></term>
+ <listitem>
+ <para>Database connect string in the form of
+ <replaceable>username/password@dbname</replaceable> can be
+ specified to generated report from user-defined database.
+ By default, connect string from default_db option from
+ /etc/rhn/rhn.conf is used.</para>
+ <para>This option should be considered obsoleted and may
+ not be available in next versions of
+ <command>spacewalk-report</command>.
+ </listitem>
+ </varlistentry>
+</variablelist>
+</RefSect1>
+
+<RefSect1><Title>Report-specific Options</Title>
+<variablelist>
+ <varlistentry>
+ <term>--list-fields</term>
+ <listitem>
+ <para>Instead of running the report, shows fields that the
+ report has, one field name per line.</para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</RefSect1>
+
+<RefSect1><Title>Authors</Title>
+<simplelist>
+ <member>Jan Pazdziora</member>
+</simplelist>
+</RefSect1>
+</RefEntry>
+
+<!--
+vim: sw=4
+-->
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 4e89aa2..01c3eef 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -546,6 +546,7 @@ rm -f %{rhnconf}/rhnSecret.py*
%{_mandir}/man8/rhn-db-stats.8*
%{_mandir}/man8/satellite-sync.8*
%{_mandir}/man8/spacewalk-debug.8*
+%{_mandir}/man8/spacewalk-report.8*
%{_mandir}/man8/satpasswd.8*
%{_mandir}/man8/satwho.8*
commit 6ea8f3ce6484860dfd1ede600a57d4d1ac917a78
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 16:06:39 2009 +0200
reporting: change the --fields option to --show-fields.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index bd831a2..eb80584 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -74,8 +74,9 @@ def processCommandlineReport(report):
""" process the commandline options for one report """
optionsTable = [
- Option('--fields', action='store_true',
- help='show fields of the report'),
+ Option('--list-fields', action='store_true',
+ dest='listfields',
+ help='list fields of the report instead of running the report'),
]
optionParserReport = OptionParser(
usage="options for report %s" % report,
@@ -99,7 +100,7 @@ if __name__ == '__main__':
except(reports.spacewalk_unknown_report):
systemExit(-4, 'Unknown report [%s].' % report_name)
- if report_options.fields:
+ if report_options.listfields:
for c in report.columns:
print c
sys.exit(0)
commit 75c6620b424300984da54fa90a9269e0089cb5fc
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:25:31 2009 +0200
reporting: add hardware info -- number of CPUs, and list of network interfaces.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 5d334bb..fe75a2c 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -18,6 +18,7 @@ columns:
organization
virtual_host
architecture
+ hardware
multival_columns:
@@ -50,7 +51,12 @@ sql:
virtual_data.host_system_id as virtual_host,
(
select rhnserverarch.name from rhnserverarch where rhnserver.server_arch_id =
rhnserverarch.id
- ) as architecture
+ ) as architecture,
+ (
+ (
+ select count(*) || ' CPUs' from rhncpu where rhnserver.id = rhncpu.server_id
+ ) || network_data.col
+ ) as hardware
from rhnserver,
(
select server_id, hostname, ipaddr
@@ -79,7 +85,20 @@ sql:
select host_system_id, virtual_system_id
from rhnvirtualinstance
where host_system_id is not null
- ) virtual_data
+ ) virtual_data,
+ (
+ select server_id, max(sys_connect_by_path(val, '; ')) col
+ from (
+ select server_id,
+ name||' '||ip_addr||'/'||netmask||' '||hw_addr val,
+ row_number() over (partition by server_id order by name, rowid) rn
+ from rhnservernetinterface
+ )
+ start with rn = 1
+ connect by prior rn = rn - 1
+ and prior server_id = server_id
+ group by server_id
+ ) network_data
where rhnserver.id = rhnservernetwork.server_id (+)
and rhnserver.id = rhnserverchannel.server_id (+)
and rhnserverchannel.channel_id = rhnchannel.id (+)
@@ -88,6 +107,7 @@ sql:
and rhnserver.id = entitlement_data.server_id (+)
and rhnserver.id = group_data.server_id (+)
and rhnserver.id = virtual_data.virtual_system_id (+)
+ and rhnserver.id = network_data.server_id (+)
order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id,
rhnconfigchannel.id, entitlement_data.server_group_id, group_data.server_group_id,
virtual_data.host_system_id
commit e8488469561c7bfb2e53b0d2c4557ff18ffe170e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:22:48 2009 +0200
reporting: add system architecture to the inventory report.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index bc12d9f..5d334bb 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -17,6 +17,7 @@ columns:
system_group
organization
virtual_host
+ architecture
multival_columns:
@@ -46,7 +47,10 @@ sql:
(
select name from web_customer where rhnserver.org_id = web_customer.id
) as organization,
- virtual_data.host_system_id as virtual_host
+ virtual_data.host_system_id as virtual_host,
+ (
+ select rhnserverarch.name from rhnserverarch where rhnserver.server_arch_id =
rhnserverarch.id
+ ) as architecture
from rhnserver,
(
select server_id, hostname, ipaddr
commit 847e45da3e4e0e75eb3b49ac4e27e944f6adcdf9
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:21:52 2009 +0200
reporting: add virtual host association.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index a7cf8a1..bc12d9f 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -16,6 +16,7 @@ columns:
entitlements
system_group
organization
+ virtual_host
multival_columns:
@@ -24,6 +25,7 @@ multival_columns:
configuration_channel : configuration_channel
entitlements : entitlements
system_group : system_group
+ virtual_host : virtual_host
sql:
@@ -43,7 +45,8 @@ sql:
group_data.name as system_group,
(
select name from web_customer where rhnserver.org_id = web_customer.id
- ) as organization
+ ) as organization,
+ virtual_data.host_system_id as virtual_host
from rhnserver,
(
select server_id, hostname, ipaddr
@@ -67,7 +70,12 @@ sql:
from rhnservergroupmembers, rhnservergroup
where rhnservergroupmembers.server_group_id = rhnservergroup.id (+)
and rhnservergroup.group_type is null
- ) group_data
+ ) group_data,
+ (
+ select host_system_id, virtual_system_id
+ from rhnvirtualinstance
+ where host_system_id is not null
+ ) virtual_data
where rhnserver.id = rhnservernetwork.server_id (+)
and rhnserver.id = rhnserverchannel.server_id (+)
and rhnserverchannel.channel_id = rhnchannel.id (+)
@@ -75,6 +83,8 @@ sql:
and rhnserverconfigchannel.config_channel_id = rhnconfigchannel.id (+)
and rhnserver.id = entitlement_data.server_id (+)
and rhnserver.id = group_data.server_id (+)
+ and rhnserver.id = virtual_data.virtual_system_id (+)
order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id,
- rhnconfigchannel.id, entitlement_data.server_group_id, group_data.server_group_id
+ rhnconfigchannel.id, entitlement_data.server_group_id, group_data.server_group_id,
+ virtual_data.host_system_id
commit bb75c84ff103c42da3ae97bc9866e3ac4e702821
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:19:40 2009 +0200
reporting: add organization membership.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 7adce63..a7cf8a1 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -15,6 +15,7 @@ columns:
configuration_channel
entitlements
system_group
+ organization
multival_columns:
@@ -39,7 +40,10 @@ sql:
rhnchannel.name as software_channel,
rhnconfigchannel.name as configuration_channel,
entitlement_data.name as entitlements,
- group_data.name as system_group
+ group_data.name as system_group,
+ (
+ select name from web_customer where rhnserver.org_id = web_customer.id
+ ) as organization
from rhnserver,
(
select server_id, hostname, ipaddr
commit 4edb190118a9b50f951a7a244efbb1a938d88059
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:18:33 2009 +0200
reporting: add entitlements and system groups.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 0d1a157..7adce63 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -13,12 +13,16 @@ columns:
errata_out_of_date
software_channel
configuration_channel
+ entitlements
+ system_group
multival_columns:
server_id
software_channel : software_channel
configuration_channel : configuration_channel
+ entitlements : entitlements
+ system_group : system_group
sql:
@@ -33,7 +37,9 @@ sql:
and rhnserverneededpackagecache.package_id = rhnpackage.id ) as
packages_out_of_date,
( select count(*) from rhnServerErrataTypeView where rhnserver.id = server_id ) as
errata_out_of_date,
rhnchannel.name as software_channel,
- rhnconfigchannel.name as configuration_channel
+ rhnconfigchannel.name as configuration_channel,
+ entitlement_data.name as entitlements,
+ group_data.name as system_group
from rhnserver,
(
select server_id, hostname, ipaddr
@@ -45,12 +51,26 @@ sql:
)
) rhnservernetwork,
rhnserverchannel, rhnchannel,
- rhnserverconfigchannel, rhnconfigchannel
+ rhnserverconfigchannel, rhnconfigchannel,
+ (
+ select rhnservergroupmembers.server_id, rhnservergroupmembers.server_group_id,
rhnservergroup.name
+ from rhnservergroupmembers, rhnservergroup
+ where rhnservergroupmembers.server_group_id = rhnservergroup.id (+)
+ and rhnservergroup.group_type is not null
+ ) entitlement_data,
+ (
+ select rhnservergroupmembers.server_id, rhnservergroupmembers.server_group_id,
rhnservergroup.name
+ from rhnservergroupmembers, rhnservergroup
+ where rhnservergroupmembers.server_group_id = rhnservergroup.id (+)
+ and rhnservergroup.group_type is null
+ ) group_data
where rhnserver.id = rhnservernetwork.server_id (+)
and rhnserver.id = rhnserverchannel.server_id (+)
and rhnserverchannel.channel_id = rhnchannel.id (+)
and rhnserver.id = rhnserverconfigchannel.server_id (+)
and rhnserverconfigchannel.config_channel_id = rhnconfigchannel.id (+)
+ and rhnserver.id = entitlement_data.server_id (+)
+ and rhnserver.id = group_data.server_id (+)
order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id,
- rhnconfigchannel.id
+ rhnconfigchannel.id, entitlement_data.server_group_id, group_data.server_group_id
commit 14ea93bfd94eea8906900b0cded55eacb36659c7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 15:16:09 2009 +0200
reporting: fix the logic in spacewalk-report to avoid having duplicated values.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 5d2f911..bd831a2 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -118,38 +118,40 @@ if __name__ == '__main__':
"Columns in report spec and in the database do not match:\nexpected %s\n
got %s" % ( report.columns, db_columns ))
writer.writerow(report.columns)
- multival_keys = sorted(report.multival_columns_stop +
report.multival_columns_reverted.keys())
-
row = h.fetchone()
prevrow = None
outrow = None
+ multival_dupes = {}
while row != None:
if options.multivalonrows:
writer.writerow(row)
row = h.fetchone()
continue
- if outrow == None:
- outrow = [ x for x in row ]
- else:
- go = True
- for m in multival_keys:
+ if outrow != None:
+ for m in report.multival_columns_stop:
+ if prevrow[m] != row[m]:
+ writer.writerow(outrow)
+ outrow = None
+ break
+
+ if outrow != None:
+ for m in report.multival_columns_reverted.keys():
if prevrow[m] != row[m]:
- if m in report.multival_columns_reverted:
- for v in report.multival_columns_reverted[m]:
- outrow[v] = str(outrow[v]) + options.multivalseparator + str(row[v])
- go = False
- break
- else:
- break
- if not go:
+ if not m in multival_dupes:
+ multival_dupes[m] = {}
+ if not row[m] in multival_dupes[m]:
+ outrow[m] = str(outrow[m]) + options.multivalseparator + str(row[m])
+ multival_dupes[m][row[m]] = 1
break
- if go:
- writer.writerow(outrow)
- outrow = [ x for x in row ]
+ if outrow == None:
+ outrow = [ x for x in row ]
+ multival_dupes = {}
+
prevrow = row
row = h.fetchone()
+
if outrow != None:
writer.writerow(outrow)
else:
commit 5e06b348bf5acd747dde84ed03321902fd5ce234
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 09:48:42 2009 +0200
reporting: add the configuration channel to the report.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 1423fc8..0d1a157 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -12,11 +12,13 @@ columns:
packages_out_of_date
errata_out_of_date
software_channel
+ configuration_channel
multival_columns:
server_id
software_channel : software_channel
+ configuration_channel : configuration_channel
sql:
@@ -30,7 +32,8 @@ sql:
where rhnserver.id = rhnserverneededpackagecache.server_id
and rhnserverneededpackagecache.package_id = rhnpackage.id ) as
packages_out_of_date,
( select count(*) from rhnServerErrataTypeView where rhnserver.id = server_id ) as
errata_out_of_date,
- rhnchannel.name as software_channel
+ rhnchannel.name as software_channel,
+ rhnconfigchannel.name as configuration_channel
from rhnserver,
(
select server_id, hostname, ipaddr
@@ -41,9 +44,13 @@ sql:
group by server_id
)
) rhnservernetwork,
- rhnserverchannel, rhnchannel
+ rhnserverchannel, rhnchannel,
+ rhnserverconfigchannel, rhnconfigchannel
where rhnserver.id = rhnservernetwork.server_id (+)
and rhnserver.id = rhnserverchannel.server_id (+)
and rhnserverchannel.channel_id = rhnchannel.id (+)
- order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id
+ and rhnserver.id = rhnserverconfigchannel.server_id (+)
+ and rhnserverconfigchannel.config_channel_id = rhnconfigchannel.id (+)
+ order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id,
+ rhnconfigchannel.id
commit 2a5dbae1c9258bdb96df78152ff66b92071fff66
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 09:43:35 2009 +0200
reporting: add the --multival-separator option (semicolon is the default).
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 7384f98..5d2f911 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -51,6 +51,10 @@ def processCommandline():
optionsTable = [
Option('--multival-on-rows', action='store_true',
dest='multivalonrows',
help='if there are multiple values for certain field, repeat the rows'),
+ Option('--multival-separator', action='store',
dest='multivalseparator',
+ default=';',
+ help='if there are multiple values for certain field, separate them with this
string' \
+ ' (unless --multival-on-rows)'),
Option('--db', action='store', type="string",
help='alternative database string (username/password@sid);' \
+ ' default is default_db from /etc/rhn/rhn.conf'),
@@ -133,7 +137,7 @@ if __name__ == '__main__':
if prevrow[m] != row[m]:
if m in report.multival_columns_reverted:
for v in report.multival_columns_reverted[m]:
- outrow[v] = str(outrow[v]) + ';' + str(row[v])
+ outrow[v] = str(outrow[v]) + options.multivalseparator + str(row[v])
go = False
break
else:
commit c1f2d53585dbf80d9eed8ea3ee5ef276e571456e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jul 24 09:40:17 2009 +0200
reporting: make merging multiple values the default, and add the --multival-on-rows
option to prevent it.
diff --git a/backend/satellite_tools/reports.py b/backend/satellite_tools/reports.py
index b584347..d947244 100644
--- a/backend/satellite_tools/reports.py
+++ b/backend/satellite_tools/reports.py
@@ -12,6 +12,10 @@ class report:
full_path = os.path.join(REPORT_DEFINITIONS, name)
self.sql = None
self.columns = None
+ self.column_indexes = None
+ self.multival_column_names = {}
+ self.multival_columns_reverted = {}
+ self.multival_columns_stop = []
self._load(full_path)
def _load(self, full_path):
@@ -42,9 +46,51 @@ class report:
if tag != None:
self._set(tag, value)
+ if self.multival_column_names != None:
+ unknown_columns = []
+
+ for c in self.multival_column_names:
+ if c in self.column_indexes:
+ c_id = self.column_indexes[c]
+ v = self.multival_column_names[c]
+ if v == None:
+ self.multival_columns_stop.append(c_id)
+ elif v in self.column_indexes:
+ v_id = self.column_indexes[v]
+ if v_id in self.multival_columns_reverted:
+ self.multival_columns_reverted[v_id].append(c_id)
+ else:
+ self.multival_columns_reverted[v_id] = [ c_id ]
+ else:
+ unknown_columns.append(c)
+ if len(unknown_columns) > 0:
+ raise spacewalk_report_unknown_multival_column_exception(unknown_columns)
+
+
def _set(self, tag, value):
if tag == 'columns':
self.columns = filter(lambda x: x != '', re.split('\s+', value))
+ # set mapping from column name to column position in column_indexes
+ self.column_indexes = {}
+ i = 0
+ for c in self.columns:
+ self.column_indexes[c] = i
+ i = i + 1
+ elif tag == 'multival_columns':
+ # the multival_columns specifies either
+ # a "stop" column, usually the first one,
+ # or a pair of column names separated by colon,
+ # where the first on is column which should be
+ # joined together and the second one is column
+ # whose value should be used to distinguish if
+ # we still have the same entity or not.
+ for l in filter(lambda x: x != '', re.split('\n', value)):
+ m = re.match('^\s*(\S+?)(\s*:\s*(\S*)\s*)?$', l)
+ if m == None:
+ continue
+ ( col, id_col ) = ( m.group(1), m.group(3) )
+ if col != None:
+ self.multival_column_names[col] = id_col
elif tag == 'sql':
self.sql = value
else:
@@ -57,3 +103,6 @@ class spacewalk_unknown_report(Exception):
class spacewalk_report_unknown_tag_exception(Exception):
pass
+class spacewalk_report_unknown_multival_column_exception(Exception):
+ pass
+
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 1921ccb..1423fc8 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -13,6 +13,11 @@ columns:
errata_out_of_date
software_channel
+multival_columns:
+
+ server_id
+ software_channel : software_channel
+
sql:
select rhnserver.id as server_id, rhnserver.name as profile_name,
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 48c1357..7384f98 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -49,6 +49,8 @@ except KeyboardInterrupt:
def processCommandline():
""" process the commandline """
optionsTable = [
+ Option('--multival-on-rows', action='store_true',
dest='multivalonrows',
+ help='if there are multiple values for certain field, repeat the rows'),
Option('--db', action='store', type="string",
help='alternative database string (username/password@sid);' \
+ ' default is default_db from /etc/rhn/rhn.conf'),
@@ -112,10 +114,40 @@ if __name__ == '__main__':
"Columns in report spec and in the database do not match:\nexpected %s\n
got %s" % ( report.columns, db_columns ))
writer.writerow(report.columns)
+ multival_keys = sorted(report.multival_columns_stop +
report.multival_columns_reverted.keys())
+
row = h.fetchone()
+ prevrow = None
+ outrow = None
while row != None:
- writer.writerow(row)
+ if options.multivalonrows:
+ writer.writerow(row)
+ row = h.fetchone()
+ continue
+
+ if outrow == None:
+ outrow = [ x for x in row ]
+ else:
+ go = True
+ for m in multival_keys:
+ if prevrow[m] != row[m]:
+ if m in report.multival_columns_reverted:
+ for v in report.multival_columns_reverted[m]:
+ outrow[v] = str(outrow[v]) + ';' + str(row[v])
+ go = False
+ break
+ else:
+ break
+ if not go:
+ break
+
+ if go:
+ writer.writerow(outrow)
+ outrow = [ x for x in row ]
+ prevrow = row
row = h.fetchone()
+ if outrow != None:
+ writer.writerow(outrow)
else:
for r in reports.available_reports():
print r
commit e8f6177222045bc30a6e0818cdd3aa36bea2d659
Author: Partha Aji <paji(a)redhat.com>
Date: Fri Jul 24 00:05:45 2009 -0400
515539 - Made the cobbler create system record command always delete and create a new
version of system
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
index 00b7abe..09ad45d 100644
---
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
+++
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
@@ -150,14 +150,7 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
sysname = (String) sysmap.get("name");
}
}
- if (sysname != null) {
- String handle = (String) invokeXMLRPC("get_system_handle",
- sysname, xmlRpcToken);
- log.debug("getSystemHandleByMAC.returning handle: " + handle);
- return handle;
- }
-
- return null;
+ return sysname;
}
private Map getSystemMapByMac() {
@@ -209,27 +202,30 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
* @return ValidatorError if the store failed.
*/
public ValidatorError store() {
- String handle = null;
// First lookup by MAC addr
- handle = lookupExisting();
- if (handle == null) {
+ String sysName = lookupExisting();
+ if (sysName == null) {
// Next try by name
try {
- handle = (String) invokeXMLRPC("get_system_handle",
+ String handle = (String) invokeXMLRPC("get_system_handle",
getCobblerSystemRecordName(), xmlRpcToken);
+ if (!StringUtils.isBlank(handle)) {
+ sysName = getCobblerSystemRecordName();
+ }
log.debug("Did we find handle by name: " + handle);
}
catch (RuntimeException e) {
log.debug("No system by that name either. create a new one");
}
}
- // Else, lets make a new system
- if (handle == null) {
- handle = (String) invokeXMLRPC("new_system", xmlRpcToken);
- log.debug("handle: " + handle);
- invokeXMLRPC("modify_system", handle, "name",
getCobblerSystemRecordName(),
- xmlRpcToken);
+ if (!StringUtils.isBlank(sysName)) {
+ invokeXMLRPC("remove_system", sysName, xmlRpcToken);
+ invokeCobblerUpdate();
}
+ String handle = (String) invokeXMLRPC("new_system", xmlRpcToken);
+ log.debug("handle: " + handle);
+ invokeXMLRPC("modify_system", handle, "name",
getCobblerSystemRecordName(),
+ xmlRpcToken);
if (this.server.getNetworkInterfaces() != null &&
!this.server.getNetworkInterfaces().isEmpty()) {
@@ -321,10 +317,9 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
if (!StringUtils.isBlank(n.getNetmask())) {
inet.put("subnet-" + n.getName(), n.getNetmask());
}
- if (!StringUtils.isBlank(staticNetwork) &&
- n.getName().equals(staticNetwork)) {
- inet.put("static-" + n.getName(), Boolean.TRUE);
- }
+ inet.put("static-" + n.getName(),
+ !StringUtils.isBlank(staticNetwork) &&
+ n.getName().equals(staticNetwork));
}
}
log.debug("Networks: " + inet);
commit 0082f6412e4a55b8de665278056645e99764f3d0
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Jul 23 19:20:58 2009 -0400
512440 - Fixed the proxies to turn SSLProxyEngine to deal with Cobbler KS files
diff --git a/web/html/applications/rhn-proxy/5.0/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/5.0/httpd/rhn_proxy.conf
index 7699ae6..9729ab7 100644
--- a/web/html/applications/rhn-proxy/5.0/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/5.0/httpd/rhn_proxy.conf
@@ -52,3 +52,6 @@
RewriteRule ^/rhn/?$ https://%{SERVER_NAME}/rhn/ [R,L]
</IfModule>
+#Disable SSL2, left only higher
+SSLProtocol all -SSLv2
+SSLProxyEngine on
commit d5df7da09e32ff9d5e5a814a17d5d50ff7471bb5
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Jul 23 18:52:03 2009 -0400
510299 & 510785- Fixed issues pertaining to static network and upgrade.
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
index ae19e78..c7a5108 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
@@ -871,7 +871,7 @@ public class KickstartFactory extends HibernateFactory {
* @param tree to lookup by
* @return List of KickstartData objects if found
*/
- public static List lookupKickstartDatasByTree(KickstartableTree tree) {
+ public static List<KickstartData> lookupKickstartDatasByTree(KickstartableTree
tree) {
String query = "KickstartData.lookupByTreeId";
Session session = HibernateFactory.getSession();
return session.getNamedQuery(query)
@@ -1023,4 +1023,5 @@ public class KickstartFactory extends HibernateFactory {
Session session = HibernateFactory.getSession();
return (List<KickstartableTree>) session.getNamedQuery(query).list();
}
+
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index cb90be6..bdddc4c 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -4062,6 +4062,9 @@ public class SystemHandler extends BaseHandler {
String hostName = (String)data.get("hostname");
String command = KickstartFormatter.makeStaticNetworkCommand(device, ip, gateway,
nameservers.get(0), netmask,
hostName);
+ rec.setHostName(hostName);
+ rec.setGateway(gateway);
+ rec.setNameServers(nameservers);
Map<String, Object> meta = rec.getKsMeta();
meta.put(KickstartFormatter.STATIC_NETWORK_VAR, command);
rec.setKsMeta(meta);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index ff57259..942fdbd 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -576,6 +576,9 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
cmd.setKernelOptions(getExtraOptions());
cmd.setPostKernelOptions(postKernelOptions);
cmd.setScheduledAction(kickstartAction);
+ if (!isDhcp) {
+ cmd.setStaticNetwork(networkInterface);
+ }
ValidatorError cobblerError = cmd.store();
if (cobblerError != null) {
return cobblerError;
@@ -589,6 +592,9 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
cmd.setKernelOptions(kernelOptions);
cmd.setPostKernelOptions(postKernelOptions);
cmd.setScheduledAction(kickstartAction);
+ if (!isDhcp) {
+ cmd.setStaticNetwork(networkInterface);
+ }
ValidatorError cobblerError = cmd.store();
if (cobblerError != null) {
return cobblerError;
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
index e24207c..e8e07d4 100644
---
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
+++
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
@@ -15,6 +15,8 @@
package com.redhat.rhn.manager.kickstart.cobbler;
import com.redhat.rhn.common.validator.ValidatorError;
+import com.redhat.rhn.domain.kickstart.KickstartData;
+import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.KickstartableTree;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.manager.kickstart.KickstartUrlHelper;
@@ -23,6 +25,7 @@ import org.apache.log4j.Logger;
import org.cobbler.Distro;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -95,10 +98,17 @@ public class CobblerDistroCreateCommand extends CobblerDistroCommand
{
}
if (syncProfiles) {
- CobblerProfileSyncCommand syncer = new CobblerProfileSyncCommand();
- syncer.store();
+ List<KickstartData> profiles = KickstartFactory.
+ lookupKickstartDatasByTree(tree);
+ for (KickstartData profile : profiles) {
+ createProfile(profile);
+ }
}
return null;
}
+ private void createProfile(KickstartData profile) {
+ CobblerProfileCreateCommand creator = new CobblerProfileCreateCommand(profile);
+ creator.store();
+ }
}
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileSyncCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileSyncCommand.java
index a9f8b53..7c83dc8 100644
---
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileSyncCommand.java
+++
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileSyncCommand.java
@@ -70,12 +70,10 @@ public class CobblerProfileSyncCommand extends CobblerCommand {
public ValidatorError store() {
//First are there any profiles within spacewalk that aren't within cobbler
List<KickstartData> profiles = KickstartFactory.listAllKickstartData();
-
-
Map<String, Map> profileNames = getModifiedProfileNames();
for (KickstartData profile : profiles) {
if (!profileNames.containsKey(profile.getCobblerId())) {
- if (profile.getKickstartDefaults().getKstree().getCobblerId() != null)
{
+ if (profile.getKickstartDefaults().getKstree().getCobblerId() == null)
{
log.warn("Kickstart profile " + profile.getLabel() +
" could not be synced to cobbler, due to it's
" +
"tree being unsynced. Please edit the tree url "
+
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
index 853dd7b..00b7abe 100644
---
a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
+++
b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
@@ -55,6 +55,14 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
private String kickstartHost;
private String kernelOptions;
private String postKernelOptions;
+ private String staticNetwork;
+
+ /**
+ * @param staticNetworkIn The staticNetwork to set.
+ */
+ public void setStaticNetwork(String staticNetworkIn) {
+ staticNetwork = staticNetworkIn;
+ }
/**
* Constructor
@@ -313,6 +321,10 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
if (!StringUtils.isBlank(n.getNetmask())) {
inet.put("subnet-" + n.getName(), n.getNetmask());
}
+ if (!StringUtils.isBlank(staticNetwork) &&
+ n.getName().equals(staticNetwork)) {
+ inet.put("static-" + n.getName(), Boolean.TRUE);
+ }
}
}
log.debug("Networks: " + inet);
diff --git a/java/code/src/org/cobbler/SystemRecord.java
b/java/code/src/org/cobbler/SystemRecord.java
index 32bcd50..234ad40 100644
--- a/java/code/src/org/cobbler/SystemRecord.java
+++ b/java/code/src/org/cobbler/SystemRecord.java
@@ -27,6 +27,7 @@ import java.util.Set;
*/
public class SystemRecord extends CobblerObject {
+ private static final String HOSTNAME = "hostname";
private static final String NAME_SERVERS = "name_servers";
private static final String GATEWAY = "gateway";
private static final String PROFILE = "profile";
@@ -306,7 +307,7 @@ public class SystemRecord extends CobblerObject {
/**
* @param nameServersIn the NameServers
*/
- public void setNameServers(String nameServersIn) {
+ public void setNameServers(List<String> nameServersIn) {
modify(NAME_SERVERS, nameServersIn);
}
@@ -316,4 +317,10 @@ public class SystemRecord extends CobblerObject {
public void setGateway(String gateway) {
modify(GATEWAY, gateway);
}
+ /**
+ * @param hostname the hostname
+ */
+ public void setHostName(String hostname) {
+ modify(HOSTNAME, hostname);
+ }
}
commit cd92c65cf39ec26dabf3889ad4a6d17c713e1abb
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Jul 23 16:45:51 2009 -0400
512440 - Fixed the proxies to turn SSLProxyEngine to deal with Cobbler KS files
diff --git a/web/html/applications/rhn-proxy/4.0/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/4.0/httpd/rhn_proxy.conf
index fba9c9e..4832797 100644
--- a/web/html/applications/rhn-proxy/4.0/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/4.0/httpd/rhn_proxy.conf
@@ -44,3 +44,6 @@
DefaultType text/plain
</LocationMatch>
+#Disable SSL2, left only higher
+SSLProtocol all -SSLv2
+SSLProxyEngine on
diff --git a/web/html/applications/rhn-proxy/4.1/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/4.1/httpd/rhn_proxy.conf
index fba9c9e..4832797 100644
--- a/web/html/applications/rhn-proxy/4.1/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/4.1/httpd/rhn_proxy.conf
@@ -44,3 +44,6 @@
DefaultType text/plain
</LocationMatch>
+#Disable SSL2, left only higher
+SSLProtocol all -SSLv2
+SSLProxyEngine on
diff --git a/web/html/applications/rhn-proxy/4.2/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/4.2/httpd/rhn_proxy.conf
index fba9c9e..741e2e5 100644
--- a/web/html/applications/rhn-proxy/4.2/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/4.2/httpd/rhn_proxy.conf
@@ -44,3 +44,7 @@
DefaultType text/plain
</LocationMatch>
+#Disable SSL2, left only higher
+SSLProtocol all -SSLv2
+SSLProxyEngine on
+
diff --git a/web/html/applications/rhn-proxy/5.1/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/5.1/httpd/rhn_proxy.conf
index 20fbbc1..93bf30b 100644
--- a/web/html/applications/rhn-proxy/5.1/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/5.1/httpd/rhn_proxy.conf
@@ -69,5 +69,5 @@ RewriteRule .* - [F]
#Disable SSL2, left only higher
SSLProtocol all -SSLv2
-
+SSLProxyEngine on
diff --git a/web/html/applications/rhn-proxy/5.2/httpd/rhn_proxy.conf
b/web/html/applications/rhn-proxy/5.2/httpd/rhn_proxy.conf
index 56ecec7..fe5e6eb 100644
--- a/web/html/applications/rhn-proxy/5.2/httpd/rhn_proxy.conf
+++ b/web/html/applications/rhn-proxy/5.2/httpd/rhn_proxy.conf
@@ -79,5 +79,5 @@
#Disable SSL2, left only higher
SSLProtocol all -SSLv2
-
+SSLProxyEngine on
commit c5347c63d83b4d5ad0a5146dca7d13bde98d8879
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:11:57 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.35-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 6aba9bc..220d838 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.34
+Version: 0.6.35
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -250,6 +250,11 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
+* Thu Jul 23 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.35-1
+- Sha256 support for channel creation: (pkilambi(a)redhat.com)
+- checkstyle (mmccune(a)redhat.com)
+- 512814 - unit test fix (mmccune(a)redhat.com)
+
* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.34-1
- 512814 - adding spot to add 'upgrade' logic to our startup of tomact.
(mmccune(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 20a093c..ad5d5c7 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.34-1 java/
+0.6.35-1 java/
commit a7d5a732f095a646bc473d6c7fbb54651bf0d7f7
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:09:14 2009 -0400
Automatic commit of package [spacewalk-backend] release [0.6.23-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index bdaeca6..4e89aa2 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.22
+Version: 0.6.23
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -571,6 +571,39 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Jul 23 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.23-1
+- 513432, 513435 : Our channel family import is written such that we compare
+ and resync the red hat channel families. But in iss case we can have provate
+ channel family ties to a channel ebing imported that will not match whats on
+ the slave as slaves default to org 1. This fix should only post process the
+ channel families if its a non custom one. (pkilambi(a)redhat.com)
+- reporting: add report option for listing fields for report.
+ (jpazdziora(a)redhat.com)
+- reporting: after having parsed the common options, put the rest back to
+ sys.argv. (jpazdziora(a)redhat.com)
+- reporting: show error message when unknown report is specified.
+ (jpazdziora(a)redhat.com)
+- reporting: change structure of the report definition file to also include
+ column names. (jpazdziora(a)redhat.com)
+- reporting: add channel(s) to which the server is registered.
+ (jpazdziora(a)redhat.com)
+- reporting: add number of out-of-date packages and errata.
+ (jpazdziora(a)redhat.com)
+- reporting: add kernel version to the report. (jpazdziora(a)redhat.com)
+- reporting: when report name is not specified on the command line, show list
+ of available reports. (jpazdziora(a)redhat.com)
+- reporting: move the SQL to definition file, to allow for multiple reports.
+ (jpazdziora(a)redhat.com)
+- reporting: add registration time and last check-in time.
+ (jpazdziora(a)redhat.com)
+- reporting: add the registered by information. (jpazdziora(a)redhat.com)
+- reporting: add hostname and IP address to the report. (jpazdziora(a)redhat.com)
+- reporting: output field names as the first row. (jpazdziora(a)redhat.com)
+- reporting: output formatted as csv. (jpazdziora(a)redhat.com)
+- reporting: initial prepare, execute, and fetch loop. (jpazdziora(a)redhat.com)
+- reporting: add spacewalk-report to the rpm package. (jpazdziora(a)redhat.com)
+- reporting: a stub for new script, spacewalk-report. (jpazdziora(a)redhat.com)
+
* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.22-1
- 511283 - Package compare between db and cache should see if the db is newer
than cache and only then import the content. (pkilambi(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b232b7a..bfb1562 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.22-1 backend/
+0.6.23-1 backend/
commit d478fbdfe058ee3846a798ab4b5208a63fca0c8d
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Thu Jul 23 16:07:56 2009 -0300
Automatic commit of package [osad] release [5.9.18-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 89c15b7..6ce5303 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -9,7 +9,7 @@ Group: System Environment/Daemons
License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.9.17
+Version: 5.9.18
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -240,6 +240,9 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
# $Id$
%changelog
+* Thu Jul 23 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.18-1
+- Remove Requires python-optik. (dgoodwin(a)redhat.com)
+
* Wed Jul 22 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.17-1
- Disable osad selinux for Fedora 11. (dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index 5d08fc4..7d7a99e 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.9.17-1 client/tools/osad/
+5.9.18-1 client/tools/osad/
commit c4ffe28c7bab3101f379743a13b5ab0c4166c71e
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Thu Jul 23 16:02:40 2009 -0300
Remove osad Requires python-optik.
This is only required for RHEL 4 and earlier, which is not built from
this source code.
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 621b971..89c15b7 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -17,7 +17,6 @@ BuildRequires: python-devel
Requires: python
Requires: rhnlib >= 1.8-3
Requires: jabberpy
-Requires: python-optik
# This should have been required by rhnlib
Requires: PyXML
%if "%{pythongen}" == "1.5"
commit 8c44a17c0fdf5bb35a50c6cc1e6bde9d3db0c892
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:06:33 2009 -0400
fixing descritpion on checksums
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
index 627d4ee..a788487 100644
--- a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
@@ -18,7 +18,7 @@
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5' );
insert into rhnChecksumType (id, label, description) values
(rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
insert into rhnChecksumType (id, label, description) values
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
index 0977588..a788487 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
@@ -18,9 +18,9 @@
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5' );
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'sha1', 'sha1' );
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
insert into rhnChecksumType (id, label, description) values
(rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
insert into rhnChecksumType (id, label, description) values
commit a39bf26b3a479712458f103c7e05bc58c49458e9
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 14:30:00 2009 -0400
Sha256 support for channel creation:
- Added the ablility for user to specify a yum repository checksum type at the channel
creation time.
- Added a new table lookup table called rhnChecksumType
- Added a new column to rhnChannel checksum_type_id
- Channel creation sets the checksum_type_id and stores it for further lookup for repo
generation to pick the user specified checksum.
- Edit channel page should reset the checksum_type_id value and trigger the repo
generation with new checksum type.
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
index f4ecff3..c5ac8f3 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
@@ -45,6 +45,11 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
class="com.redhat.rhn.domain.channel.ChannelArch"
column="channel_arch_id"/>
+ <many-to-one
+ name="checksum"
+ class="com.redhat.rhn.domain.common.ChecksumType"
+ column="checksum_type_id"/>
+
<set name="distChannelMaps">
<key column="channel_id"/>
<one-to-many
class="com.redhat.rhn.domain.channel.DistChannelMap"/>
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index ca5071e..9a40950 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -20,6 +20,7 @@ import
com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.manager.channel.ChannelManager;
import com.redhat.rhn.manager.system.IncompatibleArchException;
import com.redhat.rhn.manager.system.SystemManager;
@@ -50,8 +51,8 @@ public class Channel extends BaseDomainHelper implements Comparable {
public static final String PUBLIC = "public";
public static final String PROTECTED = "protected";
public static final String PRIVATE = "private";
- private static final String CHECKSUM_SHA_1 = "SHA1";
- private static final String CHECKSUM_SHA_256 = "SHA-256";
+ private static final String CHECKSUM_SHA_1 = "sha1";
+ private static final String CHECKSUM_SHA_256 = "sha-256";
private static List<String> releaseToSkipRepodata = new
ArrayList<String>(Arrays
.asList("2.1AS", "2.1ES", "2.1WS",
"3AS", "3ES", "3WS", "3Desktop", "4AS",
@@ -63,6 +64,8 @@ public class Channel extends BaseDomainHelper implements Comparable {
.asList("5Server", "5Client"));
private String baseDir;
private ChannelArch channelArch;
+ private ChecksumType checksum;
+
private String description;
private Date endOfLife;
private String GPGKeyUrl;
@@ -159,6 +162,21 @@ public class Channel extends BaseDomainHelper implements Comparable
{
public void setChannelArch(ChannelArch c) {
this.channelArch = c;
}
+
+ /**
+ * @return Returns the channelChecksum.
+ */
+ public ChecksumType getChecksum() {
+ return checksum;
+ }
+
+ /**
+ * @param checksumIn The checksum to set.
+ */
+ public void setChecksum(ChecksumType checksumIn) {
+ this.checksum = checksumIn;
+ }
+
/**
* @param compsIn The Comps to set.
@@ -798,12 +816,14 @@ public class Channel extends BaseDomainHelper implements Comparable
{
/**
* get the compatible checksum type to be used for repomd.xml
- * based on channel release. If its RHEL-5 we use sha1
- * anything newer will be sha256.
+ * based on channel release.
+ * If its a custom channel use the checksum_type_id from db set at creation time
+ * If its RHEL-5 we use sha1 anything newer will be sha256.
* @return checksumType
*/
public String getChecksumType() {
Channel toConsider = this;
+
while (toConsider.getParentChannel() != null) {
toConsider = toConsider.getParentChannel();
}
@@ -811,13 +831,16 @@ public class Channel extends BaseDomainHelper implements Comparable
{
if (channelDist != null) {
String release = channelDist.getRelease();
// If channel or parent is RHEL-5 use sha1, else use sha256
- if (toConsider.isCustom() || sha1compatiblechannels.contains(release)) {
+ if (sha1compatiblechannels.contains(release)) {
return CHECKSUM_SHA_1;
}
- else {
- return CHECKSUM_SHA_256;
- }
}
+
+ // IF its custom use the one set at channel creation time
+ if (toConsider.isCustom()) {
+ return toConsider.getChecksum().getLabel();
+ }
+
// default to sha256
return CHECKSUM_SHA_256;
}
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index aff50d6..ec8d52c 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -14,6 +14,22 @@
*/
package com.redhat.rhn.domain.channel;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.hibernate.Criteria;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.criterion.CriteriaSpecification;
+import org.hibernate.criterion.Projections;
+import org.hibernate.criterion.Restrictions;
+
import com.redhat.rhn.common.db.datasource.CallableMode;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
@@ -21,28 +37,13 @@ import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.common.db.datasource.WriteMode;
import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.common.hibernate.HibernateRuntimeException;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.kickstart.KickstartableTree;
import
com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.manager.channel.ChannelManager;
-import org.apache.log4j.Logger;
-import org.hibernate.Criteria;
-import org.hibernate.HibernateException;
-import org.hibernate.Session;
-import org.hibernate.criterion.CriteriaSpecification;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
/**
* ChannelFactory
* @version $Rev$
@@ -223,7 +224,6 @@ public class ChannelFactory extends HibernateFactory {
c.add(Restrictions.in("label", labels));
return c.list();
}
-
/**
* Returns list of channel architectures
@@ -234,7 +234,7 @@ public class ChannelFactory extends HibernateFactory {
Criteria criteria = session.createCriteria(ChannelArch.class);
return criteria.list();
}
-
+
/**
* returns a ChannelArch by label
* @param label ChannelArch label
@@ -530,7 +530,27 @@ public class ChannelFactory extends HibernateFactory {
"KickstartableTree.findTreesForChannel", params);
}
-
+ /**
+ * Find yum supported checksum types
+ * @return List of ChecksumTypes instances
+ */
+ public static List<ChecksumType> listYumSupportedChecksums() {
+ return singleton.listObjectsByNamedQuery(
+ "ChecksumType.loadAllForYum", Collections.EMPTY_MAP);
+ }
+
+ /**
+ * Find checksumtype by label
+ * @param checksum checksum label
+ * @return ChecksumType instance for given label
+ */
+ public static ChecksumType findChecksumByLabel(String checksum) {
+ Map params = new HashMap();
+ params.put("label", checksum);
+ return (ChecksumType)
+ singleton.lookupObjectByNamedQuery("ChecksumType.findByLabel",
params);
+ }
+
/**
* Get a list of packages ids that are in a channel
* and in a list of errata. (The errata do not
diff --git a/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
b/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
index a9e9f24..fe901d9 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
@@ -22,6 +22,7 @@ import com.redhat.rhn.domain.channel.ChannelFamily;
import com.redhat.rhn.domain.channel.ChannelFamilyFactory;
import com.redhat.rhn.domain.channel.ClonedChannel;
import com.redhat.rhn.domain.channel.ProductName;
+import com.redhat.rhn.domain.common.ChecksumType;
import
com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.rhnpackage.test.PackageTest;
@@ -382,7 +383,22 @@ public class ChannelFactoryTest extends RhnBaseTestCase {
fileNameChild);
assertNotNull(lookedUpChild);
assertEquals(cp.getId(), lookedUpChild.getId());
+
+ }
+
+ public void testfindChecksumByLabel() {
+ assertNull("Checksum found for null label",
+ ChannelFactory.findChecksumByLabel(null));
+ assertNull("Checksum found for invalid label",
+ ChannelFactory.findChecksumByLabel("some-invalid_checksum"));
+ ChecksumType ct = ChannelFactory.findChecksumByLabel("sha-256");
+ assertNotNull(ct);
+ assertEquals("sha-256", ct.getLabel());
+ ChecksumType ct2 = ChannelFactory.findChecksumByLabel("sha1");
+ assertNotNull(ct2);
+ assertEquals("sha1", ct2.getLabel());
}
+
}
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
new file mode 100644
index 0000000..dea8be7
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="com.redhat.rhn.domain.common.ChecksumType"
+ table="rhnChecksumType" mutable="false">
+ <cache usage="read-only"/>
+ <id name="id" type="long" column="id">
+ <meta attribute="scope-set">protected</meta>
+ <generator class="assigned" />
+ </id>
+ <property name="label" type="string"
column="label" />
+ <property name="description" type="string"
column="description" />
+ <property name="created" type="date"
column="created" />
+ <property name="modified" type="date"
column="modified" />
+ </class>
+
+ <query name="ChecksumType.loadAll">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType]]>
+ </query>
+ <query name="ChecksumType.loadAllForYum">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t
+ where t.label = 'sha-256' or t.label = 'sha1']]>
+ </query>
+ <query name="ChecksumType.findById">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t where t.id =
:id]]>
+ </query>
+ <query name="ChecksumType.findByLabel">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t where t.label =
:label]]>
+ </query>
+</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
new file mode 100644
index 0000000..3e41435
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.common;
+
+import com.redhat.rhn.domain.BaseDomainHelper;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * ArchType
+ * @version $Rev$
+ */
+public class ChecksumType extends BaseDomainHelper {
+
+ private Long id;
+ private String label;
+ private String description;
+
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * @param i The id to set.
+ */
+ public void setId(Long i) {
+ this.id = i;
+ }
+
+ /**
+ * @return Returns the label.
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @param l The label to set.
+ */
+ public void setLabel(String l) {
+ this.label = l;
+ }
+
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param n The name to set.
+ */
+ public void setDescription(String n) {
+ this.description = n;
+ }
+
+ /** {@inheritDoc} */
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ ChecksumType checksumType = (ChecksumType) o;
+
+ if (id != null ? !id.equals(checksumType.id) : checksumType.id != null) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ public int hashCode() {
+ return id != null ? id.hashCode() : 0;
+ }
+
+ /** {@inheritDoc} */
+ public String toString() {
+ ToStringBuilder builder = new ToStringBuilder(this);
+
+ builder.append("id", id);
+ builder.append("label", label);
+
+ return builder.toString();
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
b/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
new file mode 100644
index 0000000..a0fd478
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.common.test;
+
+import com.redhat.rhn.domain.common.ChecksumType;
+import com.redhat.rhn.testing.RhnBaseTestCase;
+import com.redhat.rhn.testing.TestUtils;
+
+/**
+ * ArchTypeTest
+ * @version $Rev$
+ */
+public class ChecksumTypeTest extends RhnBaseTestCase {
+
+ public void testChecksumType() throws Exception {
+
+ Long testid = new Long(1);
+ String query = "ChecksumType.findById";
+
+ ChecksumType at1 = (ChecksumType) TestUtils.lookupFromCacheById(testid, query);
+ assertNotNull(at1);
+ assertEquals(at1.getId(), testid);
+
+ ChecksumType at2 = (ChecksumType) TestUtils.lookupFromCacheById(at1.getId(),
query);
+ assertEquals(at1.getLabel(), at2.getLabel());
+
+ ChecksumType at3 = (ChecksumType) TestUtils.lookupFromCacheById(at1.getId(),
query);
+ }
+
+}
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
index 929dfc2..09d500e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
@@ -14,6 +14,24 @@
*/
package com.redhat.rhn.frontend.action.channel.manage;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.DynaActionForm;
+
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.security.PermissionException;
@@ -41,24 +59,6 @@ import com.redhat.rhn.manager.channel.UpdateChannelCommand;
import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.manager.user.UserManager;
-import org.apache.struts.action.ActionErrors;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionMessage;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.action.DynaActionForm;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
/**
* EditChannelAction
@@ -158,6 +158,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
request.setAttribute("channel_name",
form.getString("name"));
request.setAttribute("channel_arch",
form.get("arch_name"));
request.setAttribute("channel_arch_label",
form.get("arch"));
+ request.setAttribute("checksum_label",
form.get("checksum"));
addErrors(request, errors);
prepDropdowns(new RequestContext(request));
return getStrutsDelegate().forwardParams(
@@ -197,6 +198,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
request.setAttribute("label", form.get("label"));
request.setAttribute("parent", form.get("parent"));
request.setAttribute("arch", form.get("arch"));
+ request.setAttribute("checksum", form.get("checksum"));
request.setAttribute("arch_name", form.get("arch_name"));
request.setAttribute("summary", form.get("summary"));
request.setAttribute("description",
form.get("description"));
@@ -319,6 +321,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
// times where python would make this SOOOO much easier.
UpdateChannelCommand ucc = new UpdateChannelCommand();
ucc.setArchLabel((String)form.get("arch"));
+ ucc.setChecksum((String)form.get("checksum"));
ucc.setLabel((String)form.get("label"));
ucc.setName((String)form.get("name"));
ucc.setSummary((String)form.get("summary"));
@@ -388,6 +391,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
// times where python would make this SOOOO much easier.
CreateChannelCommand ccc = new CreateChannelCommand();
ccc.setArchLabel((String)form.get("arch"));
+ ccc.setChecksum((String)form.get("checksum"));
ccc.setLabel((String)form.get("label"));
ccc.setName((String)form.get("name"));
ccc.setSummary((String)form.get("summary"));
@@ -546,6 +550,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
form.set("maintainer_phone", c.getMaintainerPhone());
form.set("maintainer_email", c.getMaintainerEmail());
form.set("support_policy", c.getSupportPolicy());
+ form.set("checksum", c.getChecksum().getLabel());
if (c.isGloballySubscribable(ctx.getLoggedInUser().getOrg())) {
form.set("per_user_subscriptions", "all");
}
@@ -569,6 +574,7 @@ public class EditChannelAction extends RhnAction implements Listable
{
request.setAttribute("channel_name", c.getName());
request.setAttribute("channel_arch",
c.getChannelArch().getName());
request.setAttribute("channel_arch_label",
c.getChannelArch().getLabel());
+
}
else {
// default settings
@@ -601,6 +607,10 @@ public class EditChannelAction extends RhnAction implements Listable
{
addOption(channelArches, arch.getName(), arch.getLabel());
}
ctx.getRequest().setAttribute("channelArches", channelArches);
+ // set the list of yum supported checksums
+ ctx.getRequest().setAttribute("checksums",
+ ChannelFactory.listYumSupportedChecksums());
+
}
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index aab7a1f..af98b30 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -20940,6 +20940,21 @@ given channel.</source>
<context
context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="channel.edit.jsp.checksum">
+ <source>Yum Repository Checksum Type</source>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="channel.edit.jsp.checksumtip">
+ <source><strong> Tip:</strong>
+ sha1 offers the widest compatibility with clients. sha-256 offers higher
security,
+ but is compatible only with newer clients: Fedora 11 and newer, or Enterprise
Linux 6 and newer.
+ </source>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="channel.edit.jsp.summary">
<source>Channel Summary</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
b/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
index 0b94bfe..a078105 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.manager.channel;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelArch;
import com.redhat.rhn.domain.channel.ChannelFactory;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
@@ -62,6 +63,9 @@ public class CreateChannelCommand {
protected String gpgKeyUrl;
protected String gpgKeyId;
protected String gpgKeyFp;
+ protected String checksum;
+
+
protected String maintainerName;
protected String maintainerEmail;
protected String maintainerPhone;
@@ -77,6 +81,7 @@ public class CreateChannelCommand {
name = null;
summary = null;
archLabel = null;
+ checksum = null;
parentLabel = null;
parentId = null;
}
@@ -103,6 +108,13 @@ public class CreateChannelCommand {
}
/**
+ * @param checksumIn The name to set.
+ */
+ public void setChecksum(String checksumIn) {
+ this.checksum = checksumIn;
+ }
+
+ /**
* @param parentLabelIn The parentLabel to set.
*/
public void setParentLabel(String parentLabelIn) {
@@ -239,6 +251,9 @@ public class CreateChannelCommand {
throw new IllegalArgumentException("Invalid architecture label");
}
+ ChecksumType ct = ChannelFactory.findChecksumByLabel(checksum);
+
+
Channel c = ChannelFactory.createChannel();
c.setLabel(label);
c.setName(name);
@@ -247,6 +262,7 @@ public class CreateChannelCommand {
c.setOrg(user.getOrg());
c.setBaseDir("/dev/null");
c.setChannelArch(ca);
+ c.setChecksum(ct);
c.setGPGKeyId(gpgKeyId);
c.setGPGKeyUrl(gpgKeyUrl);
c.setGPGKeyFp(gpgKeyFp);
diff --git a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
index 576fcc9..6447deb 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.manager.channel;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelNameException;
import com.redhat.rhn.frontend.xmlrpc.InvalidParentChannelException;
@@ -63,6 +64,15 @@ public class UpdateChannelCommand extends CreateChannelCommand {
if (ChannelFactory.findArchByLabel(archLabel) == null) {
throw new IllegalArgumentException("Invalid architecture label");
}
+
+ ChecksumType ct = ChannelFactory.findChecksumByLabel(checksum);
+
+ if (!ct.getLabel().equals(c.getChecksum().getLabel()) &&
c.getPackageCount() > 0) {
+ // schedule repo re generation if the checksum type changed
+ // and the channel has packages
+ ChannelManager.queueChannelChange(c.getLabel(),
+ "java::updateChannelCommon", null);
+ }
c.setName(name);
c.setSummary(summary);
@@ -72,6 +82,7 @@ public class UpdateChannelCommand extends CreateChannelCommand {
c.setGPGKeyId(gpgKeyId);
c.setGPGKeyUrl(gpgKeyUrl);
c.setGPGKeyFp(gpgKeyFp);
+ c.setChecksum(ct);
c.setAccess(access);
c.setMaintainerName(maintainerName);
c.setMaintainerEmail(maintainerEmail);
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
index a29ff41..bbcffad 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
@@ -27,6 +27,7 @@ public class RepomdIndexData {
private String openChecksum;
private Date timestamp;
private String type;
+
/**
*
@@ -53,12 +54,7 @@ public class RepomdIndexData {
* @param typeIn checksum type
*/
public void setType(String typeIn) {
- if (typeIn == "SHA1") {
- this.type = "sha";
- }
- else if (typeIn == "SHA-256") {
- this.type = "sha256";
- }
+ this.type = typeIn;
}
/**
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index ab91812..37ba643 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -56,6 +56,7 @@ public class RepositoryWriter {
private String pathPrefix;
private String mountPoint;
private String checksumtype;
+ private String checksumname;
/**
* Constructor takes in pathprefix and mountpoint
@@ -105,6 +106,9 @@ public class RepositoryWriter {
// Get compatible checksumType
this.checksumtype = channel.getChecksumType();
+ this.checksumname = channel.getChecksum().getDescription();
+
+ log.info("Checksum Type Value" + this.checksumtype);
try {
primaryFile = new CompressingDigestOutputWriter(
@@ -177,18 +181,28 @@ public class RepositoryWriter {
log.info("Starting updateinfo generation for '" +
channel.getLabel() +
'"');
+ log.info("Checksum Type Value for generate updateinfo" +
this.checksumtype);
RepomdIndexData updateinfoData = generateUpdateinfo(channel, prefix,
this.checksumtype);
RepomdIndexData groupsData = loadCompsFile(channel);
-
+
//Set the type so yum can read and perform checksum
- primaryData.setType(this.checksumtype);
- filelistsData.setType(this.checksumtype);
- otherData.setType(this.checksumtype);
- updateinfoData.setType(this.checksumtype);
- groupsData.setType(this.checksumtype);
-
+ primaryData.setType(this.checksumname);
+ filelistsData.setType(this.checksumname);
+ otherData.setType(this.checksumname);
+ if (updateinfoData != null) {
+ updateinfoData.setType(this.checksumname);
+ }
+
+ if (groupsData != null) {
+ groupsData.setType(this.checksumname);
+ }
+
+ log.info("Primary xml's type" + primaryData.getType());
+ log.info("filelists xml's type" + filelistsData.getType());
+ log.info("other xml's type" + otherData.getType());
+
FileWriter indexFile;
try {
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
b/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
index d7c45e4..57ff58a 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
@@ -93,6 +93,19 @@
</tr>
<tr>
<th nowrap="nowrap">
+ <bean:message key="channel.edit.jsp.checksum"/>:
+ </th>
+ <td class="small-form">
+ <html:select property="checksum">
+ <html:options collection="checksums"
+ property="label"
+ labelProperty="label" />
+ </html:select><br/>
+ <span class="small-text"><bean:message
key="channel.edit.jsp.checksumtip"/></span>
+ </td>
+ </tr>
+ <tr>
+ <th nowrap="nowrap">
<rhn:required-field key="channel.edit.jsp.summary"/>:
</th>
<td class="small-form">
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index a7966a9..daa9e20 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -842,6 +842,7 @@
<form-property name="gpg_key_url"
type="java.lang.String" />
<form-property name="gpg_key_id"
type="java.lang.String" />
<form-property name="gpg_key_fingerprint"
type="java.lang.String" />
+ <form-property name="checksum" type="java.lang.String"
/>
</form-bean>
<form-bean name="channelDeleteForm"
diff --git a/schema/spacewalk/rhnsat/tables/rhnChannel.sql
b/schema/spacewalk/rhnsat/tables/rhnChannel.sql
index 95a54dc..b4e1fab 100644
--- a/schema/spacewalk/rhnsat/tables/rhnChannel.sql
+++ b/schema/spacewalk/rhnsat/tables/rhnChannel.sql
@@ -49,6 +49,8 @@ rhnChannel
gpg_key_id varchar2(14),
gpg_key_fp varchar2(50),
end_of_life date,
+ checksum_type_id number constraint rhn_channel_checksum_fk
+ references rhnChecksumType(id),
receiving_updates char(1)
default 'Y'
constraint rhn_channel_ru_nn not null
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql
b/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql
new file mode 100644
index 0000000..8d88905
--- /dev/null
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql
@@ -0,0 +1,44 @@
+create sequence rhn_checksum_id_seq;
+
+create table
+rhnChecksumType
+(
+ id number
+ constraint rhn_checksumtype_id_nn not null,
+ label varchar2(32)
+ constraint rhn_checksumtype_label_nn not null,
+ description varchar2(64)
+ constraint rhn_checksumtype_desc_nn not null,
+ created date default(sysdate)
+ constraint rhn_checksumtype_creat_nn not null,
+ modified date default(sysdate)
+ constraint rhn_checksumtype_mod_nn not null
+)
+ enable row movement
+ ;
+
+create index rhn_checksumtype_label_id_idx
+ on rhnChecksumType( label, id )
+ tablespace [[64k_tbs]]
+ ;
+alter table rhnChecksumType add constraint rhn_checksumtype_id_pk
+ primary key ( id );
+alter table rhnChecksumType add constraint rhn_checksumtype_label_uq
+ unique ( label );
+
+create or replace trigger
+rhn_checksumtype_mod_trig
+before insert or update on rhnChecksumType
+for each row
+begin
+ :new.modified := sysdate;
+end;
+/
+show errors
+
+--
+--
+-- Revision 1.1 2009/06/26 10:39:17 pkilambi
+-- add schema to hold checksum types
+--
+
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
new file mode 100644
index 0000000..627d4ee
--- /dev/null
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
@@ -0,0 +1,37 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-384', 'sha384' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-512', 'sha512' );
+
+commit;
+
+--
+--
+-- Revision 1.1 2009/06/26 11:00:17 pkilambi
+--
+
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
new file mode 100644
index 0000000..8d88905
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
@@ -0,0 +1,44 @@
+create sequence rhn_checksum_id_seq;
+
+create table
+rhnChecksumType
+(
+ id number
+ constraint rhn_checksumtype_id_nn not null,
+ label varchar2(32)
+ constraint rhn_checksumtype_label_nn not null,
+ description varchar2(64)
+ constraint rhn_checksumtype_desc_nn not null,
+ created date default(sysdate)
+ constraint rhn_checksumtype_creat_nn not null,
+ modified date default(sysdate)
+ constraint rhn_checksumtype_mod_nn not null
+)
+ enable row movement
+ ;
+
+create index rhn_checksumtype_label_id_idx
+ on rhnChecksumType( label, id )
+ tablespace [[64k_tbs]]
+ ;
+alter table rhnChecksumType add constraint rhn_checksumtype_id_pk
+ primary key ( id );
+alter table rhnChecksumType add constraint rhn_checksumtype_label_uq
+ unique ( label );
+
+create or replace trigger
+rhn_checksumtype_mod_trig
+before insert or update on rhnChecksumType
+for each row
+begin
+ :new.modified := sysdate;
+end;
+/
+show errors
+
+--
+--
+-- Revision 1.1 2009/06/26 10:39:17 pkilambi
+-- add schema to hold checksum types
+--
+
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
new file mode 100644
index 0000000..0977588
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
@@ -0,0 +1,37 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha1' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-384', 'sha384' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-512', 'sha512' );
+
+commit;
+
+--
+--
+-- Revision 1.1 2009/06/26 11:00:17 pkilambi
+--
+
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
new file mode 100644
index 0000000..8842689
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
@@ -0,0 +1,7 @@
+-- Add a checksum_type_id column, and fk to rhnChecksumType
+ALTER TABLE rhnChannel
+ ADD checksum_type_id number
+CONSTRAINT rhn_channel_checksum_fk
+ REFERENCES rhnChecksumType(id);
+
+show errors
commit c88ce52e8cd8761c66ac236ee415b539fa5a9a00
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 14:21:11 2009 -0400
513432, 513435 : Our channel family import is written such that we compare and resync
the red hat channel families. But in iss case we can have provate channel family ties to a
channel ebing imported that will not match whats on the slave as slaves default to org 1.
This fix should only post process the channel families if its a non custom one.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index fdb737d..39d65f9 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -905,6 +905,11 @@ class Backend:
cf_ids = []
c_ids = []
for cf in channel_families:
+ if 'private-channel-family' in cf['label']:
+ # Its a private channel family and channel family members
+ # will be different from server as this is most likely ISS
+ # sync. Don't compare and delete custom channel families.
+ continue
for cid in cf['channel_ids']:
# Look up channel families for this channel
h_lookup_cfid.execute(channel_id=cid)
commit 4b2827e870092406211fa3b2d6a667c9f050775c
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Thu Jul 23 13:19:31 2009 -0300
508187 - Fix jabberd configs on x86_64.
Hardcoded /usr/lib/jabberd/ in the jabber config files we drop into
place during spacewalk-setup was breaking for x86_64, which should be
lib64. Added a new macro to our copy of the config files and populate it
during setup.
diff --git a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml
b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml
index ba1aa82..8b76c1a 100644
--- a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml
+++ b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml
@@ -318,7 +318,7 @@
<!-- Authentication/registration database configuration -->
<authreg>
<!-- Dynamic authreg modules path -->
- <path>/usr/lib/jabberd</path>
+ <path>@@jabberDOTlibdir@@</path>
<!-- Backend module to use -->
<module>db</module>
diff --git a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml
b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml
index 4b95480..6b9bb1f 100644
--- a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml
+++ b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml
@@ -69,7 +69,7 @@
<!-- Storage database configuration -->
<storage>
<!-- Dynamic storage modules path -->
- <path>/usr/lib/jabberd</path>
+ <path>@@jabberDOTlibdir@@</path>
<!-- By default, we use the MySQL driver for all storage -->
<driver>db</driver>
@@ -326,7 +326,7 @@
doing. -->
<modules>
<!-- Dynamic sm modules path -->
- <path>/usr/lib/jabberd</path>
+ <path>@@jabberDOTlibdir@@</path>
<!-- sess-start. The modules in this chain are called when a session
is first started (usually on request by c2s as part of the
diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup
index 7a00825..7695584 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -947,6 +947,12 @@ sub populate_initial_configs {
my %nls_database_paramaters = Spacewalk::Setup::get_nls_database_parameters($answers);
+ # Check where jabberd's lib dir is, can vary on x86_64:
+ my $jabberdLibDir = "/usr/lib/jabberd/";
+ if (-d "/usr/lib64/jabberd/") {
+ $jabberdLibDir = "/usr/lib64/jabberd";
+ }
+
my %config_opts =
(
mount_point => $answers->{'mount-point'} || '/var/satellite',
@@ -968,6 +974,7 @@ sub populate_initial_configs {
db_port => $answers->{'db-port'},
traceback_mail => $answers->{'admin-email'},
jabberDOTusername => 'rhn-dispatcher-sat',
+ jabberDOTlibdir => $jabberdLibDir,
jabberDOTpassword => 'rhn-dispatcher-' . random_password(6),
serverDOTsatelliteDOTca_chain => '/usr/share/rhn/RHNS-CA-CERT',
serverDOTnls_lang => 'english.' .
$nls_database_paramaters{NLS_CHARACTERSET},
commit 2ca6f67619b97d015b693a31c75c938902ccb71f
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Jul 23 17:14:26 2009 +0200
512457 - remove xml-commons-apis before rhel-4 upgrade
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index 18b4d41..74c5b6e 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -535,6 +535,9 @@ sub remove_obsoleted_packages {
my @pkgs = ('rhn-apache', 'rhn-modpython', 'rhn-modssl',
'rhn-modperl',
'perl-libapreq', 'bouncycastle-jdk1.4',
'quartz-oracle', 'jaf', 'jta');
+ # If we're about to install xml-commons-jaxp-apis from ISO (on RHEL-4), we need to
+ # remove xml-commons-apis first (dependency problems).
+ push(@pkgs, 'xml-commons-apis') if
glob('Satellite/xml-commons-jaxp-apis*');
for my $pkg (@pkgs) {
if (system_debug('rpm', '-q', $pkg) == 0) {
system_debug('rpm', '-ev', '--nodeps', $pkg);
commit 6b8b2c0244ca26abc28cb665b97c24da72006643
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 16:54:28 2009 +0200
reporting: add report option for listing fields for report.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index c0aa875..48c1357 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -26,6 +26,7 @@ def systemExit(code, msgs=None):
try:
import os
import csv
+ from optparse import Option, OptionParser
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
@@ -47,10 +48,6 @@ except KeyboardInterrupt:
def processCommandline():
""" process the commandline """
- try:
- from optparse import Option, OptionParser
- except KeyboardInterrupt:
- systemExit(-1, "\nUser interrupted process.")
optionsTable = [
Option('--db', action='store', type="string",
help='alternative database string (username/password@sid);' \
@@ -67,19 +64,43 @@ def processCommandline():
return options
+def processCommandlineReport(report):
+ """ process the commandline options for one report """
+
+ optionsTable = [
+ Option('--fields', action='store_true',
+ help='show fields of the report'),
+ ]
+ optionParserReport = OptionParser(
+ usage="options for report %s" % report,
+ option_list=optionsTable,
+ )
+ options, args = optionParserReport.parse_args()
+
+ return options
+
if __name__ == '__main__':
options = processCommandline()
try:
if len(sys.argv) > 1:
- initCFG('server')
- rhnSQL.initDB(options.db)
+ report_name = sys.argv[1]
+ report_options = processCommandlineReport(report_name)
try:
- report = reports.report(sys.argv[1])
+ report = reports.report(report_name)
except(reports.spacewalk_unknown_report):
- systemExit(-4, 'Unknown report [%s].' % sys.argv[1])
+ systemExit(-4, 'Unknown report [%s].' % report_name)
+
+ if report_options.fields:
+ for c in report.columns:
+ print c
+ sys.exit(0)
+
+ initCFG('server')
+ rhnSQL.initDB(options.db)
+
writer = csv.writer(sys.stdout)
h = rhnSQL.prepare(report.sql)
commit ef07ee5b797ffa6f038580c0a207aa4a53851cee
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 16:01:50 2009 +0200
reporting: after having parsed the common options, put the rest back to sys.argv.
Note that we use disable_interspersed_args() so that the report
name and any repo-specific parameters are still unprocessed.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 973f5f0..c0aa875 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -63,6 +63,8 @@ def processCommandline():
optionParser.disable_interspersed_args()
options, args = optionParser.parse_args()
+ sys.argv[1:] = args
+
return options
commit 216c7bebb1f1cb2d00b210dfdda04491feda051b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 15:59:46 2009 +0200
reporting: show error message when unknown report is specified.
diff --git a/backend/satellite_tools/reports.py b/backend/satellite_tools/reports.py
index a8afd2c..b584347 100644
--- a/backend/satellite_tools/reports.py
+++ b/backend/satellite_tools/reports.py
@@ -15,7 +15,10 @@ class report:
self._load(full_path)
def _load(self, full_path):
- fd = open(full_path, 'r')
+ try:
+ fd = open(full_path, 'r')
+ except (IOError):
+ raise spacewalk_unknown_report
tag = None
value = ''
re_comment = re.compile('^\s*#')
@@ -48,6 +51,9 @@ class report:
raise spacewalk_report_unknown_tag_exception(tag)
+class spacewalk_unknown_report(Exception):
+ pass
+
class spacewalk_report_unknown_tag_exception(Exception):
pass
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 80f0386..973f5f0 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -74,7 +74,10 @@ if __name__ == '__main__':
initCFG('server')
rhnSQL.initDB(options.db)
- report = reports.report(sys.argv[1])
+ try:
+ report = reports.report(sys.argv[1])
+ except(reports.spacewalk_unknown_report):
+ systemExit(-4, 'Unknown report [%s].' % sys.argv[1])
writer = csv.writer(sys.stdout)
h = rhnSQL.prepare(report.sql)
commit 792cb55228151f56d1846bffffb22ddaa83270ad
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 15:19:47 2009 +0200
reporting: change structure of the report definition file to also include column
names.
This is also used to check that the report definition matches
with column names returned by the query.
diff --git a/backend/satellite_tools/reports.py b/backend/satellite_tools/reports.py
index b82b7ac..a8afd2c 100644
--- a/backend/satellite_tools/reports.py
+++ b/backend/satellite_tools/reports.py
@@ -1,5 +1,6 @@
import os
+import re
REPORT_DEFINITIONS = "/usr/share/spacewalk/reports/data"
@@ -9,6 +10,44 @@ def available_reports():
class report:
def __init__(self, name):
full_path = os.path.join(REPORT_DEFINITIONS, name)
+ self.sql = None
+ self.columns = None
+ self._load(full_path)
+
+ def _load(self, full_path):
fd = open(full_path, 'r')
- self.sql = fd.read()
+ tag = None
+ value = ''
+ re_comment = re.compile('^\s*#')
+ re_tag_name = re.compile('^(\S+):\s*$')
+
+ for line in fd:
+ result = re_comment.match(line)
+ if result != None:
+ continue
+
+ result = re_tag_name.match(line)
+ if result != None:
+ if tag != None:
+ self._set(tag, value)
+ tag = None
+ value = ''
+ tag = result.group(1)
+ else:
+ value += line
+
+ if tag != None:
+ self._set(tag, value)
+
+ def _set(self, tag, value):
+ if tag == 'columns':
+ self.columns = filter(lambda x: x != '', re.split('\s+', value))
+ elif tag == 'sql':
+ self.sql = value
+ else:
+ raise spacewalk_report_unknown_tag_exception(tag)
+
+
+class spacewalk_report_unknown_tag_exception(Exception):
+ pass
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index e3559b5..1921ccb 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -1,4 +1,20 @@
-
+
+columns:
+
+ server_id
+ profile_name
+ hostname
+ ip_address
+ registered_by
+ registration_time
+ last_checkin_time
+ kernel_version
+ packages_out_of_date
+ errata_out_of_date
+ software_channel
+
+sql:
+
select rhnserver.id as server_id, rhnserver.name as profile_name,
rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 8b16eed..80f0386 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -79,7 +79,13 @@ if __name__ == '__main__':
h = rhnSQL.prepare(report.sql)
h.execute()
- writer.writerow(map(lambda x: x[0].lower(), h.description))
+
+ db_columns = map(lambda x: x[0].lower(), h.description)
+ if db_columns != report.columns:
+ systemExit(-3, \
+ "Columns in report spec and in the database do not match:\nexpected %s\n
got %s" % ( report.columns, db_columns ))
+ writer.writerow(report.columns)
+
row = h.fetchone()
while row != None:
writer.writerow(row)
commit 552f13cf0d75d8bb6dff2461825863291ff023c5
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 14:55:03 2009 +0200
reporting: add channel(s) to which the server is registered.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 304a70b..e3559b5 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -8,7 +8,8 @@
( select count(distinct rhnpackage.name_id) from rhnpackage,
rhnserverneededpackagecache
where rhnserver.id = rhnserverneededpackagecache.server_id
and rhnserverneededpackagecache.package_id = rhnpackage.id ) as
packages_out_of_date,
- ( select count(*) from rhnServerErrataTypeView where rhnserver.id = server_id ) as
errata_out_of_date
+ ( select count(*) from rhnServerErrataTypeView where rhnserver.id = server_id ) as
errata_out_of_date,
+ rhnchannel.name as software_channel
from rhnserver,
(
select server_id, hostname, ipaddr
@@ -18,7 +19,10 @@
from rhnservernetwork
group by server_id
)
- ) rhnservernetwork
+ ) rhnservernetwork,
+ rhnserverchannel, rhnchannel
where rhnserver.id = rhnservernetwork.server_id (+)
- order by server_id
+ and rhnserver.id = rhnserverchannel.server_id (+)
+ and rhnserverchannel.channel_id = rhnchannel.id (+)
+ order by server_id, rhnchannel.parent_channel nulls first, rhnchannel.id
commit d601eb82e67ca34a7ba8a784cfcf43f3c9cb5d93
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 14:50:26 2009 +0200
reporting: add number of out-of-date packages and errata.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 2483419..304a70b 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -4,7 +4,11 @@
( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time,
- running_kernel as kernel_version
+ running_kernel as kernel_version,
+ ( select count(distinct rhnpackage.name_id) from rhnpackage,
rhnserverneededpackagecache
+ where rhnserver.id = rhnserverneededpackagecache.server_id
+ and rhnserverneededpackagecache.package_id = rhnpackage.id ) as
packages_out_of_date,
+ ( select count(*) from rhnServerErrataTypeView where rhnserver.id = server_id ) as
errata_out_of_date
from rhnserver,
(
select server_id, hostname, ipaddr
commit f80bc201023ff87ef282c723e640377ae4f8df0f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 14:49:25 2009 +0200
reporting: add kernel version to the report.
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
index 3d33ad5..2483419 100755
--- a/backend/satellite_tools/reports/data/inventory
+++ b/backend/satellite_tools/reports/data/inventory
@@ -3,7 +3,8 @@
rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
- ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time
+ ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time,
+ running_kernel as kernel_version
from rhnserver,
(
select server_id, hostname, ipaddr
commit 0b64232669032fbe2c2682661c2a60f42dab341c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 14:45:55 2009 +0200
reporting: when report name is not specified on the command line, show list of
available reports.
diff --git a/backend/satellite_tools/reports.py b/backend/satellite_tools/reports.py
index d0e7ae6..b82b7ac 100644
--- a/backend/satellite_tools/reports.py
+++ b/backend/satellite_tools/reports.py
@@ -3,6 +3,9 @@ import os
REPORT_DEFINITIONS = "/usr/share/spacewalk/reports/data"
+def available_reports():
+ return os.listdir(REPORT_DEFINITIONS)
+
class report:
def __init__(self, name):
full_path = os.path.join(REPORT_DEFINITIONS, name)
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 216d52a..8b16eed 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -57,7 +57,9 @@ def processCommandline():
+ ' default is default_db from /etc/rhn/rhn.conf'),
]
- optionParser = OptionParser(option_list=optionsTable)
+ optionParser = OptionParser( \
+ usage="usage: %s [options] [report_name [report_options]]" % sys.argv[0], \
+ option_list=optionsTable)
optionParser.disable_interspersed_args()
options, args = optionParser.parse_args()
@@ -68,19 +70,23 @@ if __name__ == '__main__':
options = processCommandline()
try:
- initCFG('server')
- rhnSQL.initDB(options.db)
-
- report = reports.report(sys.argv[1])
- writer = csv.writer(sys.stdout)
-
- h = rhnSQL.prepare(report.sql)
- h.execute()
- writer.writerow(map(lambda x: x[0].lower(), h.description))
- row = h.fetchone()
- while row != None:
- writer.writerow(row)
+ if len(sys.argv) > 1:
+ initCFG('server')
+ rhnSQL.initDB(options.db)
+
+ report = reports.report(sys.argv[1])
+ writer = csv.writer(sys.stdout)
+
+ h = rhnSQL.prepare(report.sql)
+ h.execute()
+ writer.writerow(map(lambda x: x[0].lower(), h.description))
row = h.fetchone()
+ while row != None:
+ writer.writerow(row)
+ row = h.fetchone()
+ else:
+ for r in reports.available_reports():
+ print r
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
commit 8b5b5c0e4fff24c28aae8687d2d45bbaf7d9655d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 14:44:18 2009 +0200
493060 - do not send email "RHN Monitoring Scout started" by default
diff --git a/monitoring/SatConfig/bootstrap/npBootstrap.pl
b/monitoring/SatConfig/bootstrap/npBootstrap.pl
index 3f30888..2b73df3 100755
--- a/monitoring/SatConfig/bootstrap/npBootstrap.pl
+++ b/monitoring/SatConfig/bootstrap/npBootstrap.pl
@@ -23,6 +23,7 @@ my $soapbox = new
NOCpulse::Gritch('/var/lib/nocpulse/npBootstrap.db');
# get the scout_shared_key formt he /etc/rhn/cluster.ini file
my $cluster_config = NOCpulse::Config->new('/etc/rhn/cluster.ini');
my $ssk=$cluster_config->get('', 'scoutsharedkey');
+my $notify_scout_start = $cluster_config->get('',
'notify_scout_start');
my $gritchMsg;
if (!$ssk) {
@@ -106,7 +107,7 @@ if ($res->is_success) {
unlink($llnsFile);
}
# Send notification that the sat may have been rebooted.
- $soapbox->gritch('RHN Monitoring Scout started', $gritchMsg);
+ $soapbox->gritch('RHN Monitoring Scout started', $gritchMsg) if
($notify_scout_start);
} else {
# Send notification that the sat may have been rebooted.
diff --git a/proxy/installer/cluster.ini b/proxy/installer/cluster.ini
index 5cb0ec1..d4563e3 100644
--- a/proxy/installer/cluster.ini
+++ b/proxy/installer/cluster.ini
@@ -6,3 +6,4 @@ smontestaddr=${session.rhn_monitoring_parent_ip}
smontestfqdn=${session.rhn_monitoring_parent}
scoutsharedkey=${session.scout_shared_key}
PhysNode.1.exists=1
+notify_scout_start=0
diff --git a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini
b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini
index 203d5ff..68376d4 100644
--- a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini
+++ b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini
@@ -9,3 +9,4 @@ smontestaddr=@@monitoringDOTsmonDOTtestaddr@@
smontestfqdn=@@monitoringDOTsmonDOTtestfqdn@@
scoutsharedkey=@@monitoringDOTscout_shared_key@@
PhysNode.1.exists=1
+notify_scout_start=0
diff --git a/web/html/applications/rhn-proxy/5.3/cluster.ini
b/web/html/applications/rhn-proxy/5.3/cluster.ini
index 5cb0ec1..d4563e3 100644
--- a/web/html/applications/rhn-proxy/5.3/cluster.ini
+++ b/web/html/applications/rhn-proxy/5.3/cluster.ini
@@ -6,3 +6,4 @@ smontestaddr=${session.rhn_monitoring_parent_ip}
smontestfqdn=${session.rhn_monitoring_parent}
scoutsharedkey=${session.scout_shared_key}
PhysNode.1.exists=1
+notify_scout_start=0
commit 3541da9e12b8d29227b3540f337f478ee0bfcf21
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 14:30:11 2009 +0200
reporting: move the SQL to definition file, to allow for multiple reports.
diff --git a/backend/Makefile.defs b/backend/Makefile.defs
index 4ae90b6..ee3fe86 100644
--- a/backend/Makefile.defs
+++ b/backend/Makefile.defs
@@ -9,6 +9,9 @@ TOP ?= .
ROOT ?= /usr/share/rhn
export ROOT
+SPACEWALK_ROOT ?= /usr/share/spacewalk
+export SPACEWALK_ROOT
+
PREFIX ?=
export PREFIX
@@ -29,18 +32,25 @@ PYFILES = $(addsuffix .py,$(FILES))
PYCFILES = $(addsuffix .pyc,$(FILES))
PYOFILES = $(addsuffix .pyo,$(FILES))
+SPACEWALK_PYFILES = $(addsuffix .py,$(SPACEWALK_FILES))
+SPACEWALK_PYCFILES = $(addsuffix .pyc,$(SPACEWALK_FILES))
+
# what do we need to install and where
INSTALL_FILES += $(PYFILES) $(PYCFILES)
INSTALL_DEST ?= $(ROOT)/$(SUBDIR)
+SPACEWALK_INSTALL_FILES += $(SPACEWALK_PYFILES) $(SPACEWALK_PYCFILES)
+
DIRS += $(addprefix $(PREFIX), \
- $(sort $(EXTRA_DIRS)) $(INSTALL_DEST))
+ $(sort $(EXTRA_DIRS)) $(INSTALL_DEST) $(SPACEWALK_ROOT))
all :: $(INSTALL_FILES)
-install :: all $(DIRS) $(INSTALL_FILES)
+install :: all $(DIRS) $(INSTALL_FILES) $(SPACEWALK_INSTALL_FILES)
@$(foreach f,$(INSTALL_FILES), \
$(INSTALL_DATA) $(f) $(PREFIX)$(INSTALL_DEST)/$(f) ; )
+ @$(foreach f,$(SPACEWALK_INSTALL_FILES), \
+ $(INSTALL_DATA) $(f) $(PREFIX)$(SPACEWALK_ROOT)/$(f) ; )
$(DIRS):
$(INSTALL_DIR) $@
diff --git a/backend/satellite_tools/Makefile b/backend/satellite_tools/Makefile
index b783b27..c2c08c0 100644
--- a/backend/satellite_tools/Makefile
+++ b/backend/satellite_tools/Makefile
@@ -19,6 +19,12 @@ SCRIPTS = satellite-sync spacewalk-debug\
rhn-ssl-dbstore update-packages rhn-db-stats \
spacewalk-report
+SPACEWALK_SUBDIRS = reports reports/data
+
+SPACEWALK_FILES = reports
+
+SPACEWALK_REPORT_FILES = reports/data
+
# check if we can build man pages
DOCBOOK = $(wildcard /usr/bin/docbook2man)
@@ -40,6 +46,8 @@ include $(TOP)/Makefile.defs
all :: $(SCRIPTS)
install :: $(SCRIPTS) $(PREFIX)/$(BINDIR)
$(INSTALL_BIN) $(SCRIPTS) $(PREFIX)/$(BINDIR)
+ $(INSTALL_DIR) $(addprefix $(PREFIX)$(SPACEWALK_ROOT)/, $(SPACEWALK_SUBDIRS))
+ $(INSTALL_DATA) $(SPACEWALK_REPORT_FILES)/* $(PREFIX)$(SPACEWALK_ROOT)/reports/data
ifneq ($(DOCBOOK),)
# install man pages
diff --git a/backend/satellite_tools/reports.py b/backend/satellite_tools/reports.py
new file mode 100644
index 0000000..d0e7ae6
--- /dev/null
+++ b/backend/satellite_tools/reports.py
@@ -0,0 +1,11 @@
+
+import os
+
+REPORT_DEFINITIONS = "/usr/share/spacewalk/reports/data"
+
+class report:
+ def __init__(self, name):
+ full_path = os.path.join(REPORT_DEFINITIONS, name)
+ fd = open(full_path, 'r')
+ self.sql = fd.read()
+
diff --git a/backend/satellite_tools/reports/data/inventory
b/backend/satellite_tools/reports/data/inventory
new file mode 100755
index 0000000..3d33ad5
--- /dev/null
+++ b/backend/satellite_tools/reports/data/inventory
@@ -0,0 +1,19 @@
+
+ select rhnserver.id as server_id, rhnserver.name as profile_name,
+ rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
+ ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
+ to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
+ ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time
+ from rhnserver,
+ (
+ select server_id, hostname, ipaddr
+ from rhnservernetwork
+ where id in (
+ select min(id)
+ from rhnservernetwork
+ group by server_id
+ )
+ ) rhnservernetwork
+ where rhnserver.id = rhnservernetwork.server_id (+)
+ order by server_id
+
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 2f7c30d..216d52a 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -35,6 +35,9 @@ _LIBPATH = "/usr/share/rhn"
if _LIBPATH not in sys.path:
sys.path.append(_LIBPATH)
+sys.path.append('/usr/share/spacewalk')
+import reports
+
try:
from server import rhnSQL
from common import initCFG
@@ -67,27 +70,11 @@ if __name__ == '__main__':
try:
initCFG('server')
rhnSQL.initDB(options.db)
+
+ report = reports.report(sys.argv[1])
writer = csv.writer(sys.stdout)
- h = rhnSQL.prepare("""
- select rhnserver.id as server_id, rhnserver.name as profile_name,
- rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
- ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
- to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
- ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time
- from rhnserver,
- (
- select server_id, hostname, ipaddr
- from rhnservernetwork
- where id in (
- select min(id)
- from rhnservernetwork
- group by server_id
- )
- ) rhnservernetwork
- where rhnserver.id = rhnservernetwork.server_id (+)
- order by server_id
- """)
+ h = rhnSQL.prepare(report.sql)
h.execute()
writer.writerow(map(lambda x: x[0].lower(), h.description))
row = h.fetchone()
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 20a389d..bdaeca6 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -535,6 +535,8 @@ rm -f %{rhnconf}/rhnSecret.py*
%{rhnroot}/satellite_tools/disk_dumper/iss_actions.py*
%{rhnroot}/satellite_tools/disk_dumper/dumper.py*
%{rhnroot}/satellite_tools/disk_dumper/string_buffer.py*
+%{_prefix}/share/spacewalk/reports.py*
+%{_prefix}/share/spacewalk/reports/data/*
%config %attr(644,root,apache) %{rhnconf}/default/rhn_server_iss.conf
%{_mandir}/man8/rhn-satellite-exporter.8*
%{_mandir}/man8/rhn-charsets.8*
commit 69ad5bbfb82751750c1dcc7ad290d9036a7523ab
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:58:07 2009 +0200
reporting: add registration time and last check-in time.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index d59002f..2f7c30d 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -72,7 +72,9 @@ if __name__ == '__main__':
h = rhnSQL.prepare("""
select rhnserver.id as server_id, rhnserver.name as profile_name,
rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
- ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by
+ ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by,
+ to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
+ ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where
rhnserver.id = server_id ) as last_checkin_time
from rhnserver,
(
select server_id, hostname, ipaddr
commit 098b65571e1dc68befea88cad6863fab44440109
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:46:05 2009 +0200
reporting: add the registered by information.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index f73039c..d59002f 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -71,7 +71,8 @@ if __name__ == '__main__':
h = rhnSQL.prepare("""
select rhnserver.id as server_id, rhnserver.name as profile_name,
- rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address
+ rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
+ ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as
registered_by
from rhnserver,
(
select server_id, hostname, ipaddr
commit 0ffac924319092a2e35f6951859b1f2a9227ddd4
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:44:43 2009 +0200
reporting: add hostname and IP address to the report.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index af2cad4..f73039c 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -70,8 +70,19 @@ if __name__ == '__main__':
writer = csv.writer(sys.stdout)
h = rhnSQL.prepare("""
- select rhnserver.id as server_id, rhnserver.name as profile_name
- from rhnserver
+ select rhnserver.id as server_id, rhnserver.name as profile_name,
+ rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address
+ from rhnserver,
+ (
+ select server_id, hostname, ipaddr
+ from rhnservernetwork
+ where id in (
+ select min(id)
+ from rhnservernetwork
+ group by server_id
+ )
+ ) rhnservernetwork
+ where rhnserver.id = rhnservernetwork.server_id (+)
order by server_id
""")
h.execute()
commit d3d685fbe17635102e8a0b6c57a4c6a57538306d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:41:54 2009 +0200
reporting: output field names as the first row.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 215b2bd..af2cad4 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -75,6 +75,7 @@ if __name__ == '__main__':
order by server_id
""")
h.execute()
+ writer.writerow(map(lambda x: x[0].lower(), h.description))
row = h.fetchone()
while row != None:
writer.writerow(row)
commit 8c9ea063cd874739a2c02398d3ce8875cb07ceda
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:37:13 2009 +0200
reporting: output formatted as csv.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index 2a2550a..215b2bd 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -25,6 +25,7 @@ def systemExit(code, msgs=None):
try:
import os
+ import csv
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
@@ -66,6 +67,7 @@ if __name__ == '__main__':
try:
initCFG('server')
rhnSQL.initDB(options.db)
+ writer = csv.writer(sys.stdout)
h = rhnSQL.prepare("""
select rhnserver.id as server_id, rhnserver.name as profile_name
@@ -75,7 +77,7 @@ if __name__ == '__main__':
h.execute()
row = h.fetchone()
while row != None:
- print row
+ writer.writerow(row)
row = h.fetchone()
except KeyboardInterrupt:
commit bcda8a8e13d24aa53ceb19cdd5c27b3950cb0bec
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 11:28:35 2009 +0200
Automatic commit of package [perl-NOCpulse-Probe] release [1.183.9-1].
diff --git a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
index 409d1c8..e3aff97 100644
--- a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
+++ b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
@@ -2,7 +2,7 @@ Name: perl-NOCpulse-Probe
Summary: Probe execution framework
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.183.8
+Version: 1.183.9
Release: 1%{?dist}
BuildArch: noarch
Group: Development/Libraries
@@ -70,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
-* Thu Jul 23 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.183.8-1
+* Thu Jul 23 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.183.9-1
- 512749 - fix path to file during man page generation
* Wed Apr 15 2009 Devan Goodwin <dgoodwin(a)redhat.com> 1.183.7-1
diff --git a/rel-eng/packages/perl-NOCpulse-Probe b/rel-eng/packages/perl-NOCpulse-Probe
index 29174f2..d3ac8ae 100644
--- a/rel-eng/packages/perl-NOCpulse-Probe
+++ b/rel-eng/packages/perl-NOCpulse-Probe
@@ -1 +1 @@
-1.183.8-1 monitoring/PerlModules/NP/Probe/
+1.183.9-1 monitoring/PerlModules/NP/Probe/
commit 5c2e4bdd0c83bf24f86302def755c8475c290dab
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 11:27:41 2009 +0200
fix path to file when generating man page
addressing Bug 512749
diff --git a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
index 1221140..409d1c8 100644
--- a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
+++ b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
@@ -50,11 +50,11 @@ install -m 644 test/*.pm
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/test/
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/ItemStatus.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::ItemStatus.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource/MySQL.pm
|gzip > $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::MySQL.3pm.gz
-/usr/bin/pod2man
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource/NetworkServiceCommands.pm |gzip
>
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::NetworkServiceCommands.3pm.gz
+/usr/bin/pod2man
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource/NetworkServiceCommand.pm |gzip
>
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::NetworkServiceCommand.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Result.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Result.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/AbstractShell.pm
|gzip > $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::AbstractShell.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/SSH.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::SSH.3pm.gz
-/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/SQLPLus.pm |gzip
> $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::SQLPLus.3pm.gz
+/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/SQLPlus.pm |gzip
> $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::SQLPlus.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/Local.pm |gzip
> $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::Local.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/Unix.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::Unix.3pm.gz
commit fd2ec1b9a93b76b8e2720844178f38a80b9c6b23
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 11:25:05 2009 +0200
reporting: initial prepare, execute, and fetch loop.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
index ca7b63d..2a2550a 100755
--- a/backend/satellite_tools/spacewalk-report
+++ b/backend/satellite_tools/spacewalk-report
@@ -66,6 +66,18 @@ if __name__ == '__main__':
try:
initCFG('server')
rhnSQL.initDB(options.db)
+
+ h = rhnSQL.prepare("""
+ select rhnserver.id as server_id, rhnserver.name as profile_name
+ from rhnserver
+ order by server_id
+ """)
+ h.execute()
+ row = h.fetchone()
+ while row != None:
+ print row
+ row = h.fetchone()
+
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
except (rhnSQL.SQLError, rhnSQL.SQLSchemaError, rhnSQL.SQLConnectError), e:
commit b5e172bdcfef48994e2a20b7883df34f71ffdd35
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 11:23:50 2009 +0200
Automatic commit of package [perl-NOCpulse-Probe] release [1.183.8-1].
diff --git a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
index 5116b54..1221140 100644
--- a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
+++ b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
@@ -2,7 +2,7 @@ Name: perl-NOCpulse-Probe
Summary: Probe execution framework
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.183.7
+Version: 1.183.8
Release: 1%{?dist}
BuildArch: noarch
Group: Development/Libraries
@@ -70,6 +70,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Thu Jul 23 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.183.8-1
+- 512749 - fix path to file during man page generation
+
* Wed Apr 15 2009 Devan Goodwin <dgoodwin(a)redhat.com> 1.183.7-1
- fix various perl -w warnings (msuchy(a)redhat.com)
- Fix ownership of nocpulse directory (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/perl-NOCpulse-Probe b/rel-eng/packages/perl-NOCpulse-Probe
index 0995f59..29174f2 100644
--- a/rel-eng/packages/perl-NOCpulse-Probe
+++ b/rel-eng/packages/perl-NOCpulse-Probe
@@ -1 +1 @@
-1.183.7-1 monitoring/PerlModules/NP/Probe/
+1.183.8-1 monitoring/PerlModules/NP/Probe/
commit c839c9748c0b780afeaeb62f6e12d15be71e75a7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 11:19:55 2009 +0200
fix path to file when generating man page
addressing Bug 512749
diff --git a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
index 37ad8e8..5116b54 100644
--- a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
+++ b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
@@ -50,7 +50,7 @@ install -m 644 test/*.pm
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/test/
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/ItemStatus.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::ItemStatus.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource/MySQL.pm
|gzip > $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::MySQL.3pm.gz
-/usr/bin/pod2man
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource::NetworkServiceCommands.pm
|gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::NetworkServiceCommands.3pm.gz
+/usr/bin/pod2man
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/DataSource/NetworkServiceCommands.pm |gzip
>
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::DataSource::NetworkServiceCommands.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Result.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Result.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/AbstractShell.pm
|gzip > $RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::AbstractShell.3pm.gz
/usr/bin/pod2man $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/Probe/Shell/SSH.pm |gzip >
$RPM_BUILD_ROOT%{_mandir}/man3/NOCpulse::Probe::Shell::SSH.3pm.gz
commit 8549dc3f0006143c60732923fddbee3496630d73
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 10:51:47 2009 +0200
reporting: add spacewalk-report to the rpm package.
diff --git a/backend/satellite_tools/Makefile b/backend/satellite_tools/Makefile
index 9c02dce..b783b27 100644
--- a/backend/satellite_tools/Makefile
+++ b/backend/satellite_tools/Makefile
@@ -16,7 +16,8 @@ FILES = __init__ connection diskImportLib messages \
SCRIPTS = satellite-sync spacewalk-debug\
rhn-schema-version rhn-satellite-activate rhn-charsets \
- rhn-ssl-dbstore update-packages rhn-db-stats
+ rhn-ssl-dbstore update-packages rhn-db-stats \
+ spacewalk-report
# check if we can build man pages
DOCBOOK = $(wildcard /usr/bin/docbook2man)
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 4037804..20a389d 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -505,6 +505,7 @@ rm -f %{rhnconf}/rhnSecret.py*
%attr(755,root,root) %{_bindir}/rhn-ssl-dbstore
%attr(755,root,root) %{_bindir}/satellite-sync
%attr(755,root,root) %{_bindir}/spacewalk-debug
+%attr(755,root,root) %{_bindir}/spacewalk-report
%attr(755,root,root) %{_bindir}/rhn-satellite-exporter
%attr(755,root,root) %{_bindir}/update-packages
%attr(755,root,root) %{_bindir}/rhn-db-stats
commit 43c47fe0c2e23058f071c5d3ee725f724904c331
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 23 10:09:41 2009 +0200
reporting: a stub for new script, spacewalk-report.
diff --git a/backend/satellite_tools/spacewalk-report
b/backend/satellite_tools/spacewalk-report
new file mode 100755
index 0000000..ca7b63d
--- /dev/null
+++ b/backend/satellite_tools/spacewalk-report
@@ -0,0 +1,75 @@
+#!/usr/bin/python -u
+#
+# Copyright (c) 2008 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 # along with this
software; if not, see
+#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
+import sys
+def systemExit(code, msgs=None):
+ """ exit with message and code """
+ if msgs:
+ if type(msgs) not in [type([]), type(())]:
+ msgs = (msgs, )
+ for msg in msgs:
+ sys.stderr.write(str(msg)+'\n')
+ sys.exit(code)
+
+try:
+ import os
+except KeyboardInterrupt:
+ systemExit(-1, "\nUser interrupted process.")
+
+
+_LIBPATH = "/usr/share/rhn"
+# add to the path if need be
+if _LIBPATH not in sys.path:
+ sys.path.append(_LIBPATH)
+
+try:
+ from server import rhnSQL
+ from common import initCFG
+except KeyboardInterrupt:
+ systemExit(-1, "\nUser interrupted process.")
+
+
+def processCommandline():
+ """ process the commandline """
+ try:
+ from optparse import Option, OptionParser
+ except KeyboardInterrupt:
+ systemExit(-1, "\nUser interrupted process.")
+ optionsTable = [
+ Option('--db', action='store', type="string",
+ help='alternative database string (username/password@sid);' \
+ + ' default is default_db from /etc/rhn/rhn.conf'),
+ ]
+
+ optionParser = OptionParser(option_list=optionsTable)
+ optionParser.disable_interspersed_args()
+ options, args = optionParser.parse_args()
+
+ return options
+
+
+if __name__ == '__main__':
+ options = processCommandline()
+
+ try:
+ initCFG('server')
+ rhnSQL.initDB(options.db)
+ except KeyboardInterrupt:
+ systemExit(-1, "\nUser interrupted process.")
+ except (rhnSQL.SQLError, rhnSQL.SQLSchemaError, rhnSQL.SQLConnectError), e:
+ # really a stub for better exception handling in the future.
+ sys.stderr.write("SQL error occurred, traceback follows...\n")
+ raise
+
commit ed4d2e425fdd58e655d31565800abfae54d8e02f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 10:18:58 2009 +0200
specify login shell for useradd
diff --git a/monitoring/nocpulse-common/nocpulse-common.spec
b/monitoring/nocpulse-common/nocpulse-common.spec
index 7309672..15abb5b 100644
--- a/monitoring/nocpulse-common/nocpulse-common.spec
+++ b/monitoring/nocpulse-common/nocpulse-common.spec
@@ -79,7 +79,7 @@ if [ -d /home/nocpulse -a 0`id -u nocpulse 2> /dev/null` -ge 500 ];
then
# find lowest unused system uid to change nocpulse uid to
old_uid=`id -u nocpulse`
- useradd -r tempnoc
+ useradd -r tempnoc -s /bin/bash
uid=`id -u tempnoc`
userdel tempnoc
usermod -u $uid nocpulse
@@ -92,7 +92,7 @@ fi
getent group %{package_name} >/dev/null || groupadd -r %{package_name}
getent passwd %{package_name} >/dev/null || \
-useradd -r -g %{package_name} -G apache -d %{_var}/lib/%{package_name} -c "NOCpulse
user" %{package_name}
+useradd -r -g %{package_name} -G apache -d %{_var}/lib/%{package_name} -s /bin/bash -c
"NOCpulse user" %{package_name}
/usr/bin/passwd -l %{package_name} >/dev/null
# if user already exists (rhnmd creates it too) add nocpulse to apache group
commit a692c45fef62adf9417bbe100abe9c7f463463c1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 10:14:35 2009 +0200
457011 - add warning to top of file. This file should not be edited manualy
diff --git a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
index dd47273..9f9818b 100644
--- a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
+++ b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
@@ -67,7 +67,10 @@ sub save {
$@ = "Couldn't open $filename: $!";
return undef;
}
- print $fh $data;
+ print $fh <<WARNING, $data;
+# You should not edit this file directly. All changes will be lost after
+# Monitoring restart. Please use script NOCpulse-ini.
+WARNING
$fh->close();
# Be sure to make the file world-readable!
chmod(0644, $filename) or die "Couldn't chmod $filename: $!";
commit ef9c5abb917eae1127e0e836887f790e2d878c4b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 10:10:34 2009 +0200
Automatic commit of package [SatConfig-general] release [1.216.12-1].
diff --git a/monitoring/SatConfig/general/SatConfig-general.spec
b/monitoring/SatConfig/general/SatConfig-general.spec
index 4f6fdcd..a4f56cc 100644
--- a/monitoring/SatConfig/general/SatConfig-general.spec
+++ b/monitoring/SatConfig/general/SatConfig-general.spec
@@ -2,7 +2,7 @@
%define hb_res_dir %{_sysconfdir}/ha.d/resource.d
%define installed_dir %sysv_dir/installed
Name: SatConfig-general
-Version: 1.216.11
+Version: 1.216.12
Release: 1%{?dist}
Summary: Satellite Configuration System - general setup, used by many packages
URL:
https://fedorahosted.org/spacewalk
@@ -63,6 +63,9 @@ install -D -m 644 NOCpulse-ini.8
$RPM_BUILD_ROOT%{_mandir}/man8/NOCpulse-ini.8
rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Jul 23 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.216.12-1
+- 457011 - create NOCpulse-ini - tool to handle NOCpulse.ini
+
* Thu Jun 18 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.216.11-1
- 499564 - ignore already started/stopped service for InstallSoftwareConfig
diff --git a/rel-eng/packages/SatConfig-general b/rel-eng/packages/SatConfig-general
index 79a8f7c..7e8d890 100644
--- a/rel-eng/packages/SatConfig-general
+++ b/rel-eng/packages/SatConfig-general
@@ -1 +1 @@
-1.216.11-1 monitoring/SatConfig/general/
+1.216.12-1 monitoring/SatConfig/general/
commit 6e2a26e27f874d4870cc9e9c9d36ea0768b95cff
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 10:08:38 2009 +0200
457011 - add manpage and documentation
diff --git a/monitoring/SatConfig/general/NOCpulse-ini
b/monitoring/SatConfig/general/NOCpulse-ini
index 1a08b66..f172631 100644
--- a/monitoring/SatConfig/general/NOCpulse-ini
+++ b/monitoring/SatConfig/general/NOCpulse-ini
@@ -1,5 +1,20 @@
#!/usr/bin/perl
use strict;
+#
+# Copyright (c) 2009 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
use lib '/etc/rc.d/np.d';
use NOCpulse::NOCpulseini;
use PhysCluster;
@@ -14,6 +29,7 @@ my @macros = ();
my $set_macro = '';
my $set_param = '';
my $new_value = '';
+my $help = 0;
my $save = 0;
GetOptions("all" => \$all,
@@ -23,8 +39,27 @@ GetOptions("all" => \$all,
"set-macro:s" => \$set_macro,
"set-param:s" => \$set_param,
"new-value:s" => \$new_value,
+ "help" => \$help,
);
+if ($help) {
+ print <<HELP;
+Usage:
+ NOCpulse-ini --all
+
+ NOCpulse-ini --group=general --group=mail
+
+ NOCpulse-ini --raw --group mail
+
+ NOCpulse-ini --macro=NPVAR --raw
+
+ NOCpulse-ini --set-macro=SMONURL --new-value='%{XPROTO}://different.url.com'
+
+ NOCpulse-ini --group queues --set-param=polling_interval --new-value=6
+HELP
+ exit;
+}
+
my $cluster = PhysCluster->newInitialized('/etc/rhn/cluster.ini');
my $localConfig = $cluster->get_LocalConfig;
my $ini = NOCpulse::NOCpulseini->new;
@@ -102,3 +137,79 @@ if ($save) {
$ini->save;
}
+
+=pod
+
+=head1 NAME
+
+NOCpulse-ini - Show content of monitoring config file NOCpulse.ini and allow you to edit
it.
+
+=head1 SYNOPSIS
+
+NOCpulse-ini [OPTIONS]
+
+=head1 DESCRIPTION
+
+Monitoring main configuration file NOCpulse.ini is human readable, but should not be
edited.
+This file is deleted and recreated during Monitoring start, therefore all changes in this
file
+are lost.
+Values for this configuration file are stored in database and should be edited with
script
+NOCpulse-ini.
+
+WARNING: Changing of values is not recommended, as it can lead to non functional
monitoring.
+
+If you use --set-macro or --set-param, then both database and NOCpulse.ini are updated.
+
+=head1 OPTIONS
+
+--all
+ Dump out full content of NOCpulse.ini as seen by database.
+
+--group
+ Dump out content of NOCpulse.ini as seen by database. Dump only part which
belongs to this group.
+ May be specified multiple times.
+
+--raw
+ Macros are not expanded.
+
+--macro
+ Write value of given macro.
+
+--set-macro
+ Change value of this macro.
+
+--set-param
+ Change value of parameter.
+
+--new-value
+ Set the new value for macro or parameter.
+
+=head1 EXAMPLES
+
+ NOCpulse-ini --all
+
+ NOCpulse-ini --group=general --group=mail
+
+ NOCpulse-ini --raw --group mail
+
+ NOCpulse-ini --macro=NPVAR --raw
+
+ NOCpulse-ini --set-macro=SMONURL --new-value='%{XPROTO}://different.url.com'
+
+ NOCpulse-ini --group queues --set-param=polling_interval --new-value=6
+
+=head1 SEE ALSO
+
+NOCpulse.ini(8)
+
+=head1 AUTHOR
+
+Miroslav Suchý <msuchy(a)redhat.com>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (c) 2009 Red Hat, Inc.
+Released under GNU General Public License, version 2 (GPLv2).
+
+=cut
+
diff --git a/monitoring/SatConfig/general/SatConfig-general.spec
b/monitoring/SatConfig/general/SatConfig-general.spec
index 9f857ca..4f6fdcd 100644
--- a/monitoring/SatConfig/general/SatConfig-general.spec
+++ b/monitoring/SatConfig/general/SatConfig-general.spec
@@ -22,7 +22,7 @@ to make a monitoring work.
%setup -q
%build
-#nothing to do here
+pod2man --section=8 NOCpulse-ini NOCpulse-ini.8
%install
rm -rf $RPM_BUILD_ROOT
@@ -40,6 +40,7 @@ install -m 755 validateConfiguration $RPM_BUILD_ROOT%sysv_dir
install -m 755 pip $RPM_BUILD_ROOT%sysv_dir
install -m 444 SysV.ini $RPM_BUILD_ROOT%sysv_dir
ln -s ../../rc.d/np.d/hbResource $RPM_BUILD_ROOT%hb_res_dir/ClusterLeader
+install -D -m 644 NOCpulse-ini.8 $RPM_BUILD_ROOT%{_mandir}/man8/NOCpulse-ini.8
%files
%defattr(-,root,root,-)
@@ -56,6 +57,7 @@ ln -s ../../rc.d/np.d/hbResource
$RPM_BUILD_ROOT%hb_res_dir/ClusterLeader
%sysv_dir/SysV.ini
%hb_res_dir/*
%doc 1-STARTUP_SEQUENCE 2-COMMANDS_OVERVIEW 3-CONFIGURATION 4-DEVELOPMENT 5-STEPS_LEGEND
+%{_mandir}/man8/NOCpulse-ini.8.*
%clean
rm -rf $RPM_BUILD_ROOT
commit 4c8bfa73ccf479355c87141aa6914b2fdb716ffd
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jul 23 09:21:28 2009 +0200
457011 - create NOCpulse-ini - tool to handle NOCpulse.ini
diff --git a/monitoring/SatConfig/general/NOCpulse-ini
b/monitoring/SatConfig/general/NOCpulse-ini
new file mode 100644
index 0000000..1a08b66
--- /dev/null
+++ b/monitoring/SatConfig/general/NOCpulse-ini
@@ -0,0 +1,104 @@
+#!/usr/bin/perl
+use strict;
+use lib '/etc/rc.d/np.d';
+use NOCpulse::NOCpulseini;
+use PhysCluster;
+use Data::Dumper;
+use Getopt::Long;
+
+#set the defaults
+my $all = 0;
+my @groups = ();
+my $raw = 0;
+my @macros = ();
+my $set_macro = '';
+my $set_param = '';
+my $new_value = '';
+my $save = 0;
+
+GetOptions("all" => \$all,
+ "group:s@" => \@groups,
+ "raw" => \$raw,
+ "macro:s@" => \@macros,
+ "set-macro:s" => \$set_macro,
+ "set-param:s" => \$set_param,
+ "new-value:s" => \$new_value,
+ );
+
+my $cluster = PhysCluster->newInitialized('/etc/rhn/cluster.ini');
+my $localConfig = $cluster->get_LocalConfig;
+my $ini = NOCpulse::NOCpulseini->new;
+
+if (%$localConfig) {
+ my $config = (values(%$localConfig))[0];
+ my $dbd = $config->get_dbd;
+ my $dbname = $config->get_dbname;
+ my $username = $config->get_username;
+ my $password = $config->get_password;
+ $ini->connect($dbd, $dbname, $username, $password);
+ $ini->raw($raw);
+ $ini->fetch_nocpulseini('INTERNAL');
+} else {
+ print "Error: This script can be run only on monitoring backend.\n";
+ exit 1;
+}
+
+if ($all) {
+ print $ini->dump;
+} elsif (@groups and !$set_param) {
+ foreach my $group (@groups) {
+ print $ini->dump_group($group), "\n\n";
+ }
+}
+if (@macros) {
+ my $list = $ini->fetch_macros;
+ my %DESCRIPTION;
+ foreach my $macro (@$list) {
+ $DESCRIPTION{$macro->{'NAME'}} =
$macro->{'DESCRIPTION'};
+ }
+ foreach my $macro (@macros) {
+ if ($ini->macrodb->{$macro}) {
+ print "Macro $macro - $DESCRIPTION{$macro}\nexpands to:
", $ini->macrodb->{$macro}, "\n";
+ } else {
+ print "Macro $macro is not defined.\n";
+ }
+ }
+}
+if ($set_macro) {
+ my $sql = qq|
+ UPDATE rhn_config_macro
+ SET definition=?
+ WHERE (environment, name) = ( SELECT macro.environment, macro.name
+ FROM db_environment dbenv, config_macro macro
+ WHERE UPPER(sys_context('userenv',
'db_name')) = UPPER(dbenv.db_name)
+ AND DECODE(macro.environment, 'ALL',
dbenv.environment,
+ macro.environment) = dbenv.environment
+ AND macro.name = ?
+ )
+ |;
+ my $sth = $ini->dbh->prepare($sql);
+ $sth->execute($new_value, $set_macro);
+ print $sth->rows, " record updated.\n";
+ $save = 1;
+} elsif ($set_param) {
+ if (!@groups or scalar(@groups) != 1) {
+ print "Error: You have to specify exactly one group, to which
parameter belongs.\n";
+ exit 2;
+ }
+ my $sql = qq|
+ UPDATE config_parameter
+ SET value = ?
+ WHERE group_name = ?
+ AND name = ?
+ |;
+ my $sth = $ini->dbh->prepare($sql);
+ $sth->execute($new_value, $groups[0], $set_param);
+ print $sth->rows, " record updated.\n";
+ $save = 1;
+}
+
+if ($save) {
+ $ini->fetch_nocpulseini('INTERNAL');
+ $ini->save;
+}
+
diff --git a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
index f7e5f2a..dd47273 100644
--- a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
+++ b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm
@@ -14,6 +14,7 @@ use Class::MethodMaker
filename
macrodb
paramdb
+ raw
)],
new_with_init => 'new',
;
@@ -72,17 +73,28 @@ sub save {
chmod(0644, $filename) or die "Couldn't chmod $filename: $!";
}
+# return content of NOCpulse.ini (as fetched from db).
+# but only for specified group
+sub dump_group {
+ my ($self, $group, $pdb) = @_;
+ $pdb = $self->paramdb() unless ($pdb);
+ my $result = "[$group]\n";
+ $result .= "# $pdb->{$group}->{'desc'}\n";
+
+ foreach my $param (sort keys %{$pdb->{$group}->{'params'}}) {
+ $result .= join('=', $param,
$pdb->{$group}->{'params'}->{$param}) . "\n";
+ }
+ return $result;
+}
+
+# return content of NOCpulse.ini (as fetched from db)
sub dump {
my $self = shift;
my $pdb = $self->paramdb();
my $str;
foreach my $grp (sort keys %$pdb) {
- $str .= "[$grp]\n";
- $str .= "# $pdb->{$grp}->{'desc'}\n";
- foreach my $param (sort keys %{$pdb->{$grp}->{'params'}}) {
- $str .= join('=', $param,
$pdb->{$grp}->{'params'}->{$param}) . "\n";
- }
+ $str .= $self->dump_group($grp, $pdb);
$str .= "\n\n";
}
return $str;
@@ -110,6 +122,7 @@ sub fetch_macros {
foreach my $macroname (keys %{$mdb}) {
$mdb->{$macroname} = $self->expand($mdb->{$macroname});
}
+ return $list;
}
sub fetch_params {
@@ -140,6 +153,7 @@ sub fetch_params {
sub expand {
my $self = shift;
my $value = shift;
+ return $value if ($self->raw or !$value);
# Store literal percents using OOB data
$value =~ s/%%/\0/g;
commit e268316c3d3d0d54645fc5d1b24aa1721dc72ee9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Jul 22 13:50:37 2009 +0200
remove warning when run as perl -w
diff --git a/monitoring/SatConfig/cluster/PhysCluster.pm
b/monitoring/SatConfig/cluster/PhysCluster.pm
index feea4e1..3f59404 100644
--- a/monitoring/SatConfig/cluster/PhysCluster.pm
+++ b/monitoring/SatConfig/cluster/PhysCluster.pm
@@ -246,7 +246,7 @@ sub readFromFile
my $satnumber;
my $satNameFile = $self->configValue('satNameFile');
- if (open(FILE,$satNameFile)) {
+ if ($satNameFile and open(FILE,$satNameFile)) {
$satnumber = <FILE>;
close(FILE);
chomp($satnumber);
commit 953f2345c133524730bab6326754babac32c6753
Author: Mike McCune <mmccune(a)redhat.com>
Date: Wed Jul 22 09:51:04 2009 -0700
checkstyle
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
index 764775e..d7872f6 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.manager.satellite.test;
-import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.kickstart.KickstartData;
import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.KickstartSession;
commit 936cf4d7144ca7c8ad9ee9877e1d7b84d4347fd0
Author: Mike McCune <mmccune(a)redhat.com>
Date: Wed Jul 22 09:18:13 2009 -0700
512814 - unit test fix
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
index 4175fb5..764775e 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.manager.satellite.test;
+import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.kickstart.KickstartData;
import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.KickstartSession;
@@ -52,8 +53,8 @@ public class UpgradeCommandTest extends BaseTestCaseWithUser {
KickstartFactory.lookupDefaultKickstartSessionForKickstartData(ksd);
assertNotNull(ksession);
- assertNull(TaskFactory.getTaskListByNameLike(
- UpgradeCommand.UPGRADE_KS_PROFILES));
-
+ l = TaskFactory.getTaskListByNameLike(
+ UpgradeCommand.UPGRADE_KS_PROFILES);
+ assertTrue((l == null || l.isEmpty()));
}
}
commit cae1948bd93644f8af7e330941d018714cb1f629
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 22 11:40:41 2009 -0300
Automatic commit of package [osad] release [5.9.17-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 7f7add2..621b971 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -9,7 +9,7 @@ Group: System Environment/Daemons
License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.9.16
+Version: 5.9.17
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -241,6 +241,9 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
# $Id$
%changelog
+* Wed Jul 22 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.17-1
+- Disable osad selinux for Fedora 11. (dgoodwin(a)redhat.com)
+
* Mon Jul 20 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.16-1
- Add osad BuildRequires for python-devel. (dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index 20e08db..5d08fc4 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.9.16-1 client/tools/osad/
+5.9.17-1 client/tools/osad/
commit 4caf9e06a6268beb6ca5bf455ca6d8d207eaa942
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 22 11:39:11 2009 -0300
Disable osad selinux for Fedora 11.
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index f4f003f..7f7add2 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -54,10 +54,14 @@ OSA dispatcher get message from Spacewalk server that some command is
need
to execute on client. The message is transported via jabber protocol to OSAD
agent.
+%define include_selinux_package 1
+
%if 0%{?rhel} && 0%{?rhel} <= 4
%define include_selinux_package 0
-%else
-%define include_selinux_package 1
+%endif
+
+%if 0%{?fedora} == 11
+%define include_selinux_package 0
%endif
%if %{include_selinux_package}
commit 40ec040a6101e1efa1458d4623702c0dae16d28c
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 22 10:17:03 2009 -0300
Automatic commit of package [spacewalk] release [0.6.3-1].
diff --git a/rel-eng/packages/spacewalk b/rel-eng/packages/spacewalk
index c981907..69083a6 100644
--- a/rel-eng/packages/spacewalk
+++ b/rel-eng/packages/spacewalk
@@ -1 +1 @@
-0.6.2-1 spacewalk/package/
+0.6.3-1 spacewalk/package/
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index ca2c63a..f328895 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -1,6 +1,6 @@
%define release_name Alpha
Name: spacewalk
-Version: 0.6.2
+Version: 0.6.3
Release: 1%{?dist}
Summary: Spacewalk Systems Management Application
URL:
https://fedorahosted.org/spacewalk
@@ -95,6 +95,9 @@ rm -rf %{buildroot}
/%{_sysconfdir}/spacewalk-release
%changelog
+* Wed Jul 22 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.3-1
+- Re-enable selinux for everything but Fedora 11. (dgoodwin(a)redhat.com)
+
* Mon Jul 20 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.2-1
- Disabling spacewalk selinux support temporarily. (dgoodwin(a)redhat.com)
commit 52e3bb1c96f537c561642a9f6ebacdfa98c86298
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 22 10:13:42 2009 -0300
Re-enable selinux for everything but Fedora 11.
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index 895c512..ca2c63a 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -62,10 +62,13 @@ Requires: spacewalk-monitoring
# Requires: rhn_solaris_bootstrap_5_1_0_3
# SELinux
-#Requires: spacewalk-selinux
-#Requires: jabberd-selinux
-#Requires: osa-dispatcher-selinux
-#Requires: spacewalk-monitoring-selinux
+%if 0%{?fedora} == 11
+%else
+Requires: spacewalk-selinux
+Requires: jabberd-selinux
+Requires: osa-dispatcher-selinux
+Requires: spacewalk-monitoring-selinux
+%endif
%description
commit 2119b1f1cb0310df61a443d7a8d2ff39ce504728
Author: John Matthews <jmatthew(a)redhat.com>
Date: Wed Jul 22 08:23:05 2009 -0400
Automatic commit of package [spacewalk-backend] release [0.6.22-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 44d7dd6..4037804 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.21
+Version: 0.6.22
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -568,6 +568,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.22-1
+- 511283 - Package compare between db and cache should see if the db is newer
+ than cache and only then import the content. (pkilambi(a)redhat.com)
+
* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.21-1
- 512936 - Changing the custom channel rule to always defalt to org 1 for
custom channels unless --org option is used. This will avoid the confusion of
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 7f82b55..b232b7a 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.21-1 backend/
+0.6.22-1 backend/
commit 13afa1173f92e893a8a9390fc2e3116293bb7598
Author: John Matthews <jmatthew(a)redhat.com>
Date: Wed Jul 22 08:22:46 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.34-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 933a515..6aba9bc 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.33
+Version: 0.6.34
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -250,6 +250,10 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
+* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.34-1
+- 512814 - adding spot to add 'upgrade' logic to our startup of tomact.
+ (mmccune(a)redhat.com)
+
* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.33-1
- 512679 - Fix to guess a sensible default virt path for Xen/KVM virt type
(paji(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 31f2495..20a093c 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.33-1 java/
+0.6.34-1 java/
commit 20af6df15ded643a047ed28c255d20ffa69c39f0
Author: John Matthews <jmatthew(a)redhat.com>
Date: Wed Jul 22 08:22:21 2009 -0400
Automatic commit of package [spacewalk-schema] release [0.6.14-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 4b9b8f3..5f359ca 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-0.6.13-1 schema/spacewalk/
+0.6.14-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec
b/schema/spacewalk/spacewalk-schema.spec
index eac9ac9..e9ce945 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.6.13
+Version: 0.6.14
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -52,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-schema-upgrade*
%changelog
+* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.14-1
+- 512814 - tickle the upgrade logic (mmccune(a)redhat.com)
+
* Thu Jul 16 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.13-1
- 512104 - add sshbannerignore parametr to existing probes which use ssh
commit 94020be75311d7cf481e1dc5d9fe72f1e23ed172
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Tue Jul 21 20:21:20 2009 -0400
511283 - Package compare between db and cache should see if the db is newer than cache
and only then import the content.
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 601d131..40458ad 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1004,7 +1004,7 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
# file is modified too; re-download
m_fs_packages.append((package_id, final_path))
- if (l_timestamp == db_timestamp and md5sum == db_md5sum and
+ if (l_timestamp <= db_timestamp and md5sum == db_md5sum and
package_size == db_package_size and final_path == db_path):
# Same package
return
commit 43aff0b73ba4d7d0187aedd2be16c1ee79af4ebf
Author: Mike McCune <mmccune(a)redhat.com>
Date: Tue Jul 21 14:31:51 2009 -0700
512814 - tickle the upgrade logic
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-upgrade_kickstart_profiles.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-upgrade_kickstart_profiles.sql
new file mode 100644
index 0000000..4a0a510
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-upgrade_kickstart_profiles.sql
@@ -0,0 +1,20 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+INSERT INTO rhnTaskQueue (org_id, task_name, task_data)
+VALUES (1, 'upgrade_satellite_kickstart_profiles', 0);
commit 8f94b49ce1dd35671f627bd4161e6355631d00f1
Author: Mike McCune <mmccune(a)redhat.com>
Date: Tue Jul 21 14:22:17 2009 -0700
512814 - adding spot to add 'upgrade' logic to our startup of tomact.
Now coders can add an entry to rhnTaskQueue to indicate to our Java code
that we want to run a set of business logic during an upgrade.
diff --git a/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml
b/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml
index 4b32495..276b5e8 100644
--- a/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml
@@ -33,4 +33,13 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
and task_data = :data and earliest = :earliest]]>
</query>
+ <sql-query name="Task.lookupByNameLike">
+ <![CDATA[SELECT {t.*}
+ FROM rhnTaskQueue {t}
+ WHERE t.task_name like :namelike
+ ]]>
+ <return alias="t" class="com.redhat.rhn.domain.task.Task"
/>
+ </sql-query>
+
+
</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
index 70c71f1..50149eb 100644
--- a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
@@ -74,6 +74,16 @@ public class TaskFactory extends HibernateFactory {
}
/**
+ * Remove a completed Task from the queue.
+ *
+ * @param taskIn to remove
+ */
+ public static void remove(Task taskIn) {
+ singleton.removeObject(taskIn);
+ }
+
+
+ /**
* Lookups up a task.
* @param org The org containing the task
* @param name The name of the task
@@ -126,4 +136,15 @@ public class TaskFactory extends HibernateFactory {
return c.list();
}
+
+ /**
+ * Lookup a list of Tasks who's name start with passed in param
+ * @param nameIn to lookup
+ * @return List of Tasks or null if not found.
+ */
+ public static List getTaskListByNameLike(String nameIn) {
+ return
HibernateFactory.getSession().getNamedQuery("Task.lookupByNameLike")
+ .setString("namelike", nameIn + "%")
+ .list();
+ }
}
diff --git a/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java
b/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java
index 2d9333f..c4559d1 100644
--- a/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java
+++ b/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java
@@ -24,6 +24,8 @@ import com.redhat.rhn.testing.UserTestUtils;
import org.hibernate.Session;
+import java.util.List;
+
/**
* TaskTest
* @version $Rev$
@@ -61,4 +63,17 @@ public class TaskTest extends RhnBaseTestCase {
t3.setName("foo");
assertFalse("t2 should not be equal to t3", t2.equals(t3));
}
+
+ public void testLookupNameLike() throws Exception {
+ Org org = UserTestUtils.findNewOrg("testOrg");
+ String testname = "task_object_unit_test_" + TestUtils.randomString();
+ Long testdata = new Long(42);
+ Task t = TaskFactory.createTask(org, testname, testdata);
+
+ List lookedup =
TaskFactory.getTaskListByNameLike("task_object_unit_test_");
+ assertNotNull(lookedup);
+ assertTrue(lookedup.size() > 0);
+ assertTrue(lookedup.get(0) != null);
+ assertTrue(lookedup.get(0) instanceof Task);
+ }
}
diff --git a/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java
b/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java
new file mode 100644
index 0000000..1f47b46
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.manager;
+
+import com.redhat.rhn.common.hibernate.HibernateFactory;
+
+import org.apache.log4j.Logger;
+import org.hibernate.HibernateException;
+
+/**
+ * BaseTransactionCommand - simple baseclass to hold logic for handling tx
+ *
+ * @version $Rev$
+ */
+public class BaseTransactionCommand {
+
+ private Logger log;
+
+ /**
+ * Constructor
+ * @param logIn to use.
+ */
+ public BaseTransactionCommand(Logger logIn) {
+ log = logIn;
+ }
+
+ protected void handleTransaction() {
+ boolean committed = false;
+
+ try {
+ HibernateFactory.commitTransaction();
+ committed = true;
+
+ if (log.isDebugEnabled()) {
+ log.debug("Transaction committed");
+ }
+ }
+ catch (HibernateException e) {
+ log.error("Rolling back transaction", e);
+ }
+ finally {
+ try {
+ if (!committed) {
+ try {
+ if (log.isDebugEnabled()) {
+ log.debug("Rolling back transaction");
+ }
+ HibernateFactory.rollbackTransaction();
+ }
+ catch (HibernateException e) {
+ final String msg = "Additional error during rollback";
+ log.warn(msg, e);
+ }
+ }
+ }
+ finally {
+ // cleanup the session
+ HibernateFactory.closeSession();
+ }
+ }
+ }
+
+}
diff --git
a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
index fdff195..547b78b 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
@@ -25,12 +25,12 @@ import
com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.org.OrgFactory;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.frontend.dto.ErrataCacheDto;
+import com.redhat.rhn.manager.BaseTransactionCommand;
import com.redhat.rhn.manager.action.ActionManager;
import com.redhat.rhn.manager.errata.ErrataManager;
import com.redhat.rhn.manager.system.SystemManager;
import org.apache.log4j.Logger;
-import org.hibernate.HibernateException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -43,7 +43,7 @@ import java.util.Map;
* UpdateErrataCacheCommand
* @version $Rev$
*/
-public class UpdateErrataCacheCommand {
+public class UpdateErrataCacheCommand extends BaseTransactionCommand {
private static Logger log = Logger
.getLogger(UpdateErrataCacheCommand.class);
@@ -51,6 +51,7 @@ public class UpdateErrataCacheCommand {
* Default constructor
*/
public UpdateErrataCacheCommand() {
+ super(log);
}
/**
@@ -280,42 +281,6 @@ public class UpdateErrataCacheCommand {
return retval;
}
-
- protected void handleTransaction() {
- boolean committed = false;
-
- try {
- HibernateFactory.commitTransaction();
- committed = true;
-
- if (log.isDebugEnabled()) {
- log.debug("Transaction committed");
- }
- }
- catch (HibernateException e) {
- log.error("Rolling back transaction", e);
- }
- finally {
- try {
- if (!committed) {
- try {
- if (log.isDebugEnabled()) {
- log.debug("Rolling back transaction");
- }
- HibernateFactory.rollbackTransaction();
- }
- catch (HibernateException e) {
- final String msg = "Additional error during rollback";
- log.warn(msg, e);
- }
- }
- }
- finally {
- // cleanup the session
- HibernateFactory.closeSession();
- }
- }
- }
private void processServer(Long serverId, Org org) {
Server server = SystemManager.lookupByIdAndOrg(serverId, org);
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/UpgradeCommand.java
b/java/code/src/com/redhat/rhn/manager/satellite/UpgradeCommand.java
new file mode 100644
index 0000000..f2fd91f
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/manager/satellite/UpgradeCommand.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.manager.satellite;
+
+import com.redhat.rhn.common.hibernate.HibernateFactory;
+import com.redhat.rhn.domain.kickstart.KickstartData;
+import com.redhat.rhn.domain.kickstart.KickstartFactory;
+import com.redhat.rhn.domain.kickstart.KickstartSession;
+import com.redhat.rhn.domain.task.Task;
+import com.redhat.rhn.domain.task.TaskFactory;
+import com.redhat.rhn.manager.BaseTransactionCommand;
+import com.redhat.rhn.manager.kickstart.KickstartSessionCreateCommand;
+
+import org.apache.log4j.Logger;
+
+import java.util.List;
+
+
+/**
+ * Class responsible for executing one-time upgrade logic
+ *
+ * @version $Rev$
+ */
+public class UpgradeCommand extends BaseTransactionCommand {
+
+ /**
+ * Logger for this class
+ */
+ private static Logger log = Logger.getLogger(UpgradeCommand.class);
+
+ public static final String UPGRADE_TASK_NAME = "upgrade_satellite_";
+ public static final String UPGRADE_KS_PROFILES =
+ UPGRADE_TASK_NAME + "kickstart_profiles";
+
+ /**
+ * Constructor
+ */
+ public UpgradeCommand() {
+ super(log);
+ }
+
+
+ /**
+ * Excute the upgrade step
+ */
+ public void store() {
+ try {
+ HibernateFactory.getSession().beginTransaction();
+ List upgradeTasks = TaskFactory.getTaskListByNameLike(UPGRADE_TASK_NAME);
+ // Loop over upgrade tasks and execute the steps.
+ for (int i = 0; i < upgradeTasks.size(); i++) {
+ Task t = (Task) upgradeTasks.get(i);
+ // Use WARN because we want this logged.
+ if (t != null) {
+ log.warn("got upgrade task: " + t.getName());
+ if (t.getName().equals(UPGRADE_KS_PROFILES)) {
+ processKickstartProfiles();
+ TaskFactory.remove(t);
+ }
+ }
+ }
+ }
+ catch (Exception e) {
+ log.error("Problem upgrading!", e);
+ HibernateFactory.rollbackTransaction();
+
+ }
+ finally {
+ handleTransaction();
+ }
+ }
+
+ private void processKickstartProfiles() {
+ // Use WARN here because we want this operation logged.
+ log.warn("Processing ks profiles.");
+ List allKickstarts = KickstartFactory.listAllKickstartData();
+ for (int i = 0; i < allKickstarts.size(); i++) {
+ KickstartData ksdata = (KickstartData) allKickstarts.get(i);
+ KickstartSession ksession =
+ KickstartFactory.lookupDefaultKickstartSessionForKickstartData(ksdata);
+ if (ksession == null) {
+ log.warn("Kickstart does not have a session: id: " +
ksdata.getId() +
+ " label: " + ksdata.getLabel());
+ KickstartSessionCreateCommand kcmd = new KickstartSessionCreateCommand(
+ ksdata.getOrg(), ksdata);
+ kcmd.store();
+ log.warn("Created kickstart session and key");
+ }
+
+ }
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
new file mode 100644
index 0000000..4175fb5
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.manager.satellite.test;
+
+import com.redhat.rhn.domain.kickstart.KickstartData;
+import com.redhat.rhn.domain.kickstart.KickstartFactory;
+import com.redhat.rhn.domain.kickstart.KickstartSession;
+import com.redhat.rhn.domain.task.Task;
+import com.redhat.rhn.domain.task.TaskFactory;
+import com.redhat.rhn.frontend.action.kickstart.test.KickstartTestHelper;
+import com.redhat.rhn.manager.satellite.UpgradeCommand;
+import com.redhat.rhn.testing.BaseTestCaseWithUser;
+
+import java.util.List;
+
+
+public class UpgradeCommandTest extends BaseTestCaseWithUser {
+
+ public void testUpgradeProfiles() throws Exception {
+ KickstartData ksd = KickstartTestHelper.createTestKickStart(user);
+
+ KickstartSession ksession =
+ KickstartFactory.lookupDefaultKickstartSessionForKickstartData(ksd);
+ assertNull(ksession);
+ TaskFactory.createTask(user.getOrg(),
+ UpgradeCommand.UPGRADE_KS_PROFILES, new Long(0));
+
+ List l = TaskFactory.getTaskListByNameLike(
+ UpgradeCommand.UPGRADE_KS_PROFILES);
+ assertTrue(l.get(0) instanceof Task);
+
+ // UpgradeCommand its its own transaction so we gotta commit.
+ commitAndCloseSession();
+
+ UpgradeCommand cmd = new UpgradeCommand();
+ cmd.store();
+
+ // Check to see if the upgrade command created the default profile.
+ ksession =
+ KickstartFactory.lookupDefaultKickstartSessionForKickstartData(ksd);
+ assertNotNull(ksession);
+
+ assertNull(TaskFactory.getTaskListByNameLike(
+ UpgradeCommand.UPGRADE_KS_PROFILES));
+
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/webapp/RhnServletListener.java
b/java/code/src/com/redhat/rhn/webapp/RhnServletListener.java
index 94a7925..c81ebeb 100644
--- a/java/code/src/com/redhat/rhn/webapp/RhnServletListener.java
+++ b/java/code/src/com/redhat/rhn/webapp/RhnServletListener.java
@@ -16,6 +16,7 @@ package com.redhat.rhn.webapp;
import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.common.messaging.MessageQueue;
+import com.redhat.rhn.manager.satellite.UpgradeCommand;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
@@ -109,6 +110,17 @@ public class RhnServletListener implements ServletContextListener {
startHibernate();
logStart("Hibernate");
+
+ log.debug("Starting upgrade check");
+ executeUpgradeStep();
+ }
+
+ private void executeUpgradeStep() {
+ log.debug("calling UpgradeCommand.");
+ UpgradeCommand cmd = new UpgradeCommand();
+ cmd.store();
+ log.debug("UpgradeCommand done.");
+
}
/** {@inheritDoc} */
commit 7338082f8e853226f5d42fdfa6aabf2609f99722
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 14:01:57 2009 -0400
Automatic commit of package [spacewalk-proxy] release [0.6.8-1].
diff --git a/proxy/proxy/spacewalk-proxy.spec b/proxy/proxy/spacewalk-proxy.spec
index 86d3850..a986f07 100644
--- a/proxy/proxy/spacewalk-proxy.spec
+++ b/proxy/proxy/spacewalk-proxy.spec
@@ -4,7 +4,7 @@ Group: Applications/Internet
License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.6.7
+Version: 0.6.8
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
@@ -289,6 +289,10 @@ fi
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.8-1
+- 503187 - rewrite old config during upgrade, old file will be saved as
+ .rpmorig (msuchy(a)redhat.com)
+
* Mon Jul 06 2009 John Matthews <jmatthew(a)redhat.com> 0.6.7-1
- 509522 - remove conflicts and put provides to spacewalk-proxy-management
(msuchy(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-proxy b/rel-eng/packages/spacewalk-proxy
index 4ed2eea..d7096c3 100644
--- a/rel-eng/packages/spacewalk-proxy
+++ b/rel-eng/packages/spacewalk-proxy
@@ -1 +1 @@
-0.6.7-1 proxy/proxy/
+0.6.8-1 proxy/proxy/
commit 9a6871836be490be02f969b8f2c5d18481c57647
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 14:01:22 2009 -0400
Automatic commit of package [spacewalk-backend] release [0.6.21-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 905cb5e..44d7dd6 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.20
+Version: 0.6.21
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -568,6 +568,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.21-1
+- 512936 - Changing the custom channel rule to always defalt to org 1 for
+ custom channels unless --org option is used. This will avoid the confusion of
+ putting the channel is some random org on slaves. (pkilambi(a)redhat.com)
+
* Tue Jul 21 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.20-1
- 512960 - check for the proper attr name on rpm for header reading
(jbowes(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 5c729b3..7f82b55 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.20-1 backend/
+0.6.21-1 backend/
commit fe84db417bc4b5a94b7d7f05cbc6f6c5277f4d66
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 13:40:03 2009 -0400
Automatic commit of package [spacewalk-koan] release [0.1.17-1].
diff --git a/client/tools/spacewalk-koan/spacewalk-koan.spec
b/client/tools/spacewalk-koan/spacewalk-koan.spec
index 8d97d6e..3ff0d02 100644
--- a/client/tools/spacewalk-koan/spacewalk-koan.spec
+++ b/client/tools/spacewalk-koan/spacewalk-koan.spec
@@ -3,7 +3,7 @@ Name: spacewalk-koan
Group: System Environment/Kernel
License: GPLv2
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.1.16
+Version: 0.1.17
Release: 1%{?dist}
BuildArch : noarch
URL:
https://fedorahosted.org/spacewalk
@@ -49,6 +49,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/rhn/actions/
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.1.17-1
+- 510299 - static ks fix. (paji(a)redhat.com)
+- 510299 - Big commit to get static networking to work (paji(a)redhat.com)
+
* Mon Jul 06 2009 John Matthews <jmatthew(a)redhat.com> 0.1.16-1
- 508956 - fixing file preservation to actually use updated initrd.img
(mmccune(a)gibson.pdx.redhat.com)
diff --git a/rel-eng/packages/spacewalk-koan b/rel-eng/packages/spacewalk-koan
index c41cff2..9b859c5 100644
--- a/rel-eng/packages/spacewalk-koan
+++ b/rel-eng/packages/spacewalk-koan
@@ -1 +1 @@
-0.1.16-1 client/tools/spacewalk-koan/
+0.1.17-1 client/tools/spacewalk-koan/
commit b874c7be726bb0a43216de974beb84eec8f2d279
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 13:38:41 2009 -0400
Automatic commit of package [rhnsd] release [4.5.11-1].
diff --git a/client/rhel/rhnsd/rhnsd.spec b/client/rhel/rhnsd/rhnsd.spec
index 71f28e7..997dced 100644
--- a/client/rhel/rhnsd/rhnsd.spec
+++ b/client/rhel/rhnsd/rhnsd.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: %{name}-%{version}.tar.gz
Url:
http://rhn.redhat.com
Name: rhnsd
-Version: 4.5.10
+Version: 4.5.11
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -58,6 +58,9 @@ rm -fr $RPM_BUILD_ROOT
%{_mandir}/man8/rhnsd.8*
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 4.5.11-1
+- #503719 - fix for postun scriptlet error (pkilambi(a)redhat.com)
+
* Tue Jul 7 2009 Pradeep Kilambi <pkilambi(a)redhat.com>
- Resolves: #503719 - fix for postun scriptlet error
diff --git a/rel-eng/packages/rhnsd b/rel-eng/packages/rhnsd
index 9e96a69..db4400d 100644
--- a/rel-eng/packages/rhnsd
+++ b/rel-eng/packages/rhnsd
@@ -1 +1 @@
-4.5.10-1 client/rhel/rhnsd/
+4.5.11-1 client/rhel/rhnsd/
commit 4b79346074624b419bef590ee17a22029f86b954
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Tue Jul 21 13:34:28 2009 -0400
512936 - Changing the custom channel rule to always defalt to org 1 for custom
channels unless --org option is used. This will avoid the confusion of putting the channel
is some random org on slaves.
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index bf3cb63..601d131 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -65,6 +65,7 @@ import sync_handlers
_DEFAULT_SYSTEMID_PATH = '/etc/sysconfig/rhn/systemid'
_DEFAULT_RHN_ENTITLEMENT_CERT_BACKUP =
'/etc/sysconfig/rhn/rhn-entitlement-cert.xml'
+DEFAULT_ORG = 1
# the option object is used everywhere in this module... make it a
# global so we don't have to pass it to everyone.
@@ -874,10 +875,9 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
for t in nvrea_keys:
nevra[t] = package[t] or ""
- if OPTIONS.orgid is not None and \
- package['org_id'] is not None:
- nevra['org_id'] = OPTIONS.orgid
- package['org_id'] = OPTIONS.orgid
+ if package['org_id'] is not None:
+ nevra['org_id'] = OPTIONS.orgid or DEFAULT_ORG
+ package['org_id'] = OPTIONS.orgid or DEFAULT_ORG
else:
nevra['org_id'] = package['org_id']
@@ -959,8 +959,8 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
md5sum = package['md5sum']
package_size = package['package_size']
- if OPTIONS.orgid is not None:
- orgid = OPTIONS.orgid
+ if package['org_id'] is not None:
+ orgid = OPTIONS.orgid or DEFAULT_ORG
else:
orgid = package['org_id']
@@ -1443,9 +1443,9 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
for ks, timestamp in missing_kickstarts:
ksobj = coll.get_item(ks, timestamp=timestamp)
assert ksobj is not None
- if OPTIONS.orgid is not None and \
- ksobj['org_id'] is not None:
- ksobj['org_id'] = OPTIONS.orgid
+
+ if ksobj['org_id'] is not None:
+ ksobj['org_id'] = OPTIONS.orgid or DEFAULT_ORG
batch.append(ksobj)
importer = sync_handlers.import_kickstarts(batch)
@@ -1692,6 +1692,8 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
uq_packages[pid] = package
uq_pkg_data = uq_packages.values()
+ # check to make sure the orgs exported are valid
+ _validate_package_org(uq_pkg_data)
try:
if OPTIONS.mount_point:
importer = sync_handlers.link_channel_packages(uq_pkg_data, strict=0)
@@ -1781,9 +1783,8 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
erratum['packages'] = packages
- if OPTIONS.orgid is not None and \
- erratum['org_id'] is not None:
- erratum['org_id'] = OPTIONS.orgid
+ if erratum['org_id'] is not None:
+ erratum['org_id'] = OPTIONS.orgid or DEFAULT_ORG
# Now fix channels
# Associate errata to only channels that are being synced
@@ -2030,9 +2031,9 @@ def _validate_package_org(batch):
elif orgid:
# if options.orgid specified use it
pkg['org_id'] = orgid
- elif pkg['org_id'] not in orgs:
+ else:
# org from server is not valid
- pkg['org_id'] = 1
+ pkg['org_id'] = DEFAULT_ORG
def _getImportedChannels():
"Retrieves the channels already imported in the satellite's database"
diff --git a/backend/satellite_tools/sync_handlers.py
b/backend/satellite_tools/sync_handlers.py
index 567f8ee..48645ef 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -27,6 +27,8 @@ import xmlSource
import syncCache
import syncLib
+DEFAULT_ORG = 1
+
class NoFreeEntitlementsError(Exception):
"No free entitlements available to activate this satellite"
@@ -198,11 +200,9 @@ def import_channels(channels, orgid=None):
# finally if the orgs differ so we might wanna use
# requested org's channel-family.
# TODO: Move these checks somewhere more appropriate
- if not orgid and c_obj['org_id'] is not None and \
- c_obj['org_id'] not in orgs:
+ if not orgid and c_obj['org_id'] is not None:
#If the src org is not present default to org 1
- orgid = 1
-
+ orgid = DEFAULT_ORG
if orgid is not None and c_obj['org_id'] is not None and \
c_obj['org_id'] != orgid:
#Only set the channel family if its a custom channel
@@ -211,6 +211,7 @@ def import_channels(channels, orgid=None):
family['label'] = 'private-channel-family-' + \
str(c_obj['org_id'])
+ syncLib.log(1, "Syncing Channel to Org %s " % c_obj['org_id'])
batch.append(c_obj)
importer = channelImport.ChannelImport(batch, diskImportLib.get_backend())
commit 8db5db224231ec636c78d08ca974b5f977328693
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 13:29:57 2009 -0300
Automatic commit of package [spacewalk-backend] release [0.6.20-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 8a7f5a4..905cb5e 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.19
+Version: 0.6.20
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -568,6 +568,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Jul 21 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.20-1
+- 512960 - check for the proper attr name on rpm for header reading
+ (jbowes(a)redhat.com)
+
* Thu Jul 16 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.19-1
- 512236 - the org id checks were defaulting to None in custom channel cases
instead of 1. Also the metadata sting frommaster is a string None so we need
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 3ded2a7..5c729b3 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.19-1 backend/
+0.6.20-1 backend/
commit ef3bece2f536e2ea86456e872f53fa47b18dfc6d
Author: James Bowes <jbowes(a)redhat.com>
Date: Tue Jul 21 11:07:47 2009 -0400
512960 - check for the proper attr name on rpm for header reading
diff --git a/backend/common/rhn_rpm.py b/backend/common/rhn_rpm.py
index 3d0efcc..e1b275e 100644
--- a/backend/common/rhn_rpm.py
+++ b/backend/common/rhn_rpm.py
@@ -268,7 +268,7 @@ def get_package_header(filename=None, file=None, fd=None):
if hdr is None:
raise InvalidPackageError
else:
- if hasattr(rpm, 'rpmHeaderFromFD'):
+ if hasattr(rpm, 'readHeaderFromFD'):
header_start, header_end = \
get_header_byte_range(os.fdopen(os.dup(file_desc)))
os.lseek(file_desc, header_start, 0)
commit 2ac921f1405577ed1bfa7f8ac2cc2a7ea8d4fefd
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 11:57:36 2009 -0400
Automatic commit of package [spacewalk-selinux] release [0.6.13-1].
diff --git a/rel-eng/packages/spacewalk-selinux b/rel-eng/packages/spacewalk-selinux
index 7492603..322ef83 100644
--- a/rel-eng/packages/spacewalk-selinux
+++ b/rel-eng/packages/spacewalk-selinux
@@ -1 +1 @@
-0.6.12-1 selinux/spacewalk-selinux/
+0.6.13-1 selinux/spacewalk-selinux/
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux.spec
b/selinux/spacewalk-selinux/spacewalk-selinux.spec
index 3673275..7ce33b0 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux.spec
+++ b/selinux/spacewalk-selinux/spacewalk-selinux.spec
@@ -7,7 +7,7 @@
%define modulename spacewalk
Name: spacewalk-selinux
-Version: 0.6.12
+Version: 0.6.13
Release: 1%{?dist}
Summary: SELinux policy module supporting Spacewalk Server
@@ -115,6 +115,10 @@ fi
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.13-1
+- Disabling requires on spacewalk-monitoring-selinux. (temporary)
+ (dgoodwin(a)redhat.com)
+
* Thu Jul 2 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.12-1
- 509369 - run restorecon for /var/www/html/pub since its content is not owned by any
package
commit 24d279e5b44186f695f9471065b05e3a3f7230d3
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 11:47:11 2009 -0400
Automatic commit of package [spacewalk-branding] release [0.6.8-1].
diff --git a/branding/spacewalk-branding.spec b/branding/spacewalk-branding.spec
index eb017b7..aade6ce 100644
--- a/branding/spacewalk-branding.spec
+++ b/branding/spacewalk-branding.spec
@@ -1,5 +1,5 @@
Name: spacewalk-branding
-Version: 0.6.7
+Version: 0.6.8
Release: 1%{?dist}
Summary: Spacewalk branding data
@@ -68,6 +68,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.8-1
+- 510146 - Update copyright years from 2002-08 to 2002-09.
+ (dgoodwin(a)redhat.com)
+
* Tue Jun 30 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.7-1
- 508710 - make bar on top of page wider, so we do not get empty space on wider displays
diff --git a/rel-eng/packages/spacewalk-branding b/rel-eng/packages/spacewalk-branding
index 660ed0e..105a0b1 100644
--- a/rel-eng/packages/spacewalk-branding
+++ b/rel-eng/packages/spacewalk-branding
@@ -1 +1 @@
-0.6.7-1 branding/
+0.6.8-1 branding/
commit f40dbc02e1d7dfefcf2063f516e0fbf70b4bdc64
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 11:39:21 2009 -0400
Automatic commit of package [spacewalk-config] release [0.6.9-1].
diff --git a/rel-eng/packages/spacewalk-config b/rel-eng/packages/spacewalk-config
index e483978..5b41879 100644
--- a/rel-eng/packages/spacewalk-config
+++ b/rel-eng/packages/spacewalk-config
@@ -1 +1 @@
-0.6.8-1 spacewalk/config/
+0.6.9-1 spacewalk/config/
diff --git a/spacewalk/config/spacewalk-config.spec
b/spacewalk/config/spacewalk-config.spec
index d40cbd6..5e34453 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -2,7 +2,7 @@
Name: spacewalk-config
Summary: Spacewalk Configuration
-Version: 0.6.8
+Version: 0.6.9
Release: 1%{?dist}
URL:
http://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -114,6 +114,10 @@ fi
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.9-1
+- adding disable_iss flag to rhn.conf (pkilambi(a)redhat.com)
+- 511100 - Fixed upgrade scripts to include cobbler.host (paji(a)redhat.com)
+
* Thu Jun 25 2009 John Matthews <jmatthew(a)redhat.com> 0.6.8-1
- Fix mod_jk failure to load. (dgoodwin(a)redhat.com)
commit c551802f548df261f47ee81dc273e4bcc1260cc5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jul 21 17:30:26 2009 +0200
Automatic commit of package [spacewalk-web] release [0.6.13-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 2db4d0d..c744c02 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.6.12-1 web/
+0.6.13-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index a5b5842..2650f72 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.12
+Version: 0.6.13
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -317,7 +317,7 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
-* Tue Jul 21 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.12-1
+* Tue Jul 21 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.13-1
- 512440 - add cobbler-proxy.conf to older rhn proxy installer
* Thu Jul 09 2009 John Matthews <jmatthew(a)redhat.com> 0.6.11-1
commit 4e8f17f62810935d77e70707ade57dcf4732891f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jul 21 17:29:01 2009 +0200
512440 - load cobbler-proxy.conf in httpd.conf and load proxy module
diff --git a/web/html/applications/rhn-proxy/4.0/httpd/httpd.conf
b/web/html/applications/rhn-proxy/4.0/httpd/httpd.conf
index a065c7c..7cc80a1 100644
--- a/web/html/applications/rhn-proxy/4.0/httpd/httpd.conf
+++ b/web/html/applications/rhn-proxy/4.0/httpd/httpd.conf
@@ -240,7 +240,7 @@ LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
#LoadModule digest_module modules/mod_digest.so
-#LoadModule proxy_module modules/libproxy.so
+LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
@@ -318,7 +318,7 @@ AddModule mod_auth_anon.c
#AddModule mod_auth_mysql.c
#AddModule mod_auth_pgsql.c
#AddModule mod_digest.c
-#AddModule mod_proxy.c
+AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
@@ -1459,3 +1459,4 @@ CustomLog logs/ssl_request_log \
</IfDefine>
Include conf/rhn_proxy.conf
+Include conf/cobbler-proxy.conf
diff --git a/web/html/applications/rhn-proxy/4.1/httpd/httpd.conf
b/web/html/applications/rhn-proxy/4.1/httpd/httpd.conf
index a065c7c..7cc80a1 100644
--- a/web/html/applications/rhn-proxy/4.1/httpd/httpd.conf
+++ b/web/html/applications/rhn-proxy/4.1/httpd/httpd.conf
@@ -240,7 +240,7 @@ LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
#LoadModule digest_module modules/mod_digest.so
-#LoadModule proxy_module modules/libproxy.so
+LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
@@ -318,7 +318,7 @@ AddModule mod_auth_anon.c
#AddModule mod_auth_mysql.c
#AddModule mod_auth_pgsql.c
#AddModule mod_digest.c
-#AddModule mod_proxy.c
+AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
@@ -1459,3 +1459,4 @@ CustomLog logs/ssl_request_log \
</IfDefine>
Include conf/rhn_proxy.conf
+Include conf/cobbler-proxy.conf
diff --git a/web/html/applications/rhn-proxy/4.2/httpd/httpd.conf
b/web/html/applications/rhn-proxy/4.2/httpd/httpd.conf
index a065c7c..7cc80a1 100644
--- a/web/html/applications/rhn-proxy/4.2/httpd/httpd.conf
+++ b/web/html/applications/rhn-proxy/4.2/httpd/httpd.conf
@@ -240,7 +240,7 @@ LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
#LoadModule digest_module modules/mod_digest.so
-#LoadModule proxy_module modules/libproxy.so
+LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
@@ -318,7 +318,7 @@ AddModule mod_auth_anon.c
#AddModule mod_auth_mysql.c
#AddModule mod_auth_pgsql.c
#AddModule mod_digest.c
-#AddModule mod_proxy.c
+AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
@@ -1459,3 +1459,4 @@ CustomLog logs/ssl_request_log \
</IfDefine>
Include conf/rhn_proxy.conf
+Include conf/cobbler-proxy.conf
diff --git a/web/html/applications/rhn-proxy/5.0/httpd/httpd.conf
b/web/html/applications/rhn-proxy/5.0/httpd/httpd.conf
index a065c7c..7cc80a1 100644
--- a/web/html/applications/rhn-proxy/5.0/httpd/httpd.conf
+++ b/web/html/applications/rhn-proxy/5.0/httpd/httpd.conf
@@ -240,7 +240,7 @@ LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
#LoadModule digest_module modules/mod_digest.so
-#LoadModule proxy_module modules/libproxy.so
+LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
@@ -318,7 +318,7 @@ AddModule mod_auth_anon.c
#AddModule mod_auth_mysql.c
#AddModule mod_auth_pgsql.c
#AddModule mod_digest.c
-#AddModule mod_proxy.c
+AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
@@ -1459,3 +1459,4 @@ CustomLog logs/ssl_request_log \
</IfDefine>
Include conf/rhn_proxy.conf
+Include conf/cobbler-proxy.conf
commit 71858e2aecce64910ee25a348ebe2d20dea3c989
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 11:14:48 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.33-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 8d41d86..933a515 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.32
+Version: 0.6.33
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -250,6 +250,38 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.33-1
+- 512679 - Fix to guess a sensible default virt path for Xen/KVM virt type
+ (paji(a)redhat.com)
+- 510785 - Removed the 'valid' column from the ks profiles list
+ (paji(a)redhat.com)
+- 512396 - Cobbler's KS meta can store ints while our code was expecting them
+ to be all strings (paji(a)redhat.com)
+- Fixed unit tests (paji(a)redhat.com)
+- 510785 - Handled an edge case where there are NO valid trees available in KS
+ raw mode.. (paji(a)redhat.com)
+- 510785 - Major commit to deal with KS/Distro upgrade scenarios
+ (paji(a)redhat.com)
+- 509409 - rewrote package file naming when pushed from proxy
+ (shughes(a)redhat.com)
+- 510785 - modifying query to now show profiles on provisioning schedule pages
+ if the profiles cobbler id is null (jsherril(a)redhat.com)
+- 512224 - improving handling of invalid network interfaces when adding them to
+ cobbler (jsherril(a)redhat.com)
+- 510785 - updating cobbler sync tasks to ignore kickstarts and trees when the
+ tree is not able to be synced to cobbler (jsherril(a)redhat.com)
+- 511963 - fixing issue where changing distro from non-para virt to paravirt
+ would not update cobbler objects correctly (or vice-versa)
+ (jsherril(a)redhat.com)
+- 510785 - Initial stab on the Invalid KS Distro Base Path issue.
+ (paji(a)redhat.com)
+- 508331 - sha256 checksum support for yum repo generation stuff through
+ taskomatic. (pkilambi(a)redhat.com)
+- 510329 - Fix SSM package operations UI timeout. (dgoodwin(a)redhat.com)
+- 509589 - fix for org counts (shughes(a)redhat.com)
+- 510299 - Big commit to get static networking to work (paji(a)redhat.com)
+- 509409 - correct package display for rhn_package_manager (shughes(a)redhat.com)
+
* Thu Jul 09 2009 John Matthews <jmatthew(a)redhat.com> 0.6.32-1
- 510122 - ErrataSearch now filters results so it won't display errata from a
non-sharing Org (jmatthew(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 440fb75..31f2495 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.32-1 java/
+0.6.33-1 java/
commit bacd7ecb9e0c10b315f3f097279528aa9ce7bf62
Author: John Matthews <jmatthew(a)redhat.com>
Date: Tue Jul 21 11:11:54 2009 -0400
Automatic commit of package [spacewalk-setup] release [0.6.10-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index 87a7464..85d7245 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-0.6.9-1 spacewalk/setup/
+0.6.10-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index a7cf6c2..8bb58cd 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,5 +1,5 @@
Name: spacewalk-setup
-Version: 0.6.9
+Version: 0.6.10
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -100,6 +100,11 @@ rm -rf %{buildroot}
%dir %{_sysconfdir}/pki/spacewalk/jabberd
%changelog
+* Tue Jul 21 2009 John Matthews <jmatthew(a)redhat.com> 0.6.10-1
+- rhn-load-config.pl - remove accidental 's' (bbuckingham(a)redhat.com)
+- 511100 - Fixed upgrade scripts to include cobbler.host (paji(a)redhat.com)
+- 511052 - script to fix rhn_sat_node, rhn_sat_cluster (mzazrivec(a)redhat.com)
+
* Thu Jun 25 2009 Milan Zazrivec <mzazrivec(a)redhat.com> 0.6.9-1
- no in-place editing of /etc/oratab under oracle user (mzazrivec(a)redhat.com)
- remove extraneous backslash characters (mzazrivec(a)redhat.com)
commit 9ce80f1cdeed1f08b85f53d5a27dd189dce0ce55
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jul 21 16:30:06 2009 +0200
Automatic commit of package [spacewalk-web] release [0.6.12-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index d33060f..2db4d0d 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.6.11-1 web/
+0.6.12-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 9de9163..a5b5842 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.11
+Version: 0.6.12
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -317,6 +317,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Tue Jul 21 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.12-1
+- 512440 - add cobbler-proxy.conf to older rhn proxy installer
+
* Thu Jul 09 2009 John Matthews <jmatthew(a)redhat.com> 0.6.11-1
- 510146 - Update copyright years from 2002-08 to 2002-09.
(dgoodwin(a)redhat.com)
commit 5d183fb9f770eed516b21bc9841e71ebb6bcacaf
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jul 21 16:26:37 2009 +0200
512440 - add cobbler-proxy.conf to 5.1, 5.0, 4.2, 4.1, 4.0 rhn proxy installer
diff --git a/web/html/applications/rhn-proxy/4.0/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/4.0/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/4.0/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/4.0/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/4.0/install-rhn-proxy.xml
index 5f405b9..a0e0b20 100644
--- a/web/html/applications/rhn-proxy/4.0/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/4.0/install-rhn-proxy.xml
@@ -535,6 +535,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/jabberd/c2s.xml config file"
acl="global_config(ssl_available);session_data_true(enable_osad)">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/jabberd/c2s.xml"
@@ -589,6 +594,7 @@ fi
<configfile>/etc/squid/squid.conf</configfile>
<configfile>/etc/httpd/conf/httpd.conf</configfile>
<configfile>/etc/httpd/conf/rhn_proxy.conf</configfile>
+ <configfile>/etc/httpd/conf/cobbler-proxy.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.key/server.key</configfile>
diff --git a/web/html/applications/rhn-proxy/4.1/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/4.1/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/4.1/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/4.1/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/4.1/install-rhn-proxy.xml
index aa918fd..e89333f 100644
--- a/web/html/applications/rhn-proxy/4.1/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/4.1/install-rhn-proxy.xml
@@ -535,6 +535,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/jabberd/c2s.xml config file"
acl="global_config(ssl_available);session_data_true(enable_osad)">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/jabberd/c2s.xml"
@@ -589,6 +594,7 @@ fi
<configfile>/etc/squid/squid.conf</configfile>
<configfile>/etc/httpd/conf/httpd.conf</configfile>
<configfile>/etc/httpd/conf/rhn_proxy.conf</configfile>
+ <configfile>/etc/httpd/conf/cobbler-proxy.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.key/server.key</configfile>
diff --git a/web/html/applications/rhn-proxy/4.2/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/4.2/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/4.2/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/4.2/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/4.2/install-rhn-proxy.xml
index 66ded03..7b0c91e 100644
--- a/web/html/applications/rhn-proxy/4.2/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/4.2/install-rhn-proxy.xml
@@ -552,6 +552,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/jabberd/c2s.xml config file"
acl="global_config(ssl_available);session_data_true(enable_osad)">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/jabberd/c2s.xml"
@@ -606,6 +611,7 @@ fi
<configfile>/etc/squid/squid.conf</configfile>
<configfile>/etc/httpd/conf/httpd.conf</configfile>
<configfile>/etc/httpd/conf/rhn_proxy.conf</configfile>
+ <configfile>/etc/httpd/conf/cobbler-proxy.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.key/server.key</configfile>
diff --git a/web/html/applications/rhn-proxy/5.0/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/5.0/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/5.0/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/5.0/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/5.0/install-rhn-proxy.xml
index cec006a..a3e2e45 100644
--- a/web/html/applications/rhn-proxy/5.0/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/5.0/install-rhn-proxy.xml
@@ -552,6 +552,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/jabberd/c2s.xml config file"
acl="global_config(ssl_available);session_data_true(enable_osad)">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/jabberd/c2s.xml"
@@ -606,6 +611,7 @@ fi
<configfile>/etc/squid/squid.conf</configfile>
<configfile>/etc/httpd/conf/httpd.conf</configfile>
<configfile>/etc/httpd/conf/rhn_proxy.conf</configfile>
+ <configfile>/etc/httpd/conf/cobbler-proxy.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.key/server.key</configfile>
diff --git a/web/html/applications/rhn-proxy/5.1/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/5.1/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/5.1/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/5.1/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/5.1/install-rhn-proxy.xml
index f1ab7ac..69d8bb3 100644
--- a/web/html/applications/rhn-proxy/5.1/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/5.1/install-rhn-proxy.xml
@@ -547,6 +547,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf.d/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf.d/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/jabberd/c2s.xml config file"
acl="global_config(ssl_available);session_data_true(enable_osad)">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/jabberd/c2s.xml"
@@ -599,6 +604,7 @@ fi
<configfile>/etc/rhn/rhn.conf</configfile>
<configfile
acl="session_data_true(enable_monitoring)">/etc/rhn/cluster.ini</configfile>
<configfile>/etc/squid/squid.conf</configfile>
+ <configfile>/etc/httpd/conf.d/cobbler-proxy.conf</configfile>
<configfile>/etc/httpd/conf.d/rhn_proxy.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
commit b24912a165aaa6537fdff63c2776a2424039a766
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jul 21 15:26:36 2009 +0200
512440 - add cobbler-proxy.conf to 5.2 rhn proxy installer
diff --git a/web/html/applications/rhn-proxy/5.2/httpd/cobbler-proxy.conf
b/web/html/applications/rhn-proxy/5.2/httpd/cobbler-proxy.conf
new file mode 100644
index 0000000..79fb06d
--- /dev/null
+++ b/web/html/applications/rhn-proxy/5.2/httpd/cobbler-proxy.conf
@@ -0,0 +1,9 @@
+ProxyPass /cobbler_api https://${session.rhn_parent}/cobbler_api
+ProxyPassReverse /cobbler_api https://${session.rhn_parent}/cobbler_api
+
+ProxyPass /cblr https://${session.rhn_parent}/cblr
+ProxyPassReverse /cblr https://${session.rhn_parent}/cblr
+
+ProxyPass /cobbler https://${session.rhn_parent}/cobbler
+ProxyPassReverse /cobbler https://${session.rhn_parent}/cobbler
+
diff --git a/web/html/applications/rhn-proxy/5.2/install-rhn-proxy.xml
b/web/html/applications/rhn-proxy/5.2/install-rhn-proxy.xml
index 3bec25b..d5cd402 100644
--- a/web/html/applications/rhn-proxy/5.2/install-rhn-proxy.xml
+++ b/web/html/applications/rhn-proxy/5.2/install-rhn-proxy.xml
@@ -547,6 +547,11 @@ Would you like to enable Monitoring Proxy functionality on this
system?
template="httpd/rhn_proxy.conf" mode="640"
username="root" groupname="apache"/>
</activity>
+ <activity description="Generate /etc/httpd/conf.d/cobbler-proxy.conf config
file">
+ <generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf.d/cobbler-proxy.conf"
+ template="httpd/cobbler-proxy.conf"
mode="640" username="root" groupname="apache"/>
+ </activity>
+
<activity description="Generate /etc/httpd/conf.d/ssl.conf config
file">
<generate-config-file
target-config-channel="rhn_proxy_config_${system.id}"
path="/etc/httpd/conf.d/ssl.conf"
template="httpd/ssl.conf" mode="644" username="root"
groupname="root"/>
@@ -605,6 +610,7 @@ fi
<configfile
acl="session_data_true(enable_monitoring)">/etc/rhn/cluster.ini</configfile>
<configfile>/etc/squid/squid.conf</configfile>
<configfile>/etc/httpd/conf.d/rhn_proxy.conf</configfile>
+ <configfile>/etc/httpd/conf.d/cobbler-proxy.conf</configfile>
<configfile>/etc/httpd/conf.d/ssl.conf</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.crt/server.crt</configfile>
<configfile acl="global_config(ssl_available) or not
global_config(satellite)">/etc/httpd/conf/ssl.csr/server.csr</configfile>
commit 7f7c675c5c0c47d7a3315b73ad5b095be5c7e097
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 10:36:06 2009 -0300
Remove accidentally committed change.
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux.spec
b/selinux/spacewalk-selinux/spacewalk-selinux.spec
index 3772b0a..3673275 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux.spec
+++ b/selinux/spacewalk-selinux/spacewalk-selinux.spec
@@ -39,7 +39,6 @@ Requires: spacewalk-backend-server
Requires: spacewalk-certs-tools
Requires: oracle-instantclient-selinux
Requires: oracle-instantclient-sqlplus-selinux
-Requires: spacewalk-monitoring-selinux
%description
SELinux policy module supporting Spacewalk Server.
commit 222c4ff455f864e0e7536385c621d0bab68b3037
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 10:35:20 2009 -0300
Automatic commit of package [spacewalk-monitoring] release [0.6.6-1].
diff --git a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
index fff174b..fed7e34 100644
--- a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
+++ b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
@@ -14,7 +14,7 @@
Summary: Spacewalk monitoring
Name: spacewalk-monitoring
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.6.5
+Version: 0.6.6
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
License: GPLv2
@@ -123,7 +123,7 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
-* Tue Jul 21 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.5-1
+* Tue Jul 21 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.6-1
- Disabling requires on spacewalk-monitoring-selinux. (temporary)
(dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-monitoring
b/rel-eng/packages/spacewalk-monitoring
index a77d490..d414f1c 100644
--- a/rel-eng/packages/spacewalk-monitoring
+++ b/rel-eng/packages/spacewalk-monitoring
@@ -1 +1 @@
-0.6.5-1 monitoring/spacewalk-monitoring/
+0.6.6-1 monitoring/spacewalk-monitoring/
commit 582b37a212858fbdd02a86e30087ace3bec52229
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 10:32:33 2009 -0300
No requires for monitoring selinux package on Fedora 11. (yet)
diff --git a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
index 8a4ffc0..fff174b 100644
--- a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
+++ b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
@@ -1,3 +1,16 @@
+%define require_selinux 1
+
+# No Selinux for RHEL 4:
+%if 0%{?rhel} == 4
+%define require_selinux 0
+%endif
+
+# No seliux for Fedora 11 (yet):
+%if 0%{?fedora} == 11
+%define require_selinux 0
+%endif
+
+
Summary: Spacewalk monitoring
Name: spacewalk-monitoring
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -47,11 +60,10 @@ Requires: SputLite-server
Requires: ssl_bridge
Requires: status_log_acceptor
Requires: tsdb
-#%if 0%{?rhel} == 4
-#for rhel4 we have no selinux policy, everything else should have
-#%else
-#Requires: spacewalk-monitoring-selinux
-#%endif
+
+%if %{require_selinux}
+Requires: spacewalk-monitoring-selinux
+%endif
Requires(post): chkconfig
Requires(preun): chkconfig
commit fbe41f868a3d731d8a0abd343ff0873b53aec2b9
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 09:57:54 2009 -0300
Automatic commit of package [spacewalk-monitoring] release [0.6.5-1].
diff --git a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
index df71450..8a4ffc0 100644
--- a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
+++ b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
@@ -1,7 +1,7 @@
Summary: Spacewalk monitoring
Name: spacewalk-monitoring
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.6.4
+Version: 0.6.5
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
License: GPLv2
@@ -111,6 +111,10 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue Jul 21 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.5-1
+- Disabling requires on spacewalk-monitoring-selinux. (temporary)
+ (dgoodwin(a)redhat.com)
+
* Mon May 11 2009 Jan Pazdziora 0.6.4-1
- Move Req of oracle-instantclient-selinux to spacewalk-monitoring-selinux
diff --git a/rel-eng/packages/spacewalk-monitoring
b/rel-eng/packages/spacewalk-monitoring
index fa4a675..a77d490 100644
--- a/rel-eng/packages/spacewalk-monitoring
+++ b/rel-eng/packages/spacewalk-monitoring
@@ -1 +1 @@
-0.6.4-1 monitoring/spacewalk-monitoring/
+0.6.5-1 monitoring/spacewalk-monitoring/
commit db366bb19df902e4a207b4331aec455e58edad48
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jul 21 09:56:09 2009 -0300
Disabling requires on spacewalk-monitoring-selinux. (temporary)
diff --git a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
index 29c2d47..df71450 100644
--- a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
+++ b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
@@ -47,11 +47,11 @@ Requires: SputLite-server
Requires: ssl_bridge
Requires: status_log_acceptor
Requires: tsdb
-%if 0%{?rhel} == 4
+#%if 0%{?rhel} == 4
#for rhel4 we have no selinux policy, everything else should have
-%else
-Requires: spacewalk-monitoring-selinux
-%endif
+#%else
+#Requires: spacewalk-monitoring-selinux
+#%endif
Requires(post): chkconfig
Requires(preun): chkconfig
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux.spec
b/selinux/spacewalk-selinux/spacewalk-selinux.spec
index 3673275..3772b0a 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux.spec
+++ b/selinux/spacewalk-selinux/spacewalk-selinux.spec
@@ -39,6 +39,7 @@ Requires: spacewalk-backend-server
Requires: spacewalk-certs-tools
Requires: oracle-instantclient-selinux
Requires: oracle-instantclient-sqlplus-selinux
+Requires: spacewalk-monitoring-selinux
%description
SELinux policy module supporting Spacewalk Server.
commit d7951318895277bc197a9b14b8c0e03664c1bf69
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Tue Jul 21 14:05:29 2009 +0200
don't remove xml-commons-apis during upgrade
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index f91f7dc..18b4d41 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -534,7 +534,7 @@ sub remove_obsoleted_packages {
print "* Purging conflicting packages.\n";
my @pkgs = ('rhn-apache', 'rhn-modpython', 'rhn-modssl',
'rhn-modperl',
'perl-libapreq', 'bouncycastle-jdk1.4',
- 'xml-commons-apis', 'quartz-oracle', 'jaf',
'jta');
+ 'quartz-oracle', 'jaf', 'jta');
for my $pkg (@pkgs) {
if (system_debug('rpm', '-q', $pkg) == 0) {
system_debug('rpm', '-ev', '--nodeps', $pkg);
commit 692ae7d04a17cfe598557ae732e3ca42535c7d5f
Author: Partha Aji <paji(a)redhat.com>
Date: Mon Jul 20 16:54:47 2009 -0400
512679 - Fix to guess a sensible default virt path for Xen/KVM virt type
diff --git a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
index 895a0c1..d1e5065 100644
--- a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
+++ b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
@@ -135,8 +135,10 @@ public class ConfigDefaults {
public static final String COBBLER_SNIPPETS_DIR = "cobbler.snippets.dir";
private static final String DEFAULT_COBBLER_SNIPPET_DIR =
"/var/lib/cobbler/snippets";
- public static final String VIRT_PATH_DIR = "kickstart.virt_storage_path";
- private static final String DEFAULT_VIRT_PATH = "/var/lib/libvirt/images";
+ public static final String KVM_VIRT_PATH_DIR =
"kickstart.virt_storage_path_kvm";
+ public static final String XEN_VIRT_PATH_DIR =
"kickstart.virt_storage_path_xen";
+ private static final String DEFAULT_XEN_VIRT_PATH = "/var/lib/xen/images";
+ private static final String DEFAULT_KVM_VIRT_PATH =
"/var/lib/libvirt/images";
public static final String VIRT_BRIDGE = "kickstart.virt_bridge";
public static final String VIRT_MEM = "kickstart.virt_mem_size_mb";
public static final String VIRT_CPU = "kickstart.virt_cpus";
@@ -246,10 +248,13 @@ public class ConfigDefaults {
/**
* Returns the base directory where the virt artifacts will be stored.
* This information is used while setting up system records and so on..
+ * @param xen true if the virt path required is for a xen virt type.
* @return the virt path..
*/
- public File getVirtPath() {
- return new File(Config.get().getString(VIRT_PATH_DIR, DEFAULT_VIRT_PATH));
+ public File getVirtPath(boolean xen) {
+ String virtPath = xen ? XEN_VIRT_PATH_DIR : KVM_VIRT_PATH_DIR;
+ String defaultVirtPath = xen ? DEFAULT_XEN_VIRT_PATH : DEFAULT_KVM_VIRT_PATH;
+ return new File(Config.get().getString(virtPath, defaultVirtPath));
}
/**
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
index 3e5ad9d..3744a7e 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
@@ -52,7 +52,7 @@ public class ProvisionVirtualizationWizardAction extends
ScheduleKickstartWizard
public static final String VIRTUAL_BRIDGE = "virtBridge";
public static final String VIRTUAL_FILE_PATH = "diskPath";
public static final String LOCAL_STORAGE_MB = "localStorageMegabytes";
- public static final String PROFILE = "profile";
+ public static final String PROFILE = "cobbler_profile";
public static final String GUEST_NAME = "guestName";
public static final int MIN_NAME_SIZE = 4;
@@ -97,10 +97,14 @@ public class ProvisionVirtualizationWizardAction extends
ScheduleKickstartWizard
//saveMessages(ctx.getRequest(), errors);
return runFirst(mapping, form, ctx, response, step);
}
+ ActionForward forward = super.runSecond(mapping, form, ctx, response, step);
+
Profile pf = getCobblerProfile(ctx);
+ KickstartData ksdata = ctx.lookupAndBindKickstartData();
if (StringUtils.isEmpty(form.getString(VIRTUAL_FILE_PATH))) {
form.set(VIRTUAL_FILE_PATH, ProvisionVirtualInstanceCommand.
- makeDefaultVirtPath(form.getString(GUEST_NAME)));
+ makeDefaultVirtPath(form.getString(GUEST_NAME),
+ ksdata.getKickstartDefaults().getVirtualizationType()));
}
if (StringUtils.isEmpty(form.getString(MEMORY_ALLOCATION))) {
form.set(MEMORY_ALLOCATION, String.valueOf(pf.getVirtRam()));
@@ -122,7 +126,7 @@ public class ProvisionVirtualizationWizardAction extends
ScheduleKickstartWizard
form.set(TARGET_PROFILE_TYPE,
KickstartScheduleCommand.TARGET_PROFILE_TYPE_NONE);
}
- return super.runSecond(mapping, form, ctx, response, step);
+ return forward;
}
/**
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
index 0737a65..77ce4dd 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
@@ -25,6 +25,7 @@ import com.redhat.rhn.domain.action.kickstart.KickstartGuestAction;
import com.redhat.rhn.domain.kickstart.KickstartData;
import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.KickstartSession;
+import com.redhat.rhn.domain.kickstart.KickstartVirtualizationType;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.kickstart.KickstartDto;
@@ -304,7 +305,8 @@ public class ProvisionVirtualInstanceCommand extends
KickstartScheduleCommand {
public void setFilePath(String filePathIn) {
this.filePath = filePathIn;
if (StringUtils.isBlank(filePath)) {
- filePath = makeDefaultVirtPath(getGuestName());
+ filePath = makeDefaultVirtPath(getGuestName(),
+ getKsdata().getKickstartDefaults().getVirtualizationType());
}
}
@@ -327,11 +329,16 @@ public class ProvisionVirtualInstanceCommand extends
KickstartScheduleCommand {
/**
* Method to set up the default virt path where the guset will be stored
* based on the guest name.
- * @param name the name of the guest
+ * @param name the name of the guest
+ * @param type virtualization type to determine the virt paths
+ * its different for xen/kvm
* @return the virt path.
*/
- public static String makeDefaultVirtPath(String name) {
- File virtPathDir = ConfigDefaults.get().getVirtPath();
+ public static String makeDefaultVirtPath(String name,
+ KickstartVirtualizationType type) {
+ File virtPathDir = ConfigDefaults.get().getVirtPath(
+ KickstartVirtualizationType.xenPV().equals(type) ||
+ KickstartVirtualizationType.xenFV().equals(type));
File virtPath = new File(virtPathDir, name.replace(' ', '-'));
return virtPath.getAbsolutePath();
}
commit d6e2e13a13343a823cb905ea80fdfd396c134b7e
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Mon Jul 20 15:18:54 2009 -0300
Automatic commit of package [spacewalk] release [0.6.2-1].
diff --git a/rel-eng/packages/spacewalk b/rel-eng/packages/spacewalk
index f689992..c981907 100644
--- a/rel-eng/packages/spacewalk
+++ b/rel-eng/packages/spacewalk
@@ -1 +1 @@
-0.6.1-1 spacewalk/package/
+0.6.2-1 spacewalk/package/
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index 41ea5e5..895c512 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -1,6 +1,6 @@
%define release_name Alpha
Name: spacewalk
-Version: 0.6.1
+Version: 0.6.2
Release: 1%{?dist}
Summary: Spacewalk Systems Management Application
URL:
https://fedorahosted.org/spacewalk
@@ -92,6 +92,9 @@ rm -rf %{buildroot}
/%{_sysconfdir}/spacewalk-release
%changelog
+* Mon Jul 20 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.2-1
+- Disabling spacewalk selinux support temporarily. (dgoodwin(a)redhat.com)
+
* Fri Apr 17 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.1-1
- bump Versions to 0.6.0 (jesusr(a)redhat.com)
commit efc2880b6a3b7814f4a236b1e55455c427edde62
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Mon Jul 20 15:16:06 2009 -0300
tito: Fix md5 issues for el5.
Related somehow to new stronger hashes introduced in Fedora 11.
While we only really want this for el5, the defines are harmless for
other builds.
diff --git a/rel-eng/lib/spacewalk/releng/builder.py
b/rel-eng/lib/spacewalk/releng/builder.py
index 52e0101..8fe6e39 100644
--- a/rel-eng/lib/spacewalk/releng/builder.py
+++ b/rel-eng/lib/spacewalk/releng/builder.py
@@ -182,7 +182,7 @@ class Builder(object):
elif dist:
define_dist = "--define 'dist %s'" % dist
- cmd = "rpmbuild %s %s --nodeps -bs %s" % \
+ cmd = 'rpmbuild --define "_source_filedigest_algorithm md5"
--define "_binary_filedigest_algorithm md5" %s %s --nodeps -bs %s' % \
(self._get_rpmbuild_dir_options(), define_dist, self.spec_file)
output = run_command(cmd)
print(output)
@@ -200,7 +200,7 @@ class Builder(object):
define_dist = ""
if self.dist:
define_dist = "--define 'dist %s'" % self.dist
- cmd = "rpmbuild %s %s --clean -ba %s" % \
+ cmd = 'rpmbuild --define "_source_filedigest_algorithm md5"
--define "_binary_filedigest_algorithm md5" %s %s --clean -ba %s' % \
(self._get_rpmbuild_dir_options(), define_dist, self.spec_file)
output = run_command(cmd)
print output
commit 34124fc9516ad179c88d504c4554af169a9c388d
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Mon Jul 20 15:14:28 2009 -0300
Disabling spacewalk selinux support temporarily.
Some of these packages are not buildable on Fedora 11, and selinux is
blocking httpd on EL5 as well.
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index 9a34fa9..41ea5e5 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -62,10 +62,10 @@ Requires: spacewalk-monitoring
# Requires: rhn_solaris_bootstrap_5_1_0_3
# SELinux
-Requires: spacewalk-selinux
-Requires: jabberd-selinux
-Requires: osa-dispatcher-selinux
-Requires: spacewalk-monitoring-selinux
+#Requires: spacewalk-selinux
+#Requires: jabberd-selinux
+#Requires: osa-dispatcher-selinux
+#Requires: spacewalk-monitoring-selinux
%description
commit 64b21392f5c9f2243c68a36fe6c680a85b274567
Author: Partha Aji <paji(a)redhat.com>
Date: Mon Jul 20 14:11:00 2009 -0400
510785 - Removed the 'valid' column from the ks profiles list
This is a useless column since the issue is with Distros not being valid
and not profiles. So the Distros list will show invalid distros
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/kickstart/KickstartDto.java
b/java/code/src/com/redhat/rhn/frontend/dto/kickstart/KickstartDto.java
index 5d3bb30..c7e9819 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/kickstart/KickstartDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/kickstart/KickstartDto.java
@@ -25,7 +25,6 @@ import org.apache.commons.lang.StringUtils;
* @version $Rev: 50942 $
*/
public class KickstartDto extends BaseDto {
- private boolean valid;
private Long id;
private Long orgId;
private Long kstreeId;
@@ -258,26 +257,4 @@ public class KickstartDto extends BaseDto {
public void setVirtBridge(String virtBridgeIn) {
this.virtBridge = virtBridgeIn;
}
-
- /**
- * Checks if the profile is valid
- * @return true if it is valid..
- */
- public boolean isValid() {
- if (isCobbler()) {
- return true;
- }
- if (StringUtils.isBlank(cobblerId)) {
- return false;
- }
- return valid;
- }
-
- /**
- * true if the profile is valid
- * @param isValid if the profile is valid
- */
- public void setValid(boolean isValid) {
- valid = isValid;
- }
}
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java
index d12b01d..39c9523 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java
@@ -29,6 +29,7 @@ import com.redhat.rhn.frontend.listview.PageControl;
import com.redhat.rhn.manager.BaseManager;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerXMLRPCHelper;
+import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.cobbler.CobblerConnection;
import org.cobbler.Distro;
@@ -95,16 +96,6 @@ public class KickstartLister extends BaseManager {
logger.debug("kickstartsInOrg(Org, PageControl) - end - return
value=" +
returnDataResult);
}
-
- Set<Long> ids = new HashSet<Long>();
- List<KickstartableTree> trees = KickstartManager.getInstance().
-
removeInvalid(KickstartFactory.lookupAccessibleTreesByOrg(orgIn));
- for (KickstartableTree tree : trees) {
- ids.add(tree.getId());
- }
- for (KickstartDto dto : returnDataResult) {
- dto.setValid(ids.contains(dto.getKstreeId()));
- }
return returnDataResult;
}
@@ -437,9 +428,34 @@ public class KickstartLister extends BaseManager {
public List <KickstartDto> listProfilesForSsm(User user) {
List <KickstartDto> ret = new LinkedList<KickstartDto>();
ret.addAll(kickstartsInOrg(user.getOrg(), null));
+ pruneInvalid(user, ret);
ret.addAll(listCobblerProfiles(user));
setKickstartUrls(ret, user);
return ret;
}
-
+
+ /**
+ * Given a list of Kickstart DTOs
+ * the code below removes all the profiles
+ * that are associated to an invalid distro.
+ * or not synced to spacewalk. Mainly used in schedule* pages
+ * @param user the user to get org info.
+ * @param profiles the kickstart dto list to be pruned
+ */
+ public void pruneInvalid(User user, List<KickstartDto> profiles) {
+ Set<Long> ids = new HashSet<Long>();
+ List<KickstartableTree> trees = KickstartManager.getInstance().
+ removeInvalid(KickstartFactory.
+ lookupAccessibleTreesByOrg(user.getOrg()));
+ for (KickstartableTree tree : trees) {
+ ids.add(tree.getId());
+ }
+ for (Iterator<KickstartDto> itr = profiles.iterator(); itr.hasNext();) {
+ KickstartDto dto = itr.next();
+ if (StringUtils.isBlank(dto.getCobblerId()) ||
+ !ids.contains(dto.getKstreeId())) {
+ itr.remove();
+ }
+ }
+ }
}
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index 717683e..ff57259 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -404,6 +404,8 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
log.debug("got back from DB: " + retval);
}
KickstartLister.getInstance().setKickstartUrls(retval, user);
+ KickstartLister.getInstance().pruneInvalid(user, retval);
+ retval.setTotalSize(retval.size());
}
}
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/kickstarts.jsp
b/java/code/webapp/WEB-INF/pages/kickstart/kickstarts.jsp
index de3f3f0..fc8969b 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/kickstarts.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/kickstarts.jsp
@@ -61,7 +61,7 @@
<rl:column headerkey="kickstart.distro.label.jsp"
sortattr="treeLabel">
<c:out value="${current.treeLabel}"/>
</rl:column>
- <rl:column headerkey="kickstart.distro.sw_managed.jsp"
sortattr="cobbler">
+ <rl:column headerkey="kickstart.distro.sw_managed.jsp"
sortattr="cobbler" styleclass="last-column">
<c:choose>
<c:when test="${current.cobbler}">
<img src="/img/rhn-listicon-error.gif">
@@ -71,17 +71,7 @@
</c:otherwise>
</c:choose>
</rl:column>
- <rl:column
headertext="${rhn:localize('kickstart.distro.is-valid.jsp')}?***"
sortattr="valid" styleclass="last-column">
- <c:choose>
- <c:when test="${current.valid}">
- <img src="/img/rhn-listicon-checked.gif">
- </c:when>
- <c:otherwise>
- <img src="/img/rhn-listicon-error.gif">
- </c:otherwise>
- </c:choose>
- </rl:column>
- </rl:list>
+ </rl:list>
</rl:listset>
</div>
@@ -89,8 +79,6 @@
<c:if test="${not empty requestScope.orgDefaultExists}">
<p><rhn:tooltip>** - <bean:message
key="kickstart.list.jsp.orgdefault"/></rhn:tooltip></p>
</c:if>
- <p><rhn:tooltip>***-<bean:message
key="kickstarts.profile.is-valid.tooltip"/></rhn:tooltip></p>
-
</body>
</html:html>
commit db1c74f458810578ee7f7ad73c5df233f29a9362
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Mon Jul 20 14:47:01 2009 -0300
Automatic commit of package [perl-NOCpulse-OracleDB] release [1.28.16-1].
diff --git a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
index d7def1f..770c756 100644
--- a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
+++ b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-OracleDB
-Version: 1.28.14
+Version: 1.28.16
Release: 1%{?dist}
Summary: Perl modules for NOCpulse Oracle database access
URL:
https://fedorahosted.org/spacewalk
@@ -47,7 +47,7 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorlib}/NOCpulse/*
%changelog
-* Mon Jul 20 2009 Devan Goodwin <dgoodwin(a)redhat.com> 1.28.14-1
+* Mon Jul 20 2009 Devan Goodwin <dgoodwin(a)redhat.com> 1.28.16-1
- Dropping unecessary perl-NOCpulse-OracleDB build requires.
(dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/perl-NOCpulse-OracleDB
b/rel-eng/packages/perl-NOCpulse-OracleDB
index dc11b35..db5e264 100644
--- a/rel-eng/packages/perl-NOCpulse-OracleDB
+++ b/rel-eng/packages/perl-NOCpulse-OracleDB
@@ -1 +1 @@
-1.28.14-1 monitoring/PerlModules/NP/OracleDB/
+1.28.16-1 monitoring/PerlModules/NP/OracleDB/