Debian 11 - Local paquets (not miror)
by brico from LinuxQuestions.org on (#6F17A)
In "/etc/apt/sources.list": we have only one line:
------------------
deb file:/My-paquets ./
------------------
If I don't make mistake, we needs:
/My-paquets
- some paquets ready to install
- file Release
- file Release.gpg (optionnal)
- file Packages
- file Packages.gz
. To create file "Release":
root@pc:/My-paquetss# dpkg-scanpackages . /dev/null > Packages
. To create file "Packages":
root@pc:/My-paquets# cat <<EOF > Release
Origin: Me
Label: Enough-me
Suite: stable
Version: 1.0
Codename: stable
Date: $(date -R)
Architectures: amd64
Components: main
Description: Local deposit personal
MD5Sum:
$(md5sum Packages | awk '{print " " $1}' | sed -e 's/ / /g') $(stat -c%s Packages)
SHA256:
$(sha256sum Packages | awk '{print " " $1}' | sed -e 's/ / /g') $(stat -c%s Packages)
EOF
. To create file "Packages.gz":
root@pc:/My-paquetst# dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz
Below:
root@pc:/My-paquetst# apt-get update --allow-insecure-repositories
is Ok.
And after, "apt-get install one_paquet" is ok too.
But, whe need to go longer (and not having to use "--allow-insecure-repositories").
Now, if we try to create the file "Release.gpg":
root@pc:/My-paquets# apt-get install gnupg
root@pc:/My-paquets# gpg --full-generate-key
root@pc:/My-paquets# gpg --list-keys
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: profondeur*: 0 valables*: 1 signies*: 0
confiance*: 0*i., 0*n.d., 0*j., 0*m., 0*t., 1*u.
/root/.gnupg/pubring.kbx
------------------------
pub rsa3072 2023-09-23 [SC]
5E1419DBDE6F356A4679E57CC3B305F1E218A137
uid [ ultime ] ME <ME@LOCAL>
sub rsa3072 2023-09-23 [E]
root@pc:/My-paquets# gpg -abs -o Release.gpg -u 5E1419DBDE6F356A4679E57CC3B305F1E218A137 Release
But the following steps no longer work:
root@pc:/My-paquets# gpg --recv-keys 5E1419DBDE6F356A4679E57CC3B305F1E218A137
gpg: failure to receive from key server: No data
Impossible to find a solution. Sorry.
And
root@pc:/Mon-depot# apt-get update
Riception de*:1 file:/My-paquets ./ InRelease
Ign*:1 file:/My-paquets ./ InRelease
Riception de*:2 file:/My-paquets ./ Release [326 B]
Riception de*:2 file:/My-paquets ./ Release [326 B]
Riception de*:3 file:/My-paquets ./ Release.gpg [659 B]
Riception de*:3 file:/My-paquets ./ Release.gpg [659 B]
Ign*:3 file:/My-paquets ./ Release.gpg
Reading the lists of My-paquets... Done
W: GPG error*:*file:/My-paquets ./ Release*:*The following signatures could not be verified because the public key is not available*: NO_PUBKEY C3B305F1E218A137
E: The file:/My-paquets ./Release repository is not signed.
I hope I managed to explain the problem and the tests carried out.
Thanks fore all.
Best regards.
------------------
deb file:/My-paquets ./
------------------
If I don't make mistake, we needs:
/My-paquets
- some paquets ready to install
- file Release
- file Release.gpg (optionnal)
- file Packages
- file Packages.gz
. To create file "Release":
root@pc:/My-paquetss# dpkg-scanpackages . /dev/null > Packages
. To create file "Packages":
root@pc:/My-paquets# cat <<EOF > Release
Origin: Me
Label: Enough-me
Suite: stable
Version: 1.0
Codename: stable
Date: $(date -R)
Architectures: amd64
Components: main
Description: Local deposit personal
MD5Sum:
$(md5sum Packages | awk '{print " " $1}' | sed -e 's/ / /g') $(stat -c%s Packages)
SHA256:
$(sha256sum Packages | awk '{print " " $1}' | sed -e 's/ / /g') $(stat -c%s Packages)
EOF
. To create file "Packages.gz":
root@pc:/My-paquetst# dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz
Below:
root@pc:/My-paquetst# apt-get update --allow-insecure-repositories
is Ok.
And after, "apt-get install one_paquet" is ok too.
But, whe need to go longer (and not having to use "--allow-insecure-repositories").
Now, if we try to create the file "Release.gpg":
root@pc:/My-paquets# apt-get install gnupg
root@pc:/My-paquets# gpg --full-generate-key
root@pc:/My-paquets# gpg --list-keys
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: profondeur*: 0 valables*: 1 signies*: 0
confiance*: 0*i., 0*n.d., 0*j., 0*m., 0*t., 1*u.
/root/.gnupg/pubring.kbx
------------------------
pub rsa3072 2023-09-23 [SC]
5E1419DBDE6F356A4679E57CC3B305F1E218A137
uid [ ultime ] ME <ME@LOCAL>
sub rsa3072 2023-09-23 [E]
root@pc:/My-paquets# gpg -abs -o Release.gpg -u 5E1419DBDE6F356A4679E57CC3B305F1E218A137 Release
But the following steps no longer work:
root@pc:/My-paquets# gpg --recv-keys 5E1419DBDE6F356A4679E57CC3B305F1E218A137
gpg: failure to receive from key server: No data
Impossible to find a solution. Sorry.
And
root@pc:/Mon-depot# apt-get update
Riception de*:1 file:/My-paquets ./ InRelease
Ign*:1 file:/My-paquets ./ InRelease
Riception de*:2 file:/My-paquets ./ Release [326 B]
Riception de*:2 file:/My-paquets ./ Release [326 B]
Riception de*:3 file:/My-paquets ./ Release.gpg [659 B]
Riception de*:3 file:/My-paquets ./ Release.gpg [659 B]
Ign*:3 file:/My-paquets ./ Release.gpg
Reading the lists of My-paquets... Done
W: GPG error*:*file:/My-paquets ./ Release*:*The following signatures could not be verified because the public key is not available*: NO_PUBKEY C3B305F1E218A137
E: The file:/My-paquets ./Release repository is not signed.
I hope I managed to explain the problem and the tests carried out.
Thanks fore all.
Best regards.