Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #265265

Re: how to clone apt repository to newest only?

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: how to clone apt repository to newest only?
Date 2023-12-26 15:10 +0100
Message-ID <HPgi5-ggdX-3@gated-at.bofh.it> (permalink)
References <HOTOx-g2J9-7@gated-at.bofh.it> <HOTOx-g2J9-5@gated-at.bofh.it> <HPgi5-ggdX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 26, 2023 at 10:19:26PM +0900, 이강우(KangWoo Lee) wrote:
> For example, I want to install the most recent packages when installing an
> OS in a specific closed network environment.
> 
> Of course, I could use a recently created DVD iso file, but I would need to
> have an internet connection to apply files that have been updated since
> this ISO was created, so I only want to copy and apply the most recent
> packages.
> 
> Is there any way to do this?

There are many ways, and I can't even name all of them.  I'll just
describe one way.

Assume that all of your systems are running the same release, on
the same architecture.  You might have one system (same release, same
architecture, same set of packages) that DOES have Internet access.
Maybe it's a laptop that you take to another location, or whatever.

So, periodically, you take the laptop to your grandma's house, or
whatever it is.  While there, you do an "apt-get update" and an
"apt-get dist-upgrade".  This brings in new package lists (in the
/var/lib/apt/lists/ directory), and possibly some new *.deb package
files (in /var/cache/apt/archives/).

After that's done, you bring the laptop to the isolated network.  Then
you rsync the /var/lib/apt/lists/ directory to all the other computers.
Next, you share your /var/cache/apt/archives/ via NFS, and mount it on
all of the other computers.

Finally, you do an "apt-get dist-upgrade" on all the other computers.
They'll use the lists that you copied to them, and the NFS-shared
package archive.

Once that's all done, unmount the /var/cache/apt/archives/ directory
from the other systems, and you're all set for a while.

If the laptop starts to fill up, you can do "apt-get autoclean", but
be very careful NEVER to run "apt-get clean".

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: how to clone apt repository to newest only? "Andrew M.A. Cater" <amacater@einval.com> - 2023-12-25 15:10 +0100
  Re: how to clone apt repository to newest only? Greg Wooledge <greg@wooledge.org> - 2023-12-26 15:10 +0100
  Re: how to clone apt repository to newest only? Hans <hans.ullrich@loop.de> - 2023-12-26 15:20 +0100
  Re: how to clone apt repository to newest only? "Andrew M.A. Cater" <amacater@einval.com> - 2023-12-26 15:40 +0100
    Re: how to clone apt repository to newest only? "Roy J. Tellason, Sr." <roy@rtellason.com> - 2023-12-26 22:40 +0100
      Re: how to clone apt repository to newest only? Charles Curley <charlescurley@charlescurley.com> - 2023-12-26 23:00 +0100
      Re: how to clone apt repository to newest only? "Andrew M.A. Cater" <amacater@einval.com> - 2023-12-26 23:40 +0100
        Heinlein and requirements (was Re: how to clone apt repository to  newest only?) The Wanderer <wanderer@fastmail.fm> - 2023-12-26 23:50 +0100

csiph-web