Issue with another downstream over DESTDIR builds
Jon Turney
jon.turney@dronecode.org.uk
Fri Sep 30 12:11:45 GMT 2022
On 29/09/2022 20:15, Brian Inglis wrote:
> Hi folks, [Please Reply All to CC me as ISP blocking Cygwin lists]
>
> I previously submitted a patch upstream to add DESTDIR when creating
> package symlinks so cygport builds work without patches.
>
> Now another downstream is disputing that, requesting the patch be
> reverted, saying that symlink targets are contents and should always be
> from the non-DESTDIR native source as per GNU "rules" in the autobook.
A link to this discussion would be useful.
> We agreed to request other more experienced opinions on this issue from
> our support groups and report back.
>
> I am asking the perhaps more experienced professional maintainers to
> provide their considered opinion on this issue, demonstrated by the
> reversion patch below.
>
>> The link's target must not include $(DESTDIR), otherwise this ends up
>> included in the shipped link. Linking the theoretical target gives the
>> correct result.
>>
>> --- a/Makefile.in
>> +++ b/Makefile.in
>> @@ -115,7 +115,7 @@
>> $(INSTALL_DATA) $(srcdir)/definitions.units
>> $(DESTDIR)@UDAT-DGkERpxY6iylqvY/pMPnfPU/3Eu2kcEP@public.gmane.org
>> -rm -f $(DESTDIR)@UDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org
>> $(INSTALL_DATA) $(srcdir)/currency.units
>> $(DESTDIR)@CDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org
>> - if [ $(DESTDIR)@CDAT@ != $(DESTDIR)@UDAT@ ];then ln -sf
>> $(DESTDIR)@CDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org
>> $(DESTDIR)@UDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org;fi
>> + if [ $(DESTDIR)@CDAT@ != $(DESTDIR)@UDAT@ ];then ln -sf
>> @CDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org
>> $(DESTDIR)@UDAT-kLXayl1e/4yKtURqy47hLg@public.gmane.org;fi
>> $(INSTALL_DATA) $(srcdir)/locale_map.txt
>> $(DESTDIR)@UDAT@locale_map.txt
>> if test $(HAVE_PYTHON) = yes; then \
>> $(INSTALL_PROGRAM) units_cur_inst $(DESTDIR)$(bindir)/`echo
>> units_cur|sed '$(transform)'`;fi
>
This patch looks correct.
Think of it this way: --prefix etc. configures the location of the
installed files, DESTDIR selects a temporary staging directory that the
files are placed into (e.g. before packaging)
So, targets of symlinks which are absolute paths should not contain DESTDIR.
More information about the Cygwin-apps
mailing list