X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 165D3DC0161 for ; Tue, 27 Nov 2012 13:29:57 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 098E720DAA for ; Tue, 27 Nov 2012 08:29:57 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 27 Nov 2012 08:29:57 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :mime-version:content-type; s=smtpout; bh=saDm8GBfH1GlfMwlyxKeKH TYo4M=; b=S5fGHgwi8Y/kZI/E4LEXIGekmiU0AdTIf4FVjeETC4OwGLG/+fO2V8 b5qKOYjg7Sl8O4Qw4Q18sthHenrvMk8j1lYDxc39C1/q84NtiqbZ3G0T6oP6eqIe enYbZKufXpDv6OnVEIyAwoS+zjRtRBlg6rzXYgC0u/xB4R9Aiof1c= X-Sasl-enc: 2NVfEQq6YqelE3r7aaRmF96A63QT23hbLQyJR8av+nV2 1354022996 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id B98BC482573 for ; Tue, 27 Nov 2012 08:29:56 -0500 (EST) Date: Tue, 27 Nov 2012 08:28:11 -0500 From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] REPODEST vs ~/.cache/abuild Message-ID: <20121127132811.GA69074@vaio.jimpryor.net> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) I'm pretty familiar with Arch's makepkg, which seems to be the basis/inspiration of Alpine's abuild. And I've read the (thin) documentation available on abuild. Despite this, though, there was a lot of specific details about abuild's operation that I was unclear on. I figured the most effective way to answer these questions was to familiarize myself with the source, so that's what I'm doing. Have about 1/2 of it digested at this point. Now I'm already a lot clearer on the relation between `abuild build package`, `abuild rootpkg`, and plain `abuild`, and so on. I'll expand the wiki documentation of abuild when I have a chance. I also found some quirks and questionable things in the source, which I will also pass on when I've collected my thoughts. But there is one large design issue that had me puzzled. It's the treatment of the repo tree underneath ~/.cache/abuild versus the package tree underneath REPODEST. If REPODEST is unset, then PKGDEST defaults to $startdir---the directory holding the APKGBUILD you're building---and the treatment of ~/.cache/abuild in this case makes perfect sense. It's a tree holding a bunch of links to the actual packages, where they sit interspersed in the aports tree, and ~/.cache/abuild additionally holds APKINDEX files that are automatically updated and signed when one does plain `abuild`. This is just the natural behavior I'd want or expect. However, if I've set REPODEST, then packages don't stay in the aports tree, but rather get moved to the tree underneath REPODEST. However, ~/.cache/abuild is handled the same way: links to the packages underneath REPODEST, plus actual APKINDEX files that are automatically updated. Nothing is done to update APKINDEX files that may or may not exist under REPODEST. Now, when one needs to install makedepends when abuilding, both the repos listed in your /etc/apk/repositories AND the ~/.cache/aports repository are consulted. However, when just using plain `apk add ...`, only the former is consulted. So if you want apk to also use your local custom packages, you should include a local repo path in your /etc/apk/repositories. But that repo need to have APKINDEX files that are refreshed when packages are added. One _could_ just add /home/YOU/.cache/abuild/* here. I expect that would work fine. (I expect you need to expand the glob manually though.) But then what's the point of having abuild move all your packages under REPODEST? If one instead adds $REPODEST/* to /etc/apk/repositories (again, expanding the pathnames by hand), you'd have a repository with no indexes; or indexes that you had to manually update before using. What I've done instead is this: * add $REPODEST/* to /etc/apk/repositories (In my case, these come before the official repositories, so that my custom builds are used preferentially whenever they are present. I also have the official repositories listed as "@main ..." and "@testing ..." entries, so that I can override my custom builds when needed.) * REPODEST is set in /etc/abuild.conf to point to a tree. At $REPODEST/{main,testing,local}/$CARCH I have symlinks pointing to ~/.cache/abuild/{main,testing,local}/$CARCH/APKINDEX.tar.gz This tree then gets populated with real package files when I use abuild. * ~/.cache/abuild/{main,testing,local}/$CARCH is as described above. This tree gets populated with symlinks to the real package files and with real and up-to-date APKINDEX files when I use abuild. * The "local" repository is a new folder I created in aports. I have a private git branch of the aports repo that tracks that new folder, as well as local changes I make to package scripts under main and testing. This setup seems to fit decently with the existing behavior and design of abuild and the aports repo. I wish less trial-and-error had been needed to arrive at it, but as I said, I can work on improving the existing documentation. (Also, I didn't come here asking questions; I was trying to figure out what I could on my own.) But it is puzzling how REPODEST has real package files but has to have symlinks to APKINDEX files under ~/.cache/abuild, whereas the latter has real APKINDEX files but symlinks to package files under REPODEST. I get the impression that abuild wasn't designed with the use of REPODEST centrally in mind? Regardless, is there really some good reason now to have separate package trees under REPODEST and ~/.cache/abuild? Here is an alternative, just off the top of my head: * if REPODEST is unset, handle ~/.cache/abuild as presently. * if REPODEST is set and ~/.cache/abuild doesn't exist, then use REPODEST in place of ~/.cache/abuild * if REPODEST is set and ~/.cache/abuild exists (and points to a separate location than REPODEST), handle ~/.cache/abuild as presently. * if REPODEST is set and ~/.cache/abuild points to it (either is a symlink to REPODEST, or REPODEST resolves to ~/.cache/abuild), then use REPODEST in place of ~/.cache/abuild. (Instead of trying to place the packages under REPODEST and symlinks to them in what is ultimately the same location.) -- Dubiousjim dubiousjim@gmail.com --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---