[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is a repository? What is a metapackage?



On Sat 16 Apr 2022 at 14:31:49 (+0000), Andy Smith wrote:
> On Sat, Apr 16, 2022 at 08:50:22AM -0500, Richard Owlett wrote:
> > A goal of the Debian installer is to create a system that can be used by
> > *ALL* people to use for *ANY* possible purpose.
> 
> Including yours…
> 
> [problems with Debian installer]
> 
> > I plan to get around these problems by creating a local repository and
> > several very custom metapackages. My internet search turned up tools to
> > create and/or modify both.
> 
> This seems like a classic X/Y problem, but at least you did state
> your issues rather than just asking how to make an apt repository
> and metapackages. I don't think that an apt repository or
> metapackages are the correct solution for what you are trying to do.

I would agree with you there, and with the suggestions below.
But if the OP is determined to have a repository, or at least
to read around the subject before coming to a different conclusion,
I have one other suggestion.

> I think the correct solution for what you are trying to do is
> preseeding the net installer.

Yes, though bear in mind that the OP has been preseeding for
at least six years, eg,

  https://lists.debian.org/debian-user/2017/01/msg00216.html

> Looking at your problems and how preseed can solve them:
> 
> > I find the resulting system:
> >   1. consumes more disk space than necessary.
> >   2. consumes excessive bandwidth during installation.
> >      [I have a low monthly cap on my internet connection.]

This seems to be the top criterion for deciding on what to do.

> The minimal net install is really very minimal. You can run a local
> caching proxy like apt-cacher-ng instead of trying to make a custom
> apt repository. Only the packages that your install actually tries to
> download will end up in your cache, and repeating an install (you
> will do that a lot while testing) will get the packages from the
> cache not over the Internet.

Running apt-cacher-ng has been offered as a suggestion to the OP before:

  https://lists.debian.org/debian-user/2019/06/msg00040.html

but there was no sign of a bite.

> Running your own apt repository will not allow you to make Debian
> smaller in any meaningful way, unless you decide to mass-rebuild
> Debian packages to have fewer features. That would be a lot of work
> and would result in you running something that's not Debian.
> 
> >   3. installs packages I whose function I don't need/want.
> 
> A minimal net install will only come with essential packages.
> 
> Neither your own apt repository nor metapackages allow you to
> dispense with packages that the installer wants to install, unless
> you create some metapackages that falsely satisfy dependencies that
> you are not interested in. That seems like a very fragile and
> complicated solution to a simple problem of just not installing
> packages you don't want in the first place.
> 
> >   4. doesn't install functions I routinely use.
> >   5. installs packages that unsatisfactorily perform needed functions.
> >      [I have to install additional packages.]
> 
> You can give a list of additional packages to install in the preseed
> file.
> 
> If packages ask debconf questions in order to configure them, then
> you can preseed those answers as well.
> 
> Configuration that doesn't have debconf questions can be put in
> place at the end by shell scripts that you write.
> 
> The result is a minimal, automated, repeatable install of only what
> you require.
> 
> Again, your own apt repository doesn't help here. Making a
> metapackage like packages-that-richard-likes that depends on
> everything you want installed would "work", but is vastly more
> complicated than just listing out the extra packages you want the
> installer to install.
> 
> You could rebuild all the packages you are interested in to have
> config defaults that are as you like, so that once the package is
> installed it comes configured already, but again that is a huge
> amount of work compared to just preseeding debconf questions and
> scripting what's left.
> 
> > I did not find authoritative descriptions of the structure of either
> > repositories or metapackages.
> > 
> > Where do I find such?
> 
> https://wiki.debian.org/DebianRepository/Setup
> https://debian-handbook.info/browse/stable/sect.building-first-package.html
> 
> But don't do it; preseed instead:
> 
> https://wiki.debian.org/DebianInstaller/Preseed

Thanks for useful references.

The OP now has the tools, apparently, so my suggestion is to preserve
at all costs the OP's bandwidth. With those tools, work on one of the
many DVD collections that the OP has, preferably the newest, but it's
not essential. Use one (connected) machine to duckduck the internet
for whatever educational resources are needed, as per usual, but keep
the experimental one off the web, so that it's limited to using only
information/data that's already in the OP's possession.

The skills used to achieve this can then be used to build a local
repository from external ones, and to create metapackages, if that's
the decision made. After all, these acquired skills should be
transferable.

Until the OP has cracked the problem of how to make the metapackages
use exactly the right packages in the installation (and find out
whether this is a worthwhile task), it seems pointless to go to the
trouble of building a local repository, when apt-cacher-ng can perform
the essential task, that of preserving bandwidth, much more simply.

In any case, the task of analysing the anatomy of a repository can
go on in parallel with the more difficult task, the bespoke metapackages.

Cheers,
David.


Reply to: