-
Notifications
You must be signed in to change notification settings - Fork 446
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
Treat symlinks as normal files in spec file #901
Treat symlinks as normal files in spec file #901
Conversation
Thanks 😊 I'll take a closer when I come home tomorrow |
cc @fsat can you take a look? Would be nice 😊 |
@dpennell I would first merge #895 and release this. Sorry for the short answer above, I'm not back from vacation and can look into this in more detail. @fsat implemented a great part of the initial relocation implementation, so it would be nice if he could validate your changes. Maybe he also tried this approach first, but didn't work out for him. From my perspective I like the implementation. For two reasons
|
I am certainly not an RPM expert. I based my solution on what appeared to be well informed advice (see comments in #836) to just treat symlinks as regular files (which they are). I definitely think this needs a serious review. I've tested on my centos VM and it is being used in our product (currently in QA). @muuki88 I think that this solution would remove the need for #895. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dpennell could you rebase this once more? I'll merge this as soon as the test a green.
I wasn't able to test this myself, but the implementation looks good to me.
val spec = IO.read(target / "rpm" / "SPECS" / "rpm-package.spec") | ||
out.log.success(spec) | ||
assert(spec contains "%attr(0644,root,root) /usr/share/rpm-package/lib/rpm-test.rpm-test-0.1.0.jar", "Wrong installation path\n" + spec) | ||
assert(spec contains "/usr/share/rpm-package/lib/hello.link", "Missing or incorrect symbolic link\n" + spec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong links appear in the spec like this?
Closing this for #916 as I can't update this PR. |
Symlinks are now treated like normal files in the spec. All of the special handling in the scriptlets has been removed. Symlinks are now handled properly by upgrades.