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