OpenBSD Journal

pkg update tools

Contributed by grey on from the christmas means it's time for new packets dept.

Matt Van Mater writes:

Just wanted to let everyone know that espie@ seems to be working on a package update tool. Someone had mentioned that he was already working on it, but I saw a commit on the 23rd here. that shows his first commit of this code.

A recent poll on obsdj showed that quite a few people were clamoring for more automated update tools, I thought they should know that he was working on it. FYI these are package update tools, not binary patches for the OS.

(Comments are closed)

  1. By Matt Van Mater ( on

    Not to be too nitpicky, but either mk/reverse and I submitted identical stories or this is a blurb that I submitted. Not sure if this is a problem with the submission forms, or if it was just an accident. or am i being given a new handle to use from now on rather than my name?:)

    1. By grey ( on

      D'oh, that's been corrected. The submissions process overwrites the submitted based upon the last person who edited the story, so that's what must've happened (I thought it was a bit odd that Michael wouldn't have posted his own story). Thanks for mentioning it, we do like to give credit where credit is due.

    2. By Michael Knudsen ( on

      Sorry, I didn't notice that when I did the initial editing. Normally it's more or less a routine task, but I was waiting for some more commits and just wanted to fix up a few things and didn't do it properly.

  2. By sand ( on

    WE WANT IT!! :)

  3. By Anonymous Coward ( on

    Nice, a thing that I was missing!

  4. By brad ( on

    There's been one availible for a long time, but its got a weird name i can never remember. openabache or somthing. provids an apt-get like interface for openbsd ports.

    1. By Matt Van Mater ( on

      It's called openbechde. The main difference here is espie's code will be part of the code distro and will be supported.

      openbechde web site

      1. By Marc Espie ( on

        Well, the first version of it is now in.
        It's called pkg_add -r, for now.

        What it does, very simply, is allow one person to replace a package with another one `safely'.
        It assumes the new package is going to conflict with the old one, and is using conflict information to figure out which package to kill.
        As for safety, pkg_add -r tries to run a large amount of checks before it commits to the update, like checking dependencies first, and extracting all files from the new package before updating.

        If you think about it, it is handling pkg updates like a race condition: there is a point where the old package is no longer there and the new package is not yet installed.
        If anything fails at that point, you're fucked, so let's try to make the window of vulnerability as small as possible.

        As mentionned in all my commit messages, this is completely experimental code for now, and not safe at all for production use.

        The point being, this work happens fairly early in the release cycle, so that we developers and beta-testers get a chance to polish it before the next release.

        Also note that pkg_add -r is the first stone in the update bridge.

        Namely, it's there to show that individual update operations can be made fairly safe. The actual pkg_update tool will happen later, and will do things on a grander scale, like figuring out by itself what to update to what...

        but for this to work out, pkg_add -r needs to be perfect, and to be tested.

        Simply put, just by having this mechanism available, we're going to figure out a lot of non-trivial consequences of updating operations.

        As usual, OpenBSD relies on evolution, not revolution....


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]