From ec8f744a11dfcab9560387168cab76260aa0b777 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Tue, 28 Jun 2016 23:10:11 +0200 Subject: Add script to update liblzma from upstream --- Utilities/Scripts/update-liblzma.bash | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 Utilities/Scripts/update-liblzma.bash diff --git a/Utilities/Scripts/update-liblzma.bash b/Utilities/Scripts/update-liblzma.bash new file mode 100755 index 0000000..31de671 --- /dev/null +++ b/Utilities/Scripts/update-liblzma.bash @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -e +set -x +shopt -s dotglob + +readonly name="liblzma" +readonly ownership="liblzma upstream " +readonly subtree="Utilities/cmliblzma" +readonly repo="http://git.tukaani.org/xz.git" +readonly tag="v5.0.5" +readonly shortlog=false +readonly paths=" + COPYING + src/common/common_w32res.rc + src/common/sysdefs.h + src/common/tuklib_integer.h + src/liblzma/ +" + +extract_source () { + git_archive + pushd "${extractdir}/${name}-reduced" + mv src/common . + mv src/liblzma . + rmdir src + popd +} + +. "${BASH_SOURCE%/*}/update-third-party.bash" -- cgit v0.12 -- cgit v0.12 From ca4276e435e251e1b2011a7a523aecdbf85c18ec Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Jun 2016 10:06:16 -0400 Subject: liblzma: Remove CMake-specific README We will now manage the liblzma source tree updates using the `Utilities/Scripts/update-liblzma.bash` script. Drop the README that covered the old method. --- Utilities/cmliblzma/README-CMake.txt | 66 ------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 Utilities/cmliblzma/README-CMake.txt diff --git a/Utilities/cmliblzma/README-CMake.txt b/Utilities/cmliblzma/README-CMake.txt deleted file mode 100644 index b512997..0000000 --- a/Utilities/cmliblzma/README-CMake.txt +++ /dev/null @@ -1,66 +0,0 @@ -The Utilities/cmliblzma directory contains a reduced distribution -of the liblzma source tree with only the library source code and -CMake build system. It is not a submodule; the actual content is part -of our source tree and changes can be made and committed directly. - -We update from upstream using Git's "subtree" merge strategy. A -special branch contains commits of upstream liblzma snapshots and -nothing else. No Git ref points explicitly to the head of this -branch, but it is merged into our history. - -Update liblzma from upstream as follows. Create a local branch to -explicitly reference the upstream snapshot branch head: - - git branch liblzma-upstream c289e634 - -Use a temporary directory to checkout the branch: - - mkdir liblzma-tmp - cd liblzma-tmp - git init - git pull .. liblzma-upstream - rm -rf * - -Now place the (reduced) liblzma content in this directory. See -instructions shown by - - git log c289e634 - -for help extracting the content from the upstream svn repo. Then run -the following commands to commit the new version. Substitute the -appropriate date and version number: - - git add --all - - GIT_AUTHOR_NAME='liblzma upstream' \ - GIT_AUTHOR_EMAIL='xz-devel@tukaani.org' \ - GIT_AUTHOR_DATE='Sun Jun 30 19:55:49 2013 +0300' \ - git commit -m 'liblzma 5.0.5-gb69900ed (reduced)' && - git commit --amend - -Edit the commit message to describe the procedure used to obtain the -content. Then push the changes back up to the main local repository: - - git push .. HEAD:liblzma-upstream - cd .. - rm -rf liblzma-tmp - -Create a topic in the main repository on which to perform the update: - - git checkout -b update-liblzma master - -Merge the liblzma-upstream branch as a subtree: - - git merge -s recursive -X subtree=Utilities/cmliblzma \ - liblzma-upstream - -If there are conflicts, resolve them and commit. Build and test the -tree. Commit any additional changes needed to succeed. - -Finally, run - - git rev-parse --short=8 liblzma-upstream - -to get the commit from which the liblzma-upstream branch must be started -on the next update. Edit the "git branch liblzma-upstream" line above to -record it, and commit this file. -- cgit v0.12 From d4f524040e8b9573bd568e4bb6b6ddb70d6ab366 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Jun 2016 10:07:48 -0400 Subject: liblzma: Revise update script to get version 5.0.8 --- Utilities/Scripts/update-liblzma.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/Scripts/update-liblzma.bash b/Utilities/Scripts/update-liblzma.bash index 31de671..088eb91 100755 --- a/Utilities/Scripts/update-liblzma.bash +++ b/Utilities/Scripts/update-liblzma.bash @@ -8,7 +8,7 @@ readonly name="liblzma" readonly ownership="liblzma upstream " readonly subtree="Utilities/cmliblzma" readonly repo="http://git.tukaani.org/xz.git" -readonly tag="v5.0.5" +readonly tag="v5.0.8" readonly shortlog=false readonly paths=" COPYING -- cgit v0.12 From e4d3914639d1e7b41337c9626b91458c4fe6ae95 Mon Sep 17 00:00:00 2001 From: liblzma upstream Date: Sun, 21 Dec 2014 17:06:21 +0200 Subject: liblzma 2014-12-21 (265e5ffb) Code extracted from: http://git.tukaani.org/xz.git at commit 265e5ffb70d9c175b424621576294d28807efd9b (v5.0.8). --- liblzma/Makefile.am | 22 +++++++++++++++++++++- liblzma/api/lzma/block.h | 3 +++ liblzma/api/lzma/version.h | 2 +- liblzma/check/crc32_fast.c | 2 +- liblzma/check/sha256.c | 2 +- liblzma/lzma/lzma_encoder_presets.c | 8 +++++--- 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/liblzma/Makefile.am b/liblzma/Makefile.am index 0529ff8..c81990a 100644 --- a/liblzma/Makefile.am +++ b/liblzma/Makefile.am @@ -24,7 +24,7 @@ liblzma_la_CPPFLAGS = \ -I$(top_srcdir)/src/liblzma/simple \ -I$(top_srcdir)/src/common \ -DTUKLIB_SYMBOL_PREFIX=lzma_ -liblzma_la_LDFLAGS = -no-undefined -version-info 5:5:0 +liblzma_la_LDFLAGS = -no-undefined -version-info 5:8:0 include $(srcdir)/common/Makefile.inc include $(srcdir)/check/Makefile.inc @@ -88,3 +88,23 @@ endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = liblzma.pc EXTRA_DIST += liblzma.pc.in + +pc_verbose = $(pc_verbose_@AM_V@) +pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@) +pc_verbose_0 = @echo " PC " $@; + +liblzma.pc: $(srcdir)/liblzma.pc.in + $(AM_V_at)rm -f $@ + $(pc_verbose)sed \ + -e 's,@prefix[@],$(prefix),g' \ + -e 's,@exec_prefix[@],$(exec_prefix),g' \ + -e 's,@libdir[@],$(libdir),g' \ + -e 's,@includedir[@],$(includedir),g' \ + -e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \ + -e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,@PTHREAD_CFLAGS[@],$(PTHREAD_CFLAGS),g' \ + -e 's,@PTHREAD_LIBS[@],$(PTHREAD_LIBS),g' \ + < $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; } + +clean-local: + rm -f liblzma.pc diff --git a/liblzma/api/lzma/block.h b/liblzma/api/lzma/block.h index 8a4bf23..e6710a7 100644 --- a/liblzma/api/lzma/block.h +++ b/liblzma/api/lzma/block.h @@ -318,6 +318,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode( * The size of the Block Header must have already been decoded with * lzma_block_header_size_decode() macro and stored to block->header_size. * + * The integrity check type from Stream Header must have been stored + * to block->check. + * * block->filters must have been allocated, but they don't need to be * initialized (possible existing filter options are not freed). * diff --git a/liblzma/api/lzma/version.h b/liblzma/api/lzma/version.h index 66e9396..09866b9 100644 --- a/liblzma/api/lzma/version.h +++ b/liblzma/api/lzma/version.h @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 0 -#define LZMA_VERSION_PATCH 5 +#define LZMA_VERSION_PATCH 8 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT diff --git a/liblzma/check/crc32_fast.c b/liblzma/check/crc32_fast.c index 94da855..3de0263 100644 --- a/liblzma/check/crc32_fast.c +++ b/liblzma/check/crc32_fast.c @@ -20,7 +20,7 @@ #include "crc_macros.h" -// If you make any changes, do some bench marking! Seemingly unrelated +// If you make any changes, do some benchmarking! Seemingly unrelated // changes can very easily ruin the performance (and very probably is // very compiler dependent). extern LZMA_API(uint32_t) diff --git a/liblzma/check/sha256.c b/liblzma/check/sha256.c index 23bda92..f2cc0d7 100644 --- a/liblzma/check/sha256.c +++ b/liblzma/check/sha256.c @@ -80,7 +80,7 @@ static const uint32_t SHA256_K[64] = { static void -transform(uint32_t state[static 8], const uint32_t data[static 16]) +transform(uint32_t state[8], const uint32_t data[16]) { uint32_t W[16]; uint32_t T[8]; diff --git a/liblzma/lzma/lzma_encoder_presets.c b/liblzma/lzma/lzma_encoder_presets.c index 21e427a..8484b77 100644 --- a/liblzma/lzma/lzma_encoder_presets.c +++ b/liblzma/lzma/lzma_encoder_presets.c @@ -30,14 +30,16 @@ lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset) options->lp = LZMA_LP_DEFAULT; options->pb = LZMA_PB_DEFAULT; - options->dict_size = UINT32_C(1) << (uint8_t []){ - 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }[level]; + static const uint8_t dict_pow2[] + = { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }; + options->dict_size = UINT32_C(1) << dict_pow2[level]; if (level <= 3) { options->mode = LZMA_MODE_FAST; options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4; options->nice_len = level <= 1 ? 128 : 273; - options->depth = (uint8_t []){ 4, 8, 24, 48 }[level]; + static const uint8_t depths[] = { 4, 8, 24, 48 }; + options->depth = depths[level]; } else { options->mode = LZMA_MODE_NORMAL; options->mf = LZMA_MF_BT4; -- cgit v0.12