Debian package management Links
Wajig Summary The wajig package manager, renamed "just", makes it easier to update and upgrade software packages in
Debian. It's now working together with apt-move, the program that
maintains the local mirror (see below). Packages should be installed
manually on mantaray, then use the round-robin install script for all
the others. Guides
Commands
With this command you don't have to wait for one installation to complete before you move on to the next. You need to test first that there are no problems of course. It's generally a good idea to use these scripts, as it's easy to forget one of the machines when you update or remove packages. The scripts also save you hundreds of keystrokes. To run a script, issue this command: and give the package names when prompted. Tweaking To allow non-root users to acces wajig, configure the sudoers file -- this has now been done. Local Debian Mirror Summary A local Debian mirror has been established so that only bottlenose now downloads new packages, and all the other machines on the
Baja network to access them from there. The mirror is also available through the web. Note that a significant advantage of this setup is that
individual packages are now not cached on each machine
(/var/cache/apt/archives), saving huge amounts of space and leaving
ample room for more programs. [For an alternative solution suitable for smaller networks, see apt-cacher.] Install a new package
It's
not worth using the alternative "apt-move movefile <package>" (which anyway often fails),
as "apt-move update" only takes a few minutes and you'd need to
run "apt-move packages" afterwards to rebuild the packages list, or the
new packages won't show up to the other nodes. Don't use "just move", since this performs "apt-move
update" and "apt-get clean" -- cleaning out mantaray's repository. We want to keep it in case we need to downgrade a package. Nightly mirror updates
That should do the trick -- I should have an updated
"installed-packages only" mirror at all times. The /etc/apt-move.conf file has the option "delete" enabled, so non-current packages will automatically be deleted from the mirror (though not from mantaray's own archives). This has the effect, afaics, of moving all generations of packages into the mirror each night and then deleting them. It would make more sense to set it up the other way: obsolete packages are removed from mantaray's archives, but remain in the mirror in case we need to revert an upgrade. A list of files that have been ignored, moved, and deleted is listed in the daily e-mail to user kfa on mantaray; it can be consulted to see the list of daily updates available to the system. Note that if you put a package on hold, it won't get updated in the apt-move mirror. Commands
"Running
apt-move periodically will assist in managing the resulting partial
mirror by optionally removing obsolete packages, and creating valid
local Packages.gz files. It can also build a partial or complete
local mirror of a Debian binary distribution (including an
'installed-packages only' mirror)." Reinstalling all packages There may be a simple way of doing this -- see the procedure for duplicating another system's installation under bulk install. What follows is a crude procedure for reinstalling all
packages on a system, in case you've deleted some random part of the
operating system and can't reconstruct exactly what needs to be
reinstalled.
Installation history On
16 January 2004, the /mantaray partition was 100% full, so I moved the
local mirror to bottlenose, which has a larger drive. I installed
apt-move, copied over the /etc/apt-move.conf file from mantaray, and
copied over the dists and pool directories from /mantaray/debian to
/bottlenose/debian and ran apt-move update.
Note that you have to copy over the whole /debian mirror, which
includes a whole machinery of hidden /debian/.apt-move files -- without
these files, you won't be able to include all the old files in the new
packages files. I changed crontab on mantaray by commenting out apt-move and added it to
bottlenose's crontab. Note that when cron runs, you get e-mail for user
kfa, not root (this is defined in exim, the mail client). I changed
/etc/apt/sources.list on all the other machines to point to the new
mirror. Briefly tested; seems fine. On 1 October 2003 I added a link from graywhale's web server directory to mantaray's local Debian mirror: root@graywhale:/graywhale/www# ln -s /mantaray/debian debianYou can now add the following lines to /etc/apt/sources list to use this mirror: deb http://67.116.162.14/debian/ unstable main contrib non-free deb http://67.116.162.14/debian/ unstable/non-US main #contrib non-free On a local system, you can substitute graywhale's local IP address, 187.26.16.74, or its name, for the external IP address: deb http://graywhale/debian/ unstable main contrib non-freeNote that if you get packages this way, local copies will be stored in your /var/cache/apt/archives directory, which you avoid by using the mirror on a mounted drive. This way of using the mirror is particularly useful for new installations that lack full networking capabilities. On 25 August 2003 I issued this on mantaray: just install apt-moveI edited the configuration file, /etc/apt-move.conf using these values: APTSITES="marillat.free.fr linux.csua.berkeley.edu_debian ftp.debian.org_debian linux.csua.berkeley.edu_debian-non-US"The rest of the values I left alone. You'll need to add more sites to APTSITES if you're going to use the "apt-move sync" command, which downloads the current version of all installed packages. In ATPSITES, replace slashes with underscores or you'll get errors. I created a new /mantaray/mirror directory for the new local mirror, and then then ran this command to establish the master files for the new mirror: apt-move getThis generated lists of all available packages in the mirror (see man apt-move). I then moved the current packages from the /var/cache/apt/archives into the mirror with this command: apt-move updateThis implies "delete obsolete packages" -- if you want to move the obsolete ones too, just issue apt-move moveThe apt-move update too a long time -- if you're doing it remotely over the wireless network, use "apt-move update >& log &" so the process would be cut off -- in which case it has to start all over again. I then added these lines to mantaray:/etc/apt/sources.list: # Local mirror on /mantarayFor all the other machines, I substituted the previous content of sources.list for just these two lines -- they will now get their packages only from the local mirror.
|