NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Git pkgsrc - setting file locations



On Wed, 15 Jul 2020, Greg A. Woods wrote:

These are my relevant hacks which I make directly to pkgsrc/mk/defaults/mk.conf:

PKGMAKECONF = /etc/mk.conf
PKGSRC_MAKE_ENV +=	USER=${USER:Q}
WRKOBJDIR ?=	/var/package-obj/${USER}
DISTDIR ?=	/var/package-distfiles
PACKAGES ?=	/var/packages/${USER}/${OPSYS}/${OS_VERSION:C/9.0.*/9.0/:C/9.99..*/9.99/}/${MACHINE_ARCH}

I tackled only a few of these, and placed them in my /etc/mk.conf, which now looks like this:

--snip--
X11_TYPE=modular
ACCEPTABLE_LICENSES+= gnu-agpl-v3
PKG_OPTIONS.xscreensaver+= pam opengl
PKG_OPTIONS.firefox60+= alsa
PKG_OPTIONS.rxvt-unicode+= rxvt-term
RUST_TYPE=src
USE_ABI_DEPENDS?=yes
WRKOBJDIR ?=    /var/package-obj
DISTDIR ?=      /var/package-distfiles
PACKAGES ?=     /var/packages
--snip--

One consequence of the arrangement now is that 'work' directories get created in /var/packages-obj. Could this be a stumbling block for the build process?

For example, here's what I see trying to build emacs from pkgsrc:

--snip--
===> Creating toolchain wrappers for emacs26-26.3nb8
[ ! -h /var/package-obj/editors/emacs26/work/.buildlink/include/X11/Xaw ] && /bin/mkdir -p /var/package-obj/editors/emacs26/work/.buildlink/include/X11 && /bin/ln -s Xaw3d /var/package-obj/editors/emacs26/work/.buildlink/include/X11/Xaw
*** Error code 1

Stop.
make[2]: stopped in /usr/pkgsrc/editors/emacs26
*** Error code 1
--snip--

Thoughts, anyone?

Thank you

--
 A test of right and wrong must be the means, one would
 think, of ascertaining what is right or wrong, and not a
 consequence of having already ascertained it.

                                  J. S. Mill

On Wed, 15 Jul 2020, Greg A. Woods wrote:

At Wed, 15 Jul 2020 15:40:40 -0400 (EDT), Bob Bernstein <poobah%ruptured-duck.com@localhost> wrote:
Subject: Git pkgsrc - setting file locations

I have been working awhile now with the GIT pkgsrc, and it occurs to
me that it might be an advantage to provide different locations for
things such as distfiles, packages, and...what else?

What is suggested, and where/how is the optimum method for altering
these values?

These are my relevant hacks which I make directly to
pkgsrc/mk/defaults/mk.conf:


PKGMAKECONF = /etc/mk.conf
PKGSRC_MAKE_ENV +=	USER=${USER:Q}
WRKOBJDIR ?=	/var/package-obj/${USER}
DISTDIR ?=	/var/package-distfiles
PACKAGES ?=	/var/packages/${USER}/${OPSYS}/${OS_VERSION:C/9.0.*/9.0/:C/9.99..*/9.99/}/${MACHINE_ARCH}


On my build servers these /var directories are then often symlinks to
separate directories on either shared or other local filesystem(s).


Then in /etc/mk.conf I wrap local pkgsrc-only things in an if testing
BSD_PKG_MK, e.g. as follows:

	.if defined(BSD_PKG_MK)

	# I.e. the rest is for pkgsrc things that are truly local to this host
	# environment:  (as opposed to the site-specific stuff in /usr/pkgsrc/mk)

	# XXX N.B.:  It is expected that mk/defaults/mk.conf will have set
	#
	#	PKGMAKECONF =	/etc/mk.conf

	# use pkgtools/autoswc to cache some autoconf results
	#
	.sinclude "/usr/pkg/share/autoswc/autoswc.mk"

	PKG_SYSCONFBASE = /etc
	PKG_RCD_SCRIPTS =	YES	# install rc.d scripts immediately.

	.endif

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>


--
 A test of right and wrong must be the means, one would
 think, of ascertaining what is right or wrong, and not a
 consequence of having already ascertained it.

                               J. S. Mill


Home | Main Index | Thread Index | Old Index