From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=S5grsD3D; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 53E8C5A062D for ; Fri, 21 Feb 2025 12:53:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740138799; 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; bh=vWASb2bJu5UxvvV0Jq3UWjnBibrxNbolCFPg78CM5is=; b=S5grsD3DzkubkMbPsjHugr+ZkFZzNJ+Sn6NstI2W5CnorXCTILIr+BLtMS5S4dAJfcCvex hE7042ZQQoa1bFqoGPVlQTbDToWGoL43zB+V1Wnu/pKdpmw0z+aZz1y1xaRTxaS2kKeadh ku8SI4rvAaRb4PG7ODwphfF8ONeQNFQ= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-286-XwIQu4suO_WnIsOZtZ5raQ-1; Fri, 21 Feb 2025 06:53:17 -0500 X-MC-Unique: XwIQu4suO_WnIsOZtZ5raQ-1 X-Mimecast-MFC-AGG-ID: XwIQu4suO_WnIsOZtZ5raQ_1740138796 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BDEA118004A7 for ; Fri, 21 Feb 2025 11:53:16 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CF63519412A3; Fri, 21 Feb 2025 11:53:15 +0000 (UTC) From: Michal Privoznik To: passt-dev@passt.top Subject: [PATCH] seccomp.sh: Silence stty errors Date: Fri, 21 Feb 2025 12:53:13 +0100 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WCNjIWUxaoFLGdzImqVbJJbzEFfDpBj7oITnlUVw88I_1740138796 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 4AHTQGFKDQCLCSKVJ64YT3OIQG2S5GI2 X-Message-ID-Hash: 4AHTQGFKDQCLCSKVJ64YT3OIQG2S5GI2 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: When printing list of allowed syscalls the width of terminal is obtained for nicer output (see commit below). The width is obtained by running 'stty'. While this works when building from a console, it doesn't work during rpmbuild/emerge/.. as stdout is usually not a console but a logfile and stdin is usually /dev/null or something. This results in stty reporting errors like this: stty: 'standard input': Inappropriate ioctl for device Redirect stty's stderr to /dev/null to silence it. Fixes: 712ca3235329b049bf9a4e481ba38a4c64768e8b Signed-off-by: Michal Privoznik --- I've noticed the error when running emerge on my local system, but then also found it on a recent koji build: https://kojipkgs.fedoraproject.org//packages/passt/0%5E20250217.ga1e48a0/2.fc41/data/logs/x86_64/build.log seccomp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seccomp.sh b/seccomp.sh index 4c521ae..a7bc417 100755 --- a/seccomp.sh +++ b/seccomp.sh @@ -255,7 +255,7 @@ for __p in ${__profiles}; do __calls="${__calls} ${EXTRA_SYSCALLS:-}" __calls="$(filter ${__calls})" - cols="$(stty -a | sed -n 's/.*columns \([0-9]*\).*/\1/p' || :)" 2>/dev/null + cols="$(stty -a 2>/dev/null | sed -n 's/.*columns \([0-9]*\).*/\1/p' || :)" 2>/dev/null case $cols in [0-9]*) col_args="-w ${cols}";; *) col_args="";; esac echo "seccomp profile ${__p} allows: ${__calls}" | tr '\n' ' ' | fmt -t ${col_args} -- 2.45.3