Community
Participate
Working Groups
Build Identifier: Eclipse 20100617-1415 (Helios), Buckminster 3.6 It seems that Buckminster fails to respect the custom config.ini of a product when generating P2 meta-data as part of its build: I've got a small problem with a custom config.ini that I wanna use for one of my products. In Eclipse, the corresponding product descriptor has "Use an existing config.ini file" set to the following file: osgi.console=true osgi.noShutdown=true eclipse.ignoreApp=true org.osgi.service.http.port=8080 org.eclipse.equinox.http.jetty.http.port=8080 When I export this product via the Eclipse product export wizard, the resulting config.ini will look like this: osgi.console=true eclipse.p2.profile=profile osgi.framework=file\:plugins/org.eclipse.osgi_3.6.0.v20100517.jar org.osgi.service.http.port=8080 osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1\:start org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info osgi.noShutdown=true eclipse.product=lu.kreios.mtg.server.product osgi.framework.extensions=reference\:file\:org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100614-r7608.jar osgi.bundles.defaultStartLevel=4 eclipse.p2.data.area=@config.dir/../p2 eclipse.application=lu.kreios.mtg.server.application org.eclipse.equinox.http.jetty.http.port=8080 eclipse.ignoreApp=true On the other hand, using Buckminster and a custom ANT action to trigger the product materialization will create a config.ini like this: eclipse.p2.profile=MyTravelGuideServerProfile osgi.framework=file\:plugins/org.eclipse.osgi_3.6.0.v20100517.jar osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1\:start org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info eclipse.product=lu.kreios.mtg.server.product osgi.framework.extensions=reference\:file\:org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100614-r7608.jar eclipse.p2.data.area=@config.dir/../p2 osgi.bundles.defaultStartLevel=4 eclipse.application=lu.kreios.mtg.server.application As it turns out, Buckminster seems to have simply ignore my custom config.ini entries when generating the underlying P2 meta-data. The corresponding snippet from content.xml WITHOUT Buckminster: <unit id="toolinglu.kreios.mtg.server.product.config.cocoa.macosx.x86_64" version="1.0.0" singleton="false"> <provides size="2"> <provided namespace="org.eclipse.equinox.p2.iu" name="toolinglu.kreios.mtg.server.product.config.cocoa.macosx.x86_64" version="1.0.0"/> <provided namespace="toolinglu.kreios.mtg.server.product" name="lu.kreios.mtg.server.product.config" version="1.0.0"/> </provides> <filter> (&(osgi.arch=x86_64)(osgi.os=macosx)(osgi.ws=cocoa)) </filter> <touchpoint id="org.eclipse.equinox.p2.osgi" version="1.0.0"/> <touchpointData size="1"> <instructions size="2"> <instruction key="unconfigure"> setProgramProperty(propName:eclipse.ignoreApp,propValue:);setProgramProperty(propName:org.eclipse.equinox.http.jetty.http.port,propValue:);setProgramProperty(propName:osgi.noShutdown,propValue:);setProgramProperty(propName:eclipse.application,propValue:);setProgramProperty(propName:osgi.console,propValue:);setProgramProperty(propName:eclipse.product,propValue:);setProgramProperty(propName:org.osgi.service.http.port,propValue:); </instruction> <instruction key="configure"> setProgramProperty(propName:eclipse.ignoreApp,propValue:true);setProgramProperty(propName:org.eclipse.equinox.http.jetty.http.port,propValue:8080);setProgramProperty(propName:osgi.noShutdown,propValue:true);setProgramProperty(propName:eclipse.application,propValue:lu.kreios.mtg.server.application);setProgramProperty(propName:osgi.console,propValue:true);setProgramProperty(propName:eclipse.product,propValue:lu.kreios.mtg.server.product);setProgramProperty(propName:org.osgi.service.http.port,propValue:8080); </instruction> </instructions> </touchpointData> </unit> The corresponding snippet from content.xml WITH Buckminster (note the lack of the additional setProgramProperty(..) declarations): <unit id="toolinglu.kreios.mtg.server.product.config.cocoa.macosx.x86_64" version="1.0.0" singleton="false"> <provides size="2"> <provided namespace="org.eclipse.equinox.p2.iu" name="toolinglu.kreios.mtg.server.product.config.cocoa.macosx.x86_64" version="1.0.0"/> <provided namespace="toolinglu.kreios.mtg.server.product" name="lu.kreios.mtg.server.product.config" version="1.0.0"/> </provides> <filter> (&(osgi.arch=x86_64)(osgi.os=macosx)(osgi.ws=cocoa)) </filter> <touchpoint id="org.eclipse.equinox.p2.osgi" version="1.0.0"/> <touchpointData size="1"> <instructions size="2"> <instruction key="unconfigure"> setProgramProperty(propName:eclipse.application,propValue:);setProgramProperty(propName:eclipse.product,propValue:); </instruction> <instruction key="configure"> setProgramProperty(propName:eclipse.application,propValue:lu.kreios.mtg.server.application);setProgramProperty(propName:eclipse.product,propValue:lu.kreios.mtg.server.product); </instruction> </instructions> </touchpointData> </unit> Workaround: Drop the custom config.ini and use the following META-INF/p2.inf file instead: instructions.configure = \ setProgramProperty(propName:osgi.console,propValue:true);\ setProgramProperty(propName:osgi.noShutdown,propValue:true);\ setProgramProperty(propName:eclipse.ignoreApp,propValue:true);\ setProgramProperty(propName:org.osgi.service.http.port,propValue:8080);\ setProgramProperty(propName:org.eclipse.equinox.http.jetty.http.port,propValue:8080); instructions.unconfigure = \ setProgramProperty(propName:osgi.console,propValue:);\ setProgramProperty(propName:osgi.noShutdown,propValue:);\ setProgramProperty(propName:eclipse.ignoreApp,propValue:);\ setProgramProperty(propName:org.osgi.service.http.port,propValue:);\ setProgramProperty(propName:org.eclipse.equinox.http.jetty.http.port,propValue:); instructions.configure.import = \ org.eclipse.equinox.p2.touchpoint.eclipse.setProgramProperty instructions.unconfigure.import = \ org.eclipse.equinox.p2.touchpoint.eclipse.setProgramProperty Reproducible: Always
Using a custom config.ini works for me and touchpoint instructions are generated as expected. How is your custom config.ini referenced? Are you using an absolute path?
Christian, any info on this one? I'm not able to reproduce the problem. Can you provide a sample project that fails?
Created attachment 176524 [details] Some minimal sample project demonstrating the problem I've attached some minimal sample project that I can use to reproduce the problem on my machine (MacOSX, Cocoa, x86_64, Helios). When using the PDE Product Export wizard, the relevant snippet from P2 content.xml will look like this: <unit id="toolingkreios.mail.product.product.config.cocoa.macosx.x86_64" version="1.0.0.201008131006" singleton="false"> <provides size="2"> <provided namespace="org.eclipse.equinox.p2.iu" name="toolingkreios.mail.product.product.config.cocoa.macosx.x86_64" version="1.0.0.201008131006"/> <provided namespace="toolingkreios.mail.product.product" name="kreios.mail.product.product.config" version="1.0.0.201008131006"/> </provides> <filter> (&(osgi.arch=x86_64)(osgi.os=macosx)(osgi.ws=cocoa)) </filter> <touchpoint id="org.eclipse.equinox.p2.osgi" version="1.0.0"/> <touchpointData size="1"> <instructions size="2"> <instruction key="unconfigure"> setProgramProperty(propName:eclipse.application,propValue:);setProgramProperty(propName:osgi.console,propValue:);setProgramProperty(propName:eclipse.product,propValue:);setProgramProperty(propName:eclipse.consoleLog,propValue:); </instruction> <instruction key="configure"> setProgramProperty(propName:eclipse.application,propValue:kreios.mail.product.application);setProgramProperty(propName:osgi.console,propValue:2222);setProgramProperty(propName:eclipse.product,propValue:kreios.mail.product.product);setProgramProperty(propName:eclipse.consoleLog,propValue:true); </instruction> </instructions> </touchpointData> </unit> Using the Buckminster "site.p2" action, it looks like this: <unit id="toolingkreios.mail.product.product.config.cocoa.macosx.x86_64" version="1.0.0.qualifier" singleton="false"> <provides size="2"> <provided namespace="org.eclipse.equinox.p2.iu" name="toolingkreios.mail.product.product.config.cocoa.macosx.x86_64" version="1.0.0.qualifier"/> <provided namespace="toolingkreios.mail.product.product" name="kreios.mail.product.product.config" version="1.0.0.qualifier"/> </provides> <filter> (&(osgi.arch=x86_64)(osgi.os=macosx)(osgi.ws=cocoa)) </filter> <touchpoint id="org.eclipse.equinox.p2.osgi" version="1.0.0"/> <touchpointData size="1"> <instructions size="2"> <instruction key="unconfigure"> setProgramProperty(propName:eclipse.application,propValue:);setProgramProperty(propName:eclipse.product,propValue:); </instruction> <instruction key="configure"> setProgramProperty(propName:eclipse.application,propValue:kreios.mail.product.application);setProgramProperty(propName:eclipse.product,propValue:kreios.mail.product.product); </instruction> </instructions> </touchpointData> </unit> Perhaps the problem is OS specific or due to the fact that the custom config.ini in question is sort of "incomplete" (still, why does it work with the product export wizard, then?)? Perhaps I'm just too damn stupid, dunno :-).
Hello, I can confirm that Buckminster 3.6 is ignoring the set config.ini file in the product definition. Is any solution in sight?
I think I may be having the same or a similar issue. I've got the same build targets and am on osgi.arch=x86_64 osgi.os=macosx osgi.ws=cocoa
The bug is still an issue as of Buckminster 3.6 as previous commenter mentioned. Attempted to change the path to: config.ini <plugin name>/config.ini /<plugin name>/config.ini <full path>/config.ini None of those options worked. Buckminster kept regenerating new files, ignoring the custom config.ini settings.
I experience the same problem. Has anyone got a solution for this ?
Could one common denominator be that we're all using OS X or are is anyone having this issue on other platforms?
(In reply to comment #8) > Could one common denominator be that we're all using OS X or are is anyone > having this issue on other platforms? I do not think so. For my case, the problem was present in all the following product builds: -win32 both 32 and 64 bit -macos 64 bit -linux both 32 and 64 bit
(In reply to comment #8) > Could one common denominator be that we're all using OS X or are is anyone > having this issue on other platforms? Building for win32 manifests the issue for me, not currently building to any other platforms.
For some further information on what I've tried to work round this issue, I've defined a feature that contains rootfile information. This feature supplies a path to a JRE to include which works as expected but I also include the following line in order to try get my custom config.ini picked up and used: root.folder.configuration=file:config.ini The custom config.ini is included at the root of the enclosing feature. Unfortunately, it is still not used in the product build which suggests that perhaps Buckminster is overwriting it at build time.
I encounter the same issue with Buckminster 4.2. Has anyone found a solution or workaround?
Ignore my comment, my case seems to be more like Bug 284732.
And yet, it does happen. Exactly as reported by Christian, although I'm using Buckminster 4.2. This bug is not platform specific, it can be reproduced both for win32 and macosx.
As a workaround, one can copy the custom config.ini, after calling the director. Buckminster itself makes use of this: https://github.com/eclipse/buckminster/blob/master/org.eclipse.buckminster.jnlp.p2.director.product/product.ant