java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/security/acl/Access.java | 18 +++++++++++
java/code/webapp/WEB-INF/struts-config.xml | 2 -
2 files changed, 19 insertions(+), 1 deletion(-)
New commits:
commit 5b7a7abf57f7e19674358d6537e21a7b017642bd
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Aug 12 17:08:14 2011 +0200
729975 - do not allow to edit Red Hat errata
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/Access.java b/java/code/src/com/redhat/rhn/common/security/acl/Access.java
index b51326a..4523dd1 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/Access.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/Access.java
@@ -20,6 +20,8 @@ import com.redhat.rhn.common.db.datasource.ModeFactory;
import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
+import com.redhat.rhn.domain.errata.Errata;
+import com.redhat.rhn.domain.errata.ErrataFactory;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.org.OrgFactory;
import com.redhat.rhn.domain.rhnpackage.PackageEvr;
@@ -424,6 +426,22 @@ public class Access extends BaseHandler implements AclHandler {
return c.isProtected();
}
+ /**
+ * See if the erratum isn't a Red Hat erratum
+ * @param ctx Our current context, containing the erratum
+ * @param params nevim, dal
+ * @return whether the erratum isn't a Red Hat erratum
+ */
+ public boolean aclErrataEditable(Object ctx, String[] params) {
+ Map map = (Map)ctx;
+ Long eid = getAsLong(map.get("eid"));
+ Errata e = ErrataFactory.lookupById(eid);
+ if (e == null || e.getOrg() == null) {
+ return false;
+ }
+ return true;
+ }
+
/*
* These were taken out 06/16/2005 and should be implemented and put back in
* as we need them.
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 56c6d9b..e8e5853 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -2242,7 +2242,7 @@
type="com.redhat.rhn.frontend.action.errata.EditAction"
parameter="dispatch"
className="com.redhat.rhn.frontend.struts.RhnActionMapping">
- <set-property property="acls" value="user_role(channel_admin)"/>
+ <set-property property="acls" value="user_role(channel_admin); errata_editable()"/>
<set-property property="postRequiredIfSubmitted" value="true" />
<forward name="published"
path="/errata/manage/SelectChannels.do" redirect="true"/>
12 years, 8 months
Changes to 'refs/tags/NPalert-1.126.25-1'
by Michael Mraka
Tag 'NPalert-1.126.25-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-15 09:27 +0000
Tagging package [NPalert] version [1.126.25-1] in directory [monitoring/NPalert/].
Changes since spacewalk-schema-1.6.6-1:
Michael Mraka (1):
Automatic commit of package [NPalert] release [1.126.25-1].
---
monitoring/NPalert/NPalert.spec | 10 +++++++++-
rel-eng/packages/NPalert | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
---
12 years, 8 months
monitoring/NPalert rel-eng/packages
by Michael Mraka
monitoring/NPalert/NPalert.spec | 10 +++++++++-
rel-eng/packages/NPalert | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit b15c8249f388c29a1c1b8634a1a069f0530dfec1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 15 11:27:04 2011 +0200
Automatic commit of package [NPalert] release [1.126.25-1].
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index 70d389f..4056465 100644
--- a/monitoring/NPalert/NPalert.spec
+++ b/monitoring/NPalert/NPalert.spec
@@ -9,7 +9,7 @@ Name: NPalert
Summary: NOCpulse notification system
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.126.24
+Version: 1.126.25
Release: 1%{?dist}
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@@ -137,6 +137,14 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Aug 15 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.126.25-1
+- 700385 - use standard ANSI join
+- 700385 - use current_timestamps instead of sysdate
+- 700385 - replaced synonym with original table_name
+- 700385 - use standard ANSI join
+- 700385 - created compatibility views for monitoring
+- 700385 - reuse RHN::DB for db connection in NotificationDB.pm
+
* Thu Jul 21 2011 Miroslav Suchý 1.126.24-1
- 723899 - run that cron task only if /etc/NOCpulse.ini contains something else
then comments
diff --git a/rel-eng/packages/NPalert b/rel-eng/packages/NPalert
index fb9f07c..d8209cb 100644
--- a/rel-eng/packages/NPalert
+++ b/rel-eng/packages/NPalert
@@ -1 +1 @@
-1.126.24-1 monitoring/NPalert/
+1.126.25-1 monitoring/NPalert/
12 years, 8 months
Changes to 'refs/tags/spacewalk-schema-1.6.6-1'
by Michael Mraka
Tag 'spacewalk-schema-1.6.6-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-15 09:26 +0000
Tagging package [spacewalk-schema] version [1.6.6-1] in directory [schema/spacewalk/].
Changes since spacewalk-backend-1.6.8-1:
Michael Mraka (9):
700385 - reuse RHN::DB for db connection in NotificationDB.pm
700385 - added all_tab_columns compatibility view
700385 - created compatibility views for monitoring
700385 - use standard ANSI join
700385 - replaced synonym with original table_name
700385 - use current_timestamps instead of sysdate
700385 - use standard ANSI join
700385 - schema upgrade scripts
Automatic commit of package [spacewalk-schema] release [1.6.6-1].
---
monitoring/NPalert/NotificationDB.pm | 59 +++-------
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/oracle/synonyms/strategies.sql | 29 ----
schema/spacewalk/oracle/views/all_primary_keys.sql | 10 +
schema/spacewalk/postgres/views/all_primary_keys.sql | 13 ++
schema/spacewalk/postgres/views/all_tab_columns.sql | 12 ++
schema/spacewalk/spacewalk-schema.spec | 8 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.postgresql | 12 ++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.oracle | 10 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.postgresql | 13 ++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.oracle | 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.postgresql | 2
13 files changed, 104 insertions(+), 69 deletions(-)
---
12 years, 8 months
rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 4cb9e66a708387550826cd6ac56bccd9d247955b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 15 11:26:36 2011 +0200
Automatic commit of package [spacewalk-schema] release [1.6.6-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index e2659cf..ae6970d 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.6.5-1 schema/spacewalk/
+1.6.6-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index dbf6b13..a61f9ed 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.5
+Version: 1.6.6
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,12 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Mon Aug 15 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.6-1
+- 700385 - schema upgrade scripts
+- 700385 - replaced synonym with original table_name
+- 700385 - created compatibility views for monitoring
+- 700385 - added all_tab_columns compatibility view
+
* Thu Aug 11 2011 Simon Lukasik <slukasik(a)redhat.com> 1.6.5-1
- Do not confuse people by filename, this is not an upgrade of package
(slukasik(a)redhat.com)
12 years, 8 months
8 commits - monitoring/NPalert schema/spacewalk
by Michael Mraka
monitoring/NPalert/NotificationDB.pm | 59 +++-------
schema/spacewalk/oracle/synonyms/strategies.sql | 29 ----
schema/spacewalk/oracle/views/all_primary_keys.sql | 10 +
schema/spacewalk/postgres/views/all_primary_keys.sql | 13 ++
schema/spacewalk/postgres/views/all_tab_columns.sql | 12 ++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.postgresql | 12 ++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.oracle | 10 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.postgresql | 13 ++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.oracle | 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.postgresql | 2
11 files changed, 96 insertions(+), 67 deletions(-)
New commits:
commit 0bc224de5ee9aaec1b9c3af0587ac6009ece3a88
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 15 11:07:56 2011 +0200
700385 - schema upgrade scripts
diff --git a/schema/spacewalk/postgres/views/all_primary_keys.sql b/schema/spacewalk/postgres/views/all_primary_keys.sql
index f0b74cc..7299d04 100644
--- a/schema/spacewalk/postgres/views/all_primary_keys.sql
+++ b/schema/spacewalk/postgres/views/all_primary_keys.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 c200d5823f273ba85945fe926ee06d2657ca0892
+-- oracle equivalent source sha1 745701c8146c848eb2a3d1b18fd93d4332453103
create or replace view all_primary_keys as
select
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.oracle
new file mode 100644
index 0000000..b7b00b1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.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/004-all_tab_columns.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.postgresql
new file mode 100644
index 0000000..6169435
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/004-all_tab_columns.sql.postgresql
@@ -0,0 +1,12 @@
+-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+
+create or replace view all_tab_columns
+as
+select
+ table_name as table_name,
+ column_name as column_name,
+ ordinal_position as column_id,
+ data_type as data_type,
+ numeric_precision as data_precision,
+ substr(is_nullable,1,1) as nullable
+from information_schema.columns;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.oracle
new file mode 100644
index 0000000..68732ad
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.oracle
@@ -0,0 +1,10 @@
+create or replace view all_primary_keys as
+select
+ ac.table_name,
+ ac.constraint_name,
+ acc.column_name
+ from all_constraints ac
+ join all_cons_columns acc
+ on ac.constraint_name = acc.constraint_name
+ and ac.owner = acc.owner
+ where ac.constraint_type = 'P';
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.postgresql
new file mode 100644
index 0000000..7299d04
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/005-all_primary_keys.sql.postgresql
@@ -0,0 +1,13 @@
+-- oracle equivalent source sha1 745701c8146c848eb2a3d1b18fd93d4332453103
+
+create or replace view all_primary_keys as
+select
+ ts.table_name as table_name,
+ ts.constraint_name as constraint_name,
+ ccu.column_name as column_name
+ from information_schema.table_constraints ts
+ join information_schema.constraint_column_usage ccu
+ on ts.table_name = ccu.table_name
+ and ts.table_schema = ccu.table_schema
+ and ts.constraint_name = ccu.constraint_name
+ where ts.constraint_type = 'PRIMARY KEY';
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.oracle
new file mode 100644
index 0000000..dc274cc
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.oracle
@@ -0,0 +1,2 @@
+drop synonym strategies;
+drop synonym strategies_recid_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.postgresql
new file mode 100644
index 0000000..98bd681
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/006-strategies-drop.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 80c461976c98ac7e8b7746e2718be8956e0acd07
+-- This file is intentionally left empty.
commit 4336cc8cd0f24f8fc9de5cbba905167ca436dfe1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:56:21 2011 +0200
700385 - use standard ANSI join
fixing
NOCpulse::Probe::InternalError: Database error 7 executing query SELECT
distinct
schedule_id,
nvl(substr(RHNTIMEZONE.olson_name,1,40),'GMT') as olson_tz_id
FROM RHN_CONTACT_METHODS, RHNUSERINFO, RHNTIMEZONE
WHERE schedule_id is not null
AND RHN_CONTACT_METHODS.contact_id = RHNUSERINFO.user_id
AND RHNTIMEZONE.id (+) = RHNUSERINFO.timezone_id
: ERROR: syntax error at or near ")"
LINE 8: AND RHNTIMEZONE.id (+) = RHNUSERINFO.timezone_id
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index c8dd0ce..8b2c034 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -483,10 +483,11 @@ sub select_schedule_and_zone_combos {
distinct
schedule_id,
nvl(substr($support_table2.olson_name,1,40),'GMT') as olson_tz_id
- FROM $table, $support_table1, $support_table2
+ FROM $table, $support_table1
+ LEFT JOIN $support_table2
+ ON $support_table1.timezone_id = $support_table2.id
WHERE schedule_id is not null
AND $table.contact_id = $support_table1.user_id
- AND $support_table2.id (+) = $support_table1.timezone_id
EOSQL
return $self->execute($sql, undef, FETCH_ARRAYREF);
commit 6ca0702c701d9f6d91c3960b3226419c460fcffa
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:49:42 2011 +0200
700385 - use current_timestamps instead of sysdate
fixing
NOCpulse::Probe::InternalError: Database error 7 executing query SELECT
RECID,
CUSTOMER_ID,
CONTACT_ID,
REDIRECT_TYPE,
DESCRIPTION,
REASON,
TO_CHAR(EXPIRATION,'MM-DD-YYYY HH24:MI:SS') as EXPIRATION,
LAST_UPDATE_USER,
TO_CHAR(LAST_UPDATE_DATE,'MM-DD-YYYY HH24:MI:SS') as LAST_UPDATE_DATE,
TO_CHAR(START_DATE,'MM-DD-YYYY HH24:MI:SS') as START_DATE,
RECURRING,
RECURRING_FREQUENCY,
RECURRING_DURATION
FROM RHN_REDIRECTS
WHERE SYSDATE < EXPIRATION
: ERROR: column "sysdate" does not exist
LINE 16: WHERE SYSDATE < EXPIRATION
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index d1a02b7..c8dd0ce 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -291,7 +291,7 @@ sub select_active_redirects {
RECURRING_FREQUENCY,
RECURRING_DURATION
FROM $table
- WHERE SYSDATE < EXPIRATION
+ WHERE current_timestamp < EXPIRATION
EOSQL
my $redirptr = $self->execute($sql, $table, FETCH_ARRAYREF);
@@ -317,7 +317,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE < $table2.EXPIRATION
+ current_timestamp < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -341,7 +341,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE < $table2.EXPIRATION
+ current_timestamp < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -364,7 +364,7 @@ EOSQL
FROM
$table, $table2
WHERE
- SYSDATE < $table2.EXPIRATION
+ current_timestamp < $table2.EXPIRATION
AND $table.REDIRECT_ID = $table2.RECID
EOSQL
@@ -398,7 +398,7 @@ sub select_active_redirect_criteria {
$table.MATCH_VALUE,
$table.INVERTED
FROM $table, $table2
- WHERE SYSDATE < $table2.EXPIRATION
+ WHERE current_timestamp < $table2.EXPIRATION
AND $table2.RECID = $table.REDIRECT_ID
ORDER BY $table.REDIRECT_ID, $table.MATCH_PARAM
EOSQL
commit abc1c6506cd5f190bb867d766a1cc795c375382b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:42:32 2011 +0200
700385 - replaced synonym with original table_name
fixing
NOCpulse::Probe::InternalError: Database error 7 executing query
select g.*,
(contact_strategy || ':' || ack_completed || 'Ack') as strategy
from RHN_CONTACT_GROUPS g,
strategies s
where g.strategy_id = s.recid
: ERROR: relation "strategies" does not exist
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index d699c63..d1a02b7 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -415,7 +415,7 @@ sub select_contact_groups {
select g.*,
(contact_strategy || ':' || ack_completed || 'Ack') as strategy
from $table g,
- strategies s
+ rhn_strategies s
where g.strategy_id = s.recid
EOSQL
diff --git a/schema/spacewalk/oracle/synonyms/strategies.sql b/schema/spacewalk/oracle/synonyms/strategies.sql
deleted file mode 100644
index 74f9ded..0000000
--- a/schema/spacewalk/oracle/synonyms/strategies.sql
+++ /dev/null
@@ -1,29 +0,0 @@
---
--- 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 special strategies synonyms for monitoring backend code to function as is
-
-create or replace synonym strategies for rhn_strategies;
-create or replace synonym strategies_recid_seq for rhn_strategies_recid_seq;
-
---
---
---Revision 1.1 2004/06/23 15:01:07 kja
---bugzilla 126465 -- fix synonyms for monitoring backend
---
---
commit fa84daceb0f70daf6a6d3e524a83384995ef4d59
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:34:21 2011 +0200
700385 - use standard ANSI join
fixing
NOCpulse::Probe::InternalError: Database error 7 executing query SELECT
...
FROM
RHN_CONTACT_METHODS, RHNUSERINFO, RHNTIMEZONE
WHERE
RHN_CONTACT_METHODS.contact_id = RHNUSERINFO.user_id
AND RHNTIMEZONE.id (+) = RHNUSERINFO.timezone_id
: ERROR: syntax error at or near ")"
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index 432938a..d699c63 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -196,10 +196,11 @@ SELECT
nvl(substr($table3.olson_name,1,40),'GMT') as olson_tz_id,
$table.snmp_host, $table.snmp_port
FROM
- $table, $table2, $table3
+ $table, $table2
+LEFT JOIN $table3
+ ON $table2.timezone_id = $table3.id
WHERE
$table.contact_id = $table2.user_id
-AND $table3.id (+) = $table2.timezone_id
EOSQL
return $self->execute($sql, $table, FETCH_ARRAYREF);
commit 72ee4a4e62558512a56a909efec2a0443cca1633
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:28:07 2011 +0200
700385 - created compatibility views for monitoring
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index bb38bc5..432938a 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -1192,16 +1192,12 @@ sub _select_table_primary_keys {
my $table = 'ALL_CONSTRAINTS';
my $sql = <<EOSQL;
- SELECT ac.constraint_name,
- ac.table_name,
- acc.column_name
- FROM all_constraints ac,
- all_cons_columns acc
- WHERE UPPER(ac.table_name) = UPPER(?)
- AND ac.constraint_type = 'P'
- AND ac.constraint_name = acc.constraint_name
- AND ac.owner = acc.owner
- ORDER BY ac.constraint_name, acc.position
+ SELECT constraint_name,
+ table_name,
+ column_name
+ FROM all_primary_keys
+ WHERE UPPER(table_name) = UPPER(?)
+ ORDER BY constraint_name, column_name
EOSQL
my $result = $self->execute($sql, $table, FETCH_ARRAYREF, @args);
diff --git a/schema/spacewalk/oracle/views/all_primary_keys.sql b/schema/spacewalk/oracle/views/all_primary_keys.sql
new file mode 100644
index 0000000..68732ad
--- /dev/null
+++ b/schema/spacewalk/oracle/views/all_primary_keys.sql
@@ -0,0 +1,10 @@
+create or replace view all_primary_keys as
+select
+ ac.table_name,
+ ac.constraint_name,
+ acc.column_name
+ from all_constraints ac
+ join all_cons_columns acc
+ on ac.constraint_name = acc.constraint_name
+ and ac.owner = acc.owner
+ where ac.constraint_type = 'P';
diff --git a/schema/spacewalk/postgres/views/all_primary_keys.sql b/schema/spacewalk/postgres/views/all_primary_keys.sql
new file mode 100644
index 0000000..f0b74cc
--- /dev/null
+++ b/schema/spacewalk/postgres/views/all_primary_keys.sql
@@ -0,0 +1,13 @@
+-- oracle equivalent source sha1 c200d5823f273ba85945fe926ee06d2657ca0892
+
+create or replace view all_primary_keys as
+select
+ ts.table_name as table_name,
+ ts.constraint_name as constraint_name,
+ ccu.column_name as column_name
+ from information_schema.table_constraints ts
+ join information_schema.constraint_column_usage ccu
+ on ts.table_name = ccu.table_name
+ and ts.table_schema = ccu.table_schema
+ and ts.constraint_name = ccu.constraint_name
+ where ts.constraint_type = 'PRIMARY KEY';
commit e267a9260894a64018c6497015cac827ab60fa69
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 16:18:12 2011 +0200
700385 - added all_tab_columns compatibility view
diff --git a/schema/spacewalk/postgres/views/all_tab_columns.sql b/schema/spacewalk/postgres/views/all_tab_columns.sql
new file mode 100644
index 0000000..cac3b37
--- /dev/null
+++ b/schema/spacewalk/postgres/views/all_tab_columns.sql
@@ -0,0 +1,12 @@
+-- oracle equivalent source none
+
+create or replace view all_tab_columns
+as
+select
+ table_name as table_name,
+ column_name as column_name,
+ ordinal_position as column_id,
+ data_type as data_type,
+ numeric_precision as data_precision,
+ substr(is_nullable,1,1) as nullable
+from information_schema.columns;
commit ade3f2add9ced579ad70d2c9d121632a1a4f508c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 12 14:46:54 2011 +0200
700385 - reuse RHN::DB for db connection in NotificationDB.pm
fixing
2011-08-12 12:09:03 Compilation failed in require at /usr/bin/generate-config line 14.
2011-08-12 12:09:03 BEGIN failed--compilation aborted at /usr/bin/generate-config line 14.
2011-08-12 12:09:04 install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
(eval 23) line 3.
2011-08-12 12:09:04 Perhaps the DBD::Oracle perl module hasn't been fully installed,
2011-08-12 12:09:04 or perhaps the capitalisation of 'Oracle' isn't right.
2011-08-12 12:09:04 Available drivers: DBM, ExampleP, File, Gofer, Pg, Proxy, Sponge.
2011-08-12 12:09:04 at /usr/share/perl5/vendor_perl/NOCpulse/Notif/NotificationDB.pm line 93
diff --git a/monitoring/NPalert/NotificationDB.pm b/monitoring/NPalert/NotificationDB.pm
index 44343e5..bb38bc5 100644
--- a/monitoring/NPalert/NotificationDB.pm
+++ b/monitoring/NPalert/NotificationDB.pm
@@ -10,6 +10,8 @@ use NOCpulse::Config;
use NOCpulse::Probe::DataSource::AbstractDatabase qw(:constants);
use NOCpulse::Probe::Error;
+use RHN::DB;
+
use base qw(NOCpulse::Probe::DataSource::AbstractDatabase);
use Class::MethodMaker
get_set =>
@@ -73,25 +75,8 @@ sub init {
sub connect {
my ($self, %paramHash) = @_;
- my $cfg = new NOCpulse::Config;
- $ENV{'ORACLE_HOME'} = $cfg->get('oracle', 'ora_home');
- my $DBD = $cfg->get('cf_db', 'dbd');
- my $DBNAME = $cfg->get('cf_db', 'name');
- my $DBUNAME = $cfg->get('cf_db', 'notification_username');
- my $DBPASS = $cfg->get('cf_db', 'notification_password');
-
- my $PrintError = $paramHash{PrintError} || 0;
- my $RaiseError = $paramHash{RaiseError} || 0;
- my $AutoCommit = $paramHash{AutoCommit} || 0;
-
- # Disconnect prior session, if exists
- if ($self->dbh) {
- $self->disconnect;
- }
-
# Open a connection to the DB
- $self->dbh(DBI->connect("DBI:$DBD:$DBNAME", $DBUNAME, $DBPASS,
- { RaiseError => $RaiseError, AutoCommit => $AutoCommit }));
+ $self->dbh(RHN::DB->connect);
return $self->dbh;
}
12 years, 8 months
Changes to 'refs/tags/spacewalk-backend-1.6.8-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.6.8-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-08-15 07:43 +0000
Tagging package [spacewalk-backend] version [1.6.8-1] in directory [backend/].
Changes since rhn-client-tools-1.6.13-1:
Miroslav Suchý (2):
make satCerts.py work on PostgreSQL
Automatic commit of package [spacewalk-backend] release [1.6.8-1].
---
backend/satellite_tools/satCerts.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
---
12 years, 8 months
2 commits - backend/satellite_tools backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/satellite_tools/satCerts.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit c984ad2b4780aac7aec2ebbaac86dd310d4f11be
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 15 09:43:38 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.8-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 7314468..eba92ff 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,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.7
+Version: 1.6.8
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -672,6 +672,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Mon Aug 15 2011 Miroslav Suchý 1.6.8-1
+- make satCerts.py work on PostgreSQL
+
* Fri Aug 12 2011 Miroslav Suchý 1.6.7-1
- add missing import - sys
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index af2211b..4894661 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.7-1 backend/
+1.6.8-1 backend/
commit 7692fe587856bb528081bd3def202647eb6b20b5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 15 09:42:07 2011 +0200
make satCerts.py work on PostgreSQL
Contributed by:
George Nikandrov
https://www.redhat.com/archives/spacewalk-devel/2011-August/msg00031.html
Addressing:
rhn-ssl-dbstore -vvv --ca-cert /root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT
fails with quite obvious python traceback.
diff --git a/backend/satellite_tools/satCerts.py b/backend/satellite_tools/satCerts.py
index 2a66d34..ab22811 100644
--- a/backend/satellite_tools/satCerts.py
+++ b/backend/satellite_tools/satCerts.py
@@ -421,7 +421,7 @@ def _checkCertMatch_rhnCryptoKey(caCert, description, org_id, deleteRowYN=0,
## NUKE IT!
if deleteRowYN:
#print 'found a cert, nuking it! id:', rhn_cryptokey_id
- h = rhnSQL.prepare('delete rhnCryptoKey where id=:rhn_cryptokey_id')
+ h = rhnSQL.prepare('delete from rhnCryptoKey where id=:rhn_cryptokey_id')
h.execute(rhn_cryptokey_id=rhn_cryptokey_id)
#rhnSQL.commit()
rhn_cryptokey_id = -1
12 years, 8 months
Changes to 'refs/tags/rhn-client-tools-1.6.13-1'
by Miroslav Suchý
Tag 'rhn-client-tools-1.6.13-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-08-12 16:41 +0000
Tagging package [rhn-client-tools] version [1.6.13-1] in directory [client/rhel/rhn-client-tools/].
Changes since yum-rhn-plugin-1.6.9-1:
Miroslav Suchý (2):
do not verify md5, size and mtime for /etc/sysconfig/rhn/up2date
Automatic commit of package [rhn-client-tools] release [1.6.13-1].
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 7 +++++--
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
---
12 years, 8 months
2 commits - client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 7 +++++--
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 0a208767d0cee2d383cdb68ae9f7c3d511bf5f98
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 12 18:41:23 2011 +0200
Automatic commit of package [rhn-client-tools] release [1.6.13-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 16a03f6..2c2cebd 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 1.6.12
+Version: 1.6.13
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -339,6 +339,9 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Fri Aug 12 2011 Miroslav Suchý 1.6.13-1
+- do not verify md5, size and mtime for /etc/sysconfig/rhn/up2date
+
* Thu Aug 11 2011 Jan Pazdziora 1.6.12-1
- 729161 - default to RHSM in firstboot registration (mzazrivec(a)redhat.com)
- 729468 - firstboot dialogs polishing (mzazrivec(a)redhat.com)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 37001c1..b46457f0 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.6.12-1 client/rhel/rhn-client-tools/
+1.6.13-1 client/rhel/rhn-client-tools/
commit 754408b68e7530e65815e5ac19dbb68e142e8768
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 12 18:41:11 2011 +0200
do not verify md5, size and mtime for /etc/sysconfig/rhn/up2date
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 7dd74b0..16a03f6 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -197,7 +197,7 @@ make -f Makefile.rhn-client-tools test
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/configfiles
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/script
-%config(noreplace) %{_sysconfdir}/sysconfig/rhn/up2date
+%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/sysconfig/rhn/up2date
%config(noreplace) %{_sysconfdir}/logrotate.d/up2date
%config(noreplace) %{_sysconfdir}/rpm/macros.up2date
12 years, 8 months