Is there any way to *not* use/disable the {localstatedir}/fontconfig directory? We use AFS at Stanford, and I do not want this created or used at all. I tried making this be /var/cache/fontconfig, but this gives me permission denied errors on make install, and in any case, I want to make sure that fontconfig never tries to use whatever directory I set it to. Thanks, Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
--On Wednesday, April 05, 2006 5:02 PM -0700 Quanah Gibson-Mount <quanah@stanford.edu> wrote:> Is there any way to *not* use/disable the {localstatedir}/fontconfig > directory? > > We use AFS at Stanford, and I do not want this created or used at all. I > tried making this be /var/cache/fontconfig, but this gives me permission > denied errors on make install, and in any case, I want to make sure that > fontconfig never tries to use whatever directory I set it to.Also, the hardcoding of "cache" in the pkgconfigdir bit seems somewhat broken. I''d expect a configure option to set the location (IF it is desired). I''ll note that /var/cache is only writeable by root, for example, on Debian boxes. --Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Quanah Gibson-Mount wrote:> Is there any way to *not* use/disable the {localstatedir}/fontconfig > directory? > > We use AFS at Stanford, and I do not want this created or used at all. > I tried making this be /var/cache/fontconfig, but this gives me > permission denied errors on make install, and in any case, I want to > make sure that fontconfig never tries to use whatever directory I set it > to.First of all, {localstatedir}/fontconfig should only be writable by root. Only fc-cache creates files in that directory. If {localstatedir}/fontconfig does not exist or is not writeable, then fc-cache will write files to the font directories themselves (if it can). When fontconfig-using applications run and don''t find cache information in {localstatedir}/fontconfig or the font directories, they create a per-user cache file which lives in that user''s home directory. You have found a bug in fontconfig in that make install fails if it can''t make the {localstatedir}/fontconfig directory. I don''t know how to fix that bug, but I''d welcome patches. You just need to find the line where it creates the directory and add a -; the complication is that we go through automake, etc. pat
On Wed, 5 Apr 2006, Patrick Lam wrote:> You have found a bug in fontconfig in that make install fails if it > can''t make the {localstatedir}/fontconfig directory. I don''t know how > to fix that bug, but I''d welcome patches. You just need to find the > line where it creates the directory and add a -; the complication is > that we go through automake, etc.[behdad@home fontconfig-2_4_branch]$ grep pkgcache `find -name Makefile.am` ./fc-cache/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' ./fc-cache/Makefile.am: $(mkinstalldirs) "$(DESTDIR)$(pkgcachedir)" ./fc-cache/Makefile.am: $(RM) -rf "$(DESTDIR)$(pkgcachedir)" ./fc-cat/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' ./src/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' Seems like all you need is to protect the RM command against failures.> pat--behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"
--On Wednesday, April 05, 2006 11:31 PM -0400 Patrick Lam <plam@MIT.EDU> wrote:> Quanah Gibson-Mount wrote: >> Is there any way to *not* use/disable the {localstatedir}/fontconfig >> directory? >> >> We use AFS at Stanford, and I do not want this created or used at all. >> I tried making this be /var/cache/fontconfig, but this gives me >> permission denied errors on make install, and in any case, I want to >> make sure that fontconfig never tries to use whatever directory I set it >> to. > > First of all, {localstatedir}/fontconfig should only be writable by root. > Only fc-cache creates files in that directory.Okay. I guess we''ll never be using fc-cache (I''ve built this for gd, more than anything else, which only wants the libraries).> If {localstatedir}/fontconfig does not exist or is not writeable, then > fc-cache will write files to the font directories themselves (if it can).Yeah, this won''t happen either, given the RW/RO nature of AFS.> When fontconfig-using applications run and don''t find cache information > in {localstatedir}/fontconfig or the font directories, they create a > per-user cache file which lives in that user''s home directory.Okay. Still not the most optimal behavior, but acceptable I guess.> You have found a bug in fontconfig in that make install fails if it can''t > make the {localstatedir}/fontconfig directory. I don''t know how to fix > that bug, but I''d welcome patches. You just need to find the line where > it creates the directory and add a -; the complication is that we go > through automake, etc.Well, the other part of the problem here that I see, is that it hard codes the word "cache", too (at least in the release I''m using): configure.in:pkgcachedir=''${localstatedir}/cache/''${PACKAGE} which I think is a very bad practice. ;) --Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
> > When fontconfig-using applications run and don''t find cache information > > in {localstatedir}/fontconfig or the font directories, they create a > > per-user cache file which lives in that user''s home directory. > > Okay. Still not the most optimal behavior, but acceptable I guess.I''m just curious what would you call optimal. You don''t want to run fc-cache, you don''t want to have writable shares, and you don''t think per-user caches are optimal. Having no chaches at all is definitely not optimal either.> Well, the other part of the problem here that I see, is that it hard codes > the word "cache", too (at least in the release I''m using): > > configure.in:pkgcachedir=''${localstatedir}/cache/''${PACKAGE} > > which I think is a very bad practice. ;)You can actually override this on your make commandline, like: make pkgcachedir=/my/cache/dir all install> --Quanah--behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"
--On Thursday, April 06, 2006 12:16 AM -0400 Behdad Esfahbod <behdad@cs.toronto.edu> wrote:> >> > When fontconfig-using applications run and don''t find cache information >> > in {localstatedir}/fontconfig or the font directories, they create a >> > per-user cache file which lives in that user''s home directory. >> >> Okay. Still not the most optimal behavior, but acceptable I guess. > > I''m just curious what would you call optimal. You don''t want to > run fc-cache, you don''t want to have writable shares, and you > don''t think per-user caches are optimal. Having no chaches at > all is definitely not optimal either.Well, I guess it would depend on whether or not you use AFS. We install publicly available software in a "pubsw" location. Softare /installs/ go into the RW AFS path: /afs/.ir/pubsw/<Category>/<package>-<version> We then create symlinks for these into: /afs/.ir/systems/<sysname>/pubsw/[bin,lib,etc,include,man,doc,X,info,sbin,share,package] As you can see, no "var" directory. Every Host system has a symlink into the pubsw RO path: /usr/pubsw -> /afs/ir/systems/sun4x_59/pubsw/ for example, for a Solaris 9 system. This means that programs run out of pubsw /cannot/ write back into pubsw. In addition, all users home directories are in AFS. While most the time it is possible to write into the home directory, every user has a token, which expires every 25 hours. So if a user were to be using a program for a long period of time, and forgot to renew their token, the program would fail to write in the home directory. This is why we generally prefer they try to write to temp space. --Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Behdad Esfahbod wrote:> On Wed, 5 Apr 2006, Patrick Lam wrote: > > >>You have found a bug in fontconfig in that make install fails if it >>can''t make the {localstatedir}/fontconfig directory. I don''t know how >>to fix that bug, but I''d welcome patches. You just need to find the >>line where it creates the directory and add a -; the complication is >>that we go through automake, etc. > > > [behdad@home fontconfig-2_4_branch]$ grep pkgcache `find -name Makefile.am` > ./fc-cache/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' > ./fc-cache/Makefile.am: $(mkinstalldirs) "$(DESTDIR)$(pkgcachedir)" > ./fc-cache/Makefile.am: $(RM) -rf "$(DESTDIR)$(pkgcachedir)" > ./fc-cat/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' > ./src/Makefile.am:AM_CPPFLAGS = -DPKGCACHEDIR=''"${pkgcachedir}"'' > > Seems like all you need is to protect the RM command against > failures.I think that I also need to fix $mkinstalldirs, because Quanah was having trouble by not being able to create that directory. In any case, I''ve committed -s to both of those lines; let''s see if that works. pat