Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] mc: cleanup, python3, adopt.
@ 2022-07-15  5:57 0x5c
  2022-07-17  6:26 ` 0x5c
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: 0x5c @ 2022-07-15  5:57 UTC (permalink / raw)
  To: ml

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

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

https://github.com/0x5c/void-packages mc-cleanup
https://github.com/void-linux/void-packages/pull/38079

[RFC] mc: cleanup, python3, adopt.
This PR splits off python-dependent backends into a subpackage. This is the approach used in other distros.
However, this only takes care of having python, it does not take into account more programs that may be needed (like the uc1451 backend needing the `vice` package). Most backends are just thin translation layers over an external tool, and some need perl. None of those dependencies are not marked as such in the package, nor are they in other distros. What would be the best way to deal with that?

#### Testing the changes
- I tested the changes in this PR: **YES**
    It is impossible to test the s3 backend without an AWS S3 account, but the patch is used in other distros.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mc-cleanup-38079.patch --]
[-- Type: text/x-diff, Size: 4464 bytes --]

From 4e04edb747e21397499c6d770992d6e53f226c5b Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Fri, 15 Jul 2022 01:32:33 -0400
Subject: [PATCH] mc: cleanup, adopt.

---
 srcpkgs/mc-python                      |  1 +
 srcpkgs/mc/patches/extfs-python3.patch | 81 ++++++++++++++++++++++++++
 srcpkgs/mc/template                    | 17 ++++--
 3 files changed, 95 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/mc-python
 create mode 100644 srcpkgs/mc/patches/extfs-python3.patch

diff --git a/srcpkgs/mc-python b/srcpkgs/mc-python
new file mode 120000
index 000000000000..60cdbcff7b70
--- /dev/null
+++ b/srcpkgs/mc-python
@@ -0,0 +1 @@
+mc
\ No newline at end of file
diff --git a/srcpkgs/mc/patches/extfs-python3.patch b/srcpkgs/mc/patches/extfs-python3.patch
new file mode 100644
index 000000000000..c2a61807f87c
--- /dev/null
+++ b/srcpkgs/mc/patches/extfs-python3.patch
@@ -0,0 +1,81 @@
+Taken from https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc-python3.patch
+Also see https://github.com/MidnightCommander/mc/pull/149
+
+
+--
+
+--- a/src/vfs/extfs/helpers/uc1541
++++ b/src/vfs/extfs/helpers/uc1541
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ UC1541 Virtual filesystem
+ 
+--- a/src/vfs/extfs/helpers/s3+.in
++++ b/src/vfs/extfs/helpers/s3+.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ #
+@@ -153,16 +153,16 @@
+ 	Propagates exception safely.
+ 	"""
+ 	from threading import Thread
+-	import Queue
++	import queue
+ 
+ 	items = list(iterable)
+ 	nitems = len(items)
+ 	if nitems < 2:
+-		return map(fun, items)
++		return list(map(fun, items))
+ 
+ 	# Create and fill input queue
+-	input = Queue.Queue()
+-	output = Queue.Queue()
++	input = queue.Queue()
++	output = queue.Queue()
+ 
+ 	for i,item in enumerate(items):
+ 		input.put( (i,item) )
+@@ -181,7 +181,7 @@
+ 						output.put( (i,result) )
+ 					except:
+ 						output.put( (None,sys.exc_info()) )
+-				except Queue.Empty:
++				except queue.Empty:
+ 					return
+ 
+ 	# Start threads
+@@ -196,8 +196,8 @@
+ 		try:
+ 			i,res = output.get()
+ 			if i == None:
+-				raise res[0],res[1],res[2]
+-		except Queue.Empty:
++				raise res[0](res[1]).with_traceback(res[2])
++		except queue.Empty:
+ 			break
+ 		ret.append(res)
+ 
+@@ -241,7 +241,7 @@
+ 		b = s3.get_bucket(name, validate=False)
+ 		b.get_location() # just to raise an exception on error
+ 		return b
+-	except boto.exception.S3ResponseError, e:
++	except boto.exception.S3ResponseError as e:
+ 		# Seems this is the only proper way to switch to the bucket's region.
+ 		# Requesting of the default region for "?location" does not work unfortunately.
+ 		m = re.search(r'<Region>(.*?)</Region>', e.body)
+@@ -340,7 +340,7 @@
+ 	expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$')
+ 	def convDate(awsdatetime):
+ 		m = expr.match(awsdatetime)
+-		ye,mo,da,ho,mi,se = map(int,m.groups())
++		ye,mo,da,ho,mi,se = list(map(int,m.groups()))
+ 
+ 		dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc)
+ 		return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M')
diff --git a/srcpkgs/mc/template b/srcpkgs/mc/template
index 1c293a9c6a26..5f5019b6c83b 100644
--- a/srcpkgs/mc/template
+++ b/srcpkgs/mc/template
@@ -1,20 +1,18 @@
 # Template file for 'mc'
 pkgname=mc
 version=4.8.28
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-screen=slang --without-x"
 hostmakedepends="perl pkg-config"
 makedepends="e2fsprogs-devel gpm-devel libglib-devel libssh2-devel slang-devel"
 short_desc="User-friendly file manager and visual shell"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="0x5c <dev@0x5c.io>"
 license="GPL-3.0-or-later"
 homepage="https://midnight-commander.org/"
 changelog="https://midnight-commander.org/wiki/NEWS-${version}"
 distfiles="https://www.midnight-commander.org/downloads/mc-${version}.tar.xz"
-#distfiles="http://fossies.org/linux/misc/mc-${version}.tar.gz"
 checksum=e994d9be9a7172e9ac4a4ad62107921f6aa312e668b056dfe5b8bcebbaf53803
-python_version=2
 
 conf_files="
  /etc/mc/filehighlight.ini
@@ -25,3 +23,14 @@ conf_files="
  /etc/mc/mc.menu
  /etc/mc/mcedit.menu
  /etc/mc/sfs.ini"
+
+mc-python_package() {
+	description += "- Python-based backend scripts"
+	depends="${sourcepkg}-${version}_${revision} python3 python3-boto"
+	python_version=3
+
+	pkg_install() {
+		vmove usr/libexec/mc/extfs.d/uc1541
+		vmove usr/libexec/mc/extfs.d/s3+
+	}
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
@ 2022-07-17  6:26 ` 0x5c
  2022-07-17  7:28 ` 0x5c
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2022-07-17  6:26 UTC (permalink / raw)
  To: ml

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

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/38079#issuecomment-1186417758

Comment:
Here's the deps needed or each extfs backend

| Backend | Interpreter | Dependencies |
| --- | --- | --- |
| `a+` DOS filesystem access | `perl -w` | `mtools` |
| `apt+` APT frontend (repository browser?) | `perl` | `apt, dpkg` |
| `audio` browse audio cdroms+CDDB | `sh` | `cdparanoia, wget` |
| `bpp` "Bad Penguin" package management | `sh` | Unknown executables: `package-setup` |
| `changesetfs` list git versions of current file | `sh` | `git` |
| `deb` .deb package viewer | `perl` | `dpkg` Perl modules: `File::Temp` |
| `deba` APT frontend (deb browser and installer) | `perl` | `apt, dpkg` |
| `debd` DPKG frontend (seems to double as deb browser) | `perl` | `dpkg` |
| `dpkg+` DPKG frontend | `perl` | `dpkg` |
| `gitfs+` git repo browser | `sh` | `git` |
| `hp48+` file manager for HP48 calculators | `sh` | Unknown executables: `kermit` |
| `iso9660` ISO9660 image browser | `sh` | `xorriso, cdrtools, [common_archivers]` |
| `lslR` "For browsing lslR listings (found on many ftp sites)" | `sh` | `[common_archivers]` |
| `mailfs` Mailbox browser | `perl -w` | `[common_archivers], file` Perl modules: `Date::Parse, Date::Manip, bytes` |
| `patchfs` patchfile explorer | `perl -w` | `[common_archivers], file` Perl modules: `bytes, strict, POSIX, File::Temp, Date::Parse` |
| `patchsetfs` list git patches of current file | `sh` | `git` |
| `rpm` RPM package viewer | `sh` | `rpm` |
| `rpms+` RPM frontend | `perl` | `rpm` |
| `s3+` AWS S3 client | `python3` | `python3-boto` |
| `trpm` RPM frontend | `sh` | `rpm` |
| `u7z` 7zip archive support | `sh` | `p7zip` |
| `uace` ACE archive support | `sh` | Unknown executables: `unace` |
| `ualz` ALZ archive support | `sh` | Unknown executables: `unalz` |
| `uar` AR archive support | `sh` | `binutils` |
| `uarc` ARC archive support | `sh` | Unknown executables: `arc` |
| `uarj` ARJ archive support | `sh` | Unknown executables: `arj` |
| `uc1541` C64/128 disk image support | `python3` | `vice` |
| `ucab` Microsoft CAB archive support | `sh` | `cabextract` |
| `uha` HA archive support | `sh` | Unknown executables: `ha` |
| `ulha` LHa archive support | `sh` | Unknown executables: `lha` |
| `ulib` gputils archive support | `perl -w` | `gputils` |
| `unar` unar wrapper | `sh` | `unar` |
| `urar` RAR archive support | `sh` | `unrar` |
| `uwim` Windows Imaging (WIM) archives support | `sh` | `wimlib` |
| `uzip` ZIP archive support | `perl -w` | `zip, uzip` Perl modules: `POSIX, File::Basename, File::Temp, strict` |
| `uzoo` ZOO archive support | `sh` | Unknown executables: `zoo` |

`[common_archivers]` refers to the following archivers/compressors: `bzip2, gzip, lz4, lzip, xz, zstd`.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
  2022-07-17  6:26 ` 0x5c
@ 2022-07-17  7:28 ` 0x5c
  2022-07-17  9:02 ` 0x5c
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2022-07-17  7:28 UTC (permalink / raw)
  To: ml

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

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/38079#issuecomment-1186429613

Comment:
I can see a couple of groupings that may be useful for defining subpackages

- APT/DPKG stuff: `apt+`, `deb`, `deba`, `debd`, `dpkg+` (how the hell is there 5 of them?)
- RPM stuff: `rpm`, `rpms+`, `trpm`
- things we don't have all the bits for: `bpp`, `hp48+`, `uace`, `ualz`, `uarc`, `uarj`, `uha`, `ulha`, `uzoo` (ARC here *might* be the same format as what PKARC was for?)
- git-related backends: `gitfs+`, `changesetfs`, `patchsetfs`
- misc, shared-depends backends: `mailfs`, `patchfs`, `lslR`
- archive file formats: `u7z`, `uar`, `ulib`, `unar`, `urar`, `ucab`, `uzip`
- disk/etc image formats: `iso9660`, `uc1541`, `uwim`
- hard to categorise backends: `a+`, `audio`, `s3+`

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
  2022-07-17  6:26 ` 0x5c
  2022-07-17  7:28 ` 0x5c
@ 2022-07-17  9:02 ` 0x5c
  2022-10-16  2:14 ` github-actions
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2022-07-17  9:02 UTC (permalink / raw)
  To: ml

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

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/38079#issuecomment-1186417758

Comment:
Here's the deps needed or each extfs backend

| Backend | Interpreter | Dependencies |
| --- | --- | --- |
| `a+` DOS filesystem access | `perl -w` | `mtools` |
| `apt+` APT frontend (repository browser?) | `perl` | `apt, dpkg` |
| `audio` browse audio cdroms+CDDB | `sh` | `cdparanoia, wget` |
| `bpp` "Bad Penguin" package management | `sh` | Unknown executables: `package-setup` |
| `changesetfs` list git versions of current file | `sh` | `git` |
| `deb` .deb package viewer | `perl` | `dpkg` |
| `deba` APT frontend (deb browser and installer) | `perl` | `apt, dpkg` |
| `debd` DPKG frontend (seems to double as deb browser) | `perl` | `dpkg` |
| `dpkg+` DPKG frontend | `perl` | `dpkg` |
| `gitfs+` git repo browser | `sh` | `git` |
| `hp48+` file manager for HP48 calculators | `sh` | Unknown executables: `kermit` |
| `iso9660` ISO9660 image browser | `sh` | `xorriso, cdrtools, [common_archivers]` |
| `lslR` "For browsing lslR listings (found on many ftp sites)" | `sh` | `[common_archivers]` |
| `mailfs` Mailbox browser | `perl -w` | `[common_archivers], file, perl-TimeDate, perl-Date-Manip` |
| `patchfs` patchfile explorer | `perl -w` | `[common_archivers], file, perl-TimeDate` |
| `patchsetfs` list git patches of current file | `sh` | `git` |
| `rpm` RPM package viewer | `sh` | `rpm` |
| `rpms+` RPM frontend | `perl` | `rpm` |
| `s3+` AWS S3 client | `python3` | `python3-boto` |
| `trpm` RPM frontend | `sh` | `rpm` |
| `u7z` 7zip archive support | `sh` | `p7zip` |
| `uace` ACE archive support | `sh` | Unknown executables: `unace` |
| `ualz` ALZ archive support | `sh` | Unknown executables: `unalz` |
| `uar` AR archive support | `sh` | `binutils` |
| `uarc` ARC archive support | `sh` | Unknown executables: `arc` |
| `uarj` ARJ archive support | `sh` | Unknown executables: `arj` |
| `uc1541` C64/128 disk image support | `python3` | `vice` |
| `ucab` Microsoft CAB archive support | `sh` | `cabextract` |
| `uha` HA archive support | `sh` | Unknown executables: `ha` |
| `ulha` LHa archive support | `sh` | Unknown executables: `lha` |
| `ulib` gputils archive support | `perl -w` | `gputils` |
| `unar` unar wrapper | `sh` | `unar` |
| `urar` RAR archive support | `sh` | `unrar` |
| `uwim` Windows Imaging (WIM) archives support | `sh` | `wimlib` |
| `uzip` ZIP archive support | `perl -w` | `zip, uzip` |
| `uzoo` ZOO archive support | `sh` | Unknown executables: `zoo` |


`[common_archivers]` refers to the following archivers/compressors: `bzip2, gzip, lz4, lzip, xz, zstd`.

**EDIT:** This used to list the perl modules needed, but I managed to figure out which ones are part of perl's stdlib and which packages provide the ones that aren't.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (2 preceding siblings ...)
  2022-07-17  9:02 ` 0x5c
@ 2022-10-16  2:14 ` github-actions
  2022-10-31  2:15 ` [PR PATCH] [Closed]: " github-actions
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: github-actions @ 2022-10-16  2:14 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/38079#issuecomment-1279872874

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Closed]: [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (3 preceding siblings ...)
  2022-10-16  2:14 ` github-actions
@ 2022-10-31  2:15 ` github-actions
  2023-10-10  1:42 ` [PR PATCH] [Updated] " 0x5c
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: github-actions @ 2022-10-31  2:15 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

[RFC] mc: cleanup, python3, adopt.
https://github.com/void-linux/void-packages/pull/38079

Description:
This PR splits off python-dependent backends into a subpackage. This is the approach used in other distros.
However, this only takes care of having python, it does not take into account more programs that may be needed (like the uc1451 backend needing the `vice` package). Most backends are just thin translation layers over an external tool, and some need perl. None of those dependencies are marked as such in the package, nor are they in other distros. What would be the best way to deal with that?

#### Testing the changes
- I tested the changes in this PR: **YES**
    It is impossible to test the s3 backend without an AWS S3 account, but the patch is used in other distros.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (4 preceding siblings ...)
  2022-10-31  2:15 ` [PR PATCH] [Closed]: " github-actions
@ 2023-10-10  1:42 ` 0x5c
  2023-10-10  1:45 ` 0x5c
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2023-10-10  1:42 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by 0x5c against master on the void-packages repository

https://github.com/0x5c/void-packages mc-cleanup
https://github.com/void-linux/void-packages/pull/38079

[RFC] mc: cleanup, python3, adopt.
This PR splits off python-dependent backends into a subpackage. This is the approach used in other distros.
However, this only takes care of having python, it does not take into account more programs that may be needed (like the uc1451 backend needing the `vice` package). Most backends are just thin translation layers over an external tool, and some need perl. None of those dependencies are marked as such in the package, nor are they in other distros. What would be the best way to deal with that?

#### Testing the changes
- I tested the changes in this PR: **YES**
    It is impossible to test the s3 backend without an AWS S3 account, but the patch is used in other distros.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mc-cleanup-38079.patch --]
[-- Type: text/x-diff, Size: 8838 bytes --]

From 151212a082aaba766a0c8e9574b87debb8938e32 Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Fri, 15 Jul 2022 01:32:33 -0400
Subject: [PATCH] mc: update to 4.8.29, cleanup, adopt.

Also convert scripts from python2 to python3.
---
 srcpkgs/mc/files/README.voidlinux      | 50 ++++++++++++++++
 srcpkgs/mc/patches/extfs-python3.patch | 80 ++++++++++++++++++++++++++
 srcpkgs/mc/template                    | 14 +++--
 3 files changed, 138 insertions(+), 6 deletions(-)
 create mode 100644 srcpkgs/mc/files/README.voidlinux
 create mode 100644 srcpkgs/mc/patches/extfs-python3.patch

diff --git a/srcpkgs/mc/files/README.voidlinux b/srcpkgs/mc/files/README.voidlinux
new file mode 100644
index 0000000000000..a4301f03e50ad
--- /dev/null
+++ b/srcpkgs/mc/files/README.voidlinux
@@ -0,0 +1,50 @@
+MC has a number of "extfs" backend scripts to extend its functionality.
+They depend on various programs to work, which are not marked as dependencies of
+the mc package and must be installed manually for the backends to workproperly.
+
+| Backend                                     | Dependencies                                         |
+| ------------------------------------------- | ---------------------------------------------------- |
+| `a+` DOS filesystem access                  | `perl mtools`                                        |
+| `apt+` APT frontend (repository browser?)   | `perl apt dpkg`                                      |
+| `audio` browse audio cdroms+CDDB            | `cdparanoia wget`                                    |
+| `changesetfs` list git revs of curr. file   | `git`                                                |
+| `deb` .deb package viewer                   | `perl dpkg`                                          |
+| `deba` APT frontend (deb browser/installer) | `perl apt dpkg`                                      |
+| `debd` DPKG frontend (also deb browser)     | `perl dpkg`                                          |
+| `dpkg+` DPKG frontend                       | `perl dpkg`                                          |
+| `gitfs+` git repo browser                   | `git`                                                |
+| `iso9660` ISO9660 image browser             | `xorriso cdrtools [common_archivers]`                |
+| `lslR` "For browsing lslR listings"         | `[common_archivers]`                                 |
+| `mailfs` Mailbox browser                    | `[common_archivers] file perl-{TimeDate,Date-Manip}` |
+| `patchfs` patchfile explorer                | `[common_archivers] file perl-TimeDate`              |
+| `patchsetfs` list git patches of curr. file | `git`                                                |
+| `rpm` RPM package viewer                    | `rpm`                                                |
+| `rpms+` RPM frontend                        | `perl rpm`                                           |
+| `trpm` RPM frontend                         | `rpm`                                                |
+| `u7z` 7zip archive support                  | `7zip`                                               |
+| `uar` AR archive support                    | `binutils`                                           |
+| `uc1541` C64/128 disk image support         | `python3 vice`                                       |
+| `ucab` Microsoft CAB archive support        | `cabextract`                                         |
+| `ulib` gputils archive support              | `perl gputils`                                       |
+| `unar` unar wrapper                         | `unar`                                               |
+| `urar` RAR archive support                  | `unrar`                                              |
+| `uwim` Windows WIM archive support          | `wimlib`                                             |
+| `uzip` ZIP archive support                  | `perl zip unzip`                                      |
+
+`[common_archivers]` refers to the following archivers/compressors: `bzip2 gzip lz4 lzip xz zstd`.
+
+Additionally, the following extfs plugins require programs that are not packaged on void.
+
+| Backend                                   | Dependencies                        |
+| ----------------------------------------- | ----------------------------------- |
+| `bpp`   "Bad Penguin" package management  | Unknown executable: `package-setup` |
+| `hp48+` file manager for HP48 calculators | Unknown executable: `kermit`        |
+| `s3+`   AWS S3 client                     | Missing python pkg: `python3-boto`  |
+| `uace`  ACE archive support               | Unknown executable: `unace`         |
+| `ualz`  ALZ archive support               | Unknown executable: `unalz`         |
+| `uarc`  ARC archive support               | Unknown executable: `arc`           |
+| `uarj`  ARJ archive support               | Unknown executable: `arj`           |
+| `uha`   HA archive support                | Unknown executable: `ha`            |
+| `ulha`  LHa archive support               | Unknown executable: `lha`           |
+| `uzoo`  ZOO archive support               | Unknown executable: `zoo`           |
+
diff --git a/srcpkgs/mc/patches/extfs-python3.patch b/srcpkgs/mc/patches/extfs-python3.patch
new file mode 100644
index 0000000000000..d86472ea81766
--- /dev/null
+++ b/srcpkgs/mc/patches/extfs-python3.patch
@@ -0,0 +1,80 @@
+Taken from https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc-python3.patch
+Also see https://github.com/MidnightCommander/mc/pull/149
+
+--
+
+--- a/src/vfs/extfs/helpers/uc1541
++++ b/src/vfs/extfs/helpers/uc1541
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ UC1541 Virtual filesystem
+ 
+--- a/src/vfs/extfs/helpers/s3+.in
++++ b/src/vfs/extfs/helpers/s3+.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ #
+@@ -153,16 +153,16 @@
+ 	Propagates exception safely.
+ 	"""
+ 	from threading import Thread
+-	import Queue
++	import queue
+ 
+ 	items = list(iterable)
+ 	nitems = len(items)
+ 	if nitems < 2:
+-		return map(fun, items)
++		return list(map(fun, items))
+ 
+ 	# Create and fill input queue
+-	input = Queue.Queue()
+-	output = Queue.Queue()
++	input = queue.Queue()
++	output = queue.Queue()
+ 
+ 	for i,item in enumerate(items):
+ 		input.put( (i,item) )
+@@ -181,7 +181,7 @@
+ 						output.put( (i,result) )
+ 					except:
+ 						output.put( (None,sys.exc_info()) )
+-				except Queue.Empty:
++				except queue.Empty:
+ 					return
+ 
+ 	# Start threads
+@@ -196,8 +196,8 @@
+ 		try:
+ 			i,res = output.get()
+ 			if i == None:
+-				raise res[0],res[1],res[2]
+-		except Queue.Empty:
++				raise res[0](res[1]).with_traceback(res[2])
++		except queue.Empty:
+ 			break
+ 		ret.append(res)
+ 
+@@ -241,7 +241,7 @@
+ 		b = s3.get_bucket(name, validate=False)
+ 		b.get_location() # just to raise an exception on error
+ 		return b
+-	except boto.exception.S3ResponseError, e:
++	except boto.exception.S3ResponseError as e:
+ 		# Seems this is the only proper way to switch to the bucket's region.
+ 		# Requesting of the default region for "?location" does not work unfortunately.
+ 		m = re.search(r'<Region>(.*?)</Region>', e.body)
+@@ -340,7 +340,7 @@
+ 	expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$')
+ 	def convDate(awsdatetime):
+ 		m = expr.match(awsdatetime)
+-		ye,mo,da,ho,mi,se = map(int,m.groups())
++		ye,mo,da,ho,mi,se = list(map(int,m.groups()))
+ 
+ 		dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc)
+ 		return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M')
diff --git a/srcpkgs/mc/template b/srcpkgs/mc/template
index bcae7c672c3a5..302d978e2cd35 100644
--- a/srcpkgs/mc/template
+++ b/srcpkgs/mc/template
@@ -1,20 +1,18 @@
 # Template file for 'mc'
 pkgname=mc
-version=4.8.29
-revision=1
+version=4.8.30
+revision=0
 build_style=gnu-configure
 configure_args="--with-screen=slang --without-x"
 hostmakedepends="perl pkg-config"
 makedepends="e2fsprogs-devel gpm-devel libglib-devel libssh2-devel slang-devel"
 short_desc="User-friendly file manager and visual shell"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="0x5c <dev@0x5c.io>"
 license="GPL-3.0-or-later"
 homepage="https://midnight-commander.org/"
 changelog="https://midnight-commander.org/wiki/NEWS-${version}"
 distfiles="https://www.midnight-commander.org/downloads/mc-${version}.tar.xz"
-#distfiles="http://fossies.org/linux/misc/mc-${version}.tar.gz"
-checksum=01d8a3b94f58180cca5bf17257b5078d1fd6fd27a9b5c0e970ec767549540ad4
-python_version=2
+checksum=5ebc3cb2144b970c5149fda556c4ad50b78780494696cdf2d14a53204c95c7df
 
 conf_files="
  /etc/mc/filehighlight.ini
@@ -25,3 +23,7 @@ conf_files="
  /etc/mc/mc.menu
  /etc/mc/mcedit.menu
  /etc/mc/sfs.ini"
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] mc: cleanup, python3, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (5 preceding siblings ...)
  2023-10-10  1:42 ` [PR PATCH] [Updated] " 0x5c
@ 2023-10-10  1:45 ` 0x5c
  2023-10-10  1:49 ` mc: update to 4.8.29, cleanup, adopt 0x5c
  2023-10-10  1:51 ` [PR PATCH] [Merged]: " classabbyamp
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2023-10-10  1:45 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by 0x5c against master on the void-packages repository

https://github.com/0x5c/void-packages mc-cleanup
https://github.com/void-linux/void-packages/pull/38079

[RFC] mc: cleanup, python3, adopt.
This PR splits off python-dependent backends into a subpackage. This is the approach used in other distros.
However, this only takes care of having python, it does not take into account more programs that may be needed (like the uc1451 backend needing the `vice` package). Most backends are just thin translation layers over an external tool, and some need perl. None of those dependencies are marked as such in the package, nor are they in other distros. What would be the best way to deal with that?

#### Testing the changes
- I tested the changes in this PR: **YES**
    It is impossible to test the s3 backend without an AWS S3 account, but the patch is used in other distros.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mc-cleanup-38079.patch --]
[-- Type: text/x-diff, Size: 8826 bytes --]

From e073181fa7ed7a67da7ca3beb5b258334149c599 Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Fri, 15 Jul 2022 01:32:33 -0400
Subject: [PATCH] mc: update to 4.8.29, cleanup, adopt.

Also convert scripts from python2 to python3.
---
 srcpkgs/mc/files/README.voidlinux      | 50 ++++++++++++++++
 srcpkgs/mc/patches/extfs-python3.patch | 80 ++++++++++++++++++++++++++
 srcpkgs/mc/template                    | 12 ++--
 3 files changed, 137 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/mc/files/README.voidlinux
 create mode 100644 srcpkgs/mc/patches/extfs-python3.patch

diff --git a/srcpkgs/mc/files/README.voidlinux b/srcpkgs/mc/files/README.voidlinux
new file mode 100644
index 0000000000000..986eb66805184
--- /dev/null
+++ b/srcpkgs/mc/files/README.voidlinux
@@ -0,0 +1,50 @@
+MC has a number of "extfs" backend scripts to extend its functionality.
+They depend on various programs to work, which are not marked as dependencies of
+the mc package and must be installed manually for the backends to work properly.
+
+| Backend                                     | Dependencies                                         |
+| ------------------------------------------- | ---------------------------------------------------- |
+| `a+` DOS filesystem access                  | `perl mtools`                                        |
+| `apt+` APT frontend (repository browser?)   | `perl apt dpkg`                                      |
+| `audio` browse audio cdroms+CDDB            | `cdparanoia wget`                                    |
+| `changesetfs` list git revs of curr. file   | `git`                                                |
+| `deb` .deb package viewer                   | `perl dpkg`                                          |
+| `deba` APT frontend (deb browser/installer) | `perl apt dpkg`                                      |
+| `debd` DPKG frontend (also deb browser)     | `perl dpkg`                                          |
+| `dpkg+` DPKG frontend                       | `perl dpkg`                                          |
+| `gitfs+` git repo browser                   | `git`                                                |
+| `iso9660` ISO9660 image browser             | `xorriso cdrtools [common_archivers]`                |
+| `lslR` "For browsing lslR listings"         | `[common_archivers]`                                 |
+| `mailfs` Mailbox browser                    | `[common_archivers] file perl-{TimeDate,Date-Manip}` |
+| `patchfs` patchfile explorer                | `[common_archivers] file perl-TimeDate`              |
+| `patchsetfs` list git patches of curr. file | `git`                                                |
+| `rpm` RPM package viewer                    | `rpm`                                                |
+| `rpms+` RPM frontend                        | `perl rpm`                                           |
+| `trpm` RPM frontend                         | `rpm`                                                |
+| `u7z` 7zip archive support                  | `7zip`                                               |
+| `uar` AR archive support                    | `binutils`                                           |
+| `uc1541` C64/128 disk image support         | `python3 vice`                                       |
+| `ucab` Microsoft CAB archive support        | `cabextract`                                         |
+| `ulib` gputils archive support              | `perl gputils`                                       |
+| `unar` unar wrapper                         | `unar`                                               |
+| `urar` RAR archive support                  | `unrar`                                              |
+| `uwim` Windows WIM archive support          | `wimlib`                                             |
+| `uzip` ZIP archive support                  | `perl zip unzip`                                      |
+
+`[common_archivers]` refers to the following archivers/compressors: `bzip2 gzip lz4 lzip xz zstd`.
+
+Additionally, the following extfs plugins require programs that are not packaged on void.
+
+| Backend                                   | Dependencies                        |
+| ----------------------------------------- | ----------------------------------- |
+| `bpp`   "Bad Penguin" package management  | Unknown executable: `package-setup` |
+| `hp48+` file manager for HP48 calculators | Unknown executable: `kermit`        |
+| `s3+`   AWS S3 client                     | Missing python pkg: `python3-boto`  |
+| `uace`  ACE archive support               | Unknown executable: `unace`         |
+| `ualz`  ALZ archive support               | Unknown executable: `unalz`         |
+| `uarc`  ARC archive support               | Unknown executable: `arc`           |
+| `uarj`  ARJ archive support               | Unknown executable: `arj`           |
+| `uha`   HA archive support                | Unknown executable: `ha`            |
+| `ulha`  LHa archive support               | Unknown executable: `lha`           |
+| `uzoo`  ZOO archive support               | Unknown executable: `zoo`           |
+
diff --git a/srcpkgs/mc/patches/extfs-python3.patch b/srcpkgs/mc/patches/extfs-python3.patch
new file mode 100644
index 0000000000000..d86472ea81766
--- /dev/null
+++ b/srcpkgs/mc/patches/extfs-python3.patch
@@ -0,0 +1,80 @@
+Taken from https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc-python3.patch
+Also see https://github.com/MidnightCommander/mc/pull/149
+
+--
+
+--- a/src/vfs/extfs/helpers/uc1541
++++ b/src/vfs/extfs/helpers/uc1541
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ UC1541 Virtual filesystem
+ 
+--- a/src/vfs/extfs/helpers/s3+.in
++++ b/src/vfs/extfs/helpers/s3+.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ #
+@@ -153,16 +153,16 @@
+ 	Propagates exception safely.
+ 	"""
+ 	from threading import Thread
+-	import Queue
++	import queue
+ 
+ 	items = list(iterable)
+ 	nitems = len(items)
+ 	if nitems < 2:
+-		return map(fun, items)
++		return list(map(fun, items))
+ 
+ 	# Create and fill input queue
+-	input = Queue.Queue()
+-	output = Queue.Queue()
++	input = queue.Queue()
++	output = queue.Queue()
+ 
+ 	for i,item in enumerate(items):
+ 		input.put( (i,item) )
+@@ -181,7 +181,7 @@
+ 						output.put( (i,result) )
+ 					except:
+ 						output.put( (None,sys.exc_info()) )
+-				except Queue.Empty:
++				except queue.Empty:
+ 					return
+ 
+ 	# Start threads
+@@ -196,8 +196,8 @@
+ 		try:
+ 			i,res = output.get()
+ 			if i == None:
+-				raise res[0],res[1],res[2]
+-		except Queue.Empty:
++				raise res[0](res[1]).with_traceback(res[2])
++		except queue.Empty:
+ 			break
+ 		ret.append(res)
+ 
+@@ -241,7 +241,7 @@
+ 		b = s3.get_bucket(name, validate=False)
+ 		b.get_location() # just to raise an exception on error
+ 		return b
+-	except boto.exception.S3ResponseError, e:
++	except boto.exception.S3ResponseError as e:
+ 		# Seems this is the only proper way to switch to the bucket's region.
+ 		# Requesting of the default region for "?location" does not work unfortunately.
+ 		m = re.search(r'<Region>(.*?)</Region>', e.body)
+@@ -340,7 +340,7 @@
+ 	expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$')
+ 	def convDate(awsdatetime):
+ 		m = expr.match(awsdatetime)
+-		ye,mo,da,ho,mi,se = map(int,m.groups())
++		ye,mo,da,ho,mi,se = list(map(int,m.groups()))
+ 
+ 		dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc)
+ 		return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M')
diff --git a/srcpkgs/mc/template b/srcpkgs/mc/template
index bcae7c672c3a5..8b3085709ee71 100644
--- a/srcpkgs/mc/template
+++ b/srcpkgs/mc/template
@@ -1,20 +1,18 @@
 # Template file for 'mc'
 pkgname=mc
-version=4.8.29
+version=4.8.30
 revision=1
 build_style=gnu-configure
 configure_args="--with-screen=slang --without-x"
 hostmakedepends="perl pkg-config"
 makedepends="e2fsprogs-devel gpm-devel libglib-devel libssh2-devel slang-devel"
 short_desc="User-friendly file manager and visual shell"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="0x5c <dev@0x5c.io>"
 license="GPL-3.0-or-later"
 homepage="https://midnight-commander.org/"
 changelog="https://midnight-commander.org/wiki/NEWS-${version}"
 distfiles="https://www.midnight-commander.org/downloads/mc-${version}.tar.xz"
-#distfiles="http://fossies.org/linux/misc/mc-${version}.tar.gz"
-checksum=01d8a3b94f58180cca5bf17257b5078d1fd6fd27a9b5c0e970ec767549540ad4
-python_version=2
+checksum=5ebc3cb2144b970c5149fda556c4ad50b78780494696cdf2d14a53204c95c7df
 
 conf_files="
  /etc/mc/filehighlight.ini
@@ -25,3 +23,7 @@ conf_files="
  /etc/mc/mc.menu
  /etc/mc/mcedit.menu
  /etc/mc/sfs.ini"
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: mc: update to 4.8.29, cleanup, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (6 preceding siblings ...)
  2023-10-10  1:45 ` 0x5c
@ 2023-10-10  1:49 ` 0x5c
  2023-10-10  1:51 ` [PR PATCH] [Merged]: " classabbyamp
  8 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2023-10-10  1:49 UTC (permalink / raw)
  To: ml

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

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/38079#issuecomment-1186429613

Comment:
I can see a couple of groupings that may be useful for defining subpackages

- APT/DPKG stuff: `apt+`, `deb`, `deba`, `debd`, `dpkg+` (how the hell is there 5 of them?)
- RPM stuff: `rpm`, `rpms+`, `trpm`
- things we don't have all the bits for: `bpp`, `hp48+`, `uace`, `ualz`, `uarc`, `uarj`, `uha`, `ulha`, `uzoo` (ARC here *might* be the same format as what PKARC was for?)
- git-related backends: `gitfs+`, `changesetfs`, `patchsetfs`
- misc, shared-depends backends: `mailfs`, `patchfs`, `lslR`
- archive file formats: `u7z`, `uar`, `ulib`, `unar`, `urar`, `ucab`, `uzip`
- disk/etc image formats: `iso9660`, `uc1541`, `uwim`
- hard to categorise backends: `a+`, `audio`, `s3+`

**EDIT:** This approach got dropped in favour of simply documenting what packages are needed for the extfs scripts

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: mc: update to 4.8.29, cleanup, adopt.
  2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
                   ` (7 preceding siblings ...)
  2023-10-10  1:49 ` mc: update to 4.8.29, cleanup, adopt 0x5c
@ 2023-10-10  1:51 ` classabbyamp
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-10-10  1:51 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

mc: update to 4.8.29, cleanup, adopt.
https://github.com/void-linux/void-packages/pull/38079

Description:
Takes care of python2 scripts, and documents what packages are needed for each "extfs" backend script.

#### Testing the changes
- I tested the changes in this PR: **YES**
    It is impossible to test the s3 backend without an AWS S3 account, but the patch is used in other distros.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-10  1:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15  5:57 [PR PATCH] [RFC] mc: cleanup, python3, adopt 0x5c
2022-07-17  6:26 ` 0x5c
2022-07-17  7:28 ` 0x5c
2022-07-17  9:02 ` 0x5c
2022-10-16  2:14 ` github-actions
2022-10-31  2:15 ` [PR PATCH] [Closed]: " github-actions
2023-10-10  1:42 ` [PR PATCH] [Updated] " 0x5c
2023-10-10  1:45 ` 0x5c
2023-10-10  1:49 ` mc: update to 4.8.29, cleanup, adopt 0x5c
2023-10-10  1:51 ` [PR PATCH] [Merged]: " classabbyamp

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).