Bonjour à tous,
Je souhaite créer un paquet Debian personnalisé pour l’installation de Centreon et Nagios.
J’ai suivi plusieurs tutos ainsi que la documentation officiel du mainteneur Debian pour parvenir à mes fins…mais…je bloque sur un problème à la fin de l’exécution du fichier “rules” ( et oui…pour moi le plus compliquer à comprendre ! ).
Voilà l’erreur:
...
dh_shlibdeps
dh_md5sums
(cd debian/nagios >/dev/null ; find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null
chmod 644 debian/nagios/DEBIAN/md5sums
chown 0:0 debian/nagios/DEBIAN/md5sums
dh_builddeb
dpkg-deb --build debian/nagios ..
dpkg-deb: la lecture du fichier « info » « debian/nagios/DEBIAN/control » du paquet a échoué: Aucun fichier ou répertoire de ce type
dh_builddeb: command returned error code 512
make: *** [binary-arch] Erreur 1
dpkg-buildpackage: échec: debian/rules binary a produit une erreur de sortie de type 2
...
voici la structure des dossiers:
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0# ls
nagios-3.2.0 nagios_3.2.0.orig.tar.gz
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0#
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0/nagios-3.2.0# ls
base config.guess configure.in debian INSTALLING Makefile.in OutputTrap.pm sample-config THANKS
build-stamp config.log configure-stamp DEBIAN install-sh make-tarball p1.pl subst t-tap
cgi config.status contrib functions LEGAL mkpackage pkginfo subst.in update-version
Changelog config.sub daemon-init html LICENSE module pkginfo.in t UPGRADING
common configure daemon-init.in include Makefile nagios.spec README tap xdata
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0/nagios-3.2.0#
ainsi que le dossier debian:
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0/nagios-3.2.0/debian# ls
changelog compat control copyright nagios nagios.debhelper.log preinst rules RULES-ORIG
monserveur:/usr/local/src/PACKAGING/nagios-3-2-0/nagios-3.2.0/debian#
Le contenu de mon fichier rules:
#!/usr/bin/make -f
# debian/rules makefile for nagios3-2
# Last modified:
# $Id: rules 01 2010-03-01 16:35:00Z formorer $
# 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)
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS= --build $(DEB_BUILD_GNU_TYPE)
endif
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
SHELL = /bin/sh -e
CONFIGURE = CFLAGS='$(CFLAGS)' ./configure --prefix=/usr/local/nagios3 \
--mandir=/usr/share/man \
--bindir=/usr/sbin \
--sbindir=/usr/lib/cgi-bin/nagios3 \
--datadir=/usr/share/nagios3/htdocs \
--sysconfdir=/etc/nagios3 \
--infodir=/usr/share/info \
--libexecdir=/usr/local/nagios3/libexec \
--localstatedir=/var/lib/nagios3 \
--enable-event-broker \
--enable-embedded-perl \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-command-user=nagios \
--with-command-group=nagios \
--with-init-dir=/etc/init.d \
--with-lockfile=/var/run/nagios3/nagios3.pid \
--with-mail=/usr/bin/mail \
--with-perlcache \
--build=$(DEB_BUILD_GNU_TYPE) \
--host=$(DEB_HOST_GNU_TYPE) \
--with-htmurl=/nagios3 \
--with-cgiurl=/cgi-bin/nagios3
configure: configure-stamp
configure-stamp:
dh_testdir -a
@echo "Doing $@"
if test -f Makefile; then make clean; fi
ln -sf /usr/share/misc/config.sub .
ln -sf /usr/share/misc/config.guess .
rm -f config.cache
$(CONFIGURE)
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir -a
# Add here commands to compile the package.
make all
#docbook-to-man debian/nagios.sgml > nagios.1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) distclean
rm -f config.sub config.guess
dh_clean
install: build
@echo "Doing $@"
dh_testdir -a
dh_testroot -a
dh_clean -k
dh_installdirs -a -i
# Add here commands to install the package into /usr/local/nagios3 .
$(MAKE) prefix=$(CURDIR)/usr install
# make fullinstall DESTDIR=/usr/local/nagios3 INSTALL_OPTS=""
# 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_installdocs
dh_installexamples
dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# 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
Est ce que quelqu’un voit une boulette quelque part car moi je sèche !
Merci à tous.

