DragonFly BSD
DragonFly kernel List (threaded) for 2006-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: pkgsrc packaging of base?

From: Oliver Fromme <check+iuivk400rsm59cg3@xxxxxxxxxx>
Date: 11 Feb 2006 13:34:41 GMT

Simon 'corecode' Schubert <corecode@xxxxxxxxxxxx> wrote:
 > Erik P. Skaalerud wrote:
 > > I'm not saying that it's extremely difficult to patch sourcecode and 
 > > recompile, I'm just stating that it should not be the only choice when 
 > > we could have a much easier system for performing the task (like apt).

I think that makes sense.

 > yes, i concur.  it would be really nice to be able to update a system 
 > via the binary route.  what i don't like is the thought that base needs 
 > to be severely restructured to fit this.
 > so how about somebody proposing an actual method?  i got something in 
 > my mind, but way too vague, and i got little time as well...

Actually, it is already possible to perform binary updates
(I've done that with FreeBSD), but it requires a lot of
manual work.  There are installable FreeBSD snapshots
available via FTP, so you can download the "base/base.??"
files and use e.g. "cat base.?? | tar xzf - usr/bin/gzip"
to extract a new gzip binary from it.  Of course, that's
awkward and error-prone, and you should know exactly what
you're doing ...  Not something for the typical user who
is not a developer or expert.

However, it might be possible to automate that process,
make it safer and easier to use.  Fresh binaries could be
provided on a server (FTP or HTTP) along with signatures
for verification.  A simple tool looks at the nearest
server, downloads a list of updated files suitable for
the currently installed version of DragonFly, and compares
the list with files installed on the local system.  Any
files that require updating are then downloaded (after
asking the user -- I think an update should not happen
without the user being aware of it).  The tool also auto-
matically checks if any new libraries are required by the
new binaries, or other kinds of dependencies.

The files that get replaced should be backuped somewhere
(/var/backups comes to mind), so it is easily possible to
revert to the previous files if there are problems after
the update.

The ident(1) tool can be used to check the current version
of binaries, libraries and other files (or rather, from
which revisions of source files they have been built).
Imagine the following conversation:

<user> My /bin/sh coredumps.
<developer> What version does "ident /bin/sh | grep jobs.c" say?
<user> It says 2005/11/06.
<developer> You need to run "dfly-update /bin/sh" to get
<user> Now it works!  Thanks!

How's that?  It might even be possible to provide a default
cronjob (or weekly periodic script) which runs dfly-update
automatically, e.g. by writing "update_enable=YES" in
rc.conf or something similar.

That's just an idea off the top of my head, but maybe it
can be refined into a workable solution.

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd

Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]