Bug 617039 - Add a %fdupes rpm macro to the fdupes package
Summary: Add a %fdupes rpm macro to the fdupes package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fdupes
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Shaw
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-22 02:54 UTC by Stephan Kleine
Modified: 2012-05-27 07:20 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-26 07:52:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stephan Kleine 2010-07-22 02:54:09 UTC
Could you please be so kind to add some %fdupes macro to the fdupes package that allows me to replace duplicate files during packaging with links?

Point being it does no harm and surely wont matter that much for e.g. html doc files but it does matter for e.g. big (>100mb) game data files and it is easy to use - e.g. "%fdupes %{buildroot}%{_datadir"}.

The basic idea is to remove automatically any duplicates when encountered and provide smaller packages that make it easier for mirrors (hosting) and users (downloading).

On suse it is defined like this:

$ cat /etc/rpm/macros.fdupes

%fdupes(s) \
 _target=""; \
 _symlinks=0; \
 %{-s:_symlinks=1;} \
 fdupes -q -n -r %1 | \
  while read _file; do \
    if test -z "$_target" ; then \
      _target="$_file"; \
    else \
      if test -z "$_file" ; then \
        _target=""; \
        continue ; \
      fi ; \
      if test "$_symlinks" = 1; then \
        ln -sf "${_target#%{buildroot}}" "$_file"; \
      else \
        ln -f "$_target" "$_file"; \
      fi ;\
    fi ; \
 done \
%{nil}

Thanks a lot.

Comment 1 Bug Zapper 2010-07-30 12:44:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Richard Shaw 2011-07-11 18:45:42 UTC
Ping... This is coming up on a birthday. Any chance it will happen?

Comment 3 Richard Shaw 2011-07-25 15:25:15 UTC
Ping...

Comment 4 msocorcim 2012-03-03 19:16:09 UTC
(In reply to comment #0)
> Could you please be so kind to add some %fdupes macro to the fdupes package
> that allows me to replace duplicate files during packaging with links?
> 
> Point being it does no harm and surely wont matter that much for e.g. html doc
> files but it does matter for e.g. big (>100mb) game data files and it is easy
> to use - e.g. "%fdupes %{buildroot}%{_datadir"}.
> 
> The basic idea is to remove automatically any duplicates when encountered and
> provide smaller packages that make it easier for mirrors (hosting) and users
> (downloading).
> 
> On suse it is defined like this:
> 
> $ cat /etc/rpm/macros.fdupes
> 
> %fdupes(s) \
>  _target=""; \
>  _symlinks=0; \
>  %{-s:_symlinks=1;} \
>  fdupes -q -n -r %1 | \
>   while read _file; do \
>     if test -z "$_target" ; then \
>       _target="$_file"; \
>     else \
>       if test -z "$_file" ; then \
>         _target=""; \
>         continue ; \
>       fi ; \
>       if test "$_symlinks" = 1; then \
>         ln -sf "${_target#%{buildroot}}" "$_file"; \
>       else \
>         ln -f "$_target" "$_file"; \
>       fi ;\
>     fi ; \
>  done \
> %{nil}
> 
> Thanks a lot.

I'd also like to see this file added to the fedora fdupes package.

Thanks!

Comment 5 Nelson Marques 2012-05-15 20:02:15 UTC
I would support a %fdupes macro, it's quite handy for a lot of situations:

  * icon themes;
  * games;
  * etc...

Furthermore, I believe it does improve the overall package quality and the usage of macros for 'common' tasks does make packaging more friendly. Considering that a lot of people would like to see more packagers, lowering the complexity of scriptlets would probably. Reading specs with macros also makes it more easy...

Please +1 for integration on this.

Comment 6 Fedora Update System 2012-05-16 13:41:39 UTC
fdupes-1.50-0.5.PR2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/fdupes-1.50-0.5.PR2.fc15

Comment 7 Fedora Update System 2012-05-16 13:42:11 UTC
fdupes-1.50-0.5.PR2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/fdupes-1.50-0.5.PR2.fc16

Comment 8 Fedora Update System 2012-05-16 13:42:19 UTC
fdupes-1.50-0.5.PR2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fdupes-1.50-0.5.PR2.fc17

Comment 9 Fedora Update System 2012-05-18 10:33:24 UTC
Package fdupes-1.50-0.5.PR2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fdupes-1.50-0.5.PR2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8046/fdupes-1.50-0.5.PR2.fc16
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-05-26 07:52:54 UTC
fdupes-1.50-0.5.PR2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2012-05-27 01:53:32 UTC
fdupes-1.50-0.5.PR2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-05-27 07:20:40 UTC
fdupes-1.50-0.5.PR2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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