Re: fetch package dependencies
Hi! On Mon, Feb 02, 2009 at 08:00:21PM +0100, Marc Espie wrote: On Mon, Feb 02, 2009 at 02:02:59PM +0100, Hannah Schroeter wrote: On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B|ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? I'd think using a net connected box, setting PKG_CACHE and PKG_PATH and then pkg_add -n package_you_want. The required packages should end up in the PKG_CACHE directory. From there you should be able to transfer them over to the eeepc. If the soekris isn't current, you could try this in a chroot environment or a virtual machine (e.g. qemu) setup. Yep, that's the intent. PKG_CACHE + pkg_add -n will do it. There's perhaps one thing we've missed: If some dependency package is already installed (and current enough) on the source host, pkg_add -n will probably not refetch it, so it will end up missing in the PKG_CACHE, i.e. on the destination host. The playing with the signature trick will avoid that, probably. Or perhaps one would need another option to pkg_add (or a different, pkg_fetch or similar, frontend to the pkg_* toolchain) to fetch *all* dependency packages. Kind regards, Hannah.
Re: fetch package dependencies
On Tue, Feb 03, 2009 at 05:57:39PM +0100, Hannah Schroeter wrote: Hi! On Mon, Feb 02, 2009 at 08:00:21PM +0100, Marc Espie wrote: On Mon, Feb 02, 2009 at 02:02:59PM +0100, Hannah Schroeter wrote: On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B|ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? I'd think using a net connected box, setting PKG_CACHE and PKG_PATH and then pkg_add -n package_you_want. The required packages should end up in the PKG_CACHE directory. From there you should be able to transfer them over to the eeepc. If the soekris isn't current, you could try this in a chroot environment or a virtual machine (e.g. qemu) setup. Yep, that's the intent. PKG_CACHE + pkg_add -n will do it. There's perhaps one thing we've missed: If some dependency package is already installed (and current enough) on the source host, pkg_add -n will probably not refetch it, so it will end up missing in the PKG_CACHE, i.e. on the destination host. The playing with the signature trick will avoid that, probably. Or perhaps one would need another option to pkg_add (or a different, pkg_fetch or similar, frontend to the pkg_* toolchain) to fetch *all* dependency packages. Nope, you can easily tell pkg_add to look elsewhere for installed packages, first starting with a pseudo-virgin install: use PKG_DBDIR. The simple use case is the one where you install one box on the net, then want to duplicate: you simply set PKG_CACHE before the install, and then... it works. With -current, you can also use pkg_create after the installation to recreate all the binary packages from the installed files (older pkg_add did not keep DEINSTALL scripts, this is no longer an issue at all). Something like for i in /var/db/pkg/*/+CONTENTS do pkg_create -f $i done should recreate all your installed packages.
Re: fetch package dependencies
On Mon, 2 Feb 2009, BadMagic wrote: On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B?ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Set the PKG_PATH env variable. Then, if a particular package can't be found, the directories in the PKG_PATH are searched. That way, you can stick the ftp server in there and if the package isn't installed already or in a local dir, it'll fetch it from the ftp site. You can stick it in your ~/.bashrc, ~/.cshrc whatever. It's colon delimited and each dir/path needs to be terminated with a '/' like: export PKG_PATH=./:/packages/:ftp://ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/ Hope this helps. No, this won't help. Dorian stated clearly that there is no network connection available on the host he will install the packages on. He could use the output of make print-run-depends for each port he would like to install and fetch those packages. But this would require another computer with -current and an installed ports tree. Not an option if I read the OP correctly. Kind regards, Markus
Re: fetch package dependencies
On Mon, Feb 02, 2009 at 02:02:59PM +0100, Hannah Schroeter wrote: Hi! On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B|ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? I'd think using a net connected box, setting PKG_CACHE and PKG_PATH and then pkg_add -n package_you_want. The required packages should end up in the PKG_CACHE directory. From there you should be able to transfer them over to the eeepc. If the soekris isn't current, you could try this in a chroot environment or a virtual machine (e.g. qemu) setup. Yep, that's the intent. PKG_CACHE + pkg_add -n will do it. As far as shared libs go, there's nothing wrong with adding the new shared libs in your soekris /usr/lib: grab base*.tgz xbase*tgz, untar just the *.so.* thingies, and put them in /usr/lib...
Re: fetch package dependencies
On Mon, Feb 02, 2009 at 02:28:57PM -0500, Ted Unangst wrote: On Mon, Feb 2, 2009 at 2:00 PM, Marc Espie es...@nerim.net wrote: As far as shared libs go, there's nothing wrong with adding the new shared libs in your soekris /usr/lib: grab base*.tgz xbase*tgz, untar just the *.so.* thingies, and put them in /usr/lib... I'd be very cautious doing this, as it makes it easier to install or upgrade a package from the wrong version, which may not work due to a kernel mismatch. True... Well, that's one current limitation of pkg_add I should be able to tweak (have a flag to say it to not care when it doesn't find system libraries, especially for this purpose).
Re: fetch package dependencies
Hi! On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B|ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? I'd think using a net connected box, setting PKG_CACHE and PKG_PATH and then pkg_add -n package_you_want. The required packages should end up in the PKG_CACHE directory. From there you should be able to transfer them over to the eeepc. If the soekris isn't current, you could try this in a chroot environment or a virtual machine (e.g. qemu) setup. Thanks, Dorian Kind regards, Hannah.
Re: fetch package dependencies
Hi Dorian, Dorian Buettner wrote on Sun, Feb 01, 2009 at 02:01:03PM +0100: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? Commands like schwa...@gini $ uname -a OpenBSD gini.usta.de 4.4 GENERIC#107 i386 schwa...@gini $ pkg_info -S ftp://ftp.fu-berlin.de/unix/ \ OpenBSD/4.2/packages/alpha/mozilla-firefox-2.0.0.6.tgz [...] Signature: mozilla-firefox-2.0.0.6,X11.10.0,Xau.9.0,Xcursor.4.0, Xdmcp.9.0,Xext.10.0,Xfixes.5.0,Xft.7.0,Xi.10.0,Xinerama.5.0, Xrandr.6.0,Xrender.5.0,Xt.10.0,atk-1.0.1809.1,c.41.0,cairo.7.0, esound-0.2.34p0v0,expat.8.0,fontconfig.5.1,freetype.14.0, gdk-x11-2.0.1000.13,gdk_pixbuf-2.0.1000.13,gettext-0.14.6p0, glib-2.0.1200.12,glitz.2.0,gmodule-2.0.1200.12,gobject-2.0.1200.12, gtk+2-2.10.13,gtk-x11-2.0.1000.13,iconv.4.0,intl.3.0,jpeg.62.0, libiconv-1.9.2p3,m.2.3,nspr-4.6.7,nspr4.19.0,nss-3.11.7,nss3.20.0, pango-1.0.1300.1,pangocairo-1.0.1300.1,pangoft2-1.0.1300.1, pangox-1.0.1300.1,plc4.19.0,plds4.19.0,png.5.2,pthread.8.0, smime3.20.0,softokn3.20.0,ssl3.20.0,stdc++.42.0,z.4.1 often happen to work cross-platform and cross-release. From the signature, you can extract the dependencies in order to fetch them via ftp. This is easily scriptable; when parsing the signature, split at commas and discard everything not containing a dash. That way, - The machine having net access need not be the same arch as the target. - The machine having net access need not be the same release as the target. - You need not install any ports tree anywhere. - You get all (recursive) deps with one command. - For finding the dependencies, pkg_info does not even need to download full packages, but just the beginning of the package. Of course, caching with pkg_add -n would be even more convenient. In fact, i'm currently running a patched version of pkg_add allowing pkg_add -nn with roughly the following semantics: - like pkg_add -n, don't change the system - do resolve dependencies, download and cache all required packages - but do not attempt even a fake extract and install stage This sounds easier to implement than it is, being somewhat at odds with the general logic of Marc's pkg tools. Consequently, my patches are very ugly and definitely need a lot of cleaning up before showing them to anybody. Besides, i didn't look at cross-arch download yet. Yours, Ingo P.S. What the heck are you going to do with firefox on a box lacking network access?
Re: fetch package dependencies
On Monday 02 February 2009 13:02:59 Hannah Schroeter wrote: Hi! On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B|ttner wrote: is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? I'd think using a net connected box, setting PKG_CACHE and PKG_PATH and then pkg_add -n package_you_want. The required packages should end up in the PKG_CACHE directory. From there you should be able to transfer them over to the eeepc. If the soekris isn't current, you could try this in a chroot environment or a virtual machine (e.g. qemu) setup. Thanks, Dorian Kind regards, Hannah. Thanks, I'll look out for something to usb-connect to the network then. Regards, Dorian
Re: fetch package dependencies
On Mon, Feb 2, 2009 at 4:44 PM, Ingo Schwarze schwa...@usta.de wrote: P.S. What the heck are you going to do with firefox on a box lacking network access? off the top of my head: operative phrase possibly being right now, it can be a real annoyance to have to wait until net access is available and then install all of firefox before using it. or to read documentation or other reports generated locally. or because not all nets are the internet. there's no counting the number of times i've used a computer without a decent browser and wished it had one, but i've never used a computer that had firefox installed where i regretted that fact and wished it hadn't. putting it on a machine even if you can't anticipate a need for it is a good idea.
Re: fetch package dependencies
On Mon, Feb 2, 2009 at 2:00 PM, Marc Espie es...@nerim.net wrote: As far as shared libs go, there's nothing wrong with adding the new shared libs in your soekris /usr/lib: grab base*.tgz xbase*tgz, untar just the *.so.* thingies, and put them in /usr/lib... I'd be very cautious doing this, as it makes it easier to install or upgrade a package from the wrong version, which may not work due to a kernel mismatch.
Re: fetch package dependencies
Ted Unangst schrieb am Mon, Feb 02, 2009 at 05:16:42PM -0500: On Mon, Feb 2, 2009 at 4:44 PM, Ingo Schwarze schwa...@usta.de wrote: P.S. What the heck are you going to do with firefox on a box lacking network access? off the top of my head: operative phrase possibly being right now, it can be a real annoyance to have to wait until net access is available and then install all of firefox before using it. or to read documentation or other reports generated locally. or because not all nets are the internet. there's no counting the number of times i've used a computer without a decent browser and wished it had one, but i've never used a computer that had firefox installed where i regretted that fact and wished it hadn't. putting it on a machine even if you can't anticipate a need for it is a good idea. You are probably right, there seem to be several good reasons. Either way, may P.S. wasn't meant to insult the OP, sorry if it felt like that; Dorian definitely asked an interesting question.
Re: fetch package dependencies
Ingo Schwarze schrieb: Ted Unangst schrieb am Mon, Feb 02, 2009 at 05:16:42PM -0500: On Mon, Feb 2, 2009 at 4:44 PM, Ingo Schwarze schwa...@usta.de wrote: P.S. What the heck are you going to do with firefox on a box lacking network access? off the top of my head: operative phrase possibly being right now, it can be a real annoyance to have to wait until net access is available and then install all of firefox before using it. or to read documentation or other reports generated locally. or because not all nets are the internet. there's no counting the number of times i've used a computer without a decent browser and wished it had one, but i've never used a computer that had firefox installed where i regretted that fact and wished it hadn't. putting it on a machine even if you can't anticipate a need for it is a good idea. You are probably right, there seem to be several good reasons. Either way, may P.S. wasn't meant to insult the OP, sorry if it felt like that; Dorian definitely asked an interesting question. No prob, let's take taxipilot as an example :) I tried some of the suggested hints, but haven't found for example nspr end up in the package cache, some other deps might also be missing, desktop-file-utils didn't want to install at all, looks like something's broken in the snapshot... I'll give it another try tomorrow. However, during pkg_add -nv dbus- I felt like seeing some useradd/groupadd commands fly by, I'll drop an extra eye on that.
Re: fetch package dependencies
Dorian Buettner wrote on Tue, Feb 03, 2009 at 12:01:19AM +0100: I tried some of the suggested hints, but haven't found for example nspr end up in the package cache, some other deps might also be missing, Did you copy the new system libraries to /usr/lib? As far as i remember, when pkg_add -n notices that some system library dependency is unsatisfied, it won't even download all of the offending package, so it can't be cached. For example, as long as you don't have libc.so.50.1, pkg_add -n won't download -current nspr-4.7.3 to your $PKG_CACHE. By the way, that system library stunt looks scary to me, too, and i certainly wouldn't recommend it. Does the pkg_info -S trick work for you? desktop-file-utils didn't want to install at all, looks like something's broken in the snapshot... Uh, breakage on the servers is rare, usually it's just us users screwing up one way or the other. I'll give it another try tomorrow. However, during pkg_add -nv dbus- I felt like seeing some useradd/groupadd commands fly by, I'll drop an extra eye on that. You mean things like rmuser: _postgresql adding user _postgresql That's just pkg_add -n's way of saying: Look what i would do if you hadn't given me -n! See OpenBSD/Delete.pm subs delete and OpenBSD/Add.pm sub NewAuth::install for details. Yours, Ingo
Re: fetch package dependencies
On Sun, Feb 01, 2009 at 02:01:03PM +0100, Dorian B?ttner wrote: Hi all, is there an easy way to fetch a package along with it's recursive dependencies? Scenario is: eee904ha does not have network access at all right now. In order to proceed installing useful things, let's say firefox, I'd like to suck packages onto a usb stick and installl from there. I thought I could go to the soekris box, which unfortunately isn't that -current, and do something like pkg_add -n mozilla -firefox, but the output is totally garbled with libc mismatches and things like that. Any idea? Thanks, Dorian Set the PKG_PATH env variable. Then, if a particular package can't be found, the directories in the PKG_PATH are searched. That way, you can stick the ftp server in there and if the package isn't installed already or in a local dir, it'll fetch it from the ftp site. You can stick it in your ~/.bashrc, ~/.cshrc whatever. It's colon delimited and each dir/path needs to be terminated with a '/' like: export PKG_PATH=./:/packages/:ftp://ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/ Hope this helps. Cheers, Steve Laurie -- Hey! It compiles! Ship it!