From patchwork Thu Jun 6 13:01:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zach DeCook X-Patchwork-Id: 20222 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 298E7C31E9 for ; Thu, 6 Jun 2024 13:09:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 35FA8634CA; Thu, 6 Jun 2024 15:09:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=librem.one header.i=@librem.one header.b="qFyKrPUX"; dkim-atps=neutral Received: from mx1.librem.one (mx1.librem.one [138.201.176.93]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C5B2634CA for ; Thu, 6 Jun 2024 15:03:51 +0200 (CEST) Received: from smtp.librem.one (unknown [192.241.214.14]) by mx1.librem.one (Postfix) with ESMTPS id A727081ED3 for ; Thu, 6 Jun 2024 06:03:49 -0700 (PDT) Authentication-Results: name mx1.librem.one; dmarc=fail (p=reject dis=none) header.from=librem.one From: Zach DeCook DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=librem.one; s=smtp; t=1717679028; bh=HcmfdMly2cdJFp5u4WY/SfSirzPb8k2dFNINbYxrfjA=; h=From:To:Cc:Subject:Date:From; b=qFyKrPUXht0mM7+61m5cp8X1OkUKNicqSwYm13lNrVFEafLBZ1ALzQTNCIjrS0FlP hsQteDE7oG67A85NSDLhyEhcdRzYP4gVupwF8IyOcPTKJy33wnp3C7Q5gqHxNCYLcf 1r+/IQDA2BLz2PHWFF5ig7sTuNxhx/M+kH6Xr3IMoi7/ura30Fvsy55FSDUu391TG+ zpF7goDO3Ivbdr9MQ1cMkFu3hsqeGcS9OIiD//D++tIM8DbPhS7V9sKgXgXjR2J39I iNmgQl1jt6ragZYr+qj2bkh41E1CmNUFOhAKWia8ywBPczJTHJLmVvVRsRHcZYVSrV p7BuSbL84gODg== To: libcamera-devel@lists.libcamera.org Cc: Zach DeCook Subject: [PATCH] build: Don't use non-posix arguments for build without GNU coreutils Date: Thu, 6 Jun 2024 09:01:03 -0400 Message-ID: <20240606130102.2660-2-zachdecook@librem.one> X-Mailman-Approved-At: Thu, 06 Jun 2024 15:09:08 +0200 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" date will output a date like 2024-06-05T17:06:30EDT (time zone is different than currently specified) ln won't create a relative link (not a big deal because the command gets reran each time) --- specifically tested in Alpine Linux, using busybox utils src/py/libcamera/meson.build | 4 ++-- utils/gen-version.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index 4807ca7d..524d010c 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -98,11 +98,11 @@ pycamera = shared_module('_libcamera', # Create symlinks from the build dir to the source dir so that we can use the # Python module directly from the build dir. -run_command('ln', '-fsrT', files('__init__.py'), +run_command('ln', '-fs', files('__init__.py'), meson.current_build_dir() / '__init__.py', check : true) -run_command('ln', '-fsrT', meson.current_source_dir() / 'utils', +run_command('ln', '-fs', meson.current_source_dir() / 'utils', meson.current_build_dir() / 'utils', check : true) diff --git a/utils/gen-version.sh b/utils/gen-version.sh index e1f7ca7b..1b818e9e 100755 --- a/utils/gen-version.sh +++ b/utils/gen-version.sh @@ -42,7 +42,7 @@ if [ -z "$build_dir" ] || (echo "$build_dir" | grep -q "$src_dir") then git update-index --refresh > /dev/null 2>&1 fi -git diff-index --quiet HEAD || version="$version-dirty ($(date --iso-8601=seconds))" +git diff-index --quiet HEAD || version="$version-dirty ($(date +%Y-%m-%dT%H:%M:%S%Z))" # If a project version is provided, use it to replace the version number. if [ -n "$project_version" ]