English Finnish
a package includes files within a directory it creates, but *not* the directory itself
A restrictive superuser umask during package installation can create inaccessible directories when installed using the RPM Package Manager older than 4.4.2.3. Fedora 9 and RHEL 5.3 are the first to use RPM 4.4.2.3 which sets umask 0022 always. On platforms with older versions of RPM if the superuser does this:
Common Mistakes
./configure Scripts can Fail
%{_datadir}/foo/
%{_datadir}/foo/*
%{_datadir}/%{name}/db/raw/*.db
%{_datadir}/%{name}/pixmaps/*.png
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/db
%dir %{_datadir}/%{name}/db/raw
%dir %{_datadir}/%{name}/pixmaps
%{_datadir}/%{name}/db/raw/*.db
%{_datadir}/%{name}/pixmaps/*.png
Directories cannot be Verified
Directories not Removed
%dir %{_libdir}/foo-2
%dir %{_libdir}/foo-2/fu
%dir %{_libdir}/foo-2/bar
%{_libdir}/foo-2/fu/*.so
%{_libdir}/foo-2/bar/config*
%dir %{_libdir}/foo-2/fu
%dir %{_libdir}/foo-2/bar
%{_libdir}/foo-2/fu/*.so
%{_libdir}/foo-2/bar/config*
%{_docdir}/%{name}-%{version}/
%dir %{_includedir}/%{name}-%{version}
%{_includedir}/%{name}-%{version}/*.h
%{_docdir}/%{name}-%{version}/*
%{_includedir}/%{name}-%{version}/*.h
Especially if directories contain a version number, they clutter up the file system with every update which doesn't remove old directories.
Forgetting to Include a Toplevel Directory
Here are some examples of common packaging mistakes in spec %files lists to avoid
Here it is an attempt at including the directories explicitly with the %dir macro. However, while "bar" is included, "foo-2" is not. Typically packagers run into that mistake if all installed files are stored only in subdirs of the parent "foo-2" directory. Correct would be:
Here only specific data files are included, and all 4 directories below %_datadir are unowned. Correct would be:
Inaccessible Directories