Date: Mon, 11 Jan 2010 12:39:41 -0800 From: Jason <jhelfman@e-e.com> To: Jason <jhelfman@e-e.com> Cc: freebsd-ports@freebsd.org, Florent Thoumie <flz@xbsd.org> Subject: Re: UIDs question Message-ID: <20100111203941.GA63794@eggman.experts-exchange.com> In-Reply-To: <20100109003655.GD52892@eggman.experts-exchange.com> References: <20100106202657.GD93034@eggman.experts-exchange.com> <a01628141001080209t158f1f02qa3d6b7b077e8aab8@mail.gmail.com> <20100109003655.GD52892@eggman.experts-exchange.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Fri, Jan 08, 2010 at 04:36:56PM -0800, Jason thus spake: >On Fri, Jan 08, 2010 at 10:09:36AM +0000, Florent Thoumie thus spake: >>On Wed, Jan 6, 2010 at 8:26 PM, Jason <jhelfman@e-e.com> wrote: >>> Hi, >>> >>> I am new to building ports, however I have started to get the hang of >>> things. >>> >>> I am not building any ports that I intend on submitting to FreeBSD, yet, >>> however maybe that isn't too far off :) >>> >>> I've used a guide I found to create a local ports repository that is working >>> out wonderfully with the existing ports tree under /usr/ports >>> >>> My tree is under /usr/ports/local, and I found a way to integrate a local >>> UIDs and GIDs file, by setting this variable in my Makefile: >>> >>> UID_FILES:=${PORTSDIR}/local/UIDs >>> >>> When I go to install my port it installs the user as expected, however it >>> fails on the ${INSTALL_PROGRAM} function. I understand this is just using >>> "install" with the appropriate flags. Obviously, the port doesn't install. >>> >>> If I run it again, the user is already on the system, and the port installs >>> successfully. >>> >>> I was wondering if there is a way to have the port install the user using >>> the native USERS or GROUPS directives in the do-install phase with the >>> INSTALL macros, or if there is a more suggested, or conventional, way of >>> doing this operation. >> >>Would you mind putting the files somewhere and showing us the error >>log? I am aware of one caveat at the moment, which is that you can't >>use users/groups created with USERS/GROUPS in pkg-plist. Every typical >>use case with directives contained in Makefile should be fine AFAIK. >> >>-- >>Florent Thoumie >>flz@FreeBSD.org >>FreeBSD Committer >> > >I've uploaded to pastebin, and hope this is enough to go on. Please let me >know if it is not, and I will make the information needed available. > >http://freebsd.pastebin.com/m359b2c91 I will attach the text of the pastebin for convenience. Thanks, again! Jason --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="m359b2c91.txt" [jhelfman@walrus /usr/ports/local/testport]$ sudo make install ===> Vulnerability check disabled, database not found => testport-0.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from ftp://xxxx/pub/ports/. testport-0.0.tar.gz 100% of 165 B 1811 kBps ===> Extracting for testport-0.0 => MD5 Checksum OK for testport-0.0.tar.gz. => SHA256 Checksum OK for testport-0.0.tar.gz. ===> Patching for testport-0.0 ===> Configuring for testport-0.0 ===> Installing for testport-0.0 ===> Generating temporary packing list ===> Checking if local/testport already installed Creating user `testuser' with uid `1099'. usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... *** Error code 64 Stop in /usr/ports/local/testport. [jhelfman@walrus /usr/ports/local/testport]$ sudo make install ===> Installing for testport-0.0 ===> Generating temporary packing list ===> Checking if local/testport already installed Using existing user `testuser'. install -o root -g wheel -m 555 /usr/ports/local/testport/work/test.sh /usr/local/bin ===> Registering installation for testport-0.0 [jhelfman@walrus /usr/ports/local/testport]$ ls -al /usr/local/bin/test.sh -r-xr-xr-x 1 root wheel 33 Jan 8 16:26 /usr/local/bin/test.sh [jhelfman@walrus /usr/ports/local/testport]$ cat Makefile PORTNAME= testport PORTVERSION= 0.0 CATEGORIES= local VALID_CATEGORIES= local MASTER_SITES= ftp://xxxx/pub/ports/ DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz MAINTAINER= name@somedomain.com COMMENT= This is a test port USERS= testuser WRKSRC= ${WRKDIR} NO_BUILD= YES do-install: ${INSTALL_SCRIPT} ${WRKSRC}/test.sh ${PREFIX}/bin UID_FILES:=${PORTSDIR}/local/UIDs .include <bsd.port.mk> [jhelfman@walrus /usr/ports/local/testport]$ pkg_info |grep test testport-0.0 This is a test port [jhelfman@walrus /usr/ports/local/testport]$ id testuser uid=1099(testuser) gid=65534(nobody) groups=65534(nobody) [jhelfman@walrus /usr/ports/local/testport]$ grep testuser ../UIDs testuser:*:1099:65534:testuser:/na:/bin/sh --d6Gm4EdcadzBjdND--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100111203941.GA63794>