Subject: Re: bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7

From: Stephen Hassard <[email-masked]>
Date: Wed, 9 Jul 2014 06:56:27 -0700

Here's another update to the patch that more closely follows the behaviour
of the original Makefile and now works with a prefix that includes a space.

This is tested and works with gnu findutils 4.5.11.

On Tue, Jul 8, 2014 at 9:16 PM, Stephen Hassard <[email-masked]> wrote:

> For fun I built a copy of findutils-4.5.12 from alpha.gnu.org and found
> that it's suffering the same regression as CentOS's bundled find.
>
>
> On Tue, Jul 8, 2014 at 9:07 PM, Stephen Hassard <[email-masked]> wrote:
>
>> It's definitely a regression in CentOS7 vs 6.5. I've built a new 6.5 VM
>> and have confirmed that it compresses the .el files without problem.
>>
>> It seems to be a regression in the bundled findutils. I've pulled in the
>> find binary from CentOS 6.5 onto my CentOS 7 VM and the 'make install'
>> process completed without problems with the old find.
>>
>> The version are:
>>
>> CentOS 7:
>> findutils-4.5.11-3
>>
>> CentOS 6.5:
>> findutils-4.4.2-6
>>
>>
>>
>>
>> On Tue, Jul 8, 2014 at 6:10 PM, Glenn Morris <[email-masked]> wrote:
>>
>>> Stephen Hassard wrote:
>>>
>>> > Here's the relevant output from the 'make install' on CentOS 7:
>>> >
>>> > ----
>>> > [ -z "/usr/bin/gzip" ] || { \
>>> >   echo "Compressing *.el ..." && \
>>> >   cd "/home/shassard/opt/emacs/share/emacs/24.3.92/lisp" && \
>>> >   find . -name '*.elc' -exec /bin/sh -c \
>>> >     '/usr/bin/gzip -9n `expr "$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
>>> > }
>>> > Compressing *.el ...
>>> > find: './progmodes/make-mode.el': No such file or directory
>>>
>>> Do you know why this happens?
>>> What has changed since RHEL6, where it works fine?
>>>
>>> > I've attached a revised patch that adds the -9n flag to the gzip
>>> command
>>> > and switch back to -exec for find.
>>>
>>> This fails if DESTDIR contains spaces.
>>>
>>
>>
>
From e5abf3fc52980bc54984b8e228d41c7177c6e3bb Mon Sep 17 00:00:00 2001
From: Stephen Hassard <[email-masked]>
Date: Wed, 9 Jul 2014 06:54:46 -0700
Subject: [PATCH] Fix regression in findutils-4.5

---
 Makefile.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 76a0304..97002e4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -615,8 +615,9 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
 	[ -z "${GZIP_PROG}" ] || { \
 	  echo "Compressing *.el ..." && \
 	  cd "$(DESTDIR)${lispdir}" && \
-	  find . -name '*.elc' -exec $(SHELL) -c \
-	    '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
+	  find . -name '*.el' \
+	    -exec ${SHELL} -c 'test -f {}c' \; \
+	    -exec ${GZIP_PROG} -9n {} \; ; \
 	}
 	-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
 
-- 
1.8.3.1