[qubes-builder] error while building ubuntu trusty (No package 'libsystemd' found)

715 views
Skip to first unread message

john....@fake-box.com

unread,
Apr 23, 2016, 1:05:12 PM4/23/16
to qubes...@googlegroups.com
hi.
i am trying to build a trusty+desktop+salt ubuntu template.

i used the builder from the main repo and set it up (3.1; default repo; builder fedora + debian + salt;

the step make qubes-vm always fails at qubesdb:

Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd' found

(log: http://pastebin.com/WB3HaD1b)

what can i do to fix this error?

-john

Marek Marczykowski-Górecki

unread,
Apr 23, 2016, 4:32:34 PM4/23/16
to john....@fake-box.com, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, Apr 23, 2016 at 07:05:09PM +0200, john....@fake-box.com wrote:
> hi.i am trying to build a trusty+desktop+salt ubuntu template.i used the builder from the main repo and set it up (3.1; default repo; builder fedora + debian + salt;the step make qubes-vm always fails at qubesdb:Package libsystemd was not found in the pkg-config search path.Perhaps you should add the directory containing `libsystemd.pc'to the PKG_CONFIG_PATH environment variableNo package 'libsystemd' found(log: http://pastebin.com/WB3HaD1b)what can i do to fix this error?-john

It looks like libsystemd-dev dependency is set only for vanilla Debian:
https://github.com/QubesOS/qubes-core-qubesdb/blob/master/debian/control#L7-L9

You probably need to add it also for trusty.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXG9vWAAoJENuP0xzK19cssXIIAIlrPHIGqIT3UEhTRHCGaMro
Mc4lOGVyS/CMO5NS1SzcbvCV2JuhY/V8bg8k0/qwq9dn0sF7FdcZWmytpE2wRDa3
vkJuRcVPCEzppSQW7Q0n1WHC59Cxv+KqZgjWkYZGJxKcu0BTdBQxKEAmM0F8twFL
8AnUCX/6nbTlBinjyF/xAQJ8TA432v/6FiJvmKFb+0ECYX1aXq9aubbHGcnim8vH
jeiyAC8Vdr0e9wX8bXvPhnfeK5x731M6KyBL9Ypo7TXgLaLy2bAY313iY6sSdu3d
PEdcj0tcvkQUh1XYycxX4DtxyNfseh9U4HuRzGWDMP7YFJXDgJVpnVyM/C/D0qI=
=5o1J
-----END PGP SIGNATURE-----

Marek Marczykowski-Górecki

unread,
Apr 23, 2016, 11:16:06 PM4/23/16
to john....@fake-box.com, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, Apr 24, 2016 at 02:02:51AM +0200, john....@fake-box.com wrote:
> i added
> X-Qubes-Build-Depends-trusty: libsystemd-dev
> to the file
> qubes-core-qubesdb/debian/control
> and got an other error:
> E: Unable to locate package libsystemd-dev
> (see http://pastebin.com/am4ePFJe)
>
> then i tried:
> X-Qubes-Build-Depends-trusty: libsystemd-daemon-dev
> this got me past the point, but it created a new error
> dpkg-source: error: syntax error in core-qubesdb/debian/control at line 14:
> block lacks the 'Package' field
> (see http://pastebin.com/cDMCcyrh)
> but the block in line 15 begins with a Package field....

You probably added some blank line there in addition to
X-Qubes-Build-Depends-trusty.

> then i used git reset --hard to reset the control file and called make qubes-vm
> again.
> i spotted sometimes the output
> make[1]: qubes-src/app-linux-split-gpg/debian-quilt: Command not found
> (see http://pastebin.com/433ALHjv)
> but the command finished.

It is safe to ignore missing debian-quilt there.

> if i now run make template it fails:
> W: Failed to fetch http://mirror.csclub.uwaterloo.ca/ubuntu/dists/utopic/main/
> binary-amd64/Packages 404 Not Found
> (see http://pastebin.com/WZGPAHNL and http://pastebin.com/MxZ3J80C)
>
> following this post:
> https://groups.google.com/d/msg/qubes-users/0ocNgFWlpTM/-mi2nlnBCgAJ
> i replaced line 11 in
> qubes-src/builder-debian/template_qubuntu/02_install_groups_trusty.sh
> with
> deb http://old-releases.ubuntu.com/ubuntu/ utopic main
>
> the next call to make template runs for a long time and finally fails:
> "
> Reading state information...
> 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:
> qubes-mgmt-salt-vm : Depends: qubes-mgmt-salt but it is not going to be
> installed
> Recommends: qubes-mgmt-salt-vm-python-pip but it is not
> installable
> E: Unable to correct problems, you have held broken packages.
> Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
> Makefile:47: recipe for target 'rootimg-build' failed
> make[1]: *** [rootimg-build] Error 100
> "
> (see http://pastebin.com/zjuEZ1ky) (its only the last portion of the log. (the
> last 1000 lines))

This is because Salt in Qubes VM support isn't finished yet:
https://www.qubes-os.org/news/2015/12/14/mgmt-stack/
https://github.com/QubesOS/qubes-issues/issues/1541

For now, the easiest thing to do, is to drop "+salt" from template flavor.

PS Please keep conversation on mailing list (use "Reply All").
PPS text/plain part of your messages is messed up - looks like stripped
of all newlines...

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXHDpwAAoJENuP0xzK19csBJEH/jXZdofa0hRKG2vV6YFatDV/
/y5OQpWjh5rixJn85idGbnd9F89yxglFPkS0mzYGZjuM68/pG+jGiLD9mktYyoJD
vcpZiATxK9rjf6GIQfZUADZNWsz4I8ULBH47IlvnGgarVi5VDOiyafI533Yfms3P
CuXsxcfEcxVqQFEGgKDBUCRefUqyxWCsFHZd+ptZ9hsYzzu4Qv+Z8NxKEAexfvVh
Z5f+b5TMq0toimJFhYzNlTC0K4bVFR1EELU5ONiYNva0jlIk+GojrqhTPUfzZhG3
u10imCYik6/St12Hz0B1Eo5qh9USPorrndM7Tfa3ahcXcQ7FhXiX8pG2gKYqQRw=
=cIuE
-----END PGP SIGNATURE-----

john....@fake-box.com

unread,
Apr 24, 2016, 9:55:04 AM4/24/16
to qubes...@googlegroups.com
i dropped +salt and now i get an error concerning unmet dependencies. (as always for systemd)


The following packages have unmet dependencies:
 systemd-services : Depends: libsystemd-daemon0 (= 204-5ubuntu20) but 208-8ubuntu8 is to be installed

http://pastebin.com/8aVXx8G1

Marek Marczykowski-Górecki

unread,
Apr 24, 2016, 4:35:19 PM4/24/16
to john....@fake-box.com, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Interesting, according to packages.ubuntu.com, there is no version in
trusty:
http://packages.ubuntu.com/trusty/libsystemd-daemon0
http://packages.ubuntu.com/trusty-updates/libsystemd-daemon0

Ah, I see - systemd in trusty template is installed from utopic:
https://github.com/QubesOS/qubes-builder-debian/blob/master/template_qubuntu/02_install_groups_trusty.sh#L7-L28

I have no idea why, but probably there was some reason for it. Anyway
you can try to remove this file
(emplate_qubuntu/02_install_groups_trusty.sh) and check what will
happen. You will need to remove
qubes-src/linux-template-builder/prepared_images/trusty.img to force
building that part again.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXHS3+AAoJENuP0xzK19csdwQH/jwQRdudFdrMzva3nB6RHTtl
Jgi7Hlf5UTwskfp/Fh7xpVkF5Vn3w+KVzVEsLrJpwlmpsmvKG2AoQLJ7hT13QvJN
nWM/Tjh92u4fdMIiHjDqnPH9P54rNBcyzquvjxJgXr8zIT4fYd23GAlu89yMQJh9
KzuIJdrYtMxCY3o2L1+niqYsR1Goh9PBG0rzFhROfXCFIzShICN59h7o7XEEjvcq
9rP6jGN658xLaOrOMh82D51Veao+n3kq30GsLGjSBpjeWKGa0jN1liHul46FUlR1
PWG8jSwMJYSoRS0K9sV70Sd0Gge5A2xJKJ1cW9Ba37FLAfqnFiyArejXZeTLoyQ=
=2cK4
-----END PGP SIGNATURE-----

john....@fake-box.com

unread,
Apr 25, 2016, 2:28:31 AM4/25/16
to qubes...@googlegroups.com
i deleted the groups file (template_qubuntu/02_install_groups_trusty.sh) and image (qubes-src/linux-template-builder/prepared_images/trusty.img) and build again.

While building i got some errors about packages not being found and deleted corresponding packages from the package lists:

E: Package 'vim-nox' has no installation candidate
E: Unable to locate package keepassx
E: Package 'haveged' has no installation candidate
E: Unable to locate package linux-firmware-nonfree

(deleted from qubes-src/builder-debian/template_qubuntu/packages_trusty.list)

E: Package 'xfonts-100dpi' has no installation candidate
E: Package 'xfonts-75dpi' has no installation candidate

(deleted from qubes-src/builder-debian/template_debian/packages_qubes.list)

when building now, i get an error about missing dependencies for qubes-core-agent and qubes-gui-agent:
 qubes-core-agent : Depends: locales-all but it is not installable
                    Depends: systemd but it is not installable
                    ...
 qubes-gui-agent : Depends: python-xpyb but it is not installable
                   Recommends: qt4-qtconfig but it is not installable
(see http://pastebin.com/5y1UN6YX)

it seems this is the reason why systemd was pulled from the utopic repos.

What should i do now?
Do others have the same problems when building trusty? (maybe i am doing something just wrong...)
if it works for someone: how did you build this template?

-john

Achim Patzner

unread,
Apr 26, 2016, 6:10:57 PM4/26/16
to qubes...@googlegroups.com
On 04/24/2016 10:35 PM, Marek Marczykowski-Górecki wrote:
> Ah, I see - systemd in trusty template is installed from utopic:
> https://github.com/QubesOS/qubes-builder-debian/blob/master/template_qubuntu/02_install_groups_trusty.sh#L7-L28
>
> I have no idea why,

Because systemd invaded Ubuntu only at version 14.10.

> but probably there was some reason for it.

probably to avoid adapting .../daemon NOT to look for its pkgconfig. No
systemd, no qubes-core-agent.


Achim

Marek Marczykowski-Górecki

unread,
Apr 26, 2016, 8:35:47 PM4/26/16
to Achim Patzner, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Theoretically it should be possible to build qubes-core-agent-linux
without systemd. But in practice we haven't done that for years and
probably will require some fixes. The same for qubes-core-qubesdb -
there is a comment about it:
https://github.com/QubesOS/qubes-core-qubesdb/blob/master/daemon/db-daemon.c#L27-L31
/* For now link with systemd unconditionaly (all Fedora versions are
* using it,
* Archlinux also). But if someone needs no systemd in dependencies,
* it can be easily turned off, check the code in main() - conditions on
* getenv("NOTIFY_SOCKET").
*/

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXIAlaAAoJENuP0xzK19csS4UH/jj/kWihh52u/m9JX+zRW58F
B+VKCFuahs6zILPnfZckhBxaGwlnngwLbm3ij8xodefGOF2AQzJ9b1gRJMiykw5P
l/5KQrIgkflgvtAwnxwSn226xwbdknUQtvPx9SVXZX+z2mVZ8/bvdOe8hkL/QkhN
DD6K58M+fXhGEqlx+XDKCHaUibsav2zq1LB0ld0U4ysm1GN59LLtISgbOv6qd2Jw
7FVA4dlNyzGQ7By1GEz4UvmR65cOYza4TXpAtNi1yn9RkSkT5PpPYp5gnW03E6h5
Udoo4rXKW0vxn/yhiklfBhhLFuDLq/b3YmhoDQw/Z7TI0xYQ2z4BQgxjCAl9FXg=
=NORB
-----END PGP SIGNATURE-----

Achim Patzner

unread,
Apr 27, 2016, 5:33:23 AM4/27/16
to qubes...@googlegroups.com
On 04/27/2016 02:35 AM, Marek Marczykowski-Górecki wrote:
> Theoretically it should be possible to build qubes-core-agent-linux
> without systemd.

I tried that last Sunday but it didn't work; it really needs some
functions from libsystemd.

> But in practice we haven't done that for years and
> probably will require some fixes.

Wouldn't it be easier to retire all Ubuntu template builds before Ubuntu
14.10 (now that the latest LTS is out) instead of trying to grow a
chimera that will not be viable for more than a few months? It will
probably need less work to get 16.04 going (systemd changed again;
building the chroot-(q)ubuntu and then updating it doesn't work either,
I tried that 8-) ) (see what a 500 MBit/s line can do to a desperate
person) than fixing the current template.

As to why I'd really like to get a Ubuntu template running: There are
enough "convenience" tools to correct shortcomings of most applications
around (Thunderbird is a good example -- you either deal with
userChrome.css by hand. use Mac OS or Windows or start wearing
magnifying glasses for work. Or you use Ubuntu.) Yes, I'm lazy. I don't
want to find out how to customize my daily work environment by hand and
I do not appreciate having to hire an operator/system manager for my
workplace machine either. Which doesn't mean that I'm unwilling to pay
for solutions; start adding support for variable and I'd be the first
one providing funding for something like this
http://www.ebay.de/itm/Lenovo-ThinkPad-W540-i7-4930XM-8GB-512GB-LTE-WANN-GARANZIA-FINO-2019-DISPONIBILE-/141969147221?hash=item210e054555:g:Kw0AAOSwMmBVsMcU
(provided that you take care of getting the system to you and all I have
to provide is my credit card 8-) -- did I mention I was lazy?).


Achim

Reply all
Reply to author
Forward
0 new messages