Changes to 'refs/tags/spacewalk-backend-1.9.17-1'
by Michael Mraka
Tag 'spacewalk-backend-1.9.17-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2013-01-18 12:36 +0000
Tagging package [spacewalk-backend] version [1.9.17-1] in directory [backend/].
Changes since tanukiwrapper-3.2.3-6:
Jan Pazdziora (4):
Removing the Downloads tab, it points to nonexisting /rhn/software/channel/downloads/Download.do page.
The channel_has_downloads acl and has_downloads are not longer used, removing.
Removing no longer used rhnChannelDownloads, rhnDownloads, and rhnDownloadType.
Automatic commit of package [spacewalk-backend] release [1.9.17-1].
Michael Mraka (1):
Fedora18 is out, let's build packages
Milan Zazrivec (1):
abrt: display crash count in system overview
---
backend/server/test/test-add-download-2.py | 116 ----------
backend/spacewalk-backend.spec | 6
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 2
java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java | 15 +
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf | 17 +
rel-eng/build-missing-builds-in-koji.sh | 2
rel-eng/koji-missing-builds.py | 4
rel-eng/packages/spacewalk-backend | 2
rel-eng/releasers.conf | 2
rel-eng/tito.props | 10
schema/spacewalk/common/data/rhnDownloadType.sql | 23 -
schema/spacewalk/common/tables/rhnChannelDownloads.sql | 36 ---
schema/spacewalk/common/tables/rhnDownloadType.sql | 32 --
schema/spacewalk/common/tables/rhnDownloads.sql | 43 ---
schema/spacewalk/common/tables/tables.deps | 2
schema/spacewalk/common/views/rhnServerOverview.sql | 1
schema/spacewalk/oracle/triggers/rhnDownloads.sql | 25 --
schema/spacewalk/postgres/triggers/rhnDownloads.sql | 17 -
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/006-rhnDownloads-drop.sql | 5
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/006-rhnServerOverview.sql | 95 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/007-rhn_download_mod_trig_fun-drop.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/007-rhn_download_mod_trig_fun-drop.sql.postgresql | 4
web/html/nav/channel_detail.xml | 1
web/modules/rhn/RHN/Access/Channel.pm | 9
web/modules/rhn/RHN/DB/Channel.pm | 25 --
web/modules/rhn/RHN/DB/DataSource/xml/Channel_queries.xml | 75 ------
web/modules/sniglets/Sniglets/ListView/ChannelList.pm | 8
28 files changed, 160 insertions(+), 424 deletions(-)
---
11 years, 3 months
Changes to 'refs/tags/spacewalk-schema-1.9.13-1'
by Jan Pazdziora
Tag 'spacewalk-schema-1.9.13-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2013-01-22 09:43 +0000
Tagging package [spacewalk-schema] version [1.9.13-1] in directory [schema/spacewalk/].
Changes since NPalert-1.127.9-1:
Jan Pazdziora (3):
Adding rhnContentSourceSsl, to hold certificates and keys to make authenticated SSL connections.
Use SSL options from rhncontentsourcessl during spacewalk-repo-sync.
Automatic commit of package [spacewalk-schema] release [1.9.13-1].
---
backend/satellite_tools/repo_plugins/yum_src.py | 30 ++++++++++
backend/satellite_tools/reposync.py | 18 +++++-
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/tables/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql | 16 +++++
schema/spacewalk/spacewalk-schema.spec | 6 +-
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql | 25 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql | 16 +++++
11 files changed, 206 insertions(+), 3 deletions(-)
---
11 years, 3 months
3 commits - backend/satellite_tools rel-eng/packages schema/spacewalk
by Jan Pazdziora
backend/satellite_tools/repo_plugins/yum_src.py | 30 ++++++++++
backend/satellite_tools/reposync.py | 18 +++++-
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/tables/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql | 16 +++++
schema/spacewalk/spacewalk-schema.spec | 6 +-
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql | 25 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql | 16 +++++
11 files changed, 206 insertions(+), 3 deletions(-)
New commits:
commit 8863f59cfd2bf0dd360c9d2ab6de986281ee12a8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 22 10:43:10 2013 +0100
Automatic commit of package [spacewalk-schema] release [1.9.13-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 326f163..5600e81 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.9.12-1 schema/spacewalk/
+1.9.13-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index a5ad7d7..bf49670 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.9.12
+Version: 1.9.13
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -68,6 +68,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Tue Jan 22 2013 Jan Pazdziora 1.9.13-1
+- Adding rhnContentSourceSsl, to hold certificates and keys to make
+ authenticated SSL connections.
+
* Fri Jan 18 2013 Jan Pazdziora 1.9.12-1
- Removing no longer used rhnChannelDownloads, rhnDownloads, and
rhnDownloadType.
commit 42e09ec9801eeb10feeb137eb867c94fe4513f26
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Jan 7 17:05:22 2013 +0100
Use SSL options from rhncontentsourcessl during spacewalk-repo-sync.
diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py
index c11c697..2bdab55 100644
--- a/backend/satellite_tools/repo_plugins/yum_src.py
+++ b/backend/satellite_tools/repo_plugins/yum_src.py
@@ -18,6 +18,8 @@ import shutil
import sys
import gzip
import os.path
+from shutil import rmtree
+from os import mkdir
import yum
from spacewalk.common import fileutils
@@ -246,3 +248,31 @@ class ContentSource(object):
except RepoMDError:
groups = None
return groups
+
+ def set_ssl_options(self, ca_cert, client_cert, client_key):
+ repo = self.repo
+ dir = os.path.join(repo.basecachedir, self.name, '.ssl-certs')
+ mkdir(dir, 0750)
+ repo.sslcacert = os.path.join(dir, 'ca.pem')
+ f = open(repo.sslcacert, "w")
+ f.write(str(ca_cert))
+ f.close
+ if client_cert is not None:
+ repo.sslclientcert = os.path.join(dir, 'cert.pem')
+ f = open(repo.sslclientcert, "w")
+ f.write(str(client_cert))
+ f.close
+ if client_key is not None:
+ repo.sslclientkey = os.path.join(dir, 'key.pem')
+ f = open(repo.sslclientkey, "w")
+ f.write(str(client_key))
+ f.close
+
+ def clear_ssl_cache(self):
+ return
+ repo = self.repo
+ dir = os.path.join(repo.basecachedir, self.name, '.ssl-certs')
+ try:
+ rmtree(dir)
+ except:
+ pass
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 29c1de6..e27d8b1 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -101,8 +101,23 @@ class RepoSync(object):
start_time = datetime.now()
for (repo_id, url) in self.urls:
self.print_msg("Repo URL: %s" % url)
+ plugin = None
try:
plugin = self.repo_plugin(url, self.channel_label)
+ if repo_id is not None:
+ keys = rhnSQL.fetchone_dict("""
+ select k1.key as ca_cert, k2.key as client_cert, k3.key as client_key
+ from rhncontentsourcessl
+ join rhncryptokey k1
+ on rhncontentsourcessl.ssl_ca_cert_id = k1.id
+ left outer join rhncryptokey k2
+ on rhncontentsourcessl.ssl_client_cert_id = k2.id
+ left outer join rhncryptokey k3
+ on rhncontentsourcessl.ssl_client_key_id = k3.id
+ where rhncontentsourcessl.content_source_id = :repo_id
+ """, repo_id=int(repo_id))
+ if keys and keys.has_key('ca_cert'):
+ plugin.set_ssl_options(keys['ca_cert'], keys['client_cert'], keys['client_key'])
self.import_packages(plugin, repo_id, url)
self.import_groups(plugin, url)
@@ -110,7 +125,8 @@ class RepoSync(object):
self.import_updates(plugin, url)
except Exception, e:
self.error_msg("ERROR: %s" % e)
- continue
+ if plugin is not None:
+ plugin.clear_ssl_cache()
if self.regen:
taskomatic.add_to_repodata_queue_for_channel_package_subscription(
[self.channel_label], [], "server.app.yumreposync")
commit c9469dfa0a6eb0054eac8842df5eb85cc2ff7870
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 8 13:58:27 2013 +0100
Adding rhnContentSourceSsl, to hold certificates and keys to make authenticated SSL connections.
diff --git a/schema/spacewalk/common/tables/rhnContentSourceSsl.sql b/schema/spacewalk/common/tables/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..5e82270
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnContentSourceSsl.sql
@@ -0,0 +1,24 @@
+
+create table
+rhnContentSourceSsl
+(
+ id number not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id number not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id number not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id number
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id number
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created timestamp with local time zone default(current_timestamp) not null,
+ modified timestamp with local time zone default(current_timestamp) not null
+)
+enable row movement
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql b/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..10376b0
--- /dev/null
+++ b/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql
@@ -0,0 +1,24 @@
+--
+-- Copyright (c) 2013 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_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+begin
+ :new.modified := current_timestamp;
+end;
+/
+show errors
diff --git a/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql b/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..7ec289b
--- /dev/null
+++ b/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql
@@ -0,0 +1,16 @@
+-- oracle equivalent source sha1 2330953d139fc07f77743e6bc63abb49d0a2d147
+
+create or replace function rhn_content_source_ssl_mod_trig_fun() returns trigger as
+$$
+begin
+ new.modified := current_timestamp;
+ return new;
+end;
+$$ language plpgsql;
+
+
+create trigger
+rhn_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+execute procedure rhn_content_source_ssl_mod_trig_fun();
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle
new file mode 100644
index 0000000..5e82270
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle
@@ -0,0 +1,24 @@
+
+create table
+rhnContentSourceSsl
+(
+ id number not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id number not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id number not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id number
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id number
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created timestamp with local time zone default(current_timestamp) not null,
+ modified timestamp with local time zone default(current_timestamp) not null
+)
+enable row movement
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql
new file mode 100644
index 0000000..6637970
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql
@@ -0,0 +1,25 @@
+-- oracle equivalent source sha1 dc0669403462ea1506d2fa1cf63fe45a81705c5b
+
+create table
+rhnContentSourceSsl
+(
+ id NUMERIC not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id NUMERIC not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id NUMERIC not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id NUMERIC
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id NUMERIC
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created TIMESTAMPTZ default(current_timestamp) not null,
+ modified TIMESTAMPTZ default(current_timestamp) not null
+)
+
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle
new file mode 100644
index 0000000..10376b0
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle
@@ -0,0 +1,24 @@
+--
+-- Copyright (c) 2013 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_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+begin
+ :new.modified := current_timestamp;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql
new file mode 100644
index 0000000..7ec289b
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql
@@ -0,0 +1,16 @@
+-- oracle equivalent source sha1 2330953d139fc07f77743e6bc63abb49d0a2d147
+
+create or replace function rhn_content_source_ssl_mod_trig_fun() returns trigger as
+$$
+begin
+ new.modified := current_timestamp;
+ return new;
+end;
+$$ language plpgsql;
+
+
+create trigger
+rhn_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+execute procedure rhn_content_source_ssl_mod_trig_fun();
11 years, 3 months
Changes to 'refs/tags/NPalert-1.127.9-1'
by Michael Mraka
Tag 'NPalert-1.127.9-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2013-01-22 08:53 +0000
Tagging package [NPalert] version [1.127.9-1] in directory [monitoring/NPalert/].
Changes since spacewalk-java-1.9.49-1:
Michael Mraka (1):
Automatic commit of package [NPalert] release [1.127.9-1].
---
monitoring/NPalert/NPalert.spec | 2 +-
rel-eng/packages/NPalert | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
11 years, 3 months
3 commits - backend/satellite_tools rel-eng/packages schema/spacewalk
by Jan Pazdziora
backend/satellite_tools/repo_plugins/yum_src.py | 30 ++++++++++
backend/satellite_tools/reposync.py | 18 +++++-
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/tables/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql | 24 ++++++++
schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql | 16 +++++
schema/spacewalk/spacewalk-schema.spec | 6 +-
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql | 25 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle | 24 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql | 16 +++++
11 files changed, 206 insertions(+), 3 deletions(-)
New commits:
commit fcde8a0005fe1459db5f277d318a8a97c4c94a00
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 22 09:53:42 2013 +0100
Automatic commit of package [spacewalk-schema] release [1.9.13-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 326f163..5600e81 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.9.12-1 schema/spacewalk/
+1.9.13-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index a5ad7d7..bf49670 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.9.12
+Version: 1.9.13
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -68,6 +68,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Tue Jan 22 2013 Jan Pazdziora 1.9.13-1
+- Adding rhnContentSourceSsl, to hold certificates and keys to make
+ authenticated SSL connections.
+
* Fri Jan 18 2013 Jan Pazdziora 1.9.12-1
- Removing no longer used rhnChannelDownloads, rhnDownloads, and
rhnDownloadType.
commit 6f17b61d3e2bec74f87b7fa62ac61add0045f577
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Jan 7 17:05:22 2013 +0100
Use SSL options from rhncontentsourcessl during spacewalk-repo-sync.
diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py
index c11c697..2bdab55 100644
--- a/backend/satellite_tools/repo_plugins/yum_src.py
+++ b/backend/satellite_tools/repo_plugins/yum_src.py
@@ -18,6 +18,8 @@ import shutil
import sys
import gzip
import os.path
+from shutil import rmtree
+from os import mkdir
import yum
from spacewalk.common import fileutils
@@ -246,3 +248,31 @@ class ContentSource(object):
except RepoMDError:
groups = None
return groups
+
+ def set_ssl_options(self, ca_cert, client_cert, client_key):
+ repo = self.repo
+ dir = os.path.join(repo.basecachedir, self.name, '.ssl-certs')
+ mkdir(dir, 0750)
+ repo.sslcacert = os.path.join(dir, 'ca.pem')
+ f = open(repo.sslcacert, "w")
+ f.write(str(ca_cert))
+ f.close
+ if client_cert is not None:
+ repo.sslclientcert = os.path.join(dir, 'cert.pem')
+ f = open(repo.sslclientcert, "w")
+ f.write(str(client_cert))
+ f.close
+ if client_key is not None:
+ repo.sslclientkey = os.path.join(dir, 'key.pem')
+ f = open(repo.sslclientkey, "w")
+ f.write(str(client_key))
+ f.close
+
+ def clear_ssl_cache(self):
+ return
+ repo = self.repo
+ dir = os.path.join(repo.basecachedir, self.name, '.ssl-certs')
+ try:
+ rmtree(dir)
+ except:
+ pass
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 29c1de6..e27d8b1 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -101,8 +101,23 @@ class RepoSync(object):
start_time = datetime.now()
for (repo_id, url) in self.urls:
self.print_msg("Repo URL: %s" % url)
+ plugin = None
try:
plugin = self.repo_plugin(url, self.channel_label)
+ if repo_id is not None:
+ keys = rhnSQL.fetchone_dict("""
+ select k1.key as ca_cert, k2.key as client_cert, k3.key as client_key
+ from rhncontentsourcessl
+ join rhncryptokey k1
+ on rhncontentsourcessl.ssl_ca_cert_id = k1.id
+ left outer join rhncryptokey k2
+ on rhncontentsourcessl.ssl_client_cert_id = k2.id
+ left outer join rhncryptokey k3
+ on rhncontentsourcessl.ssl_client_key_id = k3.id
+ where rhncontentsourcessl.content_source_id = :repo_id
+ """, repo_id=int(repo_id))
+ if keys and keys.has_key('ca_cert'):
+ plugin.set_ssl_options(keys['ca_cert'], keys['client_cert'], keys['client_key'])
self.import_packages(plugin, repo_id, url)
self.import_groups(plugin, url)
@@ -110,7 +125,8 @@ class RepoSync(object):
self.import_updates(plugin, url)
except Exception, e:
self.error_msg("ERROR: %s" % e)
- continue
+ if plugin is not None:
+ plugin.clear_ssl_cache()
if self.regen:
taskomatic.add_to_repodata_queue_for_channel_package_subscription(
[self.channel_label], [], "server.app.yumreposync")
commit fa12d75d44e7c0d771e867bc4fe48d443f28d2ad
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 8 13:58:27 2013 +0100
Adding rhnContentSourceSsl, to hold certificates and keys to make authenticated SSL connections.
diff --git a/schema/spacewalk/common/tables/rhnContentSourceSsl.sql b/schema/spacewalk/common/tables/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..5e82270
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnContentSourceSsl.sql
@@ -0,0 +1,24 @@
+
+create table
+rhnContentSourceSsl
+(
+ id number not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id number not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id number not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id number
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id number
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created timestamp with local time zone default(current_timestamp) not null,
+ modified timestamp with local time zone default(current_timestamp) not null
+)
+enable row movement
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql b/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..10376b0
--- /dev/null
+++ b/schema/spacewalk/oracle/triggers/rhnContentSourceSsl.sql
@@ -0,0 +1,24 @@
+--
+-- Copyright (c) 2013 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_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+begin
+ :new.modified := current_timestamp;
+end;
+/
+show errors
diff --git a/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql b/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql
new file mode 100644
index 0000000..7ec289b
--- /dev/null
+++ b/schema/spacewalk/postgres/triggers/rhnContentSourceSsl.sql
@@ -0,0 +1,16 @@
+-- oracle equivalent source sha1 2330953d139fc07f77743e6bc63abb49d0a2d147
+
+create or replace function rhn_content_source_ssl_mod_trig_fun() returns trigger as
+$$
+begin
+ new.modified := current_timestamp;
+ return new;
+end;
+$$ language plpgsql;
+
+
+create trigger
+rhn_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+execute procedure rhn_content_source_ssl_mod_trig_fun();
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle
new file mode 100644
index 0000000..5e82270
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.oracle
@@ -0,0 +1,24 @@
+
+create table
+rhnContentSourceSsl
+(
+ id number not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id number not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id number not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id number
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id number
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created timestamp with local time zone default(current_timestamp) not null,
+ modified timestamp with local time zone default(current_timestamp) not null
+)
+enable row movement
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql
new file mode 100644
index 0000000..6637970
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/008-rhnContentSourceSsl.sql.postgresql
@@ -0,0 +1,25 @@
+-- oracle equivalent source sha1 dc0669403462ea1506d2fa1cf63fe45a81705c5b
+
+create table
+rhnContentSourceSsl
+(
+ id NUMERIC not null
+ constraint rhn_csssl_id_pk primary key,
+ content_source_id NUMERIC not null
+ constraint rhn_csssl_csid_uq unique
+ constraint rhn_csssl_csid_fk references rhnContentSource(id) on delete cascade,
+ ssl_ca_cert_id NUMERIC not null
+ constraint rhn_csssl_cacertid_fk references rhnCryptoKey(id),
+ ssl_client_cert_id NUMERIC
+ constraint rhn_csssl_clcertid_fk references rhnCryptoKey(id),
+ ssl_client_key_id NUMERIC
+ constraint rhn_csssl_clkeyid_fk references rhnCryptoKey(id),
+ constraint rhn_csssl_client_chk check(ssl_client_key_id is null or ssl_client_cert_id is not null),
+ created TIMESTAMPTZ default(current_timestamp) not null,
+ modified TIMESTAMPTZ default(current_timestamp) not null
+)
+
+;
+
+create sequence rhn_contentsourcessl_seq;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle
new file mode 100644
index 0000000..10376b0
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.oracle
@@ -0,0 +1,24 @@
+--
+-- Copyright (c) 2013 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_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+begin
+ :new.modified := current_timestamp;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql
new file mode 100644
index 0000000..7ec289b
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/009-rhn_content_source_ssl_mod_trig.sql.postgresql
@@ -0,0 +1,16 @@
+-- oracle equivalent source sha1 2330953d139fc07f77743e6bc63abb49d0a2d147
+
+create or replace function rhn_content_source_ssl_mod_trig_fun() returns trigger as
+$$
+begin
+ new.modified := current_timestamp;
+ return new;
+end;
+$$ language plpgsql;
+
+
+create trigger
+rhn_content_source_ssl_mod_trig
+before insert or update on rhnContentSourceSsl
+for each row
+execute procedure rhn_content_source_ssl_mod_trig_fun();
11 years, 3 months
monitoring/NPalert rel-eng/packages
by Michael Mraka
monitoring/NPalert/NPalert.spec | 2 +-
rel-eng/packages/NPalert | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 49e8a4728045dbc0d20eda45906c1a709815a1ee
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 22 09:53:40 2013 +0100
Automatic commit of package [NPalert] release [1.127.9-1].
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index 5cb74b0..944ba48 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.127.8
+Version: 1.127.9
Release: 1%{?dist}
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
diff --git a/rel-eng/packages/NPalert b/rel-eng/packages/NPalert
index 3021a88..376073d 100644
--- a/rel-eng/packages/NPalert
+++ b/rel-eng/packages/NPalert
@@ -1 +1 @@
-1.127.8-1 monitoring/NPalert/
+1.127.9-1 monitoring/NPalert/
11 years, 3 months
Changes to 'refs/tags/spacewalk-java-1.9.49-1'
by Michael Mraka
Tag 'spacewalk-java-1.9.49-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2013-01-22 08:51 +0000
Tagging package [spacewalk-java] version [1.9.49-1] in directory [java/].
Changes since NPalert-1.127.8-1:
Michael Mraka (3):
specify permission on /var/lib/tomcat*/webapps
specify permission on /usr/share/nocpulse/templates
Automatic commit of package [spacewalk-java] release [1.9.49-1].
---
java/spacewalk-java.spec | 4 ++--
monitoring/NPalert/NPalert.spec | 2 +-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
11 years, 3 months
3 commits - java/spacewalk-java.spec monitoring/NPalert rel-eng/packages
by Michael Mraka
java/spacewalk-java.spec | 4 ++--
monitoring/NPalert/NPalert.spec | 2 +-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 7d23937f96d904cf3e2ba9851af32b92614a57de
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 22 09:51:57 2013 +0100
Automatic commit of package [spacewalk-java] release [1.9.49-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 327d479..0baaf31 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.9.48
+Version: 1.9.49
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 2fbd1e5..6f2ace0 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.9.48-1 java/
+1.9.49-1 java/
commit 42467a5fb3f35fa4a7cc7f797d1b6b1a272b5b28
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jan 21 16:40:50 2013 +0100
specify permission on /usr/share/nocpulse/templates
fixing
file /usr/share/nocpulse/templates conflicts between attempted installs of NPalert-1.127.7-1.fc18.noarch and SputLite-server-1.7.2-1.fc18.noarch
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index 143293c..5cb74b0 100644
--- a/monitoring/NPalert/NPalert.spec
+++ b/monitoring/NPalert/NPalert.spec
@@ -107,8 +107,8 @@ fi
%files
%{_sysconfdir}/cron.d/notification
-%attr(755, nocpulse, nocpulse) %dir %{httpd_prefix}
%{httpd_prefix}
+%attr(755, nocpulse, nocpulse) %dir %{httpd_prefix}/templates
%dir %attr(-, %notif_user,%notif_user) %install_prefix
%dir %{perl_vendorlib}/NOCpulse/Notif
%{perl_vendorlib}/NOCpulse/Notif/*
commit d775b5eef3e4abe4d40d5ee52ecd04d8674ae33b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jan 21 16:50:57 2013 +0100
specify permission on /var/lib/tomcat*/webapps
fixing
file /var/lib/tomcat/webapps conflicts between attempted installs of spacewalk-java-1.9.47-1.fc18.noarch and tomcat-0:7.0.34-1.fc18.noarch
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 2a93eb0..327d479 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -509,7 +509,7 @@ fi
%files
%defattr(644,tomcat,tomcat,775)
-%attr(755, root, tomcat) %dir %{appdir}
+%attr(775, root, tomcat) %dir %{appdir}
%dir %{appdir}/rhn/
%{appdir}/rhn/apidoc/
%{appdir}/rhn/css/
11 years, 3 months
Changes to 'refs/tags/NPalert-1.127.8-1'
by Michael Mraka
Tag 'NPalert-1.127.8-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2013-01-21 15:54 +0000
Tagging package [NPalert] version [1.127.8-1] in directory [monitoring/NPalert/].
Changes since spacewalk-java-1.9.48-1:
Michael Mraka (1):
Automatic commit of package [NPalert] release [1.127.8-1].
---
monitoring/NPalert/NPalert.spec | 5 ++++-
rel-eng/packages/NPalert | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
11 years, 3 months