From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Trent W. Buck" Newsgroups: gmane.emacs.bugs Subject: bug#52477: 27.1; .crx and .crx3 are zip files Date: Wed, 22 Dec 2021 14:50:43 +1100 Message-ID: References: <878rwn238l.fsf@gmail.com> <87lf0l53mu.fsf@gmx.de> <83r1achpkv.fsf@gnu.org> <874k78hibe.fsf@gmx.de> <83fsqshehh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1523"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , 52477@debbugs.gnu.org, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 22 04:51:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mzsen-0000Dh-SP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Dec 2021 04:51:13 +0100 Original-Received: from localhost ([::1]:56002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzsem-00040q-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 22:51:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzsec-00040T-AR for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 22:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzseb-0000UI-Vq for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 22:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzseb-0003Fj-UH for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 22:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Trent W. Buck" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Dec 2021 03:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52477 X-GNU-PR-Package: emacs Original-Received: via spool by 52477-submit@debbugs.gnu.org id=B52477.164014506012496 (code B ref 52477); Wed, 22 Dec 2021 03:51:01 +0000 Original-Received: (at 52477) by debbugs.gnu.org; 22 Dec 2021 03:51:00 +0000 Original-Received: from localhost ([127.0.0.1]:56378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzsea-0003FU-7p for submit@debbugs.gnu.org; Tue, 21 Dec 2021 22:51:00 -0500 Original-Received: from mail-pg1-f175.google.com ([209.85.215.175]:41504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzseV-0003F9-Gn for 52477@debbugs.gnu.org; Tue, 21 Dec 2021 22:50:58 -0500 Original-Received: by mail-pg1-f175.google.com with SMTP id k4so883849pgb.8 for <52477@debbugs.gnu.org>; Tue, 21 Dec 2021 19:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oKhPW36kfUHkWQgLyEsXbGh0OVQPeTFN8snprh2GCaA=; b=j+y8Ns5rfH5NOyNt+hjDwjDSHCbNKgRQfZS/YzJ0jjJewN5e8WFa1DiXiZvNzBNXIg yZsAJ5CS/Dh4bXoqDjcRaFMGOmaRGiTunwHXf4RNWjEx1O136VZMVDxOz+eZ8DrJrMYO XdpgW7W0JvGolfH32rvURcJqCMMhsYnU2DeXH67RfhMML9snRr3ZDmFasyddd3YsiLbN Q6tNx2HBZBsLuUap0Y3OYKZAwRcUVcXKK3cvyFhs4WNmuwVHZrMZd83brI/6cSN8fldR 1ulBApjMkxF9bqbSKypfm52cDIfXvuVL1xjjZnRQNQqAMadlwQ2SKuOMi4EXeraR9ZN6 zhfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oKhPW36kfUHkWQgLyEsXbGh0OVQPeTFN8snprh2GCaA=; b=xDuT923e8XutMt3zS9jMeMJCsBA/xC+Db9rpvi93hQmR1Bk9JqRJDqD5+49MCAoBaL ZrgR6wUyPrXvISiiHyVtiBsjO/2gv3uonl9fLi5apD3W0vHCFtcbR7QWsFGrWt+0ygHk 6KHuGF+dW/99I+vw8pSskGeG8RsGz2O13ZDKty743IbPAqCp/Z/my0n1Xy5qoG2qhIGs 78m1xs/ikETNK1DXWNAgg7Cg5W35YDnhPkOXkUDnQN5Plz5Uy42u3wpoPHxhq2QlnnIN 2+47f81df/gOGxSebFHF6Zi7kiqKLPM//p6BwzX5jXOerxccEzyqa4Zw6kkRxrLlT8sr nZGA== X-Gm-Message-State: AOAM533bTLH3NUEeG1/rfdV9qAPa/mZm/Nt+wkJsjB1ilOQI2NtrmeAF w8AR79zMDY1bnl2CSLDq1ZY= X-Google-Smtp-Source: ABdhPJy9QAndJ8Ps4GtoYAPOAYBvLJvOUKkwPQuuu0yDEPGr8guAlTpMGVkFYEQFfrhry+Z3TJTqwQ== X-Received: by 2002:a63:7a05:: with SMTP id v5mr1238549pgc.83.1640145049517; Tue, 21 Dec 2021 19:50:49 -0800 (PST) Original-Received: from localhost (2403-5804-c6--add.ip6.aussiebb.net. [2403:5804:c6::add]) by smtp.gmail.com with ESMTPSA id cx5sm427446pjb.22.2021.12.21.19.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 19:50:48 -0800 (PST) Content-Disposition: inline In-Reply-To: <83fsqshehh.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222908 Archived-At: Eli Zaretskii wrote: > > From: Michael Albinus > > Cc: stefan@marxist.se, trentbuck@gmail.com, 52477@debbugs.gnu.org > > Date: Thu, 16 Dec 2021 12:59:01 +0100 > > > > > If the file doesn't follow the PKZip spec in the initial signature, > > > who knows what else in that spec doesn't it follow? The ZIP spec has > > > a lot of special rules and formatting requirements, so if a file > > > doesn't follow them, how can we support it without knowing its exact > > > format specification? > > > > ".crx" files are Chrome Extensions, as shown by Stefan. They are > > specified, see for example . > > > > Personally, I have no strong opinion whether we shall support them. > > Me neither, but if someone wants to extend arc-mode.el to support > those extension, that would be welcome, I think. My point is that we > cannot just add this file type before we implement those extensions. FTR, as the end user, I don't really care HOW it's implemented. I also don't really care about editing, i.e. read-only support is fine. I have a similar "eyeball the result" workflow for .deb using /usr/share/emacs/site-lisp/elpa-src/debian-el-37/deb-view.el Another case of "it's a zip, but" is the .pyz, which has an (optional) shebang before the PK: bash5$ mkdir MyCoolApp bash5$ touch MyCoolApp/__init__.py bash5$ echo 'print("Hello, World!")' >MyCoolApp/__main__.py bash5$ python3 -m zipapp --compress --python=/usr/bin/python3 MyCoolApp bash5$ ./MyCoolApp.pyz Hello, World! bash5$ head -n1 MyCoolApp.pyz #!/usr/bin/python3 bash5$ file MyCoolApp.pyz MyCoolApp.pyz: Zip archive data, made by v2.0 UNIX, extract using at least v2.0, last modified Tue Jun 10 02:57:41 2014, uncompressed size 23, method=deflate bash5$ emacs MyCoolApp.pyz Someone mentioned libarchive, originally from BSD, which provides a standard interface to EVERY(ish) archive and compression format. Is it reasonable for emacs to just chuck out arc-mode (and tar-mode and jka-compr) and instead just use libarchive? It's already used by vlc and a lot of GNOME stuff. libarchive already understands both .pyz and .crx3 files, at least for reading: bash5$ bsdtar -vtf MyCoolApp.pyz -rw-r--r-- 0 0 0 23 Dec 22 14:33 __main__.py -rw-r--r-- 0 0 0 0 Dec 22 14:33 __init__.py bash5$ bsdtar -vtf jamhcnnkihinmdlkakkaopbjbbcngflc_99.0.4764.2_all_nfh7crk5nxg3omjxfwx5cuhrz4.crx3 -rw-rw-r-- 0 0 0 3484 Dec 13 12:34 hyph-und-ethi.hyb -rw-rw-r-- 0 0 0 2712 Dec 13 12:34 hyph-tk.hyb -rw-rw-r-- 0 0 0 703 Dec 13 12:34 hyph-te.hyb -rw-rw-r-- 0 0 0 554 Dec 13 12:34 hyph-ta.hyb -rw-rw-r-- 0 0 0 6631 Dec 13 12:34 hyph-sl.hyb -rw-rw-r-- 0 0 0 1414 Dec 13 12:34 hyph-pt.hyb -rw-rw-r-- 0 0 0 607 Dec 13 12:34 hyph-pa.hyb -rw-rw-r-- 0 0 0 647 Dec 13 12:34 hyph-or.hyb -rw-rw-r-- 0 0 0 145263 Dec 13 12:34 hyph-nn.hyb -rw-rw-r-- 0 0 0 145263 Dec 13 12:34 hyph-nb.hyb -rw-rw-r-- 0 0 0 687 Dec 13 12:34 hyph-mr.hyb -rw-rw-r-- 0 0 0 5142 Dec 13 12:34 hyph-mn-cyrl.hyb -rw-rw-r-- 0 0 0 776 Dec 13 12:34 hyph-ml.hyb -rw-rw-r-- 0 0 0 1839 Dec 13 12:34 hyph-la.hyb -rw-rw-r-- 0 0 0 711 Dec 13 12:34 hyph-kn.hyb -rw-rw-r-- 0 0 0 605 Dec 13 12:34 hyph-hy.hyb -rw-rw-r-- 0 0 0 317251 Dec 13 12:34 hyph-hu.hyb -rw-rw-r-- 0 0 0 3031 Dec 13 12:34 hyph-hr.hyb -rw-rw-r-- 0 0 0 687 Dec 13 12:34 hyph-hi.hyb -rw-rw-r-- 0 0 0 655 Dec 13 12:34 hyph-gu.hyb -rw-rw-r-- 0 0 0 35824 Dec 13 12:34 hyph-ga.hyb -rw-rw-r-- 0 0 0 8165 Dec 13 12:34 hyph-fr.hyb -rw-rw-r-- 0 0 0 665 Dec 13 12:34 hyph-eu.hyb -rw-rw-r-- 0 0 0 21421 Dec 13 12:34 hyph-et.hyb -rw-rw-r-- 0 0 0 14995 Dec 13 12:34 hyph-es.hyb -rw-rw-r-- 0 0 0 59802 Dec 13 12:34 hyph-en-us.hyb -rw-rw-r-- 0 0 0 46607 Dec 13 12:34 hyph-en-gb.hyb -rw-rw-r-- 0 0 0 120218 Dec 13 12:34 hyph-de-ch-1901.hyb -rw-rw-r-- 0 0 0 120412 Dec 13 12:34 hyph-de-1996.hyb -rw-rw-r-- 0 0 0 121393 Dec 13 12:34 hyph-de-1901.hyb -rw-rw-r-- 0 0 0 6967 Dec 13 12:34 hyph-da.hyb -rw-rw-r-- 0 0 0 35913 Dec 13 12:34 hyph-cy.hyb -rw-rw-r-- 0 0 0 52842 Dec 13 12:34 hyph-cu.hyb -rw-rw-r-- 0 0 0 703 Dec 13 12:34 hyph-bn.hyb -rw-rw-r-- 0 0 0 3467 Dec 13 12:34 hyph-bg.hyb -rw-rw-r-- 0 0 0 6098 Dec 13 12:34 hyph-be.hyb -rw-rw-r-- 0 0 0 703 Dec 13 12:34 hyph-as.hyb -rw-r--r-- 0 0 0 178 Dec 13 12:34 manifest.json drwxrwxr-x 0 0 0 0 Dec 13 12:34 _metadata/ -rw-rw-r-- 0 0 0 5698 Dec 13 12:34 _metadata/verified_contents.json