[debhelper-devel] dh_links escaping backslash

Ján Marček jan.marcek at eea.sk
Wed Mar 25 14:29:00 UTC 2015


Dear Debhelper Maintener,

I think I have found a strange behaviour in  dh_links.
Let's have a package.links  and there is line:

etc/odn-simple/ldap/olcDatabase\=\{2}hdb.ldif  etc/ldap/slapd.d/cn\=config/olcDatabase\=\{2\}hdb.ldif

Where  cn\=config is folder and olcDatabase={2}hdb.ldif is name of file

After installation dpkg -i package.deb I get this symbolic link.

$dir /etc/ldap/slapd.d/cn\\\=config/
olcDatabase\\=\\{2\\}hdb.ldif

Which is not correct,  it shell be:

/etc/ldap/slapd.d/cn\=config/olcDatabase={2}hdb.ldif

I tried to escape a backslash '\' so package.links looks:

etc/odn-simple/ldap/olcDatabase\=\{2}hdb.ldif  etc/ldap/slapd.d/cn\\=config/olcDatabase\=\{2\}hdb.ldif

But I'm getting this stack during creation of package: (by command 
fakeroot debian/rules clean binary)

dpkg-deb: building package `odn-simple' in `../odn-simple_0.11.1~250_all.deb'.

tar: ./etc/ldap/slapd.d/cn\\=config: Cannot stat: No such file or directory

tar: ./etc/ldap/slapd.d/cn\\=config/olcDatabase\\=\\{2\\}hdb.ldif: Cannot stat: No such file or directory

tar: Exiting with failure status due to previous errors

dpkg-deb: error: subprocess tar -cf returned error exit status 2

dh_builddeb: dpkg-deb --build debian/odn-simple .. returned exit code 2


Version of debhelper

$ apt-cache policy  debhelper

debhelper:

   Installed: 9.20120909

   Candidate: 9.20120909

   Version table:

  *** 9.20120909 0

         500 http://ftp.sk.debian.org/debian/ wheezy/main amd64 Packages

         100 /var/lib/dpkg/status


Please have a look at this case. Perhaps I have to do different type of 
escaping of backslash.
Frankly,  "cn=\config" is a bit strange idea  (which comes from slapd)

Workaround: I created symbolic link in package.postinstall where it 
correctly works. However, I think dh_links shell take care about it.
Thank you very much for any response.

Jan Marcek




More information about the debhelper-devel mailing list