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

Newbie Wants To Learn To Make Udebs...



Hello all,

After spending some time trying to wrap my feeble mind around the Debian
installer, I've managed to at least screw things up.  I'm at a loss to debug
things, so I'm hoping someone out there has a clue that they'll lend me.

Here's what I'm after: I want to author my own udebs to insert into the
installer.  (And hopefully contribute to the community, once I have something
that works.)  I have a prototype udeb (named, aptly enough, "prototype-udeb")
that's intended to print a line to the syslog file via logger.  Its only files
exist in the debian/ directory, and they are:

---[ debian/changelog ]-------------------------------------------------------
prototype-udeb (1.0) unstable; urgency=low

  * Initial Release.

 -- Michael Peek <peek@tiem.utk.edu>  Wed, 20 Apr 2005 16:19:45 -0400

Local variables:
mode: debian-changelog
End:
------------------------------------------------------------------------------

---[ debian/compat ]----------------------------------------------------------
4
------------------------------------------------------------------------------

---[ debian/control ]---------------------------------------------------------
Source: prototype-udeb
Section: debian-installer
Priority: standard
Maintainer: Michael Peek <peek@tiem.utk.edu>
Uploaders: Michael Peek <peek@tiem.utk.edu>
Build-Depends: debhelper (>= 4.2)
Standards-Version: 3.6.1

Package: prototype-udeb
XC-Package-Type: udeb
Architecture: all
Priority: required
Depends: 
Description: This is a test udeb
------------------------------------------------------------------------------

---[ debian/copyright ]-------------------------------------------------------
This is prototype-udeb, written and maintained by Michael Peek
<peek@tiem.utk.edu> on Thu, 14 Apr 2005 16:29:09 -0400.
------------------------------------------------------------------------------

---[ debian/prototype-udeb.postinstall ]--------------------------------------
#!/bin/sh

set -e
. /usr/share/debconf/confmodule

my_name="prototype"

log () {
	logger -t ${my_name} "$@"
}

db_get ${my_name}/entry
if [ ! -z "${RET}" ]; then
	log "Debconf Preseed Value: ${my_name}/entry ${RET}"
else
	log "Debconf Preseed Value: ${my_name}/entry (null)"
fi

exit 0
------------------------------------------------------------------------------

---[ debian/prototype-udeb.templates ]----------------------------------------
Template: prototype/entry
Type: string
_Description: a nonsense string that does nothing
 This exists only to be preseeded.
------------------------------------------------------------------------------

---[ debian/rules ]-----------------------------------------------------------
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1




CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp


build: build-stamp

build-stamp: configure-stamp 
	dh_testdir

	# Add here commands to compile the package.
	# $(MAKE)
	#docbook-to-man debian/ddetect-commands.sgml > ddetect-commands.1

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	# -$(MAKE) clean

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/ddetect-commands.
	# $(MAKE) install DESTDIR=$(CURDIR)/debian/ddetect-commands


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installexamples
#	dh_install
#	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
#	dh_python
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
------------------------------------------------------------------------------


During the installation process it must create some kind of error, because the
main menu kicks out of my preseeded priority=crititcal setting, and the
expected lines from the preseed-udeb.postinstall script never show up in the
syslog file.

After the installation is complete, the word "prototype" appears in the
following files under /var/log:

---[ /var/log/debian-installer/debconf-seed ]---------------------------------
...stuff...

d-i	prototype/entry	string Hello World

...stuff...
------------------------------------------------------------------------------

---[ /var/log/debian-installer/syslog ]---------------------------------------
...stuff...

Apr 20 16:35:25 preseed: successfully loaded preseed file from /cdrom/preseed/00.prototype-udeb.cfg

...stuff...

Apr 20 16:35:25 anna[3467]: DEBUG: install prototype-udeb, priority >= standard 

...stuff...

Apr 20 16:35:25 anna[3467]: DEBUG: resolver (prototype-udeb): mark 

...stuff...

Apr 20 16:35:25 anna[3467]: DEBUG: resolver (prototype-udeb): mark 

...stuff...

------------------------------------------------------------------------------

---[ /var/log/debian-installer/questions.dat ]--------------------------------
...stuff...

Name: prototype/entry
Template: debian-installer/dummy
Value: Hello World
Owners: d-i
Flags: seen
Variables:
 ID = prototype/entry

...stuff...
------------------------------------------------------------------------------

---[ /var/log/debian-installer/status ]---------------------------------------
...stuff...

Package: prototype-udeb
Status: install ok installed
Priority: required
Section: debian-installer
Installed-Size: 8
Maintainer: Michael Peek <peek@tiem.utk.edu>
Version: 1.0
Description: This is a test udeb

...stuff...
------------------------------------------------------------------------------


Can anyone help me out?  What have I done wrong?  Why do I not see what I'm
expecting in the syslog file, and why does it kick me out of
priority=critical?



Thanks for any and all help,

Michael Peek



Reply to: