120 lines
4.0 KiB
Diff
120 lines
4.0 KiB
Diff
From b603dd04190ff1c7c71b04c135474859ccacd136 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Thu, 26 Mar 2026 13:02:45 +0000
|
|
Subject: [PATCH] common: update submodule
|
|
|
|
Cole Robinson (1):
|
|
Add update-submodule.sh
|
|
|
|
Richard W.M. Jones (3):
|
|
mlutils/unix_utils-c.c: Include "guestfs-utils.h"
|
|
mlcustomize: Remove fictitious "vista" virtio-win directory
|
|
mlcustomize: Use 2k8 drivers for Windows Vista and 2008 Server R1
|
|
|
|
(cherry picked from commit 6b8eb0742dab07ce0c90e0aa855f9ba85df89fb0)
|
|
---
|
|
Makefile.am | 1 +
|
|
common | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 7be3c1496..87cf2cdc7 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -92,6 +92,7 @@ EXTRA_DIST = \
|
|
check-mli.sh \
|
|
common/.gitignore \
|
|
common/README \
|
|
+ common/update-submodule.sh \
|
|
lib/guestfs-internal-all.h \
|
|
m4/.gitignore \
|
|
podcheck.pl \
|
|
Submodule common c8e64b3ff..0948fc94a:
|
|
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
|
|
index a29380806..ce24332ff 100644
|
|
--- a/common/mlcustomize/inject_virtio_win.ml
|
|
+++ b/common/mlcustomize/inject_virtio_win.ml
|
|
@@ -468,10 +468,8 @@ and virtio_iso_path_matches_guest_os t path =
|
|
((=) "winxp")
|
|
else if pathelem "2k3" then
|
|
(function "win2k3" | "win2k3r2" -> true | _ -> false)
|
|
- else if pathelem "vista" then
|
|
- ((=) "winvista")
|
|
else if pathelem "2k8" then
|
|
- ((=) "win2k8")
|
|
+ (function "win2k8" | "winvista" -> true | _ -> false)
|
|
else if pathelem "w7" then
|
|
((=) "win7")
|
|
else if pathelem "2k8r2" then
|
|
diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c
|
|
index 28df2c310..919f52602 100644
|
|
--- a/common/mlutils/unix_utils-c.c
|
|
+++ b/common/mlutils/unix_utils-c.c
|
|
@@ -65,6 +65,8 @@
|
|
#include <caml/mlvalues.h>
|
|
#include <caml/unixsupport.h>
|
|
|
|
+#include "guestfs-utils.h"
|
|
+
|
|
extern value guestfs_int_mllib_dev_t_makedev (value majv, value minv);
|
|
extern value guestfs_int_mllib_dev_t_major (value devv);
|
|
extern value guestfs_int_mllib_dev_t_minor (value devv);
|
|
diff --git a/common/update-submodule.sh b/common/update-submodule.sh
|
|
new file mode 100755
|
|
index 000000000..ecf22f166
|
|
--- /dev/null
|
|
+++ b/common/update-submodule.sh
|
|
@@ -0,0 +1,52 @@
|
|
+#!/bin/bash
|
|
+# (C) Copyright 2026 Red Hat Inc.
|
|
+#
|
|
+# This program is free software; you can redistribute it and/or modify
|
|
+# it under the terms of the GNU General Public License as published by
|
|
+# the Free Software Foundation; either version 2 of the License, or
|
|
+# (at your option) any later version.
|
|
+#
|
|
+# This program is distributed in the hope that it will be useful,
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+# GNU General Public License for more details.
|
|
+#
|
|
+# You should have received a copy of the GNU General Public License
|
|
+# along with this program; if not, write to the Free Software
|
|
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
+
|
|
+# Generate a submodule update commit, with formatted shortlog output.
|
|
+# Run this from the parent repo like: ./common/update-submodule.sh
|
|
+# Then `git commit --amend ...` as desired.
|
|
+
|
|
+set -euo pipefail
|
|
+
|
|
+if ! git submodule status common &>/dev/null; then
|
|
+ echo "Error: this script must be run from the top directory of a repo with a 'common/' submodule" >&2
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+if ! git diff --quiet --exit-code; then
|
|
+ echo "Error: working tree has uncommitted changes" >&2
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+echo "Running: git submodule update --remote common"
|
|
+git submodule update --remote common
|
|
+
|
|
+if git diff --quiet --exit-code; then
|
|
+ echo "'common' submodule already up to date"
|
|
+ exit 0
|
|
+fi
|
|
+
|
|
+OLD_COMMIT=$(git ls-tree HEAD common | awk '{print $3}')
|
|
+NEW_COMMIT=$(git -C common rev-parse HEAD)
|
|
+echo "Old 'common' commit: $OLD_COMMIT"
|
|
+echo "New 'common' commit: $NEW_COMMIT"
|
|
+
|
|
+SHORTLOG=$(git -C common shortlog --no-merges "${OLD_COMMIT}..${NEW_COMMIT}" | sed '/^$/!s/^/ /')
|
|
+git commit -F - common <<EOF
|
|
+common: update submodule
|
|
+
|
|
+$SHORTLOG
|
|
+EOF
|