Re: [Spacewalk-devel] Deployment of images built with SUSE Studio

2012-03-27 Thread Christian Berendt
Hi Johannes.

> We recently added a feature to our branch of Spacewalk that enables users to
> deploy images that were built with SUSE Studio [1] to registered virtual host
> systems.

Will this feature be committed to the upstream or will it only be
available in the SUSE branch?

Bye, Christian.

-- 
Christian Berendt
Solution Architect
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] implementation of the action "system reboot"

2011-11-01 Thread Christian Berendt

Hello together.

At the moment it's possible to reboot a system using the web interface 
or the XMLRPC API. It doesn't matter if there are other actions 
scheduled for a system at the same time (or a few minutes before and 
after), you can schedule a system reboot every time.


After the system picked up the system reboot action it runs a "shutdown 
-r 3" (or something similar), the reboot will start (hopefully) after 3 
minutes. The action in the event schedule is "completed" after 
scheduling the system reboot on the registered system.


(Maybe "completed" is "succeeded" in the web interface? I'm not sure and 
don't have a Spacewalk installation with me.)


There are several problems with this implementation and I hope we can 
find some solutions together.


1.
task:
Schedule a package deployment at 22:00 and a system reboot at 22:01.

problem:
After starting the package deployment the system reboot starts, the 
action is probably not completed when the system goes down, the package 
deployment action failed.


solution?:
It should not be possible to schedule a system reboot if there are 
running actions on a system.


or: If there is a scheduled system reboot and there is a running action 
on the system after the system picked up the system reboot action the 
system reboot should not start.


Maybe we should introduce two parameters for a system reboot action: 
"force system reboot" (this will reboot a system even if there is a 
running action) and "delay system reboot n times for m minutes" (this 
will delay the reboot for m minutes if there is a running action on the 
system, but only n times, after n times the system reboot action is 
"failed"). If you not force a system reboot it will not happen if there 
are running actions on the system.


2.
task:
Schedule a system reboot at 22:00 and a package deployment at 22:01.

problem:
After starting the system reboot the systems picks up the next action, 
the package deployment action, and starts installing packages.
Because there is a running system reboot the package deployment action 
will fail a few minutes later, the package deployment action failed.


solution?:
It should not be possible to schedule new actions after scheduling a 
system reboot action (system is locked and gets unlocked after the 
succeeded system reboot?).
If there are already scheduled actions they 1) should be cancelled or 2) 
they should be delayed.


3.
task:
Schedule a system reboot at 22:00.

problem:
The system picks up the action and starts the system reboot, the action 
in the event schedule is now "completed". But the system reboot will 
fail a few minutes later, because I will detach the power.


solution?:
I'm not sure about that. There has to be some logic on a registered 
system. I think it's necessary that Spacewalk can determine the correct 
status of a system reboot.


An other example: At the moment it's possible to cancel the system 
reboot on the system (shutdown -c). The action in the event schedule is 
"completed" but the system reboot will never happen.


Bye, Christian.

--
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] moving zypp-plugin-spacewalk to spacewalk code base

2011-10-31 Thread Christian Berendt
Hello together.

The yum-rhn-plugin lives in the Spacewalk GIT repository in client/rhel.

The zypp-plugin-spacewalk lives in the OpenSUSE GIT repository on
github.com (https://github.com/openSUSE/zypp-plugin-spacewalk).

I would prefer it if the code from github moves to the official
spacewalk git repository, for example to client/sles or client/suse.

Why lives the zypp-plugin-spacewalk code in an external repository at
the moment?

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



signature.asc
Description: OpenPGP digital signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] process for introducing new features

2011-10-31 Thread Christian Berendt
Hello together.

What's your process for introducing new features? Do I have to fill out
some kind of document before submitting a new feature? Do I have to
disucss a new feature first on this maillinglist? Do I have to provide
some kind of architecture document?

With a new feature I mean something more complex than adding a new field
in a dialog. For example "defining custom system informations for system
groups, software channels, configuration channels and organizations"
would be a new feature in my understanding.

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



signature.asc
Description: OpenPGP digital signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] added methods to frontend xmlrpc api to handle pings using osa

2011-10-29 Thread Christian Berendt
system.sendOsaPing:
send a ping using to a system using osa (like "Ping System" in the webinterface)

system.getOsaPing:
get details about the status of a system, the time of the last received 
response and the time of the last sent ping (like "OSA Status" in the 
webinterface)

Signed-off-by: Christian Berendt 
---
 .../rhn/frontend/xmlrpc/system/SystemHandler.java  |   66 
 1 files changed, 66 insertions(+), 0 deletions(-)

diff --git 
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java 
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index 8ddfc3d..f8d12a4 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -4939,4 +4939,70 @@ public class SystemHandler extends BaseHandler {
 ServerFactory.removeTagFromSnapshot(server.getId(), tag);
 return 1;
 }
+
+/**
+ * send a ping to a system using OSA
+ * @param sessionKey the session key
+ * @param serverId server id
+ * @return 1 on success, exception thrown otherwise.
+ *
+ * @xmlrpc.doc send a ping to a system using OSA
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param("int", "serverId")
+ * @xmlrpc.returntype #return_int_success()
+ */
+public int sendOsaPing(String sessionKey, Integer serverId) {
+User loggedInUser = getLoggedInUser(sessionKey);
+Server server = lookupServer(loggedInUser, serverId);
+server.getPushClient().setLastPingTime(new 
Date(System.currentTimeMillis()));
+server.getPushClient().setNextActionTime(null);
+SystemManager.storeServer(server);
+return 1;
+}
+
+/**
+ * get details about a ping sent to a system using OSA
+ * @param sessionKey the session key
+ * @param serverId server id
+ * @return details about a ping sent to a system using OSA
+ *
+ * @xmlrpc.doc get details about a ping sent to a system using OSA
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param("int", "serverId")
+ * @xmlrpc.returntype
+ *  #struct("osaPing")
+ *  #prop_desc("String" "state" "state of the system (unknown, 
online, offline)")
+ *  #prop_desc("dateTime.iso8601" "lastMessageTime" "time of the 
last received response (1970/01/01 00:00:00 if never received a response)")
+ *  #prop_desc("dateTime.iso8601" "lastPingTime" "time of the last 
sent ping (1970/01/01 00:00:00 if no ping is pending")
+ *  #struct_end()
+ */
+public Map getOsaPing(String sessionKey, Integer serverId) {
+User loggedInUser = getLoggedInUser(sessionKey);
+Server server = lookupServer(loggedInUser, serverId);
+Map m = new HashMap();
+if(server.getPushClient() != null) {
+if(server.getPushClient().getState().getName() == null) {
+m.put("state", "unknown");
+} else {
+m.put("state", server.getPushClient().getState().getName());
+}
+
+if(server.getPushClient().getLastMessageTime() == null) {
+m.put("lastMessageTime", new Date(0));
+} else {
+m.put("lastMessageTime", 
server.getPushClient().getLastMessageTime());
+}
+
+if(server.getPushClient().getLastPingTime() == null) {
+m.put("lastPingTime", new Date(0));
+} else {
+m.put("lastPingTime", 
server.getPushClient().getLastPingTime());
+}
+} else {
+m.put("state", "unknown");
+m.put("lastMessageTime", new Date(0));
+m.put("lastPingTime", new Date(0));
+}
+return m;
+}
 }
-- 
1.7.1

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] python-hwdata missing in nightly-client repository?

2011-10-29 Thread Christian Berendt
Hello Jan.

> Both python-hwdata and jabberpy packages are available in EPEL 6.
> We try not to duplicate packages that can be installed from
> well-maintained repositories.

I prefer the way to have one consistent repository without any external
dependencies. At the moment I have to sync a software channel against
the spacewalk-client repository and afterward I have to push
additional packages from EPEL. It's often not possible to use the
full EPEL repository on productive RHEL systems.

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] python-hwdata missing in nightly-client repository?

2011-10-29 Thread Christian Berendt
Similar for the osad package from nightly client, there is jabberpy
missing on RHEL6.

Error: Package: osad-5.10.24-1.el6.noarch
(spacewalk-client-nightly-rhel6-x86_64) Requires: jabberpy

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] python-hwdata missing in nightly-client repository?

2011-10-29 Thread Christian Berendt
Hello together.

After registering a RHEL6 system to a Spacewalk nightly installation
(using a bootstrap script, the Spacewalk Client channel is assigned
during activation) I got the following error:

Error: Package: rhn-client-tools-1.6.28-1.el6.noarch
(spacewalk-client-nightly-rhel6-x86_64) Requires: python-hwdata

The software channel spacewalk-client-nightly-rhel6-x86_64 includes the
repository
http://spacewalk.redhat.com/yum/nightly-client/RHEL/6/x86_64/.

Why is python-hwdata not available in the nightly-client repository?
It's not included in the 1.5 client repository, too.

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] introducing name for scripts in kickstart profiles in the webinterface

2011-10-29 Thread Christian Berendt

Signed-off-by: Christian Berendt 
---
 .../common/db/datasource/xml/General_queries.xml   |2 +-
 .../rhn/domain/kickstart/KickstartScript.hbm.xml   |1 +
 .../rhn/domain/kickstart/KickstartScript.java  |   18 ++
 .../domain/kickstart/builder/KickstartBuilder.java |2 +-
 .../kickstart/BaseKickstartScriptAction.java   |6 +-
 .../rhn/frontend/dto/kickstart/ScriptDto.java  |   17 +
 .../frontend/strings/jsp/StringResource_en_US.xml  |   14 ++
 .../kickstart/BaseKickstartScriptCommand.java  |   20 +++-
 .../kickstart/test/KickstartScriptCommandTest.java |4 ++--
 .../WEB-INF/pages/kickstart/script-form.jspf   |8 
 .../WEB-INF/pages/kickstart/scriptdelete.jsp   |8 
 .../webapp/WEB-INF/pages/kickstart/scripts.jsp |3 +++
 java/code/webapp/WEB-INF/struts-config.xml |1 +
 .../spacewalk/common/tables/rhnKickstartScript.sql |3 ++-
 ...01-add_rhnKickstartScript_scriptname.sql.oracle |1 +
 ...dd_rhnKickstartScript_scriptname.sql.postgresql |2 ++
 16 files changed, 103 insertions(+), 7 deletions(-)
 create mode 100644 
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/101-add_rhnKickstartScript_scriptname.sql.oracle
 create mode 100644 
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/101-add_rhnKickstartScript_scriptname.sql.postgresql

diff --git 
a/java/code/src/com/redhat/rhn/common/db/datasource/xml/General_queries.xml 
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/General_queries.xml
index 6f6be26..4af6f3d 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/General_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/General_queries.xml
@@ -64,7 +64,7 @@ ORDER BY KS.label, KS.id
 
 
   
-  SELECT KS.id, KS.script_type, KS.chroot, KS.interpreter
+  SELECT KS.id, KS.script_type, KS.chroot, KS.interpreter, KS.scriptname
 FROM rhnKickstartScript KS
   WHERE KS.kickstart_id = :kickstart_id
   
diff --git 
a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.hbm.xml 
b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.hbm.xml
index 9e495c5..2b144db 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.hbm.xml
@@ -16,6 +16,7 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 
 
 
+
 
 
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.java 
b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.java
index 9bee435..e6c9e53 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartScript.java
@@ -32,6 +32,7 @@ public class KickstartScript implements 
Comparable {
 private String scriptType;
 private String chroot;
 private String interpreter;
+private String scriptname;
 private byte[] data;
 private Date created;
 private Date modified;
@@ -48,6 +49,22 @@ public class KickstartScript implements 
Comparable {
 }
 
 /**
+ * Getter for scriptname
+ * @return String to get
+*/
+public String getScriptname() {
+return this.scriptname;
+}
+
+/**
+ * Setter for scriptname
+ * @param scriptnameIn to set
+*/
+public void setScriptname(String scriptnameIn) {
+this.scriptname = scriptnameIn;
+}
+
+/**
  * Getter for id
  * @return Long to get
 */
@@ -214,6 +231,7 @@ public class KickstartScript implements 
Comparable {
 public KickstartScript deepCopy(KickstartData ksDataIn) {
 KickstartScript cloned = new KickstartScript();
 cloned.setChroot(this.getChroot());
+cloned.setScriptname(this.getScriptname());
 cloned.setData(this.getData());
 cloned.setInterpreter(this.getInterpreter());
 cloned.setKsdata(ksDataIn);
diff --git 
a/java/code/src/com/redhat/rhn/domain/kickstart/builder/KickstartBuilder.java 
b/java/code/src/com/redhat/rhn/domain/kickstart/builder/KickstartBuilder.java
index b92155e..b5f7721 100644
--- 
a/java/code/src/com/redhat/rhn/domain/kickstart/builder/KickstartBuilder.java
+++ 
b/java/code/src/com/redhat/rhn/domain/kickstart/builder/KickstartBuilder.java
@@ -328,7 +328,7 @@ public class KickstartBuilder {
 type = KickstartScript.TYPE_POST;
 }
 
-scriptCommand.setScript(interpreter, buf.toString(), type, chroot, 
false);
+scriptCommand.setScript(interpreter, buf.toString(), type, chroot, 
false, null);
 scriptCommand.store();
 
 }
diff --git 
a/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java
 
b/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java
index ba54031..fca01ac 100644
--- 
a/java/code/src/

[Spacewalk-devel] introducing name for scripts in kickstart profiles in the webinterface

2011-10-29 Thread Christian Berendt
Hello together.

At the moment it's not possible to give scripts
(/rhn/kickstart/Scripts.do) in kickstart profiles a name. The only way
to identify a script is the position of the script in reference to the
other scripts. If you have a lot of different kickstart profiles using
a lot of kickstart scripts it's uncomfortable to find the script you
want to modify.

I simply added a new column "scriptname" (varchar2(40), can be null) to
the table "rhnKickstartScript" and added it to a few dialogs in the
webinterface. Now it's possible to set an optional name for a kickstart
script and it should be easier to identify a specific script.

Please take a look on my patch (I will send it in a few minutes,
[PATCH] introducing name for scripts in kickstart profiles in the
webinterface) and give me some feedback. It's my first patch changing
code in Spacewalk and I'm not sure about doing it all the right way.

Next step is expanding the XMLRPC methods, but I want first clarify if
everything is fine with this patch.

Btw. I found a note in the wiki
(https://fedorahosted.org/spacewalk/wiki/ChangingSchema) that I should
ask for a unit test database to run the added database upgrade
statements included in my patch against.

Bye, Christian.

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [solved] Re: ant create-webapp-dir failed: Could not create task or type of type: for.

2011-10-27 Thread Christian Berendt
Hi Tomas.

> create-webapp-dir is no longer maintained.

My entry point was
"https://fedorahosted.org/spacewalk/wiki/DevelopmentWorkstationSetup";.
If the document is deprecated somebody should rework it.

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



signature.asc
Description: OpenPGP digital signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH 1/2] ant task "all" in java/ failed on RHEL5.7 with error "package org.apache.xml.utils does not exist".

2011-10-26 Thread Christian Berendt
after adding "xalan-j2" to the property "build.jar.dependencies" (in file 
java/buildconf/build-props.xml) the ant task "all" in java/ is working fine.

do-compile-main:
[javac] Compiling 2605 source files to 
/home/berendt/spacewalk/java/build/classes
[javac] 
/home/berendt/spacewalk/java/code/src/com/redhat/rhn/common/util/StringUtil.java:24:
 package org.apache.xml.utils does not exist
[javac] import org.apache.xml.utils.XMLChar;
[javac]^
[javac] 
/home/berendt/spacewalk/java/code/src/com/redhat/rhn/common/util/StringUtil.java:799:
 cannot find symbol
[javac] symbol  : variable XMLChar
[javac] location: class com.redhat.rhn.common.util.StringUtil
[javac] if (!XMLChar.isValid(string.charAt(i))) {
[javac]  ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors

Signed-off-by: Christian Berendt 
---
 java/buildconf/build-props.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/buildconf/build-props.xml b/java/buildconf/build-props.xml
index 03cfc8e..5b81131 100644
--- a/java/buildconf/build-props.xml
+++ b/java/buildconf/build-props.xml
@@ -80,7 +80,7 @@
   
+   concurrent xalan-j2" />
 
   https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [PATCH 2/2] ant task "create-webapp-dir" in java/ failed on RHEL5.7 with error "Could not create task or type of type: for.".

2011-10-26 Thread Christian Berendt
After installing the RPM package ant-contrib (ant-contrib-1.0-0.10.b2.el5) and 
adding a task definition for "for" to "java/buildconf/build-taskdefs.xml" the 
ant task "create-webapp-dir" in java/ is working fine.

To only install the RPM package "ant-contrib" is not enough.

create-webapp-dir:
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/META-INF
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/WEB-INF/lib
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/apidoc

BUILD FAILED
/home/berendt/spacewalk/java/buildconf/build-webapp.xml:43: Could not create 
task or type of type: for.

Ant could not find the task or a class this task relies upon.

Signed-off-by: Christian Berendt 
---
 java/buildconf/build-taskdefs.xml |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/java/buildconf/build-taskdefs.xml 
b/java/buildconf/build-taskdefs.xml
index bca9305..a4d16b5 100644
--- a/java/buildconf/build-taskdefs.xml
+++ b/java/buildconf/build-taskdefs.xml
@@ -35,6 +35,8 @@
 
 
+
+
 
 
 
-- 
1.7.4.1

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [solved] Re: ant create-webapp-dir failed: Could not create task or type of type: for.

2011-10-26 Thread Christian Berendt
Hello together.

Problem was a missing task definition for "for" in
java/buildconf/build-taskdefs.xml. I submitted a patch.

Bye, Christian.

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



signature.asc
Description: OpenPGP digital signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] ant create-webapp-dir failed: Could not create task or type of type: for.

2011-10-25 Thread Christian Berendt
Hello together.

I'm trying to setup a development system on top of RHEL5.7. The first
step of your documentation in the wiki (DevelopmentWorkstationSetup),
the ant all, is now working fine (I had several problems on top of
RHEL6.1 and finally I switchted back to RHEL5.7, trying RHEL6.1 again in
the future).

Trying to run "ant create-webapp-dir" failed with an error (take a look
at the end of the mail).

I tried to resolve the error for the moment without success. Maybe
someone of you has already stumbled over this error earlier and can support?

Thanks, Christian.


I tried to resolve the problem this way:

ant-contrib-1.0.jar was symlinked from java/lib to java/build/build-lib.
So I think that JAR file is not missing at all.

In net/sf/antcontrib/antcontrib.properties (included in
ant-contrib-1.0.jar) I found:

---snip---
# Tasks Requiring Ant 1.6 or higher
#for=net.sf.antcontrib.logic.For
---snap---

Uncommenting this entry and updating the JAR file in
$HOME/.ivy/.../ant-contrib/ant-contrib-1.0.jar doesn't resolve the error.

I also checked /usr/share/java/ant/ant-contrib-1.0.jar (included in
ant-contrib-1.0-0.10.b2.el5), there is the same properties file like in
the package provided by Ivy.

Next try was to modify java/buildconf/build-taskdefs.xml.

I changed

---snip---

---snap---

to (found the hint here: https://sites.google.com/site/llmfei/ant-for-task)

---snip---

  

  

---snap---

The behaviour ist after the change the same like before.




This is the error message:

create-webapp-dir:
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/META-INF
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/WEB-INF/lib
[mkdir] Created dir: /home/berendt/spacewalk/java/rhnwebapp/apidoc

BUILD FAILED
/home/berendt/spacewalk/java/buildconf/build-webapp.xml:43: Could not
create task or type of type: for.

Ant could not find the task or a class this task relies upon.
[...]
at
org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:493)
at 
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:391)
at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
at org.apache.tools.ant.Task.perform(Task.java:363)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

-- 
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



signature.asc
Description: OpenPGP digital signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel