build: Binary tarball now populates the "current-guix" profile.

* Makefile.am (guix-binary.%.tar.xz): Pass
'--profile-name=current-guix'.  Remove glibc and glibc-utf8-locales.
* doc/guix.texi (Binary Installation): Update accordingly.
* etc/guix-install.sh
* etc/guix-install.sh (sys_create_store, sys_enable_guix_daemon)
(sys_authorize_build_farms): Likewise.
* etc/guix-publish.conf.in, etc/guix-publish.service.in,
etc/guix-daemon.conf.in, etc/guix-daemon.service.in: Update file names
accordingly.
This commit is contained in:
Ludovic Courtès 2018-10-21 22:22:13 +02:00
parent 08f410834b
commit e9926f80c6
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
7 changed files with 37 additions and 32 deletions

View File

@ -601,13 +601,11 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
--enable-daemon \ --enable-daemon \
ac_cv_guix_test_root="$(GUIX_TEST_ROOT)" ac_cv_guix_test_root="$(GUIX_TEST_ROOT)"
# The self-contained tarball. Add 'glibc-utf8-locales' along with glibc just # The self-contained tarball.
# so 'etc/profile' defines 'GUIX_LOCPATH' pointing to a valid set of locales.
guix-binary.%.tar.xz: guix-binary.%.tar.xz:
$(AM_V_GEN)GUIX_PACKAGE_PATH= \ $(AM_V_GEN)GUIX_PACKAGE_PATH= \
tarball=`$(top_builddir)/pre-inst-env guix pack -K -C xz \ tarball=`$(top_builddir)/pre-inst-env guix pack -K -C xz \
-s "$*" --localstatedir guix glibc-utf8-locales \ -s "$*" --localstatedir --profile-name=current-guix guix` ; \
-e '(@@ (gnu packages commencement) glibc-final)'` ; \
cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"

View File

@ -499,18 +499,20 @@ archive content is independent of its creation time, thus making it
reproducible. reproducible.
@item @item
Make @code{root}'s profile available under @file{~root/.guix-profile}: Make the profile available under @file{~root/.config/guix/current}, which is
where @command{guix pull} will install updates (@pxref{Invoking guix pull}):
@example @example
# ln -sf /var/guix/profiles/per-user/root/guix-profile \ # mkdir -p ~root/.config/guix
~root/.guix-profile # ln -sf /var/guix/profiles/per-user/root/current-guix \
~root/.config/guix/current
@end example @end example
Source @file{etc/profile} to augment @code{PATH} and other relevant Source @file{etc/profile} to augment @code{PATH} and other relevant
environment variables: environment variables:
@example @example
# GUIX_PROFILE="`echo ~root`/.guix-profile" ; \ # GUIX_PROFILE="`echo ~root`/.config/guix/current" ; \
source $GUIX_PROFILE/etc/profile source $GUIX_PROFILE/etc/profile
@end example @end example
@ -532,8 +534,8 @@ with these commands:
@c http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01199.html @c http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01199.html
@example @example
# cp ~root/.guix-profile/lib/systemd/system/guix-daemon.service \ # cp ~root/.config/guix/current/lib/systemd/system/guix-daemon.service \
/etc/systemd/system/ /etc/systemd/system/
# systemctl start guix-daemon && systemctl enable guix-daemon # systemctl start guix-daemon && systemctl enable guix-daemon
@end example @end example
@ -541,14 +543,16 @@ If your host distro uses the Upstart init system:
@example @example
# initctl reload-configuration # initctl reload-configuration
# cp ~root/.guix-profile/lib/upstart/system/guix-daemon.conf /etc/init/ # cp ~root/.config/guix/current/lib/upstart/system/guix-daemon.conf \
/etc/init/
# start guix-daemon # start guix-daemon
@end example @end example
Otherwise, you can still start the daemon manually with: Otherwise, you can still start the daemon manually with:
@example @example
# ~root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild # ~root/.config/guix/current/bin/guix-daemon \
--build-users-group=guixbuild
@end example @end example
@item @item
@ -558,7 +562,7 @@ for instance with:
@example @example
# mkdir -p /usr/local/bin # mkdir -p /usr/local/bin
# cd /usr/local/bin # cd /usr/local/bin
# ln -s /var/guix/profiles/per-user/root/guix-profile/bin/guix # ln -s /var/guix/profiles/per-user/root/current-guix/bin/guix
@end example @end example
It is also a good idea to make the Info version of this manual available It is also a good idea to make the Info version of this manual available
@ -567,7 +571,7 @@ there:
@example @example
# mkdir -p /usr/local/share/info # mkdir -p /usr/local/share/info
# cd /usr/local/share/info # cd /usr/local/share/info
# for i in /var/guix/profiles/per-user/root/guix-profile/share/info/* ; # for i in /var/guix/profiles/per-user/root/current-guix/share/info/* ;
do ln -s $i ; done do ln -s $i ; done
@end example @end example
@ -582,7 +586,8 @@ To use substitutes from @code{hydra.gnu.org} or one of its mirrors
(@pxref{Substitutes}), authorize them: (@pxref{Substitutes}), authorize them:
@example @example
# guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub # guix archive --authorize < \
~root/.config/guix/current/share/guix/hydra.gnu.org.pub
@end example @end example
@item @item
@ -616,7 +621,8 @@ make guix-binary.@var{system}.tar.xz
... which, in turn, runs: ... which, in turn, runs:
@example @example
guix pack -s @var{system} --localstatedir guix guix pack -s @var{system} --localstatedir \
--profile-name=current-guix guix
@end example @end example
@xref{Invoking guix pack}, for more info on this handy tool. @xref{Invoking guix pack}, for more info on this handy tool.

View File

@ -7,4 +7,4 @@ start on runlevel [2345]
stop on runlevel [016] stop on runlevel [016]
exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild

View File

@ -6,8 +6,8 @@
Description=Build daemon for GNU Guix Description=Build daemon for GNU Guix
[Service] [Service]
ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale Environment=GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale
RemainAfterExit=yes RemainAfterExit=yes
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog

View File

@ -269,12 +269,13 @@ sys_create_store()
fi fi
_msg "${INF}Linking the root user's profile" _msg "${INF}Linking the root user's profile"
ln -sf /var/guix/profiles/per-user/root/guix-profile \ mkdir -p "${ROOT_HOME}/.config/guix"
"${ROOT_HOME}/.guix-profile" ln -sf /var/guix/profiles/per-user/root/current-guix \
"${ROOT_HOME}/.config/guix/current"
GUIX_PROFILE="${ROOT_HOME}/.guix-profile" GUIX_PROFILE="${ROOT_HOME}/.config/guix/current"
source "${GUIX_PROFILE}/etc/profile" source "${GUIX_PROFILE}/etc/profile"
_msg "${PAS}activated root profile at /root/.guix-profile" _msg "${PAS}activated root profile at ${ROOT_HOME}/.config/guix/current"
} }
sys_create_build_user() sys_create_build_user()
@ -317,18 +318,18 @@ sys_enable_guix_daemon()
info_path="/usr/local/share/info" info_path="/usr/local/share/info"
local_bin="/usr/local/bin" local_bin="/usr/local/bin"
var_guix="/var/guix/profiles/per-user/root/guix-profile" var_guix="/var/guix/profiles/per-user/root/current-guix"
case "$INIT_SYS" in case "$INIT_SYS" in
upstart) upstart)
{ initctl reload-configuration; { initctl reload-configuration;
cp "${ROOT_HOME}/.guix-profile/lib/upstart/system/guix-daemon.conf" \ cp "${ROOT_HOME}/.config/guix/current/lib/upstart/system/guix-daemon.conf" \
/etc/init/ && /etc/init/ &&
start guix-daemon; } && start guix-daemon; } &&
_msg "${PAS}enabled Guix daemon via upstart" _msg "${PAS}enabled Guix daemon via upstart"
;; ;;
systemd) systemd)
{ cp "${ROOT_HOME}/.guix-profile/lib/systemd/system/guix-daemon.service" \ { cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \
/etc/systemd/system/; /etc/systemd/system/;
chmod 664 /etc/systemd/system/guix-daemon.service; chmod 664 /etc/systemd/system/guix-daemon.service;
systemctl daemon-reload && systemctl daemon-reload &&
@ -338,7 +339,7 @@ sys_enable_guix_daemon()
;; ;;
NA|*) NA|*)
_msg "${ERR}unsupported init system; run the daemon manually:" _msg "${ERR}unsupported init system; run the daemon manually:"
echo " ${ROOT_HOME}/.guix-profile/bin/guix-daemon --build-users-group=guixbuild" echo " ${ROOT_HOME}/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
;; ;;
esac esac
@ -358,9 +359,9 @@ sys_authorize_build_farms()
while true; do while true; do
read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
case $yn in case $yn in
[Yy]*) guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/hydra.gnu.org.pub" && [Yy]*) guix archive --authorize < "${ROOT_HOME}/.config/guix/current/share/guix/hydra.gnu.org.pub" &&
_msg "${PAS}Authorized public key for hydra.gnu.org"; _msg "${PAS}Authorized public key for hydra.gnu.org";
guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/berlin.guixsd.org.pub" && guix archive --authorize < "${ROOT_HOME}/.config/guix/current/share/guix/berlin.guixsd.org.pub" &&
_msg "${PAS}Authorized public key for berlin.guixsd.org"; _msg "${PAS}Authorized public key for berlin.guixsd.org";
break;; break;;
[Nn]*) _msg "${INF}Skipped authorizing build farm public keys" [Nn]*) _msg "${INF}Skipped authorizing build farm public keys"

View File

@ -9,4 +9,4 @@ stop on runlevel [016]
task task
exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181 exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix publish --user=nobody --port=8181

View File

@ -6,8 +6,8 @@
Description=Publish the GNU Guix store Description=Publish the GNU Guix store
[Service] [Service]
ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181 ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix publish --user=nobody --port=8181
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale Environment=GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale
RemainAfterExit=yes RemainAfterExit=yes
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog