Re: Post-install script execution in a package



In article <1186453333.403184.312240@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<drymizu@xxxxxxxxx> wrote:
Hi all,

Sorry to bother you, but I'm stuck.

I have been trying to make a customized package with a post-install
script but I can't find out how to do it. ( Openbsd 3.8 ).
I am using an existing port where I customized the Makefile to change
some configuration options , then execute "make package".

Using the target post-install in the Makefile seems only to be
executed when I do the "make install" in the port directory.

You're hopelesly confused. Read the description of ports builds in ports(7)
and bsd.port.mk(5). Focus on THE FAKE FRAMEWORK.

The post-install target has no incidence on the package installation. It's
all done during fake.

Is there a way to make post-install scripts executed at the
installation of a package ?
I tried to untar existing packages with post-install in their port's
Makefile but can't find any trace of a post-install script.

Put your script in the file system, add an @exec line in the packing-list.
Refer to pkg_create(1) for details.

Caveat: there are lots and lots of not so special cases that are better
dealt with WITHOUT using install scripts. Install scripts are special,
they break when you install stuff, they break when you update stuff, they
break when you remove stuff.

Think twice: do you really need that install script ? If you still think
so, think again. If you still think so, tell us about it.

As Joachim pointed out, as of 4.2, we have removed ALL install scripts from
the ports tree. The infrastructure is still there in pkg_create, but it
will be removed as well.

@exec/@unexec, especially with the new modes it has, is much simpler to
use, and needs ways less documentation. It's still fairly dangerous if
you don't know what you're doing...
.



Relevant Pages

  • Re: Post-install script execution in a package
    ... I have been trying to make a customized package with a post-install ... some configuration options, then execute "make package". ... Makefile but can't find any trace of a post-install script. ...
    (comp.unix.bsd.openbsd.misc)
  • Post-install script execution in a package
    ... I have been trying to make a customized package with a post-install ... Makefile but can't find any trace of a post-install script. ...
    (comp.unix.bsd.openbsd.misc)
  • Installation of software, and security. . .
    ... installation in Windows and various package managers. ... A setup.exe program coded by some third party such as Real Networks ... A .msi Microsoft Installer package is unpacked, and a script coded by ...
    (Bugtraq)
  • Re: goto &Package::func destroying @_?!
    ... >>script, but maybe the description will trigger something from someone.... ... code the 'Core' package uses another package as a base that has a custom ... package Foo; ... if it really is a problem with goto&. ...
    (comp.lang.perl.misc)
  • Tcl application deployment
    ... Tcl interpretator and any packages it uses. ... As far as I know, no OS provides way to load dynamic libraries using ... There is no way to fix bugs in some package used by application, ... all script files which come with application should be ...
    (comp.lang.tcl)