[Samba] Upgrading from samba version 4.20.5 to 4.21.1 using Debian Bookworm-backports

Peter Milesson miles at atmos.eu
Wed Nov 6 12:13:06 UTC 2024




On 06.11.2024 12:39, Michael Tokarev via samba wrote:
> 06.11.2024 12:50, spindles seven via samba wrote:
>> Hi
>> I tried to update a member server's samba version from 4.20.5 to 
>> 4.21.1 using Bookworm-backports and get the following error:
>>
>> roy at moggy:~$ sudo apt upgrade
>> Reading package lists... Done
>> Building dependency tree... Done
>> Reading state information... Done
>> Calculating upgrade... Done
>> Some packages could not be installed. This may mean that you have
>> requested an impossible situation or if you are using the unstable
>> distribution that some required packages have not yet been created
>> or been moved out of Incoming.
>> The following information may help to resolve the situation:
>>
>> The following packages have unmet dependencies:
>>   samba : Breaks: samba-ad-dc (< 2:4.20.1+dfsg-2~) but 
>> 2:4.17.12+dfsg-0+deb12u1 is to be installed
>>           Breaks: samba-ad-provision (< 2:4.20.5+dfsg) but 
>> 2:4.17.12+dfsg-0+deb12u1 is to be installed
>> E: Broken packages
>
> For a member server, you don't need samba-ad-dc or samba-ad-provision, 
> - you can
> uninstall these just fine (probably together with 
> samba-dsdb-modules).  Actually
> you don't even have these installed, it seems - so in this your case, 
> I'd recommend
> using `apt upgrade --no-install-recommends` (heh).
>
> Overall, debian backports is always like this, - one have to 
> understand how
> it works. apt considers only packages already installed from bpo to be 
> installable
> from bpo, not any new dependencies which should be *also* installed 
> from backports.
> So in case a new dependency (or a recommendation) appears which refer 
> to backports,
> one have to either explicitly specify `-t bookworm-backports` or 
> resolve  the
> dependencies in other ways.
>
> Here, only new recommends has appeared, not actual dependencies, and 
> that's just
> samba-ad-dc which you don't need anyway, - that's why 
> --no-install-recommends in
> this particular case is ok.
>
> On the other hand, my debian/ubuntu samba repository does not have 
> "NoAutomaticUpgrade: yes'
> setting like backports does (you don't want to install *everything* 
> from backports,
> just select packages, but you do want to install everything from a 
> single package
> repository like mine, since that's the only reason you've added it).  
> I'm not
> suggesting to use my repo, just explaining the difference here.
>
> Thanks,
>
> /mjt
>
>> The following packages are installed:
>> roy at moggy:~$ sudo dpkg -l | grep samba
>> ii  libldb2:amd64 2:2.9.1+samba4.20.5+dfsg-1~bpo12+1        
>> amd64        LDAP-like embedded database - shared library
>> ii  python3-ldb 2:2.9.1+samba4.20.5+dfsg-1~bpo12+1        
>> amd64        Python 3 bindings for LDB
>> ii  python3-samba 2:4.20.5+dfsg-1~bpo12+1                   
>> amd64        Python 3 bindings for Samba
>> ii  samba 2:4.20.5+dfsg-1~bpo12+1                   amd64        
>> SMB/CIFS file, print, and login server for Unix
>> ii  samba-common 2:4.20.5+dfsg-1~bpo12+1                   
>> all          common files used by both the Samba server and client
>> ii  samba-common-bin 2:4.20.5+dfsg-1~bpo12+1                   
>> amd64        Samba common files used by both the server and the client
>> ii  samba-dsdb-modules:amd64 
>> 2:4.20.5+dfsg-1~bpo12+1                   amd64        Samba 
>> Directory Services Database
>> ii  samba-libs:amd64 2:4.20.5+dfsg-1~bpo12+1                   
>> amd64        Samba core libraries
>> ii  samba-vfs-modules 2:4.20.5+dfsg-1~bpo12+1                   
>> amd64        Samba Virtual FileSystem plugins (transitional package)
>>
>> So not sure why it is trying to install samba-ad-dc and 
>> samba-ad-provision as this is a member server not a DC.    (I tried 
>> it on another member server with the same result).
>>
>> Any advice how to proceed please?
>>
>> Thanks,
>>
>> Roy
>
>
Hi folks,

You MAY need to install samba-dsdb-modules, or there may be some error 
messages from winbind. But you may do that, after the main upgrade. I 
had that experience in June 2024, which I reported to the list. I didn't 
note any practical differences though. I don't know if this is still 
valid, however.

Do uninstall samba-ad-dc and samba-ad-provision on the member server 
first, and as Michael pointed out, do not accept suggested or 
recommended packages. I just recently went through this and had no 
problems with the upgrade from 4.20.5 to 4.21.1.

Best regards,

Peter




More information about the samba mailing list