LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-24-2023, 07:40 AM   #1
brico
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Rep: Reputation: Disabled
Debian 11 - Local paquets (not miror)


Excuse-me. I don't know how to change the tittle.

"Debian 11 - Local packages (not miror)"

--------------------------------------------------------

In "/etc/apt/sources.list": we have only one line:
------------------
deb file:/My-packages ./
------------------

If I don't make mistake, we needs:
/My-packages
- some packages ready to install
- file Release
- file Release.gpg (optionnal)
- file Packages
- file Packages.gz

. To create file "Release":
root@pc:/My-packagess# dpkg-scanpackages . /dev/null > Packages

. To create file "Packages":
root@pc:/My-packages# 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-packagest# dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz

Below:
root@pc:/My-packagest# 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-packages# apt-get install gnupg

root@pc:/My-packages# gpg --full-generate-key

root@pc:/My-packages# gpg --list-keys
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: profondeur*: 0 valables*: 1 signées*: 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-packages# gpg -abs -o Release.gpg -u 5E1419DBDE6F356A4679E57CC3B305F1E218A137 Release

But the following steps no longer work:

root@pc:/My-packages# 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
Réception de*:1 file:/My-packages ./ InRelease
Ign*:1 file:/My-packages ./ InRelease
Réception de*:2 file:/My-packages ./ Release [326 B]
Réception de*:2 file:/My-packages ./ Release [326 B]
Réception de*:3 file:/My-packages ./ Release.gpg [659 B]
Réception de*:3 file:/My-packages ./ Release.gpg [659 B]
Ign*:3 file:/My-packages ./ Release.gpg
Reading the lists of My-packages... Done
W: GPG error*:*file:/My-packages ./ Release*:*The following signatures could not be verified because the public key is not available*: NO_PUBKEY C3B305F1E218A137
E: The file:/My-packages ./Release repository is not signed.

I hope I managed to explain the problem and the tests carried out.

Thanks fore all.

Best regards.

Last edited by brico; 09-24-2023 at 01:20 PM.
 
Old 09-24-2023, 12:25 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Smile Hi.

In "English" so I assume packages?

[CODE][/CODE] tags will help in deciphering what you're trying to do, are you trying to create a local mirror?

Maybe: https://wiki.debian.org/Packaging/Intro
https://www.pendrivelinux.com/how-to...-linux-mirror/
https://wiki.debian.org/DebianRepository/Setup &c...

Last edited by jamison20000e; 09-24-2023 at 12:35 PM. Reason: add links
 
Old 09-24-2023, 01:14 PM   #3
brico
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Packages.. Packages...

Yes, packages. I'm sorry.

I'll study the links you have written.

The third seems to be very interesting.

Local mirror: the server will own only some packages (bind9, apache2, etc.), not all packages. For example, we have selected only 1,3 Go of packages. We don't need more packages.

In Debian 10, we have a solution that worked fine. But with Debian 11, the security is higher, and our "old" solution doesn't work.

With Debian 11, we have found a solution with "apt-get update --allow-insecure-repositories". Having a solution with only "apt-get update" is a challenge. But, for that, we have to understand PGP !

Thanks for all.

Best regards.
 
1 members found this post helpful.
Old 09-26-2023, 05:58 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Quote:
Originally Posted by brico View Post
Having a solution with only "apt-get update" is a challenge.
Not at all. Just install the package local-apt-repository and follow instructions in its README.
 
Old 09-26-2023, 12:41 PM   #5
brico
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, "local-apt-repository" make all what I want !

With "/usr/share/doc/local-apt-repository/README", I've found how to use it.

Thanks for all.

Best regards.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What are the best ways and practices to manage local SSL certificates with my own CA, to get local HTTPS sites like https://testsite.local ? ZhaoLin1457 Slackware 11 02-04-2021 04:15 PM
Why is my linux sending paquets on stanby? metzenx Linux - Software 4 04-23-2018 10:01 AM
3 nics, connect to internet, share to local net, and connect to local net. Not workin linux-i386 Linux - Networking 2 09-15-2009 09:13 PM
relay all non-local mail to 1 local address and NOT real destinations manqox Linux - Server 6 09-04-2008 04:13 AM
passwd: can't get local yp domain: Local domain name not set powah Linux - Security 4 06-08-2006 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration