You are not logged in.

#1 2009-06-06 18:24:11

darthaxul
Member
Registered: 2008-09-24
Posts: 156

install bind package hangs

pacman -S bind
warning: bind-9.6.0.P1-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): bind-9.6.0.P1-1 

Total Download Size:    0.00 MB
Total Installed Size:   6.70 MB

Proceed with installation? [Y/n]
checking package integrity...
(1/1) checking for file conflicts                   [#####################] 100%
(1/1) upgrading bind     

This is where I never get my command prompt back, I have to Ctrl+c to get it back to the prompt.
^C
Interrupt signal received

Interrupt signal received
#

Offline

#2 2009-06-06 22:58:09

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: install bind package hangs

Bind includes an install script. It's probably either slower than you expect, or hanging:

# arg 1:  the new package version
post_install() {
  getent group named  >/dev/null || usr/sbin/groupadd -g 40 named
  getent passwd named >/dev/null || usr/sbin/useradd -u 40 -c "BIND DNS Server" -g named -d /var/named -s /bin/false named
  usr/bin/passwd -l named &>/dev/null

  [ -f var/log/named.log ] || : >var/log/named.log
  chown named.named var/log/named.log
  # create an rndc.key if it doesn't already exist
  if [ ! -s etc/rndc.key ]; then
    usr/sbin/rndc-confgen -b 256 | head -n 5 >>etc/rndc.key
    chown root.named etc/rndc.key
    chmod 640 etc/rndc.key
  fi
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  post_install $1
  # old versions of this package didn't have a named user
  chown -R named:named var/named
  # old versions of this package didn't set permissions correct
  chown root:named etc/named.conf
  chmod 640 etc/named.conf
}

# arg 1:  the old package version
pre_remove() {
  usr/sbin/userdel named &>/dev/null
  usr/sbin/groupdel named &>/dev/null
}

op=$1
shift

$op $*

Offline

#3 2009-07-13 11:34:12

passbe
Member
Registered: 2009-03-14
Posts: 74
Website

Re: install bind package hangs

did anyone come up with a solution to this? Im having the exact same problem.

Offline

#4 2009-07-13 23:05:51

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: install bind package hangs

It works for me, have you tried pacman -Sf bind too ?

Offline

#5 2009-09-13 14:43:12

fushunpoon
Member
From: London
Registered: 2009-09-13
Posts: 6

Re: install bind package hangs

I have the same problem with same outputs!
I have tried pacman -Sf as well, but it hasn't helped.

bind is operable after termination of pacman, but of course, this is not ideal, as it leaves pacman in a possibly inconsistent state.

Offline

#6 2009-09-13 16:07:03

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: install bind package hangs

Just try running the post_install function manually, line by line.
And find out which one hangs.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2009-09-15 16:06:00

fushunpoon
Member
From: London
Registered: 2009-09-13
Posts: 6

Re: install bind package hangs

Ya! did the script line-by-line and found that the

rndc-confgen -b 256

line was hanging/taking very long. Looking online, it looks like this generator relies on /dev/random, which for me doesn't really spit out anything at all, and keeps blocking (why IS that?!
cat /proc/sys/kernel/random/entropy_avail gives me a lowly figure of 161).

A workaround to make Pacman's script happy is simply to create the key file yourself using rndc-confgen with entropy from the keyboard (bashing your head onto it doesn't work too badly here!), preventing the invocation of rndc-confgen in the post-install script:

# cd /etc
# rm rndc.key
# rndc-confgen -a -r keyboard
Start typing now...
........................
........................
........................
........................
........................
Stop typing.

#

etc. The file should have been written to rndc.key.

Then if you run

pacman -Sy bind

the script will see the rndc.key file and do nothing, completing install happily. =]

Offline

#8 2009-09-17 08:23:47

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: install bind package hangs

when my system is idle, /dev/random does not seem to spit much here either.
I have to do some stuff like using the keyboard, the mouse, etc.
But installing bind package worked perfectly here, so I guess rndc-confgen -b 256 worked fine.

In any cases, it might be worth a bug report, with all this information.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB