Package Details: offpunk-git 5:2.2.r0.g4a3ec61-1

Git Clone URL: https://aur.archlinux.org/offpunk-git.git (read-only, click to copy)
Package Base: offpunk-git
Description: Fork of the command-line Gemini client AV-98 with added offline capabilities (development snapshot)
Upstream URL: https://git.sr.ht/~lioploum/offpunk
Keywords: av98 cli gemini
Licenses: AGPL-3.0-or-later
Conflicts: offpunk
Provides: offpunk
Submitter: kseistrup
Maintainer: kseistrup
Last Packager: kseistrup
Votes: 7
Popularity: 0.047588
First Submitted: 2022-01-01 08:55 (UTC)
Last Updated: 2024-02-15 07:34 (UTC)

Dependencies (21)

Required by (0)

Sources (1)

Pinned Comments

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

m040601 commented on 2022-08-04 17:24 (UTC)

Really great project. Nice to see many other Arch users interested in this. Hope that with enough votes this could make it as an official Arch package.

In the mean time, check and modify the the Upstream URL. He keeps changing it. Currently this PKGBUILD has,

https://tildegit.org/ploum/offpunk

But on that page, he wrote,

Official repository : https://notabug.org/ploum/offpunk/

And in fact, that repo is more up to date. He has now realeased 1.5

His homepage, https://ploum.net (not very updated) His gemini page, gemini://rawtext.club/~ploum (he posts more frequently)

kseistrup commented on 2022-04-03 15:30 (UTC)

@gardenappl, thanks for telling me!

gardenappl commented on 2022-04-03 15:18 (UTC)

Offpunk repo changed to https://tildegit.org/ploum/offpunk

kseistrup commented on 2022-02-01 14:21 (UTC)

@m40601 Thanks for reporting the bug and thanks for confirming that offpunk works as expected!

m040601 commented on 2022-02-01 13:59 (UTC)

The problem with the incompatible ‘xdg’ modules should be resolved now. Please test.

Wow, that was fast, :-) ...

I tested, and can confirm it is working fine now. Offpunk seem to be creating and making use of the "correct" xdg folders:

- ~/.local/share/offpunk/, for lists, history etc

- ~/.config/offpunk/, for tofu, certificates, etc

- ~/.cache/offpunk/, for cache stuff

It doesnt create any ~/.offpunkt folder anymore.

Superb work kseistrup reporting this to ploum. Thanks for your effort and commitment.

kseistrup commented on 2022-02-01 11:51 (UTC)

The problem with the incompatible ‘xdg’ modules should be resolved now. Please test.

kseistrup commented on 2022-02-01 08:02 (UTC)

@m040601, I have filed an issue over at the source repo: https://tildegit.org/ploum/AV-98-offline/issues/6

kseistrup commented on 2022-02-01 06:41 (UTC)

@m040601 Thanks for reporting this. I missed the dependency of xdg, sorry for that.

It is an unfortunate situation. We have two conflicting packages here:

extra/python-pyxdg 0.27-4
aur/python-xdg 5.1.1

The both install as xdg, but their APIs are different and incompatible, and unfortunately the author of offpunk has decided to go with the latter. It is not the first package I have encountered that depended on python-xdg. It's a “What do you want the most” situation.

I don't think there's much I can do other that to update PKGBUILD with the dependency on python-xdg. We could also try to convince the author to use the python-pyxdg module instead.

Meanwhile, I will probably install offpunk in a virtual environment, but that's not an ideal situation.

If anyone has suggestions, please step forward.

PS: Another unfortunate thing is that the xdg dependency is optional in offpunk. If xdg is not found, offpunk will work around it. I suppose I could create a diff that edited offpunk such that it will always use the workaround. I'll have to look into it later.

Meanwhile, you could edit /usr/lib/python3.10/sitepackages/offpunk.py around line 87:

85  ## Config directories
86  try:
87      import xdg
88      _CACHE_PATH = os.path.join(xdg.xdg_cache_home().resolve(), "offpunk/")

such that python cannot find the module, e.g.:

87      import ZZZxdg

m040601 commented on 2022-02-01 05:12 (UTC) (edited on 2022-02-01 05:27 (UTC) by m040601)

Further investigation discovered that "offpunk-git" clashes with "python-pyxdg".

python-pyxdg is an official Arch package. It is not an AUR thingy. It is a dependency required by other important official packages like khal (calendars) etc. See them all here, https://archlinux.org/packages/extra/any/python-pyxdg/

pacman -Si python-pyxdg

Repository      : extra
Name            : python-pyxdg
Version         : 0.27-4
Description     : Python library to access freedesktop.org standards
Architecture    : any
URL             : http://freedesktop.org/Software/pyxdg
Licenses        : LGPL
Groups          : None
Provides        : python-xdg
Depends On      : python
Optional Deps   : None
Conflicts With  : python-xdg
Replaces        : python-xdg<0.26-5
Download Size   : 78.76 KiB
Installed Size  : 390.22 KiB
Packager        : Felix Yan <felixonmars@archlinux.org>
Build Date      : Wed 01 Dec 2021 09:49:26 PM WET
Validated By    : MD5 Sum  SHA-256 Sum  Signature

pacman -Ql python-pyxdg

python-pyxdg /usr/
python-pyxdg /usr/lib/
python-pyxdg /usr/lib/python3.10/
python-pyxdg /usr/lib/python3.10/site-packages/
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/PKG-INFO
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/SOURCES.txt
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/dependency_links.txt
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/top_level.txt
python-pyxdg /usr/lib/python3.10/site-packages/xdg/
python-pyxdg /usr/lib/python3.10/site-packages/xdg/BaseDirectory.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Config.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/DesktopEntry.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Exceptions.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/IconTheme.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/IniFile.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Locale.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Menu.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/MenuEditor.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Mime.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/RecentFiles.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__init__.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/BaseDirectory.cpython-310.opt-1.pyc
.... lotz of stuff ...
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/util.cpython-310.pyc
python-pyxdg /usr/lib/python3.10/site-packages/xdg/util.py

If one experiments removing "python-pyxdg" (and packages that need it) from the system, then offpunk starts.

Still, I'm not sure if this should be counted as a bug in offpunk itself. Or some change that should be made to the PKGBUILD. Please advise.

m040601 commented on 2022-02-01 04:17 (UTC)

For a couple of days now (4? 5?), I can't start offpunk. Getting this error message:

Traceback (most recent call last):
  File "/usr/bin/offpunk", line 33, in <module>
    sys.exit(load_entry_point('offpunk==0.2', 'console_scripts', 'offpunk')())
  File "/usr/bin/offpunk", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 88, in <module>
    _CACHE_PATH = os.path.join(xdg.xdg_cache_home().resolve(), "offpunk/")
AttributeError: module 'xdg' has no attribute 'xdg_cache_home'

Already tried to make sure to restart by completely deleting any folders or files containing "offpunk" or "av-98" in:

  • rm -rf ~/.cache/offpunk

  • rm -rf ~/.cache/av-98

  • rm -rf ~/.local/share/offpunk

  • rm -rf ~/.local/share/av-98

  • rm -rf ~/.config/offpunk

  • rm -rf ~/.config/av-98

Still the same error message. As I am not a programmer and dont understand python, I'm not sure if this is a problem with this PKGBUILD or with the upstream git development.

Do you have any advice before I report it upstream to the developer ?