Bug 1186066 - yast2-* packages should not own /usr/share/icons directory structure
yast2-* packages should not own /usr/share/icons directory structure
Status: IN_PROGRESS
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Ladislav Slezák
Jiri Srain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-14 14:43 UTC by Dominique Leuenberger
Modified: 2022-02-07 11:36 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2021-05-14 14:43:34 UTC
At the moment, the yast2-* packages own the entire directory structure

/usr/share/icons plus all subdirectories.

This has some issues (which are being exposed by filesystem package changes):

The directory /usr/share/icons is owned by filesystem; the permission for this directory is supposed to be switched from 755 to 555

The filesystem package now performed this switch - yast though tries to install this directory with the old permission set.

This in turn results in installation conflicts such as:

[   12s] Preparing...                          ########################################
[   12s] 	file /usr/share/icons from install of yast2-4.4.3-3.1.x86_64 conflicts with file from package filesystem-15.5-260.1.x86_64

Preferably, yast2-* should only own the files it injects into the hicolor icon theme, nut the directory structure.

The most straight forward way looks like changing the definition of
 %yast_icondir from /usr/share/icons to /usr/share/icons/hicolor/*/*/*.svg

i.e. only own svg files, but not complete directory structures.

Possibly this needs a BuildRequires: hicolor-icon-theme in plus for rpmlint/brp to know who owns those directories
Comment 1 Ladislav Slezák 2021-05-14 15:18:13 UTC
To be honest I do not like much changing the %yast_icondir to /usr/share/icons/hicolor/*/*/*.svg, all %yast_*dir macros point to some directory, that's why they use the "dir" suffix.

(https://github.com/yast/yast-devtools/blob/817d8a7462bfcf19ccba0c2463bd81ed4c0a903f/build-tools/rpm/macros.yast#L5-L32)

Having one different macro which uses files looks like a hack, I'd rather avoid that.

The filesystem package now owns /usr/share/icons, but not /usr/share/icons/hicolor. And all YaST icons are located in the "hicolor" subdirectory.

So what about simply changing it from /usr/share/icons to /usr/share/icons/hicolor?


Another option would be to change all

  %{yast_icondir}

lines to 

  %{yast_icondir}/*/*/*/*.svg


The drawback is that this would require to touch 79 spec files...  :-(
Comment 2 Thorsten Kukuk 2021-05-14 15:25:47 UTC
(In reply to Ladislav Slezák from comment #1)
 
> So what about simply changing it from /usr/share/icons to
> /usr/share/icons/hicolor?

That should work.
Comment 3 Dominique Leuenberger 2021-05-14 15:27:25 UTC
then you just move the problem one directory higher - if that ever changes mode, we're at the same point
I'm not (yet) sure if the hicolor-icon-theme is supposedto be adjusted too, but chances are it will be
but I do see the problem with the macro being called *_dir, and then it is files

so in short: it's acceptable, but might require to come back to it later again
Comment 4 Jan Engelhardt 2021-05-14 18:55:25 UTC
Why even change mode of /usr/share/icons to 555? What does that buy?
Comment 17 Mindaugas Baranauskas 2022-02-07 11:15:00 UTC
(In reply to Thorsten Kukuk from comment #2)
> (In reply to Ladislav Slezák from comment #1)
>  
> > So what about simply changing it from /usr/share/icons to
> > /usr/share/icons/hicolor?
> 
> That should work.

openSUSE Leap and TW has also option to install ANOTHER theme than default hicolor, thus forcing /usr/share/icons/hicolor is not solution
Maybe better set directory via update-alternatives / YasST Alternatives?

See also
https://software.opensuse.org/search?utf8=%E2%9C%93&baseproject=ALL&q=yast2-theme
https://software.opensuse.org/package/yast2-theme-oxygen
https://software.opensuse.org/package/yast2-theme-breeze
Comment 18 Mindaugas Baranauskas 2022-02-07 11:30:33 UTC
Though even update-altertives is not option, because we can install yast2-theme-breeze and yast2-theme-oxygen and other themes simultaneously and actual theme depends on desktop icon theme of (root) user!
Comment 19 Dominique Leuenberger 2022-02-07 11:36:09 UTC
(In reply to Mindaugas Baranauskas from comment #17)
> (In reply to Thorsten Kukuk from comment #2)
> > (In reply to Ladislav Slezák from comment #1)
> >  
> > > So what about simply changing it from /usr/share/icons to
> > > /usr/share/icons/hicolor?
> > 
> > That should work.
> 
> openSUSE Leap and TW has also option to install ANOTHER theme than default
> hicolor, thus forcing /usr/share/icons/hicolor is not solution
> Maybe better set directory via update-alternatives / YasST Alternatives?
> 
> See also
> https://software.opensuse.org/search?utf8=%E2%9C%93&baseproject=ALL&q=yast2-
> theme
> https://software.opensuse.org/package/yast2-theme-oxygen
> https://software.opensuse.org/package/yast2-theme-breeze

Those packages can still install different themes, just not rely on yast2_icondir; no harm done.