package/lrzip: Add new package lrzip (Long Range ZIP or LZMA RZIP)
PATCH 1/1 package/lrzip: Add new package lrzip (Long Range ZIP or LZMA RZIP)
From: Sam Lancia <[email protected]>
lrzip is a compression utility that excels at compressing large files (usually > 10-50 MB)
--- package/Config.in | 1 + package/lrzip/Config.in | 22 ++++++++++++++++++++++ package/lrzip/lrzip.hash | 2 ++ package/lrzip/lrzip.mk | 14 ++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 package/lrzip/Config.in create mode 100644 package/lrzip/lrzip.hash create mode 100644 package/lrzip/lrzip.mk
package/Config.in +1 -0
@@ -70,6 +70,7 @@ menu "Compressors and decompressors" source "package/lz4/Config.in" source "package/lzip/Config.in" source "package/lzop/Config.in" + source "package/lrzip/Config.in" source "package/p7zip/Config.in" source "package/pigz/Config.in" source "package/pixz/Config.in"
package/lrzip/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_PACKAGE_LRZIP + bool "lrzip" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LZO + select BR2_PACKAGE_BZIP2 + help + A compression utility that excels at compressing large files + (usually > 10-50 MB). Larger files and/or more free RAM means + that the utility will be able to more effectively compress + your files (ie: faster / smaller size), especially if the + filesize(s) exceed 100 MB. You can either choose to optimise + for speed (fast compression / decompression) or size, + but not both. + + https://github.com/ckolivas/lrzip + +comment "lrzip needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR
package/lrzip/lrzip.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 10315c20d5a47590e7220c210735ba169677824d5672509266682eccec84d952 lrzip-v0.631.tar.gz
package/lrzip/lrzip.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# lrzip +# +################################################################################ + +LRZIP_VERSION = v0.631 +LRZIP_SITE = $(call github,ckolivas,lrzip,$(LRZIP_VERSION)) +LRZIP_AUTORECONF = YES +LRZIP_LICENSE = GPL-2.0 +LRZIP_LICENSE_FILES = COPYING +LRZIP_DEPENDENCIES = zlib lzo bzip2 + +$(eval $(autotools-package))
Signature · 1 line
2.17.1
PATCH 1/1 package/lrzip: Add new package lrzip (Long Range ZIP or LZMA RZIP)
Hello Sam,
Thanks for your contribution! I was about to apply after a few fixes, but unfortunately this package doesn't build here, so a new iteration of the patch will be needed.
Quoted 6 lines · On Sat, 7 Sep 2019 19:56:15 +0100 sam at gpsm.co.uk wrote:
From: Sam Lancia <[email protected]>
lrzip is a compression utility that excels at compressing large files (usually > 10-50 MB)
Signed-off-by Sam Lancia <[email protected]>
First, the commit title should be just:
package/lrzip: new package
Quoted 4 lines
package/Config.in | 1 + package/lrzip/Config.in | 22 ++++++++++++++++++++++ package/lrzip/lrzip.hash | 2 ++ package/lrzip/lrzip.mk | 14 ++++++++++++++
Please add an entry with your name and this package in the DEVELOPERS file, so that you get notified when there are build failures about this package.
package/Config.in menu "Compressors and decompressors" · line 73
Quoted 9 lines
package/Config.in +1
-0@@ -70,6 +70,7 @@ menu "Compressors and decompressors" source "package/lz4/Config.in" source "package/lzip/Config.in" source "package/lzop/Config.in" + source "package/lrzip/Config.in"
Indentation in this file is with tabs, and you should respect the alphabetic ordering. Note that "make check-package" would have told you about the improper alphabetic ordering.
Quoted 21 lines
package/Config.in +0
-0source "package/p7zip/Config.in" source "package/pigz/Config.in" source "package/pixz/Config.in"package/lrzip/Config.in new file +12
-0@@ -0,0 +1,22 @@ +config BR2_PACKAGE_LRZIP + bool "lrzip" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LZO + select BR2_PACKAGE_BZIP2 + help + A compression utility that excels at compressing large files + (usually > 10-50 MB). Larger files and/or more free RAM means + that the utility will be able to more effectively compress
package/lrzip/Config.in line 22
Quoted 10 lines
package/lrzip/Config.in new file +10
-0+ your files (ie: faster / smaller size), especially if the + filesize(s) exceed 100 MB. You can either choose to optimise + for speed (fast compression / decompression) or size, + but not both. + + https://github.com/ckolivas/lrzip + +comment "lrzip needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR
You forgot the thread dependency here.
package/lrzip/lrzip.hash line 2
Quoted 8 lines
package/lrzip/lrzip.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed: +sha256 10315c20d5a47590e7220c210735ba169677824d5672509266682eccec84d952 lrzip-v0.631.tar.gz
You'll have to change the file name to lrzip-0.631.tar.gz, see below why.
Also, please add the hash of the COPYING file.
package/lrzip/lrzip.mk line 7
Quoted 13 lines
package/lrzip/lrzip.mk new file +7
-0@@ -0,0 +1,14 @@ +################################################################################ +# +# lrzip +# +################################################################################ + +LRZIP_VERSION = v0.631
We want this to be:
LRZIP_VERSION = 0.631
package/lrzip/lrzip.mk line 8
Quoted 1 line
package/lrzip/lrzip.mk new file +1
-0+LRZIP_SITE = $(call github,ckolivas,lrzip,$(LRZIP_VERSION))
and this to:
LRZIP_SITE = $(call github,ckolivas,lrzip,v$(LRZIP_VERSION))
Indeed, we want the VERSION variable to really only contain the version number, and not any prefix such as 'v'.
However, as said above, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LRZIP=y
# BR2_TARGET_ROOTFS_TAR is not set
It fails like this:
In file included from rzip.h:22:0,
from main.c:56:
lrzip_private.h:179:0: warning: "bswap_32" redefined
#define bswap_32(x) \
^
In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/endian.h:59:0,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/types.h:216,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/procfs.h:32,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/ucontext.h:25,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/signal.h:329,
from main.c:25:/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/byteswap.h:32:0: note: this is the location of the previous definition
#define bswap_32(x) __bswap_32 (x)
^
In file included from rzip.h:22:0,
from main.c:56:
lrzip_private.h:183:0: warning: "bswap_64" redefined
# define bswap_64(x) \
^
In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/endian.h:59:0,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/types.h:216,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/procfs.h:32,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/ucontext.h:25,
from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/signal.h:329,
from main.c:25:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/byteswap.h:36:0: note: this is the location of the previous definition
# define bswap_64(x) __bswap_64 (x)
^
In file included from decompress_demo.c:26:0:
./Lrzip.h:135:137: error: unknown type name ?va_list?
typedef void (*Lrzip_Log_Cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list args);
^
./Lrzip.h:506:34: error: unknown type name ?Lrzip_Log_Cb?
void lrzip_log_cb_set(Lrzip *lr, Lrzip_Log_Cb cb, void *log_data);
^
make[4]: *** [Makefile:791: decompress_demo.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:937: all-recursive] Error 1
make[2]: *** [Makefile:541: all] Error 2
make[1]: *** [package/pkg-generic.mk:241: /home/thomas/projets/buildroot/output/build/lrzip-0.631/.stamp_built] Error 2Could you test your package with the ./utils/test-pkg program ? It will help you find the most common/obvious build failures about your new package.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com