X-Git-Url: http://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/6c77d79a4994124150071b36bfbb74c18a4651b3..0758a70cc008171f31c848128deca9803536fe60:/etc/guix-install.sh diff --git a/etc/guix-install.sh b/etc/guix-install.sh index d3f80d1a35..bd3ab901ad 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -87,6 +87,7 @@ _debug() chk_require() { # Check that every required command is available. declare -a warn + local c _debug "--- [ $FUNCNAME ] ---" @@ -99,8 +100,15 @@ chk_require() return 1; } _msg "${PAS}verification of required commands completed" +} + +chk_gpg_keyring() +{ # Check whether the Guix release signing public key is present. + _debug "--- [ $FUNCNAME ] ---" - gpg --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || ( + # Without --dry-run this command will create a ~/.gnupg owned by root on + # systems where gpg has never been used, causing errors and confusion. + gpg --dry-run --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || ( _err "${ERR}Missing OpenPGP public key. Fetch it with this command:" echo " wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --import -" exit 1 @@ -337,6 +345,17 @@ sys_enable_guix_daemon() { cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \ /etc/systemd/system/; chmod 664 /etc/systemd/system/guix-daemon.service; + + # Work around , present in 1.0.1. + sed -i /etc/systemd/system/guix-daemon.service \ + -e "s/GUIX_LOCPATH='/'GUIX_LOCPATH=/"; + + # Work around , present in 1.0.1. + if ! grep en_US /etc/systemd/system/guix-daemon.service >/dev/null; + then sed -i /etc/systemd/system/guix-daemon.service \ + -e 's/^Environment=\(.*\)$/Environment=\1 LC_ALL=en_US.UTF-8'; + fi; + systemctl daemon-reload && systemctl start guix-daemon && systemctl enable guix-daemon; } && @@ -414,6 +433,7 @@ main() chk_term chk_require "${REQUIRE[@]}" + chk_gpg_keyring chk_init_sys chk_sys_arch