Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qubes-Whonix 14 build issues #3441

Closed
adrelanos opened this issue Jan 3, 2018 · 12 comments
Closed

Qubes-Whonix 14 build issues #3441

adrelanos opened this issue Jan 3, 2018 · 12 comments
Labels
C: builder Qubes Builder C: Whonix This issue impacts Qubes-Whonix T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Milestone

Comments

@adrelanos
Copy link
Member

DEBIANVERSION="stretch" \
DIST="stretch" \
DISTS_VM="whonix-gateway whonix-workstation" \
COMPONENTS="linux-template-builder builder builder-debian template-whonix" \
BUILDER_PLUGINS="builder-debian template-whonix" \
USE_QUBES_REPO_VERSION=3.2 \
USE_QUBES_REPO_TESTING=1 \
VERBOSE=3 \
DEBUG=1 \
REPO_PROXY=http://127.0.0.1:3142 \
BRANCH_template_whonix=master \
GIT_URL_template_whonix=https://github.com/adrelanos/qubes-template-whonix.git \
make get-sources template --debug=v

qubes-builder git b31f5e2c8de679ab29d7f00d435d6276e83d8c57

Reading makefiles...
Reading makefile 'Makefile.generic'...
Reading makefile 'qubes-src/builder-debian/Makefile.builder' (search path) (don't care) (no ~ expansion)...
Reading makefile 'qubes-src/template-whonix/Makefile.builder' (search path) (don't care) (no ~ expansion)...
Reading makefile 'qubes-src/vmm-xen/Makefile.builder' (search path) (no ~ expansion)...
Reading makefile '/home/user/qubes-builder/qubes-src/builder-debian/Makefile.debian' (search path) (no ~ expansion)...
 DEBUG 
 Repo Variables
───────────────────────────────────────────────────────────────────────────────
 SRC_DIR:             qubes-src
 CHROOT_DIR:          /home/user/qubes-builder/chroot-jessie
 CHROOT_REPO_DIR:     chroot-debian
 CHROOT_DEBIAN_DIR:   /home/user/qubes-builder/chroot-jessie//debian-vm/debian
 BUILDER_REPO_DIR:    /home/user/qubes-builder/qubes-packages-mirror-repo/jessie
───────────────────────────────────────────────────────────────────────────────
 Chroot Variables
───────────────────────────────────────────────────────────────────────────────
 DIST_BUILD_DIR:      /home/user
 DIST_SRC:            
 DIST_SRC_DEBIAN_DIR: /debian-vm/debian
───────────────────────────────────────────────────────────────────────────────
 Build Variables
───────────────────────────────────────────────────────────────────────────────
 DEBIAN_PARSER:       /home/user/qubes-builder/qubes-src/builder-debian//scripts/debian-parser
 DEBIAN_PLUGIN_DIR:   /home/user/qubes-builder/qubes-src/builder-debian/
 OUTPUT_DIR:          pkgs/jessie
 PACKAGE_LIST:        debian-vm/debian
 DISTRIBUTION:        debian
 DIST:                jessie
 DEBIANVERSION:       jessie
 UPDATE_REPO:         /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/jessie
 REPO_SUFFIX:         
 DISTRIBUTION_CAP:    Debian
 REPO_PROXY:          http://127.0.0.1:3142
 APT_GET_OPTIONS:     -o Acquire::http::Proxy=http://127.0.0.1:3142
 CHROOT_ENV:          BACKEND_VMM=xen 

Updating goal targets....
Considering target file 'update-repo'.
 File 'update-repo' does not exist.
  Considering target file 'update-repo-prepare'.
   File 'update-repo-prepare' does not exist.
   Finished prerequisites of target file 'update-repo-prepare'.
  Must remake target 'update-repo-prepare'.
You must provide a proper filename containing debian package file
mkdir: cannot create directory ‘chroot-debian’: File exists
mount: mount point chroot-debian/tmp/qubes-deb does not exist
/home/user/qubes-builder/qubes-src/builder-debian/Makefile.debian:275: recipe for target 'update-repo-prepare' failed
make[1]: *** [update-repo-prepare] Error 32
Makefile:297: recipe for target 'template-local-jessie+whonix-gateway+minimal+no-recommends' failed
make: *** [template-local-jessie+whonix-gateway+minimal+no-recommends] Error 

How to set from jessie to stretch?

How to fix that error? You must provide a proper filename containing debian package file
mkdir: cannot create directory ‘chroot-debian’: File exists
mount: mount point chroot-debian/tmp/qubes-deb does not exist

(Deleted that chroot-debian folder to no avail.)

@marmarek
Copy link
Member

marmarek commented Jan 3, 2018

You should not set DIST directly, it should be derived from DISTS_VM by qubes-builder (based on TEMPLATE_ALIAS set in qubes-src/template-whonix/builder.conf.
Make sure you have builder.conf with basic settings, but do not override those on command line. Safe thing to do is to use ?= instead of = in builder.conf.

After fixing above two things, it works for me on fresh qubes-builder clone (after adding your key). Including using stretch.

It looks like internal COMPONENT variable is empty for some reason. It should be derived from COMPONENTS (iterate over its elements). Make sure you don't override that either.

@marmarek
Copy link
Member

marmarek commented Jan 3, 2018

Later in the process I've got this error while "Setting up whonix-repository (3:3.2-1)":

/usr/bin/whonix_repository: line 85: lsb_release: command not found

@andrewdavidwong andrewdavidwong added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: builder Qubes Builder C: Whonix This issue impacts Qubes-Whonix labels Jan 4, 2018
@andrewdavidwong andrewdavidwong added this to the Release 4.0 milestone Jan 4, 2018
@adrelanos
Copy link
Member Author

adrelanos commented Jan 7, 2018 via email

@adrelanos
Copy link
Member Author

I don't manage to build it. Ruining from one error into another. It's undocumented, tons of make code. Would take me ages to figure out.

Suppose a debian-9 VM (preferred) or fedora-26 VM on Qubes R4.

Could you please kindly provide a one liner or script to build Qubes-Whonix 14 / R4 that includes builder.conf and whatnot?

@marmarek
Copy link
Member

  1. Clone qubes-builder
  2. Place this as builder.conf
  3. Execute make get-sources
  4. Execute make template or make template-in-dispvm according to your wish.

It is important that get-sources and template are separate make calls. You can join them using && if you like.

@awokd
Copy link

awokd commented Feb 16, 2018

@adrelanos , trying the build per the above steps.

@awokd
Copy link

awokd commented Feb 17, 2018

Build successful:

+ exit 0
template_list: qubes-template-debian-9 
qubes-template-fedora-25 
qubes-template-fedora-26 
qubes-template-whonix-gw 
qubes-template-whonix-ws 
Use the following command in DOM0 to retreive this file:
qvm-run --pass-io dev26 'cat /home/user/qubes-builder/qubes-src/linux-template-builder/rpm/install-templates.sh' > install-templates.sh

So it should work fine in a full build too.

@adrelanos
Copy link
Member Author

Kept some notes here, no more than a scratch pad, but I appreciate your efforts to get it really documented on qubes-os.org.

https://www.whonix.org/wiki/Dev/Qubes#Build_Qubes-Whonix_Templates_-_New_New

Thanks @marmarek, that helped a lot! Me happy building now! :)

@awokd
Copy link

awokd commented Feb 17, 2018

@adrelanos Once Qubes-Whonix 14 is in "shipping" status, did you want me to write up a new doc on how to build the templates inside Qubes? I've been trying to avoid stepping on people's toes and also skipping docs outside my area of expertise, but I should be able to handle that if you like.

@adrelanos
Copy link
Member Author

adrelanos commented Feb 17, 2018 via email

@awokd
Copy link

awokd commented Feb 24, 2018

@adrelanos Is this what you had in mind? The Build Environment link is pending another PR.
(And is there a better place/preferred way to contact you on this item than in a closed issue? Not sure what's customary.)

@adrelanos
Copy link
Member Author

Yes.

I personally don't like / use ./setup, more generally gui tools for building. Looks magic. Troublesome experience. But it's not up to me to decide. If it works and enables other/more people to build Qubes-Whonix, that's fantastic!

Since it is a new documentation page, I guess a new Qubes ticket would be ok.

Also I am replying to all requests where I am highlighted. Unless I miss an e-mail notification which happens rarely. In that case feel free to ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: builder Qubes Builder C: Whonix This issue impacts Qubes-Whonix T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants