diff --git a/Makefile b/Makefile
index 4518f5c83fb9f96b1a25500a98bd7cb1fb3e2cc2..55639b9765c51173770db48d3e2696061dd7dbe8 100644
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,7 @@ build_asdf build/asdf.lisp: force
 
 # The text below was automaticaly generated by `make --silent makefile-targets`
 # then manually inserted here to provide for completion:
-.PHONY: archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
+.PHONY: archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
 
-
-archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
+archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
 	${MAKE_SCRIPT} l='$l' L='$L' u='$u' U='$u' v='$v' s='$s' t='$t' $@
diff --git a/tools/git.lisp b/tools/git.lisp
index 4762b42c98491cfb0778a03cbbc712b45e891918..08cc22ab7e2c4e5bdf13ffe8b9d387f04874a30e 100644
--- a/tools/git.lisp
+++ b/tools/git.lisp
@@ -48,4 +48,29 @@
 
 (deftestcmd git-all-committed-p ()
   "is your checkout clean, with all files committed?"
-  (null (nth-value 2 (git '(status -s) :output :lines))))
+  (let ((uncommitted (nth-value 2 (git '(status -s) :output :lines))))
+    (success-if (null uncommitted)
+                "git reports uncommitted files:~{~%  ~A~}~%" uncommitted)))
+
+(defun get-git-branch ()
+  "What is the current checked out branch?"
+  (match (first (nth-value 2 (git '(status) :output :lines)))
+    ((ppcre "^# On branch (.*)$" x) x)))
+
+(deftestcmd ext-init ()
+  "Populate the ext/ directory if not already populated.
+Same as `make ext` in the bootstrap make script."
+  (git '(submodule update --init)))
+
+(deftestcmd ext-clear ()
+  "Depopulate the ext/ directory.
+Same as `make noext` in the bootstrap make script."
+  (git '(submodule deinit ".")))
+
+(deftestcmd ext-reset ()
+  "Reset the ext/ directory to the contents specified by the current git checkout."
+  (git '(submodule update --init)))
+
+(deftestcmd ext-update ()
+  "Update the ext/ directory to the latest version from remote repositories."
+  (git '(submodule update --remote)))
diff --git a/tools/main.lisp b/tools/main.lisp
index 8bf610cd576aaf37f6b300d8509c44330e4e81cb..63005940f397c3f1462b436abfe6f8f5bb5843fd 100644
--- a/tools/main.lisp
+++ b/tools/main.lisp
@@ -45,6 +45,7 @@ The UNIX-y name will be downcased, and any % prefix will be dropped."
   ;; :when (and (eq x (find-command x)) (documentation x 'function)) :collect x)
   '(build-asdf doc website wc ;; build
     clean %push merge-master-into-release fix-local-git-tags fix-remote-git-tags ;; git
+    ext-init ext-clear ext-reset ext-update ;; extension
     git-all-committed-p
     bump-version bump ;; version
     test-load-systems test-clean-load test-basic test-ascii %load install-asdf ;; test-basic
diff --git a/tools/release.lisp b/tools/release.lisp
index 34fb8e0bf575e9b3b9f3e29bb6e024d66284cd93..d78d67a113107572a66e57777c22a54bd8ecbb16 100644
--- a/tools/release.lisp
+++ b/tools/release.lisp
@@ -150,18 +150,29 @@
 (defalias archive make-and-publish-archive)
 (defalias install make-and-publish-archive)
 
+(defun get-debian-packager-keyid ()
+  (or (getenv "DEBSIGN_KEYID")
+      (error "Please export variable DEBSIGN_KEYID to be the 8-hex hash of your GnuPG secret key")))
 
 ;;; Making a debian package
 (deftestcmd debian-package ((release "release"))
   "build a debian package"
   (let* ((debian-version (debian-version-from-file release))
-         (version (version-from-file release)))
+         (version (version-from-file release))
+         (has-ext-p (probe-file* (pn "ext/inferior-shell/inferior-shell.asd")))
+         (branch (get-git-branch))
+         (keyid (get-debian-packager-keyid)))
     (unless (equal version (parse-debian-version debian-version))
       (error "Debian version ~A doesn't match asdf version ~A" debian-version version))
+    (git-all-committed-p)
     (clean)
+    (ext-clear)
+    (git '(checkout release))
     (format t "building package version ~A~%" (debian-version-from-file))
     (run* `(git-buildpackage
             ;; --git-ignore-new ;; for testing purpose
+            ;; Override of the signing key, don't extract the name from the Changelog:
+            (--git-builder="debuild -k0x",keyid" -i -I")
             (--git-debian-branch= ,release)
             (--git-upstream-tag="%(version)s")
             ;;--git-upstream-tree=tag ;; if the changelog says 3.1.2, looks at that tag
@@ -170,7 +181,10 @@
             ;; --git-no-pristine-tar
             --git-force-create
             --git-ignore-branch)
-          :directory (pn) :show t)))
+          :directory (pn) :show t)
+    (git `(checkout ,branch))
+    (when has-ext-p (ext-reset))
+    (success)))
 
 (defun debian-architecture ()
   (run/ss `(dpkg --print-architecture)))
@@ -195,21 +209,20 @@
         (when (nth-value 1 (run '(dpkg-parsechangelog) :output nil :error-output :lines))
           (error "Malformed debian/changelog entry")))
       scripts ;; TODO: needs to be passed as argument!
-      (and ;; need a better combinator, that tells us about progress, etc.
-       (git-all-committed-p)
-       (test-all-no-stop) ;; TODO: NEED ARGUMENTS!
-       (test-load-systems lisps systems)
-       (bump new-version)
-       (when releasep
-         (and
-          (debian-package)
-          (publish-debian-package)
-          (merge-master-into-release)))
-       ;; SUCCESS! now publish more widely
-       (%push)
-       (archive)
-       (website)
-       (when releasep
-         (log! log t "Don't forget to send a debian mentors request!"))
-       (log! log "Don't forget to send announcement to asdf-announce, asdf-devel, etc.")
-       (log! log "Don't forget to move all fixed bugs from Fix Committed -> Fix Released on launchpad")))))
+      (git-all-committed-p)
+      (test-all-no-stop) ;; TODO: NEED ARGUMENTS!
+      (test-load-systems lisps systems)
+      (bump new-version)
+      (when releasep
+        (and
+         (debian-package)
+         (publish-debian-package)
+         (merge-master-into-release)))
+      ;; SUCCESS! now publish more widely
+      (%push)
+      (archive)
+      (website)
+      (when releasep
+        (log! log t "Don't forget to send a debian mentors request!"))
+      (log! log "Don't forget to send announcement to asdf-announce, asdf-devel, etc.")
+      (log! log "Don't forget to move all fixed bugs from Fix Committed -> Fix Released on launchpad"))))