pkg_dry on DragonFlyBSD

Antonio Huete Jimenez ahuete.devel at gmail.com
Thu Apr 30 17:58:15 PDT 2009


Hi,

The other day I heard about a new tool for handling pkgsrc binary 
packages called pkg_dry, so I decided to give it a try.
You can see the original post here:  
http://mail-index.netbsd.org/tech-pkg/2009/04/14/msg003070.html

There is a small set of steps to make it work on DFBSD. You will need 
libfetch (thanks joerg ;) and sqlite3 from pkgsrc.
I've attached a small patch that changes the paths for pkgtools 
(pkg_add, pkg_delete, pkg_info)

----
fetch http://imil.net/NetBSD/pkg_dry-20090414.tgz
tar xvzf pkg_dry-20090414.tgz
cd pkg_dry
patch -p1 < pkgdry_pkgtools.patch
bmake NOGCCERROR=1
Then you'll need to set PKG_PATH environment variable to one of our 
binary packages server, for example chlamydia so pkg_dry can grab 
pkg_summary and the binary packages. You'll also have to create manually 
the directory where pkg_dry DB and cache is stored.

setenv PKG_PATH 
http://chlamydia.fs.ei.tum.de/pub/DragonFly/packages/DragonFly-2.3.0/All/
mkdir -p /var/db/pkg_dry/cache

Ok, now you can sync the package list from the remote repo.
#./pkg_dry -u
For further information about the usage you can consult the main post of 
the utility in the URL I pasted above.

I've attached also a sample output with some basic tests I've done.

Regards,
Antonio Huete
--- b/actions.c	2009-04-17 15:18:33 +0200
+++ a/actions.c	2009-05-01 01:32:28 +0200
@@ -2,8 +2,8 @@
 
 #include "pkg_dry.h"
 
-#define PKG_DELETE "/usr/sbin/pkg_delete"
-#define PKG_ADD "/usr/sbin/pkg_add"
+#define PKG_DELETE "/usr/pkg/sbin/pkg_delete"
+#define PKG_ADD "/usr/pkg/sbin/pkg_add"
 
 #define LOCALBASE "/usr/pkg" /* see DISCLAIMER below */
 
--- b/pkg_dry.h	2009-04-17 14:24:12 +0200
+++ a/pkg_dry.h	2009-05-01 01:32:38 +0200
@@ -9,7 +9,7 @@
 #include "tools.h"
 #include "lib.h"
 
-#define PKGTOOLS "/usr/sbin"
+#define PKGTOOLS "/usr/pkg/sbin"
 #define PKG_SUMMARY "pkg_summary"
 #define PKG_DRY_LOG PKG_DRY_DB"/pkg_dry.log"
 #define PKG_DRY_CACHE PKG_DRY_DB"/cache"
vmware# ./pkg_dry -u
processing local summary...
updating database: 100%
downloading pkg_summary.bz2: 100%
processing remote summary...
updating database: 100%
vmware# ./pkg_dry -i screen
nothing to upgrade.
1 packages to be installed: screen-4.0.3nb2
proceed ? [y/N] y
downloading packages...
downloading screen-4.0.3nb2.tgz: 100%
installing packages...
pkg_add: Warning: package `/var/db/pkg_dry/cache/screen-4.0.3nb2.tgz' was
built for a different version of the OS:
pkg_add: DragonFly/i386 2.2 (pkg) vs. DragonFly/i386 2.3.0 (this host)
screen-4.0.3nb2: setting permissions on /usr/pkg/bin/screen-4.0.3 (o=root,
g=wheel, m=4511)
screen-4.0.3nb2: adding /usr/pkg/bin/screen to /etc/shells
screen-4.0.3nb2: registering info file /usr/pkg/info/screen.info

===========================================================================
$NetBSD: MESSAGE,v 1.5 2005/12/28 17:53:24 reed Exp $

You may want to create and edit the file:

        /usr/pkg/etc/screenrc

to customize screen globally. Example configuration files have been
installed to:

        /usr/pkg/share/examples/screen/screenrc
        /usr/pkg/share/examples/screen/etcscreenrc

===========================================================================

processing local summary...
updating database: 100%
vmware# ./pkg_dry -l screen |grep screen
screen-4.0.3nb2 / Multi-screen window manager
vmware# ./pkg_dry -r screen
1 packages to delete: screen
proceed ? [y/N] y
removing screen...
screen-4.0.3nb2: unregistering info file /usr/pkg/info/screen.info
screen-4.0.3nb2: removing /usr/pkg/bin/screen from /etc/shells
processing local summary...
updating database: 100%
vmware# ./pkg_dry -i clamav
warning: /usr/pkg/lib/libgmp.so.3.4.4 is not present in this system (may me
installed by this package)
warning: /usr/pkg/lib/libclamunrar_iface.so.5.0.4 is not present in this
system (may me installed by this package)
warning: /usr/pkg/lib/libclamunrar.so.5.0.4 is not present in this system
(may me installed by this package)
warning: /usr/pkg/lib/libclamav.so.5.0.4 is not present in this system (may
me installed by this package)
warning: /usr/pkg/lib/libgmp.so.3.4.4 is not present in this system (may me
installed by this package)
nothing to upgrade.
2 packages to be installed: gmp-4.2.4nb1 clamav-0.94.2
proceed ? [y/N] y
downloading packages...
downloading gmp-4.2.4nb1.tgz: 100%
downloading clamav-0.94.2.tgz: 100%
installing packages...
pkg_add: Warning: package `/var/db/pkg_dry/cache/gmp-4.2.4nb1.tgz' was
built for a different version of the OS:
pkg_add: DragonFly/i386 2.2 (pkg) vs. DragonFly/i386 2.3.0 (this host)
gmp-4.2.4nb1: registering info file /usr/pkg/info/gmp.info
pkg_add: Warning: package `/var/db/pkg_dry/cache/clamav-0.94.2.tgz' was
built for a different version of the OS:
pkg_add: DragonFly/i386 2.2 (pkg) vs. DragonFly/i386 2.3.0 (this host)
clamav-0.94.2: Creating group ``clamav''
clamav-0.94.2: Creating user ``clamav''
clamav-0.94.2: copying /usr/pkg/share/examples/clamav/daily.cvd to
/var/clamav/daily.cvd
clamav-0.94.2: copying /usr/pkg/share/examples/clamav/main.cvd to
/var/clamav/main.cvd
clamav-0.94.2: copying /usr/pkg/share/examples/clamav/clamd.conf to
/usr/pkg/etc/clamd.conf
clamav-0.94.2: copying /usr/pkg/share/examples/clamav/freshclam.conf to
/usr/pkg/etc/freshclam.conf
===========================================================================
The following files should be created for clamav-0.94.2:

        /etc/rc.d/freshclamd (m=0755)
            [/usr/pkg/share/examples/rc.d/freshclamd]

        /etc/rc.d/clamd (m=0755)
            [/usr/pkg/share/examples/rc.d/clamd]

===========================================================================

===========================================================================
$NetBSD: MESSAGE,v 1.3 2004/10/30 10:23:02 grant Exp $

You should update the virus databases to the latest ones available
before using ClamAV.  This can be done by running the following command
as `root' or `clamav':

        /usr/pkg/bin/freshclam

Note that as of version 0.80, clamav.conf has been replaced by
clamd.conf. Be sure to update your configuration to reflect this.

===========================================================================

processing local summary...
updating database: 100%
vmware# ./pkg_dry -r gmp
2 packages to delete: clamav-0.94.2 gmp
proceed ? [y/N] y
removing clamav-0.94.2...
===========================================================================
The following users are no longer being used by clamav-0.94.2,
and they can be removed if no other software is using them:

        clamav

===========================================================================
===========================================================================
The following groups are no longer being used by clamav-0.94.2,
and they can be removed if no other software is using them:

        clamav

===========================================================================
removing gmp...
gmp-4.2.4nb1: unregistering info file /usr/pkg/info/gmp.info
processing local summary...
updating database: 100%




More information about the Users mailing list