From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 11:12:43 2023 Received: (at submit) by debbugs.gnu.org; 17 Nov 2023 16:12:43 +0000 Received: from localhost ([127.0.0.1]:47025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r41SU-00051r-Nf for submit@debbugs.gnu.org; Fri, 17 Nov 2023 11:12:43 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r41SS-00051a-4K for submit@debbugs.gnu.org; Fri, 17 Nov 2023 11:12:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r41SL-0002co-51 for bug-guix@gnu.org; Fri, 17 Nov 2023 11:12:33 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r41SJ-0008If-CS for bug-guix@gnu.org; Fri, 17 Nov 2023 11:12:32 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c6f4bc7738so5787931fa.0 for ; Fri, 17 Nov 2023 08:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700237549; x=1700842349; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=lTYWpQovDckvoJNTt8atNJMYLGRAqpeBJp0APIftF2o=; b=TRq26dvnNLxtuR9fGEjX7XUr3FriwZt7fyvkEKT8grluHyJasZ9rc+hbKzlnn1tJ/a 64R08iYIV9yypeXrdcV3cC5nmoB6ERAobU3wNQAAXTAceVqk6CznNRPQ+zU0+AWFUw/A Z4bMqu81v1T+sHlRp/Tn45cGjBGLObKA0xy9g3YM+ZKsVLzUlr0X+BO1ADzg2nHhZC4Q up77KvRfGtyJOqyoOONC7jWkVrugiejO7opAUEQm0Mr3ZSROXEnE4cQVoXykdZSt1xfo iAjMjBzPM+wu891Mwa6f8SKEzJKnNAqeW48HVV8wIsJPl7YyfB1IbhqPRAZtwmb+tPXI xAqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700237549; x=1700842349; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lTYWpQovDckvoJNTt8atNJMYLGRAqpeBJp0APIftF2o=; b=R/HTkD14SIgQmm8I/7E4B22ZtJQcSqXi1ZJGPDWxJGyoBse2G6TvsvD09IEf/7eavr NXeT2ZdxVix4OSeFLdpZBzvUAVwY263ZjwsXwoRuXeBaGhtmvEMWopssX7uKVqRSW422 VJ8mTsYslas7SlY/ZAagQdF76hf2pS4hQwsPxrtMJEKHYzQ9YRoRA1FZV4jK5vWjiYWo m+rsJ+HdhQCNnF1MRVnmn6nJs4+451Z5oUn2M2/vLSkM90Y0Jn1s6rBThl6j+bT5HUiM pXY6TeURPz+uE33WfYm6NzjUUyPXzx5rGtQbgw1mS5P0QU8SdfFvWVXSySglFgZrMEuN 0xgw== X-Gm-Message-State: AOJu0Yzt5u6ONjlGtEdejHk11H7Or6ukrP7r3w9REeRhe5TJTMz/dopa FCRucrmjwRJHFPRr+GSvHpewWKVus6E= X-Google-Smtp-Source: AGHT+IHdGjFepl0GCa0BcWk0theNvhWo23+vuLt7TIoiIsKy/WtAC+mySz69Y/id3BYvlf/q3V1SXg== X-Received: by 2002:a05:651c:30b:b0:2c5:6ab:b817 with SMTP id a11-20020a05651c030b00b002c506abb817mr15198ljp.5.1700237549181; Fri, 17 Nov 2023 08:12:29 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-44.net.univ-paris-diderot.fr. [194.254.61.44]) by smtp.gmail.com with ESMTPSA id h20-20020a05600c315400b004063c9f68f2sm3304052wmo.26.2023.11.17.08.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 08:12:28 -0800 (PST) From: Simon Tournier To: bug-guix@gnu.org Subject: dev: =?utf-8?B?4oCcbWFrZeKAnQ==?= of Guix fails, non-existent .git/hooks directory Date: Fri, 17 Nov 2023 16:46:59 +0100 Message-ID: <87wmug9ybw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=zimon.toutoune@gmail.com; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hi, On a very fresh install of a system, I have just cloned the Guix repository then run the dance ./bootstrap, ./configure and make. It fails because: --8<---------------cut here---------------start------------->8--- cp: cannot create regular file '.git/hooks/pre-push': No such file or directory make[2]: *** [Makefile:7454: .git/hooks/pre-push] Error 1 make[2]: Leaving directory '/home/simon/src/guix/guix' make[1]: *** [Makefile:6137: all-recursive] Error 1 make[1]: Leaving directory '/home/simon/src/guix/guix' make: *** [Makefile:4253: all] Error 2 --8<---------------cut here---------------end--------------->8--- In the file Makefile.am, nothing check that the directory .git/hooks exists before copying to it. By default, it does not seem created. At least, it was not with a fresh clone using Git from Guix revision fc6bdaa. I propose this patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=p.patch Content-Description: p.patch diff --git a/Makefile.am b/Makefile.am index cbc3191dfc..6e9a22fae5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1170,6 +1170,7 @@ cuirass-jobs: $(GOBJECTS) # Git auto-configuration. .git/hooks/pre-push: etc/git/pre-push $(AM_V_at)if test -d .git; then \ + mkdir -p .git/hooks; \ cp etc/git/pre-push .git/hooks/pre-push; \ fi --=-=-= Content-Type: text/plain Cheers, simon --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 12 02:07:33 2024 Received: (at 67240-done) by debbugs.gnu.org; 12 Nov 2024 07:07:33 +0000 Received: from localhost ([127.0.0.1]:60311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAkzs-00072Y-Ma for submit@debbugs.gnu.org; Tue, 12 Nov 2024 02:07:33 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:46564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAkzq-00072Q-9n for 67240-done@debbugs.gnu.org; Tue, 12 Nov 2024 02:07:31 -0500 Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-7240fa50694so3933257b3a.1 for <67240-done@debbugs.gnu.org>; Mon, 11 Nov 2024 23:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731395189; x=1731999989; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=EEIsmKkS5IGy2YieA7WceIhXby7aXxx1FXBelP6AJOI=; b=I+O2do5jbn1OhchAWtAEupijmin+PLyfugW3wHozvdG2xhertC8UoOdM2EbPDWGLvK +99shYY+8SuRAYG8pxDPWPQY6zq/ZL/dyYD7h9JIFOWYgk2yIlguByOpdCrPzFDF+9Uz r1d/x+g2Q28MibchwMtItnCMwX7KmLleFaTpjluzVAtpFYM9wujyaG8Fjz35dR9bknwQ bXQwigCcrS0NgfFATFUq2w68zNwsWo/1at72MpyAXfv7OU43HhUAchky8pWPVXnHC/lC e7ikWYuF7mHodVivovm6c2cayyBmTE5M2UxlBR2ym9VHus6kR4aW1m5hXNt8fNdTc1oY DrZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731395189; x=1731999989; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EEIsmKkS5IGy2YieA7WceIhXby7aXxx1FXBelP6AJOI=; b=Fcm4NJp9z3hV35mwMGdDGT8qkzFok5GC3jm7hkLOM+2KJDvjG8Re2iI5n+Diou05ZI xE5fmcmptyoOqxKKjHxdEkCrPdl47fbU2WDGp7HtWVTERG1AVAnaTUl9GCi05q0Lja2c kiQma8/GpDj200TWXQyHFcvWnApQjsR7bTzqZAX636oRlrIAMmfjH9cYIoeCX+4pp+F6 iSKoOrQ4EKiBSCI5ofwQT/IQaa09G2QmjeWh+aBYv4e5yYXS0lMEvxW1NJu518k1p2Pv jALjtN+pbQ7YTRuiogYW/lvZpMP6K9Qfcsk3TQgScAtLknByNqXXNiII54Tq6iz8nWY4 gNrA== X-Gm-Message-State: AOJu0YwCf+xulBShfiAky28gCkkcFsu2OCvOtGLpiMsYiBsZT/KI4oWK 5M0HEWmg45wj6et4tHxqcnv8PRbaVM+vPtrjmrEhOcEdqRKiDXZBLj8YzQCL X-Google-Smtp-Source: AGHT+IECVh+4AZyGvcrBIgG7pTqPo5QfOCwrRV8YKofniOmb7W2Bp6viEbLl6ItSu4NrmoogNehSiA== X-Received: by 2002:a05:6a00:1901:b0:71e:744a:3fbc with SMTP id d2e1a72fcca58-72413386f01mr21320544b3a.21.1731395188947; Mon, 11 Nov 2024 23:06:28 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724078a9ac8sm10363388b3a.79.2024.11.11.23.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 23:06:28 -0800 (PST) From: Maxim Cournoyer To: Simon Tournier Subject: Re: bug#67240: dev: =?utf-8?B?4oCcbWFrZeKAnQ==?= of Guix fails, non-existent .git/hooks directory In-Reply-To: <87wmug9ybw.fsf@gmail.com> (Simon Tournier's message of "Fri, 17 Nov 2023 16:46:59 +0100") References: <87wmug9ybw.fsf@gmail.com> Date: Tue, 12 Nov 2024 16:06:21 +0900 Message-ID: <87cyj16idu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 67240-done Cc: 67240-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Simon Tournier writes: > Hi, > > On a very fresh install of a system, I have just cloned the Guix > repository then run the dance ./bootstrap, ./configure and make. It > fails because: > > cp: cannot create regular file '.git/hooks/pre-push': No such file or directory > make[2]: *** [Makefile:7454: .git/hooks/pre-push] Error 1 > make[2]: Leaving directory '/home/simon/src/guix/guix' > make[1]: *** [Makefile:6137: all-recursive] Error 1 > make[1]: Leaving directory '/home/simon/src/guix/guix' > make: *** [Makefile:4253: all] Error 2 > > In the file Makefile.am, nothing check that the directory .git/hooks > exists before copying to it. By default, it does not seem created. At > least, it was not with a fresh clone using Git from Guix revision > fc6bdaa. It should, according to [0]: "When you initialize a new repository with git init, Git populates the hooks directory with a bunch of example scripts, many of which are useful by themselves [...]" I believe 'git clone' calls 'git init' under the hood. [0] https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks.html It also appears to do that, even using the older Guix commit you provided: $ guix time-machine -q --commit=fc6bdaa -- shell --pure git nss-certs \ -- git clone https://git.savannah.gnu.org/git/guix.git /tmp/guix $ ls /tmp/guix/.git/ branches/ config description HEAD hooks/ index info/ logs/ objects/ packed-refs refs/ As you can see; the 'hooks' directory is there. > I propose this patch attached. > > diff --git a/Makefile.am b/Makefile.am > index cbc3191dfc..6e9a22fae5 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1170,6 +1170,7 @@ cuirass-jobs: $(GOBJECTS) > # Git auto-configuration. > .git/hooks/pre-push: etc/git/pre-push > $(AM_V_at)if test -d .git; then \ > + mkdir -p .git/hooks; \ > cp etc/git/pre-push .git/hooks/pre-push; \ > fi If you could come up with a reproducer, I don't mind applying such a change, but so far it seems unnecessary? I'm tentatively closing this old report. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 12 14:24:04 2024 Received: (at 67240-done) by debbugs.gnu.org; 12 Nov 2024 19:24:04 +0000 Received: from localhost ([127.0.0.1]:39553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAwUe-0008Gv-4D for submit@debbugs.gnu.org; Tue, 12 Nov 2024 14:24:04 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:45316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAwUb-0008GU-Nk for 67240-done@debbugs.gnu.org; Tue, 12 Nov 2024 14:24:02 -0500 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-37d4c1b1455so4019909f8f.3 for <67240-done@debbugs.gnu.org>; Tue, 12 Nov 2024 11:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731439381; x=1732044181; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pA6Wya/ebEpWQGsCyMCG1EoBaEBEFDsiw9ZgVuFEUzI=; b=QeSS4oXI/noia15ETQeFOKzxlVOg/lrC460NCKoYmq0rQPfO0ueIptr7RvQHM7hEKK sJh+DFpofCJE6dfPKcm1Yk9vBJC69z9ONCBeJbakOY8/92cm4cza6jrRZr3Xex76rovk eFnJFijCq8mCTlSk5vCNGA1fF5mtVMcsyB6wVCrZVDWUk80yqNxYxr44Il7ASEQIlPbQ 42yxEVO6Zb7huPohkHOj/6N7z8rOOchDmYp7JXA6qaw05HwNvONhvHT+B0Zq6M63bRyw YcjUoKErl8rzLPbwrDc669kTRcvDQEkm5WKRiN4JMEtSSZnm70SMtKCu/lO4Iq9ehcaX hIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731439381; x=1732044181; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pA6Wya/ebEpWQGsCyMCG1EoBaEBEFDsiw9ZgVuFEUzI=; b=lbEoQOew8wl8DD1xVXBEO9qB3rWW0VYEaV4f9z3MikJ/JEaVOZeuZDqh81ZRiucOZL 2uLaynTvoSYWuFgJTb0e7GJBmSSlHhtKcAQBhhOJwAwfkGOyW8pURQKddOS47EaN3gr8 Nm+VviqL3NHfdeU4Yb+CmG6lU3kv58qVE+OCzlfYLtc0l4GJ+5QGahDc61BM1wkNHTf5 FAIjNHvSc7jvYA1hbsKOv7Yqgn8zvzhC04pPwaa7qNaeL+LT7pOrYhNvpfWzkD+Va/qH f02sgvI/4qrBQKiFrMQIiTV6HD2rAdT7x6XaiQZOz7vPGglSPVpdeNkDWJfwX2rMt7MP URYg== X-Gm-Message-State: AOJu0YyhWpwInzNk5vMKUIL2pzXTzv3oejG6Gc6EMmJM/tLiQz7dkcRo sf4+dz6ifT5W86qCUDdCfOq6scLmyOcZkrnRrH5hZDjGXxT+SFM9sF5nrw== X-Google-Smtp-Source: AGHT+IFKsi1pthXAw30+STOWnmCI71CdehG2fSBHs6wtDtXLLUmqSxaX29P50WOwtH8+ZLi1iPJUeQ== X-Received: by 2002:a5d:5f95:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-3820834a0d2mr3026525f8f.53.1731439380599; Tue, 12 Nov 2024 11:23:00 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-45.net.univ-paris-diderot.fr. [194.254.61.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432b0562642sm222980615e9.21.2024.11.12.11.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 11:23:00 -0800 (PST) From: Simon Tournier To: Maxim Cournoyer Subject: Re: bug#67240: dev: =?utf-8?B?4oCcbWFrZeKAnQ==?= of Guix fails, non-existent .git/hooks directory In-Reply-To: <87cyj16idu.fsf@gmail.com> References: <87wmug9ybw.fsf@gmail.com> <87cyj16idu.fsf@gmail.com> Date: Tue, 12 Nov 2024 20:20:18 +0100 Message-ID: <87v7wsb6od.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67240-done Cc: 67240-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, On Tue, 12 Nov 2024 at 16:06, Maxim Cournoyer w= rote: >> cp: cannot create regular file '.git/hooks/pre-push': No such file or di= rectory >> make[2]: *** [Makefile:7454: .git/hooks/pre-push] Error 1 >> make[2]: Leaving directory '/home/simon/src/guix/guix' >> make[1]: *** [Makefile:6137: all-recursive] Error 1 >> make[1]: Leaving directory '/home/simon/src/guix/guix' >> make: *** [Makefile:4253: all] Error 2 [...] >> + mkdir -p .git/hooks; \ >> cp etc/git/pre-push .git/hooks/pre-push; \ > > If you could come up with a reproducer, I don't mind applying such a > change, but so far it seems unnecessary? Bah I barely clone. ;-) Well, I am not able to reproduce too. Maybe an issue with a clone that had been completed at once. Anyway. In all, I think it=E2=80=99s always a good idea to check if the folder destination exists before copying. It costs almost nothing and it avoids spurious annoyances, as initially reported. Cheers, simon From unknown Tue Jun 17 22:28:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Dec 2024 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator