debstd-like tool for those who don't want to use debmake
I've been using debstd since it came out, and I appreciate it, but I have
always had some nagging doubts about it. And I've seen postings by others
who have problems with debstd as well. So I spent today prototyping a
replacement. But first, some of the problems with debstd:
1. It's hard to know exactly what debstd is doing. It would be nice to be
able to see each command, as it runs it.
2. Debstd is a monolithic tool that tries to do everything. It installs
files, builds packages, generates warnings of problems, etc. Very
unlike the traditional small, simple tools of unix.
3. It's difficult to run only parts of debstd, not the whole thing. (Yes,
some parts can be disabled/enabled by switches, but this doesn't let
you, for example, run the parts in different orders with some
commands of your own interspersed between.)
4. If you would like to modify debstd's behavior, you have two options -
either fix up what it did after it exits, or copy it into your
source package and modify it, and not have an up-to-date version
So, my stab at a solution to these problems. Basically, I break debstd into
many small programs, that can be called in any order, or not called at all if
you prefer. Here's how they fix each problem:
1. (It's hard to know exactly what debstd is doing.)
If an environment variable is set, my programs output each command
run that has any effect on debian/tmp to stdout, in a format
conviently designed to be pasted into debian/rules if you want to do
that (ie, each line starts with a tab ;-). For example, part of the
debian/rules build process of pdmenu with verbose turned on:
root@kite:~joey/debian/build/pdmenu-1.2.19>debian/rules binary D2_VERBOSE=yes
install -d debian/tmp/usr/doc/pdmenu/examples
cp -a examples/pdmenurc.monitor debian/tmp/usr/doc/pdmenu/examples/
cp -a examples/pdmenurc debian/tmp/usr/doc/pdmenu/examples/
cp -a examples/pdmenurc.complex debian/tmp/usr/doc/pdmenu/examples/
cp -a examples/README debian/tmp/usr/doc/pdmenu/examples/
cp -a examples/showdir.pl debian/tmp/usr/doc/pdmenu/examples/
install -p -m644 debian/changelog debian/tmp/usr/doc/pdmenu/changelog
gzip -9 debian/tmp/usr/man/man1/pdmenu.1 debian/tmp/usr/man/man5/pdmenurc.5 debian/tmp/usr/doc/pdmenu/changelog
install -d debian/tmp/DEBIAN
install -p debian/postinst debian/tmp/DEBIAN
install -p debian/postrm debian/tmp/DEBIAN
install -m 644 -p debian/conffiles debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/bin/pdmenu debian/tmp/usr/doc/pdmenu/examples/showdir.pl debian/tmp/etc/menu-methods/pdmenu debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/postrm
2. (Debstd is monolithic)
Obviously not the case here. I've broken the basic debstd behaviour
up into these parts:
d2_installdebfiles Install everything in debian/tmp/DEBIAN
and generate the control file.
d2_installmanpages Automatic man page installation.
d2_installdocs Install all docs listed in debian/docs
and the copyright, README.debian, etc.
d2_installmenu install menu package files
d2_installexamples Install all files listed in
d2_installchangelogs Install upstream and debian changelogs
(passed upstream changelog, if
d2_compress Compress all files mandated by policy
or, if debian/compress exists, run
it as a shell script and compress
all filenames it outputs. Also, fix
symlinks to compressed files.
d2_fixperms Make sure file perms are sane.
More parts can be added.
3. (It's difficult to only run part of debstd)
Here's an excerpt of a debian/rules file that uses my
programs, and shows how easy it is to comment various things out.
$(MAKE) INSTALL_PREFIX=debian/tmp install
4. (Difficult to modify debstd's behavior)
I'm planning on putting all these little programs somewhere in
/usr/lib/. So I expect that debian/rules will be configured to
append to the path:
PATH += :debian:/usr/lib/wherever
With it set up this way, if you need to modify the behavior of any
of the programs, you just copy from /usr/lib/wherever to debian/,
and modify the program.
I'm writing this message to see if anyone thinks this idea is worth
pursuing. I'm interested to know if any of you thinks this shows promise,
and you might use the finished version in your packages. So please write
back and let me know if you like how it looks. At this point, it's just a
prototype with many features of debstd missing, and I need to know if I
should keep working on it.
see shy jo
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .