pkg.subr (was Re: About a browser hier-like module)

Jose M Rodriguez josemi at freebsd.jazztel.es
Thu Feb 17 13:44:11 PST 2005


El Jueves, 17 de Febrero de 2005 22:23, Scot Hetzel escribió:
> On Thu, 17 Feb 2005 10:22:42 +0100, Jose M Rodriguez
>
> <josemi at freebsd.jazztel.es> wrote:
> > ALso, I'm thinking in have something in the way of RC_SUBR to make
> > very common pkg-scripts works as sh funtions
> > (${LOCALBASE}/etc/pkg.subr, ${X11BASE}/etc/pkg.subr) to be sourced.
> >
> > But someone may find this open to exploits or break some rules
> > about ports. Let me know
>
> I am also interested in creating a common set of pkg subroutines
> (pkg.subr) that all of the ports could use for the
> pkg-install/pkg-deinstall scripts.
>
> We could then define a common set of routines to do the following:
>
> User/group functions
>   - check for user/group
>   - add user/group
>   - remove user/group
>
> file functions:
>  - add/remove an entry to /etc/syslog.conf and /etc/newsyslog.conf
> (see net/cvsup-mirror)
>  - add/remove an entry in /etc/crontab (see net/cvsup-mirror)
>  - add/modify/remove an entry in /etc/services (mail/cyrus-imapd*
> requires "sieve" to be appended to the port 2000/tcp entry)"
>
> The only problem I see is how to handle old systems that don't have
> the "pkg.subr" file (possible a sysutils/pkg_subr port) and where is
> this file going to be placed (/var/db/pkg?).

pkg.subr file must come from a port that must be added to RUN_DEPENDS.  
I think that the correct place must be ${PREFIX}/etc/pkg.subr

But from that on, I'm really open to comments.

Note: I'm taking gnome@ out from this thread, this is really ports@ 
related.

--
  josemi


More information about the freebsd-ports mailing list