Subject: FYI: just-in-time su for "make package"
To: None <tech-pkg@netbsd.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 09/12/2001 17:35:35
I've implemented just-in-time su functionality for the package
target of bsd.pkg.mk, and rationalised the deinstall target to use
the same common code. I don't anticipate any difficulties, but if
there are any, please send-pr them in the usual way.
Thanks,
Alistair
% make package
===> check-depends [cuecat-0.2.1] ===> Validating dependencies for cuecat-0.2.1
=> Checksum OK for cuecat-0.2.1.tar.gz.
===> real-extract [cuecat-0.2.1] ===> Extracting for cuecat-0.2.1
===> install-depends [cuecat-0.2.1] ===> Required installed package gmake>=3.78: gmake-3.79.1 found
===> real-patch [cuecat-0.2.1] ===> Patching for cuecat-0.2.1
===> do-patch [cuecat-0.2.1] ===> Applying NetBSD patches for cuecat-0.2.1
===> real-configure [cuecat-0.2.1] ===> Configuring for cuecat-0.2.1
===> real-build [cuecat-0.2.1] ===> Building for cuecat-0.2.1
cc -O2 -Wall -Wstrict-prototypes -c -o read_cuecat.o read_cuecat.c
cc -O2 -Wall -Wstrict-prototypes -c -o cuecat_lib.o cuecat_lib.c
cc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o read_cuecat read_cuecat.o cuecat_lib.o
===> do-su-install [cuecat-0.2.1] ===> Installing for cuecat-0.2.1
===> do-su-install [cuecat-0.2.1] ===> Becoming root@myhost to install cuecat-0.2.1.
/usr/bin/su Password:
install -c -s -o root -g wheel -m 555 /usr/pkgsrc/misc/cuecat/work/cuecat-0.2.1/read_cuecat /usr/pkg/bin
install -d -o root -g wheel -m 555 /usr/pkg/share/doc/cuecat
install -c -o root -g wheel -m 444 /usr/pkgsrc/misc/cuecat/work/cuecat-0.2.1/README /usr/pkg/share/doc/cuecat
===> real-su-install [cuecat-0.2.1] ===> Please note the following:
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2001/02/13 13:55:42 wiz Exp $
Please note that you can only use the executable "read_cuecat"
on the console.
(The startup error "WSKBDIO_GETMODE: Inappropriate ioctl for device"
will remind you if you forget.)
===========================================================================
===> fake-pkg [cuecat-0.2.1] ===> Registering installation for cuecat-0.2.1
===> do-su-package [cuecat-0.2.1] ===> Packaging cuecat-0.2.1
===> do-su-package [cuecat-0.2.1] ===> Becoming root@myhost to install cuecat-0.2.1.
/usr/bin/su Password:
===> real-su-package [cuecat-0.2.1] ===> Building binary package for cuecat-0.2.1
Creating package /usr/pkgsrc/packages/All/cuecat-0.2.1.tgz
Using SrcDir value of /usr/pkg
Registering depends:.
Creating gzip'd tar ball in '/usr/pkgsrc/packages/All/cuecat-0.2.1.tgz'
===> real-su-package [cuecat-0.2.1] ===> Warning: cuecat-0.2.1 may not be put on a CD-ROM:
===> real-su-package [cuecat-0.2.1] ===> Hardware manufacturer claims intellectual property infringement.
===> real-su-package [cuecat-0.2.1] ===> Warning: cuecat-0.2.1 may not be made available through FTP:
===> real-su-package [cuecat-0.2.1] ===> Hardware manufacturer claims intellectual property infringement.
% make deinstall
===> do-su-deinstall [cuecat-0.2.1] ===> Deinstalling for cuecat-0.2.1
===> do-su-deinstall [cuecat-0.2.1] ===> Becoming root@myhost to install cuecat-0.2.1.
/usr/bin/su Password:
Running PKG_DBDIR=/var/db/pkg /usr/sbin/pkg_delete cuecat-0.2.1
%