-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
rpm %postun scriptlet fails #958
Comments
Mildly interesting related side note: The releases folders do not contain the |
Thanks for reporting. Really not sure where to look at. I will leave it open and see if someone has any info |
I'm late to the party with this bug, but if anybody could tell me where to get the SRPM, I'd be glad to help test the RPM and fix the spec file. I've only built a few thousand RPMs over the years. I can see the Source RPM in the metadata but no way to get to it. Perhaps it would be helpful if the spec file were included in the GIT code repo somewhere.
|
Hi @storm9c1 , apologies for the delay. Here some info. We use electron-builder to generate our packages. Here info on how it works and what configuration allows: Here is the command used https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/package.json#L30 and the only options I can see we apply are in here https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/package.json#L96 In theory it supports all fpm client options... but I have no experience with it. https://fpm.readthedocs.io/en/latest/cli-reference.html Does this help? Hopefully is just a wee option missing in there. Thanks a lot in advance and do reach out if you got any questions and/or if you find anything. We extremely appreciate any help we can get! |
Hi @IsmaelMartinez, I'm old school, I still design all RPMs by hand, I know, that's sooooo 2010. So I am not very familiar with fpm. I'll try to learn it (in my copious amounts of free time). It definitely seems like an interesting tool to learn for some of my upcoming work. Let me dig through the doc links you provided first. Normally RPM needs little or no command line options to do its build work. The rpm .spec file and macros essentially control everything. . OK, I've skimmed the docs, right now it's not clear to me where electron builder is getting it's "afterInstall" string. Which I assume generates the %post install portion of the RPM? Do we maintain that post install script in the repo or is the electron builder fully providing this? If so, then this may be entirely an electron builder issue. |
it might be worth looking at the issues in there https://github.com/electron-userland/electron-builder/issues surely someone had this issue before us. I can see this open issue electron-userland/electron-builder#7326 that might just be the issue behind this? |
Yeah, I think you are on to something. The Electron bug does talk about scriptlet ordering between DEB and RPM. That's definitely a thing. I've solved this a few different ways. I'll try and see if I can dig deeper and contribute if I can. |
Did you manage to look into this @storm9c1 / anyone? |
OP here. I didn't notice when it changed, but at least as of
|
I assume then this is fixed. It would have been a electron-build update that probably brought the fix. Thanks for reporting and checking! |
I am so sorry. Apparently I didn't read far enough in the logs. Package upgrades do set alternatives correctly, but the cleanup script for the prior version still throws the same errors.
As noted earlier, this is an issue with Electron. Sorry for the confusion. |
Describe the bug
Upgrading or re-installing the rpm produces the following messages:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It's expected that routine rpm updates would not produce errors
Desktop (please complete the following information):
Additional context
The postuninstall scriptlet is
and the problem is in the
update-alternatives
command. The last parameter should be the path to the binary (/opt/teams-for-linux/teams-for-linux
) rather than the path to the alternatives link (/usr/bin/teams-for-linux
). That is, the command should be:But this seems problematic, as it runs after the install. It should include a check to see that
/usr/bin/teams-for-linux
doesn't resolve to an executable ([ -e /usr/bin/teams-for-linux ]
). Otherwise it will remove the perfectly valid, just-installed link.Finally, in the course of writing this up, I'm starting to wonder if this is a problem with Electron rather than something in
teams-for-linux
itself. If nothing else, at least this documents it.The text was updated successfully, but these errors were encountered: