Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Rafał Miłecki" <rafal@milecki.pl>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH V2] package/lzma-alone: new package
Date: Wed, 9 Mar 2022 23:08:00 +0100	[thread overview]
Message-ID: <20220309220800.GF23050@scaer> (raw)
In-Reply-To: <20220308183527.17639-1-zajec5@gmail.com>

Rafał, All,

On 2022-03-08 19:35 +0100, Rafał Miłecki spake thusly:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This new package provides "lzma_alone" host binary based on the original
> LZMA SDK. It provides few extra options when compared to the LZMA Utils
> / XZ Utils project "lzma" binary (already packaged as the "lzma").
> 
> This packaging schema (LZMA SDK with lzma -> lzma_alone rename) follows
> Debian's solution. Please note that Debian also uses LZMA SDK for the
> base "lzma" tool which may be considered for Buildroot too - as an
> independent change. Similar packaging is also used by Ubuntu & Arch.
> 
> lzma_alone is a requirement for preparing firmware images for some
> Broadcom based home routers with a picky CFE bootloader. It has limited
> LZMA support and building compatible images requires specifying
> dictionary size and lc/lp/pb LZMA values manually.
> 
> Version 9.22 is used as it's the last release using .tar.bz2 format.

We could introduce a host variant of p7zip, so that we could
automatically add that to FOO_EXTRACT_DEPENDENCIES if the host does not
already have 7za (or 7zr), like we do for lzip archives for example.

> The
> same version is used by Debian.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
[--SNIP--]
> diff --git a/package/lzma-alone/lzma-alone.hash b/package/lzma-alone/lzma-alone.hash
> new file mode 100644
> index 0000000000..39759c4e3b
> --- /dev/null
> +++ b/package/lzma-alone/lzma-alone.hash
> @@ -0,0 +1 @@
> +sha256	9aade84f229fb25f7aef39d8866b375fe6d35a9e18098d7cd86a99e294902944	lzma922.tar.bz2

Fields must be separated by two spaces; fixed.

I also added the sha1 that is provided int he SF page, and approipriate
comments.

> diff --git a/package/lzma-alone/lzma-alone.mk b/package/lzma-alone/lzma-alone.mk
> new file mode 100644
> index 0000000000..6258bb4a95
> --- /dev/null
> +++ b/package/lzma-alone/lzma-alone.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# lzma-alone
> +#
> +################################################################################
> +
> +LZMA_ALONE_VERSION = 9.22
> +LZMA_ALONE_SITE = https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK
> +LZMA_ALONE_SOURCE = lzma922.tar.bz2
> +LZMA_ALONE_STRIP_COMPONENTS = 0
> +LZMA_ALONE_LICENSE = LGPL-2.1-or-later, BSD-3-Clause

The license stated in lzma.txt (at the root of the source tree) states
the "LZMA SDK is written and placed in the public domain by Igor
Pavlov."

The 'GPL' term only appears in that file, and BSD appears nowhere. Also,
the usual words in the BSD or GPL licenses do not appear in the source
at all: 'redistribution', 'provided', 'disclaimer'.

WikiPedia seems to agree that it is Public Domain since 2008 and version
4.62:
    https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm#7-Zip_reference_implementation

Fixed.

> +define HOST_LZMA_ALONE_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/C/Util/Lzma -f makefile.gcc
> +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/CPP/7zip/Bundles/LzmaCon -f makefile.gcc

Lines too long, I've split them.

> +endef
> +
> +define HOST_LZMA_ALONE_INSTALL_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/CPP/7zip/Bundles/LzmaCon/lzma $(HOST_DIR)/bin/lzma_alone

Ditto.

Applied to master, thanks.

Could you see at using a more recent version, with the p7zip host
variant I suggested above, please?

Regards,
Yann E. MORIN.

> +endef
> +
> +$(eval $(host-generic-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-03-09 22:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 18:35 [Buildroot] [PATCH V2] package/lzma-alone: new package Rafał Miłecki
2022-03-09 22:08 ` Yann E. MORIN [this message]
2022-03-10 14:12   ` Rafał Miłecki
2022-03-10 20:29     ` Arnout Vandecappelle

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

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

  git send-email \
    --in-reply-to=20220309220800.GF23050@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=rafal@milecki.pl \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=zajec5@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox