[Samba] new DC via clone..

Matthias Kühne | Ellerhold Aktiengesellschaft matthias.kuehne at ellerhold.de
Fri Jul 26 06:18:12 UTC 2024


Hello,

Ive got reasonable success using these scripts:

sudo apt install debhelper devscripts
# This was for Samba 4.18 in bullseye. Maybe not needed for bookworm? 
sudo apt install -t bullseye-backports libglusterfs-dev

BASE_DIR="$(realpath `dirname $0`/../)"
cd "${BASE_DIR}"

mkdir -p build
rm -Rf build/samba-* build/*.deb
cd build

sudo apt update
apt source samba
cd $(find "${BASE_DIR}/build" -maxdepth 1 -type d -name 'samba-*')

# https://bugzilla.samba.org/show_bug.cgi?id=15342
for patch in ${BASE_DIR}/patches/* ;
do
if [ -f "${patch}" ];
then
echo "Apply Patch ${patch}..."
patch -p0 -i "${patch}"
fi
done

sudo mk-build-deps --install --remove
# For errors that certain packages could ne be found, install them via 
apt install

dch --local="-my-compiled-$(date +"%Y%m%d%H%M")-"

cd $(find "${BASE_DIR}/build" -maxdepth 1 -type d -name 'samba-*')

dpkg-buildpackage -us -uc -b

Hope this helps.

You need a deb-src line in your sources.list file!

Regards, Matthias.

Am 25.07.24 um 17:06 schrieb Joachim Lindenberg via samba:
> Hello Rowland,
> I have to recognize that asking to compile the distro version is a valid argument.
> Hello Michael,
> can you please explain, how I can compile Samba as I am using your distro (deb [signed-by=/etc/apt/mjt.key]http://www.corpit.ru/mjt/packages/samba  jammy/samba-4.19/)?
> Thanks,
> Joachim
>
>> -----Ursprüngliche Nachricht-----
>> Von: samba<samba-bounces at lists.samba.org>  Im Auftrag von Rowland
>> Penny via samba
>> Gesendet: Mittwoch, 24. Juli 2024 11:31
>> An:samba at lists.samba.org
>> Cc: Rowland Penny<rpenny at samba.org>
>> Betreff: Re: [Samba] new DC via clone..
>>
>> On Wed, 24 Jul 2024 09:01:54 +0200
>> Joachim Lindenberg via samba<samba at lists.samba.org>  wrote:
>>
>>> Hello Rowland, all of Samba,
>>>
>>> imho the fact that one cannot simply replace parts of samba is a
>>> severe restriction to analyze and fix issues. I decided to compile the
>>> exact same version that was in place, and ran into issues.
>> Well yes, but you seemingly didn't compile Samba in the same way as your
>> original installed Samba.
>>
>>> Imho Samba should have instructions on how to compile a version
>>> matching the installed version and configuration. Figuring out the
>>> delta between the two configurations is beyond my current knowledge.
>> And mine.
>>
>>> My goal was very, very simple. In line 630 of
>>> source4/samba/process_prefork.c I wanted to add the service name in
>>> order to make visible, what service failed: DBG_ERR("Parent %d, Child
>>> %d, Service %s exited with status %d\n", getpid(), pid,
>>> rc->service_name, status);
>> Whilst this sounds very easy to do, to do it correctly you would need to know
>> just where 'process_prefork.c' ends up, what particular part of Samba uses it,
>> once that is known, you could just replace that particular piece of Samba,
>> provided everything else is compiled exactly in the same way, I don't think
>> that would be easy. The easiest way would be to rebuild your distros Samba
>> package sources using your slight change and then install the resultant Samba
>> packages over your install.
>>
>> Rowland
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:https://lists.samba.org/mailman/options/samba
>
-- 
Senior Webentwickler
Datenschutzbeauftragter

Ellerhold Aktiengesellschaft
Friedrich-List-Str. 4
01445 Radebeul

Telefon: +49 (0) 351 83933-61
Web:www.ellerhold.de
Facebook:www.facebook.com/ellerhold.gruppe
Instagram:www.instagram.com/ellerhold.gruppe
LinkedIn:www.linkedin.com/company/ellerhold-gruppe  

Amtsgericht Dresden / HRB 23769
Vorstand: Stephan Ellerhold, Maximilian Ellerhold
Vorsitzender des Aufsichtsrates: Frank Ellerhold


---Diese E-Mail und Ihre Anlagen enthalten vertrauliche Mitteilungen. Sollten Sie nicht der beabsichtigte Adressat sein, so bitten wir Sie um Mitteilung und um sofortiges löschen dieser E-Mail und der Anlagen.

Unsere Hinweise zum Datenschutz finden Sie hier: http://www.ellerhold.de/datenschutz/

This e-mail and its attachments are privileged and confidential. If you are not the intended recipient, please notify us and immediately delete this e-mail and its attachments.

You can find our privacy policy here: http://www.ellerhold.de/datenschutz/




More information about the samba mailing list