1. 23 Aug, 2022 35 commits
    • Hans van Kranenburg's avatar
      Declare fast forward / record previous work · 133b353f
      Hans van Kranenburg authored
      [git-debrebase pseudomerge: stitch]
      133b353f
    • Hans van Kranenburg's avatar
      Commit patch queue (exported by git-debrebase) · 6fd3e3a9
      Hans van Kranenburg authored
      [git-debrebase make-patches: export and commit patches]
      6fd3e3a9
    • Hans van Kranenburg's avatar
      libxl: Fix unneededly rebuilding build.o(pic) · 63f0a371
      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")
      63f0a371
    • Michael Tokarev's avatar
      give meaningful error message if qemu device model is unavailable · cdfbc3d2
      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.
      cdfbc3d2
    • Maximilian Engelhardt's avatar
      xen/arch/x86: make objdump output user locale agnostic · 0129e0ab
      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>
      0129e0ab
    • Maximilian Engelhardt's avatar
      docs: set date to SOURCE_DATE_EPOCH if available · f7b1582b
      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.
      f7b1582b
    • Hans van Kranenburg's avatar
      tools: don't build/ship xenmon · 123eba9a
      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>
      123eba9a
    • Hans van Kranenburg's avatar
      tools/xl/bash-completion: also complete 'xen' · 903ad085
      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]
      903ad085
    • Ian Jackson's avatar
      pygrub: Specify -rpath LIBEXEC_LIB when building fsimage.so · ece6cc31
      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>
      ece6cc31
    • Bastian Blank's avatar
      pygrub: Set sys.path · 9170f70e
      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
      9170f70e
    • Ian Jackson's avatar
      hotplug-common: Do not adjust LD_LIBRARY_PATH · 79602388
      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>
      79602388
    • Hans van Kranenburg's avatar
      sysconfig.xencommons.in: Strip and debianize · 76b3656f
      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>
      76b3656f
    • Hans van Kranenburg's avatar
      t/h/L/vif-common.sh: disable handle_iptable · 1a6e6eb7
      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>
      1a6e6eb7
    • Ian Jackson's avatar
      docs/man/xen-vbd-interface.7: Provide properly-formatted NAME section · 9403df7e
      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>
      9403df7e
    • Ian Jackson's avatar
      shim: Provide separate install-shim target · 3ff1837d
      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>
      3ff1837d
    • Ian Jackson's avatar
      config/Tools.mk.in: Respect caller's CONFIG_PV_SHIM · 7295bbbb
      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>
      7295bbbb
    • Ian Jackson's avatar
      e6c03e8c
    • Ian Jackson's avatar
      autoconf: Provide libexec_libdir_suffix · 60e7d860
      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>
      60e7d860
    • Hans van Kranenburg's avatar
      tools-libfsimage-prefix.diff · 1f4044f7
      Hans van Kranenburg authored
      \o/
      1f4044f7
    • Ian Jackson's avatar
      Do not build the instruction emulator · fa691cd8
      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>
      fa691cd8
    • Bastian Blank's avatar
      Remove static solaris support from pygrub · 9ff12e9a
      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
      9ff12e9a
    • Bastian Blank's avatar
      Do not ship COPYING into /usr/include · 3ce484b7
      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>
      3ce484b7
    • Bastian Blank's avatar
      config-prefix.diff · 530f2f7c
      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
      530f2f7c
    • Bastian Blank's avatar
      Display Debian package version in hypervisor log · dea40fb7
      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>
      dea40fb7
    • Ian Jackson's avatar
      Delete configure output · c3375df3
      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>
      c3375df3
    • Ian Jackson's avatar
      Delete config.sub and config.guess · e4f0541c
      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>
      e4f0541c
    • Hans van Kranenburg's avatar
      debian/changelog: finish 4.16.2-1 · b019ce9d
      Hans van Kranenburg authored
      b019ce9d
    • Hans van Kranenburg's avatar
      d/*lintian-overrides*: deal with formatting changes · fde68c83
      Hans van Kranenburg authored
      The message output of lintian is changing, and the override lines are
      meant to match those messages to silence them.
      
      THEN:
         statically-linked-binary usr/lib/xen-4.16/boot/xen-shim
      
      NOW:
         statically-linked-binary [usr/lib/xen-4.16/boot/xen-shim]
      
      Also see: https://bugs.debian.org/1007002
      
      So, the goal while writing these overrides is not to be as specific as
      possible, it's better to be more generic and aim for the lowest chance
      to accidentally match (hide) another problem.
      
      For example, for the no-symbols-control-file one in libxenmisc it's the
      case for ALL of the so files in the package, so there's not really a
      need to put more effort in matching them specifically.
      
      For others, we mostly can just put a * before and after the file names,
      so that this will work with old and new lintian versions.
      
      For binary-has-unneeded-section and spelling-error-in-binary, it seems
      the order of stuff on the line has changed (filename is now in brackets
      and is moved to the beginning of the line), so for them just also use
      only the file name with some added *'s... O_o
      fde68c83
    • Hans van Kranenburg's avatar
      d/xen-utils-V.lintian-overrides.vsn-in: drop binary-from-other-architecture · 30916c93
      Hans van Kranenburg authored
      This would hit for i386 because it would have amd64 binary stuff inside
      the packages. Now that we don't ship anything for i386 any more, this
      override is also obsolete.
      
          I: xen-utils-4.16: unused-override binary-from-other-architecture
          usr/lib/debug/xen-syms-4.16-shim/xen-shim-syms
          [usr/share/lintian/overrides/xen-utils-4.16:9]
      30916c93
    • Hans van Kranenburg's avatar
      d/xenstore-utils.lintian-overrides: drop description-possibly-contains-homepage · 8e164eeb
      Hans van Kranenburg authored
      While the description still contains a link and the text 'more
      information', apparently this one does not hit anymore, as lintian is
      telling us:
      
          I: xenstore-utils: unused-override
          description-possibly-contains-homepage
          https://wiki.xen.org/wiki/XenStore
          [usr/share/lintian/overrides/xenstore-utils:4]
      8e164eeb
    • Hans van Kranenburg's avatar
      d/xen-utils-V.lintian-overrides.vsn-in: drop binary-or-shlib-defines-rpath · 076aa162
      Hans van Kranenburg authored
      Apparently this check is now gone. What remains is an informational
      message that says the override is now unused:
      
          I: xen-utils-4.16: unused-override binary-or-shlib-defines-rpath
          usr/lib/xen-4.16/lib/python/xenfsimage.*.so
          /usr/lib/xen-4.16/lib/x86_64-linux-gnu
          [usr/share/lintian/overrides/xen-utils-4.16:12]
      076aa162
    • Hans van Kranenburg's avatar
      debian/*lintian-overrides*: move comments above overrides · ae001567
      Hans van Kranenburg authored
      The Lintian documentation tells us to put documentation for overrides
      above the override line itself.
      
      https://lintian.debian.org/manual/index.html#documenting-overrides
      ae001567
    • Hans van Kranenburg's avatar
      d/.../grub.d/xen.cfg: Redirect output when running grub-mkconfig · c2113190
      Hans van Kranenburg authored
      John E. Krokes noticed that the grub configuration fragment that we ship
      outputs text to stdout, which means it will end up being part of the
      generated grub configuration. This is wrong, and leads to error messages
      during boot like "error: can't find command `Including'."...
      
      Instead, output informational messages about progress to stderr (exactly
      like what happens with other messages such as "Generating grub
      configuration file ..." or "Found linux image: /boot/vmlinuz-[...]").
      
      For the more prominent message about changing GRUB_DEFAULT as a side
      effect, use the grub_warn helper instead.
      
      (Closes: #1016547)
      c2113190
    • Hans van Kranenburg's avatar
      Update changelog for new upstream 4.16.2 · df6136af
      Hans van Kranenburg authored
      [git-debrebase changelog: new upstream 4.16.2]
      df6136af
    • Hans van Kranenburg's avatar
      Update to upstream 4.16.2 · ad8f6145
      Hans van Kranenburg authored
      [git-debrebase anchor: new upstream 4.16.2, merge]
      ad8f6145
  2. 18 Aug, 2022 1 commit
  3. 15 Aug, 2022 4 commits