Changes to 'refs/tags/spacewalk-schema-1.4.11-1'
by Jan Pazdziora
Tag 'spacewalk-schema-1.4.11-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-03-22 10:03 +0000
Tagging package [spacewalk-schema] version [1.4.11-1] in directory [schema/spacewalk/].
Changes since spacewalk-web-1.4.12-1:
Jan Pazdziora (3):
Rewriting outer joins to ANSI syntax.
There is no cursor() function for inline cursors in PostgreSQL, using custom function get_hw_info_as_clob instead.
Automatic commit of package [spacewalk-schema] release [1.4.11-1].
---
rel-eng/packages/spacewalk-schema | 2
reporting/reports/data/channels | 4
reporting/reports/data/errata-list | 8 -
reporting/reports/data/errata-list-all | 7 -
reporting/reports/data/errata-systems | 5
reporting/reports/data/inventory | 55 ++++------
reporting/reports/data/users | 12 +-
reporting/reports/data/users-systems | 13 +-
schema/spacewalk/oracle/procs/concat_list_clob.sql | 27 ----
schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql | 32 +++++
schema/spacewalk/oracle/procs/procs.deps | 1
schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql | 35 ++++++
schema/spacewalk/postgres/procs/procs.deps | 1
schema/spacewalk/spacewalk-schema.spec | 6 -
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle | 3
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle | 32 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql | 35 ++++++
18 files changed, 200 insertions(+), 80 deletions(-)
---
13 years
Changes to 'refs/tags/spacewalk-reports-1.4.5-1'
by Jan Pazdziora
Tag 'spacewalk-reports-1.4.5-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-03-22 10:03 +0000
Tagging package [spacewalk-reports] version [1.4.5-1] in directory [reporting/].
Changes since spacewalk-web-1.4.12-1:
Jan Pazdziora (4):
Rewriting outer joins to ANSI syntax.
There is no cursor() function for inline cursors in PostgreSQL, using custom function get_hw_info_as_clob instead.
Automatic commit of package [spacewalk-schema] release [1.4.11-1].
Automatic commit of package [spacewalk-reports] release [1.4.5-1].
---
rel-eng/packages/spacewalk-reports | 2
rel-eng/packages/spacewalk-schema | 2
reporting/reports/data/channels | 4
reporting/reports/data/errata-list | 8 -
reporting/reports/data/errata-list-all | 7 -
reporting/reports/data/errata-systems | 5
reporting/reports/data/inventory | 55 ++++------
reporting/reports/data/users | 12 +-
reporting/reports/data/users-systems | 13 +-
reporting/spacewalk-reports.spec | 7 +
schema/spacewalk/oracle/procs/concat_list_clob.sql | 27 ----
schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql | 32 +++++
schema/spacewalk/oracle/procs/procs.deps | 1
schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql | 35 ++++++
schema/spacewalk/postgres/procs/procs.deps | 1
schema/spacewalk/spacewalk-schema.spec | 6 -
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle | 3
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle | 32 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql | 35 ++++++
20 files changed, 207 insertions(+), 82 deletions(-)
---
13 years
2 commits - rel-eng/packages reporting/spacewalk-reports.spec schema/spacewalk
by Jan Pazdziora
rel-eng/packages/spacewalk-reports | 2 +-
rel-eng/packages/spacewalk-schema | 2 +-
reporting/spacewalk-reports.spec | 7 ++++++-
schema/spacewalk/spacewalk-schema.spec | 6 +++++-
4 files changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 88313439cb955709a64574f4979f6c46a7677a7b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 22 11:03:16 2011 +0100
Automatic commit of package [spacewalk-reports] release [1.4.5-1].
diff --git a/rel-eng/packages/spacewalk-reports b/rel-eng/packages/spacewalk-reports
index 94ef6f0..bebfd26 100644
--- a/rel-eng/packages/spacewalk-reports
+++ b/rel-eng/packages/spacewalk-reports
@@ -1 +1 @@
-1.4.4-1 reporting/
+1.4.5-1 reporting/
diff --git a/reporting/spacewalk-reports.spec b/reporting/spacewalk-reports.spec
index 1345e73..62645b2 100644
--- a/reporting/spacewalk-reports.spec
+++ b/reporting/spacewalk-reports.spec
@@ -2,7 +2,7 @@ Name: spacewalk-reports
Summary: Script based reporting
Group: Applications/Internet
License: GPLv2
-Version: 1.4.4
+Version: 1.4.5
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -42,6 +42,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/spacewalk-report.8*
%changelog
+* Tue Mar 22 2011 Jan Pazdziora 1.4.5-1
+- There is no cursor() function for inline cursors in PostgreSQL, using custom
+ function get_hw_info_as_clob instead.
+- Rewriting outer joins to ANSI syntax.
+
* Thu Mar 10 2011 Jan Pazdziora 1.4.4-1
- 683525 - adding flex_used and flex_total to the entitlements report.
commit ab193592f98bb3eca99abdfdb2a568dba5213b11
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 22 11:03:01 2011 +0100
Automatic commit of package [spacewalk-schema] release [1.4.11-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 80f02d5..7614a9b 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.4.10-1 schema/spacewalk/
+1.4.11-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index b5a6bb2..9e9ddc2 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.4.10
+Version: 1.4.11
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Tue Mar 22 2011 Jan Pazdziora 1.4.11-1
+- There is no cursor() function for inline cursors in PostgreSQL, using custom
+ function get_hw_info_as_clob instead.
+
* Thu Mar 10 2011 Jan Pazdziora 1.4.10-1
- Using sequence_nextval instead of the .nextval.
- update database to support SUSE distributions (ug(a)suse.de)
13 years
2 commits - reporting/reports schema/spacewalk
by Jan Pazdziora
reporting/reports/data/channels | 4
reporting/reports/data/errata-list | 8 -
reporting/reports/data/errata-list-all | 7 -
reporting/reports/data/errata-systems | 5
reporting/reports/data/inventory | 55 ++++------
reporting/reports/data/users | 12 +-
reporting/reports/data/users-systems | 13 +-
schema/spacewalk/oracle/procs/concat_list_clob.sql | 27 ----
schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql | 32 +++++
schema/spacewalk/oracle/procs/procs.deps | 1
schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql | 35 ++++++
schema/spacewalk/postgres/procs/procs.deps | 1
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle | 3
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle | 32 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql | 35 ++++++
16 files changed, 194 insertions(+), 78 deletions(-)
New commits:
commit 9095197b065fb42b9839aef89690ffdeb562b1de
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 22 10:39:55 2011 +0100
There is no cursor() function for inline cursors in PostgreSQL, using custom function get_hw_info_as_clob instead.
This also makes concat_list_clob not needed, dropping.
Addressing
spacewalk.server.rhnSQL.sql_base.SQLStatementPrepareError: ('function cursor(text) does not exist at character 1288 ...
diff --git a/reporting/reports/data/inventory b/reporting/reports/data/inventory
index 177367d..38f9811 100755
--- a/reporting/reports/data/inventory
+++ b/reporting/reports/data/inventory
@@ -61,15 +61,7 @@ sql:
(
select rhnserverarch.name from rhnserverarch where rhnserver.server_arch_id = rhnserverarch.id
) as architecture,
- concat_list_clob('; ', cursor(
- (
- select sum(nrcpu) || ' CPUs' from rhncpu where rhnserver.id = rhncpu.server_id
- union all
- select name||' '||ip_addr||'/'||netmask||' '||hw_addr val
- from rhnservernetinterface
- where rhnserver.id = rhnservernetinterface.server_id
- )), 1
- ) as hardware
+ get_hw_info_as_clob(rhnserver.id, '; ') as hardware
from rhnserver left outer join
(
select server_id, hostname, ipaddr
diff --git a/schema/spacewalk/oracle/procs/concat_list_clob.sql b/schema/spacewalk/oracle/procs/concat_list_clob.sql
deleted file mode 100644
index c647c47..0000000
--- a/schema/spacewalk/oracle/procs/concat_list_clob.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-
-create or replace function concat_list_clob(
- concat_string in varchar,
- cur in sys_refcursor,
- close_the_cursor in integer default 0
-)
-return clob
-is
- ret clob;
- tmp varchar2(4000);
-begin
- dbms_lob.createtemporary(ret, true);
- loop
- fetch cur into tmp;
- exit when cur%notfound;
- if cur%rowcount > 1 then
- dbms_lob.writeappend(ret, length(concat_string), concat_string);
- end if;
- dbms_lob.writeappend(ret, length(tmp), tmp);
- end loop;
- if close_the_cursor > 0 then
- close cur;
- end if;
- return ret;
-end;
-/
-
diff --git a/schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql b/schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql
new file mode 100644
index 0000000..ce1b580
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/get_hw_info_as_clob.sql
@@ -0,0 +1,32 @@
+
+create or replace function get_hw_info_as_clob(
+ sid in rhnserver.id%TYPE,
+ separator in varchar
+)
+return clob
+is
+ ret clob;
+ tmp varchar2(4000);
+begin
+ dbms_lob.createtemporary(ret, true);
+ for rec in (
+ select m
+ from (
+ select 1 n, sum(nrcpu) || ' CPUs' m
+ from rhncpu where rhncpu.server_id = sid
+ union all
+ select 2, name||' '||ip_addr||'/'||netmask||' '||hw_addr val
+ from rhnservernetinterface
+ where rhnservernetinterface.server_id = sid
+ )
+ order by n, m
+ ) loop
+ if dbms_lob.getlength(ret) > 0 then
+ dbms_lob.writeappend(ret, length(separator), separator);
+ end if;
+ dbms_lob.writeappend(ret, length(rec.m), rec.m);
+ end loop;
+ return ret;
+end;
+/
+
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index debe0be..6e3e5e6 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -120,4 +120,5 @@ rhn_synch_probe_state :: rhn_probe_state rhn_deployed_probe \
rhn_current_state_summaries
set_ks_session_history_message :: rhnKickstartSessionState \
rhnKickstartSessionHistory
+get_hw_info_as_clob :: rhnCpu rhnServerNetInterface
diff --git a/schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql b/schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql
new file mode 100644
index 0000000..9d899f3
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/get_hw_info_as_clob.sql
@@ -0,0 +1,35 @@
+-- oracle equivalent source sha1 4a627f5b31efb66c684dd14f0514e25a5ace94f2
+
+create or replace function get_hw_info_as_clob(
+ sid in rhnserver.id%TYPE,
+ separator in varchar
+)
+returns text
+as
+$$
+declare
+ ret text;
+ rec record;
+begin
+ for rec in (
+ select m
+ from (
+ select 1 n, sum(nrcpu) || ' CPUs' m
+ from rhncpu where rhncpu.server_id = sid
+ union all
+ select 2, name||' '||coalesce(ip_addr,'')||'/'||coalesce(netmask,'')||' '||hw_addr val
+ from rhnservernetinterface
+ where rhnservernetinterface.server_id = sid
+ ) X
+ order by n, m
+ ) loop
+ if ret is null then
+ ret := rec.m;
+ else
+ ret := ret || separator || rec.m;
+ end if;
+ end loop;
+ return ret;
+end;
+$$ language plpgsql;
+
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index 4166cf0..6bc8a9b 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -118,4 +118,5 @@ rhn_synch_probe_state :: rhn_probe_state rhn_deployed_probe \
rhn_current_state_summaries
set_ks_session_history_message :: rhnKickstartSessionState \
rhnKickstartSessionHistory
+get_hw_info_as_clob :: rhnCpu rhnServerNetInterface
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle
new file mode 100644
index 0000000..03fb791
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.oracle
@@ -0,0 +1,3 @@
+
+drop function concat_list_clob;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql
new file mode 100644
index 0000000..80a0a49
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/010-concat_list_clob-drop.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 bee76d7be43c246feb787552584ddac2a8e35973
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle
new file mode 100644
index 0000000..ce1b580
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.oracle
@@ -0,0 +1,32 @@
+
+create or replace function get_hw_info_as_clob(
+ sid in rhnserver.id%TYPE,
+ separator in varchar
+)
+return clob
+is
+ ret clob;
+ tmp varchar2(4000);
+begin
+ dbms_lob.createtemporary(ret, true);
+ for rec in (
+ select m
+ from (
+ select 1 n, sum(nrcpu) || ' CPUs' m
+ from rhncpu where rhncpu.server_id = sid
+ union all
+ select 2, name||' '||ip_addr||'/'||netmask||' '||hw_addr val
+ from rhnservernetinterface
+ where rhnservernetinterface.server_id = sid
+ )
+ order by n, m
+ ) loop
+ if dbms_lob.getlength(ret) > 0 then
+ dbms_lob.writeappend(ret, length(separator), separator);
+ end if;
+ dbms_lob.writeappend(ret, length(rec.m), rec.m);
+ end loop;
+ return ret;
+end;
+/
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql
new file mode 100644
index 0000000..9d899f3
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.3-to-spacewalk-schema-1.4/011-get_hw_info_as_clob.sql.postgresql
@@ -0,0 +1,35 @@
+-- oracle equivalent source sha1 4a627f5b31efb66c684dd14f0514e25a5ace94f2
+
+create or replace function get_hw_info_as_clob(
+ sid in rhnserver.id%TYPE,
+ separator in varchar
+)
+returns text
+as
+$$
+declare
+ ret text;
+ rec record;
+begin
+ for rec in (
+ select m
+ from (
+ select 1 n, sum(nrcpu) || ' CPUs' m
+ from rhncpu where rhncpu.server_id = sid
+ union all
+ select 2, name||' '||coalesce(ip_addr,'')||'/'||coalesce(netmask,'')||' '||hw_addr val
+ from rhnservernetinterface
+ where rhnservernetinterface.server_id = sid
+ ) X
+ order by n, m
+ ) loop
+ if ret is null then
+ ret := rec.m;
+ else
+ ret := ret || separator || rec.m;
+ end if;
+ end loop;
+ return ret;
+end;
+$$ language plpgsql;
+
commit fc86b41c7761db94d271424074416a3217e2daeb
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Mar 21 13:15:33 2011 +0100
Rewriting outer joins to ANSI syntax.
Addressing errors like
spacewalk.server.rhnSQL.sql_base.SQLStatementPrepareError: ('syntax error at or near ")" at character 661
when PostgreSQL parser hits (*).
diff --git a/reporting/reports/data/channels b/reporting/reports/data/channels
index ab2258f..39651e1 100755
--- a/reporting/reports/data/channels
+++ b/reporting/reports/data/channels
@@ -17,8 +17,8 @@ columns:
sql:
select rhnchannel.label channel_label, rhnchannel.name channel_name, count(rhnchannelpackage.channel_id) number_of_packages
- from rhnchannel, rhnchannelpackage
- where rhnchannel.id = rhnchannelpackage.channel_id (+)
+ from rhnchannel left outer join rhnchannelpackage
+ on rhnchannel.id = rhnchannelpackage.channel_id
group by rhnchannel.id, rhnchannel.label, rhnchannel.name
order by rhnchannel.label
diff --git a/reporting/reports/data/errata-list b/reporting/reports/data/errata-list
index 06a1ce0..6781810 100755
--- a/reporting/reports/data/errata-list
+++ b/reporting/reports/data/errata-list
@@ -29,10 +29,12 @@ sql:
rhnCVE.name as cve,
rhnErrata.synopsis,
count(*) as systems_affected
- from rhnErrata, rhnServerNeededErrataCache, rhnErrataCVE, rhnCVE
+ from rhnErrata left outer join rhnErrataCVE
+ on rhnErrata.id = rhnErrataCVE.errata_id
+ left outer join rhnCVE
+ on rhnErrataCVE.cve_id = rhnCVE.id
+ , rhnServerNeededErrataCache
where rhnErrata.id = rhnServerNeededErrataCache.errata_id
- and rhnErrata.id = rhnErrataCVE.errata_id (+)
- and rhnErrataCVE.cve_id = rhnCVE.id (+)
group by rhnErrata.id,
rhnErrata.advisory_name,
rhnErrata.advisory_type,
diff --git a/reporting/reports/data/errata-list-all b/reporting/reports/data/errata-list-all
index edcea19..d8f32c0 100755
--- a/reporting/reports/data/errata-list-all
+++ b/reporting/reports/data/errata-list-all
@@ -27,7 +27,8 @@ sql:
rhnErrata.advisory_type as type,
rhnCVE.name as cve,
rhnErrata.synopsis
- from rhnErrata, rhnErrataCVE, rhnCVE
- where rhnErrata.id = rhnErrataCVE.errata_id (+)
- and rhnErrataCVE.cve_id = rhnCVE.id (+)
+ from rhnErrata left outer join rhnErrataCVE
+ on rhnErrata.id = rhnErrataCVE.errata_id
+ left outer join rhnCVE
+ on rhnErrataCVE.cve_id = rhnCVE.id
order by rhnErrata.advisory_name, rhnErrata.id, rhnCVE.name
diff --git a/reporting/reports/data/errata-systems b/reporting/reports/data/errata-systems
index f40aa9f..314ecb9 100755
--- a/reporting/reports/data/errata-systems
+++ b/reporting/reports/data/errata-systems
@@ -21,7 +21,8 @@ sql:
rhnServerNeededErrataCache.server_id,
rhnServer.name as profile_name,
rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address
- from rhnErrata, rhnServerNeededErrataCache, rhnServer,
+ from rhnErrata, rhnServer,
+ rhnServerNeededErrataCache left outer join
(
select server_id, hostname, ipaddr
from rhnservernetwork
@@ -31,8 +32,8 @@ sql:
group by server_id
)
) rhnservernetwork
+ on rhnServerNeededErrataCache.server_id = rhnservernetwork.server_id
where rhnErrata.id = rhnServerNeededErrataCache.errata_id
and rhnServerNeededErrataCache.server_id = rhnServer.id
- and rhnServerNeededErrataCache.server_id = rhnservernetwork.server_id (+)
order by rhnErrata.advisory_name, rhnServerNeededErrataCache.server_id
diff --git a/reporting/reports/data/inventory b/reporting/reports/data/inventory
index cbc49de..177367d 100755
--- a/reporting/reports/data/inventory
+++ b/reporting/reports/data/inventory
@@ -70,7 +70,7 @@ sql:
where rhnserver.id = rhnservernetinterface.server_id
)), 1
) as hardware
- from rhnserver,
+ from rhnserver left outer join
(
select server_id, hostname, ipaddr
from rhnservernetwork
@@ -79,34 +79,39 @@ sql:
from rhnservernetwork
group by server_id
)
- ) rhnservernetwork,
- rhnserverchannel, rhnchannel,
- rhnserverconfigchannel, rhnconfigchannel,
+ ) rhnservernetwork
+ on rhnserver.id = rhnservernetwork.server_id
+ left outer join rhnserverchannel
+ on rhnserver.id = rhnserverchannel.server_id
+ left outer join rhnchannel
+ on rhnserverchannel.channel_id = rhnchannel.id
+ left outer join rhnserverconfigchannel
+ on rhnserver.id = rhnserverconfigchannel.server_id
+ left outer join rhnconfigchannel
+ on rhnserverconfigchannel.config_channel_id = rhnconfigchannel.id
+ left outer join
(
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,
+ from rhnservergroupmembers left outer join rhnservergroup
+ on rhnservergroupmembers.server_group_id = rhnservergroup.id
+ where rhnservergroup.group_type is not null
+ ) entitlement_data
+ on rhnserver.id = entitlement_data.server_id
+ left outer join
(
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,
+ from rhnservergroupmembers left outer join rhnservergroup
+ on rhnservergroupmembers.server_group_id = rhnservergroup.id
+ where rhnservergroup.group_type is null
+ ) group_data
+ on rhnserver.id = group_data.server_id
+ left outer join
(
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 (+)
- 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 (+)
- and rhnserver.id = virtual_data.virtual_system_id (+)
+ on 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,
virtual_data.host_system_id
diff --git a/reporting/reports/data/users b/reporting/reports/data/users
index 0a44b02..efec511 100755
--- a/reporting/reports/data/users
+++ b/reporting/reports/data/users
@@ -52,14 +52,16 @@ sql:
where wccl.web_contact_id = wccl_exists.web_contact_id
)
),'enabled') as active
- from web_contact, web_customer, web_user_personal_info,
- rhnUserGroupMembers, rhnUserGroup, rhnUserGroupType,
+ from web_contact left outer join rhnUserGroupMembers
+ on web_contact.id = rhnUserGroupMembers.user_id
+ left outer join rhnUserGroup
+ on rhnUserGroupMembers.user_group_id = rhnUserGroup.id
+ left outer join rhnUserGroupType
+ on rhnUserGroup.group_type = rhnUserGroupType.id
+ , web_customer, web_user_personal_info,
rhnUserInfo
where web_contact.org_id = web_customer.id
and web_contact.id = web_user_personal_info.web_user_id
- and web_contact.id = rhnUserGroupMembers.user_id (+)
- and rhnUserGroupMembers.user_group_id = rhnUserGroup.id (+)
- and rhnUserGroup.group_type = rhnUserGroupType.id (+)
and web_contact.id = rhnUserInfo.user_id
order by web_customer.id, web_contact.id
diff --git a/reporting/reports/data/users-systems b/reporting/reports/data/users-systems
index 94234cd..b805004 100755
--- a/reporting/reports/data/users-systems
+++ b/reporting/reports/data/users-systems
@@ -32,15 +32,15 @@ sql:
web_contact.id as user_id,
login as username,
case when web_contact_admin.user_id is not null then 1 else null end as admin_access
- from web_contact, (
+ from web_contact left outer join (
select rhnUserGroupMembers.user_id
from rhnUserGroupMembers, rhnUserGroup, rhnUserGroupType
where rhnUserGroupMembers.user_group_id = rhnUserGroup.id
and rhnUserGroup.group_type = rhnUserGroupType.id
and rhnUserGroupType.label = 'org_admin'
) web_contact_admin
- where web_contact.id = web_contact_admin.user_id (+)
- ) web_contact_adm, (
+ on web_contact.id = web_contact_admin.user_id
+ ) web_contact_adm left outer join (
select 1 as is_admin, web_contact.id as user_id, rhnServer.id as server_id, null as group_name
from web_contact, rhnServer
where web_contact.org_id = rhnServer.org_id
@@ -51,9 +51,8 @@ sql:
where rhnUserServerGroupPerms.server_group_id = rhnServerGroupMembers.server_group_id
and rhnUserServerGroupPerms.server_group_id = rhnServerGroup.id
) rhn_contact_server_group
- where
- nvl(web_contact_adm.admin_access, 0) = rhn_contact_server_group.is_admin (+)
- and web_contact_adm.user_id = rhn_contact_server_group.user_id (+)
- and rhn_contact_server_group.server_id is not null
+ on ( case when web_contact_adm.admin_access is null then 0 else web_contact_adm.admin_access end ) = rhn_contact_server_group.is_admin
+ and web_contact_adm.user_id = rhn_contact_server_group.user_id
+ where rhn_contact_server_group.server_id is not null
order by organization_id, user_id, server_id
13 years
Changes to 'refs/tags/spacewalk-web-1.4.12-1'
by Michael Mraka
Tag 'spacewalk-web-1.4.12-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-03-22 09:32 +0000
Tagging package [spacewalk-web] version [1.4.12-1] in directory [web/].
Changes since perl-NOCpulse-OracleDB-1.28.19-1:
Michael Mraka (2):
evaluate default_connection in runtime not in use RHN::DB time
Automatic commit of package [spacewalk-web] release [1.4.12-1].
Miroslav Suchý (2):
remove text "or up2date --register on Red Hat Enterprise Linux 3 or later"
remove every reference to "up2date --register" - even in comments
---
backend/common/rhnException.py | 5 ++---
backend/server/rhnHandler.py | 4 +---
backend/server/rhnUser.py | 4 ++--
client/rhel/yum-rhn-plugin/rhnplugin.py | 2 +-
rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/DB.pm | 12 ++++++------
web/spacewalk-web.spec | 5 ++++-
7 files changed, 17 insertions(+), 17 deletions(-)
---
13 years
2 commits - rel-eng/packages web/modules web/spacewalk-web.spec
by Michael Mraka
rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/DB.pm | 12 ++++++------
web/spacewalk-web.spec | 5 ++++-
3 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit cc2057dfb2256ac0a6ade69bbbaffe90d076467f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 22 10:32:17 2011 +0100
Automatic commit of package [spacewalk-web] release [1.4.12-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 7b1f24b..da0e041 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.4.11-1 web/
+1.4.12-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 63bf23d..95a9d56 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: 1.4.11
+Version: 1.4.12
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -260,6 +260,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Tue Mar 22 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.4.12-1
+- evaluate default_connection in runtime not in use RHN::DB time
+
* Fri Mar 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.4.11-1
- fixed package_removal_failures in postgresql
commit 5eb32c8a8ee62334fab40b9fd4bd86eb5a9c56c5
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 22 10:27:39 2011 +0100
evaluate default_connection in runtime not in use RHN::DB time
diff --git a/web/modules/rhn/RHN/DB.pm b/web/modules/rhn/RHN/DB.pm
index 5084c11..ce1c7d0 100644
--- a/web/modules/rhn/RHN/DB.pm
+++ b/web/modules/rhn/RHN/DB.pm
@@ -66,11 +66,7 @@ sub get_dbi_connection_string {
}
}
-$RHN::DB::default_connection = RHN::DB->get_dbi_connection_string(
- PXT::Config->get("db_backend"),
- PXT::Config->get("db_host"),
- PXT::Config->get("db_port"),
- PXT::Config->get("db_name"));
+$RHN::DB::default_connection = undef;
sub set_default_connection {
my $class = shift;
@@ -148,7 +144,11 @@ sub connect {
# TODO: Once upon a time these aliases were just Oracle dsn's, if the incoming
# alias is in this format, convert it to an Oracle dbi string?
- $alias ||= $RHN::DB::default_connection;
+ $alias ||= ($RHN::DB::default_connection ||= RHN::DB->get_dbi_connection_string(
+ PXT::Config->get("db_backend"),
+ PXT::Config->get("db_host"),
+ PXT::Config->get("db_port"),
+ PXT::Config->get("db_name")));
if ($handles{$alias} and $handles{$alias}->{Active}) {
my $dbh = $handles{$alias};
13 years
2 commits - backend/common backend/server client/rhel
by Miroslav Suchý
backend/common/rhnException.py | 5 ++---
backend/server/rhnHandler.py | 4 +---
backend/server/rhnUser.py | 4 ++--
client/rhel/yum-rhn-plugin/rhnplugin.py | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 9528c77bb337e5c9e129ce437374f4ed7282d1c2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 22 09:40:31 2011 +0100
remove every reference to "up2date --register" - even in comments
diff --git a/backend/server/rhnUser.py b/backend/server/rhnUser.py
index e415fe6..217d740 100644
--- a/backend/server/rhnUser.py
+++ b/backend/server/rhnUser.py
@@ -155,7 +155,7 @@ class User:
if type(value) == type(""):
value = string.strip(value)
# We have to watch over carefully for different field names
- # being sent from rhn_register (up2date --register)
+ # being sent from rhn_register
changed = 0
# translation
@@ -582,7 +582,7 @@ def __new_user_db(username, password, email, org_id, org_password):
if email:
# don't update the user's email address in the satellite context...
- # we *must* in the live context, but user creation through up2date --register
+ # we *must* in the live context, but user creation through rhn_register
# is disallowed in the satellite context anyway...
if not pre_existing_user:
user.set_info("email", email)
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 5f938e2..4f2f308 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -198,7 +198,7 @@ def posttrans_hook(conduit):
def rewordError(e):
#This is compensating for hosted/satellite returning back an error
- #message instructing RHEL5 clients to run "up2date --register"
+ #message instructing RHEL5 clients to run "rhn_register"
#bz: 438175
replacedText = _("Error Message:") + "\n\t" + \
_("Please run rhn_register as root on this client")
commit 67c31380b91902c10f624883d7d7628583c01f0e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 22 09:36:25 2011 +0100
remove text "or up2date --register on Red Hat Enterprise Linux 3 or later"
The rhn_register was RHEL 2.1 thing. Then the functionality was
moved to up2date --register for RHEL 3 and 4. Then up2date was
removed in RHEL 5 and rhn_register was reintroduced.
Make the text simplier.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index 2976e0f..5fac3f9 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -73,7 +73,7 @@ requested information."),
The anonymous server functionality is no longer available.
Please re-register this system by running rhn_register
- (or up2date --register on Red Hat Enterprise Linux 3+) as root.
+ as root.
Please visit https://%(hostname)s/rhn/systems/SystemEntitlements.do
or login at https://%(hostname)s, and from the "Overview" tab,
select "Subscription Management" to enable RHN service for this system.
@@ -257,8 +257,7 @@ maximum membership exceeded"),
# 2000-2999: RHN Satellite specific errors:
2001: _("""
- RHN Satellite user creation is not allowed via rhn_register
- (or up2date --register on Red Hat Enterprise Linux 3 or later);
+ RHN Satellite user creation is not allowed via rhn_register;
please contact your sysadmin to have your account created.
"""),
2002: _("""
diff --git a/backend/server/rhnHandler.py b/backend/server/rhnHandler.py
index d04a204..9d154e9 100644
--- a/backend/server/rhnHandler.py
+++ b/backend/server/rhnHandler.py
@@ -55,9 +55,7 @@ class rhnHandler(RPC_Base):
if not server:
# Invalid server certificate.
raise rhnFault(9, _(
- "Please run rhn_register "
- "(or up2date --register on Red Hat Enterprise Linux 3 or later)\n"
- "as root on this client"))
+ "Please run rhn_register as root on this client"))
self.server_id = server.getid()
self.server = server
# update the latest checkin time
13 years
Changes to 'refs/tags/perl-NOCpulse-OracleDB-1.28.19-1'
by Miroslav Suchý
Tag 'perl-NOCpulse-OracleDB-1.28.19-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-03-22 07:48 +0000
Tagging package [perl-NOCpulse-OracleDB] version [1.28.19-1] in directory [monitoring/PerlModules/NP/OracleDB/].
Changes since spacewalk-web-1.4.11-1:
Miroslav Suchý (3):
blacklist apt-spacewalk - this is debian package, it has no sense to build it as rpm
add missing buildrequires
Automatic commit of package [perl-NOCpulse-OracleDB] release [1.28.19-1].
Tomas Lestach (1):
notice also non-existing packages when adding them to a channel
---
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 5 +++++
monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec | 6 +++++-
rel-eng/packages/perl-NOCpulse-OracleDB | 2 +-
rel-eng/tito.props | 8 ++++----
4 files changed, 15 insertions(+), 6 deletions(-)
---
13 years
2 commits - monitoring/PerlModules rel-eng/packages
by Miroslav Suchý
monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec | 6 +++++-
rel-eng/packages/perl-NOCpulse-OracleDB | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit f613214a56cd1306e7f7680ab1b7f11af12f63a2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 22 08:48:25 2011 +0100
Automatic commit of package [perl-NOCpulse-OracleDB] release [1.28.19-1].
diff --git a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
index 80dff29..eda747e 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.18
+Version: 1.28.19
Release: 1%{?dist}
Summary: Perl modules for NOCpulse Oracle database access
URL: https://fedorahosted.org/spacewalk
@@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorlib}/NOCpulse/*
%changelog
+* Tue Mar 22 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.28.19-1
+- add missing buildrequires
+
* Fri Mar 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.28.18-1
- fixed input values (PG)
- fixed sysdate error (PG)
diff --git a/rel-eng/packages/perl-NOCpulse-OracleDB b/rel-eng/packages/perl-NOCpulse-OracleDB
index 11431d1..4da40bd 100644
--- a/rel-eng/packages/perl-NOCpulse-OracleDB
+++ b/rel-eng/packages/perl-NOCpulse-OracleDB
@@ -1 +1 @@
-1.28.18-1 monitoring/PerlModules/NP/OracleDB/
+1.28.19-1 monitoring/PerlModules/NP/OracleDB/
commit 42e5c132abb0aedb5b81d1fe40b3d5e0fcc73780
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 22 08:47:42 2011 +0100
add missing buildrequires
addressing:
Can't locate RHN/DB.pm in @INC (@INC contains: blib/lib blib/arch /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at blib/lib/NOCpulse/OracleDB.pm line 12.
BEGIN failed--compilation aborted at blib/lib/NOCpulse/OracleDB.pm line 12.
Compilation failed in require at test.pl line 10.
BEGIN failed--compilation aborted at test.pl line 10.
make: *** [test_dynamic] Error 2
diff --git a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
index d97fab5..80dff29 100644
--- a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
+++ b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
@@ -7,6 +7,7 @@ Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(NOCpulse::Debug) perl(NOCpulse::Config) perl(NOCpulse::Utils::XML) perl(NOCpulse::Object)
+BuildRequires: perl(RHN::DB)
BuildRequires: perl(DBI) perl(ExtUtils::MakeMaker)
Group: Development/Libraries
License: GPLv2
13 years
rel-eng/tito.props
by Miroslav Suchý
rel-eng/tito.props | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 728f85cf7d7814cdefa1cf13d35512e3625ea03a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 22 08:41:07 2011 +0100
blacklist apt-spacewalk - this is debian package, it has no sense to build it as rpm
diff --git a/rel-eng/tito.props b/rel-eng/tito.props
index 954d450..cfd4e66 100644
--- a/rel-eng/tito.props
+++ b/rel-eng/tito.props
@@ -9,16 +9,16 @@ autobuild_tags = dist-5E-sw-1.4-candidate dist-6E-sw-1.4-candidate dist-f14-sw-1
[dist-5E-sw-1.4-candidate]
disttag = .el5
-blacklist=oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround
+blacklist=oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround apt-spacewalk
[dist-6E-sw-1.4-candidate]
disttag = .el6
-blacklist=oracle-server-admin oracle-server-scripts rhnclient smartpm heirloom-pkgtools jabberd-selinux
+blacklist=oracle-server-admin oracle-server-scripts rhnclient smartpm heirloom-pkgtools jabberd-selinux apt-spacewalk
[dist-f13-sw-1.4-candidate]
disttag = .fc13
-blacklist=jabberd-selinux oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround
+blacklist=jabberd-selinux oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround apt-spacewalk
[dist-f14-sw-1.4-candidate]
disttag = .fc14
-blacklist=jabberd-selinux oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround
+blacklist=jabberd-selinux oracle-server-admin oracle-server-scripts rhnclient smartpm jabberd-selinux-workaround python-ethtool msv-workaround apt-spacewalk
13 years