On 06/05/2013 10:39 PM, David wrote:
I have a small number of personal different-hardware PCs, each with the same set of different OS currently managed by grub v1. With unison, rsync, scripts, and some care I successfully keep all OS and the shared data in sync. It works great for my needs. I now intend to add Debian wheezy and hope that it becomes my preferred OS to replace an outdated Fedora. I already have a bare minimal base install of wheezy on each PC, achieved by running debian-installer manually in expert mode and unselecting everything on the tasksel page. I know the set of Debian packages I next want to install, without recommends (like aptitude -R). These will be served locally by approx. I keep the installation minimal for my needs only, and avoid gnome. Because some packages create users and groups, I want to be sure that these packages are installed in the same sequence on every PC so that numeric uid& gid in /etc/passwd and /etc/group end up the same on all PCs. This will make admin easier when keeping the shared data in sync if the numeric uid and gid are the same in every OS. To do the install I could use a shell script of many 'aptitude -R' calls, but I don't know the required order to satisfy dependencies. I could give 'aptitude -R' the large list of of packages, but how do I know that its depsolver will always install the packages in the same order? Perhaps I could do this once, and then get from some logfile the actual order that was used? google isnt helping me, results are dominated by debian-installer and preseeding but I think that is not relevant to my question because I already have installed debian manually. Please correct me if I am wrong. Are there any better methods I should be aware of, to ensure that everywhere the packages are installed in the same sequence?
David,I am involved in a project that parallels your's in that it is just as 'outside the mainstream' as your's seems to be. I have found some useful features of Aptitude for building and using a personal selection of packages:
To generate a list of installed packages, run; # aptitude -F "%p %M" search "~i" | tr -s " " > /root/packages-allThis generates a list of all installed packages, followed by ' A' if the package marked as needed by some other package.
Run: # grep -v ' A$' /root/packages-all > packages-noAto generate a minimum length list of packages that must be installed by Aptitude to force the installation of all packages via the dependency mechanism.
Then to install the whole lot on a nearly naked computer, run: # aptitude install $(cat /root/packages-noA)The files are text which can be edited in vim or emacs to remove cruft that is actually on the source computer but that you really don't to be automatically propagated to all your computers.
The order in which packages are actually install is, I think, not alphabetical. Aptitude has some internal logic that installs in an order that is defined by the dependency tree.
On a related topic:Numbering of groups depends on the order in which the named groups were created during installation of the packages. You only have one user so that one user will always have a uid==1000 on Debian. All real users in Debian also have their own group, so your gid will be gid==1000. If you list the file /etc/group, you will find gid == 1000 towards the end of the list, but not at the end because /etc/group grows during install by adding new group name/gid as they are needed. You say the hardware of your several computers in not identical. There will likely be differences in the dependency tree in different architectures, so there will be problems over time keeping the name/number pairs the same in different architectures and different releases. I sure the problem is solvable but the effort may be beyond what you want expend on going your own way. It does sound like an interesting way to become very familiar with the insides of Debian, and a rich source of knit-picking bug reports on the documentation ;-)
Good Luck, Paul