rel-eng/packages schema/spacewalk
by Jan Pazdziora
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 7d77c21f2694aca6967df433a9caaf341d07d45b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 16:05:50 2011 +0100
Automatic commit of package [spacewalk-schema] release [1.6.30-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index aa6502d..369f8ad 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.6.29-1 schema/spacewalk/
+1.6.30-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 0db1edd..24d86f2 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: 1.6.29
+Version: 1.6.30
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Fri Nov 25 2011 Jan Pazdziora 1.6.30-1
+- Fix the in out parameter handling.
+
* Wed Nov 23 2011 Jan Pazdziora 1.6.29-1
- Fixing wrong plpgsql code.
12 years, 4 months
schema/spacewalk
by Jan Pazdziora
schema/spacewalk/postgres/procs/rhn_install_org_satellites.sql | 9 -
schema/spacewalk/postgres/procs/rhn_prepare_install.sql | 12 -
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.postgresql | 65 ++++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.postgresql | 58 ++++++++
6 files changed, 132 insertions(+), 14 deletions(-)
New commits:
commit 28b6f726afc85b39b3b7e3a286c53a9e7dc126b8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 16:04:32 2011 +0100
Fix the in out parameter handling.
Addressing
RHN::Exception: DBD::Pg::st execute failed: ERROR: null value in column "instance_id" violates not-null constraint
CONTEXT: SQL statement "insert into rhn_command_queue_execs ( instance_id, netsaint_id, target_type) values ( $1 , $2 , 'cluster')"
PL/pgSQL function "rhn_install_satellite" line 3 at SQL statement
SQL statement "SELECT rhn_install_satellite( $1 , $2 )"
PL/pgSQL function "rhn_install_org_satellites" line 22 at PERFORM
diff --git a/schema/spacewalk/postgres/procs/rhn_install_org_satellites.sql b/schema/spacewalk/postgres/procs/rhn_install_org_satellites.sql
index 795f02c..bac9cca 100644
--- a/schema/spacewalk/postgres/procs/rhn_install_org_satellites.sql
+++ b/schema/spacewalk/postgres/procs/rhn_install_org_satellites.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 b9bd7f56e2221a312bc645e6ca038773d44b9808
--- retrieved from ./1239902810/d1e38d32416384088c1f0c047c60d31ece6de98f/schema/spacewalk/oracle/procs/rhn_install_org_satellites.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2011 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
@@ -14,10 +13,6 @@
-- granted to use or replicate Red Hat trademarks that are incorporated
-- in this software or its documentation.
--
---
---
---
---
--monitoring stored procedure
@@ -52,7 +47,7 @@ declare
command_instance_id rhn_command_queue_instances.recid%type;
begin
- perform rhn_prepare_install(username, command_instance_id, 1);
+ command_instance_id := rhn_prepare_install(username, 1);
for satellite in satellite_cursor loop
perform rhn_install_satellite(command_instance_id, satellite.recid);
diff --git a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
index 3e60703..fe831c2 100644
--- a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
+++ b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 8dfbb8448ca026263ca954a7955097cc07e0c9a5
--- retrieved from ./1280312663/c1e5d91082adf7f8599a7b7429b11f995c7cf7e7/schema/spacewalk/oracle/procs/rhn_prepare_install.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2011 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
@@ -14,10 +13,6 @@
-- granted to use or replicate Red Hat trademarks that are incorporated
-- in this software or its documentation.
--
---
---
---
---
--monitoring stored procedure
@@ -25,9 +20,9 @@ create or replace function
rhn_prepare_install
(
username in rhn_command_queue_instances.last_update_user%type,
- command_instance_id in out rhn_command_queue_instances.recid%type,
install_command in rhn_command_queue_instances.command_id%type
)
+returns rhn_command_queue_instances.recid%type
as $$
declare
/* ignore this command if it has not been run after five minutes */
@@ -36,6 +31,7 @@ declare
/* should take no more than five minutes to run the install */
max_execution_time_seconds numeric := 10 * 60;
+ command_instance_id rhn_command_queue_instances.recid%type;
begin
select nextval('rhn_command_q_inst_recid_seq')
into command_instance_id;
@@ -63,5 +59,7 @@ begin
username,
current_timestamp
);
+
+ return command_instance_id;
end; $$
language plpgsql;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.oracle
new file mode 100644
index 0000000..b7b00b1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.oracle
@@ -0,0 +1 @@
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.postgresql
new file mode 100644
index 0000000..75bfb96
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/130-rhn_prepare_install.sql.postgresql
@@ -0,0 +1,65 @@
+-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+--
+-- Copyright (c) 2008--2011 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.
+--
+
+--monitoring stored procedure
+
+create or replace function
+rhn_prepare_install
+(
+ username in rhn_command_queue_instances.last_update_user%type,
+ install_command in rhn_command_queue_instances.command_id%type
+)
+returns rhn_command_queue_instances.recid%type
+as $$
+declare
+ /* ignore this command if it has not been run after five minutes */
+ stale_after_minutes numeric := 10;
+
+ /* should take no more than five minutes to run the install */
+ max_execution_time_seconds numeric := 10 * 60;
+
+ command_instance_id rhn_command_queue_instances.recid%type;
+begin
+ select nextval('rhn_command_q_inst_recid_seq')
+ into command_instance_id;
+
+
+ insert into rhn_command_queue_instances (
+ recid,
+ command_id,
+ notes,
+ expiration_date,
+ notify_email,
+ timeout,
+ date_submitted,
+ last_update_user,
+ last_update_date
+ )
+ values (
+ command_instance_id,
+ install_command,
+ null, /* no notes */
+ current_timestamp + stale_after_minutes * '1 minute'::interval,
+ null, /* no notification email */
+ max_execution_time_seconds,
+ current_timestamp,
+ username,
+ current_timestamp
+ );
+
+ return command_instance_id;
+end; $$
+language plpgsql;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.oracle
new file mode 100644
index 0000000..b7b00b1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.oracle
@@ -0,0 +1 @@
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.postgresql
new file mode 100644
index 0000000..9044025
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/131-rhn_install_org_satellites.sql.postgresql
@@ -0,0 +1,58 @@
+-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+--
+-- Copyright (c) 2008--2011 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.
+--
+
+--monitoring stored procedure
+
+
+create or replace function
+rhn_install_org_satellites
+(
+ for_customer_id in web_customer.id%type,
+ sat_cluster_id in rhn_sat_cluster.recid%type,
+ username in rhn_command_queue_instances.last_update_user%type
+) returns void
+as
+$$
+declare
+
+-- the cursor is defined such that the following behavior occurs based on the sat_cluster_id param:
+-- null results in all of a customer's scout being configured.
+-- an id for a scout belonging to the cust results in just that scout being configured
+-- an id for a scout not belonging to the cust results in no action.
+
+ satellite_cursor cursor for
+ select recid from rhn_sat_cluster
+ where customer_id = for_customer_id
+ and recid not in (
+ select netsaint_id from rhn_ll_netsaint
+ )
+ except
+ select recid from rhn_sat_cluster
+ where customer_id = for_customer_id
+ and recid not in (sat_cluster_id);
+
+ command_instance_id rhn_command_queue_instances.recid%type;
+
+begin
+ command_instance_id := rhn_prepare_install(username, 1);
+
+ for satellite in satellite_cursor loop
+ perform rhn_install_satellite(command_instance_id, satellite.recid);
+ end loop;
+end
+$$
+language plpgsql;
+
12 years, 4 months
Changes to 'refs/tags/spacewalk-web-1.6.30-1'
by Jan Pazdziora
Tag 'spacewalk-web-1.6.30-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-11-25 15:00 +0000
Tagging package [spacewalk-web] version [1.6.30-1] in directory [web/].
Changes since spacewalk-backend-1.6.43-1:
Jan Pazdziora (7):
Replace sysdate with current_timestamp.
Replace decode with case when.
Replace decode with case when.
Matching the varchar column to varchar literal.
Matching the to_char prototype.
Replace nvl with coalesce.
Automatic commit of package [spacewalk-web] release [1.6.30-1].
---
rel-eng/packages/spacewalk-web | 2 -
web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml | 22 ++++++++--------
web/spacewalk-web.spec | 9 +++++-
3 files changed, 21 insertions(+), 12 deletions(-)
---
12 years, 4 months
rel-eng/packages web/spacewalk-web.spec
by Jan Pazdziora
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 4abe8c72072a8b495e2cec13f26f0c0b9ec272d9
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 16:00:46 2011 +0100
Automatic commit of package [spacewalk-web] release [1.6.30-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 782407e..1a45eb0 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.6.29-1 web/
+1.6.30-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 60842e7..6da4b12 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 1.6.29
+Version: 1.6.30
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -256,6 +256,13 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Fri Nov 25 2011 Jan Pazdziora 1.6.30-1
+- Replace nvl with coalesce.
+- Matching the to_char prototype.
+- Matching the varchar column to varchar literal.
+- Replace decode with case when.
+- Replace sysdate with current_timestamp.
+
* Wed Nov 23 2011 Jan Pazdziora 1.6.29-1
- Fixing cancel a scheduled action on a server.
12 years, 4 months
6 commits - web/modules
by Jan Pazdziora
web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml | 22 ++++++++--------
1 file changed, 12 insertions(+), 10 deletions(-)
New commits:
commit 1f2e8580c95ca58da9e88c41651fe76369d84bdf
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 14:58:35 2011 +0100
Replace nvl with coalesce.
Addressing
DBD::Pg::st execute failed: ERROR: function nvl(timestamp with time zone, date) does not exist at character 511
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index 7c2f3ee..1e36969 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -100,7 +100,7 @@ SELECT 1 AS PUSH_NEEDED,
WHERE P.recid = CP.probe_id
AND CP.sat_cluster_id = SC.recid)
) last_update,
- (SELECT nvl(MAX(CQE.date_executed), to_date('1', 'J')) push_date
+ (SELECT coalesce(MAX(CQE.date_executed), to_char('1', 'J')) push_date
FROM rhn_command_queue_execs CQE,
rhn_command_queue_instances CQI,
rhn_sat_cluster SC
@@ -160,7 +160,7 @@ SELECT 1 AS PUSH_NEEDED,
WHERE P.recid = CP.probe_id
AND CP.sat_cluster_id = SC.recid)
) last_update,
- (SELECT nvl(MAX(CQE.date_executed), to_date('1', 'J')) push_date
+ (SELECT coalesce(MAX(CQE.date_executed), to_date('1', 'J')) push_date
FROM rhn_command_queue_execs CQE,
rhn_command_queue_instances CQI,
rhn_sat_cluster SC
commit b149a3db8d47287868f64938316f61c3a51bd586
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 14:54:08 2011 +0100
Matching the to_char prototype.
Addressing
DBD::Pg::st execute failed: ERROR: function to_date(integer, unknown) does not exist at character 539
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index bef3603..7c2f3ee 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -100,7 +100,7 @@ SELECT 1 AS PUSH_NEEDED,
WHERE P.recid = CP.probe_id
AND CP.sat_cluster_id = SC.recid)
) last_update,
- (SELECT nvl(MAX(CQE.date_executed), to_date(1, 'J')) push_date
+ (SELECT nvl(MAX(CQE.date_executed), to_date('1', 'J')) push_date
FROM rhn_command_queue_execs CQE,
rhn_command_queue_instances CQI,
rhn_sat_cluster SC
@@ -160,7 +160,7 @@ SELECT 1 AS PUSH_NEEDED,
WHERE P.recid = CP.probe_id
AND CP.sat_cluster_id = SC.recid)
) last_update,
- (SELECT nvl(MAX(CQE.date_executed), to_date(1, 'J')) push_date
+ (SELECT nvl(MAX(CQE.date_executed), to_date('1', 'J')) push_date
FROM rhn_command_queue_execs CQE,
rhn_command_queue_instances CQI,
rhn_sat_cluster SC
commit ebb55cda60a3a21b93a6fe56ca5ad13f7b05310a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 13:28:00 2011 +0100
Matching the varchar column to varchar literal.
Addressing
DBD::Pg::st execute failed: ERROR: operator does not exist: character = integer at character 871
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index ff7ad9a..bef3603 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -81,7 +81,7 @@ SELECT distinct
FROM rhn_command_queue_execs
WHERE netsaint_id = CQE.netsaint_id
AND command_id = 1)
- AND SC.deployed = 1
+ AND SC.deployed = '1'
</query>
@@ -142,7 +142,7 @@ SELECT distinct
FROM rhn_command_queue_execs
WHERE netsaint_id = CQE.netsaint_id
AND command_id = 1)
- AND SC.deployed = 1
+ AND SC.deployed = '1'
</query>
commit 299b0d99af527abc83f458822c641158312bdb3a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 12:22:12 2011 +0100
Replace decode with case when.
Addressing
DBD::Pg::st execute failed: ERROR: function decode(timestamp with time zone, unknown, text, text) does not exist at character 18
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index df6b3c7..ff7ad9a 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -60,9 +60,10 @@ ORDER BY UPPER(SC.description)
- if date executed is not null then an exit status of '0' is OK, '1' is warning, otherwise "error"
-->
<query name="config_push_status" params="org_id">
-SELECT distinct decode(
- CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
- case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end) AS CONFIG_STATUS,
+SELECT distinct
+ case when CQE.date_executed is null then (
+ case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end ) else (
+ case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end ) end AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
TO_CHAR(CQI.date_submitted, 'YYYY-MM-DD HH24:MI:SS') AS DATE_SUBMITTED,
@@ -121,9 +122,10 @@ SELECT 1 AS PUSH_NEEDED,
<query name="config_push_status_all" params="">
-SELECT distinct decode(
- CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
- case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end) AS CONFIG_STATUS,
+SELECT distinct
+ case when CQE.date_executed is null then (
+ case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end ) else (
+ case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end ) end AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
TO_CHAR(CQI.date_submitted, 'YYYY-MM-DD HH24:MI:SS') AS DATE_SUBMITTED,
commit 066bc76f60e5d4be5546247caba38c2f4e455bd0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 12:16:59 2011 +0100
Replace decode with case when.
Addressing
DBD::Pg::st execute failed: ERROR: function decode(numeric, integer, unknown, integer, unknown, unknown) does not exist at character 150
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index a7c99ba..df6b3c7 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -62,7 +62,7 @@ ORDER BY UPPER(SC.description)
<query name="config_push_status" params="org_id">
SELECT distinct decode(
CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
- decode(exit_status, 0, 'OK', 1, 'WARNING', 'ERROR')) AS CONFIG_STATUS,
+ case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end) AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
TO_CHAR(CQI.date_submitted, 'YYYY-MM-DD HH24:MI:SS') AS DATE_SUBMITTED,
@@ -123,7 +123,7 @@ SELECT 1 AS PUSH_NEEDED,
<query name="config_push_status_all" params="">
SELECT distinct decode(
CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
- decode(exit_status, 0, 'OK', 1, 'WARNING', 'ERROR')) AS CONFIG_STATUS,
+ case when exit_status = 0 then 'OK' when exit_status = 1 then 'WARNING' else 'ERROR' end) AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
TO_CHAR(CQI.date_submitted, 'YYYY-MM-DD HH24:MI:SS') AS DATE_SUBMITTED,
commit 802aa94c209bc69b2406ec40fe0276d6ac529b03
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 25 12:13:43 2011 +0100
Replace sysdate with current_timestamp.
Addressing
DBD::Pg::st execute failed: ERROR: column "sysdate" does not exist at character 70
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
index 7526a23..a7c99ba 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/scout_queries.xml
@@ -61,7 +61,7 @@ ORDER BY UPPER(SC.description)
-->
<query name="config_push_status" params="org_id">
SELECT distinct decode(
- CQE.date_executed, null, decode(sign(SYSDATE - CQI.expiration_date), -1, 'PENDING', 'EXPIRED'),
+ CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
decode(exit_status, 0, 'OK', 1, 'WARNING', 'ERROR')) AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
@@ -122,7 +122,7 @@ SELECT 1 AS PUSH_NEEDED,
<query name="config_push_status_all" params="">
SELECT distinct decode(
- CQE.date_executed, null, decode(sign(SYSDATE - CQI.expiration_date), -1, 'PENDING', 'EXPIRED'),
+ CQE.date_executed, null, case when current_timestamp < CQI.expiration_date then 'PENDING' else 'EXPIRED' end,
decode(exit_status, 0, 'OK', 1, 'WARNING', 'ERROR')) AS CONFIG_STATUS,
SC.recid AS id,
CQI.last_update_user,
12 years, 4 months
Changes to 'refs/tags/spacewalk-backend-1.6.43-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.6.43-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-11-25 13:30 +0000
Tagging package [spacewalk-backend] version [1.6.43-1] in directory [backend/].
Changes since osad-5.10.26-1:
Miroslav Suchý (2):
Ubuntu send request for translations, send 404 back and do not raise traceback
Automatic commit of package [spacewalk-backend] release [1.6.43-1].
Simon Lukasik (1):
Take Debian's alternative package names into account
---
backend/common/rhnException.py | 3 +++
backend/common/rhnRepository.py | 13 +++++++++++--
backend/server/apacheRequest.py | 5 +++--
backend/server/importlib/debPackage.py | 15 +++++++++------
backend/spacewalk-backend.spec | 7 ++++++-
rel-eng/packages/spacewalk-backend | 2 +-
6 files changed, 33 insertions(+), 12 deletions(-)
---
12 years, 4 months
backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/spacewalk-backend.spec | 7 ++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit a889303a039d92ff9a2070d45d93eeff54b471c7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 25 14:30:43 2011 +0100
Automatic commit of package [spacewalk-backend] release [1.6.43-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 3da7a2f..e129c88 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.6.42
+Version: 1.6.43
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -675,6 +675,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Nov 25 2011 Miroslav Suchý 1.6.43-1
+- Ubuntu send request for translations, send 404 back and do not raise
+ traceback (msuchy(a)redhat.com)
+- Take Debian's alternative package names into account (slukasik(a)redhat.com)
+
* Wed Nov 23 2011 Aron Parsons <parsonsa(a)bit-sys.com> 1.6.42-1
- improve performance of query_client_get_file on PostgreSQL (parsonsa@bit-
sys.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 1bababb..c7f0bda 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.42-1 backend/
+1.6.43-1 backend/
12 years, 4 months
backend/common backend/server
by Miroslav Suchý
backend/common/rhnException.py | 3 +++
backend/common/rhnRepository.py | 13 +++++++++++--
backend/server/apacheRequest.py | 5 +++--
3 files changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 27120d4714e0f19af7cbf1aef0e771c35203fb90
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 23 11:08:06 2011 +0100
Ubuntu send request for translations, send 404 back and do not raise traceback
Ubuntu send such requests:
/XMLRPC/GET-REQ/ubuntu-server-10.04-lucid-lts-x86_64/i18n/Translation-en_US.bz2
This will create traceback and ISE.
Creating new function i18n, which will simply return:
404 Not Found
If somebody ever decide to support it, he can change this function to return something
useful.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index de3b05c..0fc5bad 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -439,6 +439,9 @@ class rhnFault(Exception):
return xmlrpclib.Fault(1, s.getvalue())
return xmlrpclib.Fault(-self.code, s.getvalue())
+class rhnNotFound(Exception):
+ """ Raised when we want return 404 Not Found """
+ pass
if __name__ == "__main__":
print "You can not run this module by itself"
diff --git a/backend/common/rhnRepository.py b/backend/common/rhnRepository.py
index 704590c..02baedd 100644
--- a/backend/common/rhnRepository.py
+++ b/backend/common/rhnRepository.py
@@ -27,7 +27,7 @@ from spacewalk.common import rhn_rpm
import rhnFlags
from rhnLog import log_debug
from rhnLib import rfc822time
-from rhnException import rhnException, rhnFault
+from rhnException import rhnException, rhnFault, rhnNotFound
from RPC_Base import RPC_Base
class Repository(RPC_Base):
@@ -43,7 +43,8 @@ class Repository(RPC_Base):
self.functions = [
'getPackage',
'getPackageHeader',
- 'getPackageSource'
+ 'getPackageSource',
+ 'i18n',
]
def set_compress_headers(self, val):
@@ -105,6 +106,14 @@ class Repository(RPC_Base):
return self._getFile(filePath)
+ def i18n(self, translation, *args):
+ """ Translations files for Ubuntu. E.g. Translation-en_US.bz2
+
+ We do not support it so just return 404. But do not fail with
+ traceback.
+ """
+ raise rhnNotFound()
+
def getPackageSource(self, pkgFilename):
""" Get srpm packrge. """
log_debug(3, pkgFilename)
diff --git a/backend/server/apacheRequest.py b/backend/server/apacheRequest.py
index d396746..5bb5f2d 100644
--- a/backend/server/apacheRequest.py
+++ b/backend/server/apacheRequest.py
@@ -27,7 +27,7 @@ from spacewalk.common import apache, rhnFlags
from spacewalk.common.rhnConfig import CFG
from spacewalk.common import byterange
from spacewalk.common.rhnLog import log_debug, log_error
-from spacewalk.common.rhnException import rhnFault, \
+from spacewalk.common.rhnException import rhnFault, rhnNotFound,\
redirectException #to catch redirect exception
from spacewalk.common.rhnTranslate import _
from spacewalk.common.rhnLib import setHeaderValue
@@ -136,7 +136,8 @@ class apacheRequest:
extra="Response sent back to the caller:\n%s\n" % (
response.faultString,),
severity="notification")
-
+ except rhnNotFound, e:
+ return apache.HTTP_NOT_FOUND
#pkilambi:catch exception if redirect
except redirectException, re:
log_debug(3,"redirect exception caught",re.path)
12 years, 4 months
backend/server
by Šimon Lukašík
backend/server/importlib/debPackage.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit e6b4529e2162affa68a36c3cae7b5050101f2431
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Fri Nov 25 12:24:28 2011 +0100
Take Debian's alternative package names into account
Previously, we have stored alternatives randomly in name or version
fields. Resulting in bad repository metadata format.
Addressing the error from apt-get update:
Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing acct (NewVersion2)
Badly formated relationship definition was:
Depends: libc6 (>=2.4), dpkg (>=1.15.4)|install-info)
diff --git a/backend/server/importlib/debPackage.py b/backend/server/importlib/debPackage.py
index 9201ce2..65cdf09 100644
--- a/backend/server/importlib/debPackage.py
+++ b/backend/server/importlib/debPackage.py
@@ -130,13 +130,16 @@ class debBinaryPackage(headerSource.rpmBinaryPackage):
val = string.join(values.split(), "") # remove whitespaces
val = val.split(',') # split packages
for v in val:
- nv = v.split('(')
- name = nv[0]
- # TODO FIX VERSION AND FLAGS
- if (len(nv) > 1):
- version = nv[1].rstrip(')')
+ version = ''
+ if '|' in v:
+ # TODO: store alternative-package-names semantically someday
+ name = v
else:
- version = ''
+ nv = v.split('(')
+ name = nv[0]
+ # TODO FIX VERSION AND FLAGS
+ if (len(nv) > 1):
+ version = nv[1].rstrip(')')
hash = {'name' : name, 'version' : version, 'flags' : 0}
finst = dclass()
finst.populate(hash)
12 years, 4 months
Changes to 'refs/tags/osad-5.10.26-1'
by Jan Pazdziora
Tag 'osad-5.10.26-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-11-25 09:41 +0000
Tagging package [osad] version [5.10.26-1] in directory [client/tools/osad/].
Changes since rhn-client-tools-1.6.37-1:
Jan Pazdziora (2):
The update_client_message_sent method is not used, removing.
Automatic commit of package [osad] release [5.10.26-1].
---
client/tools/osad/osad.spec | 5 ++++-
client/tools/osad/src/dispatcher_client.py | 13 -------------
rel-eng/packages/osad | 2 +-
3 files changed, 5 insertions(+), 15 deletions(-)
---
12 years, 4 months