* bug#15297: 24.3.50; Compression of installed .el files should be configurable
@ 2013-09-07 6:57 Ulrich Müller
2013-09-07 7:43 ` Eli Zaretskii
2013-09-07 17:28 ` Glenn Morris
0 siblings, 2 replies; 10+ messages in thread
From: Ulrich Müller @ 2013-09-07 6:57 UTC (permalink / raw)
To: 15297
Tags: patch
Currently "make install" compresses the installed .el files depending
on the availability of the gzip program. In Gentoo we make this
compression configurable; with modern disk sizes the additional
disk footprint of 34 MiB is normally not an issue.
Since a long time Gentoo uses the following nasty hack for this:
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r2.ebuild?revision=1.15&view=markup#l98>
However, it would be much cleaner if the upstream build system
would allow to disable compression. The patch below adds a
--without-compress-lisp option for this. I've tested it on an
x86_64-pc-linux-gnu system and it works fine for me.
--- emacs-orig/ChangeLog
+++ emacs/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-06 Ulrich Müller <ulm@gentoo.org>
+
+ * configure.ac (--without-compress-lisp): New option, suppresses
+ compression of installed .el files.
+ (GZIP_LISP): New variable.
+ * Makefile.in (GZIP_LISP): New, set by configure.
+ (install-arch-indep): Test for GZIP_LISP when compressing .el files.
+
2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
Make --without-x compatible with --enable-gcc-warnings.
--- emacs-orig/configure.ac
+++ emacs/configure.ac
@@ -264,6 +264,14 @@
## Makefile.in needs the cache file name.
AC_SUBST(cache_file)
+OPTION_DEFAULT_ON([compress-lisp],[don't compress the installed .el files])
+if test $with_compress_lisp = yes; then
+ GZIP_LISP=yes
+else
+ GZIP_LISP=
+fi
+AC_SUBST(GZIP_LISP)
+
## This is an option because I do not know if all info/man support
## compressed files, nor how to test if they do so.
OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
--- emacs-orig/Makefile.in
+++ emacs/Makefile.in
@@ -257,8 +257,10 @@
# Create a link to a file in the same directory as the target.
LN_S_FILEONLY = @LN_S_FILEONLY@
-# We use gzip to compress installed .el files.
+# We use gzip to compress some installed files.
GZIP_PROG = @GZIP_PROG@
+# If non-nil, compress the installed .el files.
+GZIP_LISP = @GZIP_LISP@
# If non-nil, gzip the installed Info and man pages.
GZIP_INFO = @GZIP_INFO@
@@ -613,7 +615,7 @@
${write_subdir}
subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \
${write_subdir} || true
- [ -z "${GZIP_PROG}" ] || \
+ if [ -n "${GZIP_LISP}" ] && [ -n "${GZIP_PROG}" ]; then \
( echo "Compressing *.el ..." ; \
unset CDPATH; \
thisdir=`/bin/pwd`; \
@@ -623,7 +625,8 @@
for f in `find . -name "*.elc" -print`; do \
${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
done ; \
- done )
+ done ) ; \
+ fi
-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
## The above chmods are needed because "umask 022; tar ..." is not
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 6:57 bug#15297: 24.3.50; Compression of installed .el files should be configurable Ulrich Müller
@ 2013-09-07 7:43 ` Eli Zaretskii
2013-09-07 8:35 ` Ulrich Müller
2013-09-08 23:52 ` Glenn Morris
2013-09-07 17:28 ` Glenn Morris
1 sibling, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2013-09-07 7:43 UTC (permalink / raw)
To: Ulrich Müller; +Cc: 15297
> Date: Sat, 7 Sep 2013 08:57:27 +0200
> From: Ulrich Müller <ulm@gentoo.org>
>
> Currently "make install" compresses the installed .el files depending
> on the availability of the gzip program. In Gentoo we make this
> compression configurable; with modern disk sizes the additional
> disk footprint of 34 MiB is normally not an issue.
>
> Since a long time Gentoo uses the following nasty hack for this:
> <http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r2.ebuild?revision=1.15&view=markup#l98>
>
> However, it would be much cleaner if the upstream build system
> would allow to disable compression.
What's wrong with
GZIP_PROG='' make install ...
? This way, you don't need to decide up front whether you will or
will not want to compress, you decide at "make install" time.
If you want to disable compression of Lisp files, but leave alone the
compression of Info files, then I think it is much better to introduce
GZIP_LISP in the top-level Makefile.in without adding anything to the
configure script. Again, the advantage is that no decision need be
made at configure time.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 7:43 ` Eli Zaretskii
@ 2013-09-07 8:35 ` Ulrich Müller
2013-09-07 8:50 ` Eli Zaretskii
2013-09-08 23:52 ` Glenn Morris
1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Müller @ 2013-09-07 8:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 15297
>>>>> On Sat, 07 Sep 2013, Eli Zaretskii wrote:
> What's wrong with
> GZIP_PROG='' make install ...
> ?
That it doesn't work. ;-) Assignment in the Makefile overrides the
environment. ("make GZIP_PROG='' install" might work, though.)
> This way, you don't need to decide up front whether you will or will
> not want to compress, you decide at "make install" time.
I don't understand what would be the advantage of delaying the
decision. What additional information does the user have at install
time that he didn't have at configure time, and that would therefore
assist him with the decision? configure has the additional advantage
that things are remembered in the config.status file and in Emacs'
system-configuration-options variable, so you can recreate an
identical configuration from that.
Also, "configure --help" lists what options are available. But how
would the user discover that there is a GZIP_PROG variable? By reading
the Makefile? GZIP_PROG is at around line 260, not easy to find.
> If you want to disable compression of Lisp files, but leave alone the
> compression of Info files, then I think it is much better to introduce
> GZIP_LISP in the top-level Makefile.in without adding anything to the
> configure script. Again, the advantage is that no decision need be
> made at configure time.
Having a configure option wouldn't prevent that. You can always
override the configure setting by passing a different setting of the
variable to "make install".
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 8:35 ` Ulrich Müller
@ 2013-09-07 8:50 ` Eli Zaretskii
2013-09-07 9:50 ` Ulrich Müller
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-09-07 8:50 UTC (permalink / raw)
To: Ulrich Müller; +Cc: 15297
> Date: Sat, 7 Sep 2013 10:35:59 +0200
> Cc: 15297@debbugs.gnu.org
> From: Ulrich Müller <ulm@gentoo.org>
>
> I don't understand what would be the advantage of delaying the
> decision.
I see at least 2:
1) The default is always the same, no matter how the package was
configured. IOW, no need to remember or even care about the
options passed to the configure script, in order to know what will
happen by default with compression.
2) Not introducing yet another obscure option to configure, which
already has too many of them.
> What additional information does the user have at install
> time that he didn't have at configure time, and that would therefore
> assist him with the decision?
Perhaps you never produced more than one installation from the same
source tree. I do it all the time: sometimes I install on the same
machine, sometimes for copying the installation to another. The
end-user system frequently needs different options, because the needs
of the end users are different.
> configure has the additional advantage
> that things are remembered in the config.status file and in Emacs'
> system-configuration-options variable, so you can recreate an
> identical configuration from that.
What do you mean by "recreate an identical configuration"?
> Also, "configure --help" lists what options are available.
Yes, all 75 of them.
> But how would the user discover that there is a GZIP_PROG variable?
> By reading the Makefile? GZIP_PROG is at around line 260, not easy
> to find.
Those few that care will find it out once, and then remember it, like
they remember this new option to configure.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 8:50 ` Eli Zaretskii
@ 2013-09-07 9:50 ` Ulrich Müller
2013-09-07 10:04 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Müller @ 2013-09-07 9:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 15297
>>>>> On Sat, 07 Sep 2013, Eli Zaretskii wrote:
> 2) Not introducing yet another obscure option to configure, which
> already has too many of them.
Too many? Emacs is a complex program, so of course it has a number of
configure options. They all come with a default, so the user only must
specify them if he wants something that differs from it. Isn't it one
of the principles of GNU that "a user who needs changes in the system
will always be free to make them himself"?
> Perhaps you never produced more than one installation from the same
> source tree. I do it all the time: sometimes I install on the same
> machine, sometimes for copying the installation to another. The
> end-user system frequently needs different options, because the
> needs of the end users are different.
Really, there's no need to tell a distro maintainer about different
needs of users. ;-)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 9:50 ` Ulrich Müller
@ 2013-09-07 10:04 ` Eli Zaretskii
2013-09-07 10:46 ` Ulrich Müller
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-09-07 10:04 UTC (permalink / raw)
To: Ulrich Müller; +Cc: 15297
> Date: Sat, 7 Sep 2013 11:50:30 +0200
> Cc: 15297@debbugs.gnu.org
> From: Ulrich Müller <ulm@gentoo.org>
>
> > Perhaps you never produced more than one installation from the same
> > source tree. I do it all the time: sometimes I install on the same
> > machine, sometimes for copying the installation to another. The
> > end-user system frequently needs different options, because the
> > needs of the end users are different.
>
> Really, there's no need to tell a distro maintainer about different
> needs of users. ;-)
Sorry. But then I don't understand how come you don't realize the
advantages of a single build tree that can be installed in umpteen
different ways.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 10:04 ` Eli Zaretskii
@ 2013-09-07 10:46 ` Ulrich Müller
2013-09-07 12:27 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Müller @ 2013-09-07 10:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 15297
>>>>> On Sat, 07 Sep 2013, Eli Zaretskii wrote:
> Sorry. But then I don't understand how come you don't realize the
> advantages of a single build tree that can be installed in umpteen
> different ways.
As I said before, adding a configure option in addition wouldn't
prevent this.
But I think that I've put my arguments forward. So either accept my
patch, or close this bug as invalid if you don't like it. In the
latter case, you should presumably remove the --without-compress-info
option, for consistency.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 7:43 ` Eli Zaretskii
2013-09-07 8:35 ` Ulrich Müller
@ 2013-09-08 23:52 ` Glenn Morris
1 sibling, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2013-09-08 23:52 UTC (permalink / raw)
To: 15297
I simply renamed and generalized --without-compress-info (which exists,
BTW, because "I do not know if all info/man support compressed files,
nor how to test if they do so") to --without-compress-install.
Anyone who wants some things compressed during install and some things
not is on their own.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
2013-09-07 6:57 bug#15297: 24.3.50; Compression of installed .el files should be configurable Ulrich Müller
2013-09-07 7:43 ` Eli Zaretskii
@ 2013-09-07 17:28 ` Glenn Morris
1 sibling, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2013-09-07 17:28 UTC (permalink / raw)
To: Ulrich Müller; +Cc: 15297
Previously discussed
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9789
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-09-08 23:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-07 6:57 bug#15297: 24.3.50; Compression of installed .el files should be configurable Ulrich Müller
2013-09-07 7:43 ` Eli Zaretskii
2013-09-07 8:35 ` Ulrich Müller
2013-09-07 8:50 ` Eli Zaretskii
2013-09-07 9:50 ` Ulrich Müller
2013-09-07 10:04 ` Eli Zaretskii
2013-09-07 10:46 ` Ulrich Müller
2013-09-07 12:27 ` Eli Zaretskii
2013-09-08 23:52 ` Glenn Morris
2013-09-07 17:28 ` Glenn Morris
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).