<div dir="ltr">Here's the rough recipe for building ubuntu 18.04's systemd (well, or anything, really):<div><br></div><div>Start a clean ubuntu 18.04 system (perhaps with lxd), then:<div>sudo apt update</div><div>sudo apt dist-upgrade</div><div>sudo apt install devscripts</div><div>sudo apt build-dep systemd</div><div>apt source systemd</div><div>cd systemd-237</div></div><div>debuild -b -uc -us</div><div>cd ..</div><div><br></div><div>That takes 20 minutes or so to run, and should generate a handful of .deb's in the parent directory, including systemd.</div><div><br></div><div>You can then compare the results with the system's systemd package, e.g.</div><div>mkdir tmp</div><div>cd tmp</div><div>apt download systemd</div><div>cd ..</div><div>sudo apt install diffoscope</div><div>diffoscope tmp/systemd_237-3ubuntu10.42_amd64.deb systemd_237-3ubuntu10.42_amd64.deb </div><div><br></div><div>In my case, there were quite a few differences, not sure why.  Nevertheless, I blindly did</div><div>  sudo dpkg -i systemd_237-3ubuntu10.42_amd64.deb</div><div>to install the result over the system's systemd, and the container did not explode and catch fire :-)</div><div><br></div><div>You should be able to apply your patch immediately before the debuild step.</div><div><br></div><div>- Dan</div><div><br></div><div>- Dan</div><div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 12, 2020 at 10:14 AM rafi Moor <<a href="mailto:moorrafi@hotmail.com" target="_blank">moorrafi@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying here after getting no answers in Ubuntu forums.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN" style="font-size:10pt;font-family:Tahoma,sans-serif">I have hard time compiling some Ubuntu packages from source.<br>
<br>
I now try to compile systemd. On Ubunu 18.04 I've used apt source to get the source that is supposed to include Ubunu patches. After compilation, I replace libsystemd-shared-237.so with the one I've compiled. Programs that are linked with this shared object
 complain about reference to undefined symbol sd_bus_enqueue_for_read. using readelf I can see that the original library has this symbol but the new one doesn't. I've tried to apply CVE-2020-1712-2.patch but then the compilation fails on missing function bus_message_ref_queued().
 This function is included in systemd version 246 but not in 237 which is the version on Ubuntu 18.04.<br>
<br>
How can I compile systemd so that I get files identical to those of Ubuntu 18.04?<br>
<br>
Thanks<br>
Rafi</span><u></u><u></u></p>
</div>
</div>

-- <br>
Ubuntu-devel-discuss mailing list<br>
<a href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com" target="_blank">Ubuntu-devel-discuss@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss</a><br>
</blockquote></div>