java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit b67d9f640ede7982f33c7abcd501f1b6ee983076
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 28 14:52:39 2010 -0400
getting rid of tabs
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index fa16f9e..783803d 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -96,9 +96,9 @@ public class KickstartFormatter {
NEWLINE + "echo >> /etc/motd" + NEWLINE + NEWLINE +
"# end of generated kickstart file";
private static final String BEGINRHN = "%post --logfile " +
- "/mnt/sysimage/root/ks-rhn-post.log" + NEWLINE +
- "# --Begin " + Config.get().getString("web.product_name") +
- " command section--\n";
+ "/mnt/sysimage/root/ks-rhn-post.log" + NEWLINE +
+ "# --Begin " + Config.get().getString("web.product_name") +
+ " command section--\n";
private static final String SAVE_KS_CFG = "cp `awk '{ if ($1 ~ /%include/) " +
"{print $2}}' /tmp/ks.cfg` /tmp/ks.cfg /mnt/sysimage/root";
13 years, 9 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 43 ++++------
1 file changed, 20 insertions(+), 23 deletions(-)
New commits:
commit 55693f34af940020e9a804729e5cad221bfc8128
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 28 14:46:56 2010 -0400
591863 - making pre and post logging work for scripts that are not bash scripts
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index 26b6b13..fa16f9e 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -95,14 +95,16 @@ public class KickstartFormatter {
" kickstart on \\$(date +'%Y-%m-%d')\" >> /etc/motd" +
NEWLINE + "echo >> /etc/motd" + NEWLINE + NEWLINE +
"# end of generated kickstart file";
- private static final String BEGINRHN = "%post" + NEWLINE +
- "( # Log %post errors \n # --Begin " + Config.get().getString("web.product_name") +
+ private static final String BEGINRHN = "%post --logfile " +
+ "/mnt/sysimage/root/ks-rhn-post.log" + NEWLINE +
+ "# --Begin " + Config.get().getString("web.product_name") +
" command section--\n";
private static final String SAVE_KS_CFG = "cp `awk '{ if ($1 ~ /%include/) " +
"{print $2}}' /tmp/ks.cfg` /tmp/ks.cfg /mnt/sysimage/root";
- private static final String END_POST = ") >> /root/ks-post.log 2>&1\n";
- private static final String END_PRE = ") >> /tmp/ks-pre.log 2>&1\n";
- private static final String BEGIN_PRE_POST_LOG = "(" + NEWLINE;
+
+ private static final String POST_LOG = " --logfile /mnt/sysimage/root/ks-post.log";
+ private static final String PRE_LOG = " --logfile /tmp/ks-pre.log";
+
private static final String ENDRHN_NONCHROOT =
") >> /mnt/sysimage/root/ks-post.log 2>&1\n";
private static final String KSTREE =
@@ -147,7 +149,7 @@ public class KickstartFormatter {
"cp -fa /tmp/ks-tree-shadow/* /mnt/sysimage/tmp/ks-tree-copy" + NEWLINE +
"fi" + NEWLINE +
"cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf" + NEWLINE +
- "cp -f /tmp/ks-pre.log /mnt/sysimage/root/" + NEWLINE;
+ "cp -f /tmp/ks-pre.log* /mnt/sysimage/root/" + NEWLINE;
private static final String RHN_TRACE = "set -x" + NEWLINE;
private static final String XMLRPC_HOST =
Config.get().getString(ConfigDefaults.KICKSTART_HOST, "xmlrpc.rhn.redhat.com");
@@ -249,12 +251,14 @@ public class KickstartFormatter {
}
buf.append(getRhnPost());
- buf.append(MOTD_FOOTER);
buf.append(NEWLINE);
buf.append(getPrePost(KickstartScript.TYPE_POST));
buf.append(NEWLINE);
+ buf.append("%post"); //new %post for last kernel stuff
addCobblerSnippet(buf, "post_install_kernel_options");
addCobblerSnippet(buf, "koan_environment");
+ buf.append(MOTD_FOOTER);
+ buf.append(NEWLINE);
buf.append("$kickstart_done");
buf.append(NEWLINE);
String retval = buf.toString();
@@ -505,28 +509,22 @@ public class KickstartFormatter {
}
if (!StringUtils.isBlank(kss.getInterpreter())) {
retval.append("%" + typeIn + SPACE + INTERPRETER_OPT + SPACE +
- kss.getInterpreter() + NEWLINE);
+ kss.getInterpreter());
}
else {
- retval.append("%" + typeIn + NEWLINE);
+ retval.append("%" + typeIn);
}
if (typeIn.equals(KickstartScript.TYPE_POST) &&
ksdata.getPostLog()) {
- retval.append(BEGIN_PRE_POST_LOG);
+ retval.append(POST_LOG + "." + kss.getPosition());
}
- if (typeIn.equals(KickstartScript.TYPE_PRE) &&
+ else if (typeIn.equals(KickstartScript.TYPE_PRE) &&
ksdata.getPreLog()) {
- retval.append(BEGIN_PRE_POST_LOG);
+ retval.append(PRE_LOG + "." + kss.getPosition());
}
+ retval.append(NEWLINE);
+
retval.append(kss.getDataContents() + NEWLINE);
- if (typeIn.equals(KickstartScript.TYPE_POST) &&
- ksdata.getPostLog()) {
- retval.append(END_POST);
- }
- if (typeIn.equals(KickstartScript.TYPE_PRE) &&
- ksdata.getPreLog()) {
- retval.append(END_PRE);
- }
if (kss.getRaw()) {
retval.append(RAW_END + NEWLINE);
}
@@ -561,7 +559,7 @@ public class KickstartFormatter {
NOCHROOT + NEWLINE);
}
if (ksdata.getNonChrootPost() && !seenNoChroot) {
- retval.append(BEGIN_PRE_POST_LOG + RHN_TRACE);
+ retval.append(POST_LOG + NEWLINE + RHN_TRACE);
}
if (!seenNoChroot) {
retval.append(RHN_NOCHROOT);
@@ -584,7 +582,7 @@ public class KickstartFormatter {
if (!seenNoChroot) {
retval.append("%" + KickstartScript.TYPE_POST + SPACE + NOCHROOT + NEWLINE);
if (ksdata.getNonChrootPost()) {
- retval.append(BEGIN_PRE_POST_LOG + RHN_TRACE);
+ retval.append(POST_LOG + NEWLINE + RHN_TRACE);
}
retval.append(RHN_NOCHROOT);
if (this.ksdata.getKsCfg()) {
@@ -723,7 +721,6 @@ public class KickstartFormatter {
retval.append(RHNCHECK + NEWLINE);
retval.append(NEWLINE);
- retval.append(END_POST);
addCobblerSnippet(retval, "post_install_network_config");
return retval.toString();
}
13 years, 9 months
Changes to 'refs/tags/spacewalk-search-1.1.4-1'
by Milan Zazrivec
Tag 'spacewalk-search-1.1.4-1' created by Milan Zazrivec <mzazrivec(a)redhat.com> at 2010-07-28 16:28 +0000
Tagging package [spacewalk-search] version [1.1.4-1] in directory [search-server/spacewalk-search/].
Changes since spacewalk-schema-1.1.22-1:
Aron Parsons (9):
added new functions system_deletepackageprofile and system_listpackageprofiles
rename system_listduplicates to report_duplicates
change the log level for warning that cached credentials are invalid
support quoting of arguments
support quoting of group names
only call the system.listDuplicates* functions if the API supports it
remove old instance of system_createpackageprofile
support quoting of package profile names in tab completion
removed a stray print statement
Colin Coe (2):
Fix 'Duplicate message key found in XML Resource file' message
System currency phase 2
Justin Sherrill (1):
fixing missing escaped command that broke kickstart rendering
Milan Zazrivec (3):
set java.library.path for search to be able to find oci library
build ConnectionURL from db_* values in rhn.conf
Automatic commit of package [spacewalk-search] release [1.1.4-1].
Miroslav Suchý (4):
Revert "update .po files"
update .po files
618267 - add missing import and foo
619098 - take manufacturer from system group
---
client/rhel/rhn-client-tools/po/ar.po | 1354 +++-----
client/rhel/rhn-client-tools/po/as.po | 1490 +++------
client/rhel/rhn-client-tools/po/bg.po | 1368 ++++----
client/rhel/rhn-client-tools/po/bn.po | 1484 ++++-----
client/rhel/rhn-client-tools/po/bn_IN.po | 1581 ++++------
client/rhel/rhn-client-tools/po/ca.po | 1385 ++++----
client/rhel/rhn-client-tools/po/cs.po | 1382 +++-----
client/rhel/rhn-client-tools/po/cy.po | 1371 ++++----
client/rhel/rhn-client-tools/po/da.po | 1377 ++++----
client/rhel/rhn-client-tools/po/de.po | 1547 ++++-----
client/rhel/rhn-client-tools/po/el.po | 1319 +++-----
client/rhel/rhn-client-tools/po/en_GB.po | 1296 ++++----
client/rhel/rhn-client-tools/po/es.po | 1531 ++++-----
client/rhel/rhn-client-tools/po/et.po | 1371 ++++----
client/rhel/rhn-client-tools/po/fa.po | 1150 +++----
client/rhel/rhn-client-tools/po/fi.po | 1355 +++-----
client/rhel/rhn-client-tools/po/fr.po | 1542 ++++-----
client/rhel/rhn-client-tools/po/gu.po | 1482 +++------
client/rhel/rhn-client-tools/po/he.po | 1150 +++----
client/rhel/rhn-client-tools/po/hi.po | 1476 +++------
client/rhel/rhn-client-tools/po/hr.po | 1520 ++++-----
client/rhel/rhn-client-tools/po/hu.po | 1383 ++++----
client/rhel/rhn-client-tools/po/hy.po | 1150 +++----
client/rhel/rhn-client-tools/po/id.po | 1209 +++----
client/rhel/rhn-client-tools/po/is.po | 1366 ++++----
client/rhel/rhn-client-tools/po/it.po | 1540 ++++-----
client/rhel/rhn-client-tools/po/ja.po | 1545 ++++-----
client/rhel/rhn-client-tools/po/ka.po | 1150 +++----
client/rhel/rhn-client-tools/po/kn.po | 1505 ++++-----
client/rhel/rhn-client-tools/po/ko.po | 1497 ++++-----
client/rhel/rhn-client-tools/po/ku.po | 1150 +++----
client/rhel/rhn-client-tools/po/lo.po | 1150 +++----
client/rhel/rhn-client-tools/po/lv.po | 1150 +++----
client/rhel/rhn-client-tools/po/mk.po | 1363 ++++----
client/rhel/rhn-client-tools/po/ml.po | 1500 ++++-----
client/rhel/rhn-client-tools/po/mr.po | 1482 +++------
client/rhel/rhn-client-tools/po/ms.po | 1385 ++++----
client/rhel/rhn-client-tools/po/my.po | 1150 +++----
client/rhel/rhn-client-tools/po/nb.po | 1365 ++++----
client/rhel/rhn-client-tools/po/nl.po | 1359 +++-----
client/rhel/rhn-client-tools/po/no.po | 1358 +++-----
client/rhel/rhn-client-tools/po/or.po | 1490 +++------
client/rhel/rhn-client-tools/po/pa.po | 1479 +++------
client/rhel/rhn-client-tools/po/pl.po | 1377 ++++----
client/rhel/rhn-client-tools/po/pt.po | 1529 ++++-----
client/rhel/rhn-client-tools/po/pt_BR.po | 1524 ++++-----
client/rhel/rhn-client-tools/po/rhn-client-tools.pot | 1150 +++----
client/rhel/rhn-client-tools/po/ro.po | 1346 ++++----
client/rhel/rhn-client-tools/po/ru.po | 1513 ++++-----
client/rhel/rhn-client-tools/po/si.po | 1482 +++------
client/rhel/rhn-client-tools/po/sk.po | 1376 ++++----
client/rhel/rhn-client-tools/po/sl.po | 1352 +++-----
client/rhel/rhn-client-tools/po/sq.po | 1150 +++----
client/rhel/rhn-client-tools/po/sr.po | 1365 +++-----
client/rhel/rhn-client-tools/po/sr(a)Latn.po | 1150 +++----
client/rhel/rhn-client-tools/po/sv.po | 1526 ++++-----
client/rhel/rhn-client-tools/po/ta.po | 1500 ++++-----
client/rhel/rhn-client-tools/po/te.po | 1478 +++------
client/rhel/rhn-client-tools/po/tr.po | 1356 +++-----
client/rhel/rhn-client-tools/po/uk.po | 1497 ++++-----
client/rhel/rhn-client-tools/po/ur.po | 1150 +++----
client/rhel/rhn-client-tools/po/vi.po | 1150 +++----
client/rhel/rhn-client-tools/po/zh_CN.GB2312.po | 1334 +++-----
client/rhel/rhn-client-tools/po/zh_CN.po | 1456 +++------
client/rhel/rhn-client-tools/po/zh_TW.Big5.po | 1459 +++------
client/rhel/rhn-client-tools/po/zh_TW.po | 1459 +++------
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 2
client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 3
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 20
java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java | 28
java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml | 5
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java | 37
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 30
java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java | 28
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 2
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 27
java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp | 106
rel-eng/packages/spacewalk-search | 2
search-server/spacewalk-search/spacewalk-search.spec | 6
search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml | 6
search-server/spacewalk-search/src/config/rhn-search | 3
search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf | 2
search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java | 6
search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java | 6
spacecmd/src/lib/activationkey.py | 18
spacecmd/src/lib/group.py | 11
spacecmd/src/lib/misc.py | 2
spacecmd/src/lib/report.py | 73
spacecmd/src/lib/system.py | 164 -
spacecmd/src/lib/user.py | 21
spacecmd/src/lib/utils.py | 4
91 files changed, 41543 insertions(+), 50005 deletions(-)
---
13 years, 9 months
rel-eng/packages search-server/spacewalk-search
by Milan Zazrivec
rel-eng/packages/spacewalk-search | 2 +-
search-server/spacewalk-search/spacewalk-search.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit d7b636f6683f41197a1945818fa035a485a1fa11
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jul 28 18:28:24 2010 +0200
Automatic commit of package [spacewalk-search] release [1.1.4-1].
diff --git a/rel-eng/packages/spacewalk-search b/rel-eng/packages/spacewalk-search
index 126cf96..0adb029 100644
--- a/rel-eng/packages/spacewalk-search
+++ b/rel-eng/packages/spacewalk-search
@@ -1 +1 @@
-1.1.3-1 search-server/spacewalk-search/
+1.1.4-1 search-server/spacewalk-search/
diff --git a/search-server/spacewalk-search/spacewalk-search.spec b/search-server/spacewalk-search/spacewalk-search.spec
index cb49254..d2cece6 100644
--- a/search-server/spacewalk-search/spacewalk-search.spec
+++ b/search-server/spacewalk-search/spacewalk-search.spec
@@ -4,7 +4,7 @@ Name: spacewalk-search
Summary: Spacewalk Full Text Search Server
Group: Applications/Internet
License: GPLv2
-Version: 1.1.3
+Version: 1.1.4
Release: 1%{?dist}
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
@@ -112,6 +112,10 @@ fi
%{_sysconfdir}/logrotate.d/rhn-search
%changelog
+* Wed Jul 28 2010 Milan Zazrivec <mzazrivec(a)redhat.com> 1.1.4-1
+- build ConnectionURL from db_* values in rhn.conf
+- set java.library.path for search to be able to find oci library
+
* Tue Jul 27 2010 Jan Pazdziora 1.1.3-1
- hibernate.connection.url is now created dynamicaly from db_* variables
(michael.mraka(a)redhat.com)
13 years, 9 months
2 commits - search-server/spacewalk-search
by Milan Zazrivec
search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml | 6 +++---
search-server/spacewalk-search/src/config/rhn-search | 3 ++-
search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf | 2 ++
search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java | 6 ++----
search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java | 6 ++++++
5 files changed, 15 insertions(+), 8 deletions(-)
New commits:
commit 1a00594f47f4d88ad80da73457386c21c6e3ef2b
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jul 28 18:14:38 2010 +0200
build ConnectionURL from db_* values in rhn.conf
diff --git a/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml b/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml
index a41e673..4038c8b 100644
--- a/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml
+++ b/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml
@@ -22,9 +22,9 @@
<transactionManager type="JDBC" >
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${search.connection.driver_class}"/>
- <property name="JDBC.ConnectionURL" value="${search.connection.url}"/>
- <property name="JDBC.Username" value="${search.connection.username}"/>
- <property name="JDBC.Password" value="${search.connection.password}"/>
+ <property name="JDBC.ConnectionURL" value="${search.connection.driver_proto}:@${db_name}"/>
+ <property name="JDBC.Username" value="${db_user}"/>
+ <property name="JDBC.Password" value="${db_password}"/>
</dataSource>
</transactionManager>
<!-- Identify all SQL Map XML files to be loaded by this SQL map. Notice the paths
diff --git a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java b/search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java
index c8dc077..d55646c 100644
--- a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java
+++ b/search-server/spacewalk-search/src/java/com/redhat/satellite/search/config/translator/HibernateToSearchTranslator.java
@@ -34,9 +34,7 @@ public class HibernateToSearchTranslator implements KeyTranslator {
* {@inheritDoc}
*/
public boolean shouldTranslate(String key) {
- return (key.equals("hibernate.connection.username") ||
- key.equals("hibernate.connection.password") ||
- key.equals("hibernate.connection.driver_class") ||
- key.equals("hibernate.connection.url"));
+ return (key.equals("hibernate.connection.driver_class") ||
+ key.equals("hibernate.connection.driver_proto"));
}
}
diff --git a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java b/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java
index f8d7d85..a538e76 100644
--- a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java
+++ b/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java
@@ -60,6 +60,12 @@ public class DatabaseManager {
reader = new FileReader(configPath);
}
Properties overrides = config.getNamespaceProperties("search");
+
+ String[] options = {"db_name", "db_password", "db_user"};
+ for (String option : options) {
+ overrides.setProperty(option, config.getString(option));
+ }
+
client = SqlMapClientBuilder.buildSqlMapClient(reader, overrides);
}
commit babc0da8c8ebab16859f2cdca0461254c8b29fe7
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jul 28 16:54:58 2010 +0200
set java.library.path for search to be able to find oci library
diff --git a/search-server/spacewalk-search/src/config/rhn-search b/search-server/spacewalk-search/src/config/rhn-search
index f7856b8..7819d30 100644
--- a/search-server/spacewalk-search/src/config/rhn-search
+++ b/search-server/spacewalk-search/src/config/rhn-search
@@ -75,8 +75,9 @@ unlock() {
}
removeindex() {
+ JAVA_LIBRARY_PATH='-Djava.library.path=/usr/lib/oracle/10.2.0.4/client/lib:/usr/lib/oracle/10.2.0.4/client/lib64'
SEARCH_CLASS_PATH=`build-classpath-directory /usr/share/rhn/search/lib /usr/share/java/ojdbc14.jar`
- CLASSPATH=${SEARCH_CLASS_PATH} java com.redhat.satellite.search.DeleteIndexes
+ CLASSPATH=${SEARCH_CLASS_PATH} java $JAVA_LIBRARY_PATH com.redhat.satellite.search.DeleteIndexes
}
# Do not modify anything beyond this point
diff --git a/search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf b/search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf
index 07d7145..6ef1005 100644
--- a/search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf
+++ b/search-server/spacewalk-search/src/config/search/rhn_search_daemon.conf
@@ -41,6 +41,8 @@ wrapper.java.classpath.20=/usr/share/rhn/search/lib/commons-httpclient-3.0.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=/usr/lib
wrapper.java.library.path.2=/usr/lib64
+wrapper.java.library.path.3=/usr/lib/oracle/10.2.0.4/client/lib
+wrapper.java.library.path.4=/usr/lib/oracle/10.2.0.4/client/lib64
# Java Additional Parameters
#wrapper.java.additional.1=
13 years, 9 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1e86f9ee4ad7406c2da3a9435eba22fde0631e49
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 28 11:41:26 2010 -0400
fixing missing escaped command that broke kickstart rendering
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index dce1d6f..26b6b13 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -92,7 +92,7 @@ public class KickstartFormatter {
private static final String COMMENT = "#" + NEWLINE;
private static final String MOTD_FOOTER = "# MOTD" + NEWLINE + "echo >> /etc/motd" +
NEWLINE + "echo \"" + Config.get().getString("web.product_name") +
- " kickstart on $(date +'%Y-%m-%d')\" >> /etc/motd" +
+ " kickstart on \\$(date +'%Y-%m-%d')\" >> /etc/motd" +
NEWLINE + "echo >> /etc/motd" + NEWLINE + NEWLINE +
"# end of generated kickstart file";
private static final String BEGINRHN = "%post" + NEWLINE +
13 years, 9 months
spacecmd/src
by aparsons
spacecmd/src/lib/system.py | 1 -
1 file changed, 1 deletion(-)
New commits:
commit aa498bfdc6bb51efa5e4eabdbad918323aa213ef
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 11:29:54 2010 -0400
removed a stray print statement
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 9684a0c..4ce2269 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -1196,7 +1196,6 @@ def do_system_delete(self, args):
# get the system ID for each system
for system in systems:
system_id = self.get_system_id(system)
- print system_id
if not system_id: return
system_ids.append(system_id)
13 years, 9 months
6 commits - spacecmd/src
by aparsons
spacecmd/src/lib/activationkey.py | 18 ++++++++--------
spacecmd/src/lib/group.py | 11 ++++++---
spacecmd/src/lib/misc.py | 2 -
spacecmd/src/lib/report.py | 10 ++++-----
spacecmd/src/lib/system.py | 42 ++++++++------------------------------
spacecmd/src/lib/user.py | 21 +++++++++++--------
spacecmd/src/lib/utils.py | 4 +--
7 files changed, 46 insertions(+), 62 deletions(-)
New commits:
commit 49ab85c49fbdafc1ff6e527e7c0c502c7df16dd2
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 11:11:41 2010 -0400
support quoting of package profile names in tab completion
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 75b637e..9684a0c 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -20,6 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
+import shlex
from operator import itemgetter
from xml.parsers.expat import ExpatError
from spacecmd.utils import *
@@ -2176,8 +2177,10 @@ def do_system_listpackageprofiles(self, args, doreturn=False):
def help_system_deletepackageprofile(self):
print 'system_deletepackageprofile: Delete a package profile'
print 'usage: system_deletepackageprofile PROFILE'
+
def complete_system_deletepackageprofile(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return self.tab_complete_systems(\
@@ -2249,13 +2252,14 @@ def help_system_comparepackageprofile(self):
print self.HELP_SYSTEM_OPTS
def complete_system_comparepackageprofile(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return self.tab_complete_systems(text)
elif len(parts) > 2:
return self.tab_complete_systems(\
- self.do_system_listpackageprofiles('', True), text)
+ self.do_system_listpackageprofiles('', True), parts[-1])
def do_system_comparepackageprofile(self, args):
args = parse_arguments(args)
commit 973e696dc6a4a243896c5d4f099b3558d59efa66
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 11:10:07 2010 -0400
remove old instance of system_createpackageprofile
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 4d07060..75b637e 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -1984,36 +1984,6 @@ def do_system_applyerrata(self, args):
####################
-def help_system_createpackageprofile(self):
- print 'system_createpackageprofile: Create a profile of ' + \
- 'the packages installed on this system'
- print 'usage: system_createpackageprofile SYSTEM PROFILENAME'
-
-def complete_system_createpackageprofile(self, text, line, beg, end):
- return tab_completer(self.get_system_names(), text)
-
-def do_system_createpackageprofile(self, args):
- args = parse_arguments(args)
-
- if len(args) < 2:
- self.help_system_createpackageprofile()
- return
-
- system = args[0]
- label = ' '.join(args[1:])
-
- description = prompt_user('Description:')
-
- system_id = self.get_system_id(system)
- if not system_id: return
-
- self.client.system.createPackageProfile(self.session,
- system_id,
- label,
- description)
-
-####################
-
def help_system_listevents(self):
print 'system_listevents: List the event history for a system'
print 'usage: system_listevents <SYSTEMS>'
@@ -2267,6 +2237,8 @@ def do_system_createpackageprofile(self, args):
label,
description)
+ logging.info("Created package profile '%s'" % label)
+
####################
def help_system_comparepackageprofile(self):
commit 6cb8408dd177bd1eccfe69767184b665a8ef14b8
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 11:02:36 2010 -0400
only call the system.listDuplicates* functions if the API supports it
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index 623c2b6..d6995f2 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -249,11 +249,6 @@ def help_report_duplicates(self):
print 'usage: report_duplicates'
def do_report_duplicates(self, args):
- dupes_by_ip = self.client.system.listDuplicatesByIp(self.session)
- dupes_by_mac = self.client.system.listDuplicatesByMac(self.session)
- dupes_by_hostname = \
- self.client.system.listDuplicatesByHostname(self.session)
-
add_separator = False
dupes_by_profile = []
@@ -270,6 +265,11 @@ def do_report_duplicates(self, args):
print '\n'.join(sorted(dupes_by_profile))
if self.check_api_version('10.11'):
+ dupes_by_ip = self.client.system.listDuplicatesByIp(self.session)
+ dupes_by_mac = self.client.system.listDuplicatesByMac(self.session)
+ dupes_by_hostname = \
+ self.client.system.listDuplicatesByHostname(self.session)
+
if len(dupes_by_ip):
if add_separator: print self.SEPARATOR
add_separator = True
commit f014d97c2ec4399b8647ea0556f66e727a28ef06
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 10:58:02 2010 -0400
support quoting of group names
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 110eead..353ec5e 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -20,7 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
-import re
+import re, shlex
from spacecmd.utils import *
def help_activationkey_addpackages(self):
@@ -86,13 +86,13 @@ def help_activationkey_addgroups(self):
print 'usage: activationkey_addgroups KEY <GROUP ...>'
def complete_activationkey_addgroups(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
- return tab_completer(self.do_activationkey_list('', True),
- text)
+ return tab_completer(self.do_activationkey_list('', True), text)
elif len(parts) > 2:
- return tab_completer(self.do_group_list('', True), text)
+ return tab_completer(self.do_group_list('', True), parts[-1])
def do_activationkey_addgroups(self, args):
args = parse_arguments(args)
@@ -117,14 +117,14 @@ def help_activationkey_removegroups(self):
print 'usage: activationkey_removegroups KEY <GROUP ...>'
def complete_activationkey_removegroups(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
- return tab_completer(self.do_activationkey_list('', True),
- text)
+ return tab_completer(self.do_activationkey_list('', True), text)
elif len(parts) > 2:
key_details = self.client.activationkey.getDetails(self.session,
- parts[1])
+ parts[-1])
groups = []
for group in key_details.get('server_group_ids'):
diff --git a/spacecmd/src/lib/group.py b/spacecmd/src/lib/group.py
index 0f07983..240fc2b 100644
--- a/spacecmd/src/lib/group.py
+++ b/spacecmd/src/lib/group.py
@@ -20,6 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
+import shlex
from spacecmd.utils import *
def help_group_addsystems(self):
@@ -29,12 +30,13 @@ def help_group_addsystems(self):
print self.HELP_SYSTEM_OPTS
def complete_group_addsystems(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_group_list('', True), text)
elif len(parts) > 2:
- return self.tab_complete_systems(parts[1])
+ return self.tab_complete_systems(parts[-1])
def do_group_addsystems(self, args):
args = parse_arguments(args)
@@ -71,12 +73,13 @@ def help_group_removesystems(self):
print self.HELP_SYSTEM_OPTS
def complete_group_removesystems(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_group_list('', True), text)
elif len(parts) > 2:
- return self.tab_complete_systems(parts[1])
+ return self.tab_complete_systems(parts[-1])
def do_group_removesystems(self, args):
args = parse_arguments(args)
diff --git a/spacecmd/src/lib/user.py b/spacecmd/src/lib/user.py
index 73aaf86..747daca 100644
--- a/spacecmd/src/lib/user.py
+++ b/spacecmd/src/lib/user.py
@@ -20,6 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
+import shlex
from spacecmd.utils import *
def help_user_delete(self):
@@ -243,12 +244,13 @@ def help_user_addgroup(self):
print 'usage: user_addgroup USER <GROUP ...>'
def complete_user_addgroup(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_user_list('', True), text)
elif len(parts) > 2:
- return tab_completer(self.do_group_list('', True), text)
+ return tab_completer(self.do_group_list('', True), parts[-1])
def do_user_addgroup(self, args):
args = parse_arguments(args)
@@ -272,12 +274,13 @@ def help_user_adddefaultgroup(self):
print 'usage: user_adddefaultgroup USER <GROUP ...>'
def complete_user_adddefaultgroup(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_user_list('', True), text)
elif len(parts) > 2:
- return tab_completer(self.do_group_list('', True), text)
+ return tab_completer(self.do_group_list('', True), parts[-1])
def do_user_adddefaultgroup(self, args):
args = parse_arguments(args)
@@ -300,7 +303,8 @@ def help_user_removegroup(self):
print 'usage: user_removegroup USER <GROUP ...>'
def complete_user_removegroup(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_user_list('', True), text)
@@ -308,7 +312,7 @@ def complete_user_removegroup(self, text, line, beg, end):
# only list the groups currently assigned to this user
groups = self.client.user.listAssignedSystemGroups(self.session,
parts[1])
- return tab_completer([ g.get('name') for g in groups ], text)
+ return tab_completer([ g.get('name') for g in groups ], parts[-1])
def do_user_removegroup(self, args):
args = parse_arguments(args)
@@ -333,7 +337,8 @@ def help_user_removedefaultgroup(self):
print 'usage: user_removedefaultgroup USER <GROUP ...>'
def complete_user_removedefaultgroup(self, text, line, beg, end):
- parts = line.split(' ')
+ parts = shlex.split(line)
+ if line[-1] == ' ': parts.append('')
if len(parts) == 2:
return tab_completer(self.do_user_list('', True), text)
@@ -341,7 +346,7 @@ def complete_user_removedefaultgroup(self, text, line, beg, end):
# only list the groups currently assigned to this user
groups = self.client.user.listDefaultSystemGroups(self.session,
parts[1])
- return tab_completer([ g.get('name') for g in groups ], text)
+ return tab_completer([ g.get('name') for g in groups ], parts[-1])
def do_user_removedefaultgroup(self, args):
args = parse_arguments(args)
commit bf1ce10dac37c564908642eacfaf7c8a0b0edcf4
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 10:57:34 2010 -0400
support quoting of arguments
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index 2bbe674..6d4a803 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -20,7 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
-import logging, os, pickle, re, readline, sys, time, xmlrpclib
+import logging, os, pickle, re, readline, shlex, sys, time, xmlrpclib
from datetime import datetime, timedelta
from tempfile import mkstemp
from textwrap import wrap
@@ -29,7 +29,7 @@ __EDITORS = ['vim', 'vi', 'nano', 'emacs']
def parse_arguments(args):
try:
- parts = args.split()
+ parts = shlex.split(args)
# allow simple globbing
parts = [re.sub('\*', '.*', a) for a in parts]
commit 8c9afb0d013652b080e6d3e69e90a8d5b555a44b
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 09:54:27 2010 -0400
change the log level for warning that cached credentials are invalid
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 22a25e7..394c9bc 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -245,7 +245,7 @@ def do_login(self, args):
self.client.user.listUsers(self.session)
except:
- logging.debug('Cached credentials are invalid')
+ logging.warning('Cached credentials are invalid')
username = ''
self.session = ''
13 years, 9 months
2 commits - client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 2 +-
client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 3b2c2ecac7c02e8fce4866dc8e60d0ccff94356c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Jul 28 16:57:27 2010 +0200
619098 - take manufacturer from system group
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index 8355305..2a21930 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -610,7 +610,7 @@ def get_smbios():
'smbios.system.uuid': dmi_system_uuid(),
'smbios.bios.vendor': dmi_vendor(),
'smbios.system.serial': get_dmi_data('/dmidecode/SystemInfo/SerialNumber'),
- 'smbios.system.manufacturer': get_dmi_data('/dmidecode/BaseBoardInfo/Manufacturer'),
+ 'smbios.system.manufacturer': get_dmi_data('/dmidecode/SystemInfo/Manufacturer'),
'smbios.system.product': get_dmi_data('/dmidecode/SystemInfo/ProductName'),
'smbios.system.skunumber': get_dmi_data('/dmidecode/SystemInfo/SKUnumber'),
'smbios.system.family': get_dmi_data('/dmidecode/SystemInfo/Family'),
commit 423c570334069c44b737d2ecafca936823f202f4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Jul 28 10:36:06 2010 +0200
618267 - add missing import and foo
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index db077c6..0168c71 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -19,6 +19,7 @@ import urlparse
import rhnreg_constants
import hardware
from rhnPackageInfo import convertPackagesFromHashToList
+from types import ListType, TupleType, StringType, UnicodeType, DictType, DictionaryType
try:
from rhn import rpclib
@@ -438,7 +439,7 @@ def server_supports_eus():
def sendHardware(systemId, hardwareList):
s = rhnserver.RhnServer()
- s.registration.add_hw_profile(systemId, hardwareList)
+ s.registration.add_hw_profile(systemId, _encode_characters(hardwareList))
def sendPackages(systemId, packageList):
s = rhnserver.RhnServer()
13 years, 9 months
spacecmd/src
by aparsons
spacecmd/src/lib/report.py | 73 +++++++++++++++++++++++++++++++++++++++++++++
spacecmd/src/lib/system.py | 73 ---------------------------------------------
2 files changed, 73 insertions(+), 73 deletions(-)
New commits:
commit d75b83716eb5e89062920decec3ed42118edf7ab
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Wed Jul 28 09:46:18 2010 -0400
rename system_listduplicates to report_duplicates
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index 6f0320c..623c2b6 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -242,4 +242,77 @@ def do_report_kernels(self, args):
for system in sorted(report):
print '%s %s' % (system.ljust(system_max_size), report[system])
+####################
+
+def help_report_duplicates(self):
+ print 'report_duplicates: List duplicate system profiles'
+ print 'usage: report_duplicates'
+
+def do_report_duplicates(self, args):
+ dupes_by_ip = self.client.system.listDuplicatesByIp(self.session)
+ dupes_by_mac = self.client.system.listDuplicatesByMac(self.session)
+ dupes_by_hostname = \
+ self.client.system.listDuplicatesByHostname(self.session)
+
+ add_separator = False
+
+ dupes_by_profile = []
+ for system in self.get_system_names():
+ if self.get_system_names().count(system) > 1:
+ if system not in dupes_by_profile:
+ dupes_by_profile.append(system)
+
+ if len(dupes_by_profile):
+ add_separator = True
+
+ print 'Duplicate Profile Names'
+ print '-----------------------'
+ print '\n'.join(sorted(dupes_by_profile))
+
+ if self.check_api_version('10.11'):
+ if len(dupes_by_ip):
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ print 'Duplicate IP Addresses'
+ print '----------------------'
+
+ for item in dupes_by_ip:
+ print
+ print '%s:' % item.get('ip')
+
+ for system in sorted(item.get('systems'),
+ key=itemgetter('systemName')):
+ print system.get('systemName')
+
+ if len(dupes_by_mac):
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ print 'Duplicate MAC Addresses'
+ print '-----------------------'
+
+ for item in dupes_by_mac:
+ print
+ print '%s:' % item.get('mac').upper()
+
+ for system in sorted(item.get('systems'),
+ key=itemgetter('systemName')):
+ print system.get('systemName')
+
+ if len(dupes_by_hostname):
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ print 'Duplicate Hostnames'
+ print '-------------------'
+
+ for item in dupes_by_hostname:
+ print
+ print '%s:' % item.get('hostname')
+
+ for system in sorted(item.get('systems'),
+ key=itemgetter('systemName')):
+ print system.get('systemName')
+
# vim:ts=4:expandtab:
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 8a372c3..4d07060 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -143,79 +143,6 @@ def do_system_list(self, args, doreturn=False):
####################
-def help_system_listduplicates(self):
- print 'system_listduplicates: List duplicate system profiles'
- print 'usage: system_listduplicates'
-
-def do_system_listduplicates(self, args):
- dupes_by_ip = self.client.system.listDuplicatesByIp(self.session)
- dupes_by_mac = self.client.system.listDuplicatesByMac(self.session)
- dupes_by_hostname = \
- self.client.system.listDuplicatesByHostname(self.session)
-
- add_separator = False
-
- dupes_by_profile = []
- for system in self.get_system_names():
- if self.get_system_names().count(system) > 1:
- if system not in dupes_by_profile:
- dupes_by_profile.append(system)
-
- if len(dupes_by_profile):
- add_separator = True
-
- print 'Duplicate Profile Names'
- print '-----------------------'
- print '\n'.join(sorted(dupes_by_profile))
-
- if self.check_api_version('10.11'):
- if len(dupes_by_ip):
- if add_separator: print self.SEPARATOR
- add_separator = True
-
- print 'Duplicate IP Addresses'
- print '----------------------'
-
- for item in dupes_by_ip:
- print
- print '%s:' % item.get('ip')
-
- for system in sorted(item.get('systems'),
- key=itemgetter('systemName')):
- print system.get('systemName')
-
- if len(dupes_by_mac):
- if add_separator: print self.SEPARATOR
- add_separator = True
-
- print 'Duplicate MAC Addresses'
- print '-----------------------'
-
- for item in dupes_by_mac:
- print
- print '%s:' % item.get('mac').upper()
-
- for system in sorted(item.get('systems'),
- key=itemgetter('systemName')):
- print system.get('systemName')
-
- if len(dupes_by_hostname):
- if add_separator: print self.SEPARATOR
- add_separator = True
-
- print 'Duplicate Hostnames'
- print '-------------------'
-
- for item in dupes_by_hostname:
- print
- print '%s:' % item.get('hostname')
-
- for system in sorted(item.get('systems'),
- key=itemgetter('systemName')):
- print system.get('systemName')
-
-####################
-
def help_system_reboot(self):
print 'system_reboot: Reboot a system'
print 'usage: system_reboot <SYSTEMS>'
13 years, 9 months