You are not logged in.
The software-properties-common package includes the file /usr/bin/apt-add-repository. But, for as long as I've been using Devuan - this fails. It says:
Traceback (most recent call last):
File "/usr/bin/apt-add-repository", line 361, in <module>
addaptrepo = AddAptRepository()
File "/usr/bin/apt-add-repository", line 39, in __init__
self.distro.get_sources(self.sourceslist)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 92, in get_sources
raise NoDistroTemplateException(
...<2 lines>...
)
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for devuan/excalibur ceres
Have Devuan maintainers considered this situation? If so, why has it not been addressed? And if not - can someone give me an idea regarding how to make the script find an appropriate template?
Offline
And if not - can someone give me an idea regarding how to make the script find an appropriate template?
Sure make a duplicate of the /etc/os-release file with debian listed in it. Actually better off going to debian website and get the base-files package from testing using ar to extract the .deb you can download from the link. The files that are setting the OS version are in that package.
root@9600k:~# cat /etc/os-release
PRETTY_NAME="Devuan GNU/Linux 6 (excalibur/ceres)"
NAME="Devuan GNU/Linux"
VERSION_ID="6"
VERSION="6 (excalibur/ceres)"
VERSION_CODENAME="excalibur ceres"
ID=devuan
ID_LIKE=debian
HOME_URL="https://www.devuan.org/"
SUPPORT_URL="https://devuan.org/os/community"
BUG_REPORT_URL="https://bugs.devuan.org/"
root@9600k:~# cat /etc/debian_version
trixie/sid
Actually just did it here.
zeus@9600k:~$ cd Downloads/
zeus@9600k:~/Downloads$ mkdir base_files
zeus@9600k:~/Downloads$ mv base-files_13.6_amd64.deb base_files/
zeus@9600k:~/Downloads$ cd base_files/
zeus@9600k:~/Downloads/base_files$ ar -xv base-files_13.6_amd64.deb
x - debian-binary
x - control.tar.xz
x - data.tar.xz
zeus@9600k:~/Downloads/base_files$ ll
total 192
72 -rw-rw-r-- 1 zeus zeus 72836 Feb 6 17:51 base-files_13.6_amd64.deb
0 lrwxrwxrwx 1 zeus zeus 7 Nov 22 10:40 bin -> usr/bin/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 boot/
4 -rw-r--r-- 1 zeus zeus 3196 Feb 6 17:52 control.tar.xz
68 -rw-r--r-- 1 zeus zeus 69448 Feb 6 17:52 data.tar.xz
4 -rw-r--r-- 1 zeus zeus 4 Feb 6 17:52 debian-binary
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 dev/
4 drwxr-xr-x 7 zeus zeus 4096 Nov 22 10:40 etc/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 home/
0 lrwxrwxrwx 1 zeus zeus 7 Nov 22 10:40 lib -> usr/lib/
0 lrwxrwxrwx 1 zeus zeus 9 Nov 22 10:40 lib64 -> usr/lib64/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 proc/
4 drwx------ 2 zeus zeus 4096 Nov 22 10:40 root/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 run/
0 lrwxrwxrwx 1 zeus zeus 8 Nov 22 10:40 sbin -> usr/sbin/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 sys/
4 drwxrwxr-x 2 zeus zeus 4096 Nov 22 10:40 tmp/
4 drwxr-xr-x 10 zeus zeus 4096 Nov 22 10:40 usr/
4 drwxr-xr-x 11 zeus zeus 4096 Nov 22 10:40 var/
zeus@9600k:~/Downloads/base_files$ ll etc/
total 36
4 -rw-r--r-- 1 zeus zeus 11 Nov 22 10:40 debian_version
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 default/
4 drwxr-xr-x 3 zeus zeus 4096 Nov 22 10:40 dpkg/
4 -rw-r--r-- 1 zeus zeus 9 Nov 22 10:40 host.conf
4 -rw-r--r-- 1 zeus zeus 35 Nov 22 10:40 issue
4 -rw-r--r-- 1 zeus zeus 28 Nov 22 10:40 issue.net
0 lrwxrwxrwx 1 zeus zeus 21 Nov 22 10:40 os-release -> ../usr/lib/os-release
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 profile.d/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 skel/
4 drwxr-xr-x 2 zeus zeus 4096 Nov 22 10:40 update-motd.d/
zeus@9600k:~/Downloads/base_files$ cat etc/debian_version
trixie/sid
zeus@9600k:~/Downloads/base_files$ cat etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
So there are the two files needed since the Devuan seems to keep debian_version at the Debian version only the os-release needs to be used. Copy the existing file to a backup and create a Debian version of it so you can easily switch back and forth between them.
root@9600k:~# cp /etc/os-release /etc/os-release.devuan
root@9600k:~# nano /etc/os-release.debian
root@9600k:~# cat /etc/os-release.debian
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
So there you will have two files in there that can be switched back and forth when needed, like I now have in case this problem crops up in anything I do.
Offline
So, one part of the problem, as explained by Stephen Kitt on StackOverflow, is that the distribution template files are missing an entry for Devuan Excalibur (!)
The template files are located at /usr/share/python-apt/templates/, and - there is a file for Devuan there - Devuan.info.
We can add to it an entry for Excalibur:
Suite: excalibur
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged/
MatchURI: [a-z]{2}\.deb\.devuan\.org
MirrorsFile: Devuan.mirrors
_Description: Devuan 6 'Excalibur'
Component: main
_CompDescription: Officially supported
Component: contrib
_CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
_CompDescription: Non-DFSG-compatible Software
... unfortunately, that is not enough, two issues remain:
1. Case-sensitive comparison of "Devuan" and "devuan" in /usr/lib/python3/dist-packages/aptsources/distro.py (probably, there should be a .tolower() call at some earlier point), and
2. The script parses the relevant meta-data wrong, concluding that the distribution's "codename" is excalibur ceres rather than just excalibur.
I'm not sure at this point how to fix that robustly; help is appreciated.
Offline
... unfortunately, that is not enough, two issues remain:
1. Case-sensitive comparison of "Devuan" and "devuan" in /usr/lib/python3/dist-packages/aptsources/distro.py (probably, there should be a .tolower() call at some earlier point), and
2. The script parses the relevant meta-data wrong, concluding that the distribution's "codename" is excalibur ceres rather than just excalibur.I'm not sure at this point how to fix that robustly; help is appreciated.
Well you seem fine with editing the distro.py, what is the problem with editing the other file need in this the os-release to match what is expected/required of it to work as you need. Make the two changed needed in it and it will work like you need it to do.
Offline
Well you seem fine with editing the distro.py
... with great pains, as a non-Pythonista :-(
what is the problem with editing the other file need in this the os-release to match what is expected/required of it to work as you need. Make the two changed needed in it and it will work like you need it to do.
The thing is, this is a Devuan package. It should work on Devuan. Users shouldn't need to figure out how to fix it, then fix it, on their own - that's what we have distro developers and maintainers for after all...
Last edited by einpoklum (2025-02-07 15:16:00)
Offline
Users shouldn't need to figure out how to fix it, then fix it, on their own - that's what we have distro developers and maintainers for after all...
In a perfect world this is true, that is not the one we live in. The time has come to use the report bug link included in that file to report the problem and hopefully have it solved by them. Until then you get to do the work around to get done what you need done.
Offline
The thing is, this is a Devuan package. It should work on Devuan. Users shouldn't need to figure out how to fix it, then fix it, on their own - that's what we have distro developers and maintainers for after all...
Our developers and maintainers are USERS like you. They are neither hired nor paid for their efforts to provide a service for Devuan users. Currently, no one is even bothering to build the installer testing isos so that should put your complaint into perspective! Perhaps consider becoming part of the solution by providing a patch?
Online
@einpoklum, it's a little bit interesting that you on the one hand make your system be part of Devuan's (and thus Debian's) testing/unstable effort and on the other seem annoyed that not all of that software is fully integrated as a stable release environment with "complete organisational branding".
Whilst it's helpful that you unravel misbehaviour, I'd suggest that your annoyance is somewhat misplaced. Rather one would expect you to follow through on the priviiege of partaking in the trialing of testing/unstable software by reporting on the feedback channels set up for that purpose. You have isolated a functional misbehaviour which thus should be reported to the upstream maintainers (those concerned with the functionality rather than packaging).
Also as you probably are aware, Devuan's charter is to reflect Debian sans [identified badness], and there is no additional commitment to software interoperability and completeness. It obviously would have been fun if that software (apt-add-repository) had been designed to automatically slot in a Devuan branding (or arbitrary non-Debian branding) in its principal functionality, but extending that software (either specifically for Devuan or generically in its design) is unrelated to [identified badness] and therefore actually outside the scope of Devuan's charter.
But there's of course nothing wrong in pointing to these kinds of bugs. It's just the matter of following throw with constructive action rather than "whine about it".
Offline
@ralph.ronnquist : I'm not annoyed, I was just explaining why having individual users edit distribution files is not the appropriate response to this issue. Also, this issue goes waaay back, I remember experiencing it since probably Beowulf I think.
@golinux: As you may be aware, I have a bunch of FOSS that I work on on my spare time; with Devuan - the role I have the time to take is limited to reporting issues I encounter, or in other words - complaining... But you will note that I've mapped out what I see as the two remaining issues - in an effort to be constructive (comment #3).
Last edited by einpoklum (2025-02-10 13:47:59)
Offline
I agree it's not the appropriate response. Someone should report it upstream.
Offline
I filed the following report using `reportbug`:
Package: software-properties-common
X-Debbugs-Cc: eyalroz1@gmx.com
Version: 0.99.30-4.1
Severity: importantDear Maintainer,
I am trying, and failing, to use software-properties-common on Devuan (= Debian without systemd). I get:
# add-apt-repository ppa:libreoffice/ppa Traceback (most recent call last): File "/usr/bin/apt-add-repository", line 361, in <module> addaptrepo = AddAptRepository() File "/usr/bin/apt-add-repository", line 39, in __init__ self.distro.get_sources(self.sourceslist) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 92, in get_sources raise NoDistroTemplateException( ...<2 lines>... ) aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for devuan/excalibur ceres
Devuan does has a templates .info file, /usr/share/python-apt/templates/Devuan.info ; and I have added Devuan excalibur to that file. That template file is of course not part of software-properties-common, but your package is intended to support such distribution templates, IIUC.
Anyway, there seems to be a combination of two problems (at least).
The first is in the treatment of uppercase vs lowercase. The template file name has Devuan in uppercase, but in some places in the code it seems the distribution name is determined to be devuan, lowercase.
The second is the inclusion of an extra space plus "ceres" in the distro name. I would have expected either "devuan/excalibur" or just "excalibur", but instead it's "devuan/excalibur ceres", which is probably not right. I think this may have something to do with the parsing of /etc/devuan_version:
# cat /etc/devuan_version excalibur/ceres # cat /etc/debian_version trixie/sid
(although I could be wrong). Anyway, I would appreciate your help in "robustifying" your package so that it is more flexible in the use of templates, for Debian-derivative distributions like Devuan and others.
Here's the entry for excalibur in the Devuan.info template file:
Suite: excalibur RepositoryType: deb BaseURI: http://deb.devuan.org/merged/ MatchURI: [a-z]{2}\.deb\.devuan\.org MirrorsFile: Devuan.mirrors _Description: Devuan 6 'Excalibur' Component: main _CompDescription: Officially supported Component: contrib _CompDescription: DFSG-compatible Software with Non-Free Dependencies Component: non-free _CompDescription: Non-DFSG-compatible Software
Offline