2004-06-04 17:31:57 +03:00
|
|
|
SUBDIRS = externals src scripts corepkgs doc misc tests
|
2005-02-01 22:53:14 +02:00
|
|
|
EXTRA_DIST = substitute.mk nix.spec nix.spec.in bootstrap.sh \
|
2005-09-15 18:21:57 +03:00
|
|
|
svn-revision nix.conf.example NEWS
|
2003-12-30 22:09:00 +02:00
|
|
|
|
2004-01-02 18:04:53 +02:00
|
|
|
include ./substitute.mk
|
|
|
|
|
|
|
|
nix.spec: nix.spec.in
|
|
|
|
|
|
|
|
rpm: nix.spec dist
|
2004-01-02 16:58:25 +02:00
|
|
|
rpm $(EXTRA_RPM_FLAGS) -ta $(distdir).tar.gz
|
2004-01-22 15:04:57 +02:00
|
|
|
|
|
|
|
relname:
|
|
|
|
echo -n $(distdir) > relname
|
2004-04-21 13:54:46 +03:00
|
|
|
|
|
|
|
install-data-local: init-state
|
2005-02-01 22:53:14 +02:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
|
|
|
$(INSTALL_DATA) nix.conf.example $(DESTDIR)$(sysconfdir)/nix
|
|
|
|
if ! test -e $(DESTDIR)$(sysconfdir)/nix/nix.conf; then \
|
|
|
|
$(INSTALL_DATA) nix.conf.example $(DESTDIR)$(sysconfdir)/nix/nix.conf; \
|
|
|
|
fi
|
2004-04-21 13:54:46 +03:00
|
|
|
|
|
|
|
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 17:49:05 +03:00
|
|
|
if SETUID_HACK
|
|
|
|
INIT_FLAGS = -g @NIX_GROUP@ -o @NIX_USER@
|
2004-10-20 17:42:38 +03: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 17:49:05 +03:00
|
|
|
endif
|
2004-04-21 13:54:46 +03: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 17:49:05 +03: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 15:54:45 +02: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 17:49:05 +03:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/profiles
|
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/gcroots
|
2005-01-31 12:27:25 +02:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/temproots
|
2004-10-20 17:42:38 +03: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 17:17:57 +03: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 17:49:05 +03:00
|
|
|
$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(prefix)/store
|
2004-12-16 16:31:49 +02:00
|
|
|
$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/manifests
|
2004-04-21 13:54:46 +03:00
|
|
|
# $(bindir)/nix-store --init
|
|
|
|
else
|
|
|
|
init-state:
|
2004-04-22 17:17:57 +03:00
|
|
|
endif
|
2004-10-25 16:51:34 +03:00
|
|
|
|
|
|
|
svn-revision:
|
|
|
|
svnversion . > svn-revision
|
2005-09-15 18:21:57 +03:00
|
|
|
|
|
|
|
all-local: NEWS
|
|
|
|
|
|
|
|
NEWS:
|
|
|
|
cp doc/manual/NEWS.txt NEWS
|