aboutsummaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2024-03-21 12:58:17 +0100
committerDavid Roman <davidroman96@gmail.com>2024-03-21 12:58:17 +0100
commite8cb86ee6e47ce832fd39fbf7b78e785f694da98 (patch)
treeb763d1f8a8d04059e5b7637c7c2566a12b568570 /sys-fs
parentsys-libs/gcompat/metadata.xml: ucontext -> libucontext (diff)
downloadguru-e8cb86ee6e47ce832fd39fbf7b78e785f694da98.tar.gz
guru-e8cb86ee6e47ce832fd39fbf7b78e785f694da98.tar.bz2
guru-e8cb86ee6e47ce832fd39fbf7b78e785f694da98.zip
sys-fs/jefferson: new package, add 0.4.5
Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/jefferson/Manifest1
-rw-r--r--sys-fs/jefferson/files/jefferson-use-python-lzo.patch22
-rw-r--r--sys-fs/jefferson/jefferson-0.4.5.ebuild25
-rw-r--r--sys-fs/jefferson/metadata.xml11
4 files changed, 59 insertions, 0 deletions
diff --git a/sys-fs/jefferson/Manifest b/sys-fs/jefferson/Manifest
new file mode 100644
index 000000000..cb4d1b444
--- /dev/null
+++ b/sys-fs/jefferson/Manifest
@@ -0,0 +1 @@
+DIST jefferson-0.4.5.gh.tar.gz 9439 BLAKE2B cf40fa975bd4441f311bbb933ec9386565018d0e3a8b1ab8a79dee5542f683d437c01caff11933a78733f3feb631fb7086639f1d5dd864bf2e158837dfc6a0c4 SHA512 d4b44138bd36b94f43e4e09e3ab7a0b24044c93c69953b32aadaf544d297eb6e91b951b94754806bbef59f2357e6c8e6d01fda13bc78013341d852c5b8ed0422
diff --git a/sys-fs/jefferson/files/jefferson-use-python-lzo.patch b/sys-fs/jefferson/files/jefferson-use-python-lzo.patch
new file mode 100644
index 000000000..990533310
--- /dev/null
+++ b/sys-fs/jefferson/files/jefferson-use-python-lzo.patch
@@ -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])
diff --git a/sys-fs/jefferson/jefferson-0.4.5.ebuild b/sys-fs/jefferson/jefferson-0.4.5.ebuild
new file mode 100644
index 000000000..a67cebe00
--- /dev/null
+++ b/sys-fs/jefferson/jefferson-0.4.5.ebuild
@@ -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" )
diff --git a/sys-fs/jefferson/metadata.xml b/sys-fs/jefferson/metadata.xml
new file mode 100644
index 000000000..7feff88c4
--- /dev/null
+++ b/sys-fs/jefferson/metadata.xml
@@ -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>