From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Serghei Newsgroups: gmane.emacs.devel Subject: Re: Install bnf-mode from the tar archive Date: Mon, 20 Jan 2020 17:31:57 +0000 Message-ID: <633e0139-91d7-544b-fd10-64d37b4a4ec5@protonmail.ch> References: <377dd7bd-a3ef-83f7-89fa-7d2a5f29d9be@protonmail.ch> <669fe055-f5b4-4423-4eba-b8b9508982dd@protonmail.ch> Reply-To: Serghei Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_e902bd82e902f459af781d429546a444" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47319"; mail-complaints-to="usenet@ciao.gmane.io" Cc: GNU Emacs Developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 20 18:33:54 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itavy-000C7a-94 for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Jan 2020 18:33:54 +0100 Original-Received: from localhost ([::1]:40714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itavx-0000fy-1i for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Jan 2020 12:33:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40205) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itauM-0007hM-Bf for emacs-devel@gnu.org; Mon, 20 Jan 2020 12:32:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itauI-0006W7-DI for emacs-devel@gnu.org; Mon, 20 Jan 2020 12:32:13 -0500 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]:24984) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itauH-0006VF-Np for emacs-devel@gnu.org; Mon, 20 Jan 2020 12:32:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1579541526; bh=76KsddzGgAxLjo6cCmCIejSnZT3qM1pcZUncVtHES94=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=f1A8fh6dYCiW/5kdL0pDV2cZtf86yQq27NhhgC3jXyizjW0snu2GzMgSmxv1Pem2K KKv/SqMvwULZ0zQMbgqHwfxpH+7FYfv/UD2ApPplyqpbklZSEgA3crljfmaBv6kjKr mhOlhp7afE3GhmI0DcCf+T865Rf5VpLHUeQVkKSM= In-Reply-To: Feedback-ID: _R8KJzte5sz8SQWHcnDN91Kshyr4gZBHh1d2Efk8ItHfFJEyfsSrvYKxlFgM-K6SqCAHswKFjJZAghkXSedbVg==:Ext:ProtonMail X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.70.40.134 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244425 Archived-At: This is a multi-part message in MIME format. --b1_e902bd82e902f459af781d429546a444 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Stefan, Should a file an issue in the particular bug tracker (I don't know in which one)?=C2=A0 Or we can just cc `tar-mode' maintainer? As I realized the main problem is the tar format.=C2=A0 Using bsdtar with `--format=3Dustar' flag (which is POSIX-standard) does the trick. However bsdtar uses =E2=80=9Cpax interchange=E2=80=9D format by default and= this is not implemented properly in the `tar-mode'. On 1/19/20 3:18 PM, Stefan Monnier wrote: >> I have managed to fix the issue just by replacing bsdtar by GNU tar. > I guess that deserves a bug report (the bug is not in > the package manager but in tar-mode.el which seems not to support some > of the formats used by bsdtar). > > > Stefan > > >> For the full list of changes refer to: >> https://github.com/sergeyklay/bnf-mode/commit/309f05a781dc05999e8f0530f2= 3089f38dd0fde6 >> >> On 1/18/20 5:08 PM, Serghei wrote: >>> Hello, >>> >>> I am the bnf-mode[1] creator. I am trying to figure out what >>> happens when I install the mode from the tar archive. Frankly >>> speaking, I get a strange error message. >>> >>> You can see the fresh Makefile I use to create tar archive at GitHub >>> repo[2]. All I need to create a tar archive is a command >>> `make package'. And it seems it works as expected. However, after >>> creating the archive, I was failed to install it. After changing >>> this line[3] as follows: >>> >>> diff --git a/Makefile b/Makefile >>> index c04c01c..d11ac3d 100644 >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -122,7 +122,8 @@ package: $(PACKAGE_NAME).tar >>> >>> .PHONY: install >>> install: $(PACKAGE_NAME).tar >>> - $(EMACS) --batch -l package -f package-initialize --eval >>> "(package-install-file \"$(PWD)/$(PACKAGE_NAME).tar\")" >>> + $(EMACS) --batch -l package -f package-initialize --eval \ >>> + "(let ((debug-on-error t))(package-install-file >>> \"$(PWD)/$(PACKAGE_NAME).tar\"))" >>> >>> .PHONY: help >>> help: .title >>> >>> I got the following debug trace: >>> >>> $ make install >>> Parsing tar file... >>> Parsing tar file...done >>> Debugger entered--Lisp error: (wrong-type-argument arrayp nil) >>> tar--describe-as-link(nil) >>> tar--check-descriptor(nil) >>> tar-get-file-descriptor("bnf-mode-0.4.3/PaxHeader/PaxHeader-pkg.el") >>> package-tar-file-info() >>> package-install-from-buffer() >>> package-install-file("/home/klay/work/bnf-mode/bnf-mode-0.4.3.tar") >>> (let ((debug-on-error t)) (package-install-file >>> "/home/klay/work/bnf-mode/bnf-mode-0.4.3.tar")) >>> eval((let ((debug-on-error t)) (package-install-file >>> "/home/klay/work/bnf-mode/bnf-mode-0.4.3.tar"))) >>> command-line-1(("-l" "package" "-f" "package-initialize" "--eval" >>> "(let ((debug-on-error t))(package-install-file >>> \"/home/klay/work/bnf-mode/bnf-mode-0.4.3.tar\"))")) >>> command-line() >>> normal-top-level() >>> >>> make: *** [Makefile:125: install] Error 255 >>> >>> I have no idea what is PaxHeader/PaxHeader-pkg.el and even stranger >>> that after inspecting `tar-mode' I found this: >>> >>> (defun tar-get-file-descriptor (file) >>> ;; Used by package.el. >>> (let ((desc ())) >>> (dolist (hdr tar-parse-info) >>> (when (equal file (tar-header-name hdr)) >>> (setq desc hdr))) >>> (tar--check-descriptor desc) >>> desc)) >>> >>> As you can see without any validation `desc' was passed to >>> `tar--check-descriptor` defun. The `tar--check-descriptor` is just >>> calls `tar--describe-as-link`: >>> >>> (defun tar--check-descriptor (descriptor) >>> (let ((link-desc (tar--describe-as-link descriptor))) >>> (when link-desc >>> (error "This is %s, not a real file" link-desc)))) >>> >>> And finally it calls `tar-header-link-type': >>> >>> (defun tar--describe-as-link (descriptor) >>> (let ((link-p (tar-header-link-type descriptor))) >>> (if link-p >>> =09(cond ((eq link-p 5) "a directory") >>> ((eq link-p 20) "a tar directory header") >>> ((eq link-p 28) "a next has longname") >>> ((eq link-p 29) "a multivolume-continuation") >>> ((eq link-p 35) "a sparse entry") >>> ((eq link-p 38) "a volume header") >>> ((eq link-p 55) "a pax global extended header") >>> ((eq link-p 72) "a pax extended header") >>> (t "a link"))))) >>> >>> I will be happy for any help and tips in the right direction. >>> >>> N.B. My GNU Emacs version is 26.3 on Debian/GNU Linux 10. >>> >>> >>> [1]: https://elpa.gnu.org/packages/bnf-mode.html >>> [2]: >>> https://github.com/sergeyklay/bnf-mode/blob/87c779851e44aab6639cdf2ab69= 9aa9cd41f97c7/Makefile >>> [3]: >>> https://github.com/sergeyklay/bnf-mode/blob/87c779851e44aab6639cdf2ab69= 9aa9cd41f97c7/Makefile#L125 >>> >>> -- >>> Serghei >>> >>> > --b1_e902bd82e902f459af781d429546a444 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=signature.asc LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ2dBZEZpRUV2RW02T2RTcUFw N0lSUXBheHE4UUZydmVxQUFGQWw0bDVBb0FDZ2tReHE4UUZydmUKcUFEcFh3LzlGMVB0V1RhL2kr azJ0ZVlFMyt5UXk0TUJJUUViZkUyRXpXcmRTR1BFRGFpeWZabkZXdXpNN3pJMQpDUmxFT092VGlG SkZzRU5wczZ6cjVGaGR1R0VwRmlIWDRwRGM3dW9iQ2xTd05BOU84T3IyNEw5aU5ydVVDYjZLCjRm QlRBT3VjYTIzRXMxVmtlNzdpLzYrVEkxQS9OMSs1Yi8yd0xWVnpNemppVnVDcXJKbTF3SjJkeGhN YWdkOG4KSklYK29zNEJ3NkFnM2c0L1FSbjBiK1VKbnBDeXJwY0RVdDhjTm5jUmRYU1hrRnUvYUwv bGJqK2V2ZDJpaGxRMgowTC8vQUQ4MEFVZHd5dVRBOTJCTjJGZlpOa1lDSXV0cmI2ajIvTWEzQmhI aXFwU0FGOWNRKzZ4TTY0QnBmd0YzCnVvaWVnbTRlS0RHWlhZTkYzVGNsSW5hbzVHWTdna2R6UnB0 OVBaWTlSNUgvYzdQSlVJOUwwb1M1QURSN0trcm0KaXQ2aVcvRnBicXMrN0hHbm1zeTI0YlZRaUNZ ZVlEbVRuMFg5eXJwdkE2Vjl5YmQxTUY1TzJ2QUd6OG9yK1Fvdwpqb2lvaXBmN0U3WVhJb0dXTG95 KzFQRXNDRjV2RjBxWkNFT2pFVXJyK25CSU8vSjh5aDdlUFZNT04rR2Vrc21yCjRiSjVnSFZmdE93 bnhEc0ZDMUxhM3N6UVo1cFlpeGhJNVRZQXBxdWU5YXh4RDc2eTlVSW5zSjVSMVJwelljNSsKaDJQ SXI0UWNBRFJXWmU0eEl4L2JLSWFyWVRsbFJWV2VMbG9VY0RiS1czeFJITnVSM1JudlNMazFsT2ZO aTdIMwpzOU4xM1lKdjNZRmVrQVdIYXFzZ1c3TjJiYVEzS1JXR0Z4TEtSUEgxWHVldGtSMkxOWXM9 Cj1pb3BhCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQo= --b1_e902bd82e902f459af781d429546a444--