#11 [test idea] Check for unowned directories
Opened 11 years ago by adamwill. Modified 7 years ago

Initially filed by dgregor as https://fedorahosted.org/autoqa/ticket/31


With RPM, it's possible for a package to create a directory but not own it. For example, if package foo has

%files /etc/sysconfig/foo/bar.cfg

RPM will create the /etc/sysconfig/foo directory since it doesn't already exist, but that directory will not be owned by any package. This is a problem because a) we lose track of where directories came from and b) removing the foo package will leave the unowned directory behind.

To fix this, the following would need to be added to the %files section:

%dir /etc/sysconfig/foo

I will attach a script that can search for unowned directories in a pool of RPMs.


Adam notes: the description fails to mention that it is fine for a package to create files in a directory and not own that directory //if it depends on another package that owns that directory//. I didn't check whether the provided script accounts for this.


Original comment on attachment: "Note that the script will only catch directories that are part of RPM %files. It will not catch directories that are created at install time via %post scripts. In order to properly get those, you would need to perform an actual installation of the packages."

Metadata Update from @adamwill:
- Issue tagged with: task-idea

7 years ago

Log in to comment on this ticket.

Metadata