From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8CDsKlx/nGDSUwEAgWs5BA (envelope-from ) for ; Thu, 13 May 2021 03:22:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qE6rJlx/nGBpFQAA1q6Kng (envelope-from ) for ; Thu, 13 May 2021 01:22:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1601F23F1A for ; Thu, 13 May 2021 03:22:36 +0200 (CEST) Received: from localhost ([::1]:36534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lh03f-0006J4-9Q for larch@yhetil.org; Wed, 12 May 2021 21:22:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lh038-0006FF-D5 for guix-patches@gnu.org; Wed, 12 May 2021 21:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lh038-0005qc-5S for guix-patches@gnu.org; Wed, 12 May 2021 21:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lh038-0000w6-0K for guix-patches@gnu.org; Wed, 12 May 2021 21:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 01:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16208689083580 (code B ref 45692); Thu, 13 May 2021 01:22:01 +0000 Received: (at 45692) by debbugs.gnu.org; 13 May 2021 01:21:48 +0000 Received: from localhost ([127.0.0.1]:40933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lh02u-0000vg-A8 for submit@debbugs.gnu.org; Wed, 12 May 2021 21:21:48 -0400 Received: from mail-40138.protonmail.ch ([185.70.40.138]:33811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lh02r-0000vP-Mo for 45692@debbugs.gnu.org; Wed, 12 May 2021 21:21:47 -0400 Date: Thu, 13 May 2021 01:21:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1620868898; bh=ExaDA5EOcT4dIZ4jfVjLNBE41emd66bx4u2BpNLKp54=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=fSlX5LbFPSfJ8XQC259QYcoGpA4/3Yqda+If77qBG2LPQt0Yxdbui7vcvpm+D5ICz WcaYatfakOHXur/vq6pHqO+ogqws+ZFpItoG63SQ0bhrqzAjvSL95qXlthByqlLXcM qOoWBaBOIlzBaFO+hBuiT7e2EsUaIBtCySBI89LQ= Message-ID: In-Reply-To: <20210511160434.6b88bba3@scratchpost.org> References: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> <20210511160434.6b88bba3@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620868956; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ExaDA5EOcT4dIZ4jfVjLNBE41emd66bx4u2BpNLKp54=; b=OD5Dk1pWviWlO7IcK1ZWvbZ/G/bTmlmmBIRQqcijBRh+vSDSAdfBm7zOY5v93YsBAbokVw TLwZfp9Zv68cmPK76gLm+UY9xWw5+YTCTaTqYvFzhSRgrlFoEpQhIUF7NpV5PTutJHQlJx DCI15nK8n43aVSUwpGnKk7ZqhDrmo20Kpfz/IpK1zmh57JB85zQ8ng9961W7F5VXKX8fQN 0zCk6A+KjjjI3RN2vjQ/fxDtzL/L+clSEqWZI6xXOIBRrNKOqRszEvmMkb1P3MFx7WA1nk aex4ydlcxUqQU5baPU+OCzjEMVCmgDYJPElzGKsjoCl3ayo2nIycm7ivprRktw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620868956; a=rsa-sha256; cv=none; b=TtMZVwwE8NqtTgx9xUfSvEVn73LSC/G3lKbnOIAafkfJWfJzbuPxEEQ2ehsppPmkhQeevC kSRbrj5XDkG/5pOzanrFuQOf/GXxbDKD9wTJLU0DvCX/TNoYfLzbYD2O3gCDmCK/wHQAEM k+ygEqiFGqN36o9FZ/rFZHPUpE40iHVPn4tsLL8G/csbW5siivqjdnpP7x9v1WID32TGu1 jchTMv6cCV1aYrNbuVQV/xBH8vbB9MTnNuSPMo1+xIlw+tU6LBMZnFerjXbUweH195m8YM vraYqiu5zQK3Zqs+5djdBKtYow/a+2E0Q+3LKIOCZWx3mesPVen3k/eg76Pcww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=fSlX5LbF; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=fSlX5LbF; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 1601F23F1A X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: bykZw9Eribmv Hello Danny, > Hi, > > > - (invoke "make" "install" > > > > > > - "PREFIX=3D" > > > > > > - (string-append "DESTDIR=3D" out))) > > > > > > Are you sure about that? > > Usually, DESTDIR is in order to supply a temporary build root (which will= not > be referred-to by the installed programs--because that directory will be > deleted after the build) and PREFIX is in order to supply an actual > installation directory (installed programs can refer to that whenever the= y > want). > > Is it different for this program? > > Also, I'd suggest to use #:make-flags so other phases can also see the PR= EFIX > chosen. Otherwise, those could erroneously default to another prefix (for > loading of config files at runtime etc). > > What do you think? Yes, I am quite sure; the program uses a custom `Makefile` that is fairly s= imple and can be trivially quoted here for your review: ```Makefile PREFIX :=3D /usr/local all: install: =09install -d $(DESTDIR)/etc/cron.d =09install -d $(DESTDIR)/etc/cron.daily =09install -d $(DESTDIR)/etc/cron.hourly =09install -d $(DESTDIR)/etc/cron.weekly =09install -d $(DESTDIR)/etc/cron.monthly =09install -m 0644 etc/zfs-auto-snapshot.cron.frequent $(DESTDIR)/etc/cron.= d/zfs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.hourly $(DESTDIR)/etc/cron.hourly/z= fs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.daily $(DESTDIR)/etc/cron.daily/zf= s-auto-snapshot =09install etc/zfs-auto-snapshot.cron.weekly $(DESTDIR)/etc/cron.weekly/z= fs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.monthly $(DESTDIR)/etc/cron.monthly/= zfs-auto-snapshot =09install -d $(DESTDIR)$(PREFIX)/share/man/man8 =09install -m 0644 src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/ma= n8/zfs-auto-snapshot.8 =09install -d $(DESTDIR)$(PREFIX)/sbin =09install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snaps= hot uninstall: =09rm $(DESTDIR)/etc/cron.d/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.hourly/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.daily/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.weekly/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.monthly/zfs-auto-snapshot =09rm $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8 =09rm $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot ``` Notice how it does not modify any of the source files at all, so the source= s do not refer to anything provided in `$PREFIX`. However, it does create = directories in `$DESTDIR`, so it has to use `$DESTDIR`. Thanks raid5atemyhomework