On Wed, 23 Aug 2000, M wrote:

> 1) If I store an empty (ie with no files in it) folder in an RPM, it
>    will not be created when installing the RPM.

No, empty directories are created when installing RPMs, as long as they
are included in the file list when the RPM is built. "rpm -qlvp blah.rpm"
will list all files and directories in an rpm.

>    My (temp) fix is to store
>    a hidden (zero size) file in the folder to be created. Surely there is
>    a better way.

I'm sure there is. My guess is that you aren't including the directory
correctly in the filelist in the spec file.

>    I would also like to note that expanding a template to a non-existing
>    folder (ie expand-template /etc/squid/squid.conf while /etc/squid does
>    not exist) causes a segmentation fault and core dump.

That's pretty wierd. In my experience, perl very rarely dumps core. It's
an error condition that we could add a check for, however.

Hmmm, I don't get a seg fault, I get this:

expand-template /etc/squid/squid.conf
Cannot open output file /etc/squid/squid.conf: No such file or directory

Perhaps you have a RAM problem?

> 2) Rights and ownership: When a template is expanded from fragments, what
>    rights and ownership will be assigned to the resulting file? The rights
>    and ownership of template-begin?

The file is owned root.root, and the permissions depend on the process
umask. It is currently up to the script which expands the template to set
ownership and permission if the defaults are not suitable, however we are
in the process of redefining the interface to processTemplate to allow
ownership and permissions to be specified directly in the function call.

-- 

  Charlie Brady                         [EMAIL PROTECTED]
  http://www.e-smith.org (development)  http://www.e-smith.com (corporate)
  Phone: +1 (613) 368 4376 or 564 8000  Fax: +1 (613) 564 7739
  e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada



Reply via email to