1. 09 May, 2022 28 commits
    • Hans van Kranenburg's avatar
      Declare fast forward / record previous work · 19c80473
      Hans van Kranenburg authored
      [git-debrebase pseudomerge: stitch]
      19c80473
    • Hans van Kranenburg's avatar
      Commit patch queue (exported by git-debrebase) · 4b95c0df
      Hans van Kranenburg authored
      [git-debrebase make-patches: export and commit patches]
      4b95c0df
    • Hans van Kranenburg's avatar
      libxl: Fix unneededly rebuilding build.o(pic) · 1049a304
      Hans van Kranenburg authored
      [The symptoms]
      
      When doing a Xen package build for Debian with ccache enabled, we
      started getting the following error:
      
          x86_64-linux-gnu-gcc [...] -o build.o
          /builds/xen-team/debian-xen/debian/output/source_dir/tools/libs/light/../../../tools/libacpi/build.c
          ccache: error: Failed to create temporary file for
          /run/user/0/ccache-tmp/tmp.cpp_stdout.bqxKOP: Permission denied
      
      It turns out to be the case that during the install step of tools (the
      install-tools that happens inside the override_dh_auto_install part of
      d/rules), the upstream build machinery *again* tries to build this
      build.c file, while this has already been done earlier during the actual
      build phase.
      
      Since the Debian build process stopped to allow usage of ccache during
      the install phase of the process, this issue surfaces.
      
      [The cause]
      
      In tools/libs/light/Makefile, we see the following lines:
      
          .PHONY: acpi
          acpi:
              $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)"
      
          [...]
      
          $(DSDT_FILES-y) build.o build.opic: acpi
      
      'acpi' is defined as phony target. In the last line, we see that build.o
      depdends on acpi.
      
      Also see:
          "4.6 Phony Targets"
          https://www.gnu.org/software/make/manual/make.html#Phony-Targets
      
      A 'normal' target gives make the possibility to track timestamps of a
      target file. E.g. compiling foo.c results in foo.o, and as long as foo.c
      keeps being 'older' than foo.o, make will think "nothing to do here,
      foo.o is up to date, let's move along".
      
      Now, a phony target is some kind of fake target that does not come with
      this kind of information, and such behaves like a target that is always
      out-of-date. Hence, with a configuration as seen above, it will try to
      always unneededly build this build.o and build.opic again.
      
      [Discussion]
      
      Upstream commit e006b2e3 ("libxl: fix libacpi dependency") which
      introduced the problem tells us that the purpose of the current
      configuration is to make sure the libacpi/ dir is built before we
      attempt to work on build.c in here. The changes in there remove an
      apparently obsolete line referencing build.o from the libacpi Makefile,
      which might mean that in the past this build.* stuff was located in that
      part of the code, and was moved into libs/light later.
      
      [The fix]
      
      If it is enough to just have an order-only dependency, we can use an
      order-only prerequisite instead, in this place:
      
          $(DSDT_FILES-y): acpi
          build.o build.opic: | acpi
      
      Also see:
          "4.3 Types of Prerequisites"
          https://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
      
      
      
      Now the build machinery will not attempt to unconditionally rebuild
      build.o during make install.
      
      [Suggestions for further work]
      
      As can be seen, there's still the $(DSDT_FILES-y) which has the same
      acpi dependency and which may lead to similar unwanted side effects.
      However, since none of the files in that list have a corresponding build
      target in *this* Makefile, it does not trigger the problem for us, and
      we leave it alone, for now.
      
      Suggested-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      Fixes: e006b2e3 ("libxl: fix libacpi dependency")
      1049a304
    • Michael Tokarev's avatar
      give meaningful error message if qemu device model is unavailable · 6acc5a96
      Michael Tokarev authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      There's no sense to switch to qemu-xen-traditional device model
      if that one is not enabled in the first place. This way we'll
      have a chance later to print a message suggesting to install the
      missing qemu package if we *actually* need qemu for the device model.
      6acc5a96
    • Maximilian Engelhardt's avatar
      xen/arch/x86: make objdump output user locale agnostic · 8702038b
      Maximilian Engelhardt authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      The objdump output is fed to grep, so make sure it doesn't change with
      different user locales and break the grep parsing.
      This problem was identified while updating xen in Debian and the fix is
      needed for generating reproducible builds in varying environments.
      
      Signed-off-by: Maximilian Engelhardt's avatarMaximilian Engelhardt <maxi@daemonizer.de>
      8702038b
    • Maximilian Engelhardt's avatar
      docs: set date to SOURCE_DATE_EPOCH if available · db55e74d
      Maximilian Engelhardt authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      Use the solution described in [1] to replace the call to the 'date'
      command with a version that uses SOURCE_DATE_EPOCH if available. This
      is needed for reproducible builds.
      
      [1] https://reproducible-builds.org/docs/source-date-epoch/
      
      
      
      Signed-off-by: Maximilian Engelhardt's avatarMaximilian Engelhardt <maxi@daemonizer.de>
      
      [Hans van Kranenburg]
      Note: this patch is submitted upstream but not committed yet. We
      expect that it gets in. Otherwise, we don't wait and already have it
      here because I want to have the reproducible build work completed.
      db55e74d
    • Hans van Kranenburg's avatar
      tools: don't build/ship xenmon · e5dca802
      Hans van Kranenburg authored
      
      
      This is something that hasn't been touched (except for making it Python
      3 compatible, which failed) since 2007. Don't build or ship it.
      
          -# xenmon
            File "/usr/sbin/xenmon", line 680
      	stop_cmd = "/usr/bin/pkill -INT -z global xenbaked"
          TabError: inconsistent use of tabs and spaces in indentation
      
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      e5dca802
    • Hans van Kranenburg's avatar
      tools/xl/bash-completion: also complete 'xen' · 96e9e3bc
      Hans van Kranenburg authored
      
      
      We have the `xen` alias for xl in Debian, since in the past it was a
      command that could execute either xl or xm.
      
      Now, it always does xl, so, complete the same stuff for it as we have
      for xl.
      
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      
      [git-debrebase split: mixed commit: upstream part]
      96e9e3bc
    • Ian Jackson's avatar
      pygrub: Specify -rpath LIBEXEC_LIB when building fsimage.so · 3bcaafc5
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      If LIBEXEC_LIB is not on the default linker search path, the python
      fsimage.so module fails to find libfsimage.so.
      
      Add the relevant directory to the rpath explicitly.
      
      (This situation occurs in the Debian package, where
      --with-libexec-libdir is used to put each Xen version's libraries and
      utilities in their own directory, to allow them to be coinstalled.)
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      3bcaafc5
    • Bastian Blank's avatar
      pygrub: Set sys.path · 9a3ee9fd
      Bastian Blank authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      We install libfsimage in a non-standard path for Reasons.
      (See debian/rules.)
      
      This patch was originally part of `tools-pygrub-prefix.diff'
      (eg commit 51657319
      
      ) and included changes to the Makefile to
      change the installation arrangements (we do that part in the rules now
      since that is a lot less prone to conflicts when we update) and to
      shared library rpath (which is now done in a separate patch).
      
      (Commit message rewritten by Ian Jackson.)
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      
      squash! pygrub: Set sys.path and rpath
      9a3ee9fd
    • Ian Jackson's avatar
      hotplug-common: Do not adjust LD_LIBRARY_PATH · 384fdd3c
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      This is in the upstream script because on non-Debian systems, the
      default install locations in /usr/local/lib might not be on the linker
      path, and as a result the hotplug scripts would break.
      
      A reason we might need it in Debian is our multiple version
      coinstallation scheme.  However, the hotplug scripts all call the
      utilities via the wrappers, and the binaries are configured to load
      from the right place anyway.
      
      This setting is an annoyance because it requires libdir, which is an
      arch-specific path but comes from a file we want to put in
      xen-utils-common, an arch:all package.
      
      So drop this setting.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      384fdd3c
    • Hans van Kranenburg's avatar
      sysconfig.xencommons.in: Strip and debianize · 9d42a04a
      Hans van Kranenburg authored
      
      
      Strip all options that are for stuff we don't ship, which is 1)
      xenstored as stubdom and 2) the new options for oom score and open file
      descriptor limit, which would not have any effect, because we're
      shipping different init scripts... :|
      
      It seems useful to give the user the option to revert to xenstored
      instead of the default oxenstored if they really want.
      
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      Acked-by: Ian Jackson's avatarIan Jackson <ijackson@chiark.greenend.org.uk>
      9d42a04a
    • Hans van Kranenburg's avatar
      t/h/L/vif-common.sh: disable handle_iptable · 8f203251
      Hans van Kranenburg authored
      
      
      Also see Debian bug #894013. The current attempt at providing
      anti-spoofing rules results in a situation that does not have any
      effect. Also note that forwarding bridged traffic to iptables is not
      enabled by default, and that for openvswitch users it does not make any
      sense.
      
      So, stop cluttering the live iptables ruleset.
      
      This functionality seems to be introduced before 2004 and since then it
      has never got some additional love.
      
      It would be nice to have a proper discussion upstream about how Xen
      could provide some anti mac/ip spoofing in the dom0. It does not seem to
      be a trivial thing to do, since it requires having quite some knowledge
      about what the domU is allowed to do or not (e.g. a domU can be a
      router...).
      
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      8f203251
    • Ian Jackson's avatar
      docs/man/xen-vbd-interface.7: Provide properly-formatted NAME section · d41c0885
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      This manpage was omitted from
         docs/man: Provide properly-formatted NAME sections
      because I was previously building with markdown not installed.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      d41c0885
    • Ian Jackson's avatar
      shim: Provide separate install-shim target · 73b52ad0
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      When building on a 32-bit userland, the user wants to build 32-bit
      tools and a 64-bit hypervisor.  This involves setting XEN_TARGET_ARCH
      to different values for the tools build and the hypervisor build.
      
      So the user must invoke the tools build and the hypervisor build
      separately.
      
      However, although the shim is done by the tools/firmware Makefile, its
      bitness needs to be the same as the hypervisor, not the same as the
      tools.  When run with XEN_TARGET_ARCH=x86_32, it it skipped, which is
      wrong.
      
      So the user must invoke the shim build separately.  This can be done
      with
         make -C tools/firmware/xen-dir XEN_TARGET_ARCH=x86_64
      
      However, tools/firmware/xen-dir has no `install' target.  The
      installation of all `firmware' is done in tools/firmware/Makefile.  It
      might be possible to fix this, but it is not trivial.  For example,
      the definitions of INST_DIR and DEBG_DIR would need to be copied, as
      would an appropriate $(INSTALL_DIR) call.
      
      For now, provide an `install-shim' target in tools/firmware/Makefile.
      
      This has to be called from `install' of course.  We can't make it
      a dependency of `install' because it might be run before `all' has
      completed.  We could make it depend on a `shim' target but such
      a target is nearly impossible to write because everything is done by
      the inflexible subdir-$@ machinery.
      
      The overally result of this patch is that existing make invocations
      work as before.  But additionally, the user can say
        make -C tools/firmware install-shim XEN_TARGET_ARCH=x86_64
      to install the shim.  The user must have built it already.
      Unlike the build rune, this install-rune is properly conditional
      so it is OK to call on ARM.
      
      What a mess.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ijackson@chiark.greenend.org.uk>
      73b52ad0
    • Ian Jackson's avatar
      config/Tools.mk.in: Respect caller's CONFIG_PV_SHIM · 99afa069
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      This makes it easier to disable the shim build.  (In Debian we need to
      build the shim separately because it needs different compiler flags).
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ijackson@chiark.greenend.org.uk>
      [ Hans: adjust from tools/firmware/Makefile to config/Tools.mk.in to
      follow changes that happened in 8845155c
      
       ("pvshim: make PV shim build
      selectable from configure") ]
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      99afa069
    • Ian Jackson's avatar
      d1b9fc58
    • Ian Jackson's avatar
      autoconf: Provide libexec_libdir_suffix · 227f9545
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      This is going to be used to put libfsimage.so into a path containing
      the multiarch triplet.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      227f9545
    • Hans van Kranenburg's avatar
      tools-libfsimage-prefix.diff · 967457fb
      Hans van Kranenburg authored
      \o/
      967457fb
    • Ian Jackson's avatar
      Do not build the instruction emulator · 0cdeaa61
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      0cdeaa61
    • Bastian Blank's avatar
      Remove static solaris support from pygrub · ff18f7c4
      Bastian Blank authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      Patch-Name: tools-pygrub-remove-static-solaris-support
      
      
      Gbp-Pq: Topic misc
      Gbp-Pq: Name tools-pygrub-remove-static-solaris-support
      ff18f7c4
    • Bastian Blank's avatar
      Do not ship COPYING into /usr/include · f0a33a27
      Bastian Blank authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      This is not wanted in Debian.  COPYING ends up in
      /usr/share/doc/xen-*copyright.
      
      Patch-Name: tools-include-no-COPYING.diff
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      f0a33a27
    • Bastian Blank's avatar
      config-prefix.diff · 3b57df43
      Bastian Blank authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      Patch-Name: config-prefix.diff
      
      
      Gbp-Pq: Topic prefix-abiname
      Gbp-Pq: Name config-prefix.diff
      3b57df43
    • Bastian Blank's avatar
      Display Debian package version in hypervisor log · cd5ee6db
      Bastian Blank authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      During hypervisor boot, disable the banner and nicely display the xen
      version as well as the Maintainer address from debian/control.
      
      For this to work the SOURCE_BASE_DIR variable needs to be set by the
      build system to the top directory, i.e. where the debian folder is.
      
      Original patch by Bastian Blank <waldi@debian.org>
      Modified by
      Hans van Kranenburg <hans@knorrie.org>
      Maximilian Engelhardt <maxi@daemonizer.de>
      cd5ee6db
    • Ian Jackson's avatar
      Delete configure output · 0a3e93f8
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      These autogenerated files are not useful in Debian; dh_autoreconf will
      regenerate them.
      
      If this patch does not apply when rebasing, you can simply delete the
      files again.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      0a3e93f8
    • Ian Jackson's avatar
      Delete config.sub and config.guess · a893cdf9
      Ian Jackson authored and Hans van Kranenburg's avatar Hans van Kranenburg committed
      
      
      dh_autoreconf will provide these back.
      
      If this patch does not apply when rebasing, you can simply delete the
      files again.
      
      Signed-off-by: Ian Jackson's avatarIan Jackson <ian.jackson@citrix.com>
      a893cdf9
    • Hans van Kranenburg's avatar
      18c34e7c
    • Hans van Kranenburg's avatar
      d/control: make qemu-system-xen a versioned dependency · 9503cb74
      Hans van Kranenburg authored
      
      
      Qemu version 1:7.0+dfsg-6 fixes adding the --enable-xen-pci-passthrough
      option for the xen binary.
      
      Signed-off-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>
      9503cb74
  2. 05 May, 2022 3 commits
  3. 23 Apr, 2022 6 commits
  4. 21 Apr, 2022 3 commits