Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 10:34:30 -0700 (PDT)
From:      papowell@astart.com
To:        freebsd-ports@FreeBSD.ORG
Subject:   A possible flaw and headache in the PORTS philosophy
Message-ID:  <200005301734.KAA02193@h4.private>

next in thread | raw e-mail | index | archive | help
Summary:

  You need a way at PACKAGE generation time to tell the package
  creation stuff to put some 'postinstall files' into the package.

  You need a way at PACKAGE install time to tell the POST script
  that the files are located at a specific location.

  You need a way at PACKAGE removal time to tell the PACKAGE stuff
  that the 'postinstall files' are to be ignored and not to
  indicate an error if they cannot be found/removed.

Background:

  I am putting up the LPRng print spooler in a package for FreeBSD.
  There are two parts to this:  the ports Makefile that will reside
  in (on?) /usr/ports/.../LPRng/Makefile and be used to compile
  and install the LPRng package from source,  and a package that
  you can use:  pkg_add LPRng-version.tgz

  Being the anal retentive person that I am,  I want to TEST the
  installation automagically,  both for the ports_from_source and
  the pkg_add stuff.

  The problem I am encountering is that the current set of package
  targets/support in the Makefile do not lend themselves to packages
  that require 'transient' files to be put into a package, and then
  to be installed by the POST package script. 

  Here is an example.  The LPRng software uses a couple of configuration
  files,  /etc/printcap, /etc/lpd.conf, /etc/lpd.perms which MUST
  be put into these locations,  but only if the original files are not
  present.  This (can be? should be?) done by creating some 'prototype'
  files for package use,  and then when you run 'pkg_add' have the POST
  script in the package move them to the appropriate locations.

  Question 1:
    There does not appear to be a facility to inform the pkg_create
   facility that there are a set of files that are 'temporary',  and
   need to be placed in the package.  The packinglist '@ignore' facility
   might be useful,  but there is no documentation or explanations
   of where or how to use it.  Same for the '@ignore_inst'
   directive.

  Question 2:
    You need to put these files that you want in place in the locations
   where you want them for the package.  This should be done 'before'
   you do the actual package work.  A 'pre-package' target in the Makefile
   would be VERY useful for this purpose.

  Question 3:
    How do you tell the package stuff to ignore files if they are
   not there (i.e. - Question 1 and Question 2).  Or does the '@ignore'
   take care of this?


Patrick Powell                 Astart Technologies,
papowell@astart.com            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.astart.com)


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?200005301734.KAA02193>