Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] How to set executable bit (chmod 755) on non-root files?

I'm wondering if anyone has experience in solving the subject problem?

On some platforms (hpux) we have an 'so' file that needs be be set executable. Its actually a "launcher companion" so needs to be set before Eclipse will start (i.e. can not be set in "metadata", but needs to be set as part of the zipped up product.

And ... it is in a plugin (a dir plugin, not jarred) ... it is not a "root file",  like the eclipse executable itself.

See bug 407433 [1] if interested.

At first, I hoped/assumed if it set executable "early on" (e.g. in the bundle's POM, with an ant task) that it would stay executable through out ... but ... permissions are not maintained. (Is that a bug? Or worth a feature request? -- I know it would not be "cross-platform", but ... we always build on Linux).

I've tried "faking it" as a root file, and using things like
root.hpux.gtk.ia64.permissions.755=eclipse,**/*.so
But that had no effect. (Well, the eclipse executable is set correctly, but not the so file).
And, BTW, we are using 0.18.0.SNAPSHOT, so should have wild card support implemented, according to bug 361204 [2].

So, now I am at the point of looking at the end of the process, right before packaging up the files. We are using
tycho-p2-director-plugin to "materialize-products" and "archive-products".
It appears the "maven assembler" has some flexible support for
<fileMode> but I've not seen anything like that in Tycho tasks. Am I missing it?

Honestly, at this point, I'd be happy to use maven-antrun-plugin to call chmod right before packaging, but I'm too much a novice to know
how to get that to execute at the right point in time (after "on disk", but before zipping up). Is there a special "phase" I could associate it with?

Next week, I'll be down to fixing it post-build, in bash scripts, so any advice on a more "maven like" solution is most welcome.

Thanks,


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=407433
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=361204
[3] http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html


Back to the top