Discussion:
Probleem met checkgroups nl.*
(te oud om op te antwoorden)
Adri Verhoef
2024-04-22 12:00:50 UTC
Permalink
De checkgroups-controlmessage had gister gepost moeten worden, maar het is niet
gelukt. Het te signeren bestand werd niet ondertekend vanwege een probleem met
PGP.

Als ik het checkgroups-script met de hand start, krijg ik:

$ ./checkgroups nl
signcontrol: -----BEGIN PGP SIGNATURE----- not found in

Na het woordje "in" wordt de inputregel afgedrukt en die is kennelijk leeg; bij
nader onderzoek moet dit in de volgende code van het script gebeuren:

# -f = write to stdout
# -a = ciphertext file in ASCII radix-64 format
# -s = sign the plaintext file
# -t = plaintext file contains ASCII text, not binary, and
# should be converted to recipient's local text line conventions
# -u = userid to use to sign
# +verbose=0 = only print errors on stderr
open(FH, "exec $pgp -fast -u $pgpsigner +verbose=0 < $tmp 2>/dev/null |") ||
die "$0: open pipe from pgp: $!\n";

# whack any passphrase out of our environment. don't let this kid
# you, it does not stop snooping.
delete $ENV{'PGPPASS'};

$pgpbegin = "-----BEGIN PGP SIGNATURE-----";
$/ = "$pgpbegin\n";
$_ = <FH>; # read to signature, discard
die "$0: $pgpbegin not found in $_\n" unless /\Q$pgpbegin\E$/;

# make sure the temp file goes away even if we die now
unlink($tmp) || warn "$0: unlink $tmp: $!\n";

In de "open(FH, ..." wordt pgp aangeroepen, de inputfile is achtergebleven,
omdat het script werd beëindigd na de die()-melding.

Om te kijken wat er misging, draai ik daarom, met ingevulde variabelen:
$ /usr/local/bin/pgp -fast -u nl.newsgroups +verbose=0 < /tmp/sign-951965

Het resultaat:
-bash: /usr/local/bin/pgp: cannot execute: required file not found

Met strace:
$ strace /usr/local/bin/pgp -fast -u nl.newsgroups +verbose=0 < /tmp/sign-951965
execve("/usr/local/bin/pgp", ["/usr/local/bin/pgp", "-fast", "-u", "nl.newsgroups", "+verbose=0"], 0x7fffe4f9f130 /* 32 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++

Kaal dan?
$ pgp
bash: /usr/local/bin/pgp: cannot execute: required file not found

Ik weet niet wat de 'required file' is. Wat nu? In de sources van pgp263is is
de term 'required file' niet te vinden.

De laatste keer dat ik pgp compileerde, was in 1999; als ik de source nu
probeer te compileren, krijg ik:

$ make linux
make all CC=gcc LD=gcc OBJS_EXT="_80386.o _zmatch.o" \
CFLAGS=" -O6 -g3 -DUNIX -DLINUX -DIDEA32 -DASM"
make[1]: Entering directory '/tmp/pgp263ii/src'
gcc -O6 -g3 -DUNIX -DLINUX -DIDEA32 -DASM -c -o pgp.o pgp.c
pgp.c: In function ‘main’:
pgp.c:795:20: error: implicit declaration of function ‘pgp_getopt’; did you mean ‘getopt’? [-Wimplicit-function-declaration]
795 | ((opt = pgp_getopt(argc, argv, OPTIONS)) == EOF)) {
| ^~~~~~~~~~
| getopt
make[1]: *** [<builtin>: pgp.o] Error 1
make[1]: Leaving directory '/tmp/pgp263ii/src'
make: *** [makefile:167: linux] Error 2

Wat nu?

Ik probeer dit werkend te krijgen, omdat ik het posten van de checkgroups
weer op gang probeer te krijgen en omdat mijn script is gebaseerd op PGP.
Waarom niet GPG? Omdat ik niet weet óf noch hóe dat mogelijk gemaakt kan
worden (https://www.gnupg.org/gph/en/pgp2x.html had ik jaren geleden zelf
al gevonden).

Adri
De ongekruisigde (ds.)
2024-04-22 12:52:00 UTC
Permalink
Post by Adri Verhoef
+++
Kaal dan?
$ pgp
bash: /usr/local/bin/pgp: cannot execute: required file not found
Ik weet niet wat de 'required file' is. Wat nu? In de sources van pgp263is is
de term 'required file' niet te vinden.
Gebruik het ldd commando op /usr/local/bin/pgp om te zien welke
shared libraries worden gebruikt. Als er oudere versies nodig
zijn die niet meer op het systeem staan dan leidt dat mogelijk
tot jouw foutmelding.

ldd --help
Usage: ldd [OPTION]... FILE...
--help print this help and exit
--version print version information and exit
-d, --data-relocs process data relocations
-r, --function-relocs process data and function relocations
-u, --unused print unused direct dependencies
-v, --verbose print all information
--
De Kerk van Roodkapje (KvR) belijdt de enige ware religie! De
Rode Macht van Roodkapje is wetenschappelijk onderzocht en
bevestigd (google roodverschuiving).
Adri Verhoef
2024-04-25 14:24:37 UTC
Permalink
Op moederschip aarde schreef iemand die zich identificeerde als
Post by De ongekruisigde (ds.)
Post by Adri Verhoef
+++
Kaal dan?
$ pgp
bash: /usr/local/bin/pgp: cannot execute: required file not found
Ik weet niet wat de 'required file' is. Wat nu? In de sources van pgp263is is
de term 'required file' niet te vinden.
Gebruik het ldd commando op /usr/local/bin/pgp om te zien welke
shared libraries worden gebruikt. Als er oudere versies nodig
zijn die niet meer op het systeem staan dan leidt dat mogelijk
tot jouw foutmelding.
Ik heb daarnet wat commando's uitgevoerd:

$ ldd /usr/local/bin/pgp
not a dynamic executable
$ file /usr/local/bin/pgp
/usr/local/bin/pgp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, stripped
$ readelf -a /usr/local/bin/pgp | grep NEEDED
0x00000001 (NEEDED) Shared library: [libc.so.6]

In mijn zoektocht naar /lib/ld-linux.so.2 stuitte ik al snel op
https://www.baeldung.com/linux/bad-elf-interpreter. Aldus:

$ dnf provides /lib/ld-linux.so.2
Last metadata expiration check: 0:21:38 ago on Thu 25 Apr 2024 15:32:38 CEST.
glibc-2.39-6.fc40.i686 : The GNU libc libraries
Repo : fedora
Matched from:
Filename : /lib/ld-linux.so.2

glibc-2.39-8.fc40.i686 : The GNU libc libraries
Repo : updates
Matched from:
Filename : /lib/ld-linux.so.2

glibc32-2.39-8.fc40.x86_64 : The GNU libc libraries (32-bit)
Repo : updates
Matched from:
Filename : /lib/ld-linux.so.2

Aangezien het twijfelachtig is of PGP-2 in stand gehouden dient te worden voor
de nl-hiërarchie, immers (volgens <***@mid.individual.net>):
"Modern implementations of GnuPG 2.x no longer accept old PGP-2 keys, so
most news servers won't be able to honour your control articles..." en
"This is why still active hierarchies using PGP-2 are encouraged to
generate a new modern key (like a 3072 or 4096-bit RSA key widely
supported by both GnuPG 1.x and 2.x). The Big-8 did that in 2021:"
lijkt het mij beter niet te proberen hier PGP-2 uit de as te doen herrijzen.

In ieder geval dank voor je hulp, ongekruisigde.
tjoen
2024-04-25 16:55:45 UTC
Permalink
Post by Adri Verhoef
$ readelf -a /usr/local/bin/pgp | grep NEEDED
0x00000001 (NEEDED) Shared library: [libc.so.6]
Waar zit die?
Mouet in /usr/lib/ of /lib/ zitten
LFS doet het verkeerd met /lib32/
De ongekruisigde (ds.)
2024-04-25 17:07:45 UTC
Permalink
Post by tjoen
Post by Adri Verhoef
$ readelf -a /usr/local/bin/pgp | grep NEEDED
0x00000001 (NEEDED) Shared library: [libc.so.6]
Waar zit die?
Mouet in /usr/lib/ of /lib/ zitten
LFS doet het verkeerd met /lib32/
Watte?

$ ls -l /usr/lib
ls: cannot access '/usr/lib': No such file or directory
$ ls -l /lib
ls: cannot access '/lib': No such file or directory

Helemaal niet nodig die paden.
--
De Kerk van Roodkapje (KvR) belijdt de enige ware religie! De
Rode Macht van Roodkapje is wetenschappelijk onderzocht en
bevestigd (google roodverschuiving).
Adri Verhoef
2024-04-25 20:04:45 UTC
Permalink
Op moederschip aarde schreef iemand die zich identificeerde als
Post by De ongekruisigde (ds.)
Post by tjoen
Post by Adri Verhoef
$ readelf -a /usr/local/bin/pgp | grep NEEDED
0x00000001 (NEEDED) Shared library: [libc.so.6]
Waar zit die?
Mouet in /usr/lib/ of /lib/ zitten
LFS doet het verkeerd met /lib32/
Watte?
$ ls -l /usr/lib
ls: cannot access '/usr/lib': No such file or directory
$ ls -l /lib
ls: cannot access '/lib': No such file or directory
Fedora 40 (momenteel met kernel 6.8.*):
$ ls -ld /lib /lib64 /usr/lib /usr/lib64 /usr/libexec
lrwxrwxrwx. 1 root root 7 Jan 24 01:00 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jan 24 01:00 /lib64 -> usr/lib64
dr-xr-xr-x. 51 root root 4096 Apr 20 12:54 /usr/lib
dr-xr-xr-x. 176 root root 135168 Apr 25 15:35 /usr/lib64
drwxr-xr-x. 52 root root 12288 Apr 25 15:35 /usr/libexec

Maar ja, ik heb momenteel geen 32-bits packages geïnstalleerd op m'n systeem,
dus ook geen libc.

:-)

$ dnf provides /lib/libc.so.6
Last metadata expiration check: 6:25:45 ago on Thu 25 Apr 2024 15:32:38 CEST.
glibc-2.39-6.fc40.i686 : The GNU libc libraries
Repo : fedora
Matched from:
Filename : /lib/libc.so.6

glibc-2.39-8.fc40.i686 : The GNU libc libraries
Repo : updates
Matched from:
Filename : /lib/libc.so.6

glibc32-2.39-8.fc40.x86_64 : The GNU libc libraries (32-bit)
Repo : updates
Matched from:
Filename : /lib/libc.so.6
$ dnf info glibc32-2.39-8.fc40.x86_64
Available Packages
Name : glibc32
Version : 2.39
Release : 8.fc40
Architecture : x86_64
Size : 2.3 M
Source : glibc-2.39-8.fc40.src.rpm
Repository : updates
Summary : The GNU libc libraries (32-bit)
URL : http://www.gnu.org/software/glibc/
License : LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.1-only AND LGPL-2.0-or-later AND Unicode-DFS-2015 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only
Description : This package is only used for internal building of multilib aware
: packages, like gcc, due to a technical limitation in the distribution
: build environment. Any package which needs both 32-bit and 64-bit
: runtimes at the same time must install glibc32 (marked as a 64-bit
: package) to access the 32-bit development files during a 64-bit build.
:
: This package is not supported or intended for use outside of the
: distribution build enviroment. Regular users can install both 32-bit and
: 64-bit runtimes and development files without any problems.

Dit (glibc32) zou ook een oplossing kunnen zijn, áls het per se zou moeten of
als we het zouden willen. Dat valt voorlopig nog even te bezien.

Adri

De ongekruisigde (ds.)
2024-04-25 17:09:48 UTC
Permalink
Post by Adri Verhoef
Op moederschip aarde schreef iemand die zich identificeerde als
+++
+++
Aangezien het twijfelachtig is of PGP-2 in stand gehouden dient te worden voor
"Modern implementations of GnuPG 2.x no longer accept old PGP-2 keys, so
most news servers won't be able to honour your control articles..." en
"This is why still active hierarchies using PGP-2 are encouraged to
generate a new modern key (like a 3072 or 4096-bit RSA key widely
supported by both GnuPG 1.x and 2.x). The Big-8 did that in 2021:"
lijkt het mij beter niet te proberen hier PGP-2 uit de as te doen herrijzen.
Doe het niet! (geeft alleen maar een ellendige
onderhoudsnachtmerrie)
Post by Adri Verhoef
In ieder geval dank voor je hulp, ongekruisigde.
You're welcome!
--
De Kerk van Roodkapje (KvR) belijdt de enige ware religie! De
Rode Macht van Roodkapje is wetenschappelijk onderzocht en
bevestigd (google roodverschuiving).
Loading...