From nobody Sat May 4 07:00:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605372977; cv=none; d=zohomail.com; s=zohoarc; b=jkz41rJzUyYxSjGcsugCVz/TXEAYDuwlCIrAlR+oiJD8o0uqMSbkgGafNulr0QlIiCGTxYGs1iGoXedN3g8Es8E45+GHfLel/SrN6efz3CcxyiFkanFYnKdMXZZSW4YhMDuaeYCOSUUjswCYtA7WjpSErS4cUvDM7FmfUf5z5jw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605372977; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=XxJfwnwqWSvlq369in7kd5hgSRPxWxlId9gtSc87U4E=; b=ZkVBZI+rwgAK43b0KeImIl9mkrPbozu586rzX9e2HRHGDtvSkskMFE6ftidMPp25wT4zJnFYFCQMd7S02Bo7S3O/s+7uS6mECysz3SSEYJYf7SWIyHE7E/Cp5l+ePXmSmVtvGQgoZnsLxpue4fV+O0NZnO/bv7BmYQCJTIAtbK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605372977065185.76227479484976; Sat, 14 Nov 2020 08:56:17 -0800 (PST) Received: from localhost ([::1]:34708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdyqV-0003Ug-UP for importer@patchew.org; Sat, 14 Nov 2020 11:56:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdymK-0008Rv-T8 for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kdymF-0000RP-BH for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595-FapTO5C0MumFo3RCDKKmpQ-1; Sat, 14 Nov 2020 11:51:48 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53A271006CB6; Sat, 14 Nov 2020 16:51:47 +0000 (UTC) Received: from thuth.com (ovpn-112-86.ams2.redhat.com [10.36.112.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 292455F7D8; Sat, 14 Nov 2020 16:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605372710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=XxJfwnwqWSvlq369in7kd5hgSRPxWxlId9gtSc87U4E=; b=DCrVMQJE+hnjZbosjSVbOEl3ePtWRMdI0gM5unUGLaFy0Vhs4RP6PioS8GgeTqhoTnB/iv ReuMYYaeK8eZ7oBscxc43teTvnvJSWZkIEzfl74FMKsOPEwZ3ouJ3GZXW7FO4rKYulfrtY 7KyVJ0UEiUQGM+h5jcy0rz5m27BxM5w= X-MC-Unique: FapTO5C0MumFo3RCDKKmpQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH 1/4] configure: Fix the _BSD_SOURCE define for the Haiku build Date: Sat, 14 Nov 2020 17:51:34 +0100 Message-Id: <20201114165137.15379-2-thuth@redhat.com> In-Reply-To: <20201114165137.15379-1-thuth@redhat.com> References: <20201114165137.15379-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:46:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alexander von Gluck IV , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David CARLIER , kraxel@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The Haiku VM that we are going to add is using _BSD_SOURCE instead of BSD_SOURCE (without initial underscore)... according to David Carlier, the BSD_SOURCE without underscore was likely a typo, so let's simply add the underscore there now. This fixes the build failure with the bswapXX() macros not being defined after including . Signed-off-by: Thomas Huth Reviewed-by: Stefan Berger (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160537280448759.764836226769944; Sat, 14 Nov 2020 08:53:24 -0800 (PST) Received: from localhost ([::1]:57620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdynj-0001GJ-AS for importer@patchew.org; Sat, 14 Nov 2020 11:53:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdymL-0008T2-UX for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kdymI-0000SH-RK for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:57 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-270-6iAbxEyYNrGxJdM3aoQ3sg-1; Sat, 14 Nov 2020 11:51:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C38168015A4; Sat, 14 Nov 2020 16:51:49 +0000 (UTC) Received: from thuth.com (ovpn-112-86.ams2.redhat.com [10.36.112.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0C026EF5A; Sat, 14 Nov 2020 16:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605372713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=bLAePTtGcecxV0gOEt66l+EqT1AGeqliPWsZztwFPGA=; b=GiDdVFhpVT7sX1TcPX01WLSJKexE0uKzVBpg74QbS0iWsyRM+GlfUZfQGQFoQQpzCT9+7H 23Q7z11znuKP8bIxY3al1w5IMIIHnnQFGk+yOMuEpSunsRQCz/Co8EXiwF6sxTQihsmnVW uO/SLC7GDiyQ8lL8ETTE50L0g7wIHlg= X-MC-Unique: 6iAbxEyYNrGxJdM3aoQ3sg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH 2/4] configure: Do not build pc-bios/optionrom on Haiku Date: Sat, 14 Nov 2020 17:51:35 +0100 Message-Id: <20201114165137.15379-3-thuth@redhat.com> In-Reply-To: <20201114165137.15379-1-thuth@redhat.com> References: <20201114165137.15379-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:51:48 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alexander von Gluck IV , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David CARLIER , kraxel@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Compilation of pc-bios/optionrom fails on Haiku with: BUILD pvh.img ld: pvh_main.o: in function `pvh_load_kernel': pc-bios/optionrom/pvh_main.c:73: undefined reference to `GLOBAL_OFFSET_TAB= LE_' Makefile:57: recipe for target 'pvh.img' failed make[1]: *** [pvh.img] Error 1 Let's simply disable it, like it is already done on macOS and Solaris. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index a273a93377..c0acda164d 100755 --- a/configure +++ b/configure @@ -5842,7 +5842,7 @@ fi roms=3D if { test "$cpu" =3D "i386" || test "$cpu" =3D "x86_64"; } && \ test "$targetos" !=3D "Darwin" && test "$targetos" !=3D "SunOS" &&= \ - test "$softmmu" =3D yes ; then + test "$targetos" !=3D "Haiku" && test "$softmmu" =3D yes ; then # Different host OS linkers have different ideas about the name of the= ELF # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the = _fbsd # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386p= e. --=20 2.18.4 From nobody Sat May 4 07:00:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605372808; cv=none; d=zohomail.com; s=zohoarc; b=k8nPR5JJfO2bcGnTpuQuKUNFXEo1cSIJjTLJldrBDbeDxSZsIeuHwbq0aqN8wCGJshvgc1oZv96hxjA64rKxV/XvsobMncezJXMvmOqV3QMnGxyttzUJvy8sI2/4Mjcy0HEMVTVeBnpsRpzv3ckqRXb+L3d82LOvSuMywFTd3lY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605372808; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=hKevCePf+YmCkBj6lSBZPWzUNkMXUtphyqhCqYAO7Hc=; b=gU9jZRmXP61qxTKfb5D5JVAXP/XZrDhxOwZX9kiX+8TKdCZBrIL7m+r6RW1yHSb3FfTEstFX0G4Bx75u0bT7awkncc30Ss32Np6OEPWeZ58Kc873Sriy84XC0mr/3kQAhL5FtpDfUjowxcgguA4EP6ckHvikPnDu1hkNXNJcqdw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605372808349297.580018016585; Sat, 14 Nov 2020 08:53:28 -0800 (PST) Received: from localhost ([::1]:57960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdynn-0001PX-6l for importer@patchew.org; Sat, 14 Nov 2020 11:53:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdymN-0008VC-F4 for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:35400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kdymL-0000TI-S9 for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:51:59 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-442-QouY9uCQOZ-6ZkHcD9fDdw-1; Sat, 14 Nov 2020 11:51:53 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 17A9D804006; Sat, 14 Nov 2020 16:51:52 +0000 (UTC) Received: from thuth.com (ovpn-112-86.ams2.redhat.com [10.36.112.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C63A5F7D8; Sat, 14 Nov 2020 16:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605372717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=hKevCePf+YmCkBj6lSBZPWzUNkMXUtphyqhCqYAO7Hc=; b=DaJ6UhvB9ebbW6HFXq3kOS+pBnXIb9i5mspK3maY9Hi8voDLIatySTk7RNAGMyZ+UPQFJK ZX+PqZiMU+nNEy8Me+w8KXlm7wcZTNAmLgcnxKszXJV2Mc0agSOR1hPZezqciC3HpRkxgu bzV6cjaKky6c0vfeWbpvkD4JgepIdik= X-MC-Unique: QouY9uCQOZ-6ZkHcD9fDdw-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h Date: Sat, 14 Nov 2020 17:51:36 +0100 Message-Id: <20201114165137.15379-4-thuth@redhat.com> In-Reply-To: <20201114165137.15379-1-thuth@redhat.com> References: <20201114165137.15379-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:51:48 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alexander von Gluck IV , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David CARLIER , kraxel@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" On Solaris and Haiku, the _IO() macros are defined in . Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku. Signed-off-by: Thomas Huth Reviewed-by: Stefan Berger --- backends/tpm/tpm_ioctl.h | 4 ++++ configure | 11 ++++++++++- nbd/nbd-internal.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/backends/tpm/tpm_ioctl.h b/backends/tpm/tpm_ioctl.h index f5f5c553a9..bd6c12cb86 100644 --- a/backends/tpm/tpm_ioctl.h +++ b/backends/tpm/tpm_ioctl.h @@ -12,6 +12,10 @@ #include #include =20 +#ifdef HAVE_SYS_IOCCOM_H +#include +#endif + /* * Every response from a command involving a TPM command execution must ho= ld * the ptm_res as the first element. diff --git a/configure b/configure index c0acda164d..764e903748 100755 --- a/configure +++ b/configure @@ -3123,6 +3123,13 @@ if check_include "sys/signal.h" ; then have_sys_signal_h=3Dyes fi =20 +######################################### +# sys/ioccom.h check +have_sys_ioccom_h=3Dno +if check_include "sys/ioccom.h" ; then + have_sys_ioccom_h=3Dyes +fi + ########################################## # VTE probe =20 @@ -6214,7 +6221,9 @@ fi if test "$have_sys_signal_h" =3D "yes" ; then echo "HAVE_SYS_SIGNAL_H=3Dy" >> $config_host_mak fi - +if test "$have_sys_ioccom_h" =3D "yes" ; then + echo "HAVE_SYS_IOCCOM_H=3Dy" >> $config_host_mak +fi # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr': # xfs headers will not try to redefine structs from linux headers diff --git a/nbd/nbd-internal.h b/nbd/nbd-internal.h index 60629ef160..1b2141ab4b 100644 --- a/nbd/nbd-internal.h +++ b/nbd/nbd-internal.h @@ -19,7 +19,7 @@ #ifndef _WIN32 #include #endif -#if defined(__sun__) || defined(__HAIKU__) +#ifdef HAVE_SYS_IOCCOM_H #include #endif =20 --=20 2.18.4 From nobody Sat May 4 07:00:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605372989; cv=none; d=zohomail.com; s=zohoarc; b=H3kGyIcIlCnx0CTnwpvlSG7BWbcPFfKLMYOJaKZdgEyLf/SVKR2zDWZE0SU/rF1tiAZ507e5jJqlA3Mn3BCluluZZ+fZ8RPc/Jsn2B33Zj8cLXULNbqzEA7wHf9BD/nbTfY/I0/NXm79Mi/6oBtlHTlBY5eoNoQyxzNGzai1zCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605372989; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WlDT1z6Ckvm/DhxLo75VjqH59FKXwR7HXrVvGS3X6s4=; b=OQivzKLOZo560bTG7v8dxslaOJuz7N/TEFAsDzYAMOcfh2xr5/1GN9HkQJUiFK7skLs+Qoj00mjLNji308+vCVQuT4XyxWxc/8NcFMs0oHmRfWiJdHByXxjYk6vDbNl7Cst4uX/mvSfRKHDcsrlMGVzJhcNPD6zasgujJW0/aYM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605372989967184.97198402814956; Sat, 14 Nov 2020 08:56:29 -0800 (PST) Received: from localhost ([::1]:35422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdyqi-0003pZ-I4 for importer@patchew.org; Sat, 14 Nov 2020 11:56:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdymV-0000KZ-1K for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:52:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kdymS-0000Vt-Ty for qemu-devel@nongnu.org; Sat, 14 Nov 2020 11:52:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-zxuwzWX0OXC7bMXQhRGQIQ-1; Sat, 14 Nov 2020 11:51:58 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F3DCA1842160; Sat, 14 Nov 2020 16:51:56 +0000 (UTC) Received: from thuth.com (ovpn-112-86.ams2.redhat.com [10.36.112.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F6845F7D8; Sat, 14 Nov 2020 16:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605372724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WlDT1z6Ckvm/DhxLo75VjqH59FKXwR7HXrVvGS3X6s4=; b=AB6DzovhvSJzGPzggiGdxzPYjryTVn0SK808yV4u0QYKdqm484LAbYfdpJUerogNx7U2Wz 9JMm4u26Jaiuni8+jD9hHaUewuTu49GAkGbhOr8lsk3N46M6x3gpj8nLWiEPb/ZNP0DTi3 1vEobtuu68h6M0jheJPZC5J1cfYApT4= X-MC-Unique: zxuwzWX0OXC7bMXQhRGQIQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH 4/4] tests/vm: Add Haiku test based on their vagrant images Date: Sat, 14 Nov 2020 17:51:37 +0100 Message-Id: <20201114165137.15379-5-thuth@redhat.com> In-Reply-To: <20201114165137.15379-1-thuth@redhat.com> References: <20201114165137.15379-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:46:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_BTC_ID=0.331, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alexander von Gluck IV , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David CARLIER , kraxel@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alexander von Gluck IV Signed-off-by: Alexander von Gluck IV [PMD: Avoid recreating the image each time] Signed-off-by: Philippe Mathieu-Daud=C3=A9 [thuth: Add ninja package, /usr/bin/env hack and --disable-slirp] Signed-off-by: Thomas Huth --- tests/keys/vagrant | 27 +++++++++ tests/keys/vagrant.pub | 1 + tests/vm/Makefile.include | 3 +- tests/vm/basevm.py | 5 +- tests/vm/haiku.x86_64 | 119 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 tests/keys/vagrant create mode 100644 tests/keys/vagrant.pub create mode 100755 tests/vm/haiku.x86_64 diff --git a/tests/keys/vagrant b/tests/keys/vagrant new file mode 100644 index 0000000000..7d6a083909 --- /dev/null +++ b/tests/keys/vagrant @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI +w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP +kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2 +hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO +Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW +yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd +ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1 +Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf +TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK +iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A +sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf +4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP +cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk +EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN +CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX +3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG +YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj +3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+ +dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz +6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC +P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF +llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ +kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH ++vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ +NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=3D +-----END RSA PRIVATE KEY----- diff --git a/tests/keys/vagrant.pub b/tests/keys/vagrant.pub new file mode 100644 index 0000000000..b8d012d787 --- /dev/null +++ b/tests/keys/vagrant.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4= TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPk= cmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUec= p4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdET= k1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c= 9WhQ=3D=3D well-known vagrant key for qemu-test, do not use on any machine = exposed to an external network diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 61f893ffdc..e94d95ec54 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -4,7 +4,7 @@ =20 EFI_AARCH64 =3D $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd) =20 -IMAGES :=3D freebsd netbsd openbsd centos fedora +IMAGES :=3D freebsd netbsd openbsd centos fedora haiku.x86_64 ifneq ($(GENISOIMAGE),) IMAGES +=3D ubuntu.i386 centos ifneq ($(EFI_AARCH64),) @@ -41,6 +41,7 @@ endif else @echo " (install genisoimage to build centos/ubuntu images)" endif + @echo " vm-build-haiku.x86_64 - Build QEMU in Haiku VM" @echo "" @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 3fac20e929..00f1d5ca8d 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -44,6 +44,7 @@ DEFAULT_CONFIG =3D { 'machine' : 'pc', 'guest_user' : "qemu", 'guest_pass' : "qemupass", + 'root_user' : "root", 'root_pass' : "qemupass", 'ssh_key_file' : SSH_KEY_FILE, 'ssh_pub_key_file': SSH_PUB_KEY_FILE, @@ -245,13 +246,13 @@ class BaseVM(object): return self._ssh_do(self._config["guest_user"], cmd, False) =20 def ssh_root(self, *cmd): - return self._ssh_do("root", cmd, False) + return self._ssh_do(self._config["root_user"], cmd, False) =20 def ssh_check(self, *cmd): self._ssh_do(self._config["guest_user"], cmd, True) =20 def ssh_root_check(self, *cmd): - self._ssh_do("root", cmd, True) + self._ssh_do(self._config["root_user"], cmd, True) =20 def build_image(self, img): raise NotImplementedError diff --git a/tests/vm/haiku.x86_64 b/tests/vm/haiku.x86_64 new file mode 100755 index 0000000000..37af48bf1b --- /dev/null +++ b/tests/vm/haiku.x86_64 @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +# +# Haiku VM image +# +# Copyright 2020 Haiku, Inc. +# +# Authors: +# Alexander von Gluck IV +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +import os +import re +import sys +import time +import socket +import subprocess +import basevm + +VAGRANT_KEY_FILE =3D os.path.join(os.path.dirname(__file__), + "..", "keys", "vagrant") + +VAGRANT_PUB_KEY_FILE =3D os.path.join(os.path.dirname(__file__), + "..", "keys", "vagrant.pub") + +HAIKU_CONFIG =3D { + 'cpu' : "max", + 'machine' : 'pc', + 'guest_user' : "vagrant", + 'guest_pass' : "", + 'root_user' : "vagrant", + 'root_pass' : "", + 'ssh_key_file' : VAGRANT_KEY_FILE, + 'ssh_pub_key_file': VAGRANT_PUB_KEY_FILE, + 'memory' : "4G", + 'extra_args' : [], + 'qemu_args' : "-device VGA", + 'dns' : "", + 'ssh_port' : 0, + 'install_cmds' : "", + 'boot_dev_type' : "block", + 'ssh_timeout' : 1, +} + +class HaikuVM(basevm.BaseVM): + name =3D "haiku" + arch =3D "x86_64" + + link =3D "https://app.vagrantup.com/haiku-os/boxes/r1beta2-x86_64/vers= ions/20200702/providers/libvirt.box" + csum =3D "41c38b316e0cbdbc66b5dbaf3612b866700a4f35807cb1eb266a5bf83e9e= 68d5" + + poweroff =3D "shutdown" + + requirements =3D [ + "devel:libbz2", + "devel:libcapstone", + "devel:libcurl", + "devel:libfdt", + "devel:libgcrypt", + "devel:libgl", + "devel:libglib_2.0", + "devel:libgnutls", + "devel:libgpg_error", + "devel:libintl", + "devel:libjpeg", + "devel:liblzo2", + "devel:libncursesw", + "devel:libnettle", + "devel:libpixman_1", + "devel:libpng16", + "devel:libsdl2_2.0", + "devel:libsnappy", + "devel:libssh2", + "devel:libtasn1", + "devel:libusb_1.0", + "devel:libz", + "ninja", + "setuptools_python3" + ] + + # https://dev.haiku-os.org/ticket/16512 virtio disk1 shows up as 0 (re= versed order) + BUILD_SCRIPT =3D """ + set -e; + rm -rf /tmp/qemu-test.* + cd $(mktemp -d /tmp/qemu-test.XXXXXX); + mkdir src build; cd src; + tar -xf /dev/disk/virtual/virtio_block/0/raw; + mkdir -p /usr/bin + ln -s /boot/system/bin/env /usr/bin/env + cd ../build + ../src/configure --disable-slirp {configure_opts}; + make --output-sync -j{jobs} {target} {verbose}; + """ + + def build_image(self, img): + self.print_step("Downloading disk image") + tarball =3D self._download_with_cache(self.link, sha256sum=3Dself.= csum) + + self.print_step("Extracting disk image") + + subprocess.check_call(["tar", "xzf", tarball, "./box.img", "-O"], + stdout=3Dopen(img, 'wb')) + + self.print_step("Preparing disk image") + self.boot(img) + + # Wait for ssh to be available. + self.wait_ssh(wait_root=3DTrue, cmd=3D"exit 0") + + # Install packages + self.ssh_root("pkgman install -y %s" % " ".join(self.requirements)) + self.graceful_shutdown() + + self.print_step("All done") + +if __name__ =3D=3D "__main__": + sys.exit(basevm.main(HaikuVM, config=3DHAIKU_CONFIG)) --=20 2.18.4