Browse Source

Avoid race condition between keygen and update, resulting in "Key derivation key not available!". Closees: #975343

Christoph Biedl 3 years ago
parent
commit
d23aca3501
2 changed files with 29 additions and 0 deletions
  1. 28 0
      debian/patches/local.avoid-keygen-race.patch
  2. 1 0
      debian/patches/series

+ 28 - 0
debian/patches/local.avoid-keygen-race.patch

@@ -0,0 +1,28 @@
+Description: Avoid race condition between keygen and update, resulting in "Key derivation key not available!"
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Bug: https://github.com/latchset/tang/issues/52
+Bug-Debian: https://bugs.debian.org/975343
+Last-Update: 2021-01-25
+
+--- a/units/tangd-update.service.in
++++ b/units/tangd-update.service.in
+@@ -1,5 +1,7 @@
+ [Unit]
+ Description=Tang Server key update script
++Requires=tangd-keygen.service
++After=tangd-keygen.service
+ 
+ [Service]
+ Type=oneshot
+--- a/units/tangd.socket.in
++++ b/units/tangd.socket.in
+@@ -1,9 +1,7 @@
+ [Unit]
+ Description=Tang Server socket
+-Requires=tangd-keygen.service
+ Requires=tangd-update.service
+ Requires=tangd-update.path
+-After=tangd-keygen.service
+ After=tangd-update.service
+ 
+ [Socket]

+ 1 - 0
debian/patches/series

@@ -1,2 +1,3 @@
 local.use-asciidoctor-to-build-manpages.patch
 local.add-systemd-documentation-key.patch
+local.avoid-keygen-race.patch