zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Clint Adams <schizo@debian.org>, zsh-workers@sunsite.auc.dk
Subject: PATCH: 3.1.6 install without rebuild (Re: 3.0 DESTDIR)
Date: Sun, 24 Oct 1999 17:58:38 +0000	[thread overview]
Message-ID: <991024175838.ZM6757@candle.brasslantern.com> (raw)
In-Reply-To: <19991024103020.A5395@dman.com>

This is a whole lot of verbiage ending in a very short patch.

On Oct 24, 10:30am, Clint Adams wrote:
} Subject: Re: 3.0 DESTDIR
}
} > (2) that recompile is a bug in the 3.1.6 build process which I think we
} > ought to fix whether or not DESTDIR is also available; and
} 
} Agreed.

The issue appears to be that the instructions for building zshpaths.h are
considered to be a module definition task (they're in zsh.mdd) rather than
a configuration task.  So they don't get pasted into a Makefile until the
"make -f Makemod" gets run, and hence are compile-time rather than config-
time substituted.  This is compounded by dependence on $(VERSION), which
is a make-time rather than config-time value as well.

However, I think the following patch will do the right things:  Before the
patch, the target zshpaths.h depends on FORCE, and then the rule avoids
touching the file if it hasn't changed.  The patch simply replaces FORCE
with a dependency on the .mk files that define the variables that become
part of the strings in zshpaths.h; so if you re-configure, or "cvs update"
to a newer version of the sources, zshpaths.h will get remade.

This means that "make MODDIR=/some/new/path fndir=/some/other/new/path"
does not recompile zsh, but "make ... install" still installs the modules
and functions in the new $(MODDIR) and $(fndir) locations.

I'm now considering backing out the $DESTDIR stuff, because with this patch
you can do this kind of thing (which works in 3.0.7 as well, by the way):

	configure --prefix='${INSTROOT}/usr/local'
	make
	make INSTROOT=/tmp/zshtest install

} However, I'm not sure why you would want to install files into
} /usr/local/stow that believe their functions/modules are going to be
} in /usr/local.

There's a GNU package called "stow" (based on something called "depot"
that originated at CMU).  It's a package-installation utility designed
for use in shared-filesystem environments.  Rather than copy the files
from the package directly into place the way an RPM or Debian package
does, it expects to find the packages in subdirectories of a directory
(usually also named "stow") whose *parent* directory is the equivalent
of the ${prefix}.  It constructs relative symlinks pointing into each
package's tree in the corresponding subdirs of the parent directory.

E.g., /usr/local/bin/zsh -> ../stow/zsh/bin/zsh after "stow zsh".

Thus the same "stow" directory can be NFS mounted on multiple machines,
and each of those machines can selectively install/uninstall packages
without consuming additional disk space.  This doesn't work for every
package, because some things get security indigestion if they find a
symlink in their execution path; but it's great for things like elisp
libraries and zsh functions that are architecture-independent and can
usually be updated independently of the interpreters that run them.

Here's the patch.

Index: Src/zsh.mdd
===================================================================
@@ -12,6 +12,8 @@
 prototypes.h hashtable.h ztype.h"
 
 :<<\Make
+@CONFIG_MK@
+
 signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
 	$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
 	$(CPP) sigtmp.c >sigtmp.out
@@ -28,7 +30,7 @@
 version.h: $(sdir_top)/Config/version.mk
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 
-zshpaths.h: FORCE Makemod
+zshpaths.h: Makemod $(CONFIG_INCS)
 	@echo '#define MODULE_DIR "'$(MODDIR)'"' > zshpaths.h.tmp
 	@if test x$(fndir) != xno; then \
 	  echo '#define FPATH_DIR "'$(fndir)'"' >> zshpaths.h.tmp; \

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  parent reply	other threads:[~1999-10-24 17:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-19  5:22 Patch: 3.1.6-bart-7: Another rlimit Bart Schaefer
1999-10-19  6:13 ` PATCH: " Bart Schaefer
1999-10-20 20:17   ` Zefram
1999-10-21  1:53     ` Bart Schaefer
1999-10-24  0:45   ` 3.0 DESTDIR Clint Adams
1999-10-24  1:55     ` Bart Schaefer
1999-10-24  5:05       ` Clint Adams
1999-10-24  6:20         ` Bart Schaefer
1999-10-24 14:30           ` Clint Adams
1999-10-24 14:51             ` Bruce Stephens
1999-10-27  2:17               ` Clint Adams
1999-10-24 17:58             ` Bart Schaefer [this message]
1999-10-24 21:04               ` PATCH: 3.1.6 install without rebuild (Re: 3.0 DESTDIR) Zefram
1999-10-24 21:55                 ` Bart Schaefer
1999-10-24 21:57                 ` Bart Schaefer
1999-10-28  1:58               ` Juergen A. Erhard
1999-10-28  3:31                 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=991024175838.ZM6757@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).