Developing Emdebian Grip has highlighted a few general
types of bugs that can only be fixed in the preparation
of the Debian release after Lenny - called Squeeze.
In the meantime, Emdebian Grip has to use a few workarounds
and hacks to make things work. This Guide seeks to highlight
the problems, the reasoning behind the workarounds and document
the steps that others need to replicate when creating a repository
like Emdebian Grip.
Once Lenny has been released, these topics will be converted into
bug reports in Debian and links will be included to those bug reports
in the relevant section here.
[
- Modifying files in /usr/share.
gcc-4.3-base creates symlinks
in /usr/share/doc/gcc-4.3-base/ using dot files installed
by other packages (.copyright, .changelog.Debian.gz)
but does not check whether these files already exist. Gripping the
binary packages removes these files, leaving only copyright.gz
and the gcc-4.3-base postinst maintainer script
then fails. This halts the installation of the package, in turn breaking
the use of debootstrap and the debian-installer.
Emdebian Grip uses the grip-config package to create empty
files to take the place of the missing files, allowing the maintainer
script to complete without error.
- Use of override files
Although source packages usually determine the Priority of
each binary package built from that source, Debian also uses override
files to change priorities to fix other problems - without necessarily
changing the actual setting in the package. One example in Emdebian Grip
is at which is Priority: important in the package
and Priority: standard in the archive. This has an annoying
side-effect in Grip - debootstrap automatically pulls in all
packages of priority important or higher and the dependency of at
upon exim4|mail-transport-agent causes problems not just of
an unwanted package but a broken debootstap if hostname -f fails
for any reason. This can be a particular problem when trying to use
debootstrap to install Debian onto a different machine rather
than as a chroot on the same machine or using debian-installer.
Override files have useful benefits within Emdebian Grip, so the
functionality has been incorporated into the emdebian-grip-server
scripts that are used to maintain the Emdebian Grip repository. The
content of the current override files can be found at:
Unstable:
override.sid.main
Testing:
override.lenny.main
To handle overrides, use a combination of emgrip-dupes
and grip-override-replace.pl. Duplicates are a problem for
repository updates, so always check for and remove duplicates using
emgrip-dupes. When a package from Debian uses a Section
that puts the binary package into an inappropriate component for Grip
(e.g. dbus is Section: devel), set the override for unstable and use
grip-override-replace.pl to action the override in the
repository itself.
- install-info has gone.
Emdebian Grip doesn't include info pages, so the existing
install-info script is useless and breaks when info pages
do not exist. Instead, grip-config includes a dummy script
that replaces the dpkg version of install-info and
never generates any errors. This replacement script is likely to be
remain necessary unless install-info can be persuaded not to
ever fail.
- update-alternatives
and manpages.
Without any manpages, update-alternatives can generate
errors that again, break the installation of packages, debootstraps and
debian-installer operations. The current replacement script in
grip-config simply silences any errors. As with install-info,
the replacement is likely to persist unless the Debian version can be
persuaded to not fail if a manpage is processed as an alternative and the
operation subsequently fails.
- empty directories.
grip-config creates /usr/share/info/ so that
dpkg and base-files can manage the dir
sub-directory.
grip-config also creates /usr/share/man/man1 and
/usr/share/man/man8 to allow the replacement update-alternatives
to create symlinks as errors at this stage are not currently handled
by the error handling routines within the script itself.
- extra dependencies.
Emdebian Grip needs to support allowing installation simply by
creating a suitable debootstrap environment and unpacking it onto the
device. grip-config therefore depends on an arbitrary selection
of packages from various Priority levels that support turning
a simple debootstrap chroot into a bootable root filesystem. The current
list of dependencies for grip-config is
available from the repository.
- em_autogrip support.
em_autogrip can do a lot of the work of setting up and
maintaining a Grip repository. In time, the
em_autogrip manpage and this Guide will be expanded but Grip is still
very, very new and the processes themselves are still developing.
Alongside em_autogrip, the
emdebian-grip-server package contains other scripts that are used to
check, support and manipulate the repository data structures. See also
installing updates of emdebian
packages. The emdebian-grip-server package is available
via the Emdebian repository:
deb http://www.emdebian.org/debian/ unstable main
deb-src http://www.emdebian.org/debian/ unstable main
Alternatively install emdebian-tools from Debian to add this apt
source automatically.
- Does Grip recompile packages?
No. It might look as if em_autogrip is building
packages when viewing the output or build logs but
it is simply using dpkg --build to repack the archive after removing
files determined by the DEB_BUILD_OPTIONS passed to emgrip.
emgrip itself is based on dpkg-cross code and is
functionally similar to how lintian operates - except that once
the processing is finished, dpkg-cross and emgrip repack
the .deb with modified contents whereas lintian simply throws the
content away.
- testing support.
em_autogrip can setup a basic repository, but adding a
testing repository will require some manual configuration of reprepro,
including the override support above.