Workaround for building Ubuntu xenial+desktop with qubes-builder

528 views
Skip to first unread message

anoa

unread,
Jan 24, 2017, 2:00:01 AM1/24/17
to qubes...@googlegroups.com
Hey all,

Today I was trying to build the Ubuntu 16.04 Xenial+Desktop template
using qubes-builder with help from these instructions:

https://github.com/QubesOS/qubes-builder

Everything was alright until the `make qubes-vm` step where it would
fail on the following:

> dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../xen_4.6.3.orig.tar.{bz2,gz,lzma,xz}
> dpkg-buildpackage: error: dpkg-source -b debian-vm gave error exit status 255
> /home/user/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:196: recipe for target 'dist-package' failed

The build was looking for xen_4.6.3 when in fact xen_4.6.4 is in the
folder. As a workaround, simply copying the xen_4.6.4 to be named
xen.4.6.3 allowed the build to continue and eventually complete
successfully:

> cd /path/to/qubes-builder/chroot-xenial/home/user/qubes-src/vmm-xen; sudo cp -pr ./xen_4.6.4.orig.tar.gz ./xen_4.6.3.orig.tar.gz

Hope this helps someone while the script is being updated.

Foppe de Haan

unread,
Jan 24, 2017, 2:52:42 PM1/24/17
to qubes-users, an...@openmailbox.org

Thanks for the workaround + prod. :)

Nick Darren

unread,
Jan 28, 2017, 7:34:03 AM1/28/17
to anoa, qubes...@googlegroups.com

Hi all,

It doesn't work by just rename the 'xen_4.6.4.orig.tar.gz' on chroot-xenial. On my case (on testing to build xenial-desktop) needs to copy the file to /path/to/qubes-builder/qubes-src/vmm-xen/. there. Then, it will skip the error message and allowed the build successfully.


Hope this helps someone while the script is being updated.


I have another weird situation. The build was succeed but the problem is, terminal and some others application cannot be launched due to an error, normally on ubuntu's standard installation caused by locales issue. Tried to fix it the way it used to be on normal ubuntu installation or archlinux. But the problem still persists after rebooting the template-vm or any appvms that's based on it.

user@ubuntu-xenial:~$ Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.gnome.Terminal received signal 5

Test on executing gedit from xterm/UXterm/urvtx:

user@ubuntu-xenial:~$ gedit
Gedit failure to execute.
(gedit:5697): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)


The same error happen when I execute the 'xfce4-terminal' or 'terminator'. Still the same 'Trace/breakpoint trap (core dumped)' issues here and there.


--------

Locale was set in order to avoid gnome-terminal error, but it' useless on this case and still failed to work.

user@ubuntu-xenial:~$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us
       X11 Model: pc105+inet
     X11 Options: terminate:ctrl_alt_bksp

--------

On checking qubes local packages installed on the 'xenial-desktop' system.


libqubes-rpc-filecopy2/now 3.2.3+xenialu1 amd64 [installed,local]
  Qubes file copy protocol library

libqubesdb/now 3.2.3-1+xenialu1 amd64 [installed,local]
  QubesDB libs.

libvchan-xen/now 3.2.0-1+xenialu1 amd64 [installed,local]
  Qubes Xen core libraries

libxen-4.6/now 2001:4.6.3-25+xenialu1 amd64 [installed,local]
  Libraries for Xen tools

qubes-core-agent/now 3.2.15-1+xenialu1 amd64 [installed,local]
  Qubes core agent

qubes-gui-agent/now 3.2.13-1+xenialu1 amd64 [installed,local]
  Makes X11 windows available to qubes dom0

qubes-utils/now 3.2.3+xenialu1 amd64 [installed,local]
  Qubes Linux utilities

qubesdb/now 3.2.3-1+xenialu1 amd64 [installed,local]
  QubesDB management tools and daemon.

qubesdb-vm/now 3.2.3-1+xenialu1 amd64 [installed,local]
  QubesDB VM service.

xserver-xorg-input-qubes/now 3.2.13-1+xenialu1 amd64 [installed,local]
  X input driver for injecting events from qubes-gui-agent

xserver-xorg-video-dummyqbs/now 3.2.13-1+xenialu1 amd64 [installed,local]
  Dummy X video driver for qubes-gui-agent

----------------------

So, I would like to know if there's any errors like above happened to you guys too? Or is it me the only person? If it was just me facing the issues, then I would like to know if any missing qubes packaged that's not listed on my side shown like above? You can just check your qubes packages to confirm if any difference spotted on your side by apt search qubes or dpkg-query -l | grep qubes. Any help will be appreciated to spot where the culprits are.


Thanks.

0x4B6E850C.asc
signature.asc

Andrew Morgan

unread,
Jan 28, 2017, 7:39:53 AM1/28/17
to Nick Darren, qubes...@googlegroups.com
Yes I do have the same issue.

It seems it was mentioned a few times on the mailing lists but no concrete solutions were found. People suggested a magic bullet being this command:

sudo dpkg-reconfigure locales

However this command exits prematurely due to the localesall (sp?) package being installed. Some of qubes' scripts/binaries depend on this package, so a removal will render your VM unusable.

Could this hard dependency be removed? Do we really need localesall? Will this even fix it if we do remove it and generate the locales successfully?

Nick Darren

unread,
Jan 28, 2017, 1:53:45 PM1/28/17
to Andrew Morgan, qubes...@googlegroups.com

Weird thing is when I execute 'sudo gnome-terminal' or 'sudo gedit', it's working fine there in my case.

I've been trying to replace locales & locales-all default packages with debian-8 (jessie) & debian-9 (stretch) on my testing ubuntu-template  to test if it's working. Not the right way to do that for sure, it's a dependency hell at the end. Still figure out on how to fix that.

I don't think that locales & locales-all were the main culprits here. I can still using gnome-terminal when I sudo it.

0x4B6E850C.asc
signature.asc

Unman

unread,
Jan 29, 2017, 9:38:09 PM1/29/17
to Nick Darren, anoa, qubes...@googlegroups.com
On Sat, Jan 28, 2017 at 12:31:38PM +0000, Nick Darren wrote:
> /Hi all,/
>
>
> On 01/24/2017 06:59 AM, anoa wrote:
> > Hey all,
> >
> > Today I was trying to build the Ubuntu 16.04 Xenial+Desktop template
> > using qubes-builder with help from these instructions:
> >
> > https://github.com/QubesOS/qubes-builder
> >
> > Everything was alright until the `make qubes-vm` step where it would
> > fail on the following:
> >
> >> dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../xen_4.6.3.orig.tar.{bz2,gz,lzma,xz}
> >> dpkg-buildpackage: error: dpkg-source -b debian-vm gave error exit status 255
> >> /home/user/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:196: recipe for target 'dist-package' failed
> > The build was looking for xen_4.6.3 when in fact xen_4.6.4 is in the
> > folder. As a workaround, simply copying the xen_4.6.4 to be named
> > xen.4.6.3 allowed the build to continue and eventually complete
> > successfully:
> >
> >> cd /path/to/qubes-builder/chroot-xenial/home/user/qubes-src/vmm-xen; sudo cp -pr ./xen_4.6.4.orig.tar.gz ./xen_4.6.3.orig.tar.gz
>
> /It doesn't work by just rename the 'xen_4.6.4.orig.tar.gz' on
> chroot-xenial. On my case (on testing to build xenial-desktop) needs to
> copy the file to /path/to/qubes-builder/qubes-src/vmm-xen/. there. Then,
> it will skip the error message and allowed the build successfully./
>
> > Hope this helps someone while the script is being updated.
> >
>
> /I have another weird situation. The build was succeed but the problem
> is, terminal and some others application cannot be launched due to an
> error, normally on ubuntu's standard installation caused by locales
> issue. Tried to fix it the way it used to be on normal ubuntu
> installation or archlinux. But the problem still persists after
> rebooting the template-vm or any appvms that's based on it./
>
> user@ubuntu-xenial:~$ Error constructing proxy for
> org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling
> StartServiceByName for org.gnome.Terminal:
> GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process
> org.gnome.Terminal received signal 5
>
> /Test on executing gedit from xterm/UXterm/urvtx:/
>
> user@ubuntu-xenial:~$ gedit
> Gedit failure to execute.
> (gedit:5697): GLib-GIO-ERROR **: No GSettings schemas are installed on
> the system
> Trace/breakpoint trap (core dumped)
>
>
> /The same error happen when I execute the 'xfce4-terminal' or
> 'terminator'. Still the same 'Trace/breakpoint trap (core dumped)'
> issues here and there./
>
>
> --------
>
> /Locale was set in order to avoid gnome-terminal error, but it' useless
> on this case and still failed to work./
>
> user@ubuntu-xenial:~$ localectl
> System Locale: LANG=en_US.UTF-8
> VC Keymap: us
> X11 Layout: us
> X11 Model: pc105+inet
> X11 Options: terminate:ctrl_alt_bksp
>
> --------
>
> /On checking qubes local packages installed on the 'xenial-desktop' system.

>
> /
> libqubes-rpc-filecopy2/now 3.2.3+xenialu1 amd64 [installed,local]
> Qubes file copy protocol library
>
> libqubesdb/now 3.2.3-1+xenialu1 amd64 [installed,local]
> QubesDB libs.
>
> libvchan-xen/now 3.2.0-1+xenialu1 amd64 [installed,local]
> Qubes Xen core libraries
>
> libxen-4.6/now 2001:4.6.3-25+xenialu1 amd64 [installed,local]
> Libraries for Xen tools
>
> qubes-core-agent/now 3.2.15-1+xenialu1 amd64 [installed,local]
> Qubes core agent
>
> qubes-gui-agent/now 3.2.13-1+xenialu1 amd64 [installed,local]
> Makes X11 windows available to qubes dom0
>
> qubes-utils/now 3.2.3+xenialu1 amd64 [installed,local]
> Qubes Linux utilities
>
> qubesdb/now 3.2.3-1+xenialu1 amd64 [installed,local]
> QubesDB management tools and daemon.
>
> qubesdb-vm/now 3.2.3-1+xenialu1 amd64 [installed,local]
> QubesDB VM service.
>
> xserver-xorg-input-qubes/now 3.2.13-1+xenialu1 amd64 [installed,local]
> X input driver for injecting events from qubes-gui-agent
>
> xserver-xorg-video-dummyqbs/now 3.2.13-1+xenialu1 amd64 [installed,local]
> Dummy X video driver for qubes-gui-agent
>
> ----------------------
>
> /So, I would like to know if there's any errors like above happened to
> you guys too? Or is it me the only person? If it was just me facing the
> issues, then I would like to know if any missing qubes packaged that's
> not listed on my side shown like above? You can just check your qubes
> packages to confirm if any difference spotted on your side by apt search
> qubes or dpkg-query -l | grep qubes.//Any help will be appreciated to
> spot where the culprits are.
> //
>
> //Thanks./
>

The error with Xen version affects all Debian builds - it isnt Ubuntu
specific. That's interesting, because it shouldn't happen (obviously).

The error with gnome apps should have been fixed - I submitted a PR for
that some time ago - I'll look at it again today.

unman

Andrew M

unread,
Jan 30, 2017, 2:01:00 PM1/30/17
to Unman, Nick Darren, qubes...@googlegroups.com
Thanks Unman,

This bug is currently affecting my work so it would be greatly
appreciated if it were resolved :)

Unman

unread,
Feb 1, 2017, 7:07:38 PM2/1/17
to Andrew M, Nick Darren, qubes...@googlegroups.com
The build issue should be fixed now.
I've alse submitted a better patch to fix the XDG path issue - again
I'd expect that to be incorporated soon.

The xenial build should be as straightforward as:
./setup
make qubes-vm
make template

install template in dom0

That works for me, so let me know if you have any problems and I'll try
to help.

Now to get Trusty working again.

Nick Darren

unread,
Feb 3, 2017, 1:22:35 AM2/3/17
to Unman, qubes...@googlegroups.com
The build issue is gone. But the template itself still having the same
error 'Trace/breakpoint trap (core dumped)' here and there on
application launch via xterm i.e. rhythmbox, gedit, xfce4-terminal etc.

Default application like gnome-terminal still cannot be launched due to
the same error as before. 

Did you test all these applications working or
not? 

By getting these error means xenial-desktop template is useless for
everyday use for some purpose.


P/S- Sorry unman, double post forgot to put cc there to qubes-users.
signature.asc

Unman

unread,
Feb 3, 2017, 11:41:45 AM2/3/17
to Nick Darren, qubes...@googlegroups.com
I dont see these errors at all on a fresh build - all those seem to work
fine. I'm using xenial+desktop as dispVM and havent encountered any
issues.

On the other error, look at /etc/X11/Xsession.d/25xdg-qubes-settings:
you should see XDG_DATA_DIRS being set.
`env` should show you a path like this:
/usr/share/ubuntu/:/usr/share/gnome:/user/local/share:/usr/share

If you don't have that set it and export it -see if that fixes the
problem.

anoa

unread,
Feb 4, 2017, 12:13:23 AM2/4/17
to qubes...@googlegroups.com
Hey Unman, really appreciate your work.

Unfortunately I'm having the same issue as Nick.

http://i.imgur.com/VjBU4b4.png

I did not have any reference of XDG_DATA_DIRS in my 25xdg-qubes-settings
file, but after setting the env variable to what you mentioned it didn't
seem to make any difference.

Again, perhaps the removal of the locales-all package to enable the
`sudo dpkg-reconfigure locales` command to execute could hold some answers?

Andrew

signature.asc

Nick Darren

unread,
Feb 4, 2017, 1:47:18 PM2/4/17
to anoa, qubes...@googlegroups.com
Problem solved by adding this to /etc/X11/Xsession.d/25xdg-qubes-settings:

 if [ "$XDG_DATA_DIRS" = "" ]; then
     XDG_DATA_DIRS='/usr/share/ubuntu/:/usr/share/gnome/:/usr/local/share/:/usr/share/'
     export XDG_DATA_DIRS
fi

Restart the template after that. Working great without problem after that.

Hope this help everyone who got the trouble before.

No need to execute `sudo dpkg-reconfigure locales`

Thank you unman, I wonder why this patch doesn't work at first after I personally added your unconfirmed patches before start compiling the template.
signature.asc

Unman

unread,
Feb 4, 2017, 2:49:53 PM2/4/17
to Nick Darren, anoa, qubes...@googlegroups.com
Stupid me - that patch is in master, but we're building release3.2, and
I didnt have clean source tree to boot. I'll see about getting that
fixed, so that 3.2 just works.

Thanks to you both for your patience. Andrew - if you're still having
problems try editing the 25xdg-qubes-settings file or export the path
from .bashrc. Either works. Keep us posted if you're still having
problems.

anoa

unread,
Feb 4, 2017, 3:03:20 PM2/4/17
to qubes...@googlegroups.com
Yep, that seems to do the trick! Thank you very much Unman, I was
exporting it manually which prevents a reboot with the variable set, and
thank you Nick for additional testing.

signature.asc

Reg Tiangha

unread,
Apr 18, 2017, 9:22:18 PM4/18/17
to qubes-users, secur...@gmail.com, an...@openmailbox.org, un...@thirdeyesecurity.org

Sorry to resurrect a dead thread, but what was the fix? I'm encountering the same issue with trying to compile jessie and stretch debs, except this time it's looking for Xen 4.6.4 instead of 4.6.5. I installed Xen 4.6.5 in dom0 from current-testing and I've started to encounter VMs freezing or not starting properly with PVGRUB kernels (works fine with the default kernel) and I'm wondering if it's because matching Xen packages weren't pushed out on jessie or stretch, thus I'm trying to compile my own based on the new version to see if that fixes it (although to be fair, there've been a lot of updates recently so it could be any combination of things).

Unman

unread,
Apr 22, 2017, 4:14:41 PM4/22/17
to Reg Tiangha, qubes-users, secur...@gmail.com, an...@openmailbox.org
On Tue, Apr 18, 2017 at 06:22:18PM -0700, Reg Tiangha wrote:
> On Sunday, January 29, 2017 at 7:38:09 PM UTC-7, Unman wrote:
> > On Sat, Jan 28, 2017 at 12:31:38PM +0000, Nick Darren wrote:
> > > /Hi all,/
> > >
> > >
>
> Sorry to resurrect a dead thread, but what was the fix? I'm encountering the same issue with trying to compile jessie and stretch debs, except this time it's looking for Xen 4.6.4 instead of 4.6.5. I installed Xen 4.6.5 in dom0 from current-testing and I've started to encounter VMs freezing or not starting properly with PVGRUB kernels (works fine with the default kernel) and I'm wondering if it's because matching Xen packages weren't pushed out on jessie or stretch, thus I'm trying to compile my own based on the new version to see if that fixes it (although to be fair, there've been a lot of updates recently so it could be any combination of things).

Marek has already pushed a fix - you need to update your build
directories. (It was just that the Debian changelog hadnt been updated
to match the new version.)

Foppe de Haan

unread,
Jul 16, 2017, 3:41:44 AM7/16/17
to qubes-users, rtia...@gmail.com, secur...@gmail.com, an...@openmailbox.org, un...@thirdeyesecurity.org
Bit OT, but Would anyone be willing to (briefly) indicate the difference between xenial and xenial+desktop? I tried googling, but I can't really find any info on it.

Unman

unread,
Jul 16, 2017, 10:15:35 AM7/16/17
to Foppe de Haan, qubes-users
On Sun, Jul 16, 2017 at 12:41:43AM -0700, Foppe de Haan wrote:
> Bit OT, but Would anyone be willing to (briefly) indicate the difference between xenial and xenial+desktop? I tried googling, but I can't really find any info on it.
>

Xenial template provides a basic system, not minimal but quite
small.
Xenial-desktop installs the ubuntu-desktop package, which gives you
pretty much everything you would expect in a standard "desktop"
installation - graphics tool and viewers , office suite, music player,
etc.
For full details look at the package contents here:
https://packages.ubuntu.com/xenial/ubuntu-desktop

unman

Foppe de Haan

unread,
Jul 16, 2017, 2:08:47 PM7/16/17
to qubes-users, 0spin...@gmail.com, un...@thirdeyesecurity.org

Thanks :)

Reply all
Reply to author
Forward
0 new messages