Ubuntu Template

413 views
Skip to first unread message

Michael MENG

unread,
Jun 25, 2017, 7:31:15 AM6/25/17
to qubes-users

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

https://www.reddit.com/r/Qubes/comments/5vzg04/idiots_guide_to_installing_qbuntu_ubuntu_1604/

Everything was alright until the `make template` step where it would
fail on the following:

makefile:294: recipe for target 'template-local-xenial+desktop' failed

Unman

unread,
Jun 25, 2017, 10:09:36 AM6/25/17
to Michael MENG, qubes-users
Some of the recent commits have broken the Ubuntu builds.
I'll provide patches soon.

unman

Unman

unread,
Jun 27, 2017, 8:03:43 PM6/27/17
to Michael MENG, qubes-users
PR submitted - until it's merged just copy the PATH line from
/builder-debian/template_debian/vars.sh in to template_qubuntu/vars.sh:

unman

Michael MENG

unread,
Jun 29, 2017, 1:20:49 AM6/29/17
to qubes-users
Thank you so much for help, Unman, can you please give me step, i dont know how to export PATH, because i am very new in linux and qubes.

Unman

unread,
Jun 29, 2017, 6:59:25 PM6/29/17
to Michael MENG, qubes-users
On Wed, Jun 28, 2017 at 10:20:49PM -0700, Michael MENG wrote:
> Thank you so much for help, Unman, can you please give me step, i dont know how to export PATH, because i am very new in linux and qubes.
>
The PR has been merged, so you just need to 'git pull' and 'make
get-sources' before you try another build.

Michael MENG

unread,
Jul 7, 2017, 11:42:47 PM7/7/17
to qubes-users, michae...@gmail.com, un...@thirdeyesecurity.org

yeah!!! Unman, Thank you so much, it's work, but do you know how to install libre office to template? and how to show unbuntu desktop?

Unman

unread,
Jul 8, 2017, 5:58:10 PM7/8/17
to Michael MENG, qubes-users
Open a terminal in the Template.
Edit /etc/apt/sources.list (You can use emacs, vi or nano)
ADD Two lines:
deb http://archive.ubuntu.com xenial-security main universe multiverse restricted
deb http://archive.ubuntu.com xenial-updates main universe multiverse restricted
Close the file.
(I've just put in a PR to have these by default)

Then:
apt-get update
apt-get upgrade
apt-get install libreoffice

Alternatively, try using aptitude - it's a simple but very usable front
end to package management.
If you select libreoffice it will install all dependencies and all
office apps.
If you install ubuntu-desktop (apt-get install ubuntu-desktop), it will
install ALL the desktop applications, including libreoffice,
rhythmbox,nautilus etc etc. That's quite a bit - around 450 MB - but it
gives you a near complete Ubuntu desktop experience.

unman

Michael MENG

unread,
Jul 9, 2017, 12:44:06 AM7/9/17
to qubes-users
Thanks, i did "apt-get install ubuntu-desktop" and install all application, i found all application in shortcut, but still cant found the desktop like Windows.

Foppe de Haan

unread,
Oct 1, 2017, 7:45:59 AM10/1/17
to qubes-users
Just an fyi: building ubuntu templates in/for R4 isn't currently possible, getting errors related to qubesxdg while building core-agent-linux-vm.

Unman

unread,
Oct 1, 2017, 11:03:44 AM10/1/17
to Foppe de Haan, qubes-users
On Sun, Oct 01, 2017 at 04:45:59AM -0700, Foppe de Haan wrote:
> Just an fyi: building ubuntu templates in/for R4 isn't currently possible, getting errors related to qubesxdg while building core-agent-linux-vm.
>

Yes, I'm working on this. I'm traveliing just now but will finish off
when I get home.

unman

rysiek

unread,
Oct 1, 2017, 4:07:23 PM10/1/17
to qubes...@googlegroups.com
Dnia Sunday, October 1, 2017 4:03:43 PM CEST Unman pisze:
I have a build environment I was meaning to get back up to speed, if you need
a tester, let me know!

--
Pozdrawiam,
Michał "rysiek" Woźniak

Zmieniam klucz GPG :: http://rys.io/pl/147
GPG Key Transition :: http://rys.io/en/147
signature.asc

rysiek

unread,
Oct 14, 2017, 4:06:16 PM10/14/17
to qubes...@googlegroups.com
Hey all,

got the build environment up and running, tried building Ubuntu Xenial and
Zesty images, both failed with:

debian/rules override_dh_install
make[1]: Entering directory '/home/user/qubes-src/core-agent-linux'
dh_install --fail-missing
dh_install: qubes-core-agent missing files: lib/systemd/system/avahi-
daemon.service.d/30_qubes.conf
dh_install: qubes-core-agent missing files: lib/systemd/system/
exim4.service.d/30_qubes.conf
dh_install: qubes-core-agent missing files: lib/systemd/system/netfilter-
persistent.service.d/30_qubes.conf
dh_install: usr/lib/python2.7/dist-packages/qubesxdg.pyc exists in debian/tmp
but is not installed to anywhere
dh_install: usr/lib/python2.7/dist-packages/qubesxdg.pyo exists in debian/tmp
but is not installed to anywhere
dh_install: missing files, aborting
debian/rules:28: recipe for target 'override_dh_install' failed
make[1]: *** [override_dh_install] Error 2
make[1]: Leaving directory '/home/user/qubes-src/core-agent-linux'
debian/rules:12: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status
2
/home/qubes/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:200:
recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 2

Using git://github.com/marmarek/qubes-builder.git master branch. What am I
missing?
signature.asc

Unman

unread,
Oct 14, 2017, 6:30:19 PM10/14/17
to rysiek, qubes...@googlegroups.com
It's the same error resported by OP.
Ubuntu template build hasnt yet been updated to 4.0

rysiek

unread,
Oct 15, 2017, 9:46:44 AM10/15/17
to qubes...@googlegroups.com
Dnia Saturday, October 14, 2017 11:30:16 PM CEST Unman pisze:
> It's the same error resported by OP.
> Ubuntu template build hasnt yet been updated to 4.0

Ah, so it is. Any way I can help with debugging/testing/fixing this?
signature.asc

rysiek

unread,
Nov 12, 2017, 10:51:36 AM11/12/17
to qubes...@googlegroups.com
Hey,

Dnia Saturday, October 14, 2017 11:30:16 PM CET Unman pisze:
> Ubuntu template build hasnt yet been updated to 4.0

is there any movement on this? Is there any way I can jump into this and help?
Any docs I should read to get me started along the way of fixing Ubuntu
templates for R4.0?
signature.asc

rysiek

unread,
Nov 12, 2017, 7:41:48 PM11/12/17
to qubes...@googlegroups.com
Hey,

Dnia Sunday, November 12, 2017 4:51:20 PM CET rysiek pisze:
> is there any movement on this? Is there any way I can jump into this and
> help? Any docs I should read to get me started along the way of fixing
> Ubuntu templates for R4.0?

got it to start building. For this I had to make some changes in:

- debian/qubes-core-agent.install (from `qubes-core-agent-linux` repo)
- debian/qubes-gui-agent.install (from `qubes-gui-agent-linux` repo)

Diffs at the bottom.

Didn't make a PR since I have no idea what are the ramifications and potential
consequences of these particular changes for the operation/security of built
templates. I assume the files removed are important (otherwise they wouldn't
have been there in the first place).

Now, during template build I got:
./create_template_list.sh: line 13: xenstore-read: command not found

Not sure how serious it is; the template seems to have been built. Installing
it, however, spits out an error:
trusty: qubes.PostInstall service failed
(full log below).

Running anything in a new AppVM based on this template fires it up for a few
seconds, shows what I can only assume are boot messages (screenshot attached)
and then the window disappears and nothing else happens.

Any pointers how to proceed with debugging and fixing the Ubuntu templates
would be appreciated.



$ sudo yum install qubes-template-trusty-4.0.0-201711122203.noarch.rpm
Redirecting to '/usr/bin/dnf install qubes-template-
trusty-4.0.0-201711122203.noarch.rpm' (see 'man yum2dnf')

Qubes OS Repository for Dom0 13 MB/s | 77 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
qubes-template-trusty noarch 4.0.0-201711122203 @commandline 436
M

Transaction Summary
================================================================================
Install 1 Package

Total size: 436 M
Installed size: 1.9 G
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : qubes-template-trusty-4.0.0-201711122203.noarch
1/1
trusty: Importing data
2621440+0 records in
2621440+0 records out
10737418240 bytes (11 GB, 10 GiB) copied, 30.3018 s, 354 MB/s
trusty: qubes.PostInstall service failed
Verifying : qubes-template-trusty-4.0.0-201711122203.noarch
1/1

Installed:
qubes-template-trusty.noarch 4.0.0-201711122203

Complete!


diff --git a/debian/qubes-core-agent.install b/debian/qubes-core-agent.install
index 7c1b0c3..ea90569 100644
--- a/debian/qubes-core-agent.install
+++ b/debian/qubes-core-agent.install
@@ -56,15 +56,12 @@ lib/systemd/system/NetworkManager-wait-online.service.d/
30_qubes.conf
lib/systemd/system/NetworkManager.service.d/30_qubes.conf
lib/systemd/system/anacron-resume.service.d/30_qubes.conf
lib/systemd/system/anacron.service.d/30_qubes.conf
-lib/systemd/system/avahi-daemon.service.d/30_qubes.conf
lib/systemd/system/chronyd.service.d/30_qubes.conf
lib/systemd/system/cron.service.d/30_qubes.conf
lib/systemd/system/cups.path.d/30_qubes.conf
lib/systemd/system/cups.service.d/30_qubes.conf
lib/systemd/system/cups.socket.d/30_qubes.conf
-lib/systemd/system/exim4.service.d/30_qubes.conf
lib/systemd/system/ge...@tty.service.d/30_qubes.conf
-lib/systemd/system/netfilter-persistent.service.d/30_qubes.conf
lib/systemd/system/org.cups.cupsd.path.d/30_qubes.conf
lib/systemd/system/org.cups.cupsd.service.d/30_qubes.conf
lib/systemd/system/org.cups.cupsd.socket.d/30_qubes.conf
@@ -98,7 +95,7 @@ usr/bin/qvm-open-in-vm
usr/bin/qvm-run-vm
usr/bin/qvm-sync-clock
usr/bin/xenstore-watch-qubes
-usr/lib/python2.7/dist-packages/qubesxdg.py
+usr/lib/python2.7/dist-packages/qubesxdg.py*
usr/lib/python2.7/dist-packages/qubesagent-*.egg-info/*
usr/lib/python2.7/dist-packages/qubesagent/*
usr/lib/qubes-bind-dirs.d/30_cron.conf

diff --git a/debian/qubes-gui-agent.install b/debian/qubes-gui-agent.install
index 1b2dfe9..2aee21f 100644
--- a/debian/qubes-gui-agent.install
+++ b/debian/qubes-gui-agent.install
@@ -3,7 +3,6 @@ etc/profile.d/*
etc/security/limits.d/90-qubes-gui.conf
etc/qubes-rpc/qubes.SetMonitorLayout
etc/xdg/autostart/qubes-icon-sender.desktop
-etc/xdg/Trolltech.conf
etc/xdg/Xresources
etc/xdg/fonts.conf
etc/xdg/xsettingsd
qubes-trusty-screen.png
signature.asc

Unman

unread,
Nov 13, 2017, 8:55:09 PM11/13/17
to rysiek, qubes...@googlegroups.com
On Sun, Nov 12, 2017 at 04:51:20PM +0100, rysiek wrote:
> Hey,
>
> Dnia Saturday, October 14, 2017 11:30:16 PM CET Unman pisze:
> > Ubuntu template build hasnt yet been updated to 4.0
>
> is there any movement on this? Is there any way I can jump into this and help?
> Any docs I should read to get me started along the way of fixing Ubuntu
> templates for R4.0?
>
> --
> Pozdrawiam,
> Michał "rysiek" Woźniak
>

Hi

I've just put in a couple of PRs to allow building for Xenial in 4.0.

If anyone wants to try Xenial in 4.0 there's a ready-built template at
qubes.3isec.org/Templates

unman

rysiek

unread,
Nov 15, 2017, 8:30:00 AM11/15/17
to qubes...@googlegroups.com, Unman
Dnia Tuesday, November 14, 2017 1:55:06 AM CET Unman pisze:
> I've just put in a couple of PRs to allow building for Xenial in 4.0.

Cool! Would you mind linking them here? I'd love to understand more about
Qubes internals and that seems like a good place to start. :)

> If anyone wants to try Xenial in 4.0 there's a ready-built template at
> qubes.3isec.org/Templates

Woo! Thanks!

--
Pozdrawiam,
Michał "rysiek" Woźniak

signature.asc

rysiek

unread,
Nov 16, 2017, 4:42:38 AM11/16/17
to qubes...@googlegroups.com
Hye,

Dnia Tuesday, November 14, 2017 1:55:06 AM CET Unman pisze:

> I've just put in a couple of PRs to allow building for Xenial in 4.0.

Are these the ones you're talking about?
https://github.com/QubesOS/qubes-gui-agent-linux/pull/23
https://github.com/QubesOS/qubes-core-agent-linux/commit/
54867b6eabed3a6dca0e932ff77f67aedfe43e03

The latter is merged, I believe, and the former I applied manually. However,
while building, now I get:

mkdir: cannot create directory ‘chroot-qubuntu’: File exists
mount: mount point chroot-qubuntu/tmp/qubes-deb does not exist
/home/qubes/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:275:
recipe for target 'update-repo-prepare' failed
make[1]: *** [update-repo-prepare] Error 32
Makefile:297: recipe for target 'template-local-xenial' failed
make: *** [template-local-xenial] Error 1

Not sure where to dig now.

More debug info below.

-> Building meta-packages (debian) for xenial vm (logfile: build-logs/meta-
packages-vm-xenial.log)
╔══ DEBUG
══════════════════════════════════════════════════════════════════════
║ Repo Variables
╠───────────────────────────────────────────────────────────────────────────────
║ SRC_DIR: qubes-src
║ CHROOT_DIR: /home/qubes/qubes-builder/chroot-xenial
║ CHROOT_REPO_DIR: chroot-qubuntu
║ CHROOT_DEBIAN_DIR: /home/qubes/qubes-builder/chroot-xenial//
║ BUILDER_REPO_DIR: /home/qubes/qubes-builder/qubes-packages-mirror-repo/
xenial
╠───────────────────────────────────────────────────────────────────────────────
║ Chroot Variables
╠───────────────────────────────────────────────────────────────────────────────
║ DIST_BUILD_DIR: /home/user
║ DIST_SRC:
║ DIST_SRC_DEBIAN_DIR: /
╠───────────────────────────────────────────────────────────────────────────────
║ Build Variables
╠───────────────────────────────────────────────────────────────────────────────
║ DEBIAN_PARSER: /home/qubes/qubes-builder/qubes-src/builder-debian//
scripts/debian-parser
║ DEBIAN_PLUGIN_DIR: /home/qubes/qubes-builder/qubes-src/builder-debian/
║ OUTPUT_DIR: pkgs/xenial
║ PACKAGE_LIST:
║ DISTRIBUTION: qubuntu
║ DIST: xenial
║ DEBIANVERSION: xenial
║ UPDATE_REPO: /home/qubes/qubes-builder/qubes-src/linux-template-
builder/pkgs-for-template/xenial
║ REPO_SUFFIX:
║ DISTRIBUTION_CAP: Qubuntu
║ REPO_PROXY:
║ APT_GET_OPTIONS:
║ CHROOT_ENV: BACKEND_VMM=xen
╚═══════════════════════════════════════════════════════════════════════════════
╔══ DEBUG
══════════════════════════════════════════════════════════════════════
║ Repo Variables
╠───────────────────────────────────────────────────────────────────────────────
║ SRC_DIR: qubes-src
║ CHROOT_DIR: /home/qubes/qubes-builder/chroot-xenial
║ CHROOT_REPO_DIR: chroot-qubuntu
║ CHROOT_DEBIAN_DIR: /home/qubes/qubes-builder/chroot-xenial//debian-vm/
debian
║ BUILDER_REPO_DIR: /home/qubes/qubes-builder/qubes-packages-mirror-repo/
xenial
╠───────────────────────────────────────────────────────────────────────────────
║ Chroot Variables
╠───────────────────────────────────────────────────────────────────────────────
║ DIST_BUILD_DIR: /home/user
║ DIST_SRC:
║ DIST_SRC_DEBIAN_DIR: /debian-vm/debian
╠───────────────────────────────────────────────────────────────────────────────
║ Build Variables
╠───────────────────────────────────────────────────────────────────────────────
║ DEBIAN_PARSER: /home/qubes/qubes-builder/qubes-src/builder-debian//
scripts/debian-parser
║ DEBIAN_PLUGIN_DIR: /home/qubes/qubes-builder/qubes-src/builder-debian/
║ OUTPUT_DIR: pkgs/xenial
║ PACKAGE_LIST: debian-vm/debian
║ DISTRIBUTION: qubuntu
║ DIST: xenial
║ DEBIANVERSION: xenial
║ UPDATE_REPO: /home/qubes/qubes-builder/qubes-src/linux-template-
builder/pkgs-for-template/xenial
║ REPO_SUFFIX:
║ DISTRIBUTION_CAP: Qubuntu
║ REPO_PROXY:
║ APT_GET_OPTIONS:
║ CHROOT_ENV: BACKEND_VMM=xen
╚═══════════════════════════════════════════════════════════════════════════════
mkdir: cannot create directory ‘chroot-qubuntu’: File exists
mount: mount point chroot-qubuntu/tmp/qubes-deb does not exist
/home/qubes/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:275:
recipe for target 'update-repo-prepare' failed
make[1]: *** [update-repo-prepare] Error 32
Makefile:297: recipe for target 'template-local-xenial' failed
make: *** [template-local-xenial] Error 1


--
Pozdrawiam,
Michał "rysiek" Woźniak

Zmieniam klucz GPG :: http://rys.io/pl/147

signature.asc

Unman

unread,
Nov 16, 2017, 2:54:30 PM11/16/17
to rysiek, qubes...@googlegroups.com
On Thu, Nov 16, 2017 at 10:42:08AM +0100, rysiek wrote:
> Hye,
>
> Dnia Tuesday, November 14, 2017 1:55:06 AM CET Unman pisze:
> > I've just put in a couple of PRs to allow building for Xenial in 4.0.
>
> Are these the ones you're talking about?
> https://github.com/QubesOS/qubes-gui-agent-linux/pull/23
> https://github.com/QubesOS/qubes-core-agent-linux/commit/
> 54867b6eabed3a6dca0e932ff77f67aedfe43e03
>
> The latter is merged, I believe, and the former I applied manually. However,
> while building, now I get:
>
> mkdir: cannot create directory ‘chroot-qubuntu’: File exists
> mount: mount point chroot-qubuntu/tmp/qubes-deb does not exist
> /home/qubes/qubes-builder/qubes-src/builder-debian/Makefile.qubuntu:275:
> recipe for target 'update-repo-prepare' failed
> make[1]: *** [update-repo-prepare] Error 32
> Makefile:297: recipe for target 'template-local-xenial' failed
> make: *** [template-local-xenial] Error 1
>
> Not sure where to dig now.
>
> More debug info below.

The error message is self explanatory.
Delete chroot-qubuntu and try to build again
Reply all
Reply to author
Forward
0 new messages