[PATCH] build: Don't use non-posix arguments for build without GNU coreutils
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jun 12 00:22:49 CEST 2024
Hi Zach,
Thank you for the patch.
On Thu, Jun 06, 2024 at 09:01:03AM -0400, Zach DeCook wrote:
> date will output a date like
> 2024-06-05T17:06:30EDT
Looks like posix doesn't define a %z :( I think this one is probably OK.
Kieran, any opinion ?
Where do the date and ln tools come from in your build environment ?
>
> (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)
Won't that cause issues if the directories are exported over NFS and
mounted on a different absolute path ? I think the point of the Python
links was to support cross-compiling on a host and running on a target
device with an NFS mount. Tomi, is this correct ?
> ---
> 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" ]
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list