Skip to content

Instantly share code, notes, and snippets.

@arno01
Created January 23, 2020 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arno01/29303254bbd7d38704925f4d9a11d8b8 to your computer and use it in GitHub Desktop.
Save arno01/29303254bbd7d38704925f4d9a11d8b8 to your computer and use it in GitHub Desktop.

make python-xcffib

[user@build qubes-builder]$ make python-xcffib
Currently installed dependencies:
python2-pyyaml-5.1-1.fc30.x86_64
createrepo_c-0.15.5-1.fc30.x86_64
createrepo_c-0.15.5-1.fc30.x86_64
debootstrap-1.0.116-1.fc30.noarch
devscripts-2.19.3-1.fc30.x86_64
dialog-1.3-16.20180621.fc30.x86_64
dpkg-dev-1.18.25-8.fc30.noarch
git-2.21.1-1.fc30.x86_64
perl-Digest-MD5-2.55-418.fc30.x86_64
perl-Digest-SHA-6.02-5.fc30.x86_64
python3-sh-1.12.14-10.fc30.noarch
rpm-build-4.14.2.1-5.fc30.x86_64
rpmdevtools-8.10-8.fc30.noarch
make[1]: Entering directory '/home/user/qubes-builder'
make[1]: Leaving directory '/home/user/qubes-builder'
# Make sure repo directory exists
cp -p qubes-src/python-xcffib/xcffib-0.8.1.tar.gz /home/user/qubes-builder/chroot-vm-bullseye//home/user/qubes-src/python-xcffib/xcffib_0.8.1.orig.tar.gz
tar xzf qubes-src/python-xcffib/xcffib-0.8.1.tar.gz -C /home/user/qubes-builder/chroot-vm-bullseye//home/user/qubes-src/python-xcffib/debian-pkg --strip-components=1
-> Building python-xcffib (debian-pkg/debian) for bullseye vm (logfile: build-logs/python-xcffib-vm-bullseye.log)
--> build failed!
# check for CVE-2016-1252 - directly after debootstrap, still vulnerable
# apt is installed
wc -L "/home/user/qubes-builder/chroot-vm-bullseye/var/lib/apt/lists/"*InRelease | awk '$1 > 1024 {print; exit 1}'
# update the base system inside
sudo chroot /home/user/qubes-builder/chroot-vm-bullseye apt-get  dist-upgrade -y
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
# install build dependencies
LC_ALL=C sudo chroot /home/user/qubes-builder/chroot-vm-bullseye mk-build-deps -i -r -t "apt-get --no-install-recommends -y" /home/user/qubes-src/python-xcffib/debian-pkg/debian/control
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'xcffib-build-deps' in '../xcffib-build-deps_0.8.1-1_all.deb'.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
Selecting previously unselected package xcffib-build-deps.
(Reading database ... 43123 files and directories currently installed.)
Preparing to unpack xcffib-build-deps_0.8.1-1_all.deb ...
Unpacking xcffib-build-deps (0.8.1-1) ...
Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages will be REMOVED:
  xcffib-build-deps
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 9216 B disk space will be freed.
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
(Reading database ... 43127 files and directories currently installed.)
Removing xcffib-build-deps (0.8.1-1) ...
mk-build-deps: Unable to install xcffib-build-deps at /usr/bin/mk-build-deps line 433.
mk-build-deps: Unable to install all build-dep packages
make[2]: *** [/home/user/qubes-builder/qubes-src/builder-debian//Makefile-legacy.debian:39: dist-build-dep] Error 1
make[1]: *** [Makefile.generic:180: packages] Error 1
make: *** [Makefile:226: python-xcffib-vm] Error 1

builder.conf

[user@build qubes-builder]$ cat builder.conf | grep -v ^\#


RELEASE := 4.0

SSH_ACCESS := 0
GIT_BASEURL := https://github.com
GIT_PREFIX := QubesOS/qubes-

GIT_CLONE_FAST ?= 1

_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 ifeq ($(RELEASE), 3.2)
  -include example-configs/qubes-os-r3.2.conf
else ifeq ($(RELEASE), 4.0)
  -include example-configs/qubes-os-r4.0.conf
else
  -include example-configs/qubes-os-master.conf
endif
BUILDER_PLUGINS := $(_ORIGINAL_BUILDER_PLUGINS) $(BUILDER_PLUGINS)


BUILDER_PLUGINS :=
BUILDER_PLUGINS += builder-rpm
BUILDER_PLUGINS += builder-debian
BUILDER_PLUGINS += template-whonix
BUILDER_PLUGINS += template-kali
BUILDER_PLUGINS += mgmt-salt


_temp_components := $(COMPONENTS)
COMPONENTS += $(filter-out $(_temp_components), $(BUILDER_PLUGINS))
COMPONENTS := $(filter-out gcc,$(COMPONENTS))

DEBUG = 0
VERBOSE = 0
NO_SIGN = 1

DIST_DOM0 ?= fc20

TEMPLATE_ONLY ?= 0




ifneq "$(SETUP_MODE)" "1"

  # Enabled DISTS_VMs
  DISTS_VM :=
  DISTS_VM += fc30
  DISTS_VM += buster
  DISTS_VM += whonix-gateway-15
  DISTS_VM += whonix-workstation-15
  DISTS_VM += kali

endif

ifeq "$(SETUP_MODE)" "1"
  DISTS_VM :=
  DISTS_VM += fc29
  DISTS_VM += fc29+minimal
  DISTS_VM += fc29+fullyloaded
  DISTS_VM += fc29+xfce
  DISTS_VM += fc30
  DISTS_VM += fc30+minimal
  DISTS_VM += fc30+fullyloaded
  DISTS_VM += fc30+xfce
  DISTS_VM += fc31+minimal
  DISTS_VM += fc31+fullyloaded
  DISTS_VM += fc31+xfce
  DISTS_VM += centos7
  DISTS_VM += centos7+minimal
  DISTS_VM += centos7+xfce
  DISTS_VM += jessie
  DISTS_VM += jessie+minimal
  DISTS_VM += jessie+gnome
  DISTS_VM += stretch
  DISTS_VM += stretch+minimal
  DISTS_VM += stretch+gnome
  DISTS_VM += buster
  DISTS_VM += buster+minimal
  DISTS_VM += buster+gnome
  DISTS_VM += xenial
  DISTS_VM += xenial+desktop
  DISTS_VM += bionic
  DISTS_VM += bionic+desktop
  DISTS_VM += archlinux
endif

ifneq (,$(findstring jessie, $(DISTS_VM))$(findstring stretch, $(DISTS_VM)))

  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

TEMPLATE_LABEL ?=
TEMPLATE_LABEL += stretch:debian-9
TEMPLATE_LABEL += stretch+standard:debian-9

TEMPLATE_FLAVOR_DIR :=
TEMPLATE_FLAVOR_DIR += +gnome:$$$$TEMPLATE_SCRIPTS/gnome
TEMPLATE_FLAVOR_DIR += +flash:$$$$TEMPLATE_SCRIPTS/flash
TEMPLATE_FLAVOR_DIR += +desktop:$$$$TEMPLATE_SCRIPTS/desktop

TEMPLATE :=

TEMPLATE += $(BUILDER_PLUGINS)

TEMPLATE += vmm-xen
TEMPLATE += core-vchan-xen
ifneq ($(RELEASE), 2)
  TEMPLATE += core-qubesdb
endif
ifeq (,$(filter $(RELEASE), 3.2 4.0))
  TEMPLATE += core-qrexec
endif
TEMPLATE += linux-utils
ifneq (,$(findstring centos, $(DISTS_VM)))
  TEMPLATE += python-xcffib
  TEMPLATE += python-pillow
endif
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 += app-linux-usb-proxy
TEMPLATE += $(MGMT_COMPONENTS)
TEMPLATE += meta-packages
TEMPLATE += linux-template-builder

GIT_URL_template_whonix = $(GIT_BASEURL)/Whonix/qubes-template-whonix.git
GIT_URL_template_kali = $(GIT_BASEURL)/fepitre/qubes-template-kali.git


USE_QUBES_REPO_VERSION = $(RELEASE)
USE_QUBES_REPO_TESTING = 0

DEPENDENCIES ?=
DEPENDENCIES += git rpmdevtools rpm-build createrepo perl-Digest-MD5 perl-Digest-SHA

DEPENDENCIES += debootstrap dpkg-dev

DEPENDENCIES += python3-sh dialog

ifdef INCLUDE_OVERRIDE_CONF
  -include override.conf
endif

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

release:
	@echo "$(RELEASE)"
@arno01
Copy link
Author

arno01 commented Jan 23, 2020

the reason... is template-kali :-/

[user@build template-kali]$ git grep -i bulls
builder.conf:TEMPLATE_ALIAS += kali:bullseye+kali+standard
builder.conf:TEMPLATE_LABEL += bullseye+kali+standard:kali

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