Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
> Op 3 dec. 2018, om 23:20 heeft Daniel Engberg > het volgende geschreven: > > On 2018-12-03 23:05, Paul Oranje wrote: >>> Op 3 dec. 2018, om 10:57 heeft Daniel Engberg >>> het volgende geschreven: >>> Hi, >>> Perhaps its worth considering adding bsdtar / libarchive >>> (https://www.libarchive.org/) instead which handles various formats >>> including zip (via zlib) and is still active? Another possible benefit >>> would be that you would consolidate a few more tools into one. >> On macOSX which has BSD tar the man pages states that it can extract >> ZIP files, but it not that it can *create* ZIP files. > > Perhaps a very old version? > > "tar -a -cf archive.zip source.c source.h" > https://www.freebsd.org/cgi/man.cgi?query=bsdtar&sektion=1 > > Also listed as supported here: > https://github.com/libarchive/libarchive/wiki/LibarchiveFormats > > Works fine on FreeBSD 11.2 (version string below) > > bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 Indeed, macOS 10.14.1 (Mojave) carries an old version. $ tar --version bsdtar 2.8.3 - libarchive 2.8.3 > >>> Best regards, >>> Daniel >>> ___ >>> openwrt-devel mailing list >>> openwrt-devel@lists.openwrt.org >>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
On 2018-12-03 23:05, Paul Oranje wrote: Op 3 dec. 2018, om 10:57 heeft Daniel Engberg het volgende geschreven: Hi, Perhaps its worth considering adding bsdtar / libarchive (https://www.libarchive.org/) instead which handles various formats including zip (via zlib) and is still active? Another possible benefit would be that you would consolidate a few more tools into one. On macOSX which has BSD tar the man pages states that it can extract ZIP files, but it not that it can *create* ZIP files. Perhaps a very old version? "tar -a -cf archive.zip source.c source.h" https://www.freebsd.org/cgi/man.cgi?query=bsdtar&sektion=1 Also listed as supported here: https://github.com/libarchive/libarchive/wiki/LibarchiveFormats Works fine on FreeBSD 11.2 (version string below) bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 Best regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
> Op 3 dec. 2018, om 10:57 heeft Daniel Engberg > het volgende geschreven: > > Hi, > > Perhaps its worth considering adding bsdtar / libarchive > (https://www.libarchive.org/) instead which handles various formats including > zip (via zlib) and is still active? Another possible benefit would be that > you would consolidate a few more tools into one. On macOSX which has BSD tar the man pages states that it can extract ZIP files, but it not that it can *create* ZIP files. > > Best regards, > Daniel > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
Hi, Perhaps its worth considering adding bsdtar / libarchive (https://www.libarchive.org/) instead which handles various formats including zip (via zlib) and is still active? Another possible benefit would be that you would consolidate a few more tools into one. Best regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
On 15/10/2018 23:24, Sven Roederer wrote: Am Donnerstag, 11. Oktober 2018, 19:34:35 CEST schrieb Sven Roederer: tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate the firmwareimage. Thinking of this again, I wonder if it would be the proper way to build the zip-tool as y host-command like we do for tar and xz? Sven I fully agree ... John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: depend on host zip tool
Am Donnerstag, 11. Oktober 2018, 19:34:35 CEST schrieb Sven Roederer: > tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate > the firmwareimage. Thinking of this again, I wonder if it would be the proper way to build the zip-tool as y host-command like we do for tar and xz? Sven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] build: depend on host zip tool
tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate the firmwareimage. /* now that we got the rootfs, repeat the whole thing again(sorta): * 1. zip the rootfs */ char *zipper = malloc(5 + 2*strlen(rootfs.file_name) + 4); sprintf(zipper, "%s %s %s", "zip ", zipfsname, rootfs.file_name); int ret = system(zipper); Check that the zip command is installed on the host. Signed-off-by: Sven Roederer --- include/prereq-build.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index a416a2d232..1cb560c506 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -128,6 +128,9 @@ $(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \ gstat -c%s $(TOPDIR)/Makefile, \ stat -c%s $(TOPDIR)/Makefile)) +$(eval $(call SetupHostCommand,zip,Please install 'zip', \ + zip -h)) + $(eval $(call SetupHostCommand,unzip,Please install 'unzip', \ unzip 2>&1 | grep zipfile, \ unzip)) -- 2.11.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel