Bug 86345 - "We need touch with -h option support" but we don't use $(TOUCH)
Summary: "We need touch with -h option support" but we don't use $(TOUCH)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: Other Solaris
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 17:21 UTC by Richard PALO
Modified: 2015-01-25 17:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard PALO 2014-11-16 17:21:22 UTC
In configure.ac the following:
dnl ===================================================================
dnl We need touch with -h option support.
dnl ===================================================================
AC_PATH_PROG(TOUCH, touch)
test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
touch warn
if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then
    AC_MSG_ERROR([touch version with -h option support is required to build, please install it and make sure it is the one found first in PATH],,)
fi

great, for gnu platforms, but many Unix distros put gnu coreutils in, for example, /usr/gnu/bin and symlink (in this case) 
/usr/bin/gtouch ==> /usr/gnu/bin/touch

The only place this seems to be used at the moment is in solenv/gbuild/Deliver.mk
but here, as in many places (though not all).  So this patch initially created by pkgsrc developer Ryo ONODERA and updated by me seems to allow the special 'touch' ;-).    BTW, up til now, replace '-hr' by simply '-r' has seemed to work.

========================>8==================================================
--- solenv/gbuild/Deliver.mk.orig	2014-04-30 19:49:45.000000000 +0000
+++ solenv/gbuild/Deliver.mk
@@ -51,7 +51,7 @@ endif
 endef
 
 define gb_Deliver__deliver
-$(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) $(if $(gb_Deliver_HARDLINK),ln,cp -P -f) $(1) $(2) && touch -hr $(1) $(2)
+$(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) $(if $(gb_Deliver_HARDLINK),ln,cp -P -f) $(1) $(2) && $(TOUCH) -hr $(1) $(2)
 endef
 
 ifneq ($(strip $(gb_Deliver_GNUCOPY)),)
========================>8==================================================

by the way, it would be nice for us bearded folks who don't habitually put /usr/gnu/bin into our PATH to allow a configure option like for '--with-gnu-cp' or '--with-gnu-patch'... '--with-gnu-touch' seems appropriate *IFF* this single use of 'touch' is really necessary!
Comment 1 Robinson Tryon (qubit) 2014-11-21 22:09:32 UTC
(In reply to Richard PALO from comment #0)
> So this patch initially
> created by pkgsrc developer Ryo ONODERA and updated by me seems to allow the
> special 'touch' ;-).    BTW, up til now, replace '-hr' by simply '-r' has
> seemed to work.

Hi Richard,
I had a quick chat with our Release Engineer, and he suggested that you submit another patch to gerrit.

I'm going to mark this as an enhancement and set it to NEW. Please resolve/close it when the underlying issue you raised has been addressed.

Thanks,
--R
Comment 2 Richard PALO 2014-12-26 16:53:55 UTC
this apparently slipped by without notice, sorry:
https://gerrit.libreoffice.org/13664
Comment 3 Richard PALO 2015-01-25 17:18:09 UTC
This is now in master, so it can probably be closed:

commit fc4a339d83652613dbbc4c2cd7b206d6b1115a71
Author: Richard PALO <richard@NetBSD.org>
Date:   Fri Dec 26 17:47:20 2014 +0100

    use special $(TOUCH) for touch -hr
    
    Change-Id: Ifb95dc6bb4bc70f7c4fcd765d96b9aeb3cbdeb38
    Reviewed-on: https://gerrit.libreoffice.org/13664
    Reviewed-by: Caolán McNamara <caolanm@redhat.com>
    Tested-by: Caolán McNamara <caolanm@redhat.com>


But perhaps a cherry-pick to the 4-4 series is possible?