summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/completion/bash/guix74
-rwxr-xr-xetc/git/pre-push49
-rwxr-xr-xetc/guix-install.sh3
-rw-r--r--etc/news.scm30
4 files changed, 101 insertions, 55 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 0333bfc8a2..df35919eb2 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -115,6 +115,24 @@ _guix_is_dash_m ()
 	     esac }
 }
 
+_guix_is_dash_C ()
+{
+    [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-C" ] \
+	|| { case "${COMP_WORDS[$COMP_CWORD]}" in
+		 --channels=*)  true;;
+		 *)             false;;
+	     esac }
+}
+
+_guix_is_dash_p ()
+{
+    [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-p" ] \
+	|| { case "${COMP_WORDS[$COMP_CWORD]}" in
+		 --profile=*)   true;;
+		 *)             false;;
+	     esac }
+}
+
 _guix_complete_file ()
 {
     # Let Readline complete file names.
@@ -130,6 +148,17 @@ _guix_complete_pid ()
 
 declare _guix_subcommands
 
+_guix_complete_subcommand ()
+{
+    if [ -z "$_guix_subcommands" ]
+    then
+	# Cache the list of subcommands to speed things up.
+	_guix_subcommands="$(guix --help 2> /dev/null \
+                                     | grep '^  ' | cut -c 2-)"
+    fi
+    COMPREPLY=($(compgen -W "$_guix_subcommands" -- "$word_at_point"))
+}
+
 _guix_complete ()
 {
     local word_count=${#COMP_WORDS[*]}
@@ -147,13 +176,7 @@ _guix_complete ()
 
     case $COMP_CWORD in
 	1)
-	    if [ -z "$_guix_subcommands" ]
-	    then
-		# Cache the list of subcommands to speed things up.
-		_guix_subcommands="$(guix --help 2> /dev/null \
-                                     | grep '^  ' | cut -c 2-)"
-	    fi
-	    COMPREPLY=($(compgen -W "$_guix_subcommands" -- "$word_at_point"))
+	    _guix_complete_subcommand
 	    ;;
 	*)
 	    if _guix_is_command "package"
@@ -169,13 +192,28 @@ _guix_complete ()
 		fi
 	    elif _guix_is_command "install"
 	    then
-		_guix_complete_available_package "$word_at_point"
+                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
+                then
+                    _guix_complete_file
+		else
+		    _guix_complete_available_package "$word_at_point"
+		fi
 	    elif _guix_is_command "remove"
 	    then
-		_guix_complete_installed_package "$word_at_point"
+                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
+                then
+                    _guix_complete_file
+		else
+		    _guix_complete_installed_package "$word_at_point"
+		fi
 	    elif _guix_is_command "upgrade"
 	    then
-		_guix_complete_installed_package "$word_at_point"
+                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
+                then
+                    _guix_complete_file
+		else
+		    _guix_complete_installed_package "$word_at_point"
+		fi
             elif _guix_is_command "build"
             then
                 if _guix_is_dash_L || _guix_is_dash_m
@@ -193,6 +231,20 @@ _guix_complete ()
 		    2) _guix_complete_subcommand;;
 		    *) _guix_complete_file;; # TODO: restrict to *.scm
 		esac
+            elif _guix_is_command "pull"
+            then
+                if _guix_is_dash_C || _guix_is_dash_p
+                then
+                    _guix_complete_file
+                fi
+            elif _guix_is_command "time-machine"
+            then
+                if _guix_is_dash_C
+                then
+                    _guix_complete_file
+		else
+		    _guix_complete_subcommand
+                fi
 	    elif _guix_is_command "container"
 	    then
 		case $COMP_CWORD in
diff --git a/etc/git/pre-push b/etc/git/pre-push
index 9206a2dfe5..415345fc75 100755
--- a/etc/git/pre-push
+++ b/etc/git/pre-push
@@ -1,7 +1,8 @@
 #!/bin/sh
 
 # This hook script prevents the user from pushing to Savannah if any of the new
-# commits' OpenPGP signatures cannot be verified.
+# commits' OpenPGP signatures cannot be verified, or if a commit is signed
+# with an unauthorized key.
 
 # Called by "git push" after it has checked the remote status, but before
 # anything has been pushed.  If this script exits with a non-zero status nothing
@@ -19,51 +20,13 @@
 #
 #   <local ref> <local sha1> <remote ref> <remote sha1>
 
-z40=0000000000000000000000000000000000000000
-
 # Only use the hook when pushing to Savannah.
 case "$2" in
-*git.sv.gnu.org*)
-	break
+    *.gnu.org*)
+	exec make authenticate check-channel-news
+	exit 127
 	;;
-*)
+    *)
 	exit 0
 	;;
 esac
-
-while read local_ref local_sha remote_ref remote_sha
-do
-	if [ "$local_sha" = $z40 ]
-	then
-		# Handle delete
-		:
-	else
-		if [ "$remote_sha" = $z40 ]
-		then
-			# We are pushing a new branch. To prevent wasting too
-			# much time for this relatively rare case, we examine
-			# all commits since the first signed commit, rather than
-			# the full history. This check *will* fail, and the user
-			# will need to temporarily disable the hook to push the
-			# new branch.
-			range="e3d0fcbf7e55e8cbe8d0a1c5a24d73f341d7243b..$local_sha"
-		else
-			# Update to existing branch, examine new commits
-			range="$remote_sha..$local_sha"
-		fi
-
-		# Verify the signatures of all commits being pushed.
-		ret=0
-		for commit in $(git rev-list $range)
-		do
-			if ! git verify-commit $commit >/dev/null 2>&1
-			then
-				printf "%s failed signature check\n" $commit
-				ret=1
-			fi
-		done
-		exit $ret
-	fi
-done
-
-exit 0
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index bcce1d8869..bf15aede21 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -48,6 +48,7 @@ REQUIRE=(
     "groupadd"
     "tail"
     "tr"
+    "xz"
 )
 
 PAS=$'[ \033[32;1mPASS\033[0m ] '
@@ -141,7 +142,7 @@ chk_init_sys()
         _msg "${INF}init system is: upstart"
         INIT_SYS="upstart"
         return 0
-    elif [[ $(systemctl) =~ -\.mount ]]; then
+    elif [[ $(systemctl 2>/dev/null) =~ -\.mount ]]; then
         _msg "${INF}init system is: systemd"
         INIT_SYS="systemd"
         return 0
diff --git a/etc/news.scm b/etc/news.scm
index 898f07a45c..6bf88ccb44 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -1,8 +1,10 @@
 ;; GNU Guix news, for use by 'guix pull'.
 ;;
 ;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;
 ;; Copying and distribution of this file, with or without modification, are
 ;; permitted in any medium without royalty provided the copyright notice and
@@ -11,6 +13,34 @@
 (channel-news
  (version 0)
 
+ (entry (commit "b460ba7992a0b4af2ddb5927dcf062784539ef7b")
+        (title (en "Add support to boot from a Btrfs subvolume")
+               (de "Unterstützung für Systemstart von einem
+Btrfs-Unterlaufwerk hinzugefügt")
+               (fr "Ajout du support pour démarrer depuis un sous-volume Btrfs")
+               (nl "Nieuwe ondersteuning voor het opstarten vanaf een Btrfs-subvolume"))
+        (body
+         (en "The generation of the GRUB configuration file produced from an
+operating system declaration now takes into account the use of a Btrfs
+subvolume for the partition holding @file{/gnu/store}.  Run the command
+@command{info \"(guix) Btrfs file system\"} for more information and
+examples.")
+         (de "Für die Erzeugung einer GRUB-Konfigurationsdatei aus einer
+Betriebssystemdeklaration kann jetzt ein Btrfs-Unterlaufwerk („Subvolume“) für
+die Partition mit @file{/gnu/store} angegeben werden.  Führen Sie
+@command{info \"(guix) Btrfs file system\"} aus, wenn Sie mehr Informationen
+und Beispiele sehen möchten.")
+         (fr "La génération du fichier de configuration de GRUB produite à
+partir de la déclaration d'un @code{operating-system} tient maintenant compte
+de l'utilisation d'un sous-volume Btrfs pour la partition contenant
+@file{/gnu/store}.  Exécutez la commande @command{info\"(guix) Btrfs file
+system\"} pour des exemples et plus d'information.")
+         (nl "Het opmaken van het GRUB-configuratiebestand op basis van
+een @code{operating-system}-declaratie houdt nu rekening met het gebruik van
+een Btrfs-subvolume voor de partitie die @file{/gnu/store} bevat.  Voer
+@command{info \"(guix) Btrfs file system\"} uit voor meer informatie en
+voorbeelden.")))
+
  (entry (commit "6456232164890dbf5aa20394ee24637feb4b7b9e")
         (title (en "@command{guix pack -RR} introduces a new execution
 engine")