On 18-07-2015 22:50, Steve Ankeny wrote:
On 07/18/2015 02:56 PM, Rowland Penny wrote:
On 18/07/15 19:26, Steve Ankeny wrote:
On 07/18/2015 12:53 PM, Rowland Penny wrote:
On 18/07/15 15:27, Steve Ankeny wrote:
On 07/01/2015 02:39 PM, Steve Ankeny wrote:
thx, I'll look at it when I'm back off my downtime

On 07/01/2015 12:21 PM, Achim Gottinger wrote:
Hello Steve,

You used purge and not remove so all configs got removed as well.
Take an look in /var/lib/samba you may find backup's there done by apt/dpkg durcing upgrades. I have an bunch of backed-up-by-dpkg-on-2015-03-10T16.56.tar.gz files there. Seems these include all the necessary ldb's but they all have an suffix like backed-up-by-dpkg-on-2015-03-10T16.56 here which must be removed.

achim~



ok, finally gave this a try

However, there are STILL errors --

(here are the steps I used in order)

adam@sogo:~$ sudo apt-get remove samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgnutls28 libhogweed2 libldb-dev libldb1 libnettle4 libsmbclient
  python-ldb python-samba samba-common samba-common-bin samba-dev
  samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Suggested packages:
  gnutls-bin heimdal-clients
The following packages will be REMOVED:
libnss-winbind libpam-winbind openchangeproxy openchangeserver samba winbind
The following NEW packages will be installed:
  libgnutls28 libhogweed2 libnettle4
The following packages will be upgraded:
  libldb-dev libldb1 libsmbclient python-ldb python-samba samba-common
samba-common-bin samba-dev samba-dsdb-modules samba-libs samba-vfs-modules
  smbclient
12 upgraded, 3 newly installed, 6 to remove and 8 not upgraded.
Need to get 8,559 kB of archives.
After this operation, 16.1 MB disk space will be freed.
Do you want to continue? [Y/n]Y

(completes without error)

(edit 'dns-nameservers' and restart network)

(reinstall packages that were REMOVED -- using "-f" yields same results)

adam@sogo:~$ sudo apt-get install samba openchangeproxy openchangeserver winbind libnss-winbind libpam-winbind python-ocsmanager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-mapistore python-rpclib python-sievelib python-spyne python-support
  python-tz
Suggested packages:
  bind9 bind9utils ctdb ntp smbldap-tools
The following NEW packages will be installed:
  libnss-winbind libpam-winbind openchangeproxy openchangeserver
python-mapistore python-rpclib python-sievelib python-spyne python-support
  python-tz samba winbind
The following packages will be upgraded:
  python-ocsmanager
1 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,833 kB of archives.
After this operation, 21.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

(errors follow -- highlighted)

Setting up samba (2:4.1.18+dfsg-3~inverse1) ...
Installing new version of config file /etc/logrotate.d/samba ...
Installing new version of config file /etc/init/smbd.conf ...
Installing new version of config file /etc/init.d/samba ...
*update-rc.d: /etc/init.d/samba exists during rc.d purge (use -f to force)**
**dpkg: error processing package samba (--configure):**
** subprocess installed post-installation script returned error exit status 1**
*

OK, This error seems to be coming from the debian postinst script:

if dpkg --compare-versions "$2" lt-nl 2:4.1.13+dfsg-2~; then
# on upgrades from wheezy to jessie, the samba init script should not stay
    # active, see #766690
    update-rc.d samba remove
fi

This is from 'man update-rc.d' :

REMOVING SCRIPTS
When invoked with the remove option, update-rc.d removes any links in the /etc/rcrunlevel.d directories to the script /etc/init.d/name. The script must have been deleted already. If the script is still present
       then update-rc.d aborts with an error message.

So, 'Installing new version of config file /etc/init.d/samba ...' installs the script The debian postinst script tries to remove the links from '/etc/rcrunlevel.d' but fails because the script exists (see line above)

There is a way around this, it doesn't matter if the script exists if the links don't, so, in my opinion, whoever wrote the script should have added '-f', this would remove the links even if the script exists.

Of course, this is really an artifact of using systemd.

Rowland


Thanks, Rowland! I knew you'd take notice (and reply) You've been a big help to me.

*Is there any way for "me" to work around this or must I wait for Inverse?*

I was hoping there might still be a way to use 'dpkg' to force reconfiguration/installation.

Even downloading packages individually and using 'dpkg' is acceptable (until Inverse edits the script)



There may be a way to fix this, open /var/lib/dpkg/status in your favourite editor and search for the 'samba' package, normally it should show as :

Status: install ok installed

Change whatever it says there to match the above, close and save the file. Now run 'update-rc.d -f samba remove' then 'apt-get -f install'

This may fix your system, then again, it may not, all I can suggest is you try it :-)

Rowland

no go

adam@sogo:~$ sudo update-rc.d -f samba remove
  Removing any system startup links for /etc/init.d/samba ...
adam@sogo:~$ sudo apt-get -f install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
adam@sogo:~$

(then running 'apt-get update' & 'apt-get upgrade')

adam@sogo:~$ sudo apt-get install python-ocsmanager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-mapistore python-rpclib python-sievelib python-spyne python-support
  python-tz samba
Suggested packages:
  bind9 bind9utils ctdb ntp smbldap-tools winbind
The following NEW packages will be installed:
python-mapistore python-rpclib python-sievelib python-spyne python-support
  python-tz samba
The following packages will be upgraded:
  python-ocsmanager
1 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,256 kB of archives.
After this operation, 13.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://inverse.ca/ubuntu/ trusty/trusty python-mapistore amd64 3:2.3-zentyal11 [44.4 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/universe python-support all 1.0.15 [26.7 kB] Get:3 http://inverse.ca/ubuntu/ trusty/trusty python-spyne all 2.9.3-1~inverse [117 kB] Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/main python-tz all 2012c-1build1 [32.0 kB] Get:5 http://inverse.ca/ubuntu/ trusty/trusty python-rpclib all 2.8.0-rc-1~inverse [7,530 B] Get:6 http://inverse.ca/ubuntu/ trusty/trusty python-sievelib all 0.8-1 [23.0 kB] Get:7 http://inverse.ca/ubuntu/ trusty/trusty python-ocsmanager all 3:2.3-zentyal11 [67.7 kB]
Fetched 318 kB in 0s (382 kB/s)
dpkg: error: parsing file '/var/lib/dpkg/status' near line 645 package 'samba':
  Config-Version for package with inappropriate Status
E: Sub-process /usr/bin/dpkg returned an error code (2)
adam@sogo:~$

So, there's STILL a problem with the 'samba' package.

I'm going to work it again in a slightly different order (not expecting different results)

It LOOKS like I am dependent upon Inverse modifying the 'samba' script for force the link


hi.

this is just a suggestion, if the problem really just is the postinst script

download the package using wget or other local tool
then unpack it and extract the DEBIAN folder from it like this

*NOTE* foo.deb is the package you modify
*NOTE* tmpdir is the folder you extract the deb archive to.
*NOTE* hacked.deb is the package you install!

    dpkg-deb -x foo.deb tmpdir
    dpkg-deb --control foo.deb tmpdir/DEBIAN

now edit the postinst script

     nano tmpdir/DEBIAN/control

now pack the deb file and install it

    dpkg -b tmpdir hacked.deb
    dpkg -i hacked.deb

I've done this my self a few times, and might just be what you need if you don't want to compile it
just a suggestion.

Regards
Christian Jensen


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to