From mboxrd@z Thu Jan 1 00:00:00 1970 From: ummeegge To: development@lists.ipfire.org Subject: Re: [PATCH] LZ4: New compression library. Date: Mon, 22 Jan 2018 19:55:11 +0100 Message-ID: <108426EC-F352-42F5-A58A-E6CE148A3F46@ipfire.org> In-Reply-To: <1516561369.2373.3.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1963982719643442695==" List-Id: --===============1963982719643442695== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, thanks for your help and feedback. Have also deleted the 'DEPS =3D "" ' line in LFS since this lib goes to= common. Thanks for reviewing. Best, Erik Am 21.01.2018 um 20:02 schrieb Michael Tremer: > Hello, >=20 > good patch. Just a few minor things... >=20 > On Sun, 2018-01-21 at 17:24 +0100, Erik Kapfer wrote: >> New lossless data compression algorithm. >>=20 >> Signed-off-by: Erik Kapfer >> --- >> config/rootfiles/common/lz4 | 17 +++++ >> lfs/lz4 | 87 ++++++++++++++++++++++= ++++ >> make.sh | 1 + >> src/patches/lz4-1.8.1.2_mod_install_path.patch | 36 +++++++++++ >> 4 files changed, 141 insertions(+) >> create mode 100644 config/rootfiles/common/lz4 >> create mode 100644 lfs/lz4 >> create mode 100644 src/patches/lz4-1.8.1.2_mod_install_path.patch >>=20 >> diff --git a/config/rootfiles/common/lz4 b/config/rootfiles/common/lz4 >> new file mode 100644 >> index 0000000..3b8bc2f >> --- /dev/null >> +++ b/config/rootfiles/common/lz4 >> @@ -0,0 +1,17 @@ >> +usr/bin/lz4 >> +#usr/bin/lz4c >> +#usr/bin/lz4cat >> +#usr/bin/unlz4 >> +#usr/include/lz4.h >> +#usr/include/lz4frame.h >> +#usr/include/lz4frame_static.h >> +#usr/include/lz4hc.h >> +#usr/lib/liblz4.a >> +usr/lib/liblz4.so >=20 > There is no need to ship the *.so file. Just the *.so.* files are > needed. >=20 >> +usr/lib/liblz4.so.1 >> +usr/lib/liblz4.so.1.8.1 >> +#usr/lib/pkgconfig/liblz4.pc >> +#usr/share/man/man1/lz4.1 >> +#usr/share/man/man1/lz4c.1 >> +#usr/share/man/man1/lz4cat.1 >> +#usr/share/man/man1/unlz4.1 >> diff --git a/lfs/lz4 b/lfs/lz4 >> new file mode 100644 >> index 0000000..6f2bef2 >> --- /dev/null >> +++ b/lfs/lz4 >> @@ -0,0 +1,87 @@ >> +#########################################################################= ###### >> +# = # >> +# IPFire.org - A linux based firewall = # >> +# Copyright (C) 2018 IPFire Team = # >> +# = # >> +# This program is free software: you can redistribute it and/or modify = # >> +# it under the terms of the GNU General Public License as published by = # >> +# the Free Software Foundation, either version 3 of the License, or = # >> +# (at your option) any later version. = # >> +# = # >> +# This program is distributed in the hope that it will be useful, = # >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the = # >> +# GNU General Public License for more details. = # >> +# = # >> +# You should have received a copy of the GNU General Public License = # >> +# along with this program. If not, see . = # >> +# = # >> +#########################################################################= ###### >> + >> +#########################################################################= ###### >> +# Definitions >> +#########################################################################= ###### >> + >> +include Config >> + >> +VER =3D 1.8.1.2 >> + >> +THISAPP =3D lz4-$(VER) >> +DL_FILE =3D $(THISAPP).tar.gz >> +DL_FROM =3D $(URL_IPFIRE) >> +DIR_APP =3D $(DIR_SRC)/$(THISAPP) >> +TARGET =3D $(DIR_INFO)/$(THISAPP) >> +PROG =3D lz4 >> + >> +DEPS =3D "" >> + >> +#########################################################################= ###### >> +# Top-level Rules >> +#########################################################################= ###### >> + >> +objects =3D $(DL_FILE) >> + >> +$(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) >> + >> +$(DL_FILE)_MD5 =3D 343538e69ba752a386c669b1a28111e2 >> + >> +install : $(TARGET) >> + >> +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) >> + >> +download :$(patsubst %,$(DIR_DL)/%,$(objects)) >> + >> +md5 : $(subst %,%_MD5,$(objects)) >> + >> +dist:=20 >> + @$(PAK) >> + >> +#########################################################################= ###### >> +# Downloading, checking, md5sum >> +#########################################################################= ###### >> + >> +$(patsubst %,$(DIR_CHK)/%,$(objects)) : >> + @$(CHECK) >> + >> +$(patsubst %,$(DIR_DL)/%,$(objects)) : >> + @$(LOAD) >> + >> +$(subst %,%_MD5,$(objects)) : >> + @$(MD5) >> + >> +#########################################################################= ###### >> +# Installation Details >> +#########################################################################= ###### >> + >> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> + @$(PREBUILD) >> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) >> + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/lz4-1.8.1.2_mod_ins= tall_path.patch >> + >> + cd $(DIR_APP) && make $(MAKETUNING) >> + cd $(DIR_APP) && make install >> + >> + @rm -rf $(DIR_APP) >> + @$(POSTBUILD) >> + >> + >> diff --git a/make.sh b/make.sh >> index 3f10ffa..21b928d 100755 >> --- a/make.sh >> +++ b/make.sh >> @@ -1032,6 +1032,7 @@ buildipfire() { >> export LOGFILE >> lfsmake2 configroot >> lfsmake2 initscripts >> + lfsmake2 lz4 >> lfsmake2 backup >> lfsmake2 pkg-config >> lfsmake2 libusb >=20 > Not sure if this needs to be built so early in the build process. > Wouldn't it be fine to build it where LZO is? >=20 >> diff --git a/src/patches/lz4-1.8.1.2_mod_install_path.patch b/src/patches/= lz4-1.8.1.2_mod_install_path.patch >> new file mode 100644 >> index 0000000..8b9646e >> --- /dev/null >> +++ b/src/patches/lz4-1.8.1.2_mod_install_path.patch >> @@ -0,0 +1,36 @@ >> +diff -Nur lz4-1.8.1.2.orig/lib/Makefile lz4-1.8.1.2/lib/Makefile >> +--- lz4-1.8.1.2.orig/lib/Makefile 2018-01-21 07:24:41.881357925 +0000 >> ++++ lz4-1.8.1.2/lib/Makefile 2018-01-21 07:25:44.823444081 +0000 >> +@@ -120,7 +120,7 @@ >> + # directory variables : GNU conventions prefer lowercase >> + # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.= html >> + # support both lower and uppercase (BSD), use uppercase in script >> +-prefix ?=3D /usr/local >> ++prefix ?=3D /usr >> + PREFIX ?=3D $(prefix) >> + exec_prefix ?=3D $(PREFIX) >> + libdir ?=3D $(exec_prefix)/lib >> +diff -Nur lz4-1.8.1.2.orig/NEWS lz4-1.8.1.2/NEWS >> +--- lz4-1.8.1.2.orig/NEWS 2018-01-21 07:24:41.809360114 +0000 >> ++++ lz4-1.8.1.2/NEWS 2018-01-21 07:26:00.838957106 +0000 >> +@@ -96,7 +96,7 @@ >> + New : lz4 cli supports long commands (suggested by Takayuki Matsuoka) >> + New : lz4frame & lz4cli frame content size support >> + New : lz4frame supports skippable frames, as requested by Sergey Cher= epanov >> +-Changed: Default "make install" directory is /usr/local, as notified by = Ron Johnson >> ++Changed: Default "make install" directory is /usr, as notified by Ron Jo= hnson >> + New : lz4 cli supports "pass-through" mode, requested by Neil Wilson >> + New : datagen can generate sparse files >> + New : scan-build tests, thanks to kind help by Takayuki Matsuoka >> +diff -Nur lz4-1.8.1.2.orig/programs/Makefile lz4-1.8.1.2/programs/Makefile >> +--- lz4-1.8.1.2.orig/programs/Makefile 2018-01-21 07:24:41.881357925 +0000 >> ++++ lz4-1.8.1.2/programs/Makefile 2018-01-21 07:26:24.562235766 +0000 >> +@@ -121,7 +121,7 @@ >> + # directory variables : GNU conventions prefer lowercase >> + # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.= html >> + # support both lower and uppercase (BSD), use uppercase in script >> +-prefix ?=3D /usr/local >> ++prefix ?=3D /usr >> + PREFIX ?=3D $(prefix) >> + exec_prefix ?=3D $(PREFIX) >> + bindir ?=3D $(exec_prefix)/bin >=20 > Best, > -Michael --===============1963982719643442695==--