eclipse-archived / packagedrone

Eclipse Package Drone
http://eclipse.org/package-drone
Eclipse Public License 1.0
66 stars 39 forks source link

Add support for %config(missingok) and %config(noreplace) #113

Closed talios closed 6 years ago

talios commented 7 years ago

Currently org.eclipse.packagedrone.utils.rpm.FileFlags only includes a setting for CONFIGURATION.

It would good to include CONFIGURATION_MISSING_OK and CONFIGURATION_NO_REPLACE support as well.

I believe I can get around this currently by calling addFile(String targetName, Path sourcePath, int mode, Instant mtime, Consumer<RpmBuilder.FileEntry> customizer) via reflection, since the customizer can call setFlags directly on the FileEntry ( using 0.14.1 ).

talios commented 7 years ago

Looking at https://github.com/rpm-software-management/rpm/blob/79ca74e15e15c1d91a9a31a9ee90abc91736f390/lib/rpmfiles.h#L50 - adding support for all the file attributes might be useful.

ctron commented 7 years ago

I completely agree. Could you make a PR for that?

talios commented 7 years ago

I can look at that - will need to setup an account and sign the CLA first. The changes would also be updating more than just the flags tho ( since access to FileFlags is encapsulated ).

Currently however - how does one simply build the project? Running mvn clean install using the pom.xml in the repository fails to build with missing P2 repositories:


org.eclipse.equinox.p2.core.ProvisionException: No repository found at file:////Users/amrk/temp/packagedrone/bundles
``

Is there a way of bootstrapping P2 repositories/build? I see it's declared in the pom as `file:///${basedir}/../../runtime/target/repository`...
ctron commented 7 years ago

That would be awesome! I will amend the README.md file providing a bit more information how to build this from the command line.

ctron commented 7 years ago

Ok, I did add a bit of information. Let me know if I can help you.