Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

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

Closed
talios opened this issue Sep 26, 2017 · 5 comments
Closed

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

talios opened this issue Sep 26, 2017 · 5 comments

Comments

@talios
Copy link

talios commented Sep 26, 2017

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
Copy link
Author

talios commented Sep 27, 2017

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
Copy link
Contributor

ctron commented Sep 27, 2017

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

@talios
Copy link
Author

talios commented Sep 27, 2017

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
Copy link
Contributor

ctron commented Sep 28, 2017

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
Copy link
Contributor

ctron commented Sep 28, 2017

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

talios added a commit to SMX-LTD/packagedrone that referenced this issue Nov 14, 2017
This change replaces the existing means of setting a file as being
a configuration file, by exposing FileFlags modification to
SimpleFileInformationCustomizer. As part of this we also define the
full set of RPM file flags, using the naming from the upstream
RPM sources at https://github.com/rpm-software-management/rpm/blob/master/lib/rpmfiles.h

Existing behaviour is (currently) deprecated and adapted to use the
newer code.

Fixes eclipse-archived#113
talios added a commit to SMX-LTD/packagedrone that referenced this issue Nov 14, 2017
This change replaces the existing means of setting a file as being
a configuration file, by exposing FileFlags modification to
SimpleFileInformationCustomizer. As part of this we also define the
full set of RPM file flags, using the naming from the upstream
RPM sources at https://github.com/rpm-software-management/rpm/blob/master/lib/rpmfiles.h

Existing behaviour is (currently) deprecated and adapted to use the
newer code.

Fixes eclipse-archived#113

Signed-off-by: Mark Derricutt <mark.derricutt@smxemail.com>
talios added a commit to SMX-LTD/packagedrone that referenced this issue Nov 14, 2017
This change replaces the existing means of setting a file as being
a configuration file, by exposing FileFlags modification to
SimpleFileInformationCustomizer. As part of this we also define the
full set of RPM file flags, using the naming from the upstream
RPM sources at https://github.com/rpm-software-management/rpm/blob/master/lib/rpmfiles.h

Existing behaviour is (currently) deprecated and adapted to use the
newer code.

Fixes eclipse-archived#113

Signed-off-by: Mark Derricutt <mark.derricutt@smxemail.com>
talios added a commit to SMX-LTD/packagedrone that referenced this issue Nov 14, 2017
This change replaces the existing means of setting a file as being
a configuration file, by exposing FileFlags modification to
SimpleFileInformationCustomizer. As part of this we also define the
full set of RPM file flags, using the naming from the upstream
RPM sources at https://github.com/rpm-software-management/rpm/blob/master/lib/rpmfiles.h

Existing behaviour is (currently) deprecated and adapted to use the
newer code.

Fixes eclipse-archived#113

Signed-off-by: Mark Derricutt <mark.derricutt@smxemail.com>
@ctron ctron closed this as completed in 73a6095 Nov 15, 2017
ctron pushed a commit that referenced this issue Nov 15, 2017
This change replaces the existing means of setting a file as being
a configuration file, by exposing FileFlags modification to
SimpleFileInformationCustomizer. As part of this we also define the
full set of RPM file flags, using the naming from the upstream
RPM sources at https://github.com/rpm-software-management/rpm/blob/master/lib/rpmfiles.h

Existing behaviour is (currently) deprecated and adapted to use the
newer code.

Fixes #113

Signed-off-by: Mark Derricutt <mark.derricutt@smxemail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants