unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 45774-done@debbugs.gnu.org, 45773-done@debbugs.gnu.org
Subject: bug#45773: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files.
Date: Tue, 26 Jan 2021 22:57:22 -0500	[thread overview]
Message-ID: <87wnvzyqu5.fsf_-_@gmail.com> (raw)
In-Reply-To: <87k0sfl5pc.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 14 Jan 2021 13:43:43 -0500")

Hi Ludo,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi Ludovic,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi!
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> Before this change, only plain directories, tar or zip archives were supported
>>> as the source of a package for the GNU build system; anything else would cause
>>> the unpack phase to fail.  Origins relying on snippets would suffer from the
>>> same problem.
>>>
>>> This change adds the support to use files of the following extensions: .gz,
>>> .Z, .bz2, .lz, and .xz, even when they are not tarballs.  Files of unknown
>>> extensions are treated as uncompressed files and supported as well.
>>>
>>> * guix/packages.scm (patch-and-repack): Only add the compressor utility to the
>>> PATH when the file is compressed.  Bind more inputs in the mlet, and use them
>>> for decompressing single files.  Adjust decompression and compression routines.
>>> [decompression-type]: Return #f when no known compression extension is used.
>>> [tarball?]: New nested procedure.
>>> * guix/build/utils.scm (compressor, tarball?): New procedures.  Move
>>> %xz-parallel-args to the new 'compression helpers' section.
>>> * tests/packages.scm: Add tests.  Add missing copyright year for Jan.
>>> * guix/build/gnu-build-system.scm (first-subdirectory): Return #f when no
>>> sub-directory was found.
>>> (unpack): Support more file types, including uncompressed plain files.
>>> ---
>>>  guix/build/gnu-build-system.scm |  24 ++++++--
>>>  guix/build/utils.scm            |  47 ++++++++++-----
>>>  guix/packages.scm               | 100 +++++++++++++++++---------------
>>>  guix/tests.scm                  |  40 ++++++++++++-
>>>  tests/builders.scm              |  40 ++++++++++++-
>>>  tests/packages.scm              |  69 +++++++++++++++++++++-
>>>  6 files changed, 247 insertions(+), 73 deletions(-)
>>
>> How frequent is it for an origin to be a regular file other than an
>> archive?  The underlying question for me is: will this generalization
>> and increased complexity pay off?  WDYT?
>
> I think consistency is the main driver here.  The url-fetch method
> supports single file sources; it makes sense that the other components
> handling sources support it as well.  It's hard to judge of the
> popularity of such a feature when it's never been available; but some
> use cases come to mind such as single Emacs package file.  I've made use
> of such feature for the new texlive-updmap.cfg definition in
> <http://issues.guix.gnu.org/45870>.

I've been building a sizable part of core-updates on top of this change
now for nearly two weeks, and in this time it's already come handy
twice.

I've made sure the tests ran fine and pushed to core-updates as commit
cfcead2e515c0dae02127e5a76496463898be6b6.

Let me know if anything breaks :-).

Maxim




  reply	other threads:[~2021-01-27  3:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 20:05 [bug#45774] [PATCH core-updates 1/1] guix: packages: Allow patch-and-repack to work with plain files Maxim Cournoyer
2021-01-13 17:40 ` [bug#45774] [PATCH core-updates v2] build-systems/gnu: Allow unpacking/repacking more kind of files Maxim Cournoyer
2021-01-14 17:48   ` [bug#45773] [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files Ludovic Courtès
2021-01-14 18:43     ` Maxim Cournoyer
2021-01-27  3:57       ` Maxim Cournoyer [this message]
2021-01-18 16:51 ` [bug#45774] [PATCH core-updates v3 1/2] utils: Retrieve the store prefix from NIX_STORE_DIR, not STORE_DIR Maxim Cournoyer
2021-01-18 16:51   ` [bug#45774] [PATCH core-updates v3 2/2] build-systems/gnu: Allow unpacking/repacking more kind of files Maxim Cournoyer
2021-01-27  3:58   ` [bug#45774] bug#45958: [PATCH core-updates v3 1/2] utils: Retrieve the store prefix from NIX_STORE_DIR, not STORE_DIR Maxim Cournoyer
2021-01-27 23:10     ` [bug#45958] " Ludovic Courtès

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=87wnvzyqu5.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=45773-done@debbugs.gnu.org \
    --cc=45774-done@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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).