Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upusing rpm_safe_upgrade correctly? #25
Comments
yuzaipiaofei
added
the
help wanted
label
Jul 7, 2017
This comment has been minimized.
This comment has been minimized.
|
--rpm_safe-upgrade prevents the uninstallation of the driver in case a package with the same version-release is reinstalled. |
This comment has been minimized.
This comment has been minimized.
|
You can refer to dkms package policy. |
This comment has been minimized.
This comment has been minimized.
|
If you do not have any more questions about this .i would like to close this case in this week. |
This comment has been minimized.
This comment has been minimized.
|
Hi, Sorry, I don't see any content at http://agile.us.dell.com/Agile. The dkms man page says this about rpm_safe_upgrade:
So it's not just intended for uninstallation protection during reinstallation of the same version-release, it's specifically called out as the right thing to do when the module-version hasn't changed, but the release has. What I've been finding in that circumstance is that the %post script for the new package is run, The current behavior of It seems like for dkms to work as advertised with rpm_safe_upgrade, it should write out the rpm_safe_upgrade file before exiting due to module-version match, like in the patch I'm attaching here. Thanks, |
This comment has been minimized.
This comment has been minimized.
|
I cloned my own dkms repo and made a branch to make it easier to see the change, which you can find here. Thanks! |
This comment has been minimized.
This comment has been minimized.
|
Hello, have you had a chance to look at this patch? I still believe that Thanks, |
This comment has been minimized.
This comment has been minimized.
|
I confirm the fix is needed when using I have the following package installed:
With this content in the
Then I roll out a patch for the
Basically my modules will not have a patch, which is not the intended behaviour. |
This comment has been minimized.
This comment has been minimized.
|
As a side note to this, wouldn't be clean and less complicated to just use these in the
You basically got the same result without extra code and extra options. |
This comment has been minimized.
This comment has been minimized.
|
@yuzaipiaofei @bitness what do you think? I'm in favor of entirely removing the |
scaronni
self-assigned this
Jan 24, 2018
scaronni
added
bug
and removed
help wanted
labels
Jan 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Hi Simone, After testing the setup you suggest for getting rid of But what if, instead, we put the dkms add, build, and install commands into |
This comment has been minimized.
This comment has been minimized.
marmarek
commented
Jun 5, 2019
|
Any chance for merging #44 (or alternative fix)? I'm seeing this issue too. There is also another (similar) issue - the check on "remove" action isn't done, if no kernel is installed - for example in chroot build environment. But that's a minor issue and easy to workaround - simply install some kernel package. |
bitness commentedJun 13, 2017
Hello,
I have an RPM that uses dkms with --rpm_safe_upgrade in its %post and %preun sections, and it uses them essentially the same way as in dkms's sample.spec:
As far as I can tell, though, this doesn't work when upgrading from one release of the package to the next, without the module version changing.
dkms addwith--rpm_safe_upgradeexits out with a complaint that the module version is already added, but it exits before writing the rpm_safe_upgrade lock file. Whendkms removeis called later in the%preun section, it sees no lock file and so uninstalls the module.Shouldn't add_module() write the rpm_safe_upgrade lock file before exiting due to an existing module with the same version? I hacked my /usr/sbin/dkms to do this and it all worked as expected.
Thanks!
-lars