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

RPM upgrade removes necessary binaries #14380

Closed
edwardsb opened this issue Oct 9, 2023 · 2 comments
Closed

RPM upgrade removes necessary binaries #14380

edwardsb opened this issue Oct 9, 2023 · 2 comments
Assignees
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Milestone

Comments

@edwardsb
Copy link
Contributor

edwardsb commented Oct 9, 2023

Fleet version: all versions (orbit)

Web browser and operating system: N/A


💥  Actual behavior

dnf -y install fleet-osquery-0:1.1.0-1.x86_64
In the log shows:
Package fleet-osquery.x86_64 0.0.13-1 will be upgraded
 Package fleet-osquery.x86_64 1.1.0-1 will be an upgrade
2023-09-15T08:51:49-0400 SUBDEBUG Upgrade: fleet-osquery-1.1.0-1.x86_64
2023-09-15T08:52:01-0400 INFO Removed /etc/systemd/system/multi-user.target.wants/orbit.service.
Created symlink /etc/systemd/system/multi-user.target.wants/orbit.service → /etc/systemd/system/orbit.service.
2023-09-15T08:52:01-0400 SUBDEBUG Upgraded: fleet-osquery-0.0.13-1.x86_64
2023-09-15T08:52:01-0400 INFO Removed /etc/systemd/system/multi-user.target.wants/orbit.service.

RPM upgrades remove necessary binaries on accident due to the follwing %postun script:

func writePostRemove(opt Options, path string) error {

🧑‍💻  Steps to reproduce

attempt to upgrade from one fleetd package to the next via dnf install

🕯️ More info (optional)

details about %postun here https://stackoverflow.com/questions/7398834/rpm-upgrade-uninstalls-the-rpm

and here https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/

Proposed solution

add conditional check on %postun script to only delete the files if the install is not an upgrade.

@edwardsb edwardsb added bug Something isn't working as documented :reproduce Involves documenting reproduction steps in the issue labels Oct 9, 2023
@edwardsb edwardsb self-assigned this Oct 9, 2023
@xpkoala xpkoala added #g-endpoint-ops Endpoint ops product group ~backend Backend-related issue. ~released bug This bug was found in a stable release. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. and removed :reproduce Involves documenting reproduction steps in the issue labels Oct 10, 2023
@xpkoala xpkoala added the ~critical bug This is a critical bug and may require a patch release. label Oct 10, 2023
@lucasmrod

This comment was marked as outdated.

@xpkoala xpkoala added :product Product Design department (shows up on 🦢 Drafting board) and removed ~critical bug This is a critical bug and may require a patch release. :product Product Design department (shows up on 🦢 Drafting board) labels Oct 17, 2023
@lucasmrod lucasmrod removed their assignment Oct 17, 2023
@lukeheath lukeheath added this to the 4.40.0-tentative milestone Oct 26, 2023
@fleet-release
Copy link
Contributor

Upgrade removes keys,
Adding a check restores peace,
Fleet's rhythm won't cease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

5 participants