Changes to 'refs/tags/rhncfg-5.10.34-1'
by Tomáš Kašpárek
Tag 'rhncfg-5.10.34-1' created by Tomas Kasparek <tkasparek(a)redhat.com> at 2012-08-07 09:55 +0000
Tagging package [rhncfg] version [5.10.34-1] in directory [client/tools/rhncfg/].
Changes since spacewalk-utils-1.8.23-1:
Tomas Kasparek (2):
840250 - If there's symlink in file deployment path it will be created
Automatic commit of package [rhncfg] release [5.10.34-1].
Tomas Lestach (2):
fix errata sort on the rhn/channels/manage/errata/ListRemove.do page
enable sorting of errata list according to synopsis on the rhn/channels/manage/errata/ListRemove.do page
---
client/tools/rhncfg/config_common/transactions.py | 26 +++++-----
client/tools/rhncfg/config_common/utils.py | 11 +++-
client/tools/rhncfg/rhncfg.spec | 5 +
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 6 +-
java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp | 3 -
rel-eng/packages/rhncfg | 2
6 files changed, 36 insertions(+), 17 deletions(-)
---
11 years, 9 months
2 commits - client/tools rel-eng/packages
by Tomáš Kašpárek
client/tools/rhncfg/config_common/transactions.py | 26 +++++++++++-----------
client/tools/rhncfg/config_common/utils.py | 11 ++++++++-
client/tools/rhncfg/rhncfg.spec | 5 +++-
rel-eng/packages/rhncfg | 2 -
4 files changed, 29 insertions(+), 15 deletions(-)
New commits:
commit 45429051e9c911ea7cf289fd89c809e8e87fc5f9
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Aug 7 11:55:14 2012 +0200
Automatic commit of package [rhncfg] release [5.10.34-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index 271c494..5fa226e 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -8,7 +8,7 @@ Group: Applications/System
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.10.33
+Version: 5.10.34
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -112,6 +112,9 @@ fi
# $Id$
%changelog
+* Tue Aug 07 2012 Tomas Kasparek <tkasparek(a)redhat.com> 5.10.34-1
+- 840250 - If there's symlink in file deployment path it will be created
+
* Mon Jul 09 2012 Michael Mraka <michael.mraka(a)redhat.com> 5.10.33-1
- check symlink not target file existence
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg
index 5e96415..66c79f6 100644
--- a/rel-eng/packages/rhncfg
+++ b/rel-eng/packages/rhncfg
@@ -1 +1 @@
-5.10.33-1 client/tools/rhncfg/
+5.10.34-1 client/tools/rhncfg/
commit 22aa313729b0840566ee290a37996ab7840d3604
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Aug 7 11:48:52 2012 +0200
840250 - If there's symlink in file deployment path it will be created
Creating symlink in file deployment path and ensuring that symlinks will be
created before files (Directories are created always 1st as it was, but if
in directory path is symlink present, it will be created instead of directory
and therefore preventing 840250 from triggering.)
diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py
index c2ec5f1..cd4c081 100644
--- a/client/tools/rhncfg/config_common/transactions.py
+++ b/client/tools/rhncfg/config_common/transactions.py
@@ -49,6 +49,7 @@ class DeployTransaction:
self.files = []
self.dirs = []
+ self.symlinks = []
self.new_dirs = []
self.backup_by_path = {}
self.newtemp_by_path = {}
@@ -259,7 +260,10 @@ class DeployTransaction:
for i in range(len(self.new_dirs)):
remove_dir = self.new_dirs[i]
log_debug(6, "removing directory %s that was created during transaction ..." % remove_dir)
- os.rmdir(remove_dir)
+ if os.path.islink(remove_dir) == True:
+ os.remove(remove_dir)
+ else:
+ os.rmdir(remove_dir)
log_debug(9, "directory removed")
log_debug(3, "rollback successful")
@@ -269,6 +273,10 @@ class DeployTransaction:
fp = file_utils.FileProcessor()
log_debug(3, "deploying transaction")
+
+ for dep_file in self.files:
+ if dep_file['filetype'] == 'symlink':
+ self.symlinks.append(dep_file)
# 0. handle any dirs we need to create first
# a) if the dir exists, then just change the mode and owners,
@@ -305,7 +313,7 @@ class DeployTransaction:
self._chown_chmod_chcon(dirname, dirname, directory)
else:
log_debug(3, "directory not found, creating: %s" % dirname)
- dirs_created = utils.mkdir_p(dirname)
+ dirs_created = utils.mkdir_p(dirname, None, self.symlinks, self.files)
self.new_dirs.extend(dirs_created)
self._chown_chmod_chcon(dirname, dirname, directory)
if self.deployment_cb:
@@ -334,9 +342,9 @@ class DeployTransaction:
(directory, filename) = os.path.split(path)
if os.path.isdir(path) and not os.path.islink(path):
raise cfg_exceptions.FileEntryIsDirectory(path)
- if not os.path.exists(directory) and os.path.isdir(directory):
+ if not os.path.exists(directory):# and os.path.isdir(directory):
log_debug(7, "creating directories for %s ..." % directory)
- dirs_created = utils.mkdir_p(directory)
+ dirs_created = utils.mkdir_p(directory, None, self.symlinks, self.files)
self.new_dirs.extend(dirs_created)
log_debug(7, "directories created and added to list for rollback")
@@ -363,10 +371,10 @@ class DeployTransaction:
log_debug(9, "backup file %s written" % self.backup_by_path[path])
# 3.
+ paths.sort(key = lambda s: string.count(s, os.path.sep))
for path in paths:
if self.deployment_cb:
self.deployment_cb(path)
-
log_debug(6, "deploying %s ..." % path)
os.rename(self.newtemp_by_path[path], path)
# race
@@ -380,10 +388,4 @@ class DeployTransaction:
#traceback.print_exc()
if self.auto_rollback:
self.rollback()
- raise
-
-
-
-
-
-
+ raise
\ No newline at end of file
diff --git a/client/tools/rhncfg/config_common/utils.py b/client/tools/rhncfg/config_common/utils.py
index 26144ec..4d90d81 100644
--- a/client/tools/rhncfg/config_common/utils.py
+++ b/client/tools/rhncfg/config_common/utils.py
@@ -88,7 +88,7 @@ def copyfile_p(src, dst):
else:
shutil.copyfile(src, dst)
-def mkdir_p(path, mode=None):
+def mkdir_p(path, mode=None, symlinks=None, allfiles=None):
"""
Similar to 'mkdir -p' -- makes all directories necessary to ensure
the 'path' is a directory, and return the list of directories that were
@@ -101,6 +101,15 @@ def mkdir_p(path, mode=None):
components = path_full_split(path)
for i in range(1,len(components)):
d = os.path.join(*components[:i+1])
+ if symlinks:
+ for symlink in symlinks:
+ if symlink['path'] == d:
+ # create symlink and remove it from symlink list
+ os.symlink(symlink['symlink'], symlink['path'])
+ symlinks.remove(symlink)
+ allfiles.remove(symlink)
+ dirs_created.append(symlink)
+ continue
log_debug(8, "testing",d)
try:
os.mkdir(d, mode)
11 years, 9 months
java/code
by Tomas Lestach
java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 14d4f114a5ab44986e4787667ad5cda591176bb6
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 18:01:24 2012 +0200
enable sorting of errata list according to synopsis on the rhn/channels/manage/errata/ListRemove.do page
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp b/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
index 7e25d74..3fa77ac 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
@@ -65,10 +65,11 @@
</rl:column>
- <rl:column sortable="false"
+ <rl:column sortable="true"
bound="false"
filterattr="advisorySynopsis"
headerkey="erratalist.jsp.synopsis"
+ sortattr="advisorySynopsis"
>
${current.advisorySynopsis}
</rl:column>
11 years, 9 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 43fbb66782bebe62e5aa323bc5edf70276d2609b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 17:36:53 2012 +0200
fix errata sort on the rhn/channels/manage/errata/ListRemove.do page
This commit partly reverts 16f30f97d657ab7019489dfac5a11f67afc2143e.
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
index 5217f3a..e7f5488 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
@@ -319,7 +319,11 @@ SELECT DISTINCT E.id
<mode name="in_channel" class="com.redhat.rhn.frontend.dto.ErrataOverview">
<query params="cid">
-SELECT DISTINCT E.id
+SELECT DISTINCT E.id,
+ E.advisory AS advisory,
+ E.update_date AS update_date,
+ E.synopsis as advisory_synopsis,
+ E.advisory_type as advisory_type
FROM rhnErrata E,
rhnChannelErrata CE
WHERE CE.channel_id = :cid
11 years, 9 months
Changes to 'refs/tags/spacewalk-utils-1.8.23-1'
by Tomas Lestach
Tag 'spacewalk-utils-1.8.23-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2012-08-06 14:45 +0000
Tagging package [spacewalk-utils] version [1.8.23-1] in directory [utils/].
Changes since spacewalk-config-1.8.3-1:
Tomas Lestach (2):
843466 - prevent spacewalk-hostname-rename to fail with an IPv6 address
Automatic commit of package [spacewalk-utils] release [1.8.23-1].
---
rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-hostname-rename | 14 +++++++++++---
utils/spacewalk-utils.spec | 5 ++++-
3 files changed, 16 insertions(+), 5 deletions(-)
---
11 years, 9 months
2 commits - rel-eng/packages utils/spacewalk-hostname-rename utils/spacewalk-utils.spec
by Tomas Lestach
rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-hostname-rename | 14 +++++++++++---
utils/spacewalk-utils.spec | 5 ++++-
3 files changed, 16 insertions(+), 5 deletions(-)
New commits:
commit c9954eacd076e2a12383dba40a129ef92f897fff
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 16:45:57 2012 +0200
Automatic commit of package [spacewalk-utils] release [1.8.23-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index c1d892e..789bd87 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-1.8.22-1 utils/
+1.8.23-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 1b3f9c6..b363ce0 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 1.8.22
+Version: 1.8.23
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -86,6 +86,9 @@ spacewalk-pylint $RPM_BUILD_ROOT%{rhnroot}
%changelog
+* Mon Aug 06 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.23-1
+- 843466 - prevent spacewalk-hostname-rename to fail with an IPv6 address
+
* Mon Aug 06 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.22-1
- 817484 - strip non-number chars from date format
commit 2371ce74d6ec383fb839a394b7f71e24e99aff73
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 16:04:41 2012 +0200
843466 - prevent spacewalk-hostname-rename to fail with an IPv6 address
since the Monitoring isn't IPv6 ready, the fix is more than sufficient
diff --git a/utils/spacewalk-hostname-rename b/utils/spacewalk-hostname-rename
index 6627c08..d205e40 100755
--- a/utils/spacewalk-hostname-rename
+++ b/utils/spacewalk-hostname-rename
@@ -344,11 +344,19 @@ EOS
}
function update_monitoring_data {
+ if [[ "$IP" =~ "$IPV4ADDR_REGEX" ]]; then
+ MON_UPDATE="UPDATE rhn_sat_cluster SET vip = '$IP' WHERE public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%';
+ UPDATE rhn_sat_node SET ip = '$IP' WHERE EXISTS (SELECT 1 FROM rhn_sat_cluster RSC WHERE RSC.public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%' AND sat_cluster_id = RSC.recid);
+ COMMIT;"
+ fi
+ if [[ "$IP" =~ "$IPV6ADDR_REGEX" ]]; then
+ MON_UPDATE="UPDATE rhn_sat_cluster SET vip6 = '$IP' WHERE public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%';
+ UPDATE rhn_sat_node SET ip6 = '$IP' WHERE EXISTS (SELECT 1 FROM rhn_sat_cluster RSC WHERE RSC.public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%' AND sat_cluster_id = RSC.recid);
+ COMMIT;"
+ fi
NOCPULSE_OLD_PUBLIC_KEY=`cat $NOCPULSE_PUBLIC_KEY_FILE`
spacewalk-sql --select-mode - >>$LOG <<EOS
-UPDATE rhn_sat_cluster SET vip = '$IP' WHERE public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%';
-UPDATE rhn_sat_node SET ip = '$IP' WHERE EXISTS (SELECT 1 FROM rhn_sat_cluster RSC WHERE RSC.public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%' AND sat_cluster_id = RSC.recid);
-COMMIT;
+$MON_UPDATE
$DBSHELL_QUIT
EOS
}
11 years, 9 months
Changes to 'refs/tags/spacewalk-config-1.8.3-1'
by Jan Pazdziora
Tag 'spacewalk-config-1.8.3-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2012-08-06 12:44 +0000
Tagging package [spacewalk-config] version [1.8.3-1] in directory [spacewalk/config/].
Changes since spacewalk-java-1.8.124-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-config] release [1.8.3-1].
---
rel-eng/packages/spacewalk-config | 2 +-
spacewalk/config/spacewalk-config.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
11 years, 9 months
rel-eng/packages spacewalk/config
by Jan Pazdziora
rel-eng/packages/spacewalk-config | 2 +-
spacewalk/config/spacewalk-config.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 3e7549a50ae54bbee1caf44a6d1d5999bc8f98ba
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 6 14:44:27 2012 +0200
Automatic commit of package [spacewalk-config] release [1.8.3-1].
diff --git a/rel-eng/packages/spacewalk-config b/rel-eng/packages/spacewalk-config
index 79a9982..5e28392 100644
--- a/rel-eng/packages/spacewalk-config
+++ b/rel-eng/packages/spacewalk-config
@@ -1 +1 @@
-1.8.2-1 spacewalk/config/
+1.8.3-1 spacewalk/config/
diff --git a/spacewalk/config/spacewalk-config.spec b/spacewalk/config/spacewalk-config.spec
index 0be12a7..e1e858f 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -1,6 +1,6 @@
Name: spacewalk-config
Summary: Spacewalk Configuration
-Version: 1.8.2
+Version: 1.8.3
Release: 1%{?dist}
URL: http://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -104,6 +104,9 @@ chgrp apache /etc/rhn /etc/rhn/rhn.conf /etc/rhn/cluster.ini 2> /dev/null || :
chmod o-rwx /etc/rhn/rhn.conf* /etc/rhn/cluster.ini* /etc/sysconfig/rhn/backup-* /var/lib/rhn/rhn-satellite-prep/* 2> /dev/null || :
%changelog
+* Mon Aug 06 2012 Jan Pazdziora 1.8.3-1
+- 844474 - add a comment about the server.satellite.http_proxy format.
+
* Wed Jun 27 2012 Jan Pazdziora 1.8.2-1
- The delete_confirm.pxt was replaced by DeleteConfirm.do.
- %%defattr is not needed since rpm 4.4
11 years, 9 months
Changes to 'refs/tags/spacewalk-java-1.8.124-1'
by Tomas Lestach
Tag 'spacewalk-java-1.8.124-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2012-08-06 11:16 +0000
Tagging package [spacewalk-java] version [1.8.124-1] in directory [java/].
Changes since spacewalk-utils-1.8.22-1:
Tomas Lestach (2):
detect oracle TIMESTAMPTZ objects and convert them correctly to timestamp
Automatic commit of package [spacewalk-java] release [1.8.124-1].
---
java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java | 7 ++++++-
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
---
11 years, 9 months
2 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java | 7 ++++++-
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit b0d511a2f9f5d3de406eec8d90a16a935beb2e11
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 13:16:26 2012 +0200
Automatic commit of package [spacewalk-java] release [1.8.124-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 514b8f7..102293e 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -23,7 +23,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.8.123
+Version: 1.8.124
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -614,6 +614,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Aug 06 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.124-1
+- detect oracle TIMESTAMPTZ objects and convert them correctly to timestamp
+
* Thu Aug 02 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.123-1
- 842992 - display a relevant error message when creating channel names/labels
starting with rhn|redhat
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index aa14393..762dec9 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.8.123-1 java/
+1.8.124-1 java/
commit 8999ccc7daf750fe7df7f0bee348b3fd45bda0c4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 6 11:41:29 2012 +0200
detect oracle TIMESTAMPTZ objects and convert them correctly to timestamp
addressing future possible tracebacks:
com.redhat.rhn.common.util.MethodNotFoundException: Could not find method called: setModified in class:
com.redhat.rhn.frontend.dto.SystemOverview with params: [type: oracle.sql.TIMESTAMPTZ, value: oracle.sql.TIMESTAMPTZ@3553d71d]
at com.redhat.rhn.common.util.MethodUtil.callMethod(MethodUtil.java:196)
at com.redhat.rhn.common.db.datasource.CachedStatement.addToObject(CachedStatement.java:751)
at com.redhat.rhn.common.db.datasource.CachedStatement.processResultSet(CachedStatement.java:602)
at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:460)
at com.redhat.rhn.common.db.datasource.CachedStatement.executeElaboratorBatch(CachedStatement.java:371)
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java b/java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java
index 7133ec1..a5d3852 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/CachedStatement.java
@@ -768,12 +768,17 @@ public class CachedStatement {
*/
private Object getObject(ResultSet rs, String columnName) throws SQLException {
Object columnValue = rs.getObject(columnName);
+ if (columnValue == null) {
+ return null;
+ }
+
// Workaround for problem where the JDBC driver returns a
// java.sql.Date that often times will not deliver time
// precision beyond 12:00AM Midnight so you get dates like
// this : August 23, 2005 12:00:00 AM PDT
// vs the real date: August 23, 2005 1:36:12 PM PDT
- if (columnValue instanceof Date) {
+ if (columnValue instanceof Date ||
+ ("oracle.sql.TIMESTAMPTZ".equals(columnValue.getClass().getCanonicalName()))) {
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
return rs.getTimestamp(columnName, cal);
}
11 years, 9 months