Bug 617039 - Add a %fdupes rpm macro to the fdupes package
Add a %fdupes rpm macro to the fdupes package
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: fdupes (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Shaw
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 22:54 EDT by Stephan Kleine
Modified: 2012-05-27 03:20 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-26 03:52:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephan Kleine 2010-07-21 22:54:09 EDT
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 08:44:06 EDT
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 14:45:42 EDT
Ping... This is coming up on a birthday. Any chance it will happen?
Comment 3 Richard Shaw 2011-07-25 11:25:15 EDT
Ping...
Comment 4 msocorcim 2012-03-03 14:16:09 EST
(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 16:02:15 EDT
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 09:41:39 EDT
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 09:42:11 EDT
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 09:42:19 EDT
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 06:33:24 EDT
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 03:52:54 EDT
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-26 21:53:32 EDT
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 03:20:40 EDT
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.