selinux/spacewalk-selinux
by Jan Pazdziora
selinux/spacewalk-selinux/spacewalk-selinux-enable | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 87e7077f0a2923763ef5ce9ec5de6e3aa7533467
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 10 13:31:06 2011 +0200
634989 - allow Apache to send emails, useful when mod_python/mod_perl is about to send traceback.
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux-enable b/selinux/spacewalk-selinux/spacewalk-selinux-enable
index 88db671..7693b65 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux-enable
+++ b/selinux/spacewalk-selinux/spacewalk-selinux-enable
@@ -48,6 +48,7 @@ for selinuxvariant in mls strict targeted
/usr/sbin/setsebool -P httpd_enable_cgi 1
/usr/sbin/setsebool -P httpd_can_network_connect 1
+/usr/sbin/setsebool -P httpd_can_sendmail 1
if [ -z "$RUN_PURE" ] ; then
for dir in mount_point kickstart_mount_point; do
13 years
Changes to 'refs/tags/spacewalk-selinux-1.5.1-1'
by Michael Mraka
Tag 'spacewalk-selinux-1.5.1-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-05-10 09:39 +0000
Tagging package [spacewalk-selinux] version [1.5.1-1] in directory [selinux/spacewalk-selinux/].
Changes since spacewalk-backend-1.5.19-1:
Michael Mraka (4):
702274 - allow cobblerd_t to read spacewalk_data_t
702274 - fixed context of kickstart configs
702274 - restore kickstart files context
Automatic commit of package [spacewalk-selinux] release [1.5.1-1].
Tomas Lestach (3):
636614 - fix system_groups for org.listOrgs API
636614 - mark system_groups of org.listOrgs API as optional
638571 - set correctly the Channels column
Ville Salmela (1):
Fix remote command schedule date on postgresql
---
java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml | 3 ++-
java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml | 1 +
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java | 4 ++--
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 4 +++-
rel-eng/packages/spacewalk-selinux | 2 +-
selinux/spacewalk-selinux/spacewalk-selinux-enable | 3 ++-
selinux/spacewalk-selinux/spacewalk-selinux.spec | 7 ++++++-
selinux/spacewalk-selinux/spacewalk.fc | 2 ++
selinux/spacewalk-selinux/spacewalk.te | 10 ++++++++++
web/modules/rhn/RHN/DB/Scheduler.pm | 2 +-
10 files changed, 30 insertions(+), 8 deletions(-)
---
13 years
rel-eng/packages selinux/spacewalk-selinux
by Michael Mraka
rel-eng/packages/spacewalk-selinux | 2 +-
selinux/spacewalk-selinux/spacewalk-selinux.spec | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 5acc76a3795d27391a5c787eae0037d5689fb33a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue May 10 11:39:22 2011 +0200
Automatic commit of package [spacewalk-selinux] release [1.5.1-1].
diff --git a/rel-eng/packages/spacewalk-selinux b/rel-eng/packages/spacewalk-selinux
index 7cf3eb6..4067a17 100644
--- a/rel-eng/packages/spacewalk-selinux
+++ b/rel-eng/packages/spacewalk-selinux
@@ -1 +1 @@
-1.4.1-1 selinux/spacewalk-selinux/
+1.5.1-1 selinux/spacewalk-selinux/
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux.spec b/selinux/spacewalk-selinux/spacewalk-selinux.spec
index 43f3985..ab84164 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux.spec
+++ b/selinux/spacewalk-selinux/spacewalk-selinux.spec
@@ -7,7 +7,7 @@
%define modulename spacewalk
Name: spacewalk-selinux
-Version: 1.5.0
+Version: 1.5.1
Release: 1%{?dist}
Summary: SELinux policy module supporting Spacewalk Server
@@ -113,6 +113,11 @@ fi
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Tue May 10 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.5.1-1
+- 702274 - restore kickstart files context
+- 702274 - fixed context of kickstart configs
+- 702274 - allow cobblerd_t to read spacewalk_data_t
+
* Thu Mar 03 2011 Jan Pazdziora 1.4.1-1
- Apache should not be able to read the rpm database.
13 years
3 commits - selinux/spacewalk-selinux
by Michael Mraka
selinux/spacewalk-selinux/spacewalk-selinux-enable | 3 ++-
selinux/spacewalk-selinux/spacewalk.fc | 2 ++
selinux/spacewalk-selinux/spacewalk.te | 10 ++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
New commits:
commit c7030d3f79f5ee4a77900b455bcdd79313865129
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue May 10 10:28:58 2011 +0200
702274 - restore kickstart files context
diff --git a/selinux/spacewalk-selinux/spacewalk-selinux-enable b/selinux/spacewalk-selinux/spacewalk-selinux-enable
index 7b529a6..88db671 100644
--- a/selinux/spacewalk-selinux/spacewalk-selinux-enable
+++ b/selinux/spacewalk-selinux/spacewalk-selinux-enable
@@ -43,7 +43,8 @@ for selinuxvariant in mls strict targeted
done
/sbin/restorecon -rvvi /usr/share/rhn/satidmap.pl /usr/sbin/rhn-sat-restart-silent /var/log/rhn /var/cache/rhn \
- /usr/bin/rhn-sudo-ssl-tool /usr/bin/rhn-sudo-load-ssl-cert /var/www/html/pub /usr/sbin/tanukiwrapper
+ /usr/bin/rhn-sudo-ssl-tool /usr/bin/rhn-sudo-load-ssl-cert /var/www/html/pub /usr/sbin/tanukiwrapper \
+ /var/lib/rhn/kickstarts
/usr/sbin/setsebool -P httpd_enable_cgi 1
/usr/sbin/setsebool -P httpd_can_network_connect 1
commit 67aa9aadb05d3875c483fc926aa5e80c4fc5ae55
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 9 16:28:20 2011 +0200
702274 - fixed context of kickstart configs
diff --git a/selinux/spacewalk-selinux/spacewalk.fc b/selinux/spacewalk-selinux/spacewalk.fc
index 61c7598..574e07f 100644
--- a/selinux/spacewalk-selinux/spacewalk.fc
+++ b/selinux/spacewalk-selinux/spacewalk.fc
@@ -22,3 +22,5 @@
/var/log/spacewalk/schema-upgrade(/.*)? gen_context(user_u:object_r:spacewalk_db_install_log_t,s0)
/usr/sbin/tanukiwrapper gen_context(system_u:object_r:java_exec_t,s0)
+
+/var/lib/rhn/kickstarts(/.*)? gen_context(unconfined_u:object_r:spacewalk_data_t,s0)
commit 121140517b765134eeb56caff84fdbb88247ccf3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 9 16:22:38 2011 +0200
702274 - allow cobblerd_t to read spacewalk_data_t
diff --git a/selinux/spacewalk-selinux/spacewalk.te b/selinux/spacewalk-selinux/spacewalk.te
index f62b454..ed1932b 100644
--- a/selinux/spacewalk-selinux/spacewalk.te
+++ b/selinux/spacewalk-selinux/spacewalk.te
@@ -81,6 +81,16 @@ optional_policy(`
allow oracle_sqlplus_t spacewalk_db_install_log_t:file append;
')
+optional_policy(`
+ gen_require(`
+ type cobblerd_t;
+ type httpd_cobbler_content_t;
+ ')
+ read_files_pattern(cobblerd_t, spacewalk_data_t, spacewalk_data_t);
+ allow cobblerd_t spacewalk_data_t:file { getattr link unlink rename };
+ manage_dirs_pattern(cobblerd_t, spacewalk_data_t, spacewalk_data_t);
+')
+
# rpm_dontaudit_search_db(httpd_t) is not available on RHELs
dontaudit httpd_t rpm_var_lib_t:dir list_dir_perms;
dontaudit httpd_t rpm_var_lib_t:file read_file_perms;
13 years
web/modules
by Jan Pazdziora
web/modules/rhn/RHN/DB/Scheduler.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 266e5277fdb7de141d374b7dad906711a4f93720
Author: Ville Salmela <Ville.Salmela(a)csc.fi>
Date: Tue May 10 09:48:37 2011 +0200
Fix remote command schedule date on postgresql
With this patch the scheduled command has an accurate date
" 5/10/11 10:28:00 AM EEST " instead of "5/10/11 12:00:00 AM EEST"
diff --git a/web/modules/rhn/RHN/DB/Scheduler.pm b/web/modules/rhn/RHN/DB/Scheduler.pm
index 2ee15e4..d494047 100644
--- a/web/modules/rhn/RHN/DB/Scheduler.pm
+++ b/web/modules/rhn/RHN/DB/Scheduler.pm
@@ -108,7 +108,7 @@ EOQ
# TODO: fix sys_date => reasonable value later...
my $query = <<EOQ;
INSERT INTO rhnAction (id, org_id, action_type, scheduler, earliest_action, version, name, prerequisite)
-VALUES (?, ?, ?, ?, TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'), 2, ?, ?)
+VALUES (?, ?, ?, ?, TO_TIMESTAMP(?, 'YYYY-MM-DD HH24:MI:SS'), 2, ?, ?)
EOQ
$sth = $dbh->prepare($query);
13 years
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml | 1 +
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 775406e2197909660919110c6a4da0f79b558bce
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Sep 29 13:52:27 2010 +0200
638571 - set correctly the Channels column
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
index a3f9ee6..b0c3599 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
@@ -1728,6 +1728,7 @@ SELECT distinct P.id AS ID,
CP.channel_id = :cid
</query>
<elaborator name="package_details" />
+ <elaborator name="package_channels" />
</mode>
<!-- Runs the cache cleanup for all packages in an RhnSet. The package ID must be in
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
index ab18c79..d5fa40e 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
@@ -988,7 +988,9 @@ public class PackageManager extends BaseManager {
"Package_queries", "custom_package_in_channel");
DataResult dr = m.execute(params);
- dr.setElaborationParams(new HashMap());
+ Map elabs = new HashMap();
+ elabs.put("org_id", orgId);
+ dr.setElaborationParams(elabs);
return dr;
}
13 years
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml | 3 ++-
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 6fe1d9dc054285307e58bbb24d0e59f27a3a441e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon May 9 16:53:12 2011 +0200
636614 - mark system_groups of org.listOrgs API as optional
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
index a88e6c6..e2fbcbb 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
@@ -37,7 +37,7 @@ import redstone.xmlrpc.XmlRpcSerializer;
* #prop_desc("int", "systems", "Number of systems in the organization.")
* #prop_desc("int", "trusts", "Number of trusted organizations.")
* #prop_desc("int", "system_groups",
- * "Number of system groups in the organization.")
+ * "Number of system groups in the organization. (optional)")
* #prop_desc("int", "activation_keys",
* "Number of activation keys in the organization. (optional)")
* #prop_desc("int", "kickstart_profiles",
commit 6c58252e57bf420c3333fe8205bbdd2e5e257e0d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Sep 27 12:41:13 2010 +0200
636614 - fix system_groups for org.listOrgs API
we returned wrong value since the beginning of time
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml
index 3789f39..92ed6fb 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Org_queries.xml
@@ -41,7 +41,8 @@ SELECT
wc.name,
(SELECT COUNT(ru.id) FROM rhnuser ru WHERE ru.org_id = wc.id) users,
(SELECT COUNT(s.id) FROM rhnServer s WHERE s.org_id = wc.id) systems,
- (SELECT COUNT(*) FROM rhnTrustedOrgs t WHERE t.org_id = wc.id) trusts
+ (SELECT COUNT(*) FROM rhnTrustedOrgs t WHERE t.org_id = wc.id) trusts,
+ (SELECT COUNT(*) FROM rhnServerGroup g WHERE g.org_id = wc.id AND g.group_type IS NULL) server_groups
FROM web_customer wc
</query>
</mode>
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
index 8d751d2..a88e6c6 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/OrgDtoSerializer.java
@@ -72,7 +72,7 @@ public class OrgDtoSerializer implements XmlRpcCustomSerializer {
add(helper, "systems", dto.getSystems());
add(helper, "trusts", dto.getTrusts());
add(helper, "activation_keys", dto.getActivationKeys());
- add(helper, "system_groups", dto.getActivationKeys());
+ add(helper, "system_groups", dto.getServerGroups());
add(helper, "kickstart_profiles", dto.getKickstartProfiles());
add(helper, "configuration_channels", dto.getConfigChannels());
helper.writeTo(output);
13 years
Changes to 'refs/tags/spacewalk-backend-1.5.19-1'
by Jan Pazdziora
Tag 'spacewalk-backend-1.5.19-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-05-09 14:52 +0000
Tagging package [spacewalk-backend] version [1.5.19-1] in directory [backend/].
Changes since spacewalk-backend-1.5.18-1:
Jan Brázdil (1):
rhn-satellite-exporter with start-date and end-date
Jan Pazdziora (1):
Automatic commit of package [spacewalk-backend] release [1.5.19-1].
Miroslav Suchý (1):
fix utf-8 in emails
Tomas Lestach (1):
703064 - changing WebUI message
---
backend/common/rhnMail.py | 6 -
backend/satellite_tools/disk_dumper/iss.py | 44 +++++-----
backend/satellite_tools/exporter/exportLib.py | 24 ++---
backend/spacewalk-backend.spec | 6 +
java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java | 2
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 3
rel-eng/packages/spacewalk-backend | 2
7 files changed, 47 insertions(+), 40 deletions(-)
---
13 years
backend/spacewalk-backend.spec rel-eng/packages
by Jan Pazdziora
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 12558590388ee5f81c751f429e7da0db07233d1d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon May 9 16:52:31 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.5.19-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 815d192..20f914b 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.5.18
+Version: 1.5.19
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -679,6 +679,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Mon May 09 2011 Jan Pazdziora 1.5.19-1
+- rhn-satellite-exporter with start-date and end-date (jbrazdil(a)redhat.com)
+- fix utf-8 in emails (msuchy(a)redhat.com)
+
* Mon May 09 2011 Jan Pazdziora 1.5.18-1
- fix satsync with older spacewalk versions not providing weak deps
(mc(a)suse.de)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 98767b2..83f1371 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.5.18-1 backend/
+1.5.19-1 backend/
13 years
backend/satellite_tools
by Jan Pazdziora
backend/satellite_tools/disk_dumper/iss.py | 44 +++++++++++++-------------
backend/satellite_tools/exporter/exportLib.py | 24 +++++++-------
2 files changed, 34 insertions(+), 34 deletions(-)
New commits:
commit e1a225a62b3034709d20ea87b9f7e767ad6ee105
Author: Jan Brázdil <jbrazdil(a)redhat.com>
Date: Mon May 9 16:49:37 2011 +0200
rhn-satellite-exporter with start-date and end-date
This patch fix problem in rhn-satellite-exporter on PostgreSQL:
When we are trying to export dump with options --start-date and/or
--end-date with PostgreSQL backend these dates have only day precision, but
with Oracle backend they have second precision.
On PostgreSQL DATE is represented as day only and the time information is
striped. We want to represent these dates as TIMESTAMP so we can preserve
time and have second precision.
diff --git a/backend/satellite_tools/disk_dumper/iss.py b/backend/satellite_tools/disk_dumper/iss.py
index 3240204..0fc5b86 100644
--- a/backend/satellite_tools/disk_dumper/iss.py
+++ b/backend/satellite_tools/disk_dumper/iss.py
@@ -250,13 +250,13 @@ class Dumper(dumper.XML_Dumper):
if self.start_date:
if self.use_rhn_date:
query += """
- and rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and rp.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and rp.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
else:
query += """
- and rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and rcp.modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and rcp.modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
self.brpm_query = rhnSQL.Statement(query)
brpm_data = rhnSQL.prepare(self.brpm_query)
@@ -287,13 +287,13 @@ class Dumper(dumper.XML_Dumper):
if self.start_date:
if self.use_rhn_date:
query += """
- and rp.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and rp.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and rp.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and rp.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
else:
query += """
- and rcp.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and rcp.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and rcp.modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and rcp.modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
self.package_query = rhnSQL.Statement(query)
package_data = rhnSQL.prepare(self.package_query)
@@ -328,13 +328,13 @@ class Dumper(dumper.XML_Dumper):
if self.start_date:
if self.use_rhn_date:
query += """
- where ps.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and ps.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ where ps.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and ps.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
else:
query += """
- where ps.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and ps.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ where ps.modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and ps.modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
self.source_package_query = rhnSQL.Statement(query)
source_package_data = rhnSQL.prepare(self.source_package_query)
@@ -366,13 +366,13 @@ class Dumper(dumper.XML_Dumper):
if self.start_date:
if self.use_rhn_date:
query += """
- and e.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and e.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and e.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and e.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
else:
query += """
- and ce.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and ce.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and ce.modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and ce.modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
self.errata_query = rhnSQL.Statement(query)
errata_data = rhnSQL.prepare(self.errata_query)
@@ -403,14 +403,14 @@ class Dumper(dumper.XML_Dumper):
if self.start_date:
if self.use_rhn_date:
query += """
- and kt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and kt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and kt.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and kt.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
and kt.org_id is Null
"""
else:
query += """
- and kt.modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and kt.modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and kt.modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and kt.modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
and kt.org_id is Null
"""
self.kickstart_trees_query = rhnSQL.Statement(query)
@@ -447,8 +447,8 @@ class Dumper(dumper.XML_Dumper):
"""
if self.start_date:
query += """
- and rkt.last_modified >= TO_DATE(:start_date, 'YYYYMMDDHH24MISS')
- and rkt.last_modified <= TO_DATE(:end_date, 'YYYYMMDDHH24MISS')
+ and rkt.last_modified >= TO_TIMESTAMP(:start_date, 'YYYYMMDDHH24MISS')
+ and rkt.last_modified <= TO_TIMESTAMP(:end_date, 'YYYYMMDDHH24MISS')
"""
self.kickstart_files_query = rhnSQL.Statement(query)
kickstart_files = rhnSQL.prepare(self.kickstart_files_query)
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 928d077..597c4c7 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -311,8 +311,8 @@ class _ChannelDumper(BaseRowDumper):
select package_id as id
from rhnChannelPackage rcp
where rcp.channel_id = :channel_id
- and rcp.modified >= TO_Date(:lower_limit, 'YYYYMMDDHH24MISS')
- and rcp.modified <= TO_Date(:upper_limit, 'YYYYMMDDHH24MISS')
+ and rcp.modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and rcp.modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""")
_query_get_package_ids_by_rhndate_limits = rhnSQL.Statement("""
@@ -320,8 +320,8 @@ class _ChannelDumper(BaseRowDumper):
from rhnPackage rp, rhnChannelPackage rcp
where rcp.channel_id = :channel_id
and rcp.package_id = rp.id
- and rp.last_modified >= TO_Date(:lower_limit, 'YYYYMMDDHH24MISS')
- and rp.last_modified <= TO_Date(:upper_limit, 'YYYYMMDDHH24MISS')
+ and rp.last_modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and rp.last_modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""")
@@ -375,14 +375,14 @@ class _ChannelDumper(BaseRowDumper):
_query__get_errata_ids_by_limits = rhnSQL.Statement("""
%s
- and ce.modified >= TO_Date(:lower_limit, 'YYYYMMDDHH24MISS')
- and ce.modified <= TO_Date(:upper_limit, 'YYYYMMDDHH24MISS')
+ and ce.modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and ce.modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""" % _query__get_errata_ids)
_query__get_errata_ids_by_rhnlimits = rhnSQL.Statement("""
%s
- and e.last_modified >= TO_Date(:lower_limit, 'YYYYMMDDHH24MISS')
- and e.last_modified <= TO_Date(:upper_limit, 'YYYYMMDDHH24MISS')
+ and e.last_modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and e.last_modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""" % _query__get_errata_ids)
def _get_errata_ids(self):
@@ -399,14 +399,14 @@ class _ChannelDumper(BaseRowDumper):
_query_get_kickstartable_trees_by_rhnlimits = rhnSQL.Statement("""
%s
- and kt.last_modified >= TO_DATE(:lower_limit, 'YYYYMMDDHH24MISS')
- and kt.last_modified <= TO_DATE(:upper_limit, 'YYYYMMDDHH24MISS')
+ and kt.last_modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and kt.last_modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""" % _query_get_kickstartable_trees)
_query_get_kickstartable_trees_by_limits = rhnSQL.Statement("""
%s
- and kt.modified >= TO_DATE(:lower_limit, 'YYYYMMDDHH24MISS')
- and kt.modified <= TO_DATE(:upper_limit, 'YYYYMMDDHH24MISS')
+ and kt.modified >= TO_TIMESTAMP(:lower_limit, 'YYYYMMDDHH24MISS')
+ and kt.modified <= TO_TIMESTAMP(:upper_limit, 'YYYYMMDDHH24MISS')
""" % _query_get_kickstartable_trees)
def _get_kickstartable_trees(self):
13 years