]> git.pld-linux.org Git - packages/util-vserver.git/blob - h2ext-xz.patch
add tar.xz support for template build
[packages/util-vserver.git] / h2ext-xz.patch
1 From 2d66dba387f1240ad489b41d9b7504ab2a56dbf9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
3 Date: Wed, 9 Sep 2015 16:22:56 +0300
4 Subject: [PATCH] add .xz support for h2ext to be able to build from tar.xz
5  templates
6
7 magic taken from
8 https://github.com/file/file/blob/FILE5_24/magic/Magdir/compress#L202-L205
9
10 however due limited support of magic format in util-vserver had to hack
11 some things:
12
13 - does not support 'ustring', used 'string'
14 - does not support \xXX hex escape, used octal
15 - unable parse octal properly \375 + 7 would be parsed as \3757, so encoded '7' as \67
16
17 $ head -c6 < pld32.tar.xz|od -cx
18 0000000 375   7   z   X   Z  \0
19            37fd    587a    005a
20 ---
21  distrib/misc/h2ext.desc | 2 ++
22  1 file changed, 2 insertions(+)
23
24 diff --git a/distrib/misc/h2ext.desc b/distrib/misc/h2ext.desc
25 index a234339..9441bd2 100644
26 --- a/distrib/misc/h2ext.desc
27 +++ b/distrib/misc/h2ext.desc
28 @@ -17,3 +17,5 @@
29  # dump/restore old-fs big and little endian
30  24     belong          60011                   restore -rf -                   0
31  24     lelong          60011                   restore -rf -                   0
32 +# xz
33 +0      string          \375\67zXZ\0            xz -d -c                        1
This page took 0.04071 seconds and 3 git commands to generate.