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

proposal for apt setup in first stage



The point of moving apt setup into the first stage should be to make it
integrate better with d-i. Really I'd like to do away with apt-setup as it
exists today, and let d-i component like choose-mirror and cdrom-detect
take care of getting most of the the necessary info for a d-i udeb to
construct a final sources.list for the system.

As with tzsetup, I have to ask if the current apt-setup is something we
want to continue having on the installed system. I think more users do
use this than tzstup, for example I find it handy way to get apt
configured in a just debootstrapped chroot. Is there anything else in
Debian that can set up apt in similar ways? Anyway, I'll asusme we
either don't want it or that if there's demand we can put a usable
apt-setup.deb together from peices of the d-i apt setup.

Figuring out how to do apt setup in d-i means considering each of the
different installation methods:

-- netinst --

Would need to run choose-mirror at some point (before/after debootstrap)
to set up the source for the rest of Debian. Ideally, the CD would not
become an apt source.

Probably need to generate sources.list lines based on choose-mirror after
debootstrap, to allow for things like adding non-free, maybe not using
suite names (undecided), etc. Also to put in deb-src lines. And security
updates.

Then it would ideally upgrade the debootstraped base system to catch any
updates to base packages, especially for security.

-- businesscard / netboot --

Need to generate sources.list lines after debootstrap, same as
with netinst above.

-- full CD / DVD --

Adding more CD/DVD sources after debootstrap can be useful, but is
not essential and I think it's a good thing to drop or hide to reduce
complexity. I think debian-edu might be heading toward more than one CD (or
a DVD) for their install, and this illistrates that we might want to keep
muti-CD support somehow available for derivatives even if it's not worth
doing for Debian.

Adding a mirror is another possibility, if there is network connectivity.
At least for security updates, and apt-src lines..

Need to replace debootstrap's sources.list lines with apt-cdrom generated
ones, the debootstap ones won't work after install.

-- floppy --

Same as CD or netboot, depending on install method.

-- hd-media --

If the CD is a businesscard netinst CD, it should be the same as netinst
and businesscard above.

If the CD is a full CD then that's a tricky case; sources.list lines won't
work for it after install. Currently this case is handled by apt-setup not
finding a CD and letting the user configure a mirror. If we want to handle
this with the same code path used for full CD above then that's another
reason to add a mirror source to all (network connected) installs from full
CDs.

-- ppp / pppoe install --

Currently depends on using CD install and configuring ppp in second stage
and only then configuring network sources. Would need ppp setup in first
stage to support installing using a netinst or businesscard CD (or netboot)
and ppp.

Unless we get ppp and pppoe setup support, moving apt setup to d-i would
reduce the installation methods using ppp to installing from a full CD/DVD
and (probably manually) setting up ppp and adding a mirror in the second
stage. No more installing with netinst and ppp. Would this be a big loss?

----

If I try to factor out something common to all of these, I get this basic
design:

 * First, get sources and debootstrap, same as is done today.
 * Second, get additional sources, which almost always means running
   choose-mirror (if it wasn't already run), but might also mean running
   apt-cdrom on some more CDs.
 * Sometimes add CD as apt source (full CD), sometimes not (netinst).
 * Provide some way to control whether non-free and contrib are used.
 * See if security sources are available.
 * Generate final sources.list.
 * Upgrade debootstrapped system for security updates and anything else.
 * Ready for task installation.

The "get additional sources" bit looks like it needs to be
extensible/modular. In fact most of the sources.list generation seems like 
it could be done modularly, just let different programs run and modify the
sources.list.


BTW, a few bugs I anticipate we could solve while we were doing this:
#106875: base-config should offer network configuration
	(Since the problem was that apt-setup assumes there was a network.
	The one in d-i won't.)
#156590: GNOME interface of debconf should not use text mode editors, like vi
#277481: should be a way to set http proxy if entered apt sources by hand
#284794: Does not allow to specify proxy for manually entered mirror
	(Assuming we drop the manual sources.list entry.)
#198759: base-config: /usr/sbin/apt-setup may kill /dev/cdrom symlink
#264375: apt-setup does no save choosen cdrom device anyhwere
#274615: Add CDROM fails due to broken symlink and no error notification
	(Real problem is that apt-setup has to reimplement cdrom-detect
	for edge cases, and does it poorly.)
#215639: No CD eject button
#240331: apt: CDROMs must be manually ejected and mounted on Apple/Mac/PowerPC
	(Assuming that the multi-cd code is either removed, or ejects
	the CD for the user.)
#220269: base-config: should use d-i's apt config
#235980: base-config: apt-config should use debian-installer/country as default country for the mirror choice
#251007: remind package location from netboot install
#252121: Should pre-seed Base-config templates with mirror location and mirror settings
	(The whole point of the excersise, really.)
#229048: apt sources reset after interrupted installation
	(Instead we'll get users complaining about not being able to resume
	interrupted d-i runs.)
#237397: set proxies should be entered in /etc/environment
	(Well, assuming we decide to do that.)
#240711: beta3: selecting an ftp mirror activates http access to security.d.o without asking
	(Assuming we always run choose-mirror, so always ask about a
	proxy, the real issue in this bug will get solved.)
#246880: Long delay w/o status info before apt-cache policy
	(Probaly won't use this hack since we'll know what kind of install
	is being done, but if we do, we can put up a progress bar in d-i.)
#251413: Should not add entries for security.debian.org if the network has not been setup
	(Seems obvious.)
#287413: apt-get upgrade needed after install from oldish CD
	(See above discussion of upgrades.)
#305142: apt-setup creates a world readable apt.conf file
	(Easily solved if we decide how we want to deal with the issue.)
#312123: APT configuration bug in package base-config
	(Only if someone can figure out how to reproduce it though..)
#313235: base-config - sets distribution to testing by default
	(Or at least retitled to "d-i - sets distribution to testing by
	default" ;-)
#282356: apt-setup doesn't to work anymore, produces mount help instead
	(Assuming someone can reproduce it.)
#196625: apt-setup does not let you clear the http-proxy setting
	(Assuming apt-setup is not available after d-i.)
#269154: apt-setup should add a deb-src line for security updates
	(Seems obvious.)

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: