Bug 507480 - Review Request: moblin-icon-theme - Moblin icon theme
Summary: Review Request: moblin-icon-theme - Moblin icon theme
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rahul Sundaram
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FedoraMoblin20
TreeView+ depends on / blocked
 
Reported: 2009-06-22 22:35 UTC by Peter Robinson
Modified: 2013-03-13 05:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-04 11:32:45 UTC
Type: ---
Embargoed:
sundaram: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)
updated spec to incorporate all changes from comment # 15 (2.45 KB, text/plain)
2009-08-03 14:51 UTC, Christoph Wickert
no flags Details

Comment 2 Rahul Sundaram 2009-08-02 05:18:51 UTC
I will review this shortly

Comment 3 Rahul Sundaram 2009-08-02 05:29:00 UTC
How did you determine that the license is CC-By-SA? The COPYING file is empty. Where does create-icon-theme.sh come from?

Comment 4 Rahul Sundaram 2009-08-02 06:19:24 UTC
You should also drop the explicit requires on gtk2. 

https://fedoraproject.org/wiki/Packaging/Guidelines#Requires

Comment 5 Peter Robinson 2009-08-02 06:29:31 UTC
(In reply to comment #3)
> How did you determine that the license is CC-By-SA? The COPYING file is empty.
> Where does create-icon-theme.sh come from?  

There are a couple of different COPYING files. The one in the root of the tarball that is installed in the 0.7 version is as follows:

# more /usr/share/doc/moblin-icon-theme-0.7/COPYING

  Copyright (C) 2009 Intel Corporation

This work is licenced under the Creative Commons Attribution-Share Alike 3.0
United States License. To view a copy of this licence, visit
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.

The create-icon-theme.sh is also in the root of the tarball.

Comment 6 Peter Robinson 2009-08-02 06:35:39 UTC
(In reply to comment #4)
> You should also drop the explicit requires on gtk2. 
> 
> https://fedoraproject.org/wiki/Packaging/Guidelines#Requires  

The reason I added it because the rpm itself doesn't have libraries in it that can be used for determining requirements but the pre/post scripts use gtk-update-icon-cache which requires gtk2.

Comment 7 Rahul Sundaram 2009-08-02 06:37:31 UTC
Ah, I just realized I had downloaded the previous source instead of the latest.
Sorry for the confusion. 

You are APPROVED

Comment 8 Peter Robinson 2009-08-02 06:42:12 UTC
Thanks :-)

New Package CVS Request
=======================
Package Name: moblin-icon-theme
Short Description: Moblin icon theme
Owners: pbrobinson
Branches: F-11
InitialCC:

Comment 9 Christoph Wickert 2009-08-03 00:38:46 UTC
(In reply to comment #6)
 
> The reason I added it because the rpm itself doesn't have libraries in it that
> can be used for determining requirements but the pre/post scripts use
> gtk-update-icon-cache which requires gtk2.  

"Note that no dependencies should be added for this. If gtk-update-icon-cache is not available, there's nothing that would be needing the cache update, ..."
Read the whole paragraph at 
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cache

BTW: You are not preserving timestamps while copying the files, see
https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps
I'd rather use install instead of cp to make sure permissions are correct. If you want to use cp, please use %attr to verify the permissions.

Comment 10 Jason Tibbitts 2009-08-03 06:31:17 UTC
CVS done.

Comment 11 Rahul Sundaram 2009-08-03 06:50:24 UTC
Peter Robinson,

Please fix the issues noted by Christopher Wickert and then import

Comment 12 Peter Robinson 2009-08-03 07:55:21 UTC
> Please fix the issues noted by Christopher Wickert and then import  

I will when I actually get the time to read what's written :)

Comment 13 Peter Robinson 2009-08-03 10:35:04 UTC
I've updated the spec file using 'cp -p' as per the above guidelines it looks like from my reading and testing install is only usable for individual files rather than directory structure like in an icon theme.

I've also removed the Makefile.am files that are copied as well.

A side point I'm not sure how this script from the packaging guidelines works

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

As post uninstall the theme.index wouldn't exist. I think it needs a -t option.

Thanks for the pointers.

Comment 14 Peter Robinson 2009-08-03 10:36:58 UTC
> As post uninstall the theme.index wouldn't exist. I think it needs a -t option.

I meant index.theme

Comment 15 Christoph Wickert 2009-08-03 14:50:38 UTC
(In reply to comment #13)
> I've updated the spec file using 'cp -p' as per the above guidelines it looks
> like from my reading and testing install is only usable for individual files
> rather than directory structure like in an icon theme.

This is correct. Just stick with cp, create-icon-theme.sh takes care of the permissions. Sorry for the noise.

> As post uninstall the theme.index wouldn't exist. I think it needs a -t option.

No, if index.theme doesn't exist, gtk-update-icon-cache is not run - this is what we want. It will complain about the missing dir, but this is why we have " &>/dev/null || :" at the end. (Well, at least we *should* have this at the end, you only have "|| :" because your scriptlets are outdated. See 
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cache
for the most recent version.)

BTW: icon-theme.cache is not part of this package, so it wont get removed when the package uninstalled. You need to
touch %{buildroot}/%{_datadir}/icons/moblin/icon-theme.cache
during install and include it ghosted in the files section.

Another thing I realized while looking at the source: You are not creating any symlinks for the icons, so many apps will have no stock icons. Add the following to your spec at the end of %install, when the Makefile.am files are already removed:

# create symlinks for gtk stock icons, these are not really 'legacy'
# this uses the legacy-icon-mapping.xml file
cd $RPM_BUILD_ROOT/usr/share/icons/moblin
for size in 16x16 24x24 48x48; do
  (
  cd $size
  for context in *; do
    if [ -d $context ]; then
      (
      cd $context
      INU_DATA_DIR=%{_builddir}/%{name}-%{version} /usr/bin/icon-name-mapping -c $context
      )
    fi
  done
  )
done

Voila, now the icon theme contains more than 3 times more files.

Last but not least create-icon-theme.sh should be running during %build. Not that it makes a difference, I'm just pedantic. ;)

Comment 16 Christoph Wickert 2009-08-03 14:51:41 UTC
Created attachment 356041 [details]
updated spec to incorporate all changes from comment # 15

Comment 17 Christoph Wickert 2009-08-03 14:54:29 UTC
Well, all changes except preserving the timestamps. Sorry.

Comment 18 Peter Robinson 2009-08-03 15:21:04 UTC
Excellent, I'll have a look a this shortly. Thanks :)

Comment 19 Christoph Wickert 2009-08-03 17:53:40 UTC
One more thing: Please don't use a disttag here. This is a noarch theme with no dependencies, so it is not necessary to update it during an release upgrade.

As the package was already built today, you should untag the old version:
$ koji untag-pkg dist-f12 moblin-icon-theme-0.7-1.fc12

Comment 20 Peter Robinson 2009-08-03 19:59:06 UTC
Package updated.

http://koji.fedoraproject.org/koji/taskinfo?taskID=1577021

Comment 21 Christoph Wickert 2009-08-03 21:21:43 UTC
Looks good, thanks.

I just saw your commit in moblin's git. I didn't know that you are involved upstream. Sorry if I tried to explain you things you already know. ;)

Comment 22 Peter Robinson 2009-08-03 21:33:07 UTC
> I just saw your commit in moblin's git. I didn't know that you are involved
> upstream. Sorry if I tried to explain you things you already know. ;)  

I'm not involved :-). I'm packaging it up for Fedora and send patches for things that I find so I assume they use the git feature to assign the credit when they apply the patches.

Comment 23 Peter Robinson 2009-08-03 22:31:07 UTC
Built and on its way to rawhide.

Comment 24 Peter Robinson 2009-08-04 11:32:45 UTC
Built and now in rawhide


Note You need to log in before you can comment on or make changes to this bug.