Date: Mon, 5 Jun 2000 01:47:39 +0400 (MSD) From: "Aleksandr A.Babaylov" <babolo@links.ru> To: pcasidy@worldnet.fr (Philippe CASIDY) Cc: freebsd-ports@FreeBSD.ORG Subject: Re: fetch-list / how to get the list of required distfiles? Message-ID: <200006042147.BAA12897@aaz.links.ru> In-Reply-To: <200006041034.MAA76604@greatoak.home> from "Philippe CASIDY" at "Jun 4, 0 12:34:58 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Philippe CASIDY writes: > I have installed FreeBSD 4.0-RELEASE from the cdrom and I have noticed > that all the ports were available only as packages and not as distfiles > (unless their location have changed). Some packages (at least fetchmail) > were build with some crypto libraries which are required to make it run. > I have do not have these libraries, fetchmail did not ran. Therefore, I > have installed it from distfile and I want to install everything from > distfile. > So I wanted this week-end to make my own distfiles cdrom from archives I > already had. So I needed the name of all the archives required for my > current ports tree. My current 4Gb /usr/ports/distfiles is full. I think not CD but DVD is what you want :-) > First I tried 'make fetch-list'. > The problems are: > 1- the output format is quite weird at a first glance. > For instance: > ===> Howto > /usr/bin/env /usr/bin/fetch -A > ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/sgml/Linux+FreeBSD.sgml.gz ||echo Linux+FreeBSD.sgml.gz not fetched > > What is it useful for? > > 2- It only prints distfiles that are not already present. This is quite > a normal behavior but not for what I want to do. > > 3- When archives are in subdirectories, fetch-list creates this > subdirectory. This can lead to permissions problems according to the > user and this is quite unexpected to have data written whereas only a > list is expected. > > Then, I thought that I have a need for a new target in bsd.port.mk. > I have named it distfiles-list. > > pcasidy - 544> make distfiles-list > ===> 221upgrade > ===> 222upgrade > ===> 225upgrade > ===> 227upgrade > ===> 30upgrade > ===> 31upgrade > ===> 32upgrade > ===> 34upgrade > ===> Howto > Howto/Linux+FreeBSD.sgml.gz > Howto/DNS-HOWTO.sgml.gz > .... > and > > pcasidy - 545> make distfiles-list | grep -v "===>" > Howto/Linux+FreeBSD.sgml.gz > Howto/DNS-HOWTO.sgml.gz > Howto/NFS-HOWTO.sgml.gz > .... > > This is what I wanted, I also removed the creation of the directory in > the distfiles directory. I use this script (I call it "fetchall") to fetch all distfiles this script must be in you PATH #!/bin/sh dir="/usr/ports" cd ${dir} if [ x"$*" = x"" ] ; then for j in * ; do if [ -d $j -a x"$j" != x"pkg" -a x"$j" != x"distfiles" -a x"$j" != x"templates" ] ; then ( $0 $j ) & sleep 20 while [ `sysctl -n vm.loadavg | sed -e 's/{ //' | sed -e 's/\..*//'` -ge 3 -o `ps | grep /usr/bin/f etch | wc -l` -ge 3 ] do sleep 20 done fi done else for j in "$@" ; do ( cd ${dir}/$j for i in * ; do if [ -d $i -a x"$i" != x"pkg" -a x"$i" != x"CVS" ] ; then ( cd $i echo $j/$i make fetch ) fi done ) done fi (yes, it can be more clear) and pib (ports/sysutils/pib) to verify distfiles. (Function -> Distfiles menu) This is not you asked literally but serve similar aims. > So now with a simple script, I can build a list of necessary/unnecessary > archives. > But I have two problems > 1- make purely exit on error if a port requires OpenSSL and > /usr/lib/libcryto.so does not exist. > Is that an expected behavior? Even with the fecth-list target the > problem occurs. > > 2- some ports like misc/mmv try tro create a directory whereas I did > not want anything to be installed! > > ===> mmv > mmv/part01.Z > mmv/part02.Z > cd: can't cd to /usr/ports/distfiles/mmv > *** Error code 2 > > Stop in /usr/ports/misc/mmv. > *** Error code 1 > > Stop in /usr/ports/misc. > > Is there something that can be done to solve this rather than > creating the directory /usr/ports/distfiles/mmv ? But it is what you need if you create you CD/DVD/something similar. Distfile will not be found if not properly placed > > I was wondering how people at freebsd.org do to check the distfiles they > have? pib script "checkall" similar to fetchall but make checksum instead fetch > I was also wondering how to generate list while taking into account the > fact that some archives cannot be put on cdroms? dump / restore and DDS4 is your friend :-) ..... -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006042147.BAA12897>