X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 6992BDD5721 for ; Sat, 31 Oct 2015 06:11:15 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id DE221DC1309 for ; Sat, 31 Oct 2015 06:11:13 +0000 (UTC) Received: by lbjm5 with SMTP id m5so60558269lbj.3 for ; Fri, 30 Oct 2015 23:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=OxMEV++OjkItxTsdbkrNHeCniBEMFuxyICaseln+ENo=; b=fuxkyEH3K4SDoeBvV01oo6AJTklGu5uR9Xa9msuOVIC0tVnsfL2Vdq8ieGO/psz2RY ywrCdWN+NkhT9G2VOpS6sRZcdmayxHQTcYstfHK+Gs8l+qxIu5UXrMjT5SgPqwVhJwQb 4IovEjKAyA/Wc9Qr3ngj7PdaeohEqtiA1Q4RMrYl+irSd6m7+6uPMeOjyRdXDKYHtkWZ cjM00+gHAhWbJvZ9EPQATrF2zspTVzONo6RYwAD3bapqnsAQXyjKZhXbMpy/LfDdk6V/ rJRQYZp1qCrmEq+0yNt/GQYjej40WGqjLjK37a0vysYnNyq9kGE9gM2uiMSIOY/EuMqi tJUg== X-Received: by 10.112.52.40 with SMTP id q8mr5672228lbo.100.1446271871006; Fri, 30 Oct 2015 23:11:11 -0700 (PDT) Received: from vostro ([83.145.235.202]) by smtp.gmail.com with ESMTPSA id c7sm1907975lfe.22.2015.10.30.23.11.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2015 23:11:10 -0700 (PDT) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Sat, 31 Oct 2015 08:11:08 +0200 From: Timo Teras To: Christian Kampka Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] apk-tools ideas Message-ID: <20151031081108.7a21ddbb@vostro> In-Reply-To: References: <20151028181756.4715b37c@vostro> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-alpine-linux-musl) 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-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP hi, On Thu, 29 Oct 2015 11:14:35 +0000 Christian Kampka wrote: > since you are opening a wishlist, I'd like to see a feature that > allows to divert binaries through apk. > For reference, Debian offers such a feature through dpkg-divert[1]. >> > What diversion basically provide is a way to tell apk that binary foo > is not to be installed in /usr/bin/foo but /usr/bin/foo.orig instead. > Any update of the package providing foo will then update the binary > located at /usr/bin/foo.orig instead of /usr/bin/foo. > I find this useful for replacing binaries with wrappers that provide > additional functionality. This is typically a problem if you use > tooling like ansible for your deployment that expects a binary in a > certain place, eg. the apk binary. > Tooling aside, may binaries are expected to be in a certain location, > eg. /usr/sbin/sendmail, which is currently provided by postfix. An > admin might want to place another sendmail in that path to provide > the functionality without causing a potential conflict with the apk > system. Yes. I remember wanting to have this too. There's two current hacks: 1. busybox Busybox has trigger and it executes always some package has touched /usr/bin or /bin and runs busybox --install -s. Effectively giving the possibility for packages to override bb symlinks with real files, and if that package gets removed then bb symlink is restored. 2. java-common Has trigger that updates the 'default-jvm' path symlink whenever java provider dir is touched. The down side is that bb symlinks, and the default-jvm symlink is not "owned" by anything. So we modified "apk info -W" to show who owns the symlink target if the symlink is not owned. --- apk might be able to do the above by itself. It could also automatically setup correct target for the symlink based on package priority field. Though, if a way is needed to custom select the package to use, it'd need some more design and addition to the database format. I don't like dpkg-divert's way of touching installed system, and having pkg A modify pkg B's files. Seems dpkg-divert is sort of deprecated because of that. update-alternatives[1] is another similar system and closer to what I'd prefer. Though it seems slightly overkill. It'd need to be something a bit simpler still, but the underlying idea is what I'm ok with. Comments? [1] http://manpages.debian.org/cgi-bin/man.cgi?query=update-alternatives --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---