Bug 603906 - RFE: Deluge Package Split
Summary: RFE: Deluge Package Split
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: deluge
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-14 20:01 UTC by Rahul Sundaram
Modified: 2011-02-11 02:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-11 02:34:37 UTC


Attachments (Terms of Use)

Description Rahul Sundaram 2010-06-14 20:01:31 UTC
Peter Gordon's reply with ack and go ahead at 

http://lists.fedoraproject.org/pipermail/devel/2010-June/137203.html

The plan is to split the package based on the spec at 

http://ankursinha.fedorapeople.org/deluge/deluge.spec

RFE filed for discussing improvements to the spec before committing the changes in Rawhide only

Comment 1 Mamoru TASAKA 2010-06-14 20:18:43 UTC
It is unsure if I can "review" this spec file soon, however
- Please check if the spec file meets packaging guidelines.
   - At least there is a issue for directory ownership issue and
     need fixing.
     - It seems all subpackages other than -common subpackge depend
       on -common subpackage so it is sufficient that
      "Obsoletes: %{name} = .... " appears in -common subpackage
     - Obsoletes:  %{name} <= 1.2.3-1 does not obsolete deluge-1.2.3-2.fc13
     - Usually dependencies between subpackages must be exact EVR
       specific.
     - scriptlets need updating (guideline changed)
    This is very rapid comment and I may be missing something else.

- And please check if "yum update (upgrade)" works as expected.

Comment 2 Mamoru TASAKA 2010-06-14 20:38:59 UTC
- Obsoletes:  %{name}-flags in -images subpackage must be
  moved to -common subpackage, otherwise this may leads
  to that deluge-common and deluge-flags installed.

- I guess -gtk should depend on -daemon because (at least
  on my usage) GUI interface first has to connect deluge
  server (deluged).

Comment 3 Mamoru TASAKA 2010-06-14 20:40:36 UTC
or maybe -console and -web should also depend on -daemon..
(now I leave for a rest)

Comment 4 Chen Lei 2010-06-15 01:45:28 UTC
Ons suggestion:
Will it be better to let main package as a metapackage and requires all subpackages of deluge?

Then, we only need to add Obsoletes:  %{name}-flags to mainpackage, Obsoletes in all other subpackages will be not needed. 

> - I guess -gtk should depend on -daemon because (at least
>   on my usage) GUI interface first has to connect deluge
>   server (deluged).    

It seems -gtk, -console, -web clients can also connect to a remote daemon instead of a local one.

Comment 5 Mamoru TASAKA 2010-06-15 15:52:39 UTC
(In reply to comment #4)
> Ons suggestion:
> Will it be better to let main package as a metapackage and requires all
> subpackages of deluge?
> 
> Then, we only need to add Obsoletes:  %{name}-flags to mainpackage, Obsoletes
> in all other subpackages will be not needed. 

- +1, I prefer this way because with this people who just do
  "yum install deluge" will see an expected results.

> > - I guess -gtk should depend on -daemon because (at least
> >   on my usage) GUI interface first has to connect deluge
> >   server (deluged).    
> 
> It seems -gtk, -console, -web clients can also connect to a remote daemon
> instead of a local one.    
- Well, I think making it possible that -gtk (or so) can
  connect local daemon by default is preferable for most deluge
  users.

Comment 6 Ankur Sinha (FranciscoD) 2010-06-23 12:56:41 UTC
hi,

I will update the spec ASAP.

regards,
Ankur

Comment 7 Ankur Sinha (FranciscoD) 2010-09-24 14:19:09 UTC
hi, 

I'm sorry this bug has gone without response for such a while.

I've split the packages, checked the upgrade path. It updates properly. Can someone please review the package now?

Spec URL: http://ankursinha.fedorapeople.org/deluge/deluge.spec

SRPM URL: http://ankursinha.fedorapeople.org/deluge/deluge-1.2.3-7.fc15.src.rpm

Rest of the mock logs are here: http://ankursinha.fedorapeople.org/deluge/

Koji scratch build is at : http://koji.fedoraproject.org/koji/taskinfo?taskID=2486990

regards,
Ankur

Comment 8 Ankur Sinha (FranciscoD) 2010-09-25 09:11:08 UTC
Query:

As of now, with my split packages installed and deluge as a meta package:

[root@070905042 ~]# yum remove deluge
Loaded plugins: auto-update-debuginfo, fastestmirror, presto, protectbase, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package deluge.noarch 0:1.2.3-7.fc13 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                             Arch                                Version                                    Repository                          Size
=============================================================================================================================================================
Removing:
 deluge                              noarch                              1.2.3-7.fc13                               @temp                               53 k

Transaction Summary
=============================================================================================================================================================
Remove        1 Package(s)

Installed size: 53 k
Is this ok [y/N]:

This doesn't seem to work properly. We wouldn't want all the packages to remain on a user's system, would we?

regards,
Ankur

Comment 9 Rahul Sundaram 2010-10-25 09:09:23 UTC
Ankur, 

any followup on this?  Now is a good time to commit the changes to Rawhide and work out the kinks if any,

Comment 10 Ankur Sinha (FranciscoD) 2010-10-25 13:49:28 UTC
(In reply to comment #9)
> Ankur, 
> 
> any followup on this?  Now is a good time to commit the changes to Rawhide and
> work out the kinks if any,

Hey Rahul, 

I've submitted the newest revision (see https://bugzilla.redhat.com/show_bug.cgi?id=603906#c7). Someone needs to review and check it up so we can commit to rawhide. 

regards,
Ankur

Comment 11 Rahul Sundaram 2010-10-28 06:51:49 UTC
If it works well on your testing and you have commit access, then do it only in Rawhide and we can fix any bugs that might crop up quickly.  If you don't have commit access, let me know and I can do it for you. I would suggest applying to be a co-maintainer in that case.

Comment 12 Ankur Sinha (FranciscoD) 2010-10-28 13:41:55 UTC
Hello,

I've applied as co-maintainer to deluge. 

regards,
Ankur

Comment 13 Mamoru TASAKA 2010-10-28 14:33:59 UTC
- First of all, rawhide uses 1.3.0, so please make your srpm
  sync with the current rawhide one.
- Also, directory ownership or so are still wrong. Please
  check my comment 1 and modify your spec file.

Comment 14 Ankur Sinha (FranciscoD) 2010-10-28 19:04:51 UTC
(In reply to comment #13)
> - First of all, rawhide uses 1.3.0, so please make your srpm
>   sync with the current rawhide one.
> - Also, directory ownership or so are still wrong. Please
>   check my comment 1 and modify your spec file.

Hello,

I think I've fixed all the ownership issues, please have a look. 

SPEC:
http://ankursinha.fedorapeople.org/deluge/deluge.spec

SRPM:
http://ankursinha.fedorapeople.org/deluge/deluge-1.3.0-2.fc15.src.rpm

other mock logs:
http://ankursinha.fedorapeople.org/deluge/


rpmlint output:

:!rpmlint deluge.spec ../SRPMS/deluge-1.3.0-2.fc13.src.rpm /var/lib/mock/fedora-rawhide-i386/result/*.rpm
deluge.src: W: spelling-error %description -l en_US µTorrent -> torrent, Sorrento, abhorrent
deluge.noarch: W: spelling-error %description -l en_US µTorrent -> torrent, Sorrento, abhorrent
deluge.src: W: spelling-error %description -l en_US µTorrent -> torrent, Sorrento, abhorrent
deluge-common.noarch: W: no-documentation
deluge-images.noarch: W: no-documentation
deluge-web.noarch: W: hidden-file-or-dir /usr/lib/python2.7/site-packages/deluge/ui/web/js/deluge-all/.order
deluge-web.noarch: W: hidden-file-or-dir /usr/lib/python2.7/site-packages/deluge/ui/web/js/deluge-all/add/.order
deluge-web.noarch: W: hidden-file-or-dir /usr/lib/python2.7/site-packages/deluge/ui/web/js/deluge-all/data/.order
9 packages and 1 specfiles checked; 0 errors, 8 warnings.

Thanks!

Regards,
Ankur

Comment 15 Mamoru TASAKA 2010-10-28 19:48:11 UTC
Well, I want to take a rest now, however at least

- Still directory ownership issue is wrong.

  You can compare files/directory list between old one and new one with
  $ rpm -qlp deluge-XXXX.noarch.rpm | sort.
  Mainly %python_sitelib/%name/data and many directories under
  %python_sitelib/%name/i18n are not owned.
  Also you can see what old deluge.spec did for directory ownership
  issue

- Also scriptlets needs updating.
  Please check:
  https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cache

- "ChangeLog LICENSE README" should be in -common, not in main
  http://lists.fedoraproject.org/pipermail/devel/2010-July/138487.html

? License tag on main says "GPLv3 with exceptions", but all other
  subpackage says "GPLv3". Would you check if this is correct?

! And some other notes
  ! This is for rawhide and BuildRoot: line, %clean section, 
    "rm -rf %{buildroot}" at the top of %install are not needed.

Comment 16 Ankur Sinha (FranciscoD) 2010-10-29 07:40:58 UTC
Hello, 

(In reply to comment #15)
> Well, I want to take a rest now, however at least
> 
> - Still directory ownership issue is wrong.
> 
>   You can compare files/directory list between old one and new one with
>   $ rpm -qlp deluge-XXXX.noarch.rpm | sort.
>   Mainly %python_sitelib/%name/data and many directories under
>   %python_sitelib/%name/i18n are not owned.
>   Also you can see what old deluge.spec did for directory ownership
>   issue

This will take some effort to correct. The previous spec doesn't really help. I'll post once I've managed this. 

> 
> - Also scriptlets needs updating.
>   Please check:
>   https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cache
> 
> - "ChangeLog LICENSE README" should be in -common, not in main
>   http://lists.fedoraproject.org/pipermail/devel/2010-July/138487.html
> 
> ? License tag on main says "GPLv3 with exceptions", but all other
>   subpackage says "GPLv3". Would you check if this is correct?

I'll contact the maintainer to find out what the exceptions are. 

> 
> ! And some other notes
>   ! This is for rawhide and BuildRoot: line, %clean section, 
>     "rm -rf %{buildroot}" at the top of %install are not needed.

Will correct.

regards,
Ankur

Comment 17 Ankur Sinha (FranciscoD) 2010-10-29 16:05:09 UTC
Hello,

I've corrected the ownership issues. It was because of the hack we're using to get the list of .mo files. They happen to be in a non standard location in the package. 

Please have a look:
http://ankursinha.fedorapeople.org/deluge/deluge.spec

http://ankursinha.fedorapeople.org/deluge/deluge-1.3.0-3.fc15.src.rpm

all other rpms are at 
http://ankursinha.fedorapeople.org/deluge/

* Fri Oct 29 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.0-3
- correct License and check file ownerships
- updated icon cache scriplet

Thanks,
regards,
Ankur

Comment 18 Mamoru TASAKA 2010-11-06 20:14:14 UTC
Well, for -3:

* Requires
  - Please recheck Requires with respecting changing during package split.
    ! While "Requires: python-mako" appears in -common, it seems that mako
      is used only in ./deluge/ui/web/common.py, so "Requires: python-mako" should
      be moved to -web

* Directory ownership issue
  - Currently -images subpackage can be installed without -common subpackage,
    however this leaves the directory %{python_sitelib}/%{name}/ unowned and
    this needs fixing.

* Scriptlets
  - Icons under %_datadir/icons/ are owned by -images so scriptlets for updating
    GTK icon cache should be moved to -images.

Comment 19 Ankur Sinha (FranciscoD) 2010-12-06 04:40:35 UTC
Hi Mamoru,

I'll get this done by the 15th earliest. I won't have a working system any time before then, so I'm a little behind on packaging. Sorry. 

regards,
Ankur

Comment 20 Ankur Sinha (FranciscoD) 2010-12-27 16:26:59 UTC
(In reply to comment #18)
> Well, for -3:

Hello, 

Got my system two days ago. As promised, here's the updated package. 

> 
> * Requires
>   - Please recheck Requires with respecting changing during package split.
>     ! While "Requires: python-mako" appears in -common, it seems that mako
>       is used only in ./deluge/ui/web/common.py, so "Requires: python-mako"
> should
>       be moved to -web

Corrected. I'd like to learn how you came across this please?

> 
> * Directory ownership issue
>   - Currently -images subpackage can be installed without -common subpackage,
>     however this leaves the directory %{python_sitelib}/%{name}/ unowned and
>     this needs fixing.

I'm not sure how to fix this, so I've let it be. One method would be to make a subpackage deluge-dir that *only* owns the dir and make *all* subpackages pull it in? Or is this a rather ugly work around? Suggestions please?

> 
> * Scriptlets
>   - Icons under %_datadir/icons/ are owned by -images so scriptlets for
> updating
>     GTK icon cache should be moved to -images.

Corrected. 

* Mon Dec 27 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.1-1
- update to latest upstream release
- Moved icon update scriptlets to -images
- Moved python-mako requires to -web

Spec URL:
http://ankursinha.fedorapeople.org/deluge/deluge.spec

SRPM:
http://ankursinha.fedorapeople.org/deluge/deluge-1.3.1-1.fc15.src.rpm

Rest of the mock build data can be found at http://ankursinha.fedorapeople.org/deluge/

Thanks,
Ankur

Comment 21 Mamoru TASAKA 2010-12-28 07:55:07 UTC
For 1.3.1-1

* Sync with GIT master spec file
  - First of all, please get your spec file synced with
    current GIT master spec file.
    ! Peter already updated current Fedora deluge to 1.3.1-1
      and it seems that some new patch is added.

* Scriptlets
  - Installed fedora-deluge.desktop is in -gtk subpackage,
    not in -images (GTK icons are in -images subpackage).
    So scriptlets for desktop related things 
    (update-desktop-database) should be in -gtk subpackage.

* Directory ownership issue
> > * Directory ownership issue
> >   - Currently -images subpackage can be installed without -common subpackage,
> >     however this leaves the directory %{python_sitelib}/%{name}/ unowned and
> >     this needs fixing.
> 
> I'm not sure how to fix this, so I've let it be. One method would be to make a
> subpackage deluge-dir that *only* owns the dir and make *all* subpackages pull
> it in? Or is this a rather ugly work around? Suggestions please?
  - So
    ? Is it expected that people will install -images subpackage "only"?
      If not, just adding "Requires: %name-common = %version-%release"
      is the easiest solution (I don't expect that people complains
      even if installing -images subpackage also pulls in -common subpackage
      automatically)
    - Or you think people may install -images directory only, you can add
      "%dir %{python_sitelib}/%{name}" entry also in -images subpackage
      (from new Fedora packaging guideline for directory ownership treatment)

By the way I forgot to mention
* CFLAGS
  - This is (currently) noarch package and setting $CFLAGS in spec file should
    not be needed.

Comment 22 Ankur Sinha (FranciscoD) 2010-12-28 09:22:26 UTC
(In reply to comment #21)
> For 1.3.1-1
> 
> * Sync with GIT master spec file
>   - First of all, please get your spec file synced with
>     current GIT master spec file.
>     ! Peter already updated current Fedora deluge to 1.3.1-1
>       and it seems that some new patch is added.
> 
> * Scriptlets
>   - Installed fedora-deluge.desktop is in -gtk subpackage,
>     not in -images (GTK icons are in -images subpackage).
>     So scriptlets for desktop related things 
>     (update-desktop-database) should be in -gtk subpackage.
> 
> * Directory ownership issue
> > > * Directory ownership issue
> > >   - Currently -images subpackage can be installed without -common subpackage,
> > >     however this leaves the directory %{python_sitelib}/%{name}/ unowned and
> > >     this needs fixing.
> > 
> > I'm not sure how to fix this, so I've let it be. One method would be to make a
> > subpackage deluge-dir that *only* owns the dir and make *all* subpackages pull
> > it in? Or is this a rather ugly work around? Suggestions please?
>   - So
>     ? Is it expected that people will install -images subpackage "only"?
>       If not, just adding "Requires: %name-common = %version-%release"
>       is the easiest solution (I don't expect that people complains
>       even if installing -images subpackage also pulls in -common subpackage
>       automatically)
>     - Or you think people may install -images directory only, you can add
>       "%dir %{python_sitelib}/%{name}" entry also in -images subpackage
>       (from new Fedora packaging guideline for directory ownership treatment)
> 
> By the way I forgot to mention
> * CFLAGS
>   - This is (currently) noarch package and setting $CFLAGS in spec file should
>     not be needed.

* Tue Dec 28 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.1-2
- Correct scripts
- Correct directory ownership
- add desktop file patch

Well, someone could install only the -images package. Not logical, but possible. I've added the %{python_sitelib}/%{name} as owned by -images also. 

I've placed the scripts in correct sub packages. 

I've updated to 1.3.1-2 which is in sync with peter's update, and have added the new patch. 

Thanks,
Ankur

Comment 23 Ankur Sinha (FranciscoD) 2010-12-28 09:28:21 UTC
Silly me! I forgot the links. Here they are:

http://ankursinha.fedorapeople.org/deluge/deluge-1.3.1-2.fc15.src.rpm

http://ankursinha.fedorapeople.org/deluge/deluge.spec

regards,
Ankur

Comment 24 Mamoru TASAKA 2011-01-01 16:36:33 UTC
For -2:

* Scriptlets
  - Well, what I mean here is that
    * GTK icons are in -images subpackages, so updating GTK icons cache
      (i.e. modifying %_datadir/icons/hicolor) must be in -images scriptlets

    * On the other hand, .desktop is in -gtk subpackage, so calling
      update-desktop-database must -gtk scriptlets

So:
-----------------------------------------------------------
%post gtk
update-desktop-database &> /dev/null || :

%post images
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


%postun gtk
update-desktop-database &> /dev/null || :

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

Comment 25 Ankur Sinha (FranciscoD) 2011-01-10 11:06:18 UTC
SPEC: http://ankursinha.fedorapeople.org/deluge/deluge.spec
SRPM: http://ankursinha.fedorapeople.org/deluge/deluge-1.3.1-3.fc15.src.rpm

rest of the mock results are at http://ankursinha.fedorapeople.org/deluge


* Mon Jan 10 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.1-3
- Updated as per https://bugzilla.redhat.com/show_bug.cgi?id=603906#c24

Thanks,
Ankur

Comment 26 Mamoru TASAKA 2011-01-14 14:06:22 UTC
Well, and where is %posttrans scriptlets gone?

Would you again check the following?
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets

Comment 27 Ankur Sinha (FranciscoD) 2011-01-17 06:11:22 UTC
(In reply to comment #26)
> Well, and where is %posttrans scriptlets gone?
> 
> Would you again check the following?
> https://fedoraproject.org/wiki/Packaging/ScriptletSnippets

Sorry, 

SPEC: http://ankursinha.fedorapeople.org/deluge/deluge.spec
SRPM: http://ankursinha.fedorapeople.org/deluge/deluge-1.3.1-3.fc14.src.rpm

A koji scratch build for F14 : http://koji.fedoraproject.org/koji/taskinfo?taskID=2725109

RPMS for F14 are here (I used these to check the upgrade path): http://ankursinha.fedorapeople.org/deluge/

Rest of the mock build logs are also at the above location.

Ankur

Comment 28 Mamoru TASAKA 2011-01-26 19:27:32 UTC
Well,

* As I said in comment 21, 'CFLAGS="%{optflags}"' part in %build
  is no longer needed as this is noarch.

Now there is no blockers.

Comment 29 Ankur Sinha (FranciscoD) 2011-02-01 09:27:31 UTC
(In reply to comment #28)
> Well,
> 
> * As I said in comment 21, 'CFLAGS="%{optflags}"' part in %build
>   is no longer needed as this is noarch.
> 
> Now there is no blockers.

Hi,

Thanks for the review. Peter, can you please apply these changes or permit me to apply them. I don't have commit rights to deluge at the moment. 

Thanks!
Ankur

Comment 30 Rahul Sundaram 2011-02-01 09:42:30 UTC
As per Peter's mail earlier c.f. my first comment in this bug report, he is ok with us committing this change.  I will do it later unless there are any objections.

Comment 31 Mamoru TASAKA 2011-02-01 11:56:25 UTC
(In reply to comment #30)
> As per Peter's mail earlier c.f. my first comment in this bug report, he is ok
> with us committing this change.  I will do it later unless there are any
> objections.

Well, I can commit, and you can also commit, however I think
anyway commit acl should be opened to Ankur for further maintainership.
Maybe asking pkgdb maintainer (e.g. tibbs) is better?

Comment 32 Rahul Sundaram 2011-02-01 12:52:06 UTC
If pgordon is not maintaining it anymore, the package should be orphaned.  Doesn't require a co-maintainer for a single commit.

Comment 33 Ankur Sinha (FranciscoD) 2011-02-01 13:00:10 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > As per Peter's mail earlier c.f. my first comment in this bug report, he is ok
> > with us committing this change.  I will do it later unless there are any
> > objections.
> 
> Well, I can commit, and you can also commit, however I think
> anyway commit acl should be opened to Ankur for further maintainership.
> Maybe asking pkgdb maintainer (e.g. tibbs) is better?

Hi,

I cannot maintain this package. I already help maintaining rtorrent and transmission which I use primarily. I don't really use deluge. If peter or one of you can commit the changes, it would be sufficient. 

PS: I have withdrawn my request to be made co-maintainer. 

Thanks,
Ankur

Comment 34 Mamoru TASAKA 2011-02-01 13:14:48 UTC
(In reply to comment #33)
> I cannot maintain this package. I already help maintaining rtorrent and
> transmission which I use primarily. I don't really use deluge. 

Umm? If you don't actually use deluge, whom is this "request" for?
(Honestly saying, I don't mind if this package split is not actually
 committed into Fedora git - actually I am satisfied with current
 deluge packaging). If you don't use deluge, I don't this there is
actual "need" for this RFE.

Comment 35 Mamoru TASAKA 2011-02-01 13:23:17 UTC
(In reply to comment #34)
> If you don't use deluge, I don't this there is
> actual "need" for this RFE.

s/I don't this/I don't think/

Comment 36 Ankur Sinha (FranciscoD) 2011-02-01 13:44:41 UTC
http://lists.fedoraproject.org/pipermail/devel/2010-June/137101.html

BTW, I didn't submit it, I only carried out the task :)

Comment 37 Rahul Sundaram 2011-02-01 14:13:25 UTC
This task was done based on the suggestion from Peter Gordon.  I can be a co-maintainer if necessary

Comment 38 Mamoru TASAKA 2011-02-01 15:38:24 UTC
Okay, now I won't oppose to commit this.

Comment 39 Mamoru TASAKA 2011-02-09 10:34:20 UTC
Hello.

Branching F-15 from rawhide will take place "soon". Rahul,
would you import this change into Fedora git tree?

Comment 40 Rahul Sundaram 2011-02-11 02:34:37 UTC
Built for Rawhide and F-15.  Closing.   Thanks to Ankur Sinha for all the changes and Mamoru Tasaka for the detailed reviews.


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