2004-06-04 14:31:57 +00:00
|
|
|
SUBDIRS = externals src scripts corepkgs doc misc tests
|
2004-10-25 13:51:34 +00:00
|
|
|
EXTRA_DIST = substitute.mk nix.spec nix.spec.in bootstrap.sh svn-revision
|
2003-12-30 20:09:00 +00:00
|
|
|
|
2004-01-02 16:04:53 +00:00
|
|
|
include ./substitute.mk
|
|
|
|
|
|
|
|
nix.spec: nix.spec.in
|
|
|
|
|
|
|
|
rpm: nix.spec dist
|
2004-01-02 14:58:25 +00:00
|
|
|
rpm $(EXTRA_RPM_FLAGS) -ta $(distdir).tar.gz
|
2004-01-22 13:04:57 +00:00
|
|
|
|
|
|
|
relname:
|
|
|
|
echo -n $(distdir) > relname
|
2004-04-21 10:54:46 +00:00
|
|
|
|
|
|
|
install-data-local: init-state
|
|
|
|
|
|
|
|
if 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
|
|
|
if SETUID_HACK
|
|
|
|
INIT_FLAGS = -g @NIX_GROUP@ -o @NIX_USER@
|
2004-10-20 14:42:38 +00:00
|
|
|
GROUP_WRITABLE = -m 775
|
* 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
|
|
|
endif
|
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
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/profiles
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/gcroots
|
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
|
2004-04-22 14:17:57 +00:00
|
|
|
rm -f $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
|
|
|
|
ln -s $(localstatedir)/nix/profiles $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
|
* 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)$(prefix)/store
|
2004-12-16 14:31:49 +00:00
|
|
|
$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/manifests
|
2004-04-21 10:54:46 +00:00
|
|
|
# $(bindir)/nix-store --init
|
|
|
|
else
|
|
|
|
init-state:
|
2004-04-22 14:17:57 +00:00
|
|
|
endif
|
2004-10-25 13:51:34 +00:00
|
|
|
|
|
|
|
svn-revision:
|
|
|
|
svnversion . > svn-revision
|