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

build error - mgmt-salt yaml-dumper ImportError: No module named yaml #1921

Closed
adrelanos opened this Issue Apr 19, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@adrelanos
Member

adrelanos commented Apr 19, 2016

While trying to build Qubes R3.1 stable templates during make qubes-vm.

mv -t /home/user/qubes-builder/qubes-src/app-linux-pdf-converter/pkgs/jessie /home/user/qubes-builder/chroot-jessie//home/user/qubes-src/app-linux-pdf-converter/debian/../../qubes-pdf-converter_2.0.4*.changes
 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//
 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: /
───────────────────────────────────────────────────────────────────────────────
 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:        
 DISTRIBUTION:        debian
 DIST:                jessie
 DEBIANVERSION:       jessie
 DEBIAN_DEPENDENCIES: dpkg-dev debootstrap
 UPDATE_REPO:         
 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

 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//
 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: /
───────────────────────────────────────────────────────────────────────────────
 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:        
 DISTRIBUTION:        debian
 DIST:                jessie
 DEBIANVERSION:       jessie
 DEBIAN_DEPENDENCIES: dpkg-dev debootstrap
 UPDATE_REPO:         
 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

 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
 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
───────────────────────────────────────────────────────────────────────────────
 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
 DISTRIBUTION:        debian
 DIST:                jessie
 DEBIANVERSION:       jessie
 DEBIAN_DEPENDENCIES: dpkg-dev debootstrap
 UPDATE_REPO:         
 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

-> dist-prepare-chroot for jessie
-> sudo mount --bind /home/user/qubes-builder/qubes-packages-mirror-repo/jessie /home/user/qubes-builder/chroot-jessie/tmp/qubes-deb;
currently installed dependencies:
dpkg-dev-1.17.25-6.fc23.noarch
debootstrap-1.0.80-1.fc23.noarch
Traceback (most recent call last):
  File "/home/user/qubes-builder/qubes-src/mgmt-salt/yaml-dumper", line 19, in <module>
    import yaml
ImportError: No module named yaml
qubes-src/mgmt-salt/Makefile.builder:59: recipe for target 'mgmt-salt-create-vars-makefile' failed
make[1]: *** [mgmt-salt-create-vars-makefile] Error 1
Makefile:199: recipe for target 'mgmt-salt-vm' failed
make: *** [mgmt-salt-vm] Error 1
user@qubes-build:~/qubes-builder$
user@qubes-build:~/qubes-builder$ cat builder.conf
# =============================================================================
#                  CONFIGURATION FILE FOR QUBES-BUILDER
# =============================================================================
#
# THIS CONFIGURATION FILE IS INDENDED TO ONLY BE USED WITH THE `setup` SCRIPT.
# -----------------------------------------------------------------------------
#
# This configuration file (`templates.conf`) will be linked to by `setup` as
# `builder.conf`.  (ln -s example-configs/templates.conf builder.conf)
#
# To use the `setup` script, just run `setup` in the qubes-builder root
# directory.  A series of dialogs will be presented prompting various
# configuration available and then all build configuration files will
# automatically be generated based on the options selected.
#
# `setup` can be re-run again at any time to change configuration options.
# Previous options selected will be retained to allow quick switching of
# branches, templates to build, etc.
#
# Setup uses the following as markers to indicate where to place configuration
# values:
#     [=setup section start=] - Start inserting on the next line
#     [=setup section end=] - Stop insert mode
#
# Anything between these markers will be replaced, therefore:
#     - do not place any user configurations within these markers, or those
#       configurations will be replaced next time setup is run
#     - do not remove or modify the markers or setup will be unable to function
#
# -----------------------------------------------------------------------------
#            CONFIGURATION FILES INCLUDED WITH THIS CONFIGURATION
# -----------------------------------------------------------------------------
# Other configuration files are also included to offer maximum flexibility.  To
# determine which configuration files are actually being included when using
# this configuration file as a base, use the `about` target:
#   `make about`
#
# The other configuration files included (if they exist which some of them are
# automatically generated by `setup`) are as follows:
# - example-configs/qubes-os-r2.conf: If RELEASE == 2; Default Release 2
#   configuration file
# - example-configs/qubes-os-master.conf: If RELEASE == 3; Default Release 3
#   configuration file
# - override.conf: `setup` will also offer to include `override.conf` if one
#   exists.  More information on `overrides` below.
# - example-configs/extended-rules.conf: Contains extra targets mostly for
#   building templates
#
# -----------------------------------------------------------------------------
#                            ADDITIONAL OVERRIDES
# -----------------------------------------------------------------------------
# Instead of directly modifying this or any other `default` configuration
# file, an override.conf file can be placed in the `qubes-builder` root
# directory.  `setup` will offer to include this file if it exists.
#
# The `override.conf` file can contain overrides to most any configuration
# option such as BRANCH, DEBUG, VERBOSE, etc.
#
# If you create `overrides` that are specific to a release version or custom
# branch you are working on, `setup` will also be able to identify overrides
# specific to the release and or branch.
#
# To create release / branch specific `overrides`, create an override
# configuration file and place it in the `example-configs` directory named
# as follows:
#   1) example-configs/r2-feature_branch-override.conf
#      example-configs/r3-master-override.conf
#
#   2) example-configs/r3-feature_branch-override.conf
#      example-configs/r3-master-override.conf
#
#   3) example-configs/feature_branch-override.conf
#      example-configs/master-override.conf
#
#   4) example-configs/override.conf
#
#   5) override.conf
#
# Option 1 above would offer to include the override configuration file if you
# selected to build for Release 2 and are currently in the `feature_branch`
# branch.
#
# Option 2 is the same as Option 1 except for Release 3.
#
# Option 3 would use the same configuration override for both Release 2 and 3
# if you are currently in the `feature_branch` branch.
#
# If there is no release / branch specific override configuration and
# override.conf exists as in options 4, that will be available to select.
#
# Finally, an override.conf file in the `qubes-builder` root directory
# overrides all the above examples.
#
#
# A few additional notes and caveats on overrides:
#
# - The dialog to choose an override configuration is only presented on the
#   initial run of `setup`.  Once a `builder.conf` file created, there will be
#   no further prompts.  As indicated above, `setup` initially soft links
#   `examples-config/templates.conf` to `builder.conf`.  To overcome
#   this limitation, simply delete the `builder.conf` soft link and then the
#   override prompt will become available again when you re-run `setup`.
#
# - The `setup` script soft links any override configuration within the
#   examples-config directory to overrides.conf.  It will allow any soft linked
#   override to be replaced with a newly selected override option, but will not
#   allow an existing `override.conf` regular file to be overwritten that is
#   in the `qubes-builder` root directory.
#
# -----------------------------------------------------------------------------
# All lines which begins with "#" are treated as comments
# Assignments can be made with VAR_NAME="VALUE"

# [=setup info start=]
################################################################################
#
# Qubes Release: 3.1
# Source Prefix: QubesOS/qubes- (repo)
#
# Master Configuration File(s):
# qubes-os-r3.1.conf builder.conf debian-builder/builder.conf template-whonix/builder.conf Makefile
#
# builder.conf copied from:
# /home/user/qubes-builder/example-configs/templates.conf
#
################################################################################
# [=setup info stop=]

RELEASE := 3.1

# SSH_ACCESS is used by `setup` to determine if ssh access mode was selected and
# will re-write the GIT_BASEURL and GIT_PREFIX variables to use ssh mode.
SSH_ACCESS := 0
GIT_BASEURL := https://github.com
GIT_PREFIX := QubesOS/qubes-

# A Qubes master configuration file will be included based on selected RELEASE
# 
# A copy of BUILDER_PLUGINS will be made and restored since the BUILDER_PLUGIN
# variable gets over-written in qubes-os-master.conf.
_ORIGINAL_BUILDER_PLUGINS := $(BUILDER_PLUGINS)
ifeq ($(RELEASE), 2)
  -include example-configs/qubes-os-r2.conf
else ifeq ($(RELEASE), 3)
  -include example-configs/qubes-os-r3.0.conf
else ifeq ($(RELEASE), 3.1)
  -include example-configs/qubes-os-r3.1.conf
else
  -include example-configs/qubes-os-master.conf
endif
BUILDER_PLUGINS := $(_ORIGINAL_BUILDER_PLUGINS) $(BUILDER_PLUGINS)

# [=setup plugins start=]

# Enabled BUILDER_PLUGINS
BUILDER_PLUGINS :=
BUILDER_PLUGINS += builder-fedora
BUILDER_PLUGINS += builder-debian
BUILDER_PLUGINS += template-whonix

# [=setup plugins stop=]

DEBUG = 0
VERBOSE = 0
NO_SIGN = 1

DIST_DOM0 ?= fc20

# Only build templates (comment out or set to '0' to build all of Qubes).
TEMPLATE_ONLY ?= 1

################################################################################
#             S A L T   M A N A G E M E N T   O P T I O N S
################################################################################
# MGMT_SALT_ONLY - Build only mgmt-salt COMPONENTS
#  Only mgmt-salt components will bw built when issuing 'make qubes[-vm/dom0]
#  which is useful for developing.
#
# Set 1 to enable building only salt-mgmt COMPONENTS or clear value to build
# all qubes components including mgmt-salt.
# Default: novalue
#MGMT_SALT_ONLY = 1

# MGMT_SALT_COMPONENTS_USER - Custom mgmt-salt user components
#   Add any extra user based mgmt-salt formula components to include in build.
# Default: novalue
#MGMT_SALT_COMPONENTS_USER = 

################################################################################
#                     L I S T   O F   D I S T   V M ' S
################################################################################
# Available template flavors may be added the the template build by appending
# `+flavor_name`

# [=setup dists start=]
ifneq "$(SETUP_MODE)" "1"

  # Enabled DISTS_VMs
  DISTS_VM :=
  DISTS_VM += whonix-gateway
  DISTS_VM += whonix-workstation

endif
# [=setup dists stop=]

# List of all build template variations that will be offered in the 'setup'
# DISTS_VM dialog to be able to choose from
ifeq "$(SETUP_MODE)" "1"
  DISTS_VM :=
  DISTS_VM += fc20
  DISTS_VM += fc20+minimal
  DISTS_VM += fc20+fullyloaded
  DISTS_VM += fc21
  DISTS_VM += fc21+minimal
  DISTS_VM += fc21+fullyloaded
  DISTS_VM += fc23
  DISTS_VM += fc23+minimal
  DISTS_VM += fc23+fullyloaded
  DISTS_VM += wheezy
  DISTS_VM += wheezy+minimal
  DISTS_VM += wheezy+gnome
  DISTS_VM += jessie
  DISTS_VM += jessie+minimal
  DISTS_VM += jessie+gnome
  DISTS_VM += stretch
  DISTS_VM += stretch+minimal
  DISTS_VM += stretch+gnome
  DISTS_VM += trusty
  DISTS_VM += trusty+desktop
  DISTS_VM += utopic
  DISTS_VM += utopic+desktop
  DISTS_VM += vivid
  DISTS_VM += vivid+desktop
  DISTS_VM += archlinux
endif

################################################################################
#                     T E M P L A T E   A L I A S
################################################################################
# TEMPLATE_ALIAS can be used to choose a shorter name in DISTS_VM that
# include some other TEMPLATE_FLAVORs.  A TEMPLATE_LABEL will automatically
# be created if one does not exist that will use the alias name as the
# tempalte name.  Plus signs (+) will be converted to hyphens (-).
ifneq (,$(findstring wheezy, $(DISTS_VM))$(findstring jessie, $(DISTS_VM))$(findstring stretch, $(DISTS_VM)))
  TEMPLATE_ALIAS += wheezy:wheezy+standard
  TEMPLATE_ALIAS += wheezy+gnome:wheezy+gnome+standard
  TEMPLATE_ALIAS += wheezy+minimal:wheezy+minimal+no-recommends

  TEMPLATE_ALIAS += jessie:jessie+standard
  TEMPLATE_ALIAS += jessie+gnome:jessie+gnome+standard
  TEMPLATE_ALIAS += jessie+minimal:jessie+minimal+no-recommends

  TEMPLATE_ALIAS += stretch:stretch+standard
  TEMPLATE_ALIAS += stretch+gnome:stretch+gnome+standard
  TEMPLATE_ALIAS += stretch+minimal:stretch+minimal+no-recommends
endif

################################################################################
#                 T E M P L A T E   C O N F I G U R A T I O N
################################################################################
# TEMPLATE_LABEL allows control over the final template name.  There is a limit
# of 31 characters for the final template name
#
# TEMPLATE_LABE += <DIST_VM name as listed above>:<desired final template name>
TEMPLATE_LABEL ?=

# Location of templates flavors that are not in default location.
# Example: wheezy+whonix-gateway would normally be in
#          (Don't Place in {curly} brackets; ending curly gets cut off
#          $$SCRIPTSDIR/wheezy+whonix-gateway
#   -or-   $$SCRIPTSDIR/wheezy
TEMPLATE_FLAVOR_DIR :=
TEMPLATE_FLAVOR_DIR += +gnome:$$SCRIPTSDIR/gnome
TEMPLATE_FLAVOR_DIR += +flash:$$SCRIPTSDIR/flash
TEMPLATE_FLAVOR_DIR += +desktop:$$SCRIPTSDIR/desktop

################################################################################
#                  T E M P L A T E   C O M P O N E N T S
################################################################################
# Contains a list of components when only building templates.  Note the build
# order is very important
TEMPLATE :=
TEMPLATE += vmm-xen
TEMPLATE += core-vchan-xen
ifneq ($(RELEASE), 2)
  TEMPLATE += core-qubesdb
endif
TEMPLATE += linux-utils
TEMPLATE += core-agent-linux
TEMPLATE += gui-common
TEMPLATE += gui-agent-linux
TEMPLATE += app-linux-split-gpg
TEMPLATE += app-linux-tor
TEMPLATE += app-thunderbird
TEMPLATE += app-linux-pdf-converter
TEMPLATE += app-linux-img-converter
TEMPLATE += app-linux-input-proxy
TEMPLATE += $(MGMT_COMPONENTS)
TEMPLATE += linux-template-builder

################################################################################
#            O V E R R I D E   B R A N C H   L O C A T I O N S
################################################################################
# Not yet available in 'QubesOS' repo
GIT_URL_template_whonix = $(GIT_BASEURL)/marmarek/qubes-template-whonix.git

# Not yet available in 'marmarek' repo
GIT_URL_mgmt_salt = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt.git
GIT_URL_mgmt_salt_base = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-base.git
GIT_URL_mgmt_salt_base_config = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-base-config.git
GIT_URL_mgmt_salt_base_overrides = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-base-overrides.git
GIT_URL_mgmt_salt_base_topd = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-base-topd.git
GIT_URL_mgmt_salt_dom0_qvm = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-dom0-qvm.git
GIT_URL_mgmt_salt_dom0_update = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-dom0-update.git
GIT_URL_mgmt_salt_dom0_virtual_machines = $(GIT_BASEURL)/QubesOS/qubes-mgmt-salt-dom0-virtual-machines.git

################################################################################
#                        M I S C E L L A N E O U S
################################################################################
# Qubes-builder deps
DEPENDENCIES ?= 
DEPENDENCIES += git rpmdevtools rpm-build createrepo

# Additional for debian template
DEPENDENCIES += debootstrap dpkg-dev

# for ./setup
DEPENDENCIES += python-sh dialog

# Uncomment the the following to enable override.conf include.  Setup will
# automatically enable it only if an override is available and selected by
# user to enable.
INCLUDE_OVERRIDE_CONF ?= true
ifdef INCLUDE_OVERRIDE_CONF
  -include override.conf
endif

.PHONY: about release
about::
        @echo "builder.conf"

release:
        @echo "$(RELEASE)"

# vim: filetype=make
user@qubes-build:~/qubes-builder$ 
@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 19, 2016

Member

sudo yum install python-yaml was enough to work around this issue.

Member

adrelanos commented Apr 19, 2016

sudo yum install python-yaml was enough to work around this issue.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 20, 2016

Member

Duplicate of #1822

Member

marmarek commented Apr 20, 2016

Duplicate of #1822

@marmarek marmarek closed this Apr 20, 2016

@marmarek marmarek added the duplicate label Apr 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment