Hello, On 2021-03-30 11:32, Adam Majer wrote:
On Thu, Mar 18, 2021 at 12:12:16AM -0700, L A Walsh wrote:
I noticed in 1 rpm, there was a comment next to an %fdupes line -- which I guess is a macro(?) saying:
# Hardlink duplicate files %fdupes ${RPM_BUILD_ROOT}
Aside, this is also not the correct way to run this macro at all. It's intended only for specific subdirectories, like for example to deduplicate some manpage directory or for header file deduplication.
Never run this with for something like /usr/bin or other executables. You may end up with something you did not expect.
Cf. my rather old comments about "fdupes" in https://build.opensuse.org/package/view_file/Printing/hplip/hplip.spec?expan... that read: --------------------------------------------------------------------------- # Do not run "fdupes buildroot/_datadir/hplip" because # fdupes will link any files with same content there # which can have unexpected side-effects, compare # https://bugzilla.opensuse.org/show_bug.cgi?id=784670 ... # Run fdupes: # The RPM macro fdupes runs /usr/bin/fdupes that links files # with identical content. # Never run fdupes carelessly over the whole buildroot directory # because in older openSUSE and SLE11 versions fdupes # links files with different owner, group, or permissions # see https://bugzilla.novell.com/show_bug.cgi?id=784670 # and even in current openSUSE versions fdupes links across # sub-package boundaries, # compare https://bugzilla.novell.com/show_bug.cgi?id=784869 # so that fdupes can only run for specific directories # where linking files is safe: %fdupes -s %{buildroot}%{_datadir}/hplip/data/images --------------------------------------------------------------------------- The old "bugzilla.novell.com" URLs are now https://bugzilla.opensuse.org/show_bug.cgi?id=784670 https://bugzilla.opensuse.org/show_bug.cgi?id=784869 which are "RESOLVED FIXED" and "RESOLVED WORKSFORME" so nowadays fdupes should behave better by default but I don't know how much better in practice. Kind Regards Johannes Meixner -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5 - 90409 Nuernberg - Germany (HRB 36809, AG Nuernberg) GF: Felix Imendoerffer