From owner-freebsd-questions@FreeBSD.ORG Wed Dec 4 17:51:44 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11E7014A for ; Wed, 4 Dec 2013 17:51:44 +0000 (UTC) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7B5128D for ; Wed, 4 Dec 2013 17:51:43 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id q59so15701799wes.27 for ; Wed, 04 Dec 2013 09:51:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=4Vyhp6F9gc2l6Zk1toOYXxLKysF6Fnq3VvL1Mc9AFRE=; b=QGlCLQNR3B++DTM/C1B4m/uwpLRHKn192SAqle18cOBuGtQSrUxN5azDYBdrPWA0/J 4IGNbu8VqShUFmH+3e+qx+KE0Rxl7Bx0xMrTinNYS+cyfeQ4y164xofhba6iPPrftMzM rqx9uBdHeMAMyhjotsRfRh/mLr679AlOohAfiS29Y9KgpNtiP34+4pNTl4/MXg5fvioN laLvdeXck6LYRUiyHYS/eZ4SM52BJUYj6CLIwHYZG7f7dzKiBqPmV5MW5Izt63NINAYd Uj4h2X8UGSp4gjPPqyoM5OFiGr2sfgNMaWLHreXk5k6hcDWfNrK2x6JRLiUi8yoFdncc 2Qgw== X-Gm-Message-State: ALoCoQnTiA7dP/42OeWdgypvtYTVoWbGGX+O8R0VZsVUYKKGoVhsKy1biAuzVdrUqIV7CCXYO4V/ X-Received: by 10.194.109.68 with SMTP id hq4mr64887696wjb.12.1386179496445; Wed, 04 Dec 2013 09:51:36 -0800 (PST) Received: from dfleuriot.paris.hi-media-techno.com ([83.167.62.196]) by mx.google.com with ESMTPSA id e10sm8969246wiy.7.2013.12.04.09.51.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 09:51:35 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: pkg repo not creating repo.txz on 8.4-STABLE From: Fleuriot Damien In-Reply-To: <529F68EA.90809@freebsd.org> Date: Wed, 4 Dec 2013 18:51:34 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9454D6CB-A36A-49EB-B7F6-17A31C83EC76@my.gd> References: <529F68EA.90809@freebsd.org> To: Matthew Seaman X-Mailer: Apple Mail (2.1510) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 17:51:44 -0000 On Dec 4, 2013, at 6:39 PM, Matthew Seaman wrote: > On 12/04/13 17:07, Fleuriot Damien wrote: >> Hello list, >>=20 >>=20 >>=20 >> I've got this tiny problem where issuing `pkg repo /tmp/repo/All` = won't yield a repo.txz file, anywhere at all. >>=20 >> /tmp/repo/All contains a single, very small python package (this is a = real, valid port), on purpose to minimize the size of ktrace dumps. >>=20 >>=20 >> # pkg version >> root@bsd8:/ # pkg -v >> 1.2.1 >>=20 >> # Contents of /tmp/repo/All/ >> root@bsd8:/ # ls -l /tmp/repo/All/ >> total 4 >> -rw-r--r-- 1 root wheel 2312 Dec 4 15:57 python2-2_1.txz >>=20 >> # Command used to create the repo >> root@bsd8:/ # pkg repo /tmp/repo/All/ >> Generating repository catalog in /tmp/repo/All/: done! >>=20 >> # Resulting files , note that digests and packagesite were generated = successfully >> root@bsd8:/ # ls -l /tmp/repo/All/ >> total 12 >> -rw-r--r-- 1 root wheel 256 Dec 4 16:46 digests.txz >> -rw-r--r-- 1 root wheel 712 Dec 4 16:46 packagesite.txz >> -rw-r--r-- 1 root wheel 2312 Dec 4 15:57 python2-2_1.txz >>=20 >>=20 >>=20 >> I've tried gleaning info from both truss and ktrace, with the = following results from kdump: >>=20 >> # Actual ktrace >> ktrace pkg repo -q /tmp/repo/All/ >>=20 >> # grep repo.txz during kdump >> root@bsd8:/ # kdump | grep -C 8 repo.txz >> 2254 initial thread CALL munmap(0x802400000,0xe00000) >> 2254 initial thread RET munmap 0 >> 2254 initial thread CALL close(0x3) >> 2254 initial thread RET close 0 >> 2254 initial thread CALL unlink(0x7fffffffe580) >> 2254 initial thread NAMI "/tmp/repo/All//digests" >> 2254 initial thread RET unlink 0 >> 2254 initial thread CALL stat(0x7fffffffe170,0x7fffffffe0c0) >> 2254 initial thread NAMI "/tmp/repo/All//repo.txz" >> 2254 initial thread RET stat -1 errno 2 No such file or directory >> 2254 initial thread CALL = sigprocmask(SIG_BLOCK,0x7fffffffe990,0x802004298) >> 2254 initial thread RET sigprocmask 0 >> 2254 initial thread CALL sigprocmask(SIG_SETMASK,0x802004298,0) >> 2254 initial thread RET sigprocmask 0 >> 2254 initial thread CALL = sigprocmask(SIG_BLOCK,0x7fffffffe950,0x802004298) >> 2254 initial thread RET sigprocmask 0 >> 2254 initial thread CALL sigprocmask(SIG_SETMASK,0x802004298,0) >>=20 >>=20 >> Meh, what gives, no such file ? >>=20 >>=20 >>=20 >>=20 >> Out of curiosity and to prove I'm not trying to get anyone else to do = my homework, I've taken the liberty of grabbing an earlier version of = `pkg` at: >> = ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/bapt/pkg-1.0-rc6.t= ar.xz >>=20 >> Building and using pkg-static from these sources does yield the = correct repo file : >>=20 >> root@bsd8:/tmp/pkg/pkg-1.0-rc6/pkg-static # ./pkg-static repo = /tmp/repo/ >> Generating repo.sqlite in /tmp/repo/: done! >> root@bsd8:/tmp/pkg/pkg-1.0-rc6/pkg-static # ls -l /tmp/repo/ >> total 8 >> -rw-r--r-- 1 root wheel 2316 Dec 4 16:52 python-2.7_1,2.txz >> -rw-r--r-- 1 root wheel 1636 Dec 4 16:59 repo.txz >>=20 >>=20 >>=20 >>=20 >> I'm going to look up other versions of pkg and try to narrow down the = one that borks things up for me. >=20 > Hi, Fleuriot, >=20 > Not sure what's going on there in your ktrace, but not generating a > repo.txz is normal for pkg-1.2.x. Instead, all the data is in the > digests.txz file -- which if you look at it is a tarfile containing a > single YAML document, plus possibly some crypto signature stuff if > you've enabled that. Make sure your pkg clients are all running = pkg-1.2 > and it should just work for you. >=20 > Cheers, >=20 > Matthew >=20 >=20 I suspected repo.txz might not be needed anymore but wanted to make sure = first, since ktrace mentionned a file not found error for it. I guess I was trusting overmuch in "pkg help repo" which still = references repo.txz. I suppose man 8 pkg-repo will want an update though, at the very least = to tell people it's deprecated as of 1.2.x and to look at pkg-repository = instead. Thanks for the insight Matthew ! (pssst, first name's Damien ;) )