directory ownership problem

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

 



I hope this list is appropriate for asking a question regarding rpm file ownership. As a relative rpm newbie, I suspect I'm missing some piece of "secret sauce" that's just obvious to anyone with rpm experience. If there's a more appropriate place to post the question, I'd appreciate a pointer. Thanks in advance.

The application in question is named ddcutil. I'm creating directories /usr/share/ddcutil and /usr/share/doc/ddcutil and saving files in them. rpm marks the files as being owned by ddcutil, but not the directories.

As I read the documentation (e.g. e.g. https://fedoraproject.org/wiki/How_to_create_an_RPM_package, http://www.tldp.org/HOWTO/RPM-HOWTO/build.html), a directory is regarded as being owned by an application if the directory name is specified either a) without the %dir macro (in which case all files in the directory tree rooted at the specified name are marked owned and installed) or b) prefaced by the %dir macro, in which case only the directory is marked. I've tried both ways.

The observed problem is similar for /usr/share/ddcutil and /usr/share/doc/ddcutil, so I'll give details only for the former.

Here's the relevant segment from the %files section:

    %{_datadir}/%{name}

Alternatively, I've tried coding the segment as follows:

    %dir %{_datadir}/%{name}
    %dir %{_datadir}/%{name}/data
    %{_datadir}/%{name}/data/*rules
    %{_datadir}/%{name}/data/90-nvidia-i2c.conf

In either case, the built rpm creates the directories and saves the files. The individual files are regarded as being owned by ddcutil, but not the directories.

What do I need to do to cause the directories to be owned?

In more detail, querying rpm shows that the files are saved and are owned by ddcutil, but the directories are not owned by ddcutil:

    [rock@banner results]$ rpm -ql ddcutil
    /usr/bin/ddcutil
    /usr/lib/.build-id
    /usr/lib/.build-id/db
    /usr/lib/.build-id/db/011d82f3eab5166e52eec359cb76b0773fd965
    /usr/share/ddcutil/data/45-ddcutil-i2c.rules
    /usr/share/ddcutil/data/45-ddcutil-usb.rules
    /usr/share/ddcutil/data/90-nvidia-i2c.conf
    /usr/share/doc/ddcutil/AUTHORS
    /usr/share/doc/ddcutil/COPYING
    /usr/share/doc/ddcutil/NEWS
    /usr/share/doc/ddcutil/README.md
    /usr/share/man/man1/ddcutil.1.gz

[rock@banner results]$ rpm -qf /usr/share/ddcutil/data/45-ddcutil-i2c.rules
    ddcutil-0.8.3-1.fc27.x86_64

[rock@banner results]$ rpm -q --whatprovides /usr/share/ddcutil/data/45-ddcutil-i2c.rules
    ddcutil-0.8.3-1.fc27.x86_64

    [rock@banner results]$ rpm -q --whatprovides /usr/share/ddcutil
    file /usr/share/ddcutil is not owned by any package

    [rock@banner results]# rpm -qf  /usr/share/ddcutil
    file /usr/share/ddcutil is not owned by any package

The report from fedora-review is consistent with rpm --query:

    [ ]: Package requires other packages for directories it uses.
         Note: No known owner of /usr/share/doc/ddcutil
    [ ]: Package must own all directories that it creates.
         Note: Directories without known owners: /usr/share/doc/ddcutil,
         /usr/share/ddcutil, /usr/share/ddcutil/data

_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux