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

/usr/local contents removed after updates #206

Closed
cmarcelo opened this issue Sep 19, 2018 · 18 comments
Closed

/usr/local contents removed after updates #206

cmarcelo opened this issue Sep 19, 2018 · 18 comments

Comments

@cmarcelo
Copy link

I've seen this happen now and then, after performing update manually and rebooting the machine.

Last update was from X to 25080. X is some release from the previous days (Sep 18 or Sep 17).

@phmccarty
Copy link
Contributor

@cmarcelo I've run into this issue, too, but I think it's related to reboot, not update. I have seen my /usr/local/bin content get wiped as well, but only after a reboot.

@ahkok
Copy link
Contributor

ahkok commented Sep 19, 2018

I tried several things, reboot, update, verify fix --picky, but the files under /usr/local that I have remain on the system.

@ahkok ahkok added the bug label Sep 20, 2018
@miguelinux
Copy link

miguelinux commented Sep 25, 2018 via email

@cmarcelo
Copy link
Author

cmarcelo commented Oct 8, 2018

I haven't done nothing special between the update and reboot (just closing emacs and mutt processes). The files in question are in /usr/local/bin/ (the directory bin itself it's also removed).

For the record: got it again when updating this Monday (I rebooted just after the update).

@cmarcelo
Copy link
Author

cmarcelo commented Oct 8, 2018

OK. At least for this last instance, I know what might have happened:

.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin
.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin/kata-collect-data.sh
.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin/kata-runtime

Sometime in the past we mistakenly shipped extra stuff in /usr/local, and now we are deleting it.

@cmarcelo
Copy link
Author

cmarcelo commented Oct 8, 2018

$ swupd-inspector cat clear/25470 Manifest.full | grep /usr/local
D...	6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e	25440	/usr/local
.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin
.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin/kata-collect-data.sh
.d..	0000000000000000000000000000000000000000000000000000000000000000	25440	/usr/local/bin/kata-runtime
D...	6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e	25440	/usr/local/share

@ahkok
Copy link
Contributor

ahkok commented Oct 8, 2018

looks like 25080 and 25440 both had these files.

We should be able to reproduce this, then, and, of course, if this is actually the cause of other files being deleted, that needs to be fixed.

@ahkok
Copy link
Contributor

ahkok commented Oct 8, 2018

@clearlinux/swupd-team

@cmarcelo
Copy link
Author

cmarcelo commented Oct 8, 2018

These files are in containers-virt bundle, so it seems everytime that bundle gets update, we get the issue. That would explain why the issue only happens "now and then".

@ahkok
Copy link
Contributor

ahkok commented Oct 8, 2018

And not for me - I never had that bundle installed.

@fenrus75
Copy link
Contributor

fenrus75 commented Oct 8, 2018 via email

@cmarcelo
Copy link
Author

cmarcelo commented Oct 8, 2018

Reproduction steps follow, 25440 will bring a new version of the deleted file.

# swupd-extract clear/25430 containers-virt
# mkdir output/usr/local/bin
# touch output/usr/local/bin/hello
# swupd update --statedir $PWD/swupd-state --path output -m 25440 --no-scripts --no-boot-update
# file output/usr/local/bin/hello

Both hello and the bin directory will be missing after the update. You can use the swupd client for the first step too, just fix the update call accordingly.

@phmccarty
Copy link
Contributor

@cmarcelo I think this is a mixer bug... The deleted file versions should not be updated as part of a minversion bump, ever. I will file a bug.

@phmccarty
Copy link
Contributor

Bug filed: clearlinux/mixer-tools#455

@cmarcelo
Copy link
Author

cmarcelo commented Oct 9, 2018

@phmccarty thanks for filing that. The mixer issue you raise aggravates this issue. But I think it is possible the issue could've occurred at the first version the file was deleted (no minversions involved).

Regardless of that, Clear Linux currently has a content bug: we shouldn't be shipping anything to /usr/local, and not marking anything as deleted.

@phmccarty
Copy link
Contributor

@cmarcelo Yes, it would have happened for the first version at which the file was deleted, too. You're right.

@phmccarty
Copy link
Contributor

The mixer considerations for /usr/local are currently tracked at clearlinux/mixer-tools#548. Please follow up on that issue if there are any missing details.

I am tracking this issue as a bug in the common developer tooling, as it should check generated RPMs for blacklisted paths, and exit with an error in this case. The location of the blacklist should also be made configurable.

@phmccarty
Copy link
Contributor

I decided to open a new feature request for clearlinux/common instead. See clearlinux/common#11

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants