Re: change conffiles
Michael Spang wrote:
Maybe so. I just read the dpkg-divert manpage and it won't divert
conffiles, either. So I don't think this is possible.
Yes, I tried with dpkg-divert but the result is very odd, I asked to the
list 2 days ago but I hadn't any answer .. :(
Here what I did, it carries out well the diversion (preinst) but I don't
find my new file installed, or it installs my file but doesn't carry out
the diversion:
----------------------------------------------------------------------------------------------------------------------------
# Makefile of my "source package" files
DESTDIR = $(DEBDIR)/etc
install:
install -d $(DESTDIR)/skel
install -o root -g adm -m 664 bash.bashrc $(DESTDIR)/bash.bashrc
install -o root -g adm -m 664 profile $(DESTDIR)/profile
install -o root -g adm -m 664 bashrc $(DESTDIR)/skel/.bashrc
install -o root -g adm -m 664 bash_profile $(DESTDIR)/skel/.bash_profile
install -o root -g adm -m 664 bash_logout $(DESTDIR)/skel/.bash_logout
----------------------------------------------------------------------------------------------------------------------------
# debian/rules
export DH_COMPAT=3
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -rf $(CURDIR)/debian/omd-base-files
rm -rf ../omd-base-files_*
# 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/base-files.
$(MAKE) DEBDIR=$(CURDIR)/debian/omd-base-files
# 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
----------------------------------------------------------------------------------------------------------------------------
# debian/preinst
set -e
dpkg-divert --package omd-base-files --add --rename --divert
/etc/bash.bashrc.omd-bak /etc/bash.bashrc
dpkg-divert --package omd-base-files --add --rename --divert
/etc/profile.omd-bak /etc/profile
dpkg-divert --package omd-base-files --add --rename --divert
/etc/skel/.bashrc.omd-bak /etc/skel/.bashrc
dpkg-divert --package omd-base-files --add --rename --divert
/etc/skel/.bash_profile.omd-bak /etc/skel/.bash_profile
dpkg-divert --package omd-base-files --add --rename --divert
/etc/skel/.bash_logout.omd-bak /etc/skel/.bash_logout
----------------------------------------------------------------------------------------------------------------------------
# debian/postrm
set -e
dpkg-divert --package omd-base-files --remove /etc/bash.bashrc
dpkg-divert --package omd-base-files --remove /etc/profile
dpkg-divert --package omd-base-files --remove /etc/skel/.bashrc
dpkg-divert --package omd-base-files --remove /etc/skel/.bash_profile
dpkg-divert --package omd-base-files --remove /etc/skel/.bash_logout
----------------------------------------------------------------------------------------------------------------------------
Reply to: