[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ubuntu-devel-discuss
Subject:    Re: Compiling system for Ubuntu
From:       Dan Kegel <dank () kegel ! com>
Date:       2020-09-12 19:32:24
Message-ID: CAPF-yOZrwexr9MyT_D1kNRR8Z6Qe8x3N=0-Jdk8G9Pr6NcghPQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Here's the rough recipe for building ubuntu 18.04's systemd (well, or
anything, really):

Start a clean ubuntu 18.04 system (perhaps with lxd), then:
sudo apt update
sudo apt dist-upgrade
sudo apt install devscripts
sudo apt build-dep systemd
apt source systemd
cd systemd-237
debuild -b -uc -us
cd ..

That takes 20 minutes or so to run, and should generate a handful of .deb's
in the parent directory, including systemd.

You can then compare the results with the system's systemd package, e.g.
mkdir tmp
cd tmp
apt download systemd
cd ..
sudo apt install diffoscope
diffoscope tmp/systemd_237-3ubuntu10.42_amd64.deb
systemd_237-3ubuntu10.42_amd64.deb

In my case, there were quite a few differences, not sure why.
Nevertheless, I blindly did
  sudo dpkg -i systemd_237-3ubuntu10.42_amd64.deb
to install the result over the system's systemd, and the container did not
explode and catch fire :-)

You should be able to apply your patch immediately before the debuild step.

- Dan

- Dan


On Sat, Sep 12, 2020 at 10:14 AM rafi Moor <moorrafi@hotmail.com> wrote:

>
>
>
>
> Hello,
>
>
>
> I'm trying here after getting no answers in Ubuntu forums.
>
>
>
> I have hard time compiling some Ubuntu packages from source.
>
> 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.
>
> How can I compile systemd so that I get files identical to those of Ubuntu
> 18.04?
>
> Thanks
> Rafi
> --
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>

[Attachment #5 (text/html)]

<div dir="ltr">Here&#39;s the rough recipe for building ubuntu 18.04&#39;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&#39;s in the parent directory, including \
systemd.</div><div><br></div><div>You can then compare the results with the \
system&#39;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&#39;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 &lt;<a \
href="mailto:moorrafi@hotmail.com" target="_blank">moorrafi@hotmail.com</a>&gt; \
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&#39;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&#39;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&#39;t. I&#39;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>


[Attachment #6 (text/plain)]

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic