Web lists-archives.com

Re: quilt + dpkg + debhelper: Handling upstream files containing spaces

Hi Niels,

On  Mi 09 Jan 2019 21:24:00 CET, Niels Thykier wrote:

Mike Gabriel:
Hi all,

I am a little clueless about the below. I hope that someone can shed
some light or provide a work-around.

I am currently working on OpenBoard packaging. OpenBoard ships loads of
embedded jquery.* copies of code (and other JS libs, too).

Those jquery.* et al. files are in folder paths that contain blanks.
Ouch. It seems that our tool chain components fail completely on
handling them. Or maybe I am doing entirely wrong.

Yupe, that is https://bugs.debian.org/198507 (as Dominique mentioned).

I am happy to work with someone on fixing this while ensuring dh-exec
keeps working.  FTR: dh-exec is orphaned and I have no plans to pick it
up as I want a higher bus factor than 1 in our low level packaging stack.

I can test with both tools (dh_link and dh-exec). (I won't adopt dh-exec, though. My Perl is not good enough).

** Approach 1 **:

While repacking, remove all those jquery.* et al. files and replace them
in the installed package via symlinks to /usr/share/javascript/jquery*.

So, I placed a debhelper file (debian/openboard-common.links) into the
package folder and populated it with symlink dests and targets. Of
course, I frowned at myself and

  * quoted those dirs containing strings with double quotes
  * ... with single quotes
  * ... tried with dh-exec and quotes
  * ... tried it with backslash + blank escpaing

... but to no avail...

For most other cases, you can "work around" the issue by (ab)using globs
(e.g. ? or *) as there are rarely another path with the same name modulo
space replaced by another glyph.  But even that fails here as dh_link do
not use globs AFAIR.

However, for dh_link you *can* pass the file names as arguments and it
will work:

  dh_link -pfoo "path with space" "another path with even more spaces"

To many links to put line-by-line into debian/rules. (I could us ln -s in debian/rules, too).

Either way, debian/rules will become hardly readable with the masses of symlinks required.

Which still leaves much to be wanted, but it works.


(Sadly, this is made worse by dh_install and others "splitting" properly
quoted paths because people have started to rely on the argument being
split.  The result is that is helpers are inconsistent about how they
handle spaces in arguments and the result is much sadness /o\)

Anyway, hope it helps.

Thanks for the explanations.




mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel@xxxxxxxxxxxxxxxxxxx, http://das-netzwerkteam.de

Attachment: pgpKrR2mKsvFv.pgp
Description: Digitale PGP-Signatur