From patchwork Mon Oct 5 05:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 1376606 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nJ0zfHGt; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C4VJc1MVFz9sS8 for ; Mon, 5 Oct 2020 16:58:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1659C8272B; Mon, 5 Oct 2020 05:58:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WUnz1vHGHxeJ; Mon, 5 Oct 2020 05:58:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E3A718616F; Mon, 5 Oct 2020 05:58:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 56DAC1BF48B for ; Mon, 5 Oct 2020 05:58:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 52DB28616F for ; Mon, 5 Oct 2020 05:58:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yujuMekJluEL for ; Mon, 5 Oct 2020 05:58:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id A582686146 for ; Mon, 5 Oct 2020 05:58:14 +0000 (UTC) Received: by mail-ej1-f66.google.com with SMTP id e22so3272745ejr.4 for ; Sun, 04 Oct 2020 22:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F+nq92P/T/cmukPzlasYsh1f9frlIgCjphjXeT8uCkI=; b=nJ0zfHGtOorlQKqqVMS4viZ+nkjq0oaqo7vdmWvoo6JOCUf/HqTpD2bamDsTo/zYr1 GOacA0CA68dNrrX2IDKTA/g35AipV8ya1uOe13eEgD7OjZk2wlHnHuvhKT6iQUXCEPxn +oUFq+YjPv49ZJaoPdiZjv4Iv8uqrWpN/5aKfwjGVdaYLZURbojV3hkgwYkyboY6oDPT f1PzJYGtMNhxxfXz/uONV0JEpWMcL58n6gw4oregeVOOeYjahVEwxmVbngJc7s3hFykd H8xleWQQKJ6LWsKn3/O9LIDXyYuqVAINQFYt3Wb73NekEVqTqXRqHND8l5we/M3ButGC Uerw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=F+nq92P/T/cmukPzlasYsh1f9frlIgCjphjXeT8uCkI=; b=KmFaZwTrcGxXf9gCjeOglRqvRgrjUtVF7OktYElZVxtNFPgyd89t9ZZE4JAnVXf0zc Iv2kcjbn92uQtmZhFCsuJfciYW20HrwaYD9KbzCtArVURqH5A67proSvXjAQFzsQsKfT ZZZ6ZZppHV1Srau2KZlOjGWVxtJJy0cVRMBohPdZGyUlDE+C2J8CTsxNmi1461KlDqzy G1SihSFIIwpV9YJNs8cIfWIORUGUyyKVaA6fIUAa0DbHyVjVYz34ZLfyPzLVaknDqiqS OXASUNx2O6L9s5ACOc4ssYn2/WL0Igek0DkOy/iY7KbJG59yb87cHtFhRHFdTPNXZbZz aw6A== X-Gm-Message-State: AOAM532HIcxTR2i401LxoFgWRmLK4mhzeyW8b3eEcJahJRsW9BMQyVIr naxK41unFnq16A5evYV1S+/IVipAcCE= X-Google-Smtp-Source: ABdhPJxyUQMy5pv6dmjSeQpQ6WeBbqY95ENqTmEcp3dmr4ylFmcUEKDP3X2grNgGxzUCg8MGZIMeaQ== X-Received: by 2002:a17:906:a101:: with SMTP id t1mr13497172ejy.203.1601877492657; Sun, 04 Oct 2020 22:58:12 -0700 (PDT) Received: from dell.be.48ers.dk (d51A5BC31.access.telenet.be. [81.165.188.49]) by smtp.gmail.com with ESMTPSA id i14sm7257321ejy.110.2020.10.04.22.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2020 22:58:11 -0700 (PDT) Received: from peko by dell.be.48ers.dk with local (Exim 4.92) (envelope-from ) id 1kPJVj-0006Gb-92; Mon, 05 Oct 2020 07:58:11 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Mon, 5 Oct 2020 07:58:08 +0200 Message-Id: <20201005055809.24044-1-peter@korsgaard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/fail2ban: fix fail2ban-python symlink X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Korsgaard , Angelo Compagnucci Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes (reproducible): http://autobuild.buildroot.net/results/50f/50f199bfe06d054cc6770760e73ac0de594a0670/diffoscope-results.txt Fail2ban installs the fail2ban-python symlink pointing to the host python intepreter used to run setup.py, which is naturally not valid at runtime and breaks the reproducible tests as shown in the diffoscope results: │ -lrwxrwxrwx 0 0 0 0 2020-10-04 10:50:38.000000 ./usr/bin/fail2ban-python -> /home/naourr/work/instance-0/output-1/host/bin/python │ +lrwxrwxrwx 0 0 0 0 2020-10-04 10:50:38.000000 ./usr/bin/fail2ban-python -> /home/naourr/work/instance-0/output-2/host/bin/python As a workaround, update the symlink after installation to point to the correct target python. Signed-off-by: Peter Korsgaard --- package/fail2ban/fail2ban.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/fail2ban/fail2ban.mk b/package/fail2ban/fail2ban.mk index a0a2dc704b..a4ee0852cc 100644 --- a/package/fail2ban/fail2ban.mk +++ b/package/fail2ban/fail2ban.mk @@ -27,6 +27,13 @@ define FAIL2BAN_FIX_DEFAULT_CONFIG endef FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_DEFAULT_CONFIG +# fail2ban-python points to host python +define FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK + ln -snf $(if $(BR2_PACKAGE_PYTHON),python,python3) \ + $(TARGET_DIR)/usr/bin/fail2ban-python +endef +FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK + define FAIL2BAN_INSTALL_INIT_SYSV $(INSTALL) -D -m 755 package/fail2ban/S60fail2ban \ $(TARGET_DIR)/etc/init.d/S60fail2ban