OBS build error: directories not owned by a package (/usr/share/unity-greeter)

I’m new at packaging rpm’s (I have some experience in packaging for Arch Linux) and I’ve started work on some packages that are not on OBS (yet).

I’ve managed to tackle most hurdles (documentation for packaging for openSUSE is great), but I can’t seem to find the proper solution for this one:

   45s] steam-login-session-12.1-7.1.noarch.rpm: directories not owned by a package:
   45s]  - /usr/share/unity-greeter

My %files section is:

%files
%license LICENSE
/usr/bin/steam-de
/usr/share/steam-de/
/usr/share/unity-greeter/custom_steam-bigpicture_badge.png
/usr/share/xsessions/steam-bigpicture.desktop

Some documenation states that removing the /usr/share/unity-greeter/ entry should resolve the error, but then it complains that the file is packages but not in the files section.

The package I’m working on is here: https://build.opensuse.org/package/show/home:tyrannishawk/steam-login-session

Can someone point me in the right direction?

Add this to your files-section:

/usr/share/unity-greeter/

But you know, there are macros for /usr/share
https://docs.fedoraproject.org/en-US/packaging-guidelines/RPMMacros/

Is there unity-greeter for openSUSE? If yes, adding it to BuildRequires should fix the error. If not, why would someone need to package files that are useless on openSUSE? Just delete them.

Very useful link. Thanks!

Ah, that’s what it’s for. In that case removing this from the package will clean it up and resolve the issue. Thanks!