[Bug 1003495] New: fontconfig creates $HOME/.config directory owned by root, breaking Koji builds
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1003495
Bug ID: 1003495
Summary: fontconfig creates $HOME/.config directory owned by
root, breaking Koji builds
Product: Fedora
Version: rawhide
Component: fontconfig
Assignee: tagoh(a)redhat.com
Reporter: rjones(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: fonts-bugs(a)lists.fedoraproject.org,
i18n-bugs(a)lists.fedoraproject.org, pnemade(a)redhat.com,
tagoh(a)redhat.com
Description of problem:
A few days ago, something in Koji changed which started breaking
certain builds. After investigating this, we have found that
if 'fontconfig' is used as a build dependency, $HOME/.config
is created and owned by root.root, which means that no user program
can create any directory under $HOME/.config:
+ ls -al /builddir
total 36
drwx------. 5 mockbuild mockbuild 4096 Sep 1 22:35 .
dr-xr-xr-x. 18 root root 4096 Sep 1 22:23 ..
-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 mockbuild mockbuild 4096 Sep 1 22:35 .cache
drwxr-xr-x. 3 root root 4096 Sep 1 22:24 .config
-rw-rw-r--. 1 mockbuild mockbuild 211 Sep 1 22:23 .rpmmacros
drwxr-xr-x. 9 mockbuild mockbuild 4096 Sep 1 22:23 build
+ ls -al /builddir/.config
total 12
drwxr-xr-x. 3 root root 4096 Sep 1 22:24 .
drwx------. 5 mockbuild mockbuild 4096 Sep 1 22:35 ..
drwxr-xr-x. 2 root root 4096 Sep 1 22:24 fontconfig
This seems to be related to this build change:
commit 48deb947abd85d2f00c04d0f22c42fbe43d87cee
Author: Akira TAGOH <tagoh(a)redhat.com>
Date: Fri Aug 30 15:12:07 2013 +0900
New upstream release.
- migrate the configuration for XDG Base Directory spec automatically (bug
882267)
Version-Release number of selected component (if applicable):
fontconfig-2.10.95-1.fc21
How reproducible:
100%
Steps to Reproduce:
1. See the steps in bug 1003088.
Actual results:
Programs fail to run %check sections, if they rely on anything
that creates files in $HOME/.config
Expected results:
$HOME/.config should not be created as root.root by anything.
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=HRi05Q8VvP&a=cc_unsubscribe
10 years, 8 months
[fontconfig] Revert the previous change and do not create a directory for migration when no old config file nor d
by Akira TAGOH
commit 53a8100f3c5c4a34d331e7a97680c55f5454ca19
Author: Akira TAGOH <tagoh(a)redhat.com>
Date: Mon Sep 2 21:11:08 2013 +0900
Revert the previous change and do not create a directory for migration
when no old config file nor directory. (#1003495)
fontconfig-no-dir-when-no-conf.patch | 53 ++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
---
diff --git a/fontconfig-no-dir-when-no-conf.patch b/fontconfig-no-dir-when-no-conf.patch
new file mode 100644
index 0000000..53eb6d1
--- /dev/null
+++ b/fontconfig-no-dir-when-no-conf.patch
@@ -0,0 +1,53 @@
+From 3e5f70a16ac6d54f1e01c92ddaa5985deec1b7f9 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira(a)tagoh.org>
+Date: Mon, 2 Sep 2013 20:51:46 +0900
+Subject: [PATCH] Do not create a config dir for migration when no config files
+ nor dirs
+
+---
+ src/fcxml.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/src/fcxml.c b/src/fcxml.c
+index b464b4e..8ff10b6 100644
+--- a/src/fcxml.c
++++ b/src/fcxml.c
+@@ -2233,11 +2233,6 @@ FcParseInclude (FcConfigParse *parse)
+ /* No config dir nor file on the XDG directory spec compliant place
+ * so need to guess what it is supposed to be.
+ */
+- FcChar8 *parent = FcStrDirname (s);
+-
+- if (!FcFileIsDir (parent))
+- FcMakeDirectory (parent);
+- FcStrFree (parent);
+ if (FcStrStr (s, (const FcChar8 *)"conf.d") != NULL)
+ goto userdir;
+ else
+@@ -2259,6 +2254,11 @@ FcParseInclude (FcConfigParse *parse)
+ {
+ if (FcFileIsDir (filename))
+ {
++ FcChar8 *parent = FcStrDirname (userdir);
++
++ if (!FcFileIsDir (parent))
++ FcMakeDirectory (parent);
++ FcStrFree (parent);
+ if (FcFileIsDir (userdir) ||
+ rename ((const char *)filename, (const char *)userdir) != 0 ||
+ symlink ((const char *)userdir, (const char *)filename) != 0)
+@@ -2272,6 +2272,11 @@ FcParseInclude (FcConfigParse *parse)
+ }
+ else
+ {
++ FcChar8 *parent = FcStrDirname (userconf);
++
++ if (!FcFileIsDir (parent))
++ FcMakeDirectory (parent);
++ FcStrFree (parent);
+ if (FcFileIsFile (userconf) ||
+ rename ((const char *)filename, (const char *)userconf) != 0 ||
+ symlink ((const char *)userconf, (const char *)filename) != 0)
+--
+1.8.3.1
+
10 years, 8 months
[fontconfig] Revert the previous change and do not create a directory for migration when no old config file nor d
by Akira TAGOH
commit 70c216f831735a1dbd0c18a3a52fb1fde8cf361a
Author: Akira TAGOH <tagoh(a)redhat.com>
Date: Mon Sep 2 21:10:14 2013 +0900
Revert the previous change and do not create a directory for migration
when no old config file nor directory. (#1003495)
fontconfig.spec | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/fontconfig.spec b/fontconfig.spec
index 0cb237a..fe99682 100644
--- a/fontconfig.spec
+++ b/fontconfig.spec
@@ -3,7 +3,7 @@
Summary: Font configuration and customization library
Name: fontconfig
Version: 2.10.95
-Release: 2%{?dist}
+Release: 3%{?dist}
# src/ftglue.[ch] is in Public Domain
# src/fccache.c contains Public Domain code
# fc-case/CaseFolding.txt is in the UCD
@@ -16,6 +16,7 @@ Source1: 25-no-bitmap-fedora.conf
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
Patch0: fontconfig-2.8.0-sleep-less.patch
+Patch1: fontconfig-no-dir-when-no-conf.patch
BuildRequires: expat-devel
BuildRequires: freetype-devel >= %{freetype_version}
@@ -57,6 +58,7 @@ which is useful for developing applications that uses fontconfig.
%prep
%setup -q
%patch0 -p1 -b .sleep-less
+%patch1 -p1 -b .nodir
%build
# We don't want to rebuild the docs, but we want to install the included ones.
@@ -95,7 +97,7 @@ mkdir -p %{_localstatedir}/cache/fontconfig
# copy of fontconfig might install the binary instead of the first)
# The HOME setting is to avoid problems if HOME hasn't been reset
if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then
- HOME=/root XDG_CONFIG_HOME=/root/.config /usr/bin/fc-cache -f
+ HOME=/root /usr/bin/fc-cache -f
fi
%postun -p /sbin/ldconfig
@@ -133,9 +135,9 @@ fi
%doc fontconfig-devel.txt fontconfig-devel
%changelog
-* Mon Sep 2 2013 Akira TAGOH <tagoh(a)redhat.com> - 2.10.95-2
-- Set XDG_CONFIG_HOME explicitly at %%post to avoid creating directories
- at non-root HOME with root. (#1003495)
+* Mon Sep 2 2013 Akira TAGOH <tagoh(a)redhat.com> - 2.10.95-3
+- Do not create a directory for migration when no old config file and directory.
+ (#1003495)
* Sat Aug 31 2013 Akira TAGOH <tagoh(a)redhat.com> - 2.10.95-1
- Fix a crash issue (#1003069)
10 years, 8 months
[Bug 1003518] New: fontforge.xml should not be executable
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1003518
Bug ID: 1003518
Summary: fontforge.xml should not be executable
Product: Fedora
Version: 20
Component: fontforge
Assignee: kevin(a)scrye.com
Reporter: pnemade(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: fonts-bugs(a)lists.fedoraproject.org, kevin(a)scrye.com,
paul(a)frixxon.co.uk, pnemade(a)redhat.com
Description of problem:
$ ls -l /usr/share/mime/packages/fontforge.xml
-rwxr-xr-x. 1 root root 411 Aug 2 2012 /usr/share/mime/packages/fontforge.xml
Version-Release number of selected component (if applicable):
fontforge-20120731b-7.fc19
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
fontforge.xml is executable file
Expected results:
fontforge.xml should not be executable file
Additional info:
also, I observed following warnings in master build
warning: Explicit %attr() mode not applicaple to symlink:
/builddir/build/BUILDROOT/fontforge-20120731b-9.fc20.x86_64/usr/lib64/libfontforge.so.1
warning: Explicit %attr() mode not applicaple to symlink:
/builddir/build/BUILDROOT/fontforge-20120731b-9.fc20.x86_64/usr/lib64/libgdraw.so.4
warning: Explicit %attr() mode not applicaple to symlink:
/builddir/build/BUILDROOT/fontforge-20120731b-9.fc20.x86_64/usr/lib64/libgioftp.so.1
warning: Explicit %attr() mode not applicaple to symlink:
/builddir/build/BUILDROOT/fontforge-20120731b-9.fc20.x86_64/usr/lib64/libgunicode.so.3
warning: Explicit %attr() mode not applicaple to symlink:
/builddir/build/BUILDROOT/fontforge-20120731b-9.fc20.x86_64/usr/lib64/libgutils.so.1
good to fix this
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=fO6y1TV12M&a=cc_unsubscribe
10 years, 8 months
[fontconfig] Set XDG_CONFIG_HOME explicitly at %post to avoid creating directories
by Akira TAGOH
commit 027b96b574b937a52f7247d06fdd45aa238e4902
Author: Akira TAGOH <tagoh(a)redhat.com>
Date: Mon Sep 2 18:36:46 2013 +0900
Set XDG_CONFIG_HOME explicitly at %post to avoid creating directories
at non-root HOME with root. (#1003495)
fontconfig.spec | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/fontconfig.spec b/fontconfig.spec
index 131a6ba..0cb237a 100644
--- a/fontconfig.spec
+++ b/fontconfig.spec
@@ -3,7 +3,7 @@
Summary: Font configuration and customization library
Name: fontconfig
Version: 2.10.95
-Release: 1%{?dist}
+Release: 2%{?dist}
# src/ftglue.[ch] is in Public Domain
# src/fccache.c contains Public Domain code
# fc-case/CaseFolding.txt is in the UCD
@@ -95,7 +95,7 @@ mkdir -p %{_localstatedir}/cache/fontconfig
# copy of fontconfig might install the binary instead of the first)
# The HOME setting is to avoid problems if HOME hasn't been reset
if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then
- HOME=/root /usr/bin/fc-cache -f
+ HOME=/root XDG_CONFIG_HOME=/root/.config /usr/bin/fc-cache -f
fi
%postun -p /sbin/ldconfig
@@ -133,6 +133,10 @@ fi
%doc fontconfig-devel.txt fontconfig-devel
%changelog
+* Mon Sep 2 2013 Akira TAGOH <tagoh(a)redhat.com> - 2.10.95-2
+- Set XDG_CONFIG_HOME explicitly at %%post to avoid creating directories
+ at non-root HOME with root. (#1003495)
+
* Sat Aug 31 2013 Akira TAGOH <tagoh(a)redhat.com> - 2.10.95-1
- Fix a crash issue (#1003069)
10 years, 8 months
[fontforge] Revert previously added -Wstrict-aliasing cflags
by Parag Nemade
commit 6eee6cf5d1d854854df608e97384ff61b543c7d9
Author: Parag Nemade <pnemade(a)redhat.com>
Date: Mon Sep 2 14:35:24 2013 +0530
Revert previously added -Wstrict-aliasing cflags
- We actaully need -fno-strict-aliasing (rh#903288)
- Remove %defattr() (rh#1003518)
- fontforge.xml should not be executable (rh#1003518)
fontforge.spec | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/fontforge.spec b/fontforge.spec
index a61b37c..ea23c97 100644
--- a/fontforge.spec
+++ b/fontforge.spec
@@ -5,7 +5,7 @@
Name: fontforge
Version: 20120731b
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Outline and bitmap font editor
Group: Applications/Publishing
@@ -83,7 +83,7 @@ rm -rf htdocs/flags/CVS
%build
export INSTALL='/usr/bin/install -p'
-export CFLAGS="%{optflags} -Wstrict-aliasing"
+export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure --with-freetype-bytecode=no --with-regular-link --enable-pyextension
@@ -118,8 +118,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%find_lang %{gettext_package}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime/packages
-
-install -p Packaging/fontforge.xml $RPM_BUILD_ROOT/%{_datadir}/mime/packages/
+install -m 644 -p Packaging/fontforge.xml $RPM_BUILD_ROOT/%{_datadir}/mime/packages/
%post
update-desktop-database &> /dev/null || :
@@ -140,10 +139,9 @@ fi
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{gettext_package}.lang
-%defattr(-,root,root,-)
%doc AUTHORS LICENSE htdocs
-%attr(0755,root,root) %{_bindir}/*
-%attr(0755,root,root) %{_libdir}/lib*.so.*
+%{_bindir}/*
+%{_libdir}/lib*.so.*
%{_datadir}/applications/*fontforge.desktop
%{_datadir}/fontforge
%{_datadir}/icons/hicolor/*/apps/fontforge.*
@@ -154,12 +152,17 @@ fi
%{python_sitearch}/psMat.so
%files devel
-%defattr(0644,root,root,0755)
%{_includedir}/fontforge/
-%attr(0755,root,root) %{_libdir}/lib*.so
+%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%changelog
+* Mon Sep 02 2013 Parag Nemade <pnemade AT redhat DOT com> - 20120731b-10
+- Revert previously added -Wstrict-aliasing cflags
+- We actaully need -fno-strict-aliasing (rh#903288)
+- Remove %%defattr() (rh#1003518)
+- fontforge.xml should not be executable (rh#1003518)
+
* Thu Aug 22 2013 Parag Nemade <pnemade AT redhat DOT com> - 20120731b-9
- Added cflags -Wstrict-aliasing
- Fixed some compile-time errors from invalid Makefile rules
10 years, 8 months