You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2021/11/16 05:25:46 UTC
[yetus] 01/01: add a postcheckout
This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch YETUS-1138
in repository https://gitbox.apache.org/repos/asf/yetus.git
commit 66803453bf56daea90ffaa67195f4f25355efba4
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Mon Nov 15 18:17:19 2021 -0800
add a postcheckout
---
hooks/post_checkout | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/hooks/post_checkout b/hooks/post_checkout
new file mode 100755
index 0000000..6f0987d
--- /dev/null
+++ b/hooks/post_checkout
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+echo 'Trying mount'
+mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
+
+echo 'if no /proc, try to add it'
+if [[ ! -f /proc/sys/fs/binfmt_misc/qemu-aarch64 ]]; then
+ apt-get update && apt-get install -y qemu-user-static
+ /etc/init.d/binfmt-support force-reload
+fi
+
+echo 'now what do we have'
+ls /proc/sys/fs/binfmt_misc
+
+echo 'check qemu'
+cat /proc/sys/fs/binfmt_misc/qemu-aarch64
+cat /proc/sys/fs/binfmt_misc/qemu-arm
+