Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Posted Aug 29, 2016 17:17 UTC (Mon) by tao (subscriber, #17563)In reply to: Böck: Multiple vulnerabilities in RPM – and a rant by SEJeff
Parent article: Böck: Multiple vulnerabilities in RPM – and a rant
I guess you might end up in such situations if you do stuff like forcing installation, installing packages from other distributions manually using dpkg, or something, but other than that things have worked well. Admittedly I've only used Debian since Hamm.
Posted Aug 30, 2016 7:30 UTC (Tue)
by nhippi (subscriber, #34640)
[Link] (7 responses)
I've certainly had postinst/postrm scripts leave packages in terrible state, where the only recourse is to edit an exit 0 to scripts under /var/lib/dpkg/info. Sometime due to my own packaging mistakes, sometimes because using unstable. But in less used packages these errors do slip to released packages too. The major failing case is when upstream changes configuration file format and maintainer tries to write a conversion script from old format to new. Maintainer scripts are a major tripwire without an easy recovery path. And one of the reasons I wouldn't recommend distributing third party software in .deb files. It would be less painful if there was a built-in rollback mechanism...
Posted Aug 30, 2016 13:36 UTC (Tue)
by imMute (guest, #96323)
[Link] (6 responses)
I work at a place where we use debian jessie in a commercial product. I implemented automatic rollbacks by using btrfs snapshots and a wrapper script around apt that ties in to systemd's system-upgrade.target. If the script detects that apt failed for any reason, it rolls back to the snapshot it made at the beginning of the upgrade run. It's an offline upgrade, so two reboots are necessary to go through the process, but it's pretty darn failsafe.
I think part of the reason that getting something like that built in to apt is going to be hard is because everyone wants to do it slightly differently. Does /home get rolled back too? What about logs? Should it depend on what is mounted where? If it does, which mounts get rolled back? Are updates does online or offline? What determines when old snapshots are cleared out? There are plenty of other design decisions that would go into such a feature and there is no One True Answer to them, so a successful product would have to address all of them. :(
It's got some warts but those are mainly due to my inexperience with these kinds of things - I encourage anyone who wants this kind of a system to try to implement it themselves, it's fairly simple to understand in the grand scheme of things.
Posted Aug 30, 2016 13:58 UTC (Tue)
by tao (subscriber, #17563)
[Link] (4 responses)
Logs shouldn't be rolled back (you need to be able to see *why* a rollback was done).
The rest of your questions make sense though.
Posted Aug 30, 2016 16:17 UTC (Tue)
by juliank (guest, #45896)
[Link] (3 responses)
Posted Aug 30, 2016 18:11 UTC (Tue)
by tao (subscriber, #17563)
[Link] (2 responses)
Posted Aug 30, 2016 19:06 UTC (Tue)
by farnz (subscriber, #17727)
[Link]
So if I supply my third party software to you as Debian packages, where should it go? The obvious location is /opt with dependencies on system packages to provide my runtime environment, but you seem to be saying that my choice of package file format affects the acceptable install locations...
Posted Aug 30, 2016 19:07 UTC (Tue)
by juliank (guest, #45896)
[Link]
You can also look at the FHS: The directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for the local system administrator; packages installing to /opt must install to /opt/<package> or /opt/<provider>.
So, if you want to, you could exclude /opt/{bin,doc,include,info,lib,man} from a rollback as those are reserved for local use, but not the <package> or <provider> subdirectories (practically anything else).
[1] the less package managers on one system, the better
Posted Aug 30, 2016 16:09 UTC (Tue)
by niner (subscriber, #26151)
[Link]
That's the nice thing about being behind other distros. You can copy their solutions without having to make the same mistakes in the beginning.
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
Böck: Multiple vulnerabilities in RPM – and a rant
https://en.opensuse.org/openSUSE:Snapper_Tutorial
