-
Notifications
You must be signed in to change notification settings - Fork 48
Files copied to buildroot do not preserve symlinks #42
Comments
java copy does not preserve symlinks until java 7 this plugin also does not use any java 7 specifics either. So it is best to manage the sym link yourself via rpm-plugin configurations |
Thanks Dan, I will have a look and try it and report back. (I was just looking at source code of the version 2.1.4 and just ended up at the edit: i just noticed you may have deleted your comment to try 2.1.5-SNAPSHOT. |
😎 we need to fix up this plugin to support symlink which is possible now with minimal effort |
@Icedmang could you give 2.1.5-SNAPSHOT deployed at sonatype a try or build this https://github.com/dantran/rpm-maven-plugin I upgrade plexus-archiver to get symlink support. |
@dantran 2.1.5-SNAPSHOT from Sonatype seems to work! (It took me a bit to get our Nexus configured properly and my I did notice an Exception in the output but I'm unsure of the impact (yet): |
@Icedmang about the exception, I dont see it at my maven 3.3.3 java 8 production build what do you have? |
@Icedmang did you test your RPM? |
@dantran I am using the following:
Then I tried using
Note that I am using the I get the same result for either Maven version 3.0.5 or 3.3.3 - the DEBUG message with the stack trace shows up. It will not show up without the I am currently testing my packaged RPM and will report back |
There does not appear to be anything functionally different in the e.g.
While I don't think this is a significant problem, I'm curious as to why the files are different while packaging the RPM |
Glad it works out ( somewhat). I can't explain what you see. Must have something do with the rpmbuild during packaging |
I'm going to close this issue as it addresses my original question. Thank you so much for your help on this. You were very quick and responsive! I'm looking forward to an official 2.1.5 release :) |
@Icedmang please help test 2.1.5 staged at https://oss.sonatype.org/content/groups/staging |
@dantran Absolutely. I will report back in a few hours. |
@dantran I am building the RPM now with version 2.1.5 from Staging. In the meantime, regarding the file size differences I mentioned earlier, I think it's related to what's described on this page Is there a way through the plugin to include the following in the spec file? I could not find it |
try defineStatements. here is mine
|
@dantran Version 2.1.5 of rpm-maven-plugin works as expected. It still has different file sizes which I believe is due to reason I mentioned above and requiring the <defineStatements>
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
</defineStatements> |
maybe you can set it at your ~/.rpmrc ? |
@dantran I apologize, I was wrong to state that it wouldn't work in the defineStatement as you mentioned. I decided I should actually test it and you're right, it works as you said. Mine looks like: <defineStatements>
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
<defineStatement>__os_install_post %{nil}</defineStatement>
</defineStatements> I didn't want to include it in the What should we do next so 2.1.5 is promoted from Staging to a Release? |
nice, glad it works out. I need to announce a vote by tonight at mojohaus dev, it takes 3 days for the vote to pass |
Thanks again, @dantran |
Symlink support is added in mojohaus/rpm-maven-plugin#42.
…7999) * Symlink from /opt/<component>/var/log to /var/log/<component>. These symlinks are deprecated with the intent of removing them in ATC 9.0.0. * Update rpm-maven-plugin to 2.2.0 to get symlink support Symlink support is added in mojohaus/rpm-maven-plugin#42.
We have a number of files checked into an SVN repository that contain symbolic links to x86_64 binaries. We are trying to package up these symbolic links as part of the package but the symbolic links are replaced with the actual contents of the files with the name of the symbolic link.
The CI biuld is done through Jenkins and I've confirmed the files are checked out of SVN as symbolic links, however, during the copy to tmp-buildroot, it appears the symbolic links are lost in this process.
[INFO] Copying files to /home/jenkins/jenkins/workspace/test/target/rpm/test/tmp-buildroot/opt/test
I can't find any information on this topic and whether or not there is an option to preserve symbolic links except for the parameter, but I don't want to recreate the symbolic links through configuration, I would like to package them as-is.
The text was updated successfully, but these errors were encountered: