From patchwork Tue Feb 12 10:43:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 10807653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7012313A4 for ; Tue, 12 Feb 2019 10:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61F582B509 for ; Tue, 12 Feb 2019 10:51:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604BD2B515; Tue, 12 Feb 2019 10:51:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5B3A2B509 for ; Tue, 12 Feb 2019 10:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728940AbfBLKv0 (ORCPT ); Tue, 12 Feb 2019 05:51:26 -0500 Received: from forwardcorp1g.cmail.yandex.net ([87.250.241.190]:43114 "EHLO forwardcorp1g.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728168AbfBLKv0 (ORCPT ); Tue, 12 Feb 2019 05:51:26 -0500 X-Greylist: delayed 476 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 Feb 2019 05:51:25 EST Received: from mxbackcorp2j.mail.yandex.net (mxbackcorp2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::119]) by forwardcorp1g.cmail.yandex.net (Yandex) with ESMTP id 972A8218BE for ; Tue, 12 Feb 2019 13:43:25 +0300 (MSK) Received: from smtpcorp1p.mail.yandex.net (smtpcorp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:10]) by mxbackcorp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0l9eicLXlb-hPWKkQZf; Tue, 12 Feb 2019 13:43:25 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1549968205; bh=mnOM0WTXf3U//FHz77FOtiMnimOAHuaqOWdEPmIBDSA=; h=From:To:Cc:Subject:Date:Message-Id; b=MIYOUblhqTlqU+NHg3iVkEknMTo4Eyk69zGM31b2ur03772MiIiPHrrjM4QrYfsRP aJuAFWkWF6enW0p0P1JOB8L/sloN7rBZzt49ftUD63lX+RzxPzdpnV3hDlMf78zPmj 7I0FZRO/XUrSTkOhRGTQg/VpSByDH0a0c2Isnx2E= Authentication-Results: mxbackcorp2j.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from 95.108.173.73-red.dhcp.yndx.net (95.108.173.73-red.dhcp.yndx.net [95.108.173.73]) by smtpcorp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id SglGMkKz95-hP50MLKd; Tue, 12 Feb 2019 13:43:25 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Dmitry Monakhov To: kvm@vger.kernel.org Cc: Dmitry Monakhov Subject: [PATCH kvmtool] setup: Add /etc/alternatives to host mirrors dirs Date: Tue, 12 Feb 2019 10:43:15 +0000 Message-Id: <20190212104315.24334-1-dmonakhov@openvz.org> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dmitry Monakhov Many general purpose binaries in Ubuntu depens on /etc/alternatives directory Example: $ ls -lh /usr/bin/awk lrwxrwxrwx 1 root root 21 апр 14 2017 /usr/bin/awk -> /etc/alternatives/awk So such binaries will not works inside guest $ echo 'awk -v' > t.sh ; lkvm run -c 2 --sandbox t.sh /virt/sandbox.sh: 1: /virt/sandbox.sh: awk: not found Let's forward this dir to guest-fs and make life easier for ubuntu users. This will not break anything even if this directory not exits. --- builtin-setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin-setup.c b/builtin-setup.c index b24d2a1..f710671 100644 --- a/builtin-setup.c +++ b/builtin-setup.c @@ -100,6 +100,7 @@ error_close_in: static const char *guestfs_dirs[] = { "/dev", "/etc", + "/etc/alternatives", "/home", "/host", "/proc",