package samba-common 2:3.5.8~dfsg-1ubuntu2.4 failed to install/upgrade: unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': Too many levels of symbolic links

Bug #993660 reported by Rich Wales on 2012-05-03
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Undecided
Unassigned

Bug Description

When I tried "apt-get install -f" from a command line, I got this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  samba-common
The following packages will be upgraded:
  samba-common
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
2 not fully installed or removed.
Need to get 0 B/326 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
(Reading database ... 506164 files and directories currently installed.)
Preparing to replace samba-common 2:3.5.8~dfsg-1ubuntu2.4 (using .../samba-common_2%3a3.5.8~dfsg-1ubuntu2.5_all.deb) ...
Unpacking replacement samba-common ...
dpkg: warning: samba-common: config file 'etc/dhcp3/dhclient-enter-hooks.d/samba' is a circular link
 (= '/etc/dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/samba')
dpkg: error processing /var/cache/apt/archives/samba-common_2%3a3.5.8~dfsg-1ubuntu2.5_all.deb (--unpack):
 unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': Too many levels of symbolic links
Errors were encountered while processing:
 /var/cache/apt/archives/samba-common_2%3a3.5.8~dfsg-1ubuntu2.5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 11.04
Package: samba-common 2:3.5.8~dfsg-1ubuntu2.4
ProcVersionSignature: Ubuntu 2.6.38-13.57-generic-pae 2.6.38.8
Uname: Linux 2.6.38-13-generic-pae i686
NonfreeKernelModules: openafs nvidia
AptOrdering:
 samba-common: Install
 samba-common: Configure
 smbclient: Configure
 winbind: Configure
Architecture: i386
Date: Wed May 2 18:09:52 2012
ErrorMessage: unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': Too many levels of symbolic links
PackageArchitecture: all
RelatedPackageVersions:
 nautilus 1:2.32.2.1-0ubuntu13
 gvfs 1.8.0-0ubuntu3
SambaClientRegression: Yes
SourcePackage: samba
Title: package samba-common 2:3.5.8~dfsg-1ubuntu2.4 failed to install/upgrade: unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': Too many levels of symbolic links
UpgradeStatus: Upgraded to natty on 2011-07-16 (291 days ago)

Rich Wales (richw) wrote :
James Page (james-page) wrote :

Hi Rich

Thanks for taking the time to report this bug in Ubuntu.

Please could you run the following commands:

 sudo ls -l /etc/dhcp3/dhclient-enter-hooks.d/*

And attach the output to this bug report.

Thanks

Changed in samba (Ubuntu):
status: New → Incomplete
arnuschky (abrutschy) wrote :
Download full text (4.1 KiB)

I have the same problem:

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  samba-common
The following packages will be upgraded:
  samba-common
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 0 B/326 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
(Reading database ... 273643 files and directories currently installed.)
Preparing to replace samba-common 2:3.6.3-2ubuntu2.1 (using .../samba-common_2%3a3.6.3-2ubuntu2.2_all.deb) ...
Unpacking replacement samba-common ...
dpkg: warning: samba-common: config file 'etc/dhcp3/dhclient-enter-hooks.d/samba' is a circular link
 (= '/etc/dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/../../dhcp3/dhclient-enter-hooks.d/samba')
dpkg: error processing /var/cache/apt/archives/samba-common_2%3a3.6.3-2ubuntu2.2_all.deb (--unpack):
 unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': Too many levels of symbolic links
Errors were encountered while processing:
 /var/cache/apt/archives/samba-common_2%3a3.6.3-2ubuntu2.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ ll ../dhclient*
-rw-r--r-- 1 root root 1791 Feb 22 21:01 ../dhclient.conf

../dhclient-enter-hooks.d:
total 12
-rwxr-xr-x 1 root root 1028 Dec 17 16:48 avahi-autoipd
-rw-r--r-- 1 root root 1379 Feb 22 21:02 debug
-rw-r--r-- 1 root root 2845 Jan 27 20:11 resolvconf
lrwxrwxrwx 1 root root 40 Jun 1 12:31 samba -> ../../dhcp3/dhclient-enter-hooks.d/samba

../dhclient-exit-hooks.d:
total 16
-rw-r--r-- 1 root root 1378 Feb 22 21:02 debug
-rw-r--r-- 1 root root 806 Jan 4 00:17 ntpdate
-rw-r--r-- 1 root root 1386 Feb 22 21:02 rfc3442-classless-routes
-rwxr-xr-x 1 root root 1025 Dec 17 16:48 zzz_avahi-autoipd

I tried:
$ sudo dpkg -P --force-depends samba-common
$ sudo apt-get install samba-common

Didn't work either:
$ sudo apt-get install samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  samba-common
0 upgraded, 1 newly installed, 0 to remove and ...

Read more...

arnuschky (abrutschy) wrote :

I figured it out:

On my system, dhcp3 was a symlink pointing to dhcp (dunno why). Samba expects two different directories here.

What I did:

cd /etc
rm dhcp3
cp -r dhcp dhcp3
apt-get -f install

Works like a charm. Samba puts a script file in /etc/dhcp/dhclient-enter-hooks.d and links to that file from /etc/dhcp3/dhclient-enter-hooks.d (now we know why it didn't work before) Drawback is that there are now duplicated dhcp config files, which seems rather unclean to me.

Can someone enlighten me what the directory structure is supposed to be?

Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
SeanBoran (sean-boran) wrote :

I came accross this ina similar situation.
When installing samba-common:

dpkg: error processing /var/cache/apt/archives/samba-common_2%3a3.6.3-2ubuntu2.3_all.deb (--unpack):
 unable to open '/etc/dhcp3/dhclient-enter-hooks.d/samba.dpkg-new': No such file or directory

In my case /etc/dhcp3 was a link to /etc/dhcp, because it was needed for Vmware customisations scripts:
http://javierin.com/2012/09/05/template-customization-para-debian-squeeze-en-vsphere-5-0u1/

The samba package just cannot handle that at all though.
Removing the link, allows samba to install:
rm /etc/dhcp3
(or copying the directory as noted above).
Howver this is not nice at all, having two directories for dhcp and one or the other might be read depending on circumstances.

So to me this is bug in the samba packaging.
==> Could this issue be re-opend please and the samba packaing examined?

Haggai Philip Zagury (hagzag) wrote :

I did something similar in order to preserve the dhcp3.

rm /etc/dhcp3
mkdir /etc/dhcp3
ln -s /etc/dhcp/* /etc/dhcp3/

Then I could:
apt-get update
apt-get install samba samba-common !

Still thing this is a bug in samba / samba-common because I had to specify it explicitly.

Whit Blauvelt (whit-launchpad) wrote :

The steps above didn't work for me. What did was pulling /etc/dhcp3/dhclient-enter-hooks.d/samba from a different system.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers