sys-fs/jefferson: new package, add 0.4.5

Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
David Roman
2024-03-21 12:58:17 +01:00
parent fad92656cc
commit e8cb86ee6e
4 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST jefferson-0.4.5.gh.tar.gz 9439 BLAKE2B cf40fa975bd4441f311bbb933ec9386565018d0e3a8b1ab8a79dee5542f683d437c01caff11933a78733f3feb631fb7086639f1d5dd864bf2e158837dfc6a0c4 SHA512 d4b44138bd36b94f43e4e09e3ab7a0b24044c93c69953b32aadaf544d297eb6e91b951b94754806bbef59f2357e6c8e6d01fda13bc78013341d852c5b8ed0422

View File

@@ -0,0 +1,22 @@
diff --git a/jefferson/jffs2.py b/jefferson/jffs2.py
index ab1ac8f..1607bdc 100644
--- a/jefferson/jffs2.py
+++ b/jefferson/jffs2.py
@@ -9,7 +9,7 @@ import zlib
from pathlib import Path
import cstruct
-from lzallright import LZOCompressor as lzo
+import lzo
import jefferson.compression.jffs2_lzma as jffs2_lzma
import jefferson.compression.rtime as rtime
@@ -180,7 +180,7 @@ class Jffs2_raw_inode(cstruct.CStruct):
elif self.compr == JFFS2_COMPR_LZMA:
self.data = jffs2_lzma.decompress(node_data, self.dsize)
elif self.compr == JFFS2_COMPR_LZO:
- self.data = lzo.decompress(node_data)
+ self.data = lzo.decompress(node_data, False, self.dsize)
else:
print("compression not implemented", self)
print(node_data.hex()[:20])

View File

@@ -0,0 +1,25 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11,12} )
DISTUTILS_USE_PEP517=poetry
inherit distutils-r1
DESCRIPTION=" JFFS2 filesystem extraction tool "
HOMEPAGE="https://github.com/onekey-sec/jefferson"
SRC_URI="https://github.com/onekey-sec/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/cstruct[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/python-lzo[${PYTHON_USEDEP}]
"
PATCHES=( "${FILESDIR}/${PN}-use-python-lzo.patch" )

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>davidroman96@gmail.com</email>
<name>David Roman</name>
</maintainer>
<upstream>
<remote-id type="github">onekey-sec/jefferson</remote-id>
</upstream>
</pkgmetadata>