** Description changed:

+ [IMPACT]
+ 
+ Currently, nsd fails to install. The postinst attempts to start the nsd
+ daemon before creating the nsd user, and fails when starting the daemon
+ fails.
+ 
+ The daemon is started by debhelper-generated snippets. The attached
+ fixes move the auto-generated snippets to the end of the postinst, after
+ the non-auto-generated code creates the user.
+ 
+ (This is the fix used by Debian to fix Debian bug #743396)
+ 
+ [TEST CASE]
+ 
+ 1. Ensure that the nsd user doesn't already exist:
+ 
+    $ getent passwd nsd
+    $
+ 
+ 2. Install nsd:
+ 
+    $ sudo apt-get install nsd
+ 
+ Note: This won't work in an environment such as a buildd chroot where
+ daemons are disabled via policy-rc.d - you'll either have to remove the
+ file or specifically whitelist the nsd daemon.
+ 
+ Expected results: package install successfully
+ 
+ Actual results:
+ 
+   $ sudo apt-get install nsd
+   ....
+   Unpacking nsd (4.0.1-1) ...
+   Processing triggers for man-db (2.6.7.1-1) ...
+   Processing triggers for ureadahead (0.100.0-16) ...
+   Setting up nsd (4.0.1-1) ...
+   start: Job failed to start
+   invoke-rc.d: initscript nsd, action "start" failed.
+   dpkg: error processing package nsd (--configure):
+   subprocess installed post-installation script returned error exit status 1
+   Processing triggers for ureadahead (0.100.0-16) ...
+   Errors were encountered while processing:
+    nsd
+   E: Sub-process /usr/bin/dpkg returned an error code (1)
+ 
+ [REGRESSION POTENTIAL]
+ 
+ Seems quite low. There are no changes to the actual nsd code, so the
+ likelihood of affecting successful installs seems minimal. The only
+ debhelper-generated code in the postinst are related to the init script
+ (starting the daemon, and upgrading from sysvinit to upstart), so the
+ possibility for side-effects from moving the snippets also seems
+ minimal.
+ 
+ ===
+ Original description:
+ 
  installing nsd fails unless the `nsd` user is created first.
  
  On a completely fresh Ubuntu 14.04 machine (from AWS's AMI):
  
  $ sudo apt-get update
  $ sudo apt-get install nsd
  ....
  Unpacking nsd (4.0.1-1) ...
  Processing triggers for man-db (2.6.7.1-1) ...
  Processing triggers for ureadahead (0.100.0-16) ...
  Setting up nsd (4.0.1-1) ...
  start: Job failed to start
  invoke-rc.d: initscript nsd, action "start" failed.
  dpkg: error processing package nsd (--configure):
-  subprocess installed post-installation script returned error exit status 1
+  subprocess installed post-installation script returned error exit status 1
  Processing triggers for ureadahead (0.100.0-16) ...
  Errors were encountered while processing:
-  nsd
+  nsd
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  
  $ sudo useradd nsd
  $ sudo dpkg --configure nsd
  Setting up nsd (4.0.1-1) ...
  nsd start/running, process 1887

** Patch added: "nsd_4.0.1-1ubuntu0.1.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/nsd/+bug/1311886/+attachment/4295872/+files/nsd_4.0.1-1ubuntu0.1.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1311886

Title:
  nsd fails to install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nsd/+bug/1311886/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to