Friday 17 July 2009

debian policy for init scripts

It could be useful to add your /etc/init.d/ script to debian/conffiles to avoid overwriting local changes.
Sometimes sysadmins change the init scripts and with this little tip you can help them in case of package upgrades.

From the Debian Policy Manual:
"The /etc/init.d scripts must be treated as configuration files, either (if they are present in the package, that is, in the .deb file) by marking them as conffiles, or, (if they do not exist in the .deb) by managing them correctly in the maintainer scripts (see Configuration files, Section 10.7). This is important since we want to give the local system administrator the chance to adapt the scripts to the local system, e.g., to disable a service without de-installing the package, or to specify some special command line options when starting a service, while making sure their changes aren't lost during the next package upgrade. "

Using externals with SVN

UPDATE: You need to specify the directory you want to create when setting the external property. No need to create the dir before propset: it'll be done automatically when you 'svn up'.

- Create somewhere in the SVN repo the directory you want to use as external (let's call it SVNEXTURL)
- Go in the working copy where you want to have an external reference and:

svn propset svn:externals 'newlocaldir SVNEXTYURL' .

where newlocaldir is the name of the directory being created by SVN during this operation.
Quotes are needed.
Note the '.'

- and then
svn up


Problem: if you're using a version of svn-buildpackage older than 0.6.24 (debian), it won't work with external references. You can upgrade to >= 0.6.24 or apply locally the patch described here:

About ICE negotiation

Disclaimer: I wrote this article on March 2022 while working with Subspace, and the original link is here: