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

Linda question: Maintainer script prerm uses debhelper, but does not use #DEBHELPER#.



Hi!

I get the following warnings when checking my package with linda:

| $ linda -i *.dsc
| W: conntrackd; Maintainer script postinst uses debhelper, but does not use #DEBHELPER#.
|  The maintainer script shown above is included in a debhelper-using
|  package, but it does not include a #DEBHELPER# tag.
| W: conntrackd; Maintainer script prerm uses debhelper, but does not use #DEBHELPER#

I do not use any debhelper-magic in the scripts and do not understand
what linda wants me to do.

I could simply include '#DEBHELPER#' in the scripts but I do not want any
debhelper magic to change the scripts.
dh_installinit is called with --noscripts to accomplish this.

prerm, postinst and rules are attached.

What should I do?

Ciao & Thanks
Max
-- 
	Follow the white penguin.
#!/bin/sh
#
# conntrackd.prerm
#
# Maximilian Wilhelm <max@rfc2324.org>
#  -- Thu, 25 Jan 2007 21:00:07 +0100
#

case "$1" in
	# Things to be done before removal of conntrackd
	purge|remove)
		if [ -x /usr/sbin/invoke-rc.d ]; then
			invoke-rc.d conntrackd stop
		else
			/etc/init.d/conntrackd stop
		fi
		;;

	*)
		;;
esac

# Do *not* stop conntrackd here to be able to decide in postinst if conntrackd
# did run before upgrade an restart it if this is the case and don´t start it
# if it didn´t run before.

# vim:ft=sh
#!/bin/sh
#
# conntrackd.postinst
#
# Maximilian Wilhelm <max@rfc2324.org>
#  -- Thu, 25 Jan 2007 21:00:54 +0100
#
set -e

if [ -x "/etc/init.d/conntrackd" ]; then
	# Let conntrackd start after networking is available
	# and stop just before networking will be disabled
	update-rc.d conntrackd start 41 S . stop 34 0 1 6 . >/dev/null
fi

# Do not (re)start conntrackd on upgrade if it does not run allready.
if [ "$1" = "upgrade" ]; then
	if ! pidof conntrackd >/dev/null; then
		echo "No conntrackd running, won't start one."
		exit 0
	else
		if [ -x /usr/sbin/invoke-rc.d ]; then
			invoke-rc.d conntrackd restart
		else
			/etc/init.d/conntrackd restart
		fi
	fi
fi

# vim:ft=sh
#!/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


# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CFLAGS = -Wall -g

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

config.status: configure
	dh_testdir
	# Add here commands to configure the package.
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"


build: build-stamp

build-stamp:  config.status
	dh_testdir

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

	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp 

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif


	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Install the daemon to $(CURDIR)/debian/conntrackd
	$(MAKE) DESTDIR=$(CURDIR)/debian/conntrackd install


# 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 CHANGELOG
	dh_installdirs
	dh_installdocs
	dh_installexamples --exclude=Makefile
	dh_install
	dh_installinit --noscripts
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	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 

Reply to: