Directory not owned by package: /usr/share/doc

I met this problem when trying to package yacreader:

yacreader-9.8.2.2106204-0.x86_64.rpm: directories not owned by a package:

  • /usr/share/doc
  • /usr/share/man
  • /usr/share/man/man1

However, when I add those directories in %files section of my spec, I get the following error:

standard-dir-owned-by-package: [FONT=monospace]/usr/share/man, [FONT=monospace]/usr/share/man/man1, [FONT=monospace]/usr/share/doc

Here is my spec file: https://pastebin.com/F1pUQJxz
How do I package the files in /usr/share/man/man1 without owning the directory?
[/FONT][/FONT][/FONT]

You posted in OBS subfrorum which implies you are working on OBS. Post link to your package on OBS.

Here you go: https://build.opensuse.org/package/show/home:nuklly:branches:home:selmf:yacreader-rpm/yacreader

It is built for openSUSE. I do not see any rpmlint errors in log. What is your question?

Hi, I’m having the same problem. My package is defined here: Show home:huyngo / BadWolf - openSUSE Build Service

I suppose nuklly has figured out how to solve this. Can you share your solution?