unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Cc: Timothy Sample <samplet@ngyro.com>
Subject: disarchive: disassemble then assemble tarball
Date: Mon, 03 Apr 2023 16:58:50 +0200	[thread overview]
Message-ID: <87sfdhf1w5.fsf@gmail.com> (raw)

Hi,

Discussing in #62153 [1], it is noticed that Disarchive is not working
as expected.

For instance, using the ’gnu’ folder containing ’.go’ files.

    $ tar cvf my-gnu.tar gnu

    $ guix shell disarchive guile guile-lzma
    $ mkdir sha256

    $ guile
 scheme@(guile-user)> ,module(disarchive assemblers tarball)
 scheme@(disarchive assemblers tarball)> (assemble-tarball (disassemble-tarball "my-gnu.tar") ".")
 scheme@(disarchive assemblers tarball)> ,q

    $ ls sha256/
7a94f577d3235a5ab954f0bc56b15fbe5518c56354c4235574618f6e666f6a38
    $ file sha256/7a94f577d3235a5ab954f0bc56b15fbe5518c56354c4235574618f6e666f6a38
sha256/7a94f577d3235a5ab954f0bc56b15fbe5518c56354c4235574618f6e666f6a38: POSIX tar archive (GNU)

    $ tar tf sha256/7a94f577d3235a5ab954f0bc56b15fbe5518c56354c4235574618f6e666f6a38
gnu/
gnu/ci.scm
gnu/tests/databases.go
gnu/packages/gpodder.scm

[...]

gnu/build/accounts.go
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

    $ disarchive disassemble my-gnu.tar > spec
Disassembling the tarball my-gnu.tar
Read 2741 headers
Extracting the tarball my-gnu.tar
Disassembling the directory my-gnu
Saving directory in cache: /tmp/disarchive-directory.GGqLse/sha256/e9013143a529feb6568dbe42d6587d6fcebe4b264f1e955cc0d614c52125c998
Finished disassembly of my-gnu.tar
Checking that it can be assembled... ok
Checking that it can be deserialized... ok

    $ tail spec
       (chksum 5343)))
    (padding 0)
    (input (directory-ref
             (version 0)
             (name "my-gnu")
             (addresses
               (swhid "swh:1:dir:5acd725958b0642e98cabb4cb2db670f2e32384e"))
             (digest
               (sha256
                 "e9013143a529feb6568dbe42d6587d6fcebe4b264f1e955cc0d614c52125c998"))))))

Well, I am not sure to understand why the name “my-gnu”.  And then I do
not understand how to use “disarchive assemble”; I get something like:

--8<---------------cut here---------------start------------->8---
Checking my-gnu digest... fail
Output is incorrect
--8<---------------cut here---------------end--------------->8---

What do I do wrong?

1: https://issues.guix.gnu.org/msgid/87h6ugapwh.fsf@gmail.com


Cheers,
simon


             reply	other threads:[~2023-04-03 16:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 14:58 Simon Tournier [this message]
2023-04-03 20:19 ` disarchive: disassemble then assemble tarball Timothy Sample
2023-04-03 21:08   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfdhf1w5.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=samplet@ngyro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).