Re: packaging the file system for Solaris and rpm 4.4.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In regard to: packaging the file system for Solaris and rpm 4.4.9, David...:

I found out with the first test install how strict rpm now is with its file list, deps, and provides. The basic file system, i.e. /usr, /var, and so forth, is now considered a dependency when installing. With earlier versions we've never had this issue and rpm would be happy to use the existing core file system as long as the directories already existed. Since the core file system is not owned by any package, rpm refuses to install anything installed in, for example, /usr/local, or plan /usr for that matter. I'm fine with this, but obviously we need a way of reliably convincing rpm that the necessary Solaris system is in fact there. One way we've found around this so far is to make a virtual file system package that does nothing more than Provides: /usr /usr/local, etc.

I think Jeff may have posted a way you can actually turn that off, but I
wouldn't go that route.

You have a couple options.

- use packages that provide the directory in question, as you're currently
  doing.

- just add the directories to /etc/rpm/sysinfo.

I would recommend the first method, as it feels more clean to me.  The
second one will do in a pinch, to tide you over until you're ready to
install revision N+1 of your filesystem package that includes the
directory you just realized you need.  ;-)

Note that the vpkg-provides that comes with RPM that aids in building
virtual packages could be extended to also Provide: directories, or a
simple script could autogenerate the list of directories that you might
want to provide in a virtual package.

The good news is that if you restrict where local packages managed by RPM
can install files, you only need a few directories in your "filesystem"
virtual package.  You just need to update your spec files for you local
packages to make sure that they claim any directories that are theirs and
theirs alone.  For example, in my spec file "gettext", I have the %install
section pre-create all the locales I've encountered in any package so
far, so that the gettext package can claim all those directories:

#
# TVM: so that this RPM claims as many of the language directories as
# possible, create as many as we know about now:
#
( cd $RPM_BUILD_ROOT%{LOCALE_DIR}/.. \
 && for d in af am ar as az be be@latin bg bn bn_IN bs ca cs cy da de dz \
    el en@boldquot en@quot en_CA en_GB eo es et eu \
    fa fi fr ga gl gu he hi hr hu id is it ja ka kn ko ku \
    li lt lv mg mi mk ml mn mr ms nb ne nl nn no oc or \
    pa pl pt pt_BR ro ru rw si sk sl sq sr sr@ije sr@Latn sv \
    ta te th tk tr tt ug uk vi wa xh yi zh_CN zh_HK zh_TW ; \
do \
    test -d locale/$d/LC_MESSAGES || %__mkdir_p locale/$d/LC_MESSAGES ; \
done ; )


Then my %files section claims them:

%dir %{LOCALE_DIR}
%{LOCALE_DIR}/locale.alias
%dir %{LOCALE_DIR}/??
%dir %{LOCALE_DIR}/*_*
%dir %{LOCALE_DIR}/*@*
%dir %{LOCALE_DIR}/*/LC_MESSAGES


Tim
--
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux