-__pycache__
-/build/
-/files
-/libxen-*.*/
-!/libxen-dev.install
-/libxen-dev/
-/libxenstore3.0/
-/stamps/
-/xenstore-utils/
-/xen-system-*/
-/xen-utils-*.*/
-/xen-utils-common/
-/xen-hypervisor-common/
-*.debhelper*
+.debhelper
+*.debhelper.*
+*.postinst.debhelper
+*.postrm.debhelper
*.substvars
+*.stamp
+tmp
+*-[0-9]*.bug-control
+*-[0-9]*.postinst
+*-[0-9]*.postrm
+*.tmp
+files
+xen-doc
+xen-hypervisor-common
+xen-system-amd64
+xen-system-armhf
+xen-system-arm64
+xen-hypervisor-[0-9]*[0-9]
+xen-hypervisor-[0-9]*[0-9].install
+xen-hypervisor-[0-9]*[0-9].lintian-overrides
+xen-utils-[0-9]*[0-9]
+xen-utils-[0-9]*[0-9].install
+xen-utils-[0-9]*[0-9].NEWS
+xen-utils-[0-9]*[0-9].README.Debian
+xen-utils-[0-9]*[0-9].lintian-overrides
+xen-utils-[0-9]*[0-9].prerm
+libxenmisc[0-9]*[0-9].lintian-overrides
+libxenmisc[0-9]*[0-9]
+libxenmisc[0-9]*[0-9].install
+libxenmisc[0-9]*[0-9].lintian-overrides
+libxen-dev
+libxen*[0-9]
+xen-utils-common
+xenstore-utils
+autoreconf.before
+autoreconf.after
+debhelper-build-stamp
Xen packaging for Debian
========================
-For building the Xen packages, [see README.source](README.source.md)
-
For general information about the Debian Xen Team, [see the
wiki](https://salsa.debian.org/xen-team/debian-xen/wikis/home).
+++ /dev/null
-Xen packaging for Debian
-========================
-
-Step 1: Get the upstream source
--------------------------------
-
-The upstream Xen source code is not included with the packaging code
-repository.
-
-When doing additional work on a new debian revision of an existing package for
-a specific upstream version, grab the orig tar that's already in the package
-archives and put it just outside the directory of this repository.
-
-To package a new upstream version, an orig tar can be generated by pointing the
-genorig.py progam to your local xen git repository.
-
-Clone the upstream git repository somewhere (not inside the packaging
-directory, somewhere else!):
-
- -$ git clone https://xenbits.xen.org/git-http/xen.git
-
-After cloning it, we should generate an orig tar from the upstream source.
-
-Based on the version number in the newest debian/changelog entry, a release tag
-or specific commit can be used to generate the orig tar file. For example, if
-the latest entry in changelog is 4.10.0-1, then this will build the orig tar
-from the RELEASE-4.10.0 tag in upstream git:
-
- -$ debian/bin/genorig.py /path/to/xen.git
- Generate tarball ../orig/xen_4.10.0.orig.tar.xz
-
-| **Recognized patterns** | example | uses treeish |
-|--------|------|------|
-| Regular release | 4.10.2 | RELEASE-4.10.2 |
-| Pre version in between stable releases with explicit commit | 4.10.2~pre+1.25e0657e00-1 | 25e0657e00 |
-| Explicit commit while in rc | 4.11.0~rc6+1.35fcb982ea-1~exp1 | 35fcb982ea |
-| Release candidate | 4.11.0~rc7-1~exp1 | 4.11.0-rc7 |
-
-When a version contains an explicit commit hash, it has to be 10 characters long. Since commit ids do not sort, the +1 serves that purpose, and is incremented to +2 etc when switching to another commit.
-
-Step 2: Combine the upstream source and packaging
--------------------------------------------------
-
-The orig target in debian/rules is our friendly helper here:
-
- -$ debian/rules orig
- mkdir -p ../orig
- tar -C ../orig -xaf ../xen_4.10.0.orig.tar.xz
- rsync --delete --exclude /debian --exclude .git -a ../orig/xen-4.10.0/ .
- QUILT_PATCHES='[...]/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0
- Applying patch version.diff
- Applying patch config-prefix.diff
- [...]
- Applying patch tools-xentoolcore-abiname.patch
- Now at patch tools-xentoolcore-abiname.patch
-
-Step 3: Generate missing packaging files
-----------------------------------------
-
-Quite some files in the packaging are generated. At least all the files which
-have version-dependent names etc.
-
-To generate them:
-
- -$ debian/rules debian/control
- /usr/bin/make -f debian/rules debian/control-real
- make[1]: Entering directory '[...]'
- debian/bin/gencontrol.py
- md5sum debian/changelog [...] > debian/control.md5sum
-
- This target is made to fail intentionally, to make sure
- that it is NEVER run during the automated build. Please
- ignore the following error, the debian/control file has
- been generated SUCCESSFULLY.
-
- exit 1
- debian/rules:79: recipe for target 'debian/control-real' failed
- make[1]: *** [debian/control-real] Error 1
- make[1]: Leaving directory '[...]'
- debian/rules:69: recipe for target 'debian/control' failed
- make: *** [debian/control] Error 2
-
-This looks a bit wonky, but it makes sure we're not able to do the actual
-package build without having taken this step.
-
-Step 4: Build the package
--------------------------
-
-Use your favourite way to build the package. Mine is pbuilder, so I'm doing
-something like
-
- -$ pdebuild --use-pdebuild-internal \
- --auto-debsign --debsign-k ABCDEF \
- --configfile /home/knorrie/.pbuilderrc-sid
-
-Step 5: Cleanup and reset everything
-------------------------------------
-
-To cleanup the whole packaging environment, just do a git clean -dfx, and
-you're ready to continue back at step 2.
+++ /dev/null
-[base]
-flavours:
- amd64
-xen-arch: x86_64
-image-suffix: .gz
-
-[amd64_description]
-hardware: AMD64
-hardware-long: all 64bit single- and multiprocessor AMD and Intel
-
+++ /dev/null
-[base]
-flavours:
- arm64
-xen-arch: arm64
-image-suffix:
-with-ocaml: no
-
-[arm64_description]
-hardware: ARM64
-hardware-long: all 64bit ARMv8
-
+++ /dev/null
-[base]
-flavours:
- armhf
-xen-arch: arm32
-image-suffix:
-
-[armhf_description]
-hardware: ARMHF
-hardware-long: all 32bit ARMv7 with virtualisation extensions
-
+++ /dev/null
-[abi]
-
-[base]
-arches:
- amd64
- arm64
- armhf
- i386
-featuresets:
- none
+++ /dev/null
-[base]
-flavours:
- amd64
-xen-arch: x86_32
-
-[amd64_base]
-xen-arch: x86_64
-
-[amd64_description]
-hardware: AMD64
-hardware-long: all 64bit single- and multiprocessor AMD and Intel
+++ /dev/null
-#!/bin/sh -e
-
-TMPDIR=$(mktemp -d)
-trap "rm -rf $TMPDIR" EXIT
-grep -v "^#" debian/patches/series | awk '{if (NF == 1) print "debian/patches/" $1}' | sort -u > $TMPDIR/used
-find debian/patches -type f -name "*.diff" -printf "%p\n" | sort > $TMPDIR/avail
-echo "Used patches"
-echo "=============="
-cat $TMPDIR/used
-echo
-echo "Unused patches"
-echo "=============="
-fgrep -v -f $TMPDIR/used $TMPDIR/avail
+++ /dev/null
-#!/usr/bin/env python3
-
-import os, sys
-sys.path.append(os.path.join(sys.path[0], "../lib/python"))
-
-from debian_xen.debian import VersionXen
-from debian_linux.config import ConfigCoreHierarchy
-from debian_linux.debian import Changelog, PackageArchitecture
-from debian_linux.gencontrol import Gencontrol as Base
-from debian_linux.utils import Templates
-
-class Gencontrol(Base):
- config_schema = {
- 'description': {
- }
- }
-
- def __init__(self):
- super(Gencontrol, self).__init__(ConfigCoreHierarchy(self.config_schema, ["debian/arch"]), Templates(["debian/templates"]))
- self.process_changelog()
-
- def do_main_setup(self, vars, makeflags, extra):
- makeflags.update({
- 'VERSION': self.version.xen_version,
- })
-
- def do_arch_setup(self, vars, makeflags, arch, extra):
- config_entry = self.config.merge('base', arch)
- config_entry_description = self.config.merge('description', arch)
-
- for i in (
- ('xen-arch', 'XEN_ARCH'),
- ):
- makeflags[i[1]] = config_entry[i[0]]
-
- def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
- packages_main = self.process_packages(self.templates["control.main"], vars)
- packages_utils = self.process_packages(self.templates["control.utils"], vars)
-
- for package in packages_main + packages_utils:
- name = package['Package']
- if name in packages:
- package = packages.get(name)
- else:
- packages.append(package)
-
- arches = package.setdefault('Architecture', PackageArchitecture())
- if 'all' not in arches:
- arches.add(arch)
-
- package_utils_name = packages_utils[0]['Package']
-
- for i in ('postinst', 'prerm', 'lintian-overrides'):
- j = self.substitute(self.templates["xen-utils.%s" % i], vars)
- open("debian/%s.%s" % (package_utils_name, i), 'w').write(j)
-
- cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-arch %s" % makeflags]
- cmds_build = ["$(MAKE) -f debian/rules.real build-arch-arch %s" % makeflags]
- cmds_setup = ["$(MAKE) -f debian/rules.real setup-arch %s" % makeflags]
- makefile.add('binary-arch_%s_real' % arch, cmds = cmds_binary_arch)
- makefile.add('build-arch_%s_real' % arch, cmds = cmds_build)
- makefile.add('setup_%s_real' % arch, cmds = cmds_setup)
-
- def do_flavour_setup(self, vars, makeflags, arch, featureset, flavour, extra):
- config_entry = self.config.merge('base', arch, featureset, flavour)
- config_description = self.config.merge('description', arch, featureset, flavour)
-
- vars['class'] = config_description['hardware']
- vars['longclass'] = config_description.get('hardware-long') or vars['class']
-
- for i in (
- ('xen-arch', 'XEN_ARCH'),
- ('image-suffix', 'IMAGE_SUFFIX'),
- ):
- if i[0] in config_entry:
- makeflags[i[1]] = config_entry[i[0]]
-
- def do_flavour_packages(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra):
- hypervisor = self.templates["control.hypervisor"]
- system_latest = self.templates["control.system.latest"]
-
- if not 'desc' in vars:
- vars['desc'] = ''
-
- packages_own = []
- packages_own.extend(self.process_packages(hypervisor, vars))
- packages_dummy = self.process_packages(system_latest, vars)
-
- for package in packages_own + packages_dummy:
- name = package['Package']
- package.setdefault('Architecture', PackageArchitecture()).add(arch)
- if name in packages:
- package = packages.get(name)
- else:
- packages.append(package)
-
- arches = package.setdefault('Architecture', PackageArchitecture())
- if 'all' not in arches:
- arches.add(arch)
-
- package_name = packages_own[0]['Package']
-
- for i in ('postinst', 'postrm'):
- j = self.substitute(self.templates["xen-hypervisor.%s" % i], vars)
- open("debian/%s.%s" % (package_name, i), 'w').write(j)
-
- cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-flavour %s" % makeflags]
- cmds_build = ["$(MAKE) -f debian/rules.real build-arch-flavour %s" % makeflags]
- cmds_setup = ["$(MAKE) -f debian/rules.real setup-flavour %s" % makeflags]
-
- cmds_binary_arch += ["$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='%s' %s" % (u' '.join([u"-p%s" % i['Package'] for i in packages_dummy]), makeflags)]
-
- makefile.add("binary-arch_%s_%s_%s" % (arch, featureset, flavour), cmds = cmds_binary_arch)
- makefile.add("build-arch_%s_%s_%s" % (arch, featureset, flavour), cmds = cmds_build)
- makefile.add("setup_%s_%s_%s" % (arch, featureset, flavour), cmds = cmds_setup)
-
- def process_changelog(self):
- changelog = Changelog(version = VersionXen)
- self.version = changelog[0].version
- self.vars = {
- 'version': self.version.xen_version,
- }
-
-if __name__ == '__main__':
- Gencontrol()()
+++ /dev/null
-#!/usr/bin/env python3
-
-import sys
-sys.path.append(sys.path[0] + '/../lib/python')
-
-import itertools
-import os, os.path
-import shutil
-import subprocess
-
-from debian_xen.debian import VersionXen
-from debian_linux.debian import Changelog
-
-
-class Main(object):
- log = sys.stdout.write
-
- def __init__(self, options, repo):
- self.options = options
- self.repo = repo
-
- self.changelog_entry = Changelog(version=VersionXen)[0]
- self.source = self.changelog_entry.source
- self.version = self.changelog_entry.version
-
- if options.override_version:
- self.version = VersionXen('%s-0' % options.override_version)
-
- if options.component:
- self.orig_dir = options.component
- self.orig_tar = '%s_%s.orig-%s.tar.xz' % (self.source, self.version.upstream, options.component)
- else:
- self.orig_dir = '%s-%s' % (self.source, self.version.upstream)
- self.orig_tar = '%s_%s.orig.tar.xz' % (self.source, self.version.upstream)
-
- def __call__(self):
- out = "../orig/%s" % self.orig_tar
-
- if self.options.tag:
- treeish = self.options.tag
- else:
- treeish = self.changelog_entry.version.treeish
-
- self.log("Generate tarball %s from treeish %s\n" % (out, treeish))
-
- try:
- os.stat(out)
- raise RuntimeError("Destination already exists")
- except OSError: pass
-
- try:
- os.mkdir("../orig")
- except OSError:
- pass
-
- ga_exists = os.path.exists('.gitattributes')
- try:
- if ga_exists:
- os.rename('.gitattributes','.gitattributes.genorig-saved')
- with open('.gitattributes', 'w') as ga:
- print('* -export-subst\n', file=ga)
- with open(out, 'wb') as f:
- _cmd = ('git', 'archive', '--worktree-attributes', '--prefix', '%s/' % self.orig_dir, treeish)
- p1 = subprocess.Popen(_cmd, stdout=subprocess.PIPE, cwd=self.repo)
- subprocess.check_call(('xz', ), stdin=p1.stdout, stdout=f)
- if p1.wait():
- raise RuntimeError
- except:
- os.unlink(out)
- raise
-
- try:
- if ga_exists:
- os.rename('.gitattributes.genorig-saved','.gitattributes')
- else:
- os.unlink('.gitattributes')
- except Exception: pass
-
- try:
- os.link(os.path.join('..', 'orig', self.orig_tar), os.path.join('..', self.orig_tar))
- except OSError:
- pass
-
-
-if __name__ == '__main__':
- from optparse import OptionParser
- p = OptionParser(prog=sys.argv[0], usage='%prog [OPTION]... DIR')
- p.add_option('-c', '--component', dest='component')
- p.add_option('-t', '--tag', dest='tag')
- p.add_option('-V', '--override-version', dest='override_version')
- options, args = p.parse_args()
- assert(len(args) == 1)
- Main(options, *args)()
+xen (4.11.1~pre+1.733450b39b-1~exp1+rework) UNRELEASED; urgency=medium
+
+ * Completely overhauled the packaging. In the source package, things
+ are very much simpler now with only a few hundred loc of templating
+ and scriptery. In the binary packages the resulting changes are:
+ - We now provide -dbgsym packages in the standard way
+ - Shared libraries with unstable ABI upstream (ie, whose
+ ABI changes with the Xen version) are now in
+ libxen<version>-misc rather than libxen<version> and
+ have more conventional-looking filenames.
+ - Shared libraries with a stable ABI upstream are now each in their
+ own package, named after the soname (ABI version), as is
+ conventional. The sonames and minor versions of these are
+ no longer mangled.
+ - xs.h, replaced upstream by xenstore.h, is now in
+ /usr/include/xenstore-compat (as shipped upstream), with
+ symlinks left behind.
+ - fsimage*.h is no longer shipped (it's namespace-grabbish).
+ - libxenvchan.h is in /usr/include as it is in upstream,
+ not buried in /usr/include/xen/io
+ - /etc/xen/cpupool, a not very interesting example config file,
+ has been moved into /usr/share/doc/.
+ - There is a new xen-doc package, in which the upstream HTML
+ documentation, and various other bits, is now provided. This
+ replaces the text format documentation previously provided in
+ xen-utils-common (but the manpages are still there).
+ - Utilities which use on libraries with stable ABIs upstream
+ are no longer subjected to the Xen version wrapper.
+ - Several utilities are now provided in /usr/bin which were
+ previously only available buried in /usr/lib/xen-<version>:
+ xen-detect xenalyze xencons xencov_split xen-cpuid
+ (version-wrapped, where necessary).
+ - Likewise very many utilities and daemons in /usr/sbin:
+ gdbsx xen-bugtool xen-ringwatch xen-tmem-list-parse
+ xenmon xenpmd flask-* xen-kdd xen-diag xen-hptool
+ xen-hvmcrash xen-hvmctx xen-livepatch xen-lowmemd
+ xen-mfndump xenbaked xenconsoled xencov xenlockprof
+ xenstored xenwatchdogd
+ - xend and xm are long gone, so remove the support for the
+ TOOLSTACK setting in /etc/default/xen. /usr/sbin/xen just
+ runs xl now. Remove mentions of xend-config.sxp and all
+ *.sxp files. Drop the xend init script.
+ - There is no longer any Built-Using. This is no longer true for
+ seabios, which is depended on and used at runtime, rather than
+ being embedded into hvmloader. (The source package also previously
+ tried to mention ipxe-qemu in Built-Using but that's (i) dependent
+ upstream on CONFIG_ROMBIOS which we disable, and not a
+ build-dependency either.)
+ - The hvmloader and xen-shim binaries no longer have their .note
+ and .comment section(s) stripped. .note is needed for xen-shim
+ to work properly and to find the corresponding debug files.
+ And .comment is tiny and harmless AFAICT.
+ - Hypervisor debug map files are installed in /usr/lib/debug.
+ - The xl bash_completion file from upstream is installed.
+ - libxenvchan.h is installed.
+ - We install xen-*.efi in /boot.
+ - Sections of some packages have been rationalised.
+ - We install a doc-base control file.
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk> Wed, 03 Oct 2018 18:45:02 +0100
+
xen (4.11.1~pre+1.733450b39b-1~exp1) experimental; urgency=medium
[ Hans van Kranenburg ]
Source: xen
-Section: kernel
Priority: optional
Maintainer: Debian Xen Team <pkg-xen-devel@lists.alioth.debian.org>
Uploaders: Guido Trotter <ultrotter@debian.org>, Bastian Blank <waldi@debian.org>, Ian Jackson <ian.jackson@eu.citrix.com>
Standards-Version: 3.9.4
-Build-Depends: autotools-dev, debhelper (>> 9), dpkg-dev (>= 1.16.0~), lsb-release, python-dev, bcc [i386 amd64], gcc-multilib [i386 amd64], e2fslibs-dev, iasl, seabios (>= 1.7.4-2~) [i386 amd64], libaio-dev, libfdt-dev [armhf arm64], libglib2.0-dev, liblzma-dev, libncurses5-dev, libpixman-1-dev, libyajl-dev, pkg-config, uuid-dev, zlib1g-dev
+Build-Depends:
+ debhelper (>> 9),
+ autotools-dev,
+ dpkg-dev (>= 1.16.0~),
+ lsb-release,
+ python-dev,
+ bcc [i386 amd64],
+ gcc-multilib [i386 amd64],
+ e2fslibs-dev,
+ iasl,
+ seabios (>= 1.7.4-2~) [i386 amd64],
+ libaio-dev,
+ libfdt-dev [armhf arm64],
+ libglib2.0-dev,
+ liblzma-dev,
+ libncurses5-dev,
+ libpixman-1-dev,
+ libyajl-dev,
+ pkg-config,
+ uuid-dev,
+ zlib1g-dev
XS-Python-Version: current
-Package: libxen-4.11
-Architecture: amd64 arm64 armhf i386
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Public libs for Xen
- This package contains the shared toolstack libraries for Xen.
-Multi-Arch: same
-
-Package: libxenstore3.0
-Architecture: amd64 arm64 armhf i386
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Xenstore communications library for Xen
- This package contains the client library interface to XenStore.
-Multi-Arch: same
-
-Package: libxen-dev
-Architecture: amd64 arm64 armhf i386
-Section: libdevel
-Depends: libxen-4.11 (= ${binary:Version}), libxenstore3.0 (= ${binary:Version}), ${misc:Depends}
-Description: Public headers and libs for Xen
- This package contains the public headers and static libraries for Xen.
- .
- The libxenlight library is intended as a common base for all Xen toolstack
- developers. The libxlutil library contains additional helpers which may
- be useful to toolstack developers.
- .
- The libxenstore library allows userspace processes to interact with the
- XenStore database. XenStore is a shared database used for interdomain
- communication of configuration and status information. It is accessible
- to all domains running on the same Xen host. See
- http://wiki.xen.org/wiki/XenStore for more information.
- .
- The libxenctrl, libxenguest and other remaining included libraries are
- internal libraries intended for use by the Xen toolstack and are not
- intended to be used directly. Toolstack authors should use libxenlight.
-Multi-Arch: same
-
Package: xenstore-utils
Architecture: amd64 arm64 armhf i386
Section: admin
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: xen-utils-common (<= 3.1.0-1)
Conflicts: xen-utils-common (<= 3.1.0-1)
+Suggests: xen-doc
Description: Xenstore command line utilities for Xen
This package contains command line utilities for interacting with
XenStore.
domain to support local scripting which wants to communicate via XenStore.
Package: xen-utils-common
-Architecture: all
-Depends: lsb-base, python, udev, xenstore-utils, ${misc:Depends}
+Section: admin
+Architecture: amd64 i386 armhf arm64
+Depends: lsb-base, udev, xenstore-utils,
+ ${shlibs:Depends}, ${python:Depends}, ${misc:Depends}
Description: Xen administrative tools - common files
The userspace tools to manage a system virtualized through the Xen virtual
machine monitor.
virtual guest systems (Domain U).
Package: xen-hypervisor-common
+Section: kernel
Architecture: all
Depends: ${misc:Depends}
Replaces: xen-hypervisor-4.8-amd64, xen-hypervisor-4.8-arm64, xen-hypervisor-4.8-armhf
This package is only required on the host system (Domain 0) and not on the
virtual guest systems (Domain U).
+Package: xen-doc
+Section: doc
+Architecture: amd64 i386 armhf arm64
+Description: XEN documentation
+ Documentation for the Xen hypervisor and surrounding software,
+ including descriptions of the hypercall interfaces and of some
+ of the library APIs.
+ .
+ You do not need this package for the primary manpages for the
+ Xen control utilities, as those are in the xen-utils-common package.
+# Yes, arch-specific. See xen-doc.lintian-overrides.
+
Package: xen-utils-4.11
+Section: admin
Architecture: amd64 arm64 armhf i386
Provides: xen-utils
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, xen-utils-common (>= ${source:Version})
Built-Using: ${misc:Built-Using}
Package: xen-hypervisor-4.11-amd64
+Section: kernel
Architecture: amd64 i386
Provides: xen-hypervisor, xen-hypervisor-4.11, xen-hypervisor-amd64
Depends: ${misc:Depends}
access for XEN itself.
Package: xen-system-amd64
+Section: admin
Architecture: amd64 i386
Provides: xen-system
Depends: xen-hypervisor-4.11-amd64, xen-hypervisor-common, xen-utils-4.11, ${misc:Depends}
-Description: Xen System on AMD64 (meta-package)
+Description: Xen System on AMD64 (metapackage)
This package depends on the latest Xen hypervisor for use on AMD64 and the
Xen utils.
Package: xen-hypervisor-4.11-arm64
+Section: kernel
Architecture: arm64
Provides: xen-hypervisor, xen-hypervisor-4.11, xen-hypervisor-arm64
Depends: ${misc:Depends}
access for XEN itself.
Package: xen-system-arm64
+Section: admin
Architecture: arm64
Provides: xen-system
Depends: xen-hypervisor-4.11-arm64, xen-hypervisor-common, xen-utils-4.11, ${misc:Depends}
-Description: Xen System on ARM64 (meta-package)
+Description: Xen System on ARM64 (metapackage)
This package depends on the latest Xen hypervisor for use on ARM64 and the
Xen utils.
Package: xen-hypervisor-4.11-armhf
+Section: kernel
Architecture: armhf
Provides: xen-hypervisor, xen-hypervisor-4.11, xen-hypervisor-armhf
Depends: ${misc:Depends}
access for XEN itself.
Package: xen-system-armhf
+Section: admin
Architecture: armhf
Provides: xen-system
Depends: xen-hypervisor-4.11-armhf, xen-hypervisor-common, xen-utils-4.11, ${misc:Depends}
-Description: Xen System on ARMHF (meta-package)
+Description: Xen System on ARMHF (metapackage)
This package depends on the latest Xen hypervisor for use on ARMHF and the
Xen utils.
+Package: libxen-dev
+Section: libdevel
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ libxenmisc4.11 (= ${binary:Version}),
+ libxencall1 (= ${binary:Version}),
+ libxendevicemodel1 (= ${binary:Version}),
+ libxenevtchn1 (= ${binary:Version}),
+ libxenforeignmemory1 (= ${binary:Version}),
+ libxengnttab1 (= ${binary:Version}),
+ libxenstore3.0 (= ${binary:Version}),
+ libxentoolcore1 (= ${binary:Version}),
+ libxentoollog1 (= ${binary:Version})
+Description: Public headers and libs for Xen
+ This package contains the public headers and static libraries for Xen.
+ .
+ The libxenlight library is intended as a common base for all Xen toolstack
+ developers. The libxlutil library contains additional helpers which may
+ be useful to toolstack developers.
+ .
+ The libxenstore library allows userspace processes to interact with
+ the XenStore database. Command line tools for accessing xenstore are
+ provided is via the xenstore-utils package.
+ .
+ Most of the other included libraries are internal, and intended for
+ use by the Xen toolstack, rather than directly.
+
+Package: libxenmisc4.11
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - miscellaneous, versioned ABI
+ Shared libraries for Xen utilities.
+ This package contains libraries whose ABI changes with each
+ new upstream Xen release, which include ones which embed
+ knowledge of hypervisor-version-specific hypercall ABIs.
+Multi-Arch: same
+
+Package: libxencall1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime library - libxencall
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxendevicemodel1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxendevicemodel
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxenevtchn1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxenevtchn
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxenforeignmemory1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxenforeignmemory
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxengnttab1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxengnttab
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxenstore3.0
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxenstore
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxentoolcore1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxentoolcore
+ Shared library for Xen utilities.
+Multi-Arch: same
+
+Package: libxentoollog1
+Section: libs
+Architecture: amd64 arm64 armhf i386
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Xen runtime libraries - libxentoollog
+ Shared library for Xen utilities.
+Multi-Arch: same
--- /dev/null
+__pycache__
+/build/
+/files
+/libxen-[0-9].*/
+!/libxen-dev.install
+/libxen-dev/
+/libxenstore[0-9].0/
+/stamps/
+/xen-hypervisor-[0-9].*-*/
+/xenstore-utils/
+/xen-system-[0-9]*/
+/xen-utils-[0-9]*.*/
+/xen-utils-common/
+/xen-hypervisor-common/
+*.debhelper*
+*.substvars
--- /dev/null
+#!/bin/bash
+set -e
+set -o pipefail
+
+# This avoids us having to write out shared library package
+# names again. We call dh_install once for each shared
+# library package to put the relevant shared library in it.
+#
+# libxenmisc is a portmanteau of unstable-ABI libraries and
+# is handled via a *.install-vsn file.
+#
+# libxen-dev-V is the dev library package of course.
+
+x () {
+ echo x "$@"
+ "$@"
+}
+
+for p in $(dh_listpackages); do
+ case $p in
+ libxen-dev*) continue ;;
+ libxenmisc*) continue ;;
+ lib*) ;;
+ *) continue ;;
+ esac
+
+ l=${p%%[0-9]*}
+
+ x dh_install -p$p "usr/lib/*/$l.so.*"
+done
+++ /dev/null
-class Symbol(object):
- def __init__(self, name, module, version, export):
- self.name, self.module = name, module
- self.version, self.export = version, export
-
- def __eq__(self, other):
- if not isinstance(other, Symbol):
- return NotImplemented
-
- # Symbols are resolved to modules by depmod at installation/
- # upgrade time, not compile time, so moving a symbol between
- # modules is not an ABI change. Compare everything else.
- if self.name != other.name:
- return False
- if self.version != other.version:
- return False
- if self.export != other.export:
- return False
-
- return True
-
- def __ne__(self, other):
- ret = self.__eq__(other)
- if ret is NotImplemented:
- return ret
- return not ret
-
-
-class Symbols(dict):
- def __init__(self, file=None):
- if file:
- self.read(file)
-
- def read(self, file):
- for line in file:
- version, name, module, export = line.strip().split()
- self[name] = Symbol(name, module, version, export)
-
- def write(self, file):
- for s in sorted(self.values(), key=lambda i: i.name):
- file.write("%s %s %s %s\n" %
- (s.version, s.name, s.module, s.export))
+++ /dev/null
-import collections
-import os
-import os.path
-import pickle
-import re
-import sys
-import textwrap
-
-from configparser import RawConfigParser
-
-__all__ = [
- 'ConfigCoreDump',
- 'ConfigCoreHierarchy',
- 'ConfigParser',
-]
-
-
-class SchemaItemBoolean(object):
- def __call__(self, i):
- i = i.strip().lower()
- if i in ("true", "1"):
- return True
- if i in ("false", "0"):
- return False
- raise Error
-
-
-class SchemaItemInteger(object):
- def __call__(self, i):
- try:
- return int(i.strip(), 0)
- except ValueError:
- raise Error
-
-
-class SchemaItemList(object):
- def __init__(self, type="\s+"):
- self.type = type
-
- def __call__(self, i):
- i = i.strip()
- if not i:
- return []
- return [j.strip() for j in re.split(self.type, i)]
-
-
-# Using OrderedDict instead of dict makes the pickled config reproducible
-class ConfigCore(collections.OrderedDict):
- def get_merge(self, section, arch, featureset, flavour, key, default=None):
- temp = []
-
- if arch and featureset and flavour:
- temp.append(self.get((section, arch, featureset, flavour), {}).get(key))
- temp.append(self.get((section, arch, None, flavour), {}).get(key))
- if arch and featureset:
- temp.append(self.get((section, arch, featureset), {}).get(key))
- if arch:
- temp.append(self.get((section, arch), {}).get(key))
- if featureset:
- temp.append(self.get((section, None, featureset), {}).get(key))
- temp.append(self.get((section,), {}).get(key))
-
- ret = []
-
- for i in temp:
- if i is None:
- continue
- elif isinstance(i, (list, tuple)):
- ret.extend(i)
- elif ret:
- # TODO
- return ret
- else:
- return i
-
- return ret or default
-
- def merge(self, section, arch=None, featureset=None, flavour=None):
- ret = {}
- ret.update(self.get((section,), {}))
- if featureset:
- ret.update(self.get((section, None, featureset), {}))
- if arch:
- ret.update(self.get((section, arch), {}))
- if arch and featureset:
- ret.update(self.get((section, arch, featureset), {}))
- if arch and featureset and flavour:
- ret.update(self.get((section, arch, None, flavour), {}))
- ret.update(self.get((section, arch, featureset, flavour), {}))
- return ret
-
- def dump(self, fp):
- pickle.dump(self, fp, 0)
-
-
-class ConfigCoreDump(object):
- def __new__(self, fp):
- return pickle.load(fp)
-
-
-class ConfigCoreHierarchy(object):
- schema_base = {
- 'base': {
- 'arches': SchemaItemList(),
- 'enabled': SchemaItemBoolean(),
- 'featuresets': SchemaItemList(),
- 'flavours': SchemaItemList(),
- },
- }
-
- def __new__(cls, schema, dirs=[]):
- schema_complete = cls.schema_base.copy()
- for key, value in schema.items():
- schema_complete.setdefault(key, {}).update(value)
- return cls.Reader(dirs, schema_complete)()
-
- class Reader(object):
- config_name = "defines"
-
- def __init__(self, dirs, schema):
- self.dirs, self.schema = dirs, schema
-
- def __call__(self):
- ret = ConfigCore()
- self.read(ret)
- return ret
-
- def get_files(self, *dirs):
- dirs = list(dirs)
- dirs.append(self.config_name)
- return (os.path.join(i, *dirs) for i in self.dirs if i)
-
- def read_arch(self, ret, arch):
- config = ConfigParser(self.schema)
- config.read(self.get_files(arch))
-
- featuresets = config['base', ].get('featuresets', [])
- flavours = config['base', ].get('flavours', [])
-
- for section in iter(config):
- if section[0] in featuresets:
- real = (section[-1], arch, section[0])
- elif len(section) > 1:
- real = (section[-1], arch, None) + section[:-1]
- else:
- real = (section[-1], arch) + section[:-1]
- s = ret.get(real, {})
- s.update(config[section])
- ret[tuple(real)] = s
-
- for featureset in featuresets:
- self.read_arch_featureset(ret, arch, featureset)
-
- if flavours:
- base = ret['base', arch]
- featuresets.insert(0, 'none')
- base['featuresets'] = featuresets
- del base['flavours']
- ret['base', arch] = base
- ret['base', arch, 'none'] = {'flavours': flavours, 'implicit-flavour': True}
-
- def read_arch_featureset(self, ret, arch, featureset):
- config = ConfigParser(self.schema)
- config.read(self.get_files(arch, featureset))
-
- flavours = config['base', ].get('flavours', [])
-
- for section in iter(config):
- real = (section[-1], arch, featureset) + section[:-1]
- s = ret.get(real, {})
- s.update(config[section])
- ret[tuple(real)] = s
-
- def read(self, ret):
- config = ConfigParser(self.schema)
- config.read(self.get_files())
-
- arches = config['base', ]['arches']
- featuresets = config['base', ].get('featuresets', [])
-
- for section in iter(config):
- if section[0].startswith('featureset-'):
- real = (section[-1], None, section[0][11:])
- else:
- real = (section[-1],) + section[1:]
- ret[real] = config[section]
-
- for arch in arches:
- self.read_arch(ret, arch)
- for featureset in featuresets:
- self.read_featureset(ret, featureset)
-
- def read_featureset(self, ret, featureset):
- config = ConfigParser(self.schema)
- config.read(self.get_files('featureset-%s' % featureset))
-
- for section in iter(config):
- real = (section[-1], None, featureset)
- s = ret.get(real, {})
- s.update(config[section])
- ret[real] = s
-
-
-class ConfigParser(object):
- __slots__ = '_config', 'schemas'
-
- def __init__(self, schemas):
- self.schemas = schemas
-
- self._config = config = RawConfigParser()
-
- def __getitem__(self, key):
- return self._convert()[key]
-
- def __iter__(self):
- return iter(self._convert())
-
- def __str__(self):
- return '<%s(%s)>' % (self.__class__.__name__, self._convert())
-
- def _convert(self):
- ret = {}
- for section in self._config.sections():
- data = {}
- for key, value in self._config.items(section):
- data[key] = value
- section_list = section.split('_')
- section_base = section_list[-1]
- if section_base in self.schemas:
- section_ret = tuple(section_list)
- data = self._convert_one(self.schemas[section_base], data)
- else:
- section_ret = (section, )
- ret[section_ret] = data
- return ret
-
- def _convert_one(self, schema, data):
- ret = {}
- for key, value in data.items():
- if key in schema:
- value = schema[key](value)
- ret[key] = value
- return ret
-
- def keys(self):
- return self._convert().keys()
-
- def read(self, data):
- return self._config.read(data)
-
-
-if __name__ == '__main__':
- import sys
- sys.path.append('debian/lib/python')
- config = ConfigCoreDump(open('debian/config.defines.dump', 'rb'))
- for section, items in sorted(config.items(), key=lambda a:tuple(i or '' for i in a[0])):
- print(u"[%s]" % (section,))
- for item, value in sorted(items.items()):
- print(u"%s: %s" % (item, value))
- print()
+++ /dev/null
-import collections
-import os.path
-import re
-
-from . import utils
-
-
-class Changelog(list):
- _rules = r"""
-^
-(?P<source>
- \w[-+0-9a-z.]+
-)
-\
-\(
-(?P<version>
- [^\(\)\ \t]+
-)
-\)
-\s+
-(?P<distribution>
- [-+0-9a-zA-Z.]+
-)
-\;\s+urgency=
-(?P<urgency>
- \w+
-)
-"""
- _re = re.compile(_rules, re.X)
-
- class Entry(object):
- __slot__ = 'distribution', 'source', 'version', 'urgency'
-
- def __init__(self, distribution, source, version, urgency):
- self.distribution, self.source, self.version, self.urgency = \
- distribution, source, version, urgency
-
- def __init__(self, dir='', version=None):
- if version is None:
- version = Version
- f = open(os.path.join(dir, "debian/changelog"), encoding="UTF-8")
- while True:
- line = f.readline()
- if not line:
- break
- match = self._re.match(line)
- if not match:
- continue
- try:
- v = version(match.group('version'))
- except Exception:
- if not len(self):
- raise
- v = Version(match.group('version'))
- self.append(self.Entry(match.group('distribution'),
- match.group('source'), v,
- match.group('urgency')))
-
-
-class Version(object):
- _version_rules = r"""
-^
-(?:
- (?P<epoch>
- \d+
- )
- :
-)?
-(?P<upstream>
- .+?
-)
-(?:
- -
- (?P<revision>[^-]+)
-)?
-$
-"""
- _version_re = re.compile(_version_rules, re.X)
-
- def __init__(self, version):
- match = self._version_re.match(version)
- if match is None:
- raise RuntimeError(u"Invalid debian version")
- self.epoch = None
- if match.group("epoch") is not None:
- self.epoch = int(match.group("epoch"))
- self.upstream = match.group("upstream")
- self.revision = match.group("revision")
-
- def __str__(self):
- return self.complete
-
- @property
- def complete(self):
- if self.epoch is not None:
- return u"%d:%s" % (self.epoch, self.complete_noepoch)
- return self.complete_noepoch
-
- @property
- def complete_noepoch(self):
- if self.revision is not None:
- return u"%s-%s" % (self.upstream, self.revision)
- return self.upstream
-
- @property
- def debian(self):
- from warnings import warn
- warn(u"debian argument was replaced by revision", DeprecationWarning, stacklevel=2)
- return self.revision
-
-
-class VersionLinux(Version):
- _version_linux_rules = r"""
-^
-(?P<version>
- \d+\.\d+
-)
-(?P<update>
- (?:\.\d+)?
- (?:-[a-z]+\d+)?
-)
-(?:
- ~
- (?P<modifier>
- .+?
- )
-)?
-(?:
- \.dfsg\.
- (?P<dfsg>
- \d+
- )
-)?
--
-\d+
-(\.\d+)?
-(?:
- (?P<revision_experimental>
- ~exp\d+
- )
- |
- (?P<revision_security>
- [~+]deb\d+u\d+
- )?
- (?P<revision_backports>
- ~bpo\d+\+\d+
- )?
- |
- (?P<revision_other>
- [^-]+
- )
-)
-$
-"""
- _version_linux_re = re.compile(_version_linux_rules, re.X)
-
- def __init__(self, version):
- super(VersionLinux, self).__init__(version)
- match = self._version_linux_re.match(version)
- if match is None:
- raise RuntimeError(u"Invalid debian linux version")
- d = match.groupdict()
- self.linux_modifier = d['modifier']
- self.linux_version = d['version']
- if d['modifier'] is not None:
- assert not d['update']
- self.linux_upstream = '-'.join((d['version'], d['modifier']))
- else:
- self.linux_upstream = d['version']
- self.linux_upstream_full = self.linux_upstream + d['update']
- self.linux_dfsg = d['dfsg']
- self.linux_revision_experimental = match.group('revision_experimental') and True
- self.linux_revision_security = match.group('revision_security') and True
- self.linux_revision_backports = match.group('revision_backports') and True
- self.linux_revision_other = match.group('revision_other') and True
-
-
-class PackageArchitecture(collections.MutableSet):
- __slots__ = '_data'
-
- def __init__(self, value=None):
- self._data = set()
- if value:
- self.extend(value)
-
- def __contains__(self, value):
- return self._data.__contains__(value)
-
- def __iter__(self):
- return self._data.__iter__()
-
- def __len__(self):
- return self._data.__len__()
-
- def __str__(self):
- return ' '.join(sorted(self))
-
- def add(self, value):
- self._data.add(value)
-
- def discard(self, value):
- self._data.discard(value)
-
- def extend(self, value):
- if isinstance(value, str):
- for i in re.split('\s', value.strip()):
- self.add(i)
- else:
- raise RuntimeError
-
-
-class PackageDescription(object):
- __slots__ = "short", "long"
-
- def __init__(self, value=None):
- self.short = []
- self.long = []
- if value is not None:
- desc_split = value.split("\n", 1)
- self.append_short(desc_split[0])
- if len(desc_split) == 2:
- self.append(desc_split[1])
-
- def __str__(self):
- wrap = utils.TextWrapper(width=74, fix_sentence_endings=True).wrap
- short = ', '.join(self.short)
- long_pars = []
- for i in self.long:
- long_pars.append(wrap(i))
- long = '\n .\n '.join(['\n '.join(i) for i in long_pars])
- return short + '\n ' + long if long else short
-
- def append(self, str):
- str = str.strip()
- if str:
- self.long.extend(str.split(u"\n.\n"))
-
- def append_short(self, str):
- for i in [i.strip() for i in str.split(u",")]:
- if i:
- self.short.append(i)
-
- def extend(self, desc):
- if isinstance(desc, PackageDescription):
- self.short.extend(desc.short)
- self.long.extend(desc.long)
- else:
- raise TypeError
-
-
-class PackageRelation(list):
- def __init__(self, value=None, override_arches=None):
- if value:
- self.extend(value, override_arches)
-
- def __str__(self):
- return ', '.join(str(i) for i in self)
-
- def _search_value(self, value):
- for i in self:
- if i._search_value(value):
- return i
- return None
-
- def append(self, value, override_arches=None):
- if isinstance(value, str):
- value = PackageRelationGroup(value, override_arches)
- elif not isinstance(value, PackageRelationGroup):
- raise ValueError(u"got %s" % type(value))
- j = self._search_value(value)
- if j:
- j._update_arches(value)
- else:
- super(PackageRelation, self).append(value)
-
- def extend(self, value, override_arches=None):
- if isinstance(value, str):
- value = (j.strip() for j in re.split(',', value.strip()))
- for i in value:
- self.append(i, override_arches)
-
-
-class PackageRelationGroup(list):
- def __init__(self, value=None, override_arches=None):
- if value:
- self.extend(value, override_arches)
-
- def __str__(self):
- return ' | '.join(str(i) for i in self)
-
- def _search_value(self, value):
- for i, j in zip(self, value):
- if i.name != j.name or i.operator != j.operator or \
- i.version != j.version or i.restrictions != j.restrictions:
- return None
- return self
-
- def _update_arches(self, value):
- for i, j in zip(self, value):
- if i.arches:
- for arch in j.arches:
- if arch not in i.arches:
- i.arches.append(arch)
-
- def append(self, value, override_arches=None):
- if isinstance(value, str):
- value = PackageRelationEntry(value, override_arches)
- elif not isinstance(value, PackageRelationEntry):
- raise ValueError
- super(PackageRelationGroup, self).append(value)
-
- def extend(self, value, override_arches=None):
- if isinstance(value, str):
- value = (j.strip() for j in re.split('\|', value.strip()))
- for i in value:
- self.append(i, override_arches)
-
-
-class PackageRelationEntry(object):
- __slots__ = "name", "operator", "version", "arches", "restrictions"
-
- _re = re.compile(r'^(\S+)(?: \((<<|<=|=|!=|>=|>>)\s*([^)]+)\))?(?: \[([^]]+)\])?(?: <([^>]+)>)?$')
-
- class _operator(object):
- OP_LT = 1
- OP_LE = 2
- OP_EQ = 3
- OP_NE = 4
- OP_GE = 5
- OP_GT = 6
-
- operators = {
- '<<': OP_LT,
- '<=': OP_LE,
- '=': OP_EQ,
- '!=': OP_NE,
- '>=': OP_GE,
- '>>': OP_GT,
- }
-
- operators_neg = {
- OP_LT: OP_GE,
- OP_LE: OP_GT,
- OP_EQ: OP_NE,
- OP_NE: OP_EQ,
- OP_GE: OP_LT,
- OP_GT: OP_LE,
- }
-
- operators_text = dict((b, a) for a, b in operators.items())
-
- __slots__ = '_op',
-
- def __init__(self, value):
- self._op = self.operators[value]
-
- def __neg__(self):
- return self.__class__(self.operators_text[self.operators_neg[self._op]])
-
- def __str__(self):
- return self.operators_text[self._op]
-
- def __eq__(self, other):
- return type(other) == type(self) and self._op == other._op
-
- def __init__(self, value=None, override_arches=None):
- if not isinstance(value, str):
- raise ValueError
-
- self.parse(value)
-
- if override_arches:
- self.arches = list(override_arches)
-
- def __str__(self):
- ret = [self.name]
- if self.operator is not None and self.version is not None:
- ret.extend((' (', str(self.operator), ' ', self.version, ')'))
- if self.arches:
- ret.extend((' [', ' '.join(self.arches), ']'))
- if self.restrictions:
- ret.extend((' <', ' '.join(self.restrictions), '>'))
- return ''.join(ret)
-
- def parse(self, value):
- match = self._re.match(value)
- if match is None:
- raise RuntimeError(u"Can't parse dependency %s" % value)
- match = match.groups()
- self.name = match[0]
- if match[1] is not None:
- self.operator = self._operator(match[1])
- else:
- self.operator = None
- self.version = match[2]
- if match[3] is not None:
- self.arches = re.split('\s+', match[3])
- else:
- self.arches = []
- if match[4] is not None:
- self.restrictions = re.split('\s+', match[4])
- else:
- self.restrictions = []
-
-
-class _ControlFileDict(dict):
- def __setitem__(self, key, value):
- try:
- cls = self._fields[key]
- if not isinstance(value, cls):
- value = cls(value)
- except KeyError:
- pass
- super(_ControlFileDict, self).__setitem__(key, value)
-
- def keys(self):
- keys = set(super(_ControlFileDict, self).keys())
- for i in self._fields.keys():
- if i in self:
- keys.remove(i)
- yield i
- for i in sorted(list(keys)):
- yield i
-
- def items(self):
- for i in self.keys():
- yield (i, self[i])
-
- def values(self):
- for i in self.keys():
- yield self[i]
-
-
-class Package(_ControlFileDict):
- _fields = collections.OrderedDict((
- ('Package', str),
- ('Source', str),
- ('Architecture', PackageArchitecture),
- ('Section', str),
- ('Priority', str),
- ('Maintainer', str),
- ('Uploaders', str),
- ('Standards-Version', str),
- ('Build-Depends', PackageRelation),
- ('Build-Depends-Arch', PackageRelation),
- ('Build-Depends-Indep', PackageRelation),
- ('Provides', PackageRelation),
- ('Pre-Depends', PackageRelation),
- ('Depends', PackageRelation),
- ('Recommends', PackageRelation),
- ('Suggests', PackageRelation),
- ('Replaces', PackageRelation),
- ('Breaks', PackageRelation),
- ('Conflicts', PackageRelation),
- ('Description', PackageDescription),
- ))
-
-
-class TestsControl(_ControlFileDict):
- _fields = collections.OrderedDict((
- ('Tests', str),
- ('Test-Command', str),
- ('Restrictions', str),
- ('Features', str),
- ('Depends', PackageRelation),
- ('Tests-Directory', str),
- ('Classes', str),
- ))
+++ /dev/null
-import re
-
-
-class FirmwareFile(object):
- def __init__(self, binary, desc=None, source=None, version=None):
- self.binary = binary
- self.desc = desc
- self.source = source
- self.version = version
-
-
-class FirmwareSection(object):
- def __init__(self, driver, files, licence):
- self.driver = driver
- self.files = files
- self.licence = licence
-
-
-class FirmwareWhence(list):
- def __init__(self, file):
- self.read(file)
-
- def read(self, file):
- in_header = True
- driver = None
- files = {}
- licence = None
- binary = []
- desc = None
- source = []
- version = None
-
- for line in file:
- if line.startswith('----------'):
- if in_header:
- in_header = False
- else:
- # Finish old section
- if driver:
- self.append(FirmwareSection(driver, files, licence))
- driver = None
- files = {}
- licence = None
- continue
-
- if in_header:
- continue
-
- if line == '\n':
- # End of field; end of file fields
- for b in binary:
- # XXX The WHENCE file isn't yet consistent in its
- # association of binaries and their sources and
- # metadata. This associates all sources and
- # metadata in a group with each binary.
- files[b] = FirmwareFile(b, desc, source, version)
- binary = []
- desc = None
- source = []
- version = None
- continue
-
- match = re.match(
- r'(Driver|File|Info|Licen[cs]e|Source|Version'
- r'|Original licen[cs]e info(?:rmation)?):\s*(.*)\n',
- line)
- if match:
- keyword, value = match.group(1, 2)
- if keyword == 'Driver':
- driver = value.split(' ')[0].lower()
- elif keyword == 'File':
- match = re.match(r'(\S+)(?:\s+--\s+(.*))?', value)
- binary.append(match.group(1))
- desc = match.group(2)
- elif keyword in ['Info', 'Version']:
- version = value
- elif keyword == 'Source':
- source.append(value)
- else:
- licence = value
- elif licence is not None:
- licence = (licence + '\n' +
- re.sub(r'^(?:[/ ]\*| \*/)?\s*(.*?)\s*$', r'\1', line))
-
- # Finish last section if non-empty
- for b in binary:
- files[b] = FirmwareFile(b, desc, source, version)
- if driver:
- self.append(FirmwareSection(driver, files, licence))
+++ /dev/null
-import codecs
-from collections import OrderedDict
-
-from .debian import *
-
-
-class PackagesList(OrderedDict):
- def append(self, package):
- self[package['Package']] = package
-
- def extend(self, packages):
- for package in packages:
- self[package['Package']] = package
-
-
-class Makefile(object):
- def __init__(self):
- self.rules = {}
- self.add('.NOTPARALLEL')
-
- def add(self, name, deps=None, cmds=None):
- if name in self.rules:
- self.rules[name].add(deps, cmds)
- else:
- self.rules[name] = self.Rule(name, deps, cmds)
- if deps is not None:
- for i in deps:
- if i not in self.rules:
- self.rules[i] = self.Rule(i)
-
- def write(self, out):
- for i in sorted(self.rules.keys()):
- self.rules[i].write(out)
-
- class Rule(object):
- def __init__(self, name, deps=None, cmds=None):
- self.name = name
- self.deps, self.cmds = set(), []
- self.add(deps, cmds)
-
- def add(self, deps=None, cmds=None):
- if deps is not None:
- self.deps.update(deps)
- if cmds is not None:
- self.cmds.append(cmds)
-
- def write(self, out):
- deps_string = ''
- if self.deps:
- deps = list(self.deps)
- deps.sort()
- deps_string = ' ' + ' '.join(deps)
-
- if self.cmds:
- if deps_string:
- out.write('%s::%s\n' % (self.name, deps_string))
- for c in self.cmds:
- out.write('%s::\n' % self.name)
- for i in c:
- out.write('\t%s\n' % i)
- else:
- out.write('%s:%s\n' % (self.name, deps_string))
-
-
-class MakeFlags(dict):
- def __repr__(self):
- repr = super(flags, self).__repr__()
- return "%s(%s)" % (self.__class__.__name__, repr)
-
- def __str__(self):
- return ' '.join("%s='%s'" % i for i in sorted(self.items()))
-
- def copy(self):
- return self.__class__(super(MakeFlags, self).copy())
-
-
-class Gencontrol(object):
- makefile_targets = ('binary-arch', 'build-arch', 'setup')
- makefile_targets_indep = ('binary-indep', 'build-indep', 'setup')
-
- def __init__(self, config, templates, version=Version):
- self.config, self.templates = config, templates
- self.changelog = Changelog(version=version)
- self.vars = {}
-
- def __call__(self):
- packages = PackagesList()
- makefile = Makefile()
-
- self.do_source(packages)
- self.do_main(packages, makefile)
- self.do_extra(packages, makefile)
-
- self.write(packages, makefile)
-
- def do_source(self, packages):
- source = self.templates["control.source"][0]
- source['Source'] = self.changelog[0].source
- packages['source'] = self.process_package(source, self.vars)
-
- def do_main(self, packages, makefile):
- config_entry = self.config['base', ]
- vars = self.vars.copy()
-
- makeflags = MakeFlags()
- extra = {}
-
- self.do_main_setup(vars, makeflags, extra)
- self.do_main_makefile(makefile, makeflags, extra)
- self.do_main_packages(packages, vars, makeflags, extra)
- self.do_main_recurse(packages, makefile, vars, makeflags, extra)
-
- def do_main_setup(self, vars, makeflags, extra):
- pass
-
- def do_main_makefile(self, makefile, makeflags, extra):
- makefile.add('build-indep', cmds=["$(MAKE) -f debian/rules.real build-indep %s" % makeflags])
- makefile.add('binary-indep', cmds=["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags])
-
- def do_main_packages(self, packages, vars, makeflags, extra):
- pass
-
- def do_main_recurse(self, packages, makefile, vars, makeflags, extra):
- for featureset in self.config['base', ]['featuresets']:
- if self.config.merge('base', None, featureset).get('enabled', True):
- self.do_indep_featureset(packages, makefile, featureset,
- vars.copy(), makeflags.copy(), extra)
- for arch in iter(self.config['base', ]['arches']):
- self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra)
-
- def do_extra(self, packages, makefile):
- templates_extra = self.templates.get("control.extra", None)
- if templates_extra is None:
- return
-
- packages_extra = self.process_packages(templates_extra, self.vars)
- packages.extend(packages_extra)
- extra_arches = {}
- for package in packages_extra:
- arches = package['Architecture']
- for arch in arches:
- i = extra_arches.get(arch, [])
- i.append(package)
- extra_arches[arch] = i
- for arch in sorted(extra_arches.keys()):
- cmds = []
- for i in extra_arches[arch]:
- cmds.append("$(MAKE) -f debian/rules.real install-dummy ARCH='%s' DH_OPTIONS='-p%s'" % (arch, i['Package']))
- makefile.add('binary-arch_%s' % arch, ['binary-arch_%s_extra' % arch])
- makefile.add("binary-arch_%s_extra" % arch, cmds = cmds)
-
- def do_indep_featureset(self, packages, makefile, featureset, vars,
- makeflags, extra):
- vars['localversion'] = ''
- if featureset != 'none':
- vars['localversion'] = '-' + featureset
-
- self.do_indep_featureset_setup(vars, makeflags, featureset, extra)
- self.do_indep_featureset_makefile(makefile, featureset, makeflags,
- extra)
- self.do_indep_featureset_packages(packages, makefile, featureset,
- vars, makeflags, extra)
-
- def do_indep_featureset_setup(self, vars, makeflags, featureset, extra):
- pass
-
- def do_indep_featureset_makefile(self, makefile, featureset, makeflags,
- extra):
- makeflags['FEATURESET'] = featureset
-
- for i in self.makefile_targets_indep:
- target1 = i
- target2 = '_'.join((target1, featureset))
- target3 = '_'.join((target2, 'real'))
- makefile.add(target1, [target2])
- makefile.add(target2, [target3])
-
- def do_indep_featureset_packages(self, packages, makefile, featureset,
- vars, makeflags, extra):
- pass
-
- def do_arch(self, packages, makefile, arch, vars, makeflags, extra):
- vars['arch'] = arch
-
- self.do_arch_setup(vars, makeflags, arch, extra)
- self.do_arch_makefile(makefile, arch, makeflags, extra)
- self.do_arch_packages(packages, makefile, arch, vars, makeflags, extra)
- self.do_arch_recurse(packages, makefile, arch, vars, makeflags, extra)
-
- def do_arch_setup(self, vars, makeflags, arch, extra):
- pass
-
- def do_arch_makefile(self, makefile, arch, makeflags, extra):
- makeflags['ARCH'] = arch
-
- for i in self.makefile_targets:
- target1 = i
- target2 = '_'.join((target1, arch))
- target3 = '_'.join((target2, 'real'))
- makefile.add(target1, [target2])
- makefile.add(target2, [target3])
-
- def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
- pass
-
- def do_arch_recurse(self, packages, makefile, arch, vars, makeflags, extra):
- for featureset in self.config['base', arch].get('featuresets', ()):
- self.do_featureset(packages, makefile, arch, featureset, vars.copy(), makeflags.copy(), extra)
-
- def do_featureset(self, packages, makefile, arch, featureset, vars, makeflags, extra):
- config_base = self.config.merge('base', arch, featureset)
- if not config_base.get('enabled', True):
- return
-
- vars['localversion'] = ''
- if featureset != 'none':
- vars['localversion'] = '-' + featureset
-
- self.do_featureset_setup(vars, makeflags, arch, featureset, extra)
- self.do_featureset_makefile(makefile, arch, featureset, makeflags, extra)
- self.do_featureset_packages(packages, makefile, arch, featureset, vars, makeflags, extra)
- self.do_featureset_recurse(packages, makefile, arch, featureset, vars, makeflags, extra)
-
- def do_featureset_setup(self, vars, makeflags, arch, featureset, extra):
- pass
-
- def do_featureset_makefile(self, makefile, arch, featureset, makeflags, extra):
- makeflags['FEATURESET'] = featureset
-
- for i in self.makefile_targets:
- target1 = '_'.join((i, arch))
- target2 = '_'.join((target1, featureset))
- target3 = '_'.join((target2, 'real'))
- makefile.add(target1, [target2])
- makefile.add(target2, [target3])
-
- def do_featureset_packages(self, packages, makefile, arch, featureset, vars, makeflags, extra):
- pass
-
- def do_featureset_recurse(self, packages, makefile, arch, featureset, vars, makeflags, extra):
- for flavour in self.config['base', arch, featureset]['flavours']:
- self.do_flavour(packages, makefile, arch, featureset, flavour, vars.copy(), makeflags.copy(), extra)
-
- def do_flavour(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra):
- config_base = self.config.merge('base', arch, featureset, flavour)
-
- vars['localversion'] += '-' + flavour
-
- self.do_flavour_setup(vars, makeflags, arch, featureset, flavour, extra)
- self.do_flavour_makefile(makefile, arch, featureset, flavour, makeflags, extra)
- self.do_flavour_packages(packages, makefile, arch, featureset, flavour, vars, makeflags, extra)
-
- def do_flavour_setup(self, vars, makeflags, arch, featureset, flavour, extra):
- for i in (
- ('kernel-arch', 'KERNEL_ARCH'),
- ('localversion', 'LOCALVERSION'),
- ):
- if i[0] in vars:
- makeflags[i[1]] = vars[i[0]]
-
- def do_flavour_makefile(self, makefile, arch, featureset, flavour, makeflags, extra):
- makeflags['FLAVOUR'] = flavour
-
- for i in self.makefile_targets:
- target1 = '_'.join((i, arch, featureset))
- target2 = '_'.join((target1, flavour))
- target3 = '_'.join((target2, 'real'))
- makefile.add(target1, [target2])
- makefile.add(target2, [target3])
-
- def do_flavour_packages(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra):
- pass
-
- def process_relation(self, dep, vars):
- import copy
- dep = copy.deepcopy(dep)
- for groups in dep:
- for item in groups:
- item.name = self.substitute(item.name, vars)
- if item.version:
- item.version = self.substitute(item.version, vars)
- return dep
-
- def process_description(self, in_desc, vars):
- desc = in_desc.__class__()
- desc.short = self.substitute(in_desc.short, vars)
- for i in in_desc.long:
- desc.append(self.substitute(i, vars))
- return desc
-
- def process_package(self, in_entry, vars={}):
- entry = in_entry.__class__()
- for key, value in in_entry.items():
- if isinstance(value, PackageRelation):
- value = self.process_relation(value, vars)
- elif isinstance(value, PackageDescription):
- value = self.process_description(value, vars)
- else:
- value = self.substitute(value, vars)
- entry[key] = value
- return entry
-
- def process_packages(self, entries, vars):
- return [self.process_package(i, vars) for i in entries]
-
- def substitute(self, s, vars):
- if isinstance(s, (list, tuple)):
- return [self.substitute(i, vars) for i in s]
-
- def subst(match):
- return vars[match.group(1)]
-
- return re.sub(r'@([-_a-z0-9]+)@', subst, str(s))
-
- def write(self, packages, makefile):
- self.write_control(packages.values())
- self.write_makefile(makefile)
-
- def write_config(self):
- f = file("debian/config.dump", 'w')
- self.config.write(f)
- f.close()
-
- def write_control(self, list):
- self.write_rfc822(codecs.open("debian/control", 'w', 'utf-8'), list)
-
- def write_makefile(self, makefile):
- f = open("debian/rules.gen", 'w')
- makefile.write(f)
- f.close()
-
- def write_rfc822(self, f, list):
- for entry in list:
- for key, value in entry.items():
- f.write(u"%s: %s\n" % (key, value))
- f.write('\n')
-
-def merge_packages(packages, new, arch):
- for new_package in new:
- name = new_package['Package']
- if name in packages:
- package = packages.get(name)
- package['Architecture'].add(arch)
-
- for field in 'Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts':
- if field in new_package:
- if field in package:
- v = package[field]
- v.extend(new_package[field])
- else:
- package[field] = new_package[field]
-
- else:
- new_package['Architecture'] = arch
- packages.append(new_package)
+++ /dev/null
-from collections import OrderedDict
-
-__all__ = (
- "KconfigFile",
-)
-
-
-class KConfigEntry(object):
- __slots__ = 'name', 'value', 'comments'
-
- def __init__(self, name, value, comments=None):
- self.name, self.value = name, value
- self.comments = comments or []
-
- def __eq__(self, other):
- return self.name == other.name and self.value == other.value
-
- def __hash__(self):
- return hash(self.name) | hash(self.value)
-
- def __repr__(self):
- return '<{}({!r}, {!r}, {!r})>'.format(self.__class__.__name__, self.name, self.value, self.comments)
-
- def __str__(self):
- return 'CONFIG_{}={}'.format(self.name, self.value)
-
- def write(self):
- for comment in self.comments:
- yield '#. ' + comment
- yield str(self)
-
-
-class KConfigEntryTristate(KConfigEntry):
- __slots__ = ()
-
- VALUE_NO = False
- VALUE_YES = True
- VALUE_MOD = object()
-
- def __init__(self, name, value, comments=None):
- if value == 'n' or value is None:
- value = self.VALUE_NO
- elif value == 'y':
- value = self.VALUE_YES
- elif value == 'm':
- value = self.VALUE_MOD
- else:
- raise NotImplementedError
- super(KConfigEntryTristate, self).__init__(name, value, comments)
-
- def __str__(self):
- if self.value is self.VALUE_MOD:
- return 'CONFIG_{}=m'.format(self.name)
- if self.value:
- return 'CONFIG_{}=y'.format(self.name)
- return '# CONFIG_{} is not set'.format(self.name)
-
-
-class KconfigFile(OrderedDict):
- def __str__(self):
- ret = []
- for i in self.str_iter():
- ret.append(i)
- return '\n'.join(ret) + '\n'
-
- def read(self, f):
- for line in iter(f.readlines()):
- line = line.strip()
- if line.startswith("CONFIG_"):
- i = line.find('=')
- option = line[7:i]
- value = line[i + 1:]
- self.set(option, value)
- elif line.startswith("# CONFIG_"):
- option = line[9:-11]
- self.set(option, 'n')
- elif line.startswith("#") or not line:
- pass
- else:
- raise RuntimeError("Can't recognize %s" % line)
-
- def set(self, key, value):
- if value in ('y', 'm', 'n'):
- entry = KConfigEntryTristate(key, value)
- else:
- entry = KConfigEntry(key, value)
- self[key] = entry
-
- def str_iter(self):
- for key, value in self.items():
- yield str(value)
+++ /dev/null
-from __future__ import print_function
-
-import glob
-import os
-import shutil
-import subprocess
-
-
-class Operation(object):
- def __init__(self, name, data):
- self.name, self.data = name, data
-
- def __call__(self, dir='.', reverse=False):
- try:
- if not reverse:
- self.do(dir)
- else:
- self.do_reverse(dir)
- self._log(True)
- except:
- self._log(False)
- raise
-
- def _log(self, result):
- if result:
- s = "OK"
- else:
- s = "FAIL"
- print(""" (%s) %-4s %s""" % (self.operation, s, self.name))
-
- def do(self, dir):
- raise NotImplementedError
-
- def do_reverse(self, dir):
- raise NotImplementedError
-
-
-class OperationPatch(Operation):
- def __init__(self, name, filename, data):
- super(OperationPatch, self).__init__(name, data)
- self.filename = filename
-
- def _call(self, dir, *extraargs):
- with open(self.filename) as f:
- subprocess.check_call(
- ("patch", "-p1", "-f", "-s", "-t", "--no-backup-if-mismatch") + extraargs,
- cwd=dir,
- stdin=f,
- )
-
- def patch_push(self, dir):
- self._call(dir, '--fuzz=1')
-
- def patch_pop(self, dir):
- self._call(dir, '-R')
-
-
-class OperationPatchPush(OperationPatch):
- operation = '+'
-
- do = OperationPatch.patch_push
- do_reverse = OperationPatch.patch_pop
-
-
-class OperationPatchPop(OperationPatch):
- operation = '-'
-
- do = OperationPatch.patch_pop
- do_reverse = OperationPatch.patch_push
-
-
-class SubOperation(Operation):
- def _log(self, result):
- if result:
- s = "OK"
- else:
- s = "FAIL"
- print(""" %-10s %-4s %s""" % ('(%s)' % self.operation, s, self.name))
-
-
-class SubOperationFilesRemove(SubOperation):
- operation = "remove"
-
- def do(self, dir):
- name = os.path.join(dir, self.name)
- for n in glob.iglob(name):
- if os.path.isdir(n):
- shutil.rmtree(n)
- else:
- os.unlink(n)
-
-
-class SubOperationFilesUnifdef(SubOperation):
- operation = "unifdef"
-
- def do(self, dir):
- filename = os.path.join(dir, self.name)
- ret = subprocess.call(("unifdef", "-o", filename, filename) + tuple(self.data))
- if ret == 0:
- raise RuntimeError("unifdef of %s removed nothing" % self.name)
- elif ret != 1:
- raise RuntimeError("unifdef failed")
-
-
-class OperationFiles(Operation):
- operation = 'X'
-
- suboperations = {
- 'remove': SubOperationFilesRemove,
- 'rm': SubOperationFilesRemove,
- 'unifdef': SubOperationFilesUnifdef,
- }
-
- def __init__(self, name, filename, data):
- super(OperationFiles, self).__init__(name, data)
-
- ops = []
-
- with open(filename) as f:
- for line in f:
- line = line.strip()
- if not line or line[0] == '#':
- continue
-
- items = line.split()
- operation, filename = items[:2]
- data = items[2:]
-
- if operation not in self.suboperations:
- raise RuntimeError('Undefined operation "%s" in series %s' % (operation, name))
-
- ops.append(self.suboperations[operation](filename, data))
-
- self.ops = ops
-
- def do(self, dir):
- for i in self.ops:
- i(dir=dir)
-
-
-class PatchSeries(list):
- operations = {
- '+': OperationPatchPush,
- '-': OperationPatchPop,
- 'X': OperationFiles,
- }
-
- def __init__(self, name, root, fp):
- self.name, self.root = name, root
-
- for line in fp:
- line = line.strip()
-
- if not len(line) or line[0] == '#':
- continue
-
- items = line.split(' ')
- operation, filename = items[:2]
- data = items[2:]
-
- if operation in self.operations:
- f = os.path.join(self.root, filename)
- if os.path.exists(f):
- self.append(self.operations[operation](filename, f, data))
- else:
- raise RuntimeError("Can't find patch %s for series %s" % (filename, self.name))
- else:
- raise RuntimeError('Undefined operation "%s" in series %s' % (operation, name))
-
- def __call__(self, cond=bool, dir='.', reverse=False):
- if not reverse:
- l = self
- else:
- l = self[::-1]
- for i in l:
- if cond(i):
- i(dir=dir, reverse=reverse)
-
- def __repr__(self):
- return '<%s object for %s>' % (self.__class__.__name__, self.name)
+++ /dev/null
-import codecs
-import os
-import re
-import textwrap
-
-
-class Templates(object):
- def __init__(self, dirs=["debian/templates"]):
- self.dirs = dirs
-
- self._cache = {}
-
- def __getitem__(self, key):
- ret = self.get(key)
- if ret is not None:
- return ret
- raise KeyError(key)
-
- def _read(self, name):
- prefix, id = name.split('.', 1)
-
- for suffix in ['.in', '']:
- for dir in self.dirs:
- filename = "%s/%s%s" % (dir, name, suffix)
- if os.path.exists(filename):
- f = codecs.open(filename, 'r', 'utf-8')
- if prefix == 'control':
- return read_control(f)
- if prefix == 'tests-control':
- return read_tests_control(f)
- return f.read()
-
- def get(self, key, default=None):
- if key in self._cache:
- return self._cache[key]
-
- value = self._cache.setdefault(key, self._read(key))
- if value is None:
- return default
- return value
-
-
-def read_control(f):
- from .debian import Package
- return _read_rfc822(f, Package)
-
-def read_tests_control(f):
- from .debian import TestsControl
- return _read_rfc822(f, TestsControl)
-
-def _read_rfc822(f, cls):
- entries = []
- eof = False
-
- while not eof:
- e = cls()
- last = None
- lines = []
- while True:
- line = f.readline()
- if not line:
- eof = True
- break
- # Strip comments rather than trying to preserve them
- if line[0] == '#':
- continue
- line = line.strip('\n')
- if not line:
- break
- if line[0] in ' \t':
- if not last:
- raise ValueError('Continuation line seen before first header')
- lines.append(line.lstrip())
- continue
- if last:
- e[last] = '\n'.join(lines)
- i = line.find(':')
- if i < 0:
- raise ValueError(u"Not a header, not a continuation: ``%s''" % line)
- last = line[:i]
- lines = [line[i + 1:].lstrip()]
- if last:
- e[last] = '\n'.join(lines)
- if e:
- entries.append(e)
-
- return entries
-
-
-class TextWrapper(textwrap.TextWrapper):
- wordsep_re = re.compile(
- r'(\s+|' # any whitespace
- r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
+++ /dev/null
-import re
-from debian_linux.debian import Version
-
-
-class VersionXen(Version):
- _version_xen_rules = r"""
- ^
- (?P<major>\d+)\.(?P<minor>\d+)(?:\.(?P<patch>\d+))?
- (?:
- ~pre(?:\+\d+\.(?P<pre_commit>[0-9a-f]{10}))
- |
- ~rc(?P<rc>\d+)(?:\+\d+\.(?P<rc_commit>[0-9a-f]{10}))?
- )?
- -
- (?P<debian_revision>[^-]+)
- $
- """
- _version_xen_re = re.compile(_version_xen_rules, re.X)
-
- def __init__(self, version):
- super(VersionXen, self).__init__(version)
- match = self._version_xen_re.match(version)
- if match is None:
- raise ValueError("Invalid debian xen version")
- d = match.groupdict()
- self.major = d['major']
- self.minor = d['minor']
- self.xen_version = '%s.%s' % (self.major, self.minor)
- self.patch = d['patch']
- self.pre_commit = d['pre_commit']
- self.rc_commit = d['rc_commit']
- self.rc = d['rc']
- self.debian_revision = d['debian_revision']
-
- # Now find out which treeish in the upstream source we need to build
- # the orig tar from.
-
- # 1. pre version in between stable releases with explicit commit
- # e.g. 4.10.2~pre+1.25e0657ed4-1
- if self.pre_commit is not None:
- self.treeish = self.pre_commit
- # 2. explicit commit while in rc
- # e.g. 4.11.0~rc6+1.35fcb982ea-1~exp1
- elif self.rc_commit is not None:
- self.treeish = self.rc_commit
- # 3. release candidate
- # e.g. 4.11.0~rc7-1~exp1
- elif self.rc is not None:
- self.treeish = '%s.%s.%s-rc%s' % (self.major, self.minor, self.patch, self.rc)
- # 4. regular release, like 4.10.2 -> tag RELEASE-4.10.2
- else:
- self.treeish = 'RELEASE-%s.%s.%s' % (self.major, self.minor, self.patch)
--- /dev/null
+Submit-As: src:xen
-usr/lib/*/libxenctrl.a
-usr/lib/*/libxenctrl.so
-usr/lib/*/libxenguest.a
-usr/lib/*/libxenguest.so
-usr/lib/*/libxenlight.a
-usr/lib/*/libxenlight.so
-usr/lib/*/libxenstore.a
-usr/lib/*/libxenstore.so
-usr/lib/*/libxlutil.a
-usr/lib/*/libxlutil.so
-usr/lib/*/libxencall.a
-usr/lib/*/libxencall.so
-usr/lib/*/libxenevtchn.a
-usr/lib/*/libxenevtchn.so
-usr/lib/*/libxenforeignmemory.a
-usr/lib/*/libxenforeignmemory.so
-usr/lib/*/libxengnttab.a
-usr/lib/*/libxengnttab.so
-usr/lib/*/libxentoollog.a
-usr/lib/*/libxentoollog.so
-usr/lib/*/libxendevicemodel.a
-usr/lib/*/libxendevicemodel.so
-usr/lib/*/libxentoolcore.a
-usr/lib/*/libxentoolcore.so
-usr/include/_libxl*.h
-usr/include/libxl*.h
-usr/include/xenctrl.h
-usr/include/xenguest.h
-usr/include/xenstore*.h
-usr/include/xenstore-compat/xs* usr/include
-usr/include/xentoolcore.h
-usr/include/xentoollog.h
-usr/include/xendevicemodel.h
-usr/include/xen
-usr/lib/*/pkgconfig/*.pc
-# New headers in xen-4.8
-#usr/include/fsimage_grub.h
-#usr/include/fsimage.h
-#usr/include/fsimage_plugin.h
-#usr/include/libxenvchan.h
-usr/include/xencall.h
-usr/include/xenctrl_compat.h
-usr/include/xenevtchn.h
-usr/include/xenforeignmemory.h
-usr/include/xengnttab.h
-usr/include/xenstat.h
+usr/lib/*/*.a
+usr/lib/*/*.so
+usr/include
+usr/lib/*/pkgconfig
--- /dev/null
+usr/lib/*/libxencall.so.*
--- /dev/null
+usr/lib/*/libxendevicemodel.so.*
--- /dev/null
+usr/lib/*/libxenevtchn.so.*
--- /dev/null
+usr/lib/*/libxenforeignmemory.so.*
--- /dev/null
+usr/lib/*/libxengnttab.so.*
--- /dev/null
+usr/lib/*/libxenctrl.so.*
+usr/lib/*/libxenguest.so.*
+usr/lib/*/libxenlight.so.*
+usr/lib/*/libxenstat.so.*
+usr/lib/*/libxenvchan.so.*
+usr/lib/*/libxlutil.so.*
+usr/lib/xen-@version@/lib/*/libfsimage*
+usr/lib/xen-@version@/lib/*/fs
--- /dev/null
+no-symbols-control-file usr/lib/*/lib*.so.@version@.0
+# ^ the ABI changes every Xen release and every Debian release anyway
+# and we do not upload to Debian packages based on Xen upstream
+# versions which are at least an rc with a stable ABI.
+
+package-name-doesnt-match-sonames
+# ^ yes, this is a portmanteau package. They all change at once.
usr/lib/*/libxenstore.so.*
-usr/lib/*/libxentoolcore*.so.*
--- /dev/null
+usr/lib/*/libxentoolcore.so.*
--- /dev/null
+usr/lib/*/libxentoollog.so.*
--- /dev/null
+*.pyc
+
+# It is not clear why we have our own init scripts etc. in Debian.
+# We should probably transition to using the upstream ones and
+# fix any bugs we encounter.
+etc/init.d/xendriverdomain
+etc/init.d/xencommons
+etc/init.d/xen-watchdog
+etc/init.d/xendomains
+etc/default/xencommons
+
+# This is all handled by debian/shuffle-boot-files,
+# which dh_missing does not know about.
+boot/*
+
+# This README explains what the various stuff in /etc/xen is.
+# It is not right for Debian because we have our own scripts etc.
+# (see above). When we do maybe we should install it, or maybe
+# we should move it to /usr/share/doc/.
+etc/xen/README
+
+# This file seems like develoment documentation explaining
+# some of the code in the upstream init scripts.
+etc/xen/README.incompatibilities
+
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-include /usr/share/dpkg/default.mk
-
-SHELL := sh -e
-SOURCE := $(shell dpkg-parsechangelog -SSource)
-VERSION := $(shell dpkg-parsechangelog -SVersion)
-VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,')
-VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -rne 's,.*\+b([0-9]+)$$,\1,p')
-
-include debian/rules.defs
-
-setup: debian/control
- dh_testdir
- $(MAKE) -f debian/rules.gen setup_$(DEB_HOST_ARCH)
-
-build: build-arch build-indep
-
-build-arch: setup
- dh_testdir
- $(MAKE) -f debian/rules.gen build-arch_$(DEB_HOST_ARCH)
-
-build-indep: setup
- dh_testdir
- $(MAKE) -f debian/rules.gen build-indep
-
-maintainerclean:
- rm -f debian/control* debian/rules.gen debian/xen-hypervisor-* debian/xen-utils-[0-9]*
-
-clean: debian/control
- dh_testdir
- rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_xen/__pycache__
- rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__
- dh_clean
-
-binary-indep:
- dh_testdir
- $(MAKE) -f debian/rules.gen binary-indep
-
-binary-arch:
- dh_testdir
- $(MAKE) -f debian/rules.gen binary-arch_$(DEB_HOST_ARCH)
-
-binary: binary-indep binary-arch
-
-DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM)
-TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.xz
-TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
-
-orig: $(DIR_ORIG)
- rsync --delete --exclude /debian --exclude .git -a $(DIR_ORIG)/ .
- QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0
-
-$(DIR_ORIG):
-ifeq ($(TAR_ORIG),)
- $(error Cannot find orig tarball $(TAR_ORIG_NAME))
-else
- mkdir -p ../orig
- tar -C ../orig -xaf $(TAR_ORIG)
-endif
-
-CONTROL_FILES += debian/changelog debian/bin/gencontrol.py $(wildcard debian/templates/*.in)
-CONTROL_FILES += $(wildcard debian/arch/defines) $(wildcard debian/arch/*/defines)
-GENCONTROL = $(__MODULES_DIR)gencontrol.py
-debian/control debian/rules.gen: $(CONTROL_FILES)
-ifeq ($(wildcard debian/control.md5sum),)
- $(MAKE) -f debian/rules debian/control-real
-else ifeq ($(VERSION_BINNMU),)
- md5sum --check debian/control.md5sum --status || \
- $(MAKE) -f debian/rules debian/control-real
-else
- grep -v debian/changelog debian/control.md5sum | md5sum --check - --status || \
- $(MAKE) -f debian/rules debian/control-real
-endif
-
-debian/control-real: $(CONTROL_FILES)
- debian/bin/gencontrol.py
- md5sum $^ > debian/control.md5sum
- @echo
- @echo This target is made to fail intentionally, to make sure
- @echo that it is NEVER run during the automated build. Please
- @echo ignore the following error, the debian/control file has
- @echo been generated SUCCESSFULLY.
- @echo
- exit 1
-
-.PHONY: clean build binary-indep binary-arch binary
+SHELL := bash -e
+
+# This influences dpkg-buildflags to specify better linker
+# options. See https://wiki.debian.org/Hardening
+# TBH it is not clear to me (Diziet, 2018) why this is not the
+# default but it is definitely appropriate for Xen, many of whose
+# users will care significantly about security.x
+#
+# Note that we don't use the dpkg-buildflags output for the
+# hypervisor build. This because I haven't investigated which
+# of them are sane to use in the hypervisor context, rather than
+# simply in userland binaries.
+#
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Architecture handling.
+#
+# We need to explicitly specify the architecture because the Xen
+# upstream build system likes to use `uname' which can produce wrong
+# answers it other-bitness chroots, and because we need to build a
+# 64-bit hypervisor even on i386 (since there is no 32-bit hypervisor
+# anymore).
+
+include /usr/share/dpkg/architecture.mk
+
+# Xen has its own different architecture names, which are nither
+# Debian nor GNU names.
+
+flavour_amd64 = amd64
+flavour_i386 = amd64
+flavour_armhf = armhf
+flavour_arm64 = arm64
+
+xen_arch_amd64 = x86_64
+xen_arch_i386 = x86_32
+xen_arch_armhf = arm32
+xen_arch_arm64 = arm64
+
+flavour=$(flavour_$(DEB_BUILD_ARCH))
+
+# Much of the work here is to make different upstream versions of Xen
+# coinstallable, and arrange to run which ever version of the tools
+# corresponds to the running hypervisor.
+#
+# This packaging produces one version. The nominal upstream version
+# represents the control ABI used by hypervisor management utilities.
+#
+# In this package that version number appears in (i) debian/control
+# and (ii) the first two numbers in the package version in
+# debian/changelog. These must both be updated when a new major
+# upstream version is packaged (eg 4.10 -> 4.11).
+# (Everywhere else, it is handled dynamically.)
+#
+upstream_version := \
+ $(shell dpkg-parsechangelog -SVersion | sed 's/\(\.[0-9]*\)\..*/\1/' )
+
+# Many of the debhelper files are most conveniently provided as
+# templates which depend on the flavour and the upstream version.
+# Since even some package names depend on the version, so do some
+# dh input filenames. We support this as follows:
+#
+# These runes take all files named debian/*.vsn-in
+# and do these three things:
+# 1. in the file contents
+# (a) substitute @version@ @flavour@
+# (b) interpret lines like
+# ? flavour = <value> [ | <other-value> ...]
+# ? flavour != <value> [ | <other-value> ...]
+# as conditional output lasting until the next ? on is own.
+# 2. replace any V in the file *name* with that same version
+# and any F with the flavour
+# 3. strip .vsn-in from the end
+# The resulting files are then consumed by dh.
+#
+# (debhelper has a shell script control file facility, but that cannot
+# handle the need to vary the actual filename seen by debhelper.)
+
+TEMPLATE_FILES := $(wildcard debian/*.vsn-in)
+
+define template_rule_template =
+ TEMPLATED_FILES += $(2)
+ $(2): $(1) debian/rules debian/changelog debian/template-subst
+ debian/template-subst $(upstream_version) $(flavour) <$$< >$$@.tmp \
+ && mv -f $$@{.tmp,}
+endef
+
+$(foreach t,$(TEMPLATE_FILES), $(eval \
+ $(call \
+ template_rule_template, $t, \
+ $(subst F,$(flavour), \
+ $(subst V,$(upstream_version), \
+ $(basename $t) \
+ )) \
+ )))
+
+templated-files: $(TEMPLATED_FILES)
+ :
+
+# Work around bug in dpkg-buildpackage: between dpkg 1.14.17 and 1.16.1
+# it exports these. This is a problem because we need to pass different
+# options to the hypervisor build - the default options from dpkg
+# et al are suitable for dom0 binaries but not for the hypervisor.
+undefine CFLAGS
+undefine CXXFLAGS
+undefine FFLAGS
+undefine CPPFLAGS
+undefine LDFLAGS
+
+# The Xen build system likes to download things at build-time. We
+# think we have disabled all of that with appropriate configure
+# options. But, set these too, so we spot if we miss any.
+export WGET=/bin/false GIT=/bin/false
+
+# Other build flags etc.
+
+t=$(PWD)/debian/tmp
+
+dpkg_CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+dpkg_CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+dpkg_LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
+make_args_xen= $(make_args_common) \
+ XEN_COMPILE_ARCH=$(xen_arch_$(flavour)) \
+ XEN_TARGET_ARCH=$(xen_arch_$(flavour)) \
+# (Xen upstream does not offer a separate CPPFLAGS,
+# so we pass those in CFLAGS.)
+
+make_args_tools= $(make_args_common) \
+ XEN_COMPILE_ARCH=$(xen_arch_$(DEB_BUILD_ARCH)) \
+ XEN_TARGET_ARCH=$(xen_arch_$(DEB_BUILD_ARCH)) \
+ EXTRA_CFLAGS_XEN_TOOLS='$(dpkg_CFLAGS) $(dpkg_CPPFLAGS)' \
+ PREPEND_LDFLAGS_XEN_TOOLS='$(dpkg_LDFLAGS)'
+
+%:
+ dh $@ --with=python2
+
+# Without this, something on stretch passes CFLAGS in the environment
+# to the Xen build system, which then (with 4.11) chokes printing
+# /bin/sh: 1: Syntax error: Unterminated quoted string
+# probably because the CFLAGS value contains multiple options and
+# therefore spaces. See also the note by `undefine CFLAGS', above.
+override_dh_auto_clean:
+ rm -f debian/xen-tools-built.stamp
+ $(MAKE) -j1 distclean
+
+# Upstream has both a kconfig style configure for the hypervisor
+# and autoconfery for the tools (what we call the `utils').
+override_dh_auto_configure:
+ dh_update_autotools_config
+ :
+ cp debian/xen-kconfig xen/.config
+ make -C xen olddefconfig $(make_args_xen)
+ :
+ $(make_args_tools) ./configure \
+ --disable-stubdom \
+ --prefix=/usr \
+ --includedir=/usr/include \
+ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
+ --with-libexec-libdir-suffix=/$(DEB_HOST_MULTIARCH) \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-libexec-leaf-dir=xen-$(upstream_version) \
+ --disable-blktap1 \
+ --disable-blktap2 \
+ --disable-ocamltools \
+ --disable-qemu-traditional --disable-rombios \
+ --with-system-qemu=/usr/bin/qemu-system-i386 \
+ --enable-ovmf --with-system-ovmf=/usr/share/ovmf/OVMF.fd \
+ --with-system-seabios=/usr/share/seabios/bios-256k.bin
+
+override_dh_auto_build:
+ $(MAKE) $(make_args_xen) xen
+ $(MAKE) $(make_args_tools) tools docs
+ touch debian/xen-tools-built.stamp
+
+# We keep the amount of fixup and messing about with debian/tmp/
+# to a minimum, because when working it is easier to rerun the
+# later parts of the build than the whole of the two upstream make installs.
+# However, there are two sets of fixes we must make:
+override_dh_auto_install: $(TEMPLATED_FILES)
+ $(MAKE) $(make_args_xen) DESTDIR=$t install-xen
+ $(MAKE) $(make_args_tools) DESTDIR=$t install-{tools,docs}
+ :
+ @# pkgconfig files contain arch-specific paths so must
+ @# be in /usr/lib/<triplet>, not /usr/share.
+ mv $t/usr/share/pkgconfig $t/usr/lib/$(DEB_HOST_MULTIARCH)/
+ :
+ @# Inexplicably, upstream pots the efi binares in usr/lib64
+ mv $t/usr/lib64/efi/* $t/boot/.
+
+# libfsimage not only has an unstable ABI, but also a very poor name.
+# Our makefile patch puts it in a different directory and fixes up the
+# rpath; this rules code excludes the header files.
+dh_install_excludes += -Xinclude/fsimage
+
+# The upstream build produces these.
+dh_install_excludes += -X'*.pyc'
+
+# The upstream docs build erroneously ships .deps into the html output.
+dh_install_excludes += -X/.deps
+
+# Upstream puts pygrub in its lib directory which is in our per-version
+# package, and leaves a symlink in /usr/bin. Exclude the symlink.
+# We don't want this in /usr/bin anyway.
+dh_install_excludes += -Xbin/pygrub
+
+# We want the xenstore utilities in their own package. The general
+# install does everything from /usr/bin and /usr/share/man, so we
+# need to exclude them. debhelpers's -X option is ... odd. Not
+# suitable, anyway. So we rm them after running dh_install.
+# The installation is done separately via xenstore-utils.install.
+xenstore_rm = $(addprefix debian/xen-utils-common/, \
+ $(foreach utility, xenstore xenstore-*, \
+ usr/bin/$(utility) \
+ usr/share/man/man1/$(utility).1 \
+ ))
+
+override_dh_install:
+ debian/shuffle-binaries $(upstream_version) $(flavour)
+ :
+ debian/shuffle-boot-files $(upstream_version) $(flavour)
+ :
+ dh_install $(dh_install_excludes)
+ rm $(xenstore_rm)
+ :
+ debian/installsharedlibs
+
+# dh_python2 does not know to look in the funny directory where
+# we put the versioned /usr/lib files including some python scripts.
+override_dh_python2:
+ dh_python2
+ dh_python2 -pxen-utils-$(upstream_version) \
+ usr/lib/xen-$(upstream_version)/bin
+
+# We have two init scripts. (There used to be xend too.)
+override_dh_installinit:
+ dh_installinit --name xen -- defaults 20 21
+ dh_installinit --name xendomains --no-start -- defaults 21 20
+
+# dh_strip in dh compat 10 and earlier (which we are at so this
+# package builds on stretch) looks at filenames and modes to decide
+# what to process. hvmloader doesn't match, so we must trick it.
+# It is sufficient to make it executable. And we have to undo
+# that again, then. This all happens after dh_install so we operate
+# on the package-specific file.
+override_dh_strip:
+ chmod +x debian/xen-utils-*/usr/lib/xen-*/boot/hvmloader
+ dh_strip
+ chmod -x debian/xen-utils-*/usr/lib/xen-*/boot/hvmloader
+
+# The debug files are fairly large, fairly rarely used,
+# and not compressed by the upstream build system.
+override_dh_compress:
+ dh_compress
+ find debian/xen-hypervisor-*/usr/lib/debug -type f -print0 \
+ | xargs -0r gzip -9v
+
+# By default, files in debian/tmp which are not handled by anything
+# in rules are ignored. This makes them into errors.
+override_dh_missing:
+ dh_missing --fail-missing
+
+
+# We are dropping the config file /etc/default/xen which appeared in
+# earlier versions. See ./ucf-remove-fixup for more details.
+override_dh_ucf:
+ dh_ucf
+ debian/ucf-remove-fixup xen-utils-common /etc/default/xen
+++ /dev/null
-BUILD_DIR = debian/build
-STAMPS_DIR = debian/stamps
-TEMPLATES_DIR = debian/templates
+++ /dev/null
-.NOTPARALLEL:
-binary-arch: binary-arch_amd64 binary-arch_arm64 binary-arch_armhf binary-arch_i386
-binary-arch_amd64: binary-arch_amd64_none binary-arch_amd64_real
-binary-arch_amd64_none: binary-arch_amd64_none_amd64 binary-arch_amd64_none_real
-binary-arch_amd64_none_amd64:: binary-arch_amd64_none_amd64_real
-binary-arch_amd64_none_amd64::
- $(MAKE) -f debian/rules.real binary-arch-flavour ARCH='amd64' FEATURESET='none' FLAVOUR='amd64' IMAGE_SUFFIX='.gz' VERSION='4.11' XEN_ARCH='x86_64'
- $(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-pxen-system-amd64' ARCH='amd64' FEATURESET='none' FLAVOUR='amd64' IMAGE_SUFFIX='.gz' VERSION='4.11' XEN_ARCH='x86_64'
-binary-arch_amd64_none_amd64_real:
-binary-arch_amd64_none_real:
-binary-arch_amd64_real::
- $(MAKE) -f debian/rules.real binary-arch-arch ARCH='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-binary-arch_arm64: binary-arch_arm64_none binary-arch_arm64_real
-binary-arch_arm64_none: binary-arch_arm64_none_arm64 binary-arch_arm64_none_real
-binary-arch_arm64_none_arm64:: binary-arch_arm64_none_arm64_real
-binary-arch_arm64_none_arm64::
- $(MAKE) -f debian/rules.real binary-arch-flavour ARCH='arm64' FEATURESET='none' FLAVOUR='arm64' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm64'
- $(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-pxen-system-arm64' ARCH='arm64' FEATURESET='none' FLAVOUR='arm64' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm64'
-binary-arch_arm64_none_arm64_real:
-binary-arch_arm64_none_real:
-binary-arch_arm64_real::
- $(MAKE) -f debian/rules.real binary-arch-arch ARCH='arm64' VERSION='4.11' XEN_ARCH='arm64'
-binary-arch_armhf: binary-arch_armhf_none binary-arch_armhf_real
-binary-arch_armhf_none: binary-arch_armhf_none_armhf binary-arch_armhf_none_real
-binary-arch_armhf_none_armhf:: binary-arch_armhf_none_armhf_real
-binary-arch_armhf_none_armhf::
- $(MAKE) -f debian/rules.real binary-arch-flavour ARCH='armhf' FEATURESET='none' FLAVOUR='armhf' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm32'
- $(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-pxen-system-armhf' ARCH='armhf' FEATURESET='none' FLAVOUR='armhf' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm32'
-binary-arch_armhf_none_armhf_real:
-binary-arch_armhf_none_real:
-binary-arch_armhf_real::
- $(MAKE) -f debian/rules.real binary-arch-arch ARCH='armhf' VERSION='4.11' XEN_ARCH='arm32'
-binary-arch_i386: binary-arch_i386_none binary-arch_i386_real
-binary-arch_i386_none: binary-arch_i386_none_amd64 binary-arch_i386_none_real
-binary-arch_i386_none_amd64:: binary-arch_i386_none_amd64_real
-binary-arch_i386_none_amd64::
- $(MAKE) -f debian/rules.real binary-arch-flavour ARCH='i386' FEATURESET='none' FLAVOUR='amd64' VERSION='4.11' XEN_ARCH='x86_64'
- $(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-pxen-system-amd64' ARCH='i386' FEATURESET='none' FLAVOUR='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-binary-arch_i386_none_amd64_real:
-binary-arch_i386_none_real:
-binary-arch_i386_real::
- $(MAKE) -f debian/rules.real binary-arch-arch ARCH='i386' VERSION='4.11' XEN_ARCH='x86_32'
-binary-indep:: binary-indep_none
-binary-indep::
- $(MAKE) -f debian/rules.real binary-indep VERSION='4.11'
-binary-indep_none: binary-indep_none_real
-binary-indep_none_real:
-build-arch: build-arch_amd64 build-arch_arm64 build-arch_armhf build-arch_i386
-build-arch_amd64: build-arch_amd64_none build-arch_amd64_real
-build-arch_amd64_none: build-arch_amd64_none_amd64 build-arch_amd64_none_real
-build-arch_amd64_none_amd64:: build-arch_amd64_none_amd64_real
-build-arch_amd64_none_amd64::
- $(MAKE) -f debian/rules.real build-arch-flavour ARCH='amd64' FEATURESET='none' FLAVOUR='amd64' IMAGE_SUFFIX='.gz' VERSION='4.11' XEN_ARCH='x86_64'
-build-arch_amd64_none_amd64_real:
-build-arch_amd64_none_real:
-build-arch_amd64_real::
- $(MAKE) -f debian/rules.real build-arch-arch ARCH='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-build-arch_arm64: build-arch_arm64_none build-arch_arm64_real
-build-arch_arm64_none: build-arch_arm64_none_arm64 build-arch_arm64_none_real
-build-arch_arm64_none_arm64:: build-arch_arm64_none_arm64_real
-build-arch_arm64_none_arm64::
- $(MAKE) -f debian/rules.real build-arch-flavour ARCH='arm64' FEATURESET='none' FLAVOUR='arm64' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm64'
-build-arch_arm64_none_arm64_real:
-build-arch_arm64_none_real:
-build-arch_arm64_real::
- $(MAKE) -f debian/rules.real build-arch-arch ARCH='arm64' VERSION='4.11' XEN_ARCH='arm64'
-build-arch_armhf: build-arch_armhf_none build-arch_armhf_real
-build-arch_armhf_none: build-arch_armhf_none_armhf build-arch_armhf_none_real
-build-arch_armhf_none_armhf:: build-arch_armhf_none_armhf_real
-build-arch_armhf_none_armhf::
- $(MAKE) -f debian/rules.real build-arch-flavour ARCH='armhf' FEATURESET='none' FLAVOUR='armhf' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm32'
-build-arch_armhf_none_armhf_real:
-build-arch_armhf_none_real:
-build-arch_armhf_real::
- $(MAKE) -f debian/rules.real build-arch-arch ARCH='armhf' VERSION='4.11' XEN_ARCH='arm32'
-build-arch_i386: build-arch_i386_none build-arch_i386_real
-build-arch_i386_none: build-arch_i386_none_amd64 build-arch_i386_none_real
-build-arch_i386_none_amd64:: build-arch_i386_none_amd64_real
-build-arch_i386_none_amd64::
- $(MAKE) -f debian/rules.real build-arch-flavour ARCH='i386' FEATURESET='none' FLAVOUR='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-build-arch_i386_none_amd64_real:
-build-arch_i386_none_real:
-build-arch_i386_real::
- $(MAKE) -f debian/rules.real build-arch-arch ARCH='i386' VERSION='4.11' XEN_ARCH='x86_32'
-build-indep:: build-indep_none
-build-indep::
- $(MAKE) -f debian/rules.real build-indep VERSION='4.11'
-build-indep_none: build-indep_none_real
-build-indep_none_real:
-setup: setup_amd64 setup_arm64 setup_armhf setup_i386 setup_none
-setup_amd64: setup_amd64_none setup_amd64_real
-setup_amd64_none: setup_amd64_none_amd64 setup_amd64_none_real
-setup_amd64_none_amd64:: setup_amd64_none_amd64_real
-setup_amd64_none_amd64::
- $(MAKE) -f debian/rules.real setup-flavour ARCH='amd64' FEATURESET='none' FLAVOUR='amd64' IMAGE_SUFFIX='.gz' VERSION='4.11' XEN_ARCH='x86_64'
-setup_amd64_none_amd64_real:
-setup_amd64_none_real:
-setup_amd64_real::
- $(MAKE) -f debian/rules.real setup-arch ARCH='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-setup_arm64: setup_arm64_none setup_arm64_real
-setup_arm64_none: setup_arm64_none_arm64 setup_arm64_none_real
-setup_arm64_none_arm64:: setup_arm64_none_arm64_real
-setup_arm64_none_arm64::
- $(MAKE) -f debian/rules.real setup-flavour ARCH='arm64' FEATURESET='none' FLAVOUR='arm64' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm64'
-setup_arm64_none_arm64_real:
-setup_arm64_none_real:
-setup_arm64_real::
- $(MAKE) -f debian/rules.real setup-arch ARCH='arm64' VERSION='4.11' XEN_ARCH='arm64'
-setup_armhf: setup_armhf_none setup_armhf_real
-setup_armhf_none: setup_armhf_none_armhf setup_armhf_none_real
-setup_armhf_none_armhf:: setup_armhf_none_armhf_real
-setup_armhf_none_armhf::
- $(MAKE) -f debian/rules.real setup-flavour ARCH='armhf' FEATURESET='none' FLAVOUR='armhf' IMAGE_SUFFIX='' VERSION='4.11' XEN_ARCH='arm32'
-setup_armhf_none_armhf_real:
-setup_armhf_none_real:
-setup_armhf_real::
- $(MAKE) -f debian/rules.real setup-arch ARCH='armhf' VERSION='4.11' XEN_ARCH='arm32'
-setup_i386: setup_i386_none setup_i386_real
-setup_i386_none: setup_i386_none_amd64 setup_i386_none_real
-setup_i386_none_amd64:: setup_i386_none_amd64_real
-setup_i386_none_amd64::
- $(MAKE) -f debian/rules.real setup-flavour ARCH='i386' FEATURESET='none' FLAVOUR='amd64' VERSION='4.11' XEN_ARCH='x86_64'
-setup_i386_none_amd64_real:
-setup_i386_none_real:
-setup_i386_real::
- $(MAKE) -f debian/rules.real setup-arch ARCH='i386' VERSION='4.11' XEN_ARCH='x86_32'
-setup_none: setup_none_real
-setup_none_real:
+++ /dev/null
-include /usr/share/dpkg/default.mk
-
-export DH_OPTIONS
-
-setup_env := env -u ARCH -u FLAVOUR -u VERSION -u MAKEFLAGS
-
-MAKE_CLEAN = $(setup_env) $(MAKE) V=1
-MAKE_SELF = $(MAKE) -f debian/rules.real
-
-include debian/rules.defs
-
-stamp = [ -d $(dir $@) ] || mkdir $(dir $@); touch $@
-
-binary-arch-arch: install-libxen_$(ARCH)
-binary-arch-arch: install-libxen-dev_$(ARCH)
-binary-arch-arch: install-libxenstore_$(ARCH)
-binary-arch-arch: install-utils_$(ARCH)
-binary-arch-arch: install-xenstore-utils_$(ARCH)
-binary-arch-flavour: install-hypervisor_$(ARCH)_$(FLAVOUR)
-
-binary-indep: install-utils-common install-hypervisor-common
-
-build-arch-arch: $(STAMPS_DIR)/build-utils_$(ARCH)
-build-arch-flavour: $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR)
-
-build-indep: $(STAMPS_DIR)/build-docs
-
-setup-arch: $(STAMPS_DIR)/setup-utils_$(ARCH)
-setup-flavour: $(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR)
-
-$(STAMPS_DIR)/setup-docs: SOURCE_FILES = $(filter-out debian, $(wildcard *))
-$(STAMPS_DIR)/setup-docs: DIR=$(BUILD_DIR)/build-docs
-$(STAMPS_DIR)/setup-docs:
- @rm -rf $(DIR)
- mkdir -p $(DIR)
- cp -al $(SOURCE_FILES) $(DIR)
- cp --remove-destination /usr/share/misc/config.guess /usr/share/misc/config.sub $(DIR)
- cd $(DIR); \
- WGET=/bin/false \
- ./configure --disable-stubdom --disable-xen --prefix=/usr
- @$(stamp)
-
-$(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR): SOURCE_FILES = $(filter-out debian, $(wildcard *))
-$(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR): DIR=$(BUILD_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR)
-$(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR):
- @rm -rf $(DIR)
- mkdir -p $(DIR)
- cp -al $(SOURCE_FILES) $(DIR)
- echo "XEN_VENDORVERSION := $(EXTRAVERSION)" > $(DIR)/xen/xen-version
- @$(stamp)
-
-$(STAMPS_DIR)/setup-utils_$(ARCH): SOURCE_FILES = $(filter-out debian, $(wildcard *))
-$(STAMPS_DIR)/setup-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH)
-$(STAMPS_DIR)/setup-utils_$(ARCH):
- @rm -rf $(DIR)
- mkdir -p $(DIR)
- cp -al $(SOURCE_FILES) $(DIR)
- cp --remove-destination /usr/share/misc/config.guess /usr/share/misc/config.sub $(DIR)
- cd $(DIR); \
- WGET=/bin/false \
- ./configure \
- --disable-docs --disable-stubdom --disable-xen \
- --prefix=/usr \
- --includedir=/usr/include \
- --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --with-libexec-leaf-dir=xen-$(VERSION) \
- --disable-blktap1 \
- --disable-blktap2 \
- --disable-ocamltools \
- --disable-qemu-traditional --disable-rombios \
- --with-system-qemu=/usr/bin/qemu-system-i386 \
- --enable-ovmf --with-system-ovmf=/usr/share/ovmf/OVMF.fd \
- --with-system-seabios=/usr/share/seabios/bios-256k.bin
- @$(stamp)
-
-$(STAMPS_DIR)/build-docs: DIR=$(BUILD_DIR)/build-docs
-$(STAMPS_DIR)/build-docs: $(STAMPS_DIR)/setup-docs
- +$(MAKE_CLEAN) -C $(DIR)/docs
- touch $@
-
-# Adding LANG=C.UTF-8 to the build environment to work around a bug in grep
-# which causes it to switch into binary mode in the middle of a file.
-# (see http://bugs.launchpad.net/bugs/1547466)
-
-$(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR): DIR=$(BUILD_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR)
-$(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR)
- +$(MAKE_CLEAN) -C $(DIR)/xen \
- XEN_COMPILE_ARCH=$(XEN_ARCH) \
- XEN_TARGET_ARCH=$(XEN_ARCH) \
- LANG=C.UTF-8
- touch $@
-
-$(STAMPS_DIR)/build-utils_$(ARCH) \
-$(STAMPS_DIR)/install-utils_$(ARCH): CONFIG = \
- debug=n \
- XEN_COMPILE_ARCH=$(XEN_ARCH) \
- XEN_TARGET_ARCH=$(XEN_ARCH) \
- EXTRA_CFLAGS_XEN_TOOLS="$(CFLAGS)" \
- APPEND_CPPFLAGS="$(CPPFLAGS)" \
- APPEND_LDFLAGS="$(LDFLAGS)" \
- OCAMLDESTDIR=$(CURDIR)/$(BUILD_DIR)/install-utils_$(ARCH)/$(OCAML_STDLIB_DIR) \
- PYTHON=$(shell pyversions -r) \
- LANG=C.UTF-8
-
-$(STAMPS_DIR)/build-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH)
-$(STAMPS_DIR)/build-utils_$(ARCH): $(STAMPS_DIR)/setup-utils_$(ARCH)
- +$(MAKE_CLEAN) -C $(DIR) $(CONFIG) build-tools-public-headers
- +$(MAKE_CLEAN) -C $(DIR)/tools $(CONFIG)
- touch $@
-
-$(STAMPS_DIR)/install-utils_$(ARCH): DIR = $(BUILD_DIR)/build-utils_$(ARCH)
-$(STAMPS_DIR)/install-utils_$(ARCH): INSTALL_DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-$(STAMPS_DIR)/install-utils_$(ARCH): $(STAMPS_DIR)/build-utils_$(ARCH)
- @rm -rf $(INSTALL_DIR)
- mkdir -p $(INSTALL_DIR)/$(OCAML_DLL_DIR)
- +$(MAKE_CLEAN) -C $(DIR) install-tools-public-headers \
- DESTDIR=$(CURDIR)/$(INSTALL_DIR) $(CONFIG)
- +$(MAKE_CLEAN) -C $(DIR)/tools install DESTDIR=$(CURDIR)/$(INSTALL_DIR) $(CONFIG)
-ifneq ($(filter i386 amd64,$(ARCH)),)
- # hvmloader
- strip --remove-section=.comment --remove-section=.note $(INSTALL_DIR)/usr/lib/xen*/boot/*
-endif
- touch $@
-
-$(STAMPS_DIR)/install-utils-common: DIR = $(BUILD_DIR)/build-docs
-$(STAMPS_DIR)/install-utils-common: INSTALL_DIR = $(BUILD_DIR)/install-utils-common
-$(STAMPS_DIR)/install-utils-common: export DESTDIR = $(CURDIR)/$(INSTALL_DIR)
-$(STAMPS_DIR)/install-utils-common: $(STAMPS_DIR)/build-docs
- @rm -rf $(INSTALL_DIR)
- +$(MAKE_CLEAN) -C $(SOURCE_DIR)/tools/examples install-configs
- +$(MAKE_CLEAN) -C $(SOURCE_DIR)/tools/hotplug/common install-scripts
- +$(MAKE_CLEAN) -C $(SOURCE_DIR)/tools/hotplug/Linux install-scripts
- +$(MAKE_CLEAN) -C debian/scripts install
- touch $@
-
-$(STAMPS_DIR)/install-hypervisor-common: INSTALL_DIR = $(BUILD_DIR)/install-hypervisor-common
-$(STAMPS_DIR)/install-hypervisor-common: $(STAMPS_DIR)/build-docs
- @rm -rf $(INSTALL_DIR)
- mkdir -p $(INSTALL_DIR)
-
-
-install-base:
- dh_installchangelogs -XChangelog
- dh_installdirs
- dh_installdocs
- dh_installexamples
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol -- $(GENCONTROL_ARGS)
- dh_md5sums
- dh_builddeb
-
-install-dummy:
- dh_testdir
- dh_testroot
- dh_prep
- +$(MAKE_SELF) install-base
-
-install-hypervisor_$(ARCH)_$(FLAVOUR): DIR=$(BUILD_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR)
-install-hypervisor_$(ARCH)_$(FLAVOUR): PACKAGE_NAME = xen-hypervisor-$(VERSION)-$(FLAVOUR)
-install-hypervisor_$(ARCH)_$(FLAVOUR): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR)
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs boot
- dh_install debian/templates/xen-hypervisor.bug/* usr/share/bug/$(PACKAGE_NAME)
- cp $(DIR)/xen/xen$(IMAGE_SUFFIX) debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR)$(IMAGE_SUFFIX)
-ifeq ($(ARCH),amd64)
- cp $(DIR)/xen/xen.efi debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR).efi
-endif
- +$(MAKE_SELF) install-base
-
-install-libxen_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-install-libxen_$(ARCH): PACKAGE_NAME = libxen-$(VERSION)
-install-libxen_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-libxen_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) install-libxenstore_$(ARCH)
- dh_testdir
- dh_testroot
- dh_prep
- dh_install -Xtoolcore --sourcedir=$(DIR) usr/lib/*/lib*-$(VERSION).so*
- dh_install debian/templates/libxen.bug/* usr/share/bug/$(PACKAGE_NAME)
- dh_strip
- dh_makeshlibs -V
- dh_shlibdeps
- +$(MAKE_SELF) install-base
-
-install-libxen-dev_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-install-libxen-dev_$(ARCH): PACKAGE_NAME = libxen-dev
-install-libxen-dev_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-libxen-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH)
- dh_testdir
- dh_testroot
- dh_prep
- # Move pkgconfig into a multiarch compliant place
- mv $(DIR)/usr/share/pkgconfig $(DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
- dh_install --sourcedir=$(DIR)
- dh_strip
- dh_shlibdeps
- +$(MAKE_SELF) install-base
-
-install-libxenstore_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-install-libxenstore_$(ARCH): PACKAGE_NAME = libxenstore3.0
-install-libxenstore_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-libxenstore_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH)
- dh_testdir
- dh_testroot
- dh_prep
- dh_install --sourcedir=$(DIR)
- dh_strip
- dh_makeshlibs -V
- dh_shlibdeps
- +$(MAKE_SELF) install-base
-
-install-utils_$(ARCH): SOURCE_DIR = $(BUILD_DIR)/build-utils_$(ARCH)
-install-utils_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-install-utils_$(ARCH): PACKAGE_NAME = xen-utils-$(VERSION)
-install-utils_$(ARCH): PACKAGE_DIR = debian/$(PACKAGE_NAME)
-install-utils_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-utils_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) install-libxen_$(ARCH)
- dh_testdir
- dh_testroot
- dh_prep
- install -D -m644 debian/xen-utils.NEWS $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)/NEWS
- install -D -m644 debian/xen-utils.README.Debian $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)/README.Debian
- cp $(DIR)/usr/sbin/* $(DIR)/usr/lib/xen-$(VERSION)/bin/
- dh_install --sourcedir=$(DIR) usr/lib/xen-$(VERSION)
- dh_install debian/templates/xen-utils.bug/* usr/share/bug/$(PACKAGE_NAME)
- dh_lintian
- ( echo -n "misc:Built-Using="; dpkg-query -f='$${source:Package} (= $${source:Version}), ' -W ipxe-qemu seabios; echo ) >> debian/$(PACKAGE_NAME).substvars
- dh_python2 -V$(shell pyversions -rv) /usr/lib/xen-$(VERSION)
- dh_strip
- dh_makeshlibs -V
- dh_shlibdeps
- +$(MAKE_SELF) install-base
-
-install-utils-common: SOURCE_DIR = $(BUILD_DIR)/build-docs
-install-utils-common: DIR = $(BUILD_DIR)/install-utils-common
-install-utils-common: PACKAGE_NAME = xen-utils-common
-install-utils-common: DH_OPTIONS = -p$(PACKAGE_NAME)
-install-utils-common: $(STAMPS_DIR)/install-utils-common
- dh_testdir
- dh_testroot
- dh_prep
- dh_install -X .svn --sourcedir=$(DIR)
- dh_installinit --name xen -- defaults 20 21
- dh_installinit --name xend
- dh_installinit --name xendomains --no-start -- defaults 21 20
- dh_installman \
- $(SOURCE_DIR)/docs/man1/* \
- $(SOURCE_DIR)/docs/man5/* \
- $(SOURCE_DIR)/docs/man8/*
- dh_installdocs $(SOURCE_DIR)/docs/txt/misc
- dh_link
- dh_ucf
- +$(MAKE_SELF) install-base
-
-install-hypervisor-common: DIR = $(BUILD_DIR)/install-hypervisor-common
-install-hypervisor-common: PACKAGE_NAME = xen-hypervisor-common
-install-hypervisor-common: DH_OPTIONS = -p$(PACKAGE_NAME)
-install-hypervisor-common: $(STAMPS_DIR)/install-hypervisor-common
- dh_testdir
- dh_testroot
- dh_prep
- dh_install --sourcedir=$(DIR)
- dh_ucf
- +$(MAKE_SELF) install-base
-
-install-xenstore-utils_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
-install-xenstore-utils_$(ARCH): PACKAGE_NAME = xenstore-utils
-install-xenstore-utils_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-xenstore-utils_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) install-libxenstore_$(ARCH)
- dh_testdir
- dh_testroot
- dh_prep
- dh_install --sourcedir=$(DIR)
- dh_strip
- dh_shlibdeps
- +$(MAKE_SELF) install-base
-
-# vim: filetype=make
GLOBAL_UTILS_WRAPPER = xen-utils-wrapper
-PRIVATE_SCRIPTS = \
- xen-dir \
- xen-init-list \
- xen-init-name \
- xen-toolstack \
- xen-version \
- $(GLOBAL_TOOLSTACK_WRAPPER) \
- $(GLOBAL_UTILS_WRAPPER)
-
ETC_SCRIPTS_DIR = /etc/xen/scripts
GLOBAL_SCRIPTS_DIR = /usr/sbin
PRIVATE_SCRIPTS_DIR = /usr/lib/xen-common/bin
ln -s $(PRIVATE_SCRIPTS_DIR)/$(GLOBAL_UTILS_WRAPPER) $(DESTDIR)$(GLOBAL_SCRIPTS_DIR)/$$i || exit 1; \
done
install -d $(DESTDIR)$(PRIVATE_SCRIPTS_DIR)
- install $(PRIVATE_SCRIPTS) $(DESTDIR)$(PRIVATE_SCRIPTS_DIR)
-
-#!/bin/sh -e
-
-COMMAND="$(basename $0)"
-TOOLSTACK=$(. /usr/lib/xen-common/bin/xen-toolstack); RET=$?; [ $RET -eq 0 ] || exit $RET
-
-exec "$TOOLSTACK" "$@"
+#!/bin/sh
+exec xl "$@"
-#!/bin/sh -e
-
-configfile=/etc/default/xen
-
-dir=$(. /usr/lib/xen-common/bin/xen-dir); ret=$?; [ $ret -eq 0 ] || exit $ret
-
-check() {
- local PATH
- if [ "$1" = xm ] || [ "$1" = xl ]; then
- PATH="$dir/bin"
- else
- PATH="$dir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- fi
- command -v "$1" || :
-}
-
-if [ -e $configfile ]; then
- . $configfile || true
-fi
-
-if [ "$TOOLSTACK" ]; then
- cmd=$(check "$TOOLSTACK")
- if [ "$cmd" ]; then
- echo "$cmd"
- else
- echo "WARING: Can't find toolstack $TOOLSTACK, fallback to default!" >&2
- TOOLSTACK=
- fi
-fi
-
-if [ -z "$TOOLSTACK" ]; then
- cmd_xm=$(check xm)
- cmd_xl=$(check xl)
- if [ "$cmd_xm" ]; then
- echo "$cmd_xm"
- elif [ "$cmd_xl" ]; then
- echo "$cmd_xl"
- else
- echo "ERROR: Toolstack not specifed and nothing detected, bailing out!" >&2
- exit 127
- fi
-fi
+#!/bin/sh
+set -e
+echo >&2 "warning: something called deprecated script $0"
+echo xl
-#!/bin/sh -e
-
-COMMAND="$(basename $0)"
-TOOLSTACK=$(. /usr/lib/xen-common/bin/xen-toolstack); RET=$?; [ $RET -eq 0 ] || exit $RET
-
-if [ "$(basename "$TOOLSTACK")" != "$COMMAND" ]; then
- echo "ERROR: A different toolstack ($(basename "$TOOLSTACK")) have been selected!" >&2
- exit 1
-fi
-
-exec "$TOOLSTACK" "$@"
+#!/bin/sh
+set -e
+echo >&2 "warning: something called deprecated script $0"
+exec xl "$@"
--- /dev/null
+#!/bin/bash
+set -e
+set -o pipefail
+
+version=$1; shift
+
+# We wrap all of the programs in /usr/bin with a script
+# (xen-utils-wrapper) which chooses the version corresponding to the
+# currently-running version of Xen. The actual binaries go
+# in xen-utils-$version:usr/lib/xen-$version/bin
+#
+# We use ldd to see what libraries the binary is linked against.
+# We ignore errors from ldd because we are running it on scripts
+# and things too and it is hard to distinguish these errors.
+#
+# We then match against the libraries listed for inclusion here:
+list=debian/libxenmiscV.install.vsn-in
+
+t=debian/tmp
+vd=/usr/lib/xen-$version/bin
+cd=/usr/lib/xen-common/bin
+
+mkdir -p $t/$vd
+
+for binary in `find $t/usr/{bin,sbin} -type f`; do
+ reason=''
+ { ldd "$binary" ||: ; } | { fgrep '=>' ||: ; } \
+ | (
+ while read lib dummy; do
+ lib=${lib%.so.*}
+ if grep -F "usr/lib/*/$lib.so.*" $list >/dev/null; then
+ reason+=" $lib"
+ fi
+ done
+
+ if [ "x$reason" = x ]; then
+ exit 0
+ fi
+
+ echo "shuffling $binary $reason"
+
+ leaf=${binary##*}
+ mv -v $binary $t/$vd/$leaf
+ ln -vs $cd/xen-utils-wrapper $binary
+
+ touch debian/shuffle-binaries.stamp
+ )
+done
+
+ls debian/shuffle-binaries.stamp
--- /dev/null
+#!/bin/bash
+
+set -e
+
+version=$1; shift
+flavour=$1; shift
+t=debian/tmp
+
+hv=xen-hypervisor-$version-$flavour
+dest=debian/$hv/boot
+mkdir -p $dest
+
+# The upstream build system puts a pile of needless symlinks in /boot.
+#
+# Conversely it gives the actual hypervisor binary an unhelpfully-varying
+# name. It makes symlinks with more stable names, which we can use
+# to our advantage.
+#
+# For our part, we have been in the habit of putting the flavour in
+# the name and want to continue to do so for continuity. (This was
+# more useful when the -i386 flavour existed and was coinstallable
+# with the -amd64 flavour.)
+
+verstring=$(readlink debian/tmp/boot/xen.gz)
+verstring=${verstring##*/}
+verstring=${verstring%.gz}
+
+for f in `cd $t/boot && find * -type f -print`; do
+ cp -v $t/boot/$f $dest/${f/$verstring/xen-$version-$flavour}
+done
--- /dev/null
+#!/usr/bin/perl -wn
+#
+# Implements the rudimentary templating for *.vsn-in files,
+# see the comment in debian/rules.
+
+use strict;
+our %v;
+$v{''} = '@';
+BEGIN {
+ $v{version} = shift @ARGV;
+ $v{flavour} = shift @ARGV;
+}
+sub printwarning () {
+ our $printedwarning;
+ return if $printedwarning++;
+ print "# autogenerated, do not edit\n" if $.==1;
+}
+sub v {
+ my ($k) = @_;
+ $v{$k} // die "unknown $k";
+}
+our @yes;
+printwarning unless m{^\#!};
+if (m/^\s*\?\s*(\w+)\s*(!?)=\s*(.*?)\s*$/) {
+ my @rhs = split /\s*\|\s*/, $3;
+ push @yes, (!!(grep { v($1) eq $_ } @rhs) xor !!$2);
+ next;
+} elsif (m/^\s*\?\s*$/) {
+ defined pop @yes or die "too many lone ? (endings)";
+ next;
+} elsif (m/^\s*\?/) {
+ die "syntax";
+}
+next if grep { !$_ } @yes;
+s{\@(\w*)\@}{ v($1) }ge;
+print or die $!;
+printwarning;
+END {
+ printwarning;
+ die "too few lone ? (endings)" if @yes;
+}
+++ /dev/null
-Package: xen-hypervisor-@version@@localversion@
-Depends: ${misc:Depends}
-Provides: xen-hypervisor, xen-hypervisor-@version@, xen-hypervisor@localversion@
-Recommends: xen-utils-@version@, xen-hypervisor-common
-Description: Xen Hypervisor on @class@
- The hypervisor is the "core" for XEN itself. It gets booted by the boot loader
- and controls cpu and memory, sharing them between your administrative domain
- (Domain 0) and the virtual guest systems.
- .
- @desc@
- .
- In order to boot a XEN system along with this package you also need a kernel
- specifically crafted to work as the Domain 0, mediating hardware access for
- XEN itself.
-
+++ /dev/null
-Package: libxen-@version@
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Multi-Arch: same
-Description: Public libs for Xen
- This package contains the shared toolstack libraries for Xen.
-
-Package: libxenstore3.0
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Multi-Arch: same
-Description: Xenstore communications library for Xen
- This package contains the client library interface to XenStore.
-
-Package: libxen-dev
-Section: libdevel
-Multi-Arch: same
-Depends: libxen-@version@ (= ${binary:Version}), libxenstore3.0 (= ${binary:Version}), ${misc:Depends}
-Description: Public headers and libs for Xen
- This package contains the public headers and static libraries for Xen.
- .
- The libxenlight library is intended as a common base for all Xen toolstack
- developers. The libxlutil library contains additional helpers which may be
- useful to toolstack developers.
- .
- The libxenstore library allows userspace processes to interact with the
- XenStore database. XenStore is a shared database used for interdomain
- communication of configuration and status information. It is accessible to all
- domains running on the same Xen host. See http://wiki.xen.org/wiki/XenStore
- for more information.
- .
- The libxenctrl, libxenguest and other remaining included libraries are
- internal libraries intended for use by the Xen toolstack and are not intended
- to be used directly. Toolstack authors should use libxenlight.
-
-Package: xenstore-utils
-Section: admin
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Conflicts: xen-utils-common (<= 3.1.0-1)
-Replaces: xen-utils-common (<= 3.1.0-1)
-Description: Xenstore command line utilities for Xen
- This package contains command line utilities for interacting with XenStore.
- .
- XenStore is a shared database used for interdomain communication of
- configuration and status information. It is accessible to all domains running
- on the same Xen host. See http://wiki.xen.org/wiki/XenStore for more information.
- .
- In the common case these tools are used by the Xen toolstack running in
- domain0 (or a driver domain) however they may also be used in a guest domain
- to support local scripting which wants to communicate via XenStore.
-
-Package: xen-utils-common
-Architecture: all
-Depends: lsb-base, python, udev, xenstore-utils, ${misc:Depends}
-Description: Xen administrative tools - common files
- The userspace tools to manage a system virtualized through the Xen virtual
- machine monitor.
- .
- This package is only required on the host system (Domain 0) and not on
- the virtual guest systems (Domain U).
-
-Package: xen-hypervisor-common
-Architecture: all
-Depends: ${misc:Depends}
-Replaces: xen-hypervisor-4.8-amd64, xen-hypervisor-4.8-arm64, xen-hypervisor-4.8-armhf
-Description: Xen Hypervisor - common files
- The configuration which arranges for an installed hypervisor to
- be booted as default, with the right command line arguments passed
- to both hypervisor and host (Domain 0) kernel.
- .
- This package is only required on the host system (Domain 0) and not on
- the virtual guest systems (Domain U).
+++ /dev/null
-Section: kernel
-Priority: optional
-Maintainer: Debian Xen Team <pkg-xen-devel@lists.alioth.debian.org>
-Uploaders: Guido Trotter <ultrotter@debian.org>, Bastian Blank <waldi@debian.org>, Ian Jackson <ian.jackson@eu.citrix.com>
-Build-Depends:
- autotools-dev,
- debhelper (>> 9),
- dpkg-dev (>= 1.16.0~),
- lsb-release,
- python-dev,
- bcc [i386 amd64],
- gcc-multilib [i386 amd64],
- e2fslibs-dev,
- iasl,
- seabios (>= 1.7.4-2~) [i386 amd64],
- libaio-dev,
- libfdt-dev [armhf arm64],
- libglib2.0-dev,
- liblzma-dev,
- libncurses5-dev,
- libpixman-1-dev,
- libyajl-dev,
- pkg-config,
- uuid-dev,
- zlib1g-dev,
-Standards-Version: 3.9.4
-XS-Python-Version: current
-
+++ /dev/null
-Package: xen-system@localversion@
-Depends: xen-hypervisor-@version@@localversion@, xen-hypervisor-common, xen-utils-@version@, ${misc:Depends}
-Provides: xen-system
-Description: Xen System on @class@ (meta-package)
- This package depends on the latest Xen hypervisor for use on @class@ and the Xen utils.
- .
- @desc@
-
+++ /dev/null
-Package: xen-utils-@version@
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, xen-utils-common (>= ${source:Version})
-Recommends: bridge-utils, libc6-xen [i386], xen-hypervisor-@version@, qemu-system-x86, grub-xen-host [i386 amd64]
-Suggests: qemu-utils [i386 amd64], seabios [i386 amd64], ovmf
-Provides: xen-utils
-Built-Using: ${misc:Built-Using}
-Description: XEN administrative tools
- The userspace tools to manage a system virtualized through the XEN virtual
- machine monitor.
- .
- qemu-utils and seabios are neded for "Xen HVM" (amd64 and i386)
-
+++ /dev/null
-Submit-As: src:xen
+++ /dev/null
-Submit-As: src:xen
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- configure)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-Submit-As: src:xen
+++ /dev/null
-statically-linked-binary usr/lib/xen-@version@/boot/hvmloader
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-case "$1" in
- configure)
- update-alternatives --remove xen-default /usr/lib/xen-@version@
- if [ -x "/etc/init.d/xen" ]; then
- invoke-rc.d xen start || exit $?
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove|upgrade)
- update-alternatives --remove xen-default /usr/lib/xen-@version@
- if [ -x "/etc/init.d/xen" ]; then
- invoke-rc.d xen stop || exit $?
- fi
- ;;
-
- deconfigure|failed-upgrade)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-# -*- sh -*-
-
-#
-# Xend configuration file.
-#
-
-# This example configuration is appropriate for an installation that
-# utilizes a bridged network configuration. Access to xend via http
-# is disabled.
-
-# Commented out entries show the default for that entry, unless otherwise
-# specified.
-
-#(logfile /var/log/xen/xend.log)
-#(loglevel DEBUG)
-
-# Uncomment the line below. Set the value to flask, acm, or dummy to
-# select a security module.
-
-#(xsm_module_name dummy)
-
-# The Xen-API server configuration.
-#
-# This value configures the ports, interfaces, and access controls for the
-# Xen-API server. Each entry in the list starts with either unix, a port
-# number, or an address:port pair. If this is "unix", then a UDP socket is
-# opened, and this entry applies to that. If it is a port, then Xend will
-# listen on all interfaces on that TCP port, and if it is an address:port
-# pair, then Xend will listen on the specified port, using the interface with
-# the specified address.
-#
-# The subsequent string configures the user-based access control for the
-# listener in question. This can be one of "none" or "pam", indicating either
-# that users should be allowed access unconditionally, or that the local
-# Pluggable Authentication Modules configuration should be used. If this
-# string is missing or empty, then "pam" is used.
-#
-# The final string gives the host-based access control for that listener. If
-# this is missing or empty, then all connections are accepted. Otherwise,
-# this should be a space-separated sequence of regular expressions; any host
-# with a fully-qualified domain name or an IP address that matches one of
-# these regular expressions will be accepted.
-#
-# Example: listen on TCP port 9363 on all interfaces, accepting connections
-# only from machines in example.com or localhost, and allow access through
-# the unix domain socket unconditionally:
-#
-# (xen-api-server ((9363 pam '^localhost$ example\\.com$')
-# (unix none)))
-#
-# Optionally, the TCP Xen-API server can use SSL by specifying the private
-# key and certificate location:
-#
-# (9367 pam '' xen-api.key xen-api.crt)
-#
-# Default:
-# (xen-api-server ((unix)))
-
-
-#(xend-http-server no)
-#(xend-unix-server no)
-#(xend-tcp-xmlrpc-server no)
-#(xend-unix-xmlrpc-server yes)
-#(xend-relocation-server no)
-#(xend-relocation-ssl-server no)
-#(xend-udev-event-server no)
-
-#(xend-unix-path /var/lib/xend/xend-socket)
-
-
-# Address and port xend should use for the legacy TCP XMLRPC interface,
-# if xend-tcp-xmlrpc-server is set.
-#(xend-tcp-xmlrpc-server-address 'localhost')
-#(xend-tcp-xmlrpc-server-port 8006)
-
-# SSL key and certificate to use for the legacy TCP XMLRPC interface.
-# Setting these will mean that this port serves only SSL connections as
-# opposed to plaintext ones.
-#(xend-tcp-xmlrpc-server-ssl-key-file xmlrpc.key)
-#(xend-tcp-xmlrpc-server-ssl-cert-file xmlrpc.crt)
-
-
-# Port xend should use for the HTTP interface, if xend-http-server is set.
-#(xend-port 8000)
-
-# Port xend should use for the relocation interface, if xend-relocation-server
-# is set.
-#(xend-relocation-port 8002)
-
-# Port xend should use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-ssl-port 8003)
-
-# SSL key and certificate to use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-server-ssl-key-file xmlrpc.key)
-#(xend-relocation-server-ssl-cert-file xmlrpc.crt)
-
-# Whether to use ssl as default when relocating.
-#(xend-relocation-ssl no)
-
-# Address xend should listen on for HTTP connections, if xend-http-server is
-# set.
-# Specifying 'localhost' prevents remote connections.
-# Specifying the empty string '' (the default) allows all connections.
-#(xend-address '')
-#(xend-address localhost)
-
-# Address xend should listen on for relocation-socket connections, if
-# xend-relocation-server is set.
-# Meaning and default as for xend-address above.
-# Also, interface name is allowed (e.g. eth0) there to get the
-# relocation address to be bound on.
-#(xend-relocation-address '')
-
-# The hosts allowed to talk to the relocation port. If this is empty (the
-# default), then all connections are allowed (assuming that the connection
-# arrives on a port and interface on which we are listening; see
-# xend-relocation-port and xend-relocation-address above). Otherwise, this
-# should be a space-separated sequence of regular expressions. Any host with
-# a fully-qualified domain name or an IP address that matches one of these
-# regular expressions will be accepted.
-#
-# For example:
-# (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$')
-#
-#(xend-relocation-hosts-allow '')
-
-# The limit (in kilobytes) on the size of the console buffer
-#(console-limit 1024)
-
-##
-# NOTE:
-# Please read /usr/share/doc/xen-utils-common/README.Debian for Debian specific
-# informations about the network setup.
-
-##
-# To bridge network traffic, like this:
-#
-# dom0: ----------------- bridge -> real eth0 -> the network
-# |
-# domU: fake eth0 -> vifN.0 -+
-#
-# use
-#
-# (network-script network-bridge)
-#
-# Your default ethernet device is used as the outgoing interface, by default.
-# To use a different one (e.g. eth1) use
-#
-# (network-script 'network-bridge netdev=eth1')
-#
-# The bridge is named eth0, by default (yes, really!)
-#
-
-# It is normally much better to create the bridge yourself in
-# /etc/network/interfaces. network-bridge start does nothing if you
-# already have a bridge, and network-bridge stop does nothing if the
-# default bridge name (normally eth0) is not a bridge. See
-# bridge-utils-interfaces(5) for full information on the syntax in
-# /etc/network/interfaces, but you probably want something like this:
-# iface xenbr0 inet static
-# address [etc]
-# netmask [etc]
-# [etc]
-# bridge_ports eth0
-#
-# To have network-bridge create a differently-named bridge, use:
-# (network-script 'network-bridge bridge=<name>')
-#
-# It is possible to use the network-bridge script in more complicated
-# scenarios, such as having two outgoing interfaces, with two bridges, and
-# two fake interfaces per guest domain. To do things like this, write
-# yourself a wrapper script, and call network-bridge from it, as appropriate.
-#
-
-# The script used to control virtual interfaces. This can be overridden on a
-# per-vif basis when creating a domain or a configuring a new vif. The
-# vif-bridge script is designed for use with the network-bridge script, or
-# similar configurations.
-#
-# If you have overridden the bridge name using
-# (network-script 'network-bridge bridge=<name>') then you may wish to do the
-# same here. The bridge name can also be set when creating a domain or
-# configuring a new vif, but a value specified here would act as a default.
-#
-# If you are using only one bridge, the vif-bridge script will discover that,
-# so there is no need to specify it explicitly. The default is to use
-# the bridge which is listed first in the output from brctl.
-#
-(vif-script vif-bridge)
-
-
-## Use the following if network traffic is routed, as an alternative to the
-# settings for bridged networking given above.
-#(network-script network-route)
-#(vif-script vif-route)
-
-
-## Use the following if network traffic is routed with NAT, as an alternative
-# to the settings for bridged networking given above.
-#(network-script network-nat)
-#(vif-script vif-nat)
-
-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
-# This is a minimum both for auto-ballooning (as enabled by
-# enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
-(dom0-min-mem 196)
-
-# Whether to enable auto-ballooning of dom0 to allow domUs to be created.
-# If enable-dom0-ballooning = no, dom0 will never balloon out.
-(enable-dom0-ballooning yes)
-
-# 32-bit paravirtual domains can only consume physical
-# memory below 168GB. On systems with memory beyond that address,
-# they'll be confined to memory below 128GB.
-# Using total_available_memory (in GB) to specify the amount of memory reserved
-# in the memory pool exclusively for 32-bit paravirtual domains.
-# Additionally you should use dom0_mem = <-Value> as a parameter in
-# xen kernel to reserve the memory for 32-bit paravirtual domains, default
-# is "0" (0GB).
-(total_available_memory 0)
-
-# In SMP system, dom0 will use dom0-cpus # of CPUS
-# If dom0-cpus = 0, dom0 will take all cpus available
-(dom0-cpus 0)
-
-# Whether to enable core-dumps when domains crash.
-#(enable-dump no)
-
-# The tool used for initiating virtual TPM migration
-#(external-migration-tool '')
-
-# The interface for VNC servers to listen on. Defaults
-# to 127.0.0.1 To restore old 'listen everywhere' behaviour
-# set this to 0.0.0.0
-#(vnc-listen '127.0.0.1')
-
-# The default password for VNC console on HVM domain.
-# Empty string is no authentication.
-(vncpasswd '')
-
-# The VNC server can be told to negotiate a TLS session
-# to encryption all traffic, and provide x509 cert to
-# clients enabling them to verify server identity. The
-# GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
-# all support the VNC extension for TLS used in QEMU. The
-# TightVNC/RealVNC/UltraVNC clients do not.
-#
-# To enable this create x509 certificates / keys in the
-# directory ${XEN_CONFIG_DIR} + vnc
-#
-# ca-cert.pem - The CA certificate
-# server-cert.pem - The Server certificate signed by the CA
-# server-key.pem - The server private key
-#
-# and then uncomment this next line
-# (vnc-tls 1)
-
-# The certificate dir can be pointed elsewhere..
-#
-# (vnc-x509-cert-dir vnc)
-
-# The server can be told to request & validate an x509
-# certificate from the client. Only clients with a cert
-# signed by the trusted CA will be able to connect. This
-# is more secure the password auth alone. Passwd auth can
-# used at the same time if desired. To enable client cert
-# checking uncomment this:
-#
-# (vnc-x509-verify 1)
-
-# The default keymap to use for the VM's virtual keyboard
-# when not specififed in VM's configuration
-#(keymap 'en-us')
-
-# Script to run when the label of a resource has changed.
-#(resource-label-change-script '')
-
-# Rotation count of qemu-dm log file.
-#(qemu-dm-logrotate-count 10)
-
-# Path where persistent domain configuration is stored.
-# Default is /var/lib/xend/domains/
-#(xend-domains-path /var/lib/xend/domains)
-
-# Number of seconds xend will wait for device creation and
-# destruction
-#(device-create-timeout 100)
-#(device-destroy-timeout 100)
-
-# When assigning device to HVM guest, we use the strict check for HVM guest by
-# default. (For PV guest, we use loose check automatically if necessary.)
-# When we assign device to HVM guest, if we meet with the co-assignment
-# issues or the ACS issue, we could try changing the option to 'no' -- however,
-# we have to realize this may incur security issue and we can't make sure the
-# device assignment could really work properly even after we do this.
-#(pci-passthrough-strict-check yes)
-
-# If we have a very big scsi device configuration, start of xend is slow,
-# because xend scans all the device paths to build its internal PSCSI device
-# list. If we need only a few devices for assigning to a guest, we can reduce
-# the scan to this device. Set list list of device paths in same syntax like in
-# command lsscsi, e.g. ('16:0:0:0' '15:0')
-# (pscsi-device-mask ('*'))
-
+++ /dev/null
-###############################################################################
-# Configuration file for granting quiry PCI devices full write access to their
-# configuration space. This file should only be used when you are unable to
-# determine the exact registers required by your device. Even so, it should
-# be used only temporarily.
-#
-# SEND A MESSAGE TO xen-devel@lists.xensource.com IF YOU USE THIS FILE.
-#
-# Using this file should NOT be necessary. If you must use it to make some
-# device work, send a message to the above list with as much information about
-# your device as possible so the developers can make accomodations for it.
-# Once developers make the necessary updates you can remove the corresponding
-# entry for your device.
-###############################################################################
-# Entries are formated as follows: <vendor>:<device>[:<subvendor>:<subdevice>]
-#
-# Example: Appending to an existing list
-#
-# (unconstrained_dev_ids
-# ('XXXX:XXXX:XXXX:XXXX' # existing entry
-# 'YYYY:YYYY:YYYY:YYYY' # new entry 1
-# 'ZZZZ:ZZZZ') # new entry 2
-# )
-###############################################################################
-(unconstrained_dev_ids
- #('0123:4567:89AB:CDEF')
-)
+++ /dev/null
-###############################################################################
-# Configuration file for quirky PCI devices that require write-access to
-# parts of the configuration space. Use this file to specific PCI device
-# IDs and the configuration space fields to which those devices must be
-# able to write.
-#
-# Length is important, so be sure to match new entries with the
-# lengths of comparable existing entries.
-#
-# Additions to this file take effect as soon as a new domain with a
-# matching device is started. However, to remove a field that was
-# previously applied to a device you must unbind the device from
-# pciback.
-###############################################################################
-# This is a bogus entry to show how a new device would be added to the list
-#
-# (new_quirky_dev_name
-# (pci_ids
-# ('0123:4567:890A:BCEF')
-# )
-#
-# (pci_config_space_fields
-# ('12345678:1:00000000')
-# )
-# )
-###############################################################################
-
-(tg3
- (pci_ids
- # Entries are formated as follows:
- # <vendor>:<device>[:<subvendor>:<subdevice>]
- ('14e4:1644' # Broadcom Tigon3 5700
- '14e4:1645' # Broadcom Tigon3 5701
- '14e4:1646' # Broadcom Tigon3 5702
- '14e4:1647' # Broadcom Tigon3 5703
- '14e4:1648' # Broadcom Tigon3 5704
- '14e4:164d' # Broadcom Tigon3 5702FE
- '14e4:1653' # Broadcom Tigon3 5705
- '14e4:1654' # Broadcom Tigon3 5705_2
- '14e4:165d' # Broadcom Tigon3 5705M
- '14e4:165e' # Broadcom Tigon3 5705M_2
- '14e4:16a6' # Broadcom Tigon3 5702X
- '14e4:16a7' # Broadcom Tigon3 5703X
- '14e4:16a8' # Broadcom Tigon3 5704S
- '14e4:16c6' # Broadcom Tigon3 5702A3
- '14e4:16c7' # Broadcom Tigon3 5703A3
- '14e4:1696' # Broadcom Tigon3 5782
- '14e4:169c' # Broadcom Tigon3 5788
- '14e4:169d' # Broadcom Tigon3 5789
- '14e4:170d' # Broadcom Tigon3 5901
- '14e4:1649' # Broadcom Tigon3 5704S_2
- '14e4:166e' # Broadcom Tigon3 5705F
- '14e4:1658' # Broadcom Tigon3 5720
- '14e4:1659' # Broadcom Tigon3 5721
- '14e4:1676' # Broadcom Tigon3 5750
- '14e4:1677' # Broadcom Tigon3 5751
- '14e4:167c' # Broadcom Tigon3 5750M
- '14e4:167d' # Broadcom Tigon3 5751M
- '14e4:167e' # Broadcom Tigon3 5751F
- '14e4:1600' # Broadcom Tigon3 5752
- '14e4:1601' # Broadcom Tigon3 5752M
- '14e4:16f7' # Broadcom Tigon3 5753
- '14e4:16fd' # Broadcom Tigon3 5753M
- '14e4:16fe' # Broadcom Tigon3 5753F
- '14e4:1668' # Broadcom Tigon3 5714
- '14e4:1678' # Broadcom Tigon3 5715
- '14e4:166a' # Broadcom Tigon3 5780
- '14e4:166b' # Broadcom Tigon3 5780S
- '14e4:16dd' # Broadcom Tigon3 5781
- '1148:4400' # Syskonnect 9DXX
- '1148:4500' # Syskonnect 9MXX
- '173b:03e8' # Altima AC1000
- '173b:03e9' # Altima AC1001
- '173b:03eb' # Altima AC1003
- '173b:03ea' # Altima AC9100
- '106b:1645') # Apple Tigon3
- )
-
- (pci_config_space_fields
- # Entries are formated as follows:
- # <register>:<size>:<mask>
- # size is measured in bytes (1,2,4 are valid sizes)
- # mask is currently unused; use all zero's
- ('00000078:4:00000000' # TG3PCI_REG_BASE_ADDR
- '0000007c:4:00000000' # TG3PCI_MEM_WIN_BASE_ADDR
- '00000080:4:00000000' # TG3PCI_REG_DATA
- '00000084:4:00000000' # TG3PCI_MEM_WIN_DATA
- '00000090:4:00000000' # TG3PCI_MISC_LOCAL_CTRL
- '00000068:4:00000000' # TG3PCI_MISC_HOST_CTRL
- '0000009C:4:00000000' # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_LOW
- '00000098:4:00000000' # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_HIGH
- '000000a4:4:00000000' # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_LOW
- '000000a0:4:00000000' # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_HIGH
- '00000070:4:00000000') # TG3PCI_PCISTATE
- )
-)
+++ /dev/null
-# Configuration for Xen system
-# ----------------------------
-
-# There exists several tool stacks to configure a Xen system.
-# xl: This is the new toolstack using libxenlight/libxl (default)
-# xm: Was the old toolstack (xend) which is no longer supported!
-#
-# Attention: You need to reboot after changing this!
-TOOLSTACK=
--- /dev/null
+#!/usr/bin/perl -wpi~
+
+# dh_ucf does not seem have a mode for dropping a ucf-managed config
+# file. ucf and ucfr can be used to DTRT but are insufficiently
+# coooked.
+#
+# I think the right thing to do, when dropping a ucf-handled config
+# file, is
+# (i) stop shipping the original file in /usr/share
+# (ii) in postinst, do nothing
+# (iii) in postrm purge, delete all traces
+
+# The result of (i) and (ii) is that the file remains recorded by
+# ucf and ucfr, but that the original version of the file is no
+# longer present on the user's machine.
+#
+# (iii) is exactly what dh_ucf puts into the postrm.
+#
+# So, we can be fairly future-proof with the following approach
+# (i) stop shipping the original file in /usr/share
+# (ii) call dh_ucf
+# (iii) call ucf-remove-fixup (this script)
+# which strips out the ucf stuff from the postinst
+
+use strict;
+use Carp;
+
+our ($package, $configfile);
+
+BEGIN {
+ die unless @ARGV == 2;
+ ($package, $configfile) = @ARGV;
+ @ARGV = ("debian/$package.postinst.debhelper");
+ $/ = '# End automatically added section'
+}
+
+next unless m{$configfile};
+confess "UNEXPECTED $_ ?" unless m{^(?=# Automatically added by dh_ucf)}m;
+
+print $` or die $!;
+$_ = $';
+next unless m{^(?!#)}m;
+s{\n}{\n# suppressed by ucf-remove-fixup\n};
+s{^(?!#)}{# }mg;
--- /dev/null
+Document: xen-doc-html
+Section: System/Administration
+Title: Xen HTML documentation
+Abstract: Xen hypercall interfaces, manpages, and miscellanea.
+ Xen upstream provides much of its documentation in HTML form.
+ This entry referes to the top-level index of the Xen HTML docs.
+
+Format: HTML
+Index: /usr/share/doc/xen/html/index.html
+Files: /usr/share/doc/xen/html
--- /dev/null
+/usr/share/doc/xen/html
--- /dev/null
+usr/share/doc/xen/html usr/share/doc/xen-doc/html
--- /dev/null
+documentation-package-not-architecture-independent
+# ^ Indeed not. It is arch-specific because the Xen upstream HTML
+# documentation contains arch-specific hhypercall API information.
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- configure)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- configure)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- configure)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove)
- if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
- update-grub || :
- fi
- ;;
-
- purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+
+usr/lib/debug/xen* usr/lib/debug/
+# ^ The xen* wildcard excludes the shim symbols. The shim is treated
+# as part of the toolstack - see xen-utils-V.install.vsn-in.
--- /dev/null
+debug-package-should-be-named-dbg usr/lib/debug/xen-*-pre.efi.map.gz
+# ^ as is traditional for kernels too, we ship the debug information
+# in the hypervisor package rather than creating yet another
+# package just for this file, which is only 50K or so anyway.
--- /dev/null
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ configure)
+ if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
+ update-grub || :
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ remove)
+ if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
+ update-grub || :
+ fi
+ ;;
+
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+Submit-As: src:xen
--- /dev/null
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ configure)
+ if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
+ update-grub || :
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ remove)
+ if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
+ update-grub || :
+ fi
+ ;;
+
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
-../../tree/xen-hypervisor-common/* /
+../tree/xen-hypervisor-common/* /
--- /dev/null
+## Xen release branches have debug turned off, but explicitly turn
+## it off here so that this build system works right on unstable
+## branches (and doesn't generate a debug hypervisor).
+CONFIG_DEBUG=n
+++ /dev/null
-statically-linked-binary usr/lib/xen-4.11/boot/hvmloader
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-case "$1" in
- configure)
- update-alternatives --remove xen-default /usr/lib/xen-4.11
- if [ -x "/etc/init.d/xen" ]; then
- invoke-rc.d xen start || exit $?
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-case "$1" in
- remove|upgrade)
- update-alternatives --remove xen-default /usr/lib/xen-4.11
- if [ -x "/etc/init.d/xen" ]; then
- invoke-rc.d xen stop || exit $?
- fi
- ;;
-
- deconfigure|failed-upgrade)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+Xen for Debian
+==============
+
+Config behaviour
+----------------
+
+The Debian packages changes the behaviour of some config options.
+
+The options "kernel", "initrd" and "loader" searches in the Xen private boot
+directory (/usr/lib/xen-$version/boot) first. "bootloader" and "device_model"
+also searches the Xen private bin directory (/usr/lib/xen-$version/bin). This
+means that the following entries will properly find anything:
+ loader = 'hvmloader'
+ bootloader = 'pygrub'
+
+Network setup
+-------------
+
+The Debian package of Xen don't change the network setup in any way. This
+differs from the upstream version, which overwrites the main network card
+(eth0) with a bridge setup and may break the network at this point..
+
+To setup a bridge please follow the instructions in the manpage for
+bridge-utils-interfaces(5).
+
+Loop devices
+------------
+
+If you plan hosting virtual domains with file backed block devices (ie. the
+ones xen-tools creates by default) be careful about two issues:
+
+1. Maximum number of loop devices
+ By default the loop driver supports a maximum of 8 loop devices. Of
+ course since every Xen domain uses at least two (one for the data and one
+ for the swap) this number is absolutely insufficient. You should increase
+ it by adding a file named local-loop in /etc/modprobe.d containing the
+ string "options loop max_loop=128", if the loop driver is compiled as a
+ module, or by appending the string max_loop=128 to your kernel parameters
+ if the driver is in-kernel. Of course you can increase or decrease the
+ number 128 as you see fit.
+
+2. Driver loading (only if loop is compiled as a module)
+ Normally the loop driver gets loaded when the first loop device is
+ accessed. When using udev, though, the loop devices get created only
+ after the driver gets loaded. This means that Xen will fail if the loop
+ driver is not already loaded when it tries to start a file-backed virtual
+ domain. To fix this just add "loop" in your /etc/modules file, thus
+ forcing it to be loaded at boot time.
--- /dev/null
+Submit-As: src:xen
--- /dev/null
+usr/lib/xen-@version@/bin
+usr/lib/xen-@version@/lib/python
+usr/lib/xen-@version@/boot
+
+usr/lib/debug/usr/lib/xen-*/boot/* usr/lib/debug/xen-syms-@version@-shim
+# ^ Yes, the upstream build system really does install the shim symbols
+# file in debian/tmp/usr/lib/debug/usr/lib/xen-4.11/boot/xen-shim-syms
--- /dev/null
+statically-linked-binary usr/lib/xen-@version@/boot/hvmloader
+statically-linked-binary usr/lib/xen-@version@/boot/xen-shim
+
+binary-has-unneeded-section usr/lib/xen-4.11/boot/xen-shim .note
+# ^ that section is certainly needed for the tools etc. to be able
+# to load it!
--- /dev/null
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure)
+ update-alternatives --remove xen-default /usr/lib/xen-@version@
+ if [ -x "/etc/init.d/xen" ]; then
+ invoke-rc.d xen start || exit $?
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ remove|upgrade)
+ update-alternatives --remove xen-default /usr/lib/xen-@version@
+ if [ -x "/etc/init.d/xen" ]; then
+ invoke-rc.d xen stop || exit $?
+ fi
+ ;;
+
+ deconfigure|failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
etc/xen/scripts
etc/xen/xl*
-usr/lib/xen-common
+etc/bash_completion.d/xl.sh usr/share/bash-completion/completions/
+
+etc/default/xendomains
+
+usr/bin
usr/sbin
-../../tree/xen-utils-common/* /
+
+usr/share/man
+
+../scripts/xen usr/sbin
+
+../scripts/xen-version usr/lib/xen-common/bin
+../scripts/xen-dir usr/lib/xen-common/bin
+../scripts/xen-utils-wrapper usr/lib/xen-common/bin
+
+../scripts/xen-init-list usr/lib/xen-common/bin
+../scripts/xen-init-name usr/lib/xen-common/bin
+
+../scripts/qemu-ifup etc/xen/scripts
+
+../scripts/xen-toolstack-wrapper usr/lib/xen-common/bin
+../scripts/xen-toolstack usr/lib/xen-common/bin
--- /dev/null
+usr/share/doc/xen/html usr/share/doc/xen-utils-common/html
+++ /dev/null
-xen-3.0 (3.4.0-1) UNRELEASED; urgency=low
-
- This version does not longer ship the ioemu part, aka the patched qemu.
- So it does not support
- * full virtualized domains and
- * virtual console support for paravirtualized domains.
-
- -- Bastian Blank <waldi@debian.org> Sat, 18 Jul 2009 15:05:31 +0200
+++ /dev/null
-Xen for Debian
-==============
-
-Config behaviour
-----------------
-
-The Debian packages changes the behaviour of some config options.
-
-The options "kernel", "initrd" and "loader" searches in the Xen private boot
-directory (/usr/lib/xen-$version/boot) first. "bootloader" and "device_model"
-also searches the Xen private bin directory (/usr/lib/xen-$version/bin). This
-means that the following entries will properly find anything:
- loader = 'hvmloader'
- bootloader = 'pygrub'
-
-Network setup
--------------
-
-The Debian package of Xen don't change the network setup in any way. This
-differs from the upstream version, which overwrites the main network card
-(eth0) with a bridge setup and may break the network at this point..
-
-To setup a bridge please follow the instructions in the manpage for
-bridge-utils-interfaces(5).
-
-You can also change the /etc/xen/xend-config.sxp file and re-enable the Xen
-included network setup by adding
- (network-script network-bridge)
-to the file. But please note that this may or may not work.
-
-Loop devices
-------------
-
-If you plan hosting virtual domains with file backed block devices (ie. the
-ones xen-tools creates by default) be careful about two issues:
-
-1. Maximum number of loop devices
- By default the loop driver supports a maximum of 8 loop devices. Of
- course since every Xen domain uses at least two (one for the data and one
- for the swap) this number is absolutely insufficient. You should increase
- it by adding a file named local-loop in /etc/modprobe.d containing the
- string "options loop max_loop=128", if the loop driver is compiled as a
- module, or by appending the string max_loop=128 to your kernel parameters
- if the driver is in-kernel. Of course you can increase or decrease the
- number 128 as you see fit.
-
-2. Driver loading (only if loop is compiled as a module)
- Normally the loop driver gets loaded when the first loop device is
- accessed. When using udev, though, the loop devices get created only
- after the driver gets loaded. This means that Xen will fail if the loop
- driver is not already loaded when it tries to start a file-backed virtual
- domain. To fix this just add "loop" in your /etc/modules file, thus
- forcing it to be loaded at boot time.
+usr/bin/xenstore
usr/bin/xenstore-*
+usr/share/man/man1/xenstore.1
+usr/share/man/man1/xenstore-*.1
+# See also xenstore_rm in debian/rules.
--- /dev/null
+spelling-error-in-binary usr/bin/xenstore* upto up to
+# ^ these have --upto as a command line argument
+
+description-possibly-contains-homepage https://wiki.xen.org/wiki/XenStore
+# ^ It's not a homepage, it's a reference to help understand
+# why this package might be useful.