Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1003495
Summary: | fontconfig creates $HOME/.config directory owned by root, breaking Koji builds | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> | ||||
Component: | fontconfig | Assignee: | Akira TAGOH <tagoh> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | fonts-bugs, i18n-bugs, pnemade, rdieter, tagoh | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-09-02 12:39:58 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 910269, 1003088 | ||||||
Attachments: |
|
Description
Richard W.M. Jones
2013-09-02 07:59:37 UTC
Does anyone run any process using fontconfig with root? and/or mock overrides XDG_CONFIG_HOME to that for root? Created attachment 792774 [details] test.spec The attachment is a minimal test which demonstrates the problem. You will need to have a Fedora packager account in order to run this test. After downloading 'test.spec', do: rpmbuild -ba --define "_sourcedir $(pwd)" test.spec koji build --scratch rawhide $HOME/rpmbuild/SRPMS/test-0-6.src.rpm You will see a scratch build in Koji (which will fail), like this one: http://koji.fedoraproject.org/koji/taskinfo?taskID=5881569 If you then examine the build.log file, you will see this output showing the $HOME/.config file with bad ownership: + ls -al /builddir total 32 drwx------. 4 mockbuild mockbuild 4096 Sep 2 09:15 . dr-xr-xr-x. 18 root root 4096 Sep 2 09:15 .. -rwxr-xr-x. 1 mockbuild mockbuild 18 Aug 9 12:08 .bash_logout -rwxr-xr-x. 1 mockbuild mockbuild 193 Aug 9 12:08 .bash_profile -rwxr-xr-x. 1 mockbuild mockbuild 231 Aug 9 12:08 .bashrc drwxr-xr-x. 3 root root 4096 Sep 2 09:15 .config -rw-rw-r--. 1 mockbuild mockbuild 211 Sep 2 09:15 .rpmmacros drwxr-xr-x. 9 mockbuild mockbuild 4096 Sep 2 09:15 build + mkdir -p /builddir/.config/test mkdir: cannot create directory '/builddir/.config/test': Permission denied (In reply to Akira TAGOH from comment #1) > Does anyone run any process using fontconfig with root? and/or mock > overrides XDG_CONFIG_HOME to that for root? Apparently yes. Almost every fonts package has a %post script that does: %post { umask 133 mkfontscale %{fontdir} || : mkfontdir %{fontdir} || : fc-cache %{_datadir}/fonts } &> /dev/null || : (that is taken from urw-fonts, but there are many other fonts-related packages doing the same thing) Looking at the changelog for fontconfig, I'd point to this change as a likely culprint, since it was made at about the time we saw the first libguestfs failure and involves the XDG directories we have problems with here +* Fri Aug 30 2013 Akira TAGOH <tagoh> - 2.10.94-1 +- New upstream release. +- migrate the configuration for XDG Base Directory spec automatically (#882267) just set XDG_CONFIG_HOME at %post to run fc-cache in 2.0.95-2. I'm not sure if it really helps since as you said at Bug#1003088, it works on mock for me too. so waiting for deploying this update to buildroot. (In reply to Richard W.M. Jones from comment #3) > Apparently yes. Almost every fonts package has a %post > script that does: Hmm, but who is requiring a font package to build a package? Is it a case for libvirt too? (In reply to Akira TAGOH from comment #6) > (In reply to Richard W.M. Jones from comment #3) > > Apparently yes. Almost every fonts package has a %post > > script that does: > > Hmm, but who is requiring a font package to build a package? > Is it a case for libvirt too? It's pulled in as an indirect dependency of something. I would guess something to do with texlive or other documentation generation. However that's hardly the point -- there are no limits on what can be BuildRequire'd, and in any case I suspect this would be just as broken on a 'fedup' Fedora install. (In reply to Daniel Berrange from comment #4) > Looking at the changelog for fontconfig, I'd point to this change as a > likely culprint, since it was made at about the time we saw the first > libguestfs failure and involves the XDG directories we have problems with > here > > +* Fri Aug 30 2013 Akira TAGOH <tagoh> - 2.10.94-1 > +- New upstream release. > +- migrate the configuration for XDG Base Directory spec automatically > (#882267) That oblique comment seems to refer to: http://cgit.freedesktop.org/fontconfig/commit/?id=041deb0cc541692e260b93232b9957c2538e3bb9 (In reply to Akira TAGOH from comment #5) > just set XDG_CONFIG_HOME at %post to run fc-cache in 2.0.95-2. I'm not sure > if it really helps since as you said at Bug#1003088, it works on mock for me > too. so waiting for deploying this update to buildroot. This doesn't work. Please test changes using the minimal test case I have posted (comment 2). In this case, same error as before: http://koji.fedoraproject.org/koji/taskinfo?taskID=5881952 (In reply to Richard W.M. Jones from comment #7) > (In reply to Akira TAGOH from comment #6) > > (In reply to Richard W.M. Jones from comment #3) > > > Apparently yes. Almost every fonts package has a %post > > > script that does: > > > > Hmm, but who is requiring a font package to build a package? > > Is it a case for libvirt too? > > It's pulled in as an indirect dependency of something. > I would guess something to do with texlive or other > documentation generation. Turns out to be java-1.7.0-openjdk (which we need to build Java bindings), which depends on fontconfig. To fix fundamental, the process being used fontconfig has to have the proper $HOME or $XDG_CONFIG_HOME IMHO. I can patch out fontconfig not to create a directory if there are no old config file nor dir. that may works for this case because it's unlikely to see on mock. but we may need to update the template in fontpackages to be safe perhaps. (In reply to Akira TAGOH from comment #11) > To fix fundamental, the process being used fontconfig has to have the proper > $HOME or $XDG_CONFIG_HOME IMHO. I can patch out fontconfig not to create a > directory if there are no old config file nor dir. that may works for this > case because it's unlikely to see on mock. but we may need to update the > template in fontpackages to be safe perhaps. Not a good idea, $XDG* is not fonts-specific. If something in our build environment makes $XDG* unsafe to use, it should be fixed at the build env level. $XDG* use will only increase in the future in all apps Okay, worked around with -3. the test package seems working. http://koji.fedoraproject.org/koji/taskinfo?taskID=5882429 |