backend/server/importlib/importLib.py
| 1
backend/spacewalk-backend.spec
| 5 +
rel-eng/packages/spacewalk-backend
| 2
rel-eng/packages/spacewalk-schema
| 2
schema/spacewalk/common/views/views.deps
| 1
schema/spacewalk/oracle/triggers/rhnDistChannelMap.sql
| 25 ++++++++
schema/spacewalk/postgres/triggers/rhnDistChannelMap.sql
| 31 ++++++++++
schema/spacewalk/spacewalk-schema.spec
| 8 ++
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/145-rhnDistChannelMap.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/146-rhnDistChannelMap-data.sql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.oracle
| 10 +++
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.postgresql
| 17 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.oracle
| 10 ---
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.postgresql
| 17 -----
15 files changed, 101 insertions(+), 34 deletions(-)
New commits:
commit 85924cc228a576ba58f2b16e7e410f93cf8359ec
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 31 21:27:34 2012 +0100
Automatic commit of package [spacewalk-backend] release [1.8.85-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 402b050..4da67eb 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
-Version: 1.8.84
+Version: 1.8.85
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -638,6 +638,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Oct 31 2012 Jan Pazdziora 1.8.85-1
+- add org_id to DistChannelMap backend class
+
* Tue Oct 30 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.84-1
- removing unused backend code
- backend changes
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 84587a4..edf2176 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.8.84-1 backend/
+1.8.85-1 backend/
commit e9ce8e00b7910235b6dfef54222b8d1d4bfe3453
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 31 21:27:26 2012 +0100
Automatic commit of package [spacewalk-schema] release [1.8.86-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 129d1a8..ea436fc 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.8.85-1 schema/spacewalk/
+1.8.86-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec
b/schema/spacewalk/spacewalk-schema.spec
index 8609dda..37f1ddd 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.8.85
+Version: 1.8.86
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -68,6 +68,12 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Oct 31 2012 Jan Pazdziora 1.8.86-1
+- The index might not actually exist.
+- Fixing syntax.
+- define rhnOrgDistChannelMap view dependency
+- create rhnDistChannelMap triggers in the schema
+
* Wed Oct 31 2012 Jan Pazdziora 1.8.85-1
- Fixing syntax.
commit 8d8852032d60dd1bbbe640733d159ce086b27dc4
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 31 16:57:55 2012 +0100
The index might not actually exist.
Addressing
psql:/var/log/spacewalk/schema-upgrade/20121031-104227-script.sql:15578: ERROR: index
"rhn_dcm_os_release_caid_idx" does not exist
(cherry picked from commit 28994c4547090e1d541090d6ea7718f3ae4ee88d)
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/145-rhnDistChannelMap.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/145-rhnDistChannelMap.sql.postgresql
index 08fa0fa..654f2f3 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/145-rhnDistChannelMap.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/145-rhnDistChannelMap.sql.postgresql
@@ -2,7 +2,7 @@
ALTER TABLE rhnDistChannelMap ADD org_id NUMERIC;
ALTER TABLE rhnDistChannelMap ADD CONSTRAINT rhn_dcm_oid_fk FOREIGN KEY (org_id)
REFERENCES web_customer (id) ON DELETE CASCADE;
-DROP INDEX rhn_dcm_os_release_caid_idx;
+DROP INDEX if exists rhn_dcm_os_release_caid_idx;
ALTER TABLE rhnDistChannelMap DROP CONSTRAINT rhn_dcm_os_release_caid_uq;
ALTER TABLE rhnDistChannelMap ADD CONSTRAINT rhn_dcm_release_caid_oid_uq UNIQUE (release,
channel_arch_id, org_id);
commit 50dcb040c9ddd53cdc5c445a51b3e50c49ee0140
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 31 15:08:22 2012 +0100
Fixing syntax.
Addressing
psql:/var/log/spacewalk/schema-upgrade/20121031-094201-script.sql:2414: ERROR: column
"dcm" of relation "rhndistchannelmap" does not exist
LINE 1: UPDATE rhnDistChannelMap dcm SET dcm.org_id = (SELECT c.org_...
^
(cherry picked from commit 00f2903853d3a63377f3c749ce21e87da3279ffc)
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/146-rhnDistChannelMap-data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/146-rhnDistChannelMap-data.sql
index 948a329..4d26cd6 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/146-rhnDistChannelMap-data.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/146-rhnDistChannelMap-data.sql
@@ -1 +1 @@
-UPDATE rhnDistChannelMap dcm SET dcm.org_id = (SELECT c.org_id FROM rhnChannel c where
c.id = dcm.channel_id);
+UPDATE rhnDistChannelMap dcm SET org_id = (SELECT c.org_id FROM rhnChannel c where c.id =
dcm.channel_id);
commit 3c5c60f569d8bdcfc0e1d25f52cd5c23e8c4610f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 31 14:39:17 2012 +0100
Fixing syntax.
Addressing
psql:/var/log/spacewalk/schema-upgrade/20121031-071549-script.sql:2386: ERROR:
missing FROM-clause entry for table "rhn_timezone_id_seq"
LINE 2: VALUES (rhn_timezone_id_seq.nextval,
^
(cherry picked from commit a2a9cdaea474e0dfc17fa565323757190779a3df)
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
index 2f0894e..d747c69 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
@@ -1,3 +1,3 @@
INSERT INTO rhnTimezone (id, olson_name, display_name)
-VALUES (rhn_timezone_id_seq.nextval,
+VALUES (sequence_nextval('rhn_timezone_id_seq'),
'Africa/Johannesburg', 'South Africa (Johannesburg)');
commit be114148412bb8b8c678f64f1d9ad1a47ed5f1c5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Oct 31 14:43:15 2012 +0100
add org_id to DistChannelMap backend class
(cherry picked from commit 48f00c99cfdcd5665b53e123dcf119804e4bc7cc)
diff --git a/backend/server/importlib/importLib.py
b/backend/server/importlib/importLib.py
index 15172fe..f4ff0e2 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -162,6 +162,7 @@ class DistChannelMap(Information):
'release' : StringType,
'channel_arch' : StringType,
'channel' : StringType,
+ 'org_id' : IntType,
}
class ReleaseChannelMap(Information):
commit 21245372a0a0c62f9e2acf0890a5a2c9e7990512
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Oct 31 11:18:01 2012 +0100
define rhnOrgDistChannelMap view dependency
(cherry picked from commit f23e3f449ff80330cb3c19e574e6a67926f34d75)
diff --git a/schema/spacewalk/common/views/views.deps
b/schema/spacewalk/common/views/views.deps
index 24b97b2..1c4d2c5 100644
--- a/schema/spacewalk/common/views/views.deps
+++ b/schema/spacewalk/common/views/views.deps
@@ -51,6 +51,7 @@ rhnEntitledServers :: rhnServerGroup rhnServerGroupType \
rhnHWDevice :: rhnDevice
rhnOrgChannelTreeView :: rhnChannel rhnChannelFamilyMembers \
rhnOrgChannelFamilyPermissions
+rhnOrgDistChannelMap :: rhnDistChannelMap
rhnOrgErrata :: rhnChannelErrata rhnAvailableChannels
rhnPackageUpgradeArchCompat :: rhnPackageArch
rhnServerErrataTypeView :: rhnErrata rhnServerNeededErrataCache
commit c6e154582a1682075b1d3cbfeafc98e595e4ba5c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Oct 31 11:17:39 2012 +0100
create rhnDistChannelMap triggers in the schema
not only as upgrade scripts
(cherry picked from commit b53ce2e9b6338270e2d61aa3314c585ccf6f6fdb)
diff --git a/schema/spacewalk/oracle/triggers/rhnDistChannelMap.sql
b/schema/spacewalk/oracle/triggers/rhnDistChannelMap.sql
new file mode 100644
index 0000000..e8c1b6c
--- /dev/null
+++ b/schema/spacewalk/oracle/triggers/rhnDistChannelMap.sql
@@ -0,0 +1,25 @@
+--
+-- Copyright (c) 2008--2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+create or replace trigger rhn_dist_channel_map_mod_trig
+before insert or update on rhnDistChannelMap
+for each row
+begin
+ if :new.id is null then
+ select rhn_dcm_id_seq.nextval into :new.id from dual;
+ end if;
+end;
+/
+show errors
diff --git a/schema/spacewalk/postgres/triggers/rhnDistChannelMap.sql
b/schema/spacewalk/postgres/triggers/rhnDistChannelMap.sql
new file mode 100644
index 0000000..155cd40
--- /dev/null
+++ b/schema/spacewalk/postgres/triggers/rhnDistChannelMap.sql
@@ -0,0 +1,31 @@
+-- oracle equivalent source sha1 ed850986dbbb185d146774b2a15c510343f1eef5
+--
+-- Copyright (c) 2008--2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+create or replace function rhn_dist_channel_map_mod_trig_fun() returns trigger as
+$$
+begin
+ if new.id is null then
+ new.id := nextval('rhn_rhn_dcm_id_seq');
+ end if;
+ return new;
+end;
+$$ language plpgsql;
+
+create trigger
+rhn_dist_channel_map_mod_trig
+before insert or update on rhnDistChannelMap
+for each row
+execute procedure rhn_dist_channel_map_mod_trig_fun();
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.oracle
new file mode 100644
index 0000000..dd3e140
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.oracle
@@ -0,0 +1,10 @@
+create or replace trigger rhn_dist_channel_map_mod_trig
+before insert or update on rhnDistChannelMap
+for each row
+begin
+ if :new.id is null then
+ select rhn_dcm_id_seq.nextval into :new.id from dual;
+ end if;
+end;
+/
+show errors
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.postgresql
new file mode 100644
index 0000000..fd93f7f
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnDistChannelMap-trigger.sql.postgresql
@@ -0,0 +1,17 @@
+-- oracle equivalent source sha1 52c0d465e922c0e887b6728e493e593c532e6398
+
+create or replace function rhn_dist_channel_map_mod_trig_fun() returns trigger as
+$$
+begin
+ if new.id is null then
+ new.id := nextval('rhn_rhn_dcm_id_seq');
+ end if;
+ return new;
+end;
+$$ language plpgsql;
+
+create trigger
+rhn_dist_channel_map_mod_trig
+before insert or update on rhnDistChannelMap
+for each row
+execute procedure rhn_dist_channel_map_mod_trig_fun();
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.oracle
deleted file mode 100644
index dd3e140..0000000
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.oracle
+++ /dev/null
@@ -1,10 +0,0 @@
-create or replace trigger rhn_dist_channel_map_mod_trig
-before insert or update on rhnDistChannelMap
-for each row
-begin
- if :new.id is null then
- select rhn_dcm_id_seq.nextval into :new.id from dual;
- end if;
-end;
-/
-show errors
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.postgresql
deleted file mode 100644
index fd93f7f..0000000
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/148-rhnOrgDistChannelMap-trigger.sql.postgresql
+++ /dev/null
@@ -1,17 +0,0 @@
--- oracle equivalent source sha1 52c0d465e922c0e887b6728e493e593c532e6398
-
-create or replace function rhn_dist_channel_map_mod_trig_fun() returns trigger as
-$$
-begin
- if new.id is null then
- new.id := nextval('rhn_rhn_dcm_id_seq');
- end if;
- return new;
-end;
-$$ language plpgsql;
-
-create trigger
-rhn_dist_channel_map_mod_trig
-before insert or update on rhnDistChannelMap
-for each row
-execute procedure rhn_dist_channel_map_mod_trig_fun();