Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghost entries #56

Closed
dranuhl opened this issue Nov 17, 2021 · 1 comment · Fixed by #58
Closed

ghost entries #56

dranuhl opened this issue Nov 17, 2021 · 1 comment · Fixed by #58
Labels

Comments

@dranuhl
Copy link
Contributor

dranuhl commented Nov 17, 2021

I would like to specify a ghost entry, but the plugin requires a file, directory or collect element to be specified for it anyway, which does not seem to make much sense to me.

For example:

  <entry>
    <name>/var/log/myapp.log</name>
    <ghost>true</ghost>
  </entry>

Yields:
[ERROR] Failed to execute goal de.dentrassi.maven:rpm:1.6.0:rpm (default) on project myapp: Exactly one of 'file', 'directory', 'linkTo' or 'collect' must be specified.

If adding a file element referring to a non-existing file to the above entry, will lead to the following trace:

    at org.eclipse.packager.rpm.build.RpmBuilder$1.addFile (RpmBuilder.java:1355)
    at de.dentrassi.rpm.builder.RpmMojo.fillFromEntryFile (RpmMojo.java:1118)
    at de.dentrassi.rpm.builder.RpmMojo.fillFromEntry (RpmMojo.java:1094)
    at de.dentrassi.rpm.builder.RpmMojo.fillPayload (RpmMojo.java:1063)
    at de.dentrassi.rpm.builder.RpmMojo.execute (RpmMojo.java:787)

Using collect element that does not find a file, will not lead to an error, but the produced RPM will not know about the ghost file either.
Using skip will not lead to an error in either case, but the produced RPM will not know about the ghost file either.

So it seems that currently the only way to refer to an existing empty file, which seems to be cumbersome and not intuitive.

@ctron
Copy link
Owner

ctron commented Nov 17, 2021

Yea, I think there is a bug :)

I think using file should work. However, currently I guess it complains about a missing file. Which it shouldn't.

I guess a solution would be to (in the case of ghost) ignore the fact that the file/directory doesn't exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants