Github messages for voidlinux
 help / color / mirror / Atom feed
From: adbrown101 <adbrown101@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] pass-import: update to version 3.1
Date: Fri, 04 Dec 2020 18:11:43 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26940@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

There is a new pull request by adbrown101 against master on the void-packages repository

https://github.com/adbrown101/void-packages pass-import
https://github.com/void-linux/void-packages/pull/26940

pass-import: update to version 3.1
Update to latest version. It looks like magic has been refactored in the source so patches no longer required

A patch file from https://github.com/void-linux/void-packages/pull/26940.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pass-import-26940.patch --]
[-- Type: text/x-diff, Size: 5029 bytes --]

From 0faaf9daa33f6f67d343ed9988f96df211618337 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Fri, 4 Dec 2020 16:59:35 +0000
Subject: [PATCH] pass-import: update to version 3.1

---
 ...s-magic-refactor-get_magics-function.patch | 55 -------------------
 ...002-tools-magic-support-python-magic.patch | 31 -----------
 srcpkgs/pass-import/template                  |  6 +-
 3 files changed, 3 insertions(+), 89 deletions(-)
 delete mode 100644 srcpkgs/pass-import/patches/0001-tools-magic-refactor-get_magics-function.patch
 delete mode 100644 srcpkgs/pass-import/patches/0002-tools-magic-support-python-magic.patch

diff --git a/srcpkgs/pass-import/patches/0001-tools-magic-refactor-get_magics-function.patch b/srcpkgs/pass-import/patches/0001-tools-magic-refactor-get_magics-function.patch
deleted file mode 100644
index bd9511f391e..00000000000
--- a/srcpkgs/pass-import/patches/0001-tools-magic-refactor-get_magics-function.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5a1bff33c692be2fc1add61e642111976858c672 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
- <congdanhqx@gmail.com>
-Date: Mon, 27 Jul 2020 17:31:06 +0700
-Subject: [PATCH] tools/magic: refactor get_magics function
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In a later patch, we will add support for python-magic.
-Refactore get_magics function to prepare for that change.
-
-Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
----
- pass_import/tools.py | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git pass_import/tools.py pass_import/tools.py
-index 257f01a..815ff8b 100644
---- pass_import/tools.py
-+++ pass_import/tools.py
-@@ -39,20 +39,26 @@ def get_magics(path):
-     with open(path, 'rb') as file:
-         header = file.read(2048)
- 
--    res = magic.detect_from_content(header)
-+    if hasattr(magic, 'detect_from_content'):
-+        res = magic.detect_from_content(header)
-+        mime_type = res.mime_type
-+        magic_name = res.name
-+    else:
-+        return None, None
-+
-     mime_to_format = {
-         'application/pgp': 'gpg',
-         'application/x-sqlite3': 'sqlite3'
-     }
-     name_to_format = {'KDBX': 'kdbx', 'openssl': 'openssl', 'PGP': 'gpg'}
- 
--    frmt = mime_to_format.get(res.mime_type, None)
-+    frmt = mime_to_format.get(mime_type, None)
-     for name in name_to_format:
--        if name in res.name:
-+        if name in magic_name:
-             frmt = name_to_format[name]
- 
-     encoding = None  # res.encoding
--    if 'UTF-8 Unicode (with BOM)' in res.name:
-+    if 'UTF-8 Unicode (with BOM)' in magic_name:
-         encoding = 'utf-8-sig'
- 
-     return frmt, encoding
--- 
-2.28.0.163.g6104cc2f0b
-
diff --git a/srcpkgs/pass-import/patches/0002-tools-magic-support-python-magic.patch b/srcpkgs/pass-import/patches/0002-tools-magic-support-python-magic.patch
deleted file mode 100644
index 65b186a9d66..00000000000
--- a/srcpkgs/pass-import/patches/0002-tools-magic-support-python-magic.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8cbcd2bdd885c1028065f06b7ab02673c544720b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
- <congdanhqx@gmail.com>
-Date: Mon, 27 Jul 2020 18:00:15 +0700
-Subject: [PATCH] tools/magic: support python-magic
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
----
- pass_import/tools.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git pass_import/tools.py pass_import/tools.py
-index 815ff8b..c1a3f01 100644
---- pass_import/tools.py
-+++ pass_import/tools.py
-@@ -43,6 +43,9 @@ def get_magics(path):
-         res = magic.detect_from_content(header)
-         mime_type = res.mime_type
-         magic_name = res.name
-+    elif hasattr(magic, 'from_buffer'):
-+        mime_type = magic.from_buffer(header, mime=True)
-+        magic_name = magic.from_buffer(header)
-     else:
-         return None, None
- 
--- 
-2.28.0.163.g6104cc2f0b
-
diff --git a/srcpkgs/pass-import/template b/srcpkgs/pass-import/template
index 51c81c560a6..73a2fca0304 100644
--- a/srcpkgs/pass-import/template
+++ b/srcpkgs/pass-import/template
@@ -1,7 +1,7 @@
 # Template file for 'pass-import'
 pkgname=pass-import
-version=3.0
-revision=4
+version=3.1
+revision=1
 build_style=gnu-makefile
 hostmakedepends="python3-setuptools python3-yaml"
 depends="pass>=1.7.0 python3-defusedxml python3-magic
@@ -13,7 +13,7 @@ maintainer="Alan Brown <adbrown@rocketmail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/roddhjav/pass-import"
 distfiles="https://github.com/roddhjav/pass-import/releases/download/v${version}/pass-import-${version}.tar.gz"
-checksum=14f6708df990b88c54b07e722686ed9e1a639300b33d2ff83dd87845e44779fc
+checksum=659d2b503a18d57c9d63dee216d042d0e24f88576cdd0c7fc4b3426e40dbdbc2
 
 do_check() {
 	python3 setup.py test

             reply	other threads:[~2020-12-04 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 17:11 adbrown101 [this message]
2020-12-04 18:09 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26940@inbox.vuxu.org \
    --to=adbrown101@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).