From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#35603: Go build system mishandles repetitive import paths (was [PATCH] build: go-build-system: Ensure uniform unpacking directory.) Date: Mon, 6 May 2019 11:42:49 -0400 Message-ID: <20190506154249.GA9060@jasmine.lan> References: <87tvf1nshy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNfme-0002yJ-QI for bug-guix@gnu.org; Mon, 06 May 2019 11:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNfmd-0005SR-0K for bug-guix@gnu.org; Mon, 06 May 2019 11:44:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNfmc-0005Rw-Rb for bug-guix@gnu.org; Mon, 06 May 2019 11:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNfmc-00022g-L5 for bug-guix@gnu.org; Mon, 06 May 2019 11:44:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:39484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNflW-0002vI-4O for bug-guix@gnu.org; Mon, 06 May 2019 11:42:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNflV-0003hZ-4C for bug-guix@gnu.org; Mon, 06 May 2019 11:42:54 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38635) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNflU-0003ff-Qa for bug-guix@gnu.org; Mon, 06 May 2019 11:42:53 -0400 Content-Disposition: inline In-Reply-To: <87tvf1nshy.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Maxim Cournoyer Cc: 35603@debbugs.gnu.org --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 14, 2019 at 12:03:05AM -0400, Maxim Cournoyer wrote: > From 1f7535fbe28f7ac96e824b792e9f1a140b8c54cd Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > Date: Fri, 5 Apr 2019 00:00:08 -0400 > Subject: [PATCH 3/3] build: go-build-system: Ensure uniform unpacking > directory. >=20 > Depending on whether the source is a directory or an archive, we strip the > source directory or preserve it, respectively. This change makes it so t= hat > whether the type of the source, it is unpacked at the expected location g= iven > by the IMPORT-PATH of the Go build system. >=20 > * guix/build/go-build-system.scm: Add the (ice-9 ftw) module. > (unpack): Add inner procedure to maybe strip the top level directory of an > archive, document it and use it. This commit (or patch series) broke the build of Syncthing and maybe others. It seems like the the new unpacking code is stripping duplicate directory names? It fails like this: ------ starting phase `increase-test-timeout' Backtrace: 6 (primitive-load "/gnu/store/yfvy06fscz726da5wjvh9jxjsah=E2=80= =A6") In ice-9/eval.scm: 191:35 5 (_ _) In srfi/srfi-1.scm: 863:16 4 (every1 # =E2=80=A6) In /gnu/store/zmc0hcmdfg5n4kl32vcla4cg9c9bspfg-module-import/guix/build/gnu= -build-system.scm: 799:28 3 (_ _) In ice-9/eval.scm: 619:8 2 (_ #(#(#) (#:inputs # =E2=80=A6= ))) In /gnu/store/zmc0hcmdfg5n4kl32vcla4cg9c9bspfg-module-import/guix/build/uti= ls.scm: 635:19 1 (with-atomic-file-replacement "src/github.com/syncthin=E2=80= =A6" =E2=80=A6) In unknown file: 0 (mkstemp! "src/github.com/syncthing/syncthing/build.go=E2=80= =A6" =E2=80=A6) ERROR: In procedure mkstemp!: In procedure mkstemp!: No such file or directory ------ And indeed, if you keep the failed build directory, you will see that the path 'src/github.com/syncthing/syncthing' does not exist, even though this corresponds to the Go import path specified in the package definition. Instead it is like src/github.com/syncthing' which is incorrect. --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlzQVfYACgkQJkb6MLrK fwgSYA//Tygac1w4WpJpQuHUnQAzCGoWN2g5ZR9kz811zK4Qzz48LNPLq1sB0OQ6 oZnEVPY/fPOmLuajlEzkHJ+3kqcivD9ouYdTJZpyuFWuZT4Ze7E/PRfYKj9z6TpC HVf3Zj59wNzO70SO928/TPjEEWxhUnAOs1kpBX6kUs7OR6akKHBPFKMsS395V4x0 aH9ucxhrSx3lAZPJ19o92Z8OrHHJ9J/QXxlLhjIBUnQq94rn26N0BxGYifHPSY9e vMiu6SpeT559zKfdC1JXDHq5mUrRP6Nbqt6O4P8Tnxl2kJWAYH8cw6Yg4ahwrQF2 p+ws1KNpqKj5rl3oMrezzmFzpwgl+hsQTUaMtpvhFFOoOc70Dr38m7YTLZAGOWwq hLxbWBJEfcqo1tmKunS6rbkMIr70g24qrGHs5KNk6PZql2IFTtiNlpSqEarjifQE VBK29Q5hK/27QtrWQwfD4x4305ZYnujAL0OQusgyTxmEmL22LkQVA7ZDFOsAAvP+ +h4uokWUIArZ62f8HC9Cy1es/juD5im76TswM7bNjehASeSr5zqst0AOta9+REZh UlkgMpTgTWVDVsJ8kWLsAuqwZ6VW0yBFUtMueUicr5Ly9qPm8UogcdxXHPQ5Njm6 07DIsquiS2NG+tnOtTnB7JFUb4puDw9u+dXUJ2v3keD4BqtinZk= =b/W/ -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3--