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 174219 - Sriplets fail because of the missing /etc/fonts/local.conf file
Summary: Sriplets fail because of the missing /etc/fonts/local.conf file
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fluxbox
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 174240
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-26 00:27 UTC by Dawid Gajownik
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-30 01:33:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Houston, we've got a problem. ;) (32.72 KB, text/plain)
2006-01-01 15:26 UTC, Dawid Gajownik
no flags Details

Description Dawid Gajownik 2005-11-26 00:27:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051107 SeaMonkey/1.5a

Description of problem:
âfontconfigâ in Rawhide does not provide /etc/fonts/local.conf file anymore. You can compare â%filesâ sections:
http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/fontconfig/FC-4/fontconfig.spec
http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/fontconfig/devel/fontconfig.spec

It now uses /etc/fonts/conf.d/*.conf files for changing fontconfig configuration. It make packagers' life much easier, because this approach does not require to implement XML ninja skilz in rpm scriplets ;-) You can now just drop a proper file in /etc/fonts/conf.d/ and that's all :]

Having that said, I can now write about the problem. Instalation of fluxbox in Rawhide fails (at least on my machine):

[root@X packages]# LANG=en_US.UTF-8 rpm -Uvh fluxbox-0.9.14-1.fc5.i386.rpm
Preparing...                ########################################### [100%]
   1:fluxbox                ########################################### [100%]
fgrep: /etc/fonts/local.conf: No such file or directory
sed: can't read /etc/fonts/local.conf: No such file or directory
error: %post(fluxbox-0.9.14-1.fc5.i386) scriptlet failed, exit status 2
[root@X packages]# LANG=en_US.UTF-8 ls /etc/fonts/local.conf
ls: /etc/fonts/local.conf: No such file or directory
[root@X packages]# LANG=en_US.UTF-8 rpm -e fluxbox
sed: can't read /etc/fonts/local.conf: No such file or directory
error: %postun(fluxbox-0.9.14-1.fc5.i386) scriptlet failed, exit status 2
[root@X packages]#

You can now:
a) create custom fontconfig configuration file and install it in /etc/fonts/conf.d/
b) move /usr/lib/X11/fonts/artwiz-aleczapka to /usr/share/fonts/artwiz-aleczapka

I would suggest option b) because installing not architecture-dependent data in the /usr/lib directory is against FHS 2.3 and, what is more, modular X.org X11R7 does not use /usr/lib/X11/fonts/ dir anymore. If you don't like /usr/share/fonts, you can always use /usr/share/X11/fonts, but it would require fontconfig configuration file. There was a discussion about it recently on fedora-devel-list:
http://www.redhat.com/archives/fedora-devel-list/2005-November/msg00144.html

IMHO mixing X.org X11 files with files from other packages is not a Good Thing⢠so I like /usr/share/fonts/artwiz-aleczapka location more ;)

What is more, fluxbox does not uninstall all files. Please see bug #171978 You can use something like this in your spec file:

# "touch" file we've got flagged as %ghost
touch %{buildroot}%{_datadir}/artwiz-aleczapka/fonts.cache-1
touch %{buildroot}%{_datadir}/artwiz-aleczapka/fonts.cache-2

[snip]

%files
%defattr(-,root,root,-)

...

%ghost %verify(not md5 size mtime) %{_datadir}/artwiz-aleczapka/fonts.cache-1
%ghost %verify(not md5 size mtime) %{_datadir}/artwiz-aleczapka/fonts.cache-2

I would also tweak a bit your rpm scriplets. Right now they can fail if `fc-cache' is not present -- thats wrong â https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165900#c1

You may find these lines helpful:

%post
if [ -x %{_bindir}/fc-cache ]; then 
  %{_bindir}/fc-cache %{_datadir}/fonts
fi

%postun
if [ "$1" = "0" ]; then
  if [ -x %{_bindir}/fc-cache ]; then 
    %{_bindir}/fc-cache %{_datadir}/fonts
  fi
fi

(copied from dejavu-fonts.spec) Place similar lines using `chkfontpath' if you thing that is needed.

Version-Release number of selected component (if applicable):
fluxbox-0.9.14-1.fc5

How reproducible:
Always

Steps to Reproduce:
1. yum install fluxbox

Additional info:

I hope I haven't missed anything -- it's 1.30 AM here ;) Hava a nice day.

Comment 1 Andreas Bierfert 2005-11-26 10:15:11 UTC
Thanks for this good report =)

Actually the whole fluxbox font issue is has been bothering my lately. This is
all from a time before my mainternership.

I have added some new stuff to fluxbox here locally and I am working on a
splitting out artwiz-aleczapka font package to avoid these (ugly) issued...

Thanks for putting my attention to this again. I will see to get something out
and going asap...



Comment 2 Dawid Gajownik 2006-01-01 15:26:41 UTC
Created attachment 122672 [details]
Houston, we've got a problem. ;)

I saw yesterday that fluxbox compilation failed â
http://buildsys.fedoraproject.org/logs/fedora-development-extras/2399-fluxbox-0.9.14-2.fc5/i386/build.log


I commented out:

dnl Check for X headers and libraries
AC_PATH_X
AC_PATH_XTRA

in configure.in and rerun autoreconf (yes, this is really ugly hack -- it
should be fixed with proper use of pkg-config). Unfortunately, fluxbox does not
compile with g++ 4.1 (works fine with g++32, though).

As a workaround you may want to set CC and CXX variables to gcc32 and g++32.
You may also need to remove some options from %{optflags} because GCC 3.2 does
not recognize them: "-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4"

Sorry, I don't know C++ so I cannot provide proper solution :(

Comment 3 Andreas Bierfert 2006-01-30 01:33:14 UTC
The original font issue is solved so I will close this and for the compile
problems on rawhide see #179299


Note You need to log in before you can comment on or make changes to this bug.