Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Dec 2002 18:58:48 +0100
From:      Jens Rehsack <rehsack@liwing.de>
To:        Joerg-M@web.de
Cc:        freebsd question <questions@freebsd.org>
Subject:   Re: local copies of packages during their installation
Message-ID:  <3E04ABD8.1030300@liwing.de>
References:  <87IH1V42VQ5298KUQKF1T2W3X2U52VS.3e047a40@merlin>

next in thread | previous in thread | raw e-mail | index | archive | help
Jörg Meyer wrote:
 > Thanks a lot. But as I understand your script it would only
 > for the mupad package. That's great, but I am interested
 > in a more general solution.
 >
 > pkg_add is really an impressive command, but why isn't there any
 > way (as it seems) to tell it not onley to extract the package it
 > is fetching but also to make a local them?
 > I cannot understand that!
 >
 > If you want to install FreeBSD with a common set of applications
 > on several computers how would you do that efficiently when
 > getting the corresponding package set is so difficult?
 >
 > Thanks again for any good ideas concerning this problem.
 >
 > Yours, Joerg.
 >
 > Am 21.12.02 11:28:35, schrieb Jens Rehsack <rehsack@liwing.de>:
 >
 >
 >>Jörg Meyer wrote:
 >>
 >>>Hello,
 >>>
 >>>I've been experimenting with FreeBSD since the day
 >>>day before yesterday. Coming from the MS-world I am very
 >>>impressed already.
 >>>
 >>>I installed the system from a CD created from the Mini-Iso-Image.
 >>>Installing packages with pkg_add -r I would like to have local
 >>>copies of the downloaded tarball in order to create an adapted
 >>>CD with the packages I really need (just for the case of a new-
 >>>or re-installation).
 >>>Of course, all the depending package-tarballs should be download
 >>>as well - otherwise I could also ftp them manually.
 >>>Furthermore it would be really nice if the directory structure of
 >>>the FTP-Server was duplicated locally as well.
 >>>
 >>>I know (from experimenting) that make package within the ports 
collection
 >>>can archieve something similar (packages are created under 
/usr/ports/packages
 >>>if existent). But following this strategy in my opinion has 3 major 
disadvantages:
 >>>1) Compiling packages like XFree86-4 takes quite a long time on my 
machnine.
 >>
 >>Solution a) Buy a faster machine. Compile takes it's time
 >>Solution b) Do not compile but download
 >>Solution c) Wait
 >>Solution d) reduce your optimization level
 >>
 >>
 >>>2) It is impossible to create a package without installing it.
 >>>In case of the package is installed already make returns an error
 >>>telling me to deinstall the package first.
 >>
 >>less /usr/ports/Mk/bsd.port.mk
 >>-------- SNIPP
 >># Default targets and their behaviors:
 >>#
 >># fetch                 - Retrieves ${DISTFILES} (and ${PATCHFILES} if
 >>defined)
 >>#                                 into ${DISTDIR} as necessary.
 >># fetch-list    - Show list of files that would be retrieved by fetch.
 >># fetch-recursive - Retrieves ${DISTFILES} (and ${PATCHFILES} if 
defined),
 >>#                                 for port and dependencies into
 >>${DISTDIR} as necessary.
 >># fetch-recursive-list  - Show list of files that would be retrieved by
 >>#                                 fetch-recursive.
 >># extract               - Unpacks ${DISTFILES} into ${WRKDIR}.
 >># patch                 - Apply any provided patches to the source.
 >># configure             - Runs either GNU configure, one or more local
 >>configure
 >>#                                 scripts or nothing, depending on
 >>what's available.
 >># build                 - Actually compile the sources.
 >># install               - Install the results of a build.
 >># reinstall             - Install the results of a build, ignoring
 >>"already installed"
 >>#                                 flag.
 >># deinstall             - Remove the installation.
 >># package               - Create a package from an _installed_ port.
 >># describe              - Try to generate a one-line description for
 >>each port for
 >>#                                 use in INDEX files and the like.
 >># checkpatch    - Do a "patch -C" instead of a "patch".  Note that it may
 >>#                                 give incorrect results if multiple
 >>patches deal with
 >>#                                 the same file.
 >># checksum              - Use distinfo to ensure that your distfiles are
 >>valid.
 >># checksum-recursive - Run checksum in this port and all dependencies.
 >># makesum               - Generate distinfo (only do this for your own
 >>ports!).
 >># clean             - Remove ${WRKDIR} and other temporary files used
 >>for building.
 >># clean-depends - Do a "make clean" for all dependencies.
 >>-------- SNAPP
 >>
 >>-------- SNIPP
 >># For package:
 >>#
 >># NO_LATEST_LINK - Do not install the "Latest" link for package.  Define
 >>this
 >>#                                 if this port is a beta version of
 >>another stable port
 >>#                                 which is also in the tree.
 >># LATEST_LINK    - Install the "Latest" link for the package as ___. 
  Define
 >>#                 this if the "Latest" link name will be incorrectly
 >>determined.
 >>#
 >># This is used in all stages:
 >>#
 >># SCRIPTS_ENV   - Additional environment vars passed to scripts in
 >>#                 ${SCRIPTDIR} executed by bsd.port.mk (default: see 
below).
 >>#
 >># Finally, variables to change if you want a special behavior.  These
 >># are for debugging purposes.  Don't set them in your Makefile.
 >>#
 >># ECHO_MSG              - Used to print all the '===>' style prompts -
 >>override this
 >>#                                 to turn them off (default: 
${ECHO_CMD}).
 >># PATCH_DEBUG   - If set, print out more information about the patches as
 >>#                                 it attempts to apply them.
 >># PKG_DBDIR             - Where package installation is recorded
 >>(default: /var/db/pkg)
 >># NO_PKG_REGISTER - Don't register a port installation as a package.
 >># FORCE_PKG_REGISTER - If set, it will overwrite any existing package
 >>#                                 registration information in
 >>${PKG_DBDIR}/${PKGNAME}.
 >># NO_DEPENDS    - Don't verify build of dependencies.
 >>-------- SNAPP
 >>
 >>It seems to work. Try 'NO_PKG_REGISTER=yes make package"
 >>
 >>
 >>>3) dependencies are not considered.
 >>>make package in /usr/math/mupad only creates a mupad-package
 >>>but no package for linux_base which is necessary for mupad.
 >>
 >>I've attached you a small script. Preventing duplicate builds it's a
 >>lesson for the reader ;-)
 >>
 >>
 >>>Does anyone know a solution to this problem?
 >>>Don't you make local copies of packages you install(ed)?
 >>
 >>???
 >>
 >>
 >>>Thanks for each advice in advance.
 >>
 >>Your welcome.
 >>
 >>
 >>>Yours,
 >>>Joerg Meyer
 >>>
 >>
 >>Regards,
 >>Jens

Hi Jörg,

1st: please avoid top posting. In our culture it's usual to read from
top to bottom and not otherwise, isn't it?

2nd: for your more general solution I recommend to RTFM. To your
information: $0 is the name of invoked script, $1..$n are the arguments,
if any. You can also use getopt(1)

3rd: I cannot understand your question 'bout pkg_add. Maybe you should
private mail me the question in german.

4th: I do not use packages, I build from ports. If I want to do that
efficiently, I build them once and install them several times using nfs.

Hope you'll get it run.

Jens
-- 
L     i  W     W     W  i                 Jens Rehsack
L        W     W     W
L     i   W   W W   W   i  nnn    gggg    LiWing IT-Services
L     i    W W   W W    i  n  n  g   g
LLLL  i     W     W     i  n  n  g   g    Friesenstraße 2
                                    gggg    06112 Halle
                                       g
                                   g   g
Tel.:  +49 - 3 45 - 5 17 05 91    ggg     e-Mail: <rehsack@liwing.de>
Fax:   +49 - 3 45 - 5 17 05 92            http://www.liwing.de/




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E04ABD8.1030300>