OK, I think I know what's going on.

The bug triggers when all the following conditions are met:

* /usr/local/share exists prior to installation of the "fontconfig-config" package. (It's supposed to be created by base-files, but it didn't exist in my chroot for some reason...)

* The building user belongs to the "staff" group.

* No other program created the UUID file for /usr/local/share/fonts yet.

This is what happens:

1. fontconfig-config.postist creates /usr/local/share/fonts/, owned by root:staff, mode 2775. (This is violation of Policy ยง9.1.2: unless /etc/staff-group-for-usr-local exists, directories in /usr/local should be root:root 0755.)

2. pdf2djvu (indirectly) calls the FcDirCacheCreateUUID() function...

2.1. FcDirCacheCreateUUID creates an UUID file in /usr/local/share/fonts/. This succeeds, because the user has write access to the directory.

2.2. FcDirCacheCreateUUID tries to change mtime of /usr/local/share/fonts/. But, as documented in the utimes(2) manpage, write access is not enough to do that: you need to be either the file owner, or root (or have root-like capabilities). So this fails, and a warning is issued.


Easy work-around for pdf2djvu: add the "fontconfig" package to Build-Depends. It will take care take of creating the UUID file for /usr/local/share/fonts/, and then FcDirCacheCreateUUID() will be mostly no-op.

--
Jakub Wilk

Reply via email to