2004-06-04 14:31:57 +00:00
|
|
|
SUBDIRS = externals src scripts corepkgs doc misc tests
|
2005-02-01 20:53:14 +00:00
|
|
|
EXTRA_DIST = substitute.mk nix.spec nix.spec.in bootstrap.sh \
|
2009-05-07 11:34:08 +00:00
|
|
|
nix.conf.example NEWS version
|
2003-12-30 20:09:00 +00:00
|
|
|
|
2004-01-02 16:04:53 +00:00
|
|
|
include ./substitute.mk
|
|
|
|
|
|
|
|
nix.spec: nix.spec.in
|
|
|
|
|
2004-04-21 10:54:46 +00:00
|
|
|
install-data-local: init-state
|
2005-02-01 20:53:14 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
2006-05-12 11:47:45 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/nix.conf.example $(DESTDIR)$(sysconfdir)/nix
|
2005-02-01 20:53:14 +00:00
|
|
|
if ! test -e $(DESTDIR)$(sysconfdir)/nix/nix.conf; then \
|
2006-05-12 11:47:45 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/nix.conf.example $(DESTDIR)$(sysconfdir)/nix/nix.conf; \
|
2005-02-01 20:53:14 +00:00
|
|
|
fi
|
2008-11-19 13:19:09 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(docdir)
|
|
|
|
$(INSTALL_DATA) README $(DESTDIR)$(docdir)/
|
2004-04-21 10:54:46 +00:00
|
|
|
|
|
|
|
if INIT_STATE
|
2006-11-29 21:06:58 +00:00
|
|
|
|
|
|
|
# For setuid operation, you can enable the following:
|
|
|
|
# INIT_FLAGS = -g @NIX_GROUP@ -o @NIX_USER@
|
|
|
|
# GROUP_WRITABLE = -m 775
|
|
|
|
|
2004-04-21 10:54:46 +00:00
|
|
|
init-state:
|
* Setuid support for sharing a Nix installation between multiple
users.
If the configure flag `--enable-setuid' is used, the Nix programs
nix-env, nix-store, etc. are installed with the setuid bit turned on
so that they are executed as the user and group specified by
`--with-nix-user=USER' and `--with-nix-group=GROUP', respectively
(with defaults `nix' and `nix').
The setuid programs drop all special privileges if they are executed
by a user who is not a member of the Nix group.
The setuid feature is a quick hack to enable sharing of a Nix
installation between users who trust each other. It is not
generally secure, since any user in the Nix group can modify (by
building an appropriate derivation) any object in the store, and for
instance inject trojans into binaries used by other users.
The setuid programs are owned by root, not the Nix user. This is
because on Unix normal users cannot change the real uid, only the
effective uid. Many programs don't work properly when the real uid
differs from the effective uid. For instance, Perl will turn on
taint mode. However, the setuid programs drop all root privileges
immediately, changing all uids and gids to the Nix user and group.
2004-08-20 14:49:05 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/db
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/log/nix
|
2005-02-17 13:54:45 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/log/nix/drvs
|
* Setuid support for sharing a Nix installation between multiple
users.
If the configure flag `--enable-setuid' is used, the Nix programs
nix-env, nix-store, etc. are installed with the setuid bit turned on
so that they are executed as the user and group specified by
`--with-nix-user=USER' and `--with-nix-group=GROUP', respectively
(with defaults `nix' and `nix').
The setuid programs drop all special privileges if they are executed
by a user who is not a member of the Nix group.
The setuid feature is a quick hack to enable sharing of a Nix
installation between users who trust each other. It is not
generally secure, since any user in the Nix group can modify (by
building an appropriate derivation) any object in the store, and for
instance inject trojans into binaries used by other users.
The setuid programs are owned by root, not the Nix user. This is
because on Unix normal users cannot change the real uid, only the
effective uid. Many programs don't work properly when the real uid
differs from the effective uid. For instance, Perl will turn on
taint mode. However, the setuid programs drop all root privileges
immediately, changing all uids and gids to the Nix user and group.
2004-08-20 14:49:05 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/profiles
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/gcroots
|
2005-01-31 10:27:25 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/temproots
|
2004-10-20 14:42:38 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/gcroots/tmp
|
|
|
|
$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/gcroots/channels
|
2007-08-09 23:52:53 +00:00
|
|
|
ln -sfn $(localstatedir)/nix/profiles $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
|
2005-10-20 16:58:34 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/userpool
|
2009-09-18 11:01:30 +00:00
|
|
|
-$(INSTALL) $(INIT_FLAGS) -m 1777 -d $(DESTDIR)$(storedir)
|
2004-12-16 14:31:49 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/manifests
|
2007-08-09 23:52:53 +00:00
|
|
|
ln -sfn $(localstatedir)/nix/manifests $(DESTDIR)$(localstatedir)/nix/gcroots/manifests
|
2006-11-29 21:06:58 +00:00
|
|
|
|
2004-04-21 10:54:46 +00:00
|
|
|
else
|
2004-10-25 13:51:34 +00:00
|
|
|
|
2008-11-26 01:13:29 +00:00
|
|
|
init-state:
|
2005-09-15 15:21:57 +00:00
|
|
|
|
2008-11-26 01:13:29 +00:00
|
|
|
endif
|
2005-09-15 15:21:57 +00:00
|
|
|
|
2008-11-26 01:13:29 +00:00
|
|
|
NEWS:
|
|
|
|
$(MAKE) -C doc/manual NEWS.txt
|
2006-05-12 11:47:45 +00:00
|
|
|
cp $(srcdir)/doc/manual/NEWS.txt NEWS
|