LWN.net Logo

GUADEC: Work in the pipeline for GNOME

GUADEC: Work in the pipeline for GNOME

Posted Aug 24, 2012 17:13 UTC (Fri) by jengelh (subscriber, #33263)
Parent article: GUADEC: Work in the pipeline for GNOME

>boot into a pre-regression OS until a fix is available. Such an option is impossible with traditional packages like those used in RPM and Debian systems, he said, because they rely heavily on the version numbers assigned to packages — and the definition that version numbers must strictly increase over time

Why do they have to strictly increase? What about rpm --install --oldpackage gtk-2.0...rpm?


(Log in to post comments)

GUADEC: Work in the pipeline for GNOME

Posted Aug 24, 2012 18:01 UTC (Fri) by walters (subscriber, #7396) [Link]

Oh, there are many possible workarounds. "yum" does have "distro-sync". Debian's apt has "pinning", and will downgrade. But both of them by default look for upgrades. And the default is very influential on the architecture of the entire system.

For example, in Fedora's Koji, packages that aren't tagged as being part of some "release" are subject to garbage collection. So if GTK+ regressed, you might find that the previous package had already vanished from the build server/archive mirrors, so you can't even download it.

And what's more important - there's no sane mechanism to push a revert on the build server side, unless you resort to Epoch or ~really. And Epoch has serious drawbacks - for a package like gtk+, we'd have to go and reflect the Epoch bump in every other package using gtk3-devel. That's extreme pain.

More realistically of course, what you would do is cherry-pick a "git revert" of the breakage. But at that point - you're lying about the Version field. You're fighting the system.

The combination of OSTree and the gnome-ostree build system fixes this in two separate ways:

1) You always by default have at least the previous OS you booted into before deploying a new update. In fact, on my laptop, I have hundreds of individual GNOME build snapshots stored in /ostree. And each build points to the exact git repositories and revisions that built it. So I could fork off what I have locally at any time.

You'd be amazed at just how much more pleasant it is to follow Free Software development when you have a "go back to what worked" button locally. In fact - you have two separate undo buttons. OSTree doesn't affect at all whatever distribution you have installed. So you can just reboot back into that too.

2) On the gnome-ostree side, I can pick the git revision of any module I want at any time. And I have used this power several times so far to keep things working while we decide what to do.

It's hard to describe just how powerful this is. For example, I could decide one day to switch the entire tree to KDE. You'd do a pull, and it wouldn't affect your running system at all; there's nothing equivalent to RPM/dpkg deleting files underneath GNOME while it's running. You just download the delta, then deploy a new root, and reboot into it. The next day, I could switch back. And you would basically only download 64 bytes of checksum pointing to the original GNOME tree, and switch back.

GUADEC: Work in the pipeline for GNOME

Posted Aug 24, 2012 18:38 UTC (Fri) by walters (subscriber, #7396) [Link]

Do note though the current gnome-ostree build is actually broken for a few reasons =) I don't actually run it myself because I need to finish making /etc work. However, to see it log into GDM and show gnome-shell at least, you can download this revision.

GUADEC: Work in the pipeline for GNOME

Posted Aug 24, 2012 22:01 UTC (Fri) by daglwn (subscriber, #65432) [Link]

This is a really neat idea. I'm not clear on how OSTree uses git, however. Are you updating cloned workareas from many upstream source repositories and then rebuilding into a new root filesystem or are you keeping a global "every file in the filesystem" image. That is, are you storing binaries in git?

GUADEC: Work in the pipeline for GNOME

Posted Aug 25, 2012 16:53 UTC (Sat) by walters (subscriber, #7396) [Link]

There's bits of documentation on how things work:

https://live.gnome.org/OSTree/VCS
https://live.gnome.org/OSTree/Ostbuild
http://git.gnome.org/browse/ostree/tree/src/libostree/REA...

And these are all derived from my original README file which is here:
http://git.gnome.org/browse/ostree/tree/README.md

I've been trying to move that last one into individual wiki pages, but it's probably the best overview from a "hacker" perspective still.

GUADEC: Work in the pipeline for GNOME

Posted Aug 25, 2012 0:55 UTC (Sat) by jengelh (subscriber, #33263) [Link]

>both of them by default look for upgrades

Of course they will — they have no other means. However, "upgrade" is a misnomer, it should really be called "preferred version".

Developers tag their packages such that a tool can decide which among two is more preferred. If gtk-2.27 somehow is more preferred than gtk-2.28 due to a bug, you, as a {upstream and/or distro-level} developer, have to indicate the preference to the tool, *somehow*. Whether that happens by means of Epoch prefixes, amount of lolcats shipped alongside the package, or manual intervention by the end-user (pinning), the choice is irrelevant.

And ostree, the way you describe it, looks a lot like pinning by the end-user. A local "master" branch in a git clone is similarly pinned — you have to manually run pull/merge to change it.

GUADEC: Work in the pipeline for GNOME

Posted Aug 25, 2012 16:42 UTC (Sat) by walters (subscriber, #7396) [Link]

Mmm...there are two fundamental differences versus a user pinning packages on their own machine.

1) You always have the previous working system to boot into. If NetworkManager breaks, you may set up a pin locally for the old version, but that doesn't do you a lot of good if you don't have networking to download it =)

2) The release manager has the option to push arbitrary versions at any time - the closest analogy I can think of would be if someone made a Debian package containing pins. Say it was like "known-good-versions.deb", that dropped a file into /etc/apt.conf.d/known-good-versions.conf.

Basically I think reverting back to older known good versions should be a nearly-constant operation in the development tree. It should be easy for both users and release managers.

If you look at how Mozilla makes Firefox, they "back out" changesets often. Just run "git log --grep=Back" in mozilla-central. Here's an example.

GUADEC: Work in the pipeline for GNOME

Posted Aug 28, 2012 20:13 UTC (Tue) by guillemj (subscriber, #49706) [Link]

> 1) You always have the previous working system to boot into. If NetworkManager breaks, you may set up a pin locally for the old version, but that doesn't do you a lot of good if you don't have networking to download it =)

That's why front-ends like apt store previously downloaded packages and keep them in a cache on disk (I'm guessing yum might behave in a similar way).

> 2) The release manager has the option to push arbitrary versions at any time - the closest analogy I can think of would be if someone made a Debian package containing pins. Say it was like "known-good-versions.deb", that dropped a file into /etc/apt.conf.d/known-good-versions.conf.

In Debian, this role is taken by the testing distribution.

> Basically I think reverting back to older known good versions should be a nearly-constant operation in the development tree. It should be easy for both users and release managers.

Sure, but that does not really require downgrading, one can always prepare a new package that backs out a specific change, in the same way you'd do with a project on a git repository, going always forward (like your mozilla example). It does require someone to bisect the problematic code though, but that needs to be done anyway at some point. Either that or the user can revert to a previous local version.

GUADEC: Work in the pipeline for GNOME

Posted Aug 25, 2012 6:40 UTC (Sat) by scottt (subscriber, #5028) [Link]

> And Epoch has serious drawbacks - for a package like gtk+, we'd have to go and reflect the Epoch bump in every other package using gtk3-devel.

Why would this be required? Because a bug in the gtk3-devel headers requires a recompile of everything built against it? (but surely that's rare)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds