unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
@ 2014-07-08  5:05 Stephen Hassard
  2014-07-08  6:04 ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hassard @ 2014-07-08  5:05 UTC (permalink / raw)
  To: 17971


[-- Attachment #1.1: Type: text/plain, Size: 3930 bytes --]

Hi there,

The current alpha builds are failing during 'make install' while
performing the .elc compression on CentOS 7.

I've cleaned up the find command in the Makefile and have a patch that
fixes the problem while retaining function on Ubuntu/Debian. Please find
it attached.

Thanks,
Steve


In GNU Emacs 24.3.92.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-07-07 on gorgon
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04 LTS

Configured using:
 `configure --prefix=/home/shassard/opt/emacs'

Important settings:
  value of $LANG: en_CA.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e <backspace> <backspace> e m <tab> a c s - r
e <tab> p <tab> <backspace> <backspace> <backspace>
b u <help-echo> <tab> g <tab> C-g C-g <help-echo> M-x
r p e o <tab> <backspace> <backspace> <backspace> e
p o <tab> r t <tab> <return>

Recent messages:
Wrote /home/shassard/.emacs.d/.cask/
24.3.92.2/bootstrap/package-build-20140706.955/package-build-pkg.elc
Checking /home/shassard/.emacs.d/.cask/
24.3.92.2/bootstrap/package-build-20140706.955...
Compiling /home/shassard/.emacs.d/.cask/
24.3.92.2/bootstrap/package-build-20140706.955/package-build.el...done
Wrote /home/shassard/.emacs.d/.cask/
24.3.92.2/bootstrap/package-build-20140706.955/package-build.elc
Checking /home/shassard/.emacs.d/.cask/
24.3.92.2/bootstrap/package-build-20140706.955...
Done (Total of 2 files compiled, 1 skipped)
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Quit [2 times]
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail help-mode cask cask-bootstrap
package-build shut-up epl git commander easy-mmode edmacro kmacro json
rx cl-macs f cl-loaddefs cl-lib dash s gv warnings compile comint
ansi-color ring autoload lisp-mnt finder-inf mm-archive message
format-spec rfc822 mml easymenu mml-sec mailabbrev gmm-utils mailheader
mm-decode mm-bodies mm-encode mail-utils network-stream starttls
url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw
url-cache url-auth url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars
package time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 124994 39416)
 (symbols 48 25119 0)
 (miscs 40 97 226)
 (strings 32 29278 12603)
 (string-bytes 1 760605)
 (vectors 16 21219)
 (vector-slots 8 1203781 180334)
 (floats 8 80 348)
 (intervals 56 510 0)
 (buffers 960 16)
 (heap 1024 50698 1163))

[-- Attachment #1.2: Type: text/html, Size: 5741 bytes --]

[-- Attachment #2: 0001-Fix-.el-compression-on-CentOS7.patch --]
[-- Type: text/x-patch, Size: 948 bytes --]

From a7a91c7be696d52ad51b44a3b74d010f12cc093c Mon Sep 17 00:00:00 2001
From: Stephen Hassard <steve@hassard.net>
Date: Mon, 7 Jul 2014 21:55:27 -0700
Subject: [PATCH] Fix .el compression on CentOS7

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

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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-08  5:05 bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7 Stephen Hassard
@ 2014-07-08  6:04 ` Glenn Morris
  2014-07-08 15:50   ` Stephen Hassard
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2014-07-08  6:04 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: 17971

Stephen Hassard wrote:

> The current alpha builds are failing during 'make install' while
> performing the .elc compression on CentOS 7.

Please tell us how it fails.

> I've cleaned up the find command in the Makefile and have a patch that
> fixes the problem while retaining function on Ubuntu/Debian. Please find
> it attached.

Sadly I don't think -execdir is portable.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-08  6:04 ` Glenn Morris
@ 2014-07-08 15:50   ` Stephen Hassard
  2014-07-09  1:10     ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hassard @ 2014-07-08 15:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17971


[-- Attachment #1.1: Type: text/plain, Size: 1701 bytes --]

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
find: ‘./progmodes/m4-mode.el’: No such file or directory
find: ‘./progmodes/cc-fonts.el’: No such file or directory
find: ‘./progmodes/cc-engine.el’: No such file or directory
find: ‘./progmodes/idlw-complete-structtag.el’: No such file or directory
find: ‘./progmodes/meta-mode.el’: No such file or directory
find: ‘./progmodes/bat-mode.el’: No such file or directory
find: ‘./progmodes/gud.el’: No such file or directory
find: ‘./progmodes/simula.el’: No such file or directory
find: ‘./progmodes/autoconf.el’: No such file or directory
find: ‘./progmodes/prog-mode.el’: No such file or directory
----

make immediately fails after this point.

I've attached a revised patch that adds the -9n flag to the gzip command
and switch back to -exec for find.


On Mon, Jul 7, 2014 at 11:04 PM, Glenn Morris <rgm@gnu.org> wrote:

> Stephen Hassard wrote:
>
> > The current alpha builds are failing during 'make install' while
> > performing the .elc compression on CentOS 7.
>
> Please tell us how it fails.
>
> > I've cleaned up the find command in the Makefile and have a patch that
> > fixes the problem while retaining function on Ubuntu/Debian. Please find
> > it attached.
>
> Sadly I don't think -execdir is portable.
>

[-- Attachment #1.2: Type: text/html, Size: 2248 bytes --]

[-- Attachment #2: 0001-Fix-.el-compression-on-CentOS-7.patch --]
[-- Type: text/x-diff, Size: 949 bytes --]

From 50c0162ec4fd22a757df69fabe8202685093ca74 Mon Sep 17 00:00:00 2001
From: Stephen Hassard <steve@hassard.net>
Date: Tue, 8 Jul 2014 08:46:54 -0700
Subject: [PATCH] Fix .el compression on CentOS 7

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

diff --git a/Makefile.in b/Makefile.in
index 76a0304..f4fd4aa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -614,9 +614,8 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
 	  ${write_subdir} || true
 	[ -z "${GZIP_PROG}" ] || { \
 	  echo "Compressing *.el ..." && \
-	  cd "$(DESTDIR)${lispdir}" && \
-	  find . -name '*.elc' -exec $(SHELL) -c \
-	    '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
+          find "$(DESTDIR)${lispdir}" -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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-08 15:50   ` Stephen Hassard
@ 2014-07-09  1:10     ` Glenn Morris
  2014-07-09  4:07       ` Stephen Hassard
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2014-07-09  1:10 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: 17971

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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09  1:10     ` Glenn Morris
@ 2014-07-09  4:07       ` Stephen Hassard
  2014-07-09  4:16         ` Stephen Hassard
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hassard @ 2014-07-09  4:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17971

[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]

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 <rgm@gnu.org> 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.
>

[-- Attachment #2: Type: text/html, Size: 1912 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09  4:07       ` Stephen Hassard
@ 2014-07-09  4:16         ` Stephen Hassard
  2014-07-09 13:56           ` Stephen Hassard
  2014-07-09 16:34           ` Glenn Morris
  0 siblings, 2 replies; 15+ messages in thread
From: Stephen Hassard @ 2014-07-09  4:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17971

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

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 <steve@hassard.net> 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 <rgm@gnu.org> 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.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2508 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09  4:16         ` Stephen Hassard
@ 2014-07-09 13:56           ` Stephen Hassard
  2014-07-09 16:34           ` Glenn Morris
  1 sibling, 0 replies; 15+ messages in thread
From: Stephen Hassard @ 2014-07-09 13:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17971


[-- Attachment #1.1: Type: text/plain, Size: 1814 bytes --]

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 <steve@hassard.net> 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 <steve@hassard.net> 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 <rgm@gnu.org> 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.
>>>
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 3158 bytes --]

[-- Attachment #2: 0001-Fix-regression-in-findutils-4.5.patch --]
[-- Type: text/x-diff, Size: 894 bytes --]

From e5abf3fc52980bc54984b8e228d41c7177c6e3bb Mon Sep 17 00:00:00 2001
From: Stephen Hassard <steve@hassard.net>
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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09  4:16         ` Stephen Hassard
  2014-07-09 13:56           ` Stephen Hassard
@ 2014-07-09 16:34           ` Glenn Morris
  2014-07-09 17:29             ` Stephen Hassard
  1 sibling, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2014-07-09 16:34 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: 17971

Stephen Hassard 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.

Thanks for investigating.
Do you understand why new find is failing?
Is it a bug in find, or ...?

After it says:

> find: './progmodes/make-mode.el': No such file or directory

does make-mode.el.gz exist (meaning it somehow got exec'd twice, which
seems like a find bug); or was find somehow in a different directory
(which also would seem like a find bug)?

Since today's RHEL is yesterday's Fedora, I'm a bit surprised this
hasn't been reported before. I looked in RH bugzilla but did not see
anything relevant.

BTW, I'm surprised to see that RHEL7 (long-term enterprise release) has
ended up with a findutils version from the 4.5 series, which looks like
a development branch. Even Debian unstable still has 4.4*.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09 16:34           ` Glenn Morris
@ 2014-07-09 17:29             ` Stephen Hassard
  2014-07-10 16:06               ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hassard @ 2014-07-09 17:29 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17971

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

Strangely it looks like find 4.5 builds have been in Fedora since at least
FC18.

Testing the behaviour, it appears that the .el file is successfully
compressed to make-mode.el.gz, but find errors out. It seems like it might
be doing a stat on the .el file after gzip does it's work.

It appears that Emacs 24.3 has a different find command for the compression
which doesn't seem to exacerbate the regression in find 4.5.


On Wed, Jul 9, 2014 at 9:34 AM, Glenn Morris <rgm@gnu.org> wrote:

> Stephen Hassard 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.
>
> Thanks for investigating.
> Do you understand why new find is failing?
> Is it a bug in find, or ...?
>
> After it says:
>
> > find: './progmodes/make-mode.el': No such file or directory
>
> does make-mode.el.gz exist (meaning it somehow got exec'd twice, which
> seems like a find bug); or was find somehow in a different directory
> (which also would seem like a find bug)?
>
> Since today's RHEL is yesterday's Fedora, I'm a bit surprised this
> hasn't been reported before. I looked in RH bugzilla but did not see
> anything relevant.
>
> BTW, I'm surprised to see that RHEL7 (long-term enterprise release) has
> ended up with a findutils version from the 4.5 series, which looks like
> a development branch. Even Debian unstable still has 4.4*.
>

[-- Attachment #2: Type: text/html, Size: 1976 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-09 17:29             ` Stephen Hassard
@ 2014-07-10 16:06               ` Glenn Morris
  2014-07-10 17:14                 ` Paul Eggert
  2014-07-11  6:37                 ` Paul Eggert
  0 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2014-07-10 16:06 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: Paul Eggert, 17971


My inclination is to revert install-arch-indep to how it used to be
before 2014-02-13. This has the virtue of having had more testing. It
was changed to avoid some unexplained HP make problem, which frankly I
don't think matters much (eg we require GNU make anyway in Emacs trunk
now).

Does this work for you:

*** Makefile.in	2014-02-14 08:05:18 +0000
--- Makefile.in	2014-07-10 15:59:29 +0000
***************
*** 614,622 ****
  	  ${write_subdir} || true
  	[ -z "${GZIP_PROG}" ] || { \
  	  echo "Compressing *.el ..." && \
! 	  cd "$(DESTDIR)${lispdir}" && \
! 	  find . -name '*.elc' -exec $(SHELL) -c \
! 	    '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
  	}
  	-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
  
--- 614,624 ----
  	  ${write_subdir} || true
  	[ -z "${GZIP_PROG}" ] || { \
  	  echo "Compressing *.el ..." && \
! 	  cd "$(DESTDIR)${lispdir}" || exit 1 ; \
! 	  for f in `find . -name "*.elc" -print`; do \
! 	    f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \
! 	    ${GZIP_PROG} -9n "$$f_el" ; \
! 	  done ; \
  	}
  	-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
  






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-10 16:06               ` Glenn Morris
@ 2014-07-10 17:14                 ` Paul Eggert
  2014-07-10 18:06                   ` Glenn Morris
  2014-07-11  6:37                 ` Paul Eggert
  1 sibling, 1 reply; 15+ messages in thread
From: Paul Eggert @ 2014-07-10 17:14 UTC (permalink / raw)
  To: Glenn Morris, Stephen Hassard; +Cc: 17971

Glenn Morris wrote:

> My inclination is to revert install-arch-indep to how it used to be
> before 2014-02-13.

The patch you proposed is a simplification of the pre-2014-02-13 code, a 
simplification that should also avoid the HP-UX problm.  (HP-UX make is 
still relevant for the emacs-24 branch, I guess.)

> ! 	  cd "$(DESTDIR)${lispdir}" || exit 1 ; \
> ! 	  for f in `find . -name "*.elc" -print`; do \
> ! 	    f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \
> ! 	    ${GZIP_PROG} -9n "$$f_el" ; \
> ! 	  done ; \

This has the problem that 'make' can succeed even if a 'gzip' fails 
(e.g., due to being out of disk space).  Also, it can be simplified a 
bit.  How about something like this instead?

	  cd "$(DESTDIR)${lispdir}" && \
  	  for f in `find . -name '*.elc' -print | sed 's/.elc$$/.el/'`; do \
	    ${GZIP_PROG} -9n "$$f" || exit; \
	  done; \





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-10 17:14                 ` Paul Eggert
@ 2014-07-10 18:06                   ` Glenn Morris
  2014-07-10 18:49                     ` Paul Eggert
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2014-07-10 18:06 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Stephen Hassard, 17971

Paul Eggert wrote:

> (HP-UX make is still relevant for the emacs-24 branch, I guess.)

In theory yes; in practice I doubt it, since we seem to have
accidentally broken non-GNU makes so many times, I guess everyone just
uses GNU make anyway (like the person who reported the HP make issue did
before even reporting it).

> This has the problem that 'make' can succeed even if a 'gzip' fails
> (e.g., due to being out of disk space).

We survived this far without checking for that.
Some gzips return non-zero if compression did not reduce the file size,
which should not happen with any of the .el files, but you never know.
So perhaps this is something to save for trunk.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-10 18:06                   ` Glenn Morris
@ 2014-07-10 18:49                     ` Paul Eggert
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Eggert @ 2014-07-10 18:49 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Stephen Hassard, 17971

Glenn Morris wrote:
> So perhaps this is something to save for trunk.

Sure, that'd be fine.

By the way, I still test emacs-24 with non-gnu 'make' on Solaris, where 
typically 'make' gets you Solaris 'make' and 'gmake' gets you GNU 
'make', and I'm just in the habit of typing 'make' (a habit I suppose I 
must learn to get out of....).





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
  2014-07-10 16:06               ` Glenn Morris
  2014-07-10 17:14                 ` Paul Eggert
@ 2014-07-11  6:37                 ` Paul Eggert
       [not found]                   ` <CAAicSydhXppOY=uqe90yZNDMszY5VnJb632FZWH6NzJe+bH9Zg@mail.gmail.com>
  1 sibling, 1 reply; 15+ messages in thread
From: Paul Eggert @ 2014-07-11  6:37 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: 17971

Strange -- I cannot reproduce the problem with findutils 4.5.12 alpha, 
on either Fedora 20 or on Ubuntu 14.04 (both x86-64).

Stephen, can you do an 'strace' of the failing 'find' invocation? 
Something like this, where the files are not yet compressed:

cd "/home/shassard/opt/emacs/share/emacs/24.3.92/lisp"
strace -f -o /tmp/tr find . -name '*.elc' -exec /bin/sh -c \
     '/usr/bin/gzip -9n `expr "$1" : "\\(.*\\)c"`' dummy '{}' ';'

(/tmp/tr will be fairly large, alas) and look in /tmp/tr just before 
'find' issues its first complaint.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7
       [not found]                   ` <CAAicSydhXppOY=uqe90yZNDMszY5VnJb632FZWH6NzJe+bH9Zg@mail.gmail.com>
@ 2014-07-11 17:36                     ` Paul Eggert
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Eggert @ 2014-07-11 17:36 UTC (permalink / raw)
  To: Stephen Hassard; +Cc: 17971-done

On 07/11/2014 07:52 AM, Stephen Hassard wrote:
> I've attached the trace.

Thanks, I now see the problem; it's a readdir race, where 'find' uses 
readdir to get a batch of directory entries, then execs 'gzip' which 
removes one of them, and then 'find' later complains when it gets around 
to processing the now-removed entry.  'find' traditionally ignored that 
sort of thing; I don't know why GNU 'find' changed this (for some reason 
it's fstatatting the file twice? why?).  I still cannot reproduce the 
problem, so I expect it's OS- or filesystem-dependent.

Anyway, Glenn's patch should avoid the problem, so I installed it (with 
a few minor simplifications) as emacs-24 bzr 117370, and am marking this 
as done.  This version of the patch does not look for gzip failures; 
that can be done on the trunk later.





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-07-11 17:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08  5:05 bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7 Stephen Hassard
2014-07-08  6:04 ` Glenn Morris
2014-07-08 15:50   ` Stephen Hassard
2014-07-09  1:10     ` Glenn Morris
2014-07-09  4:07       ` Stephen Hassard
2014-07-09  4:16         ` Stephen Hassard
2014-07-09 13:56           ` Stephen Hassard
2014-07-09 16:34           ` Glenn Morris
2014-07-09 17:29             ` Stephen Hassard
2014-07-10 16:06               ` Glenn Morris
2014-07-10 17:14                 ` Paul Eggert
2014-07-10 18:06                   ` Glenn Morris
2014-07-10 18:49                     ` Paul Eggert
2014-07-11  6:37                 ` Paul Eggert
     [not found]                   ` <CAAicSydhXppOY=uqe90yZNDMszY5VnJb632FZWH6NzJe+bH9Zg@mail.gmail.com>
2014-07-11 17:36                     ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).