[{"id":29851,"web_url":"https://patchwork.libcamera.org/comment/29851/","msgid":"<20240611222249.GA15006@pendragon.ideasonboard.com>","date":"2024-06-11T22:22:49","subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Zach,\n\nThank you for the patch.\n\nOn Thu, Jun 06, 2024 at 09:01:03AM -0400, Zach DeCook wrote:\n> date will output a date like\n> 2024-06-05T17:06:30EDT\n\nLooks like posix doesn't define a %z :( I think this one is probably OK.\nKieran, any opinion ?\n\nWhere do the date and ln tools come from in your build environment ?\n\n> \n> (time zone is different than currently specified)\n> \n> ln won't create a relative link\n> (not a big deal because the command gets reran each time)\n\nWon't that cause issues if the directories are exported over NFS and\nmounted on a different absolute path ? I think the point of the Python\nlinks was to support cross-compiling on a host and running on a target\ndevice with an NFS mount. Tomi, is this correct ?\n\n> ---\n> specifically tested in Alpine Linux, using busybox utils\n>  src/py/libcamera/meson.build | 4 ++--\n>  utils/gen-version.sh         | 2 +-\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index 4807ca7d..524d010c 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -98,11 +98,11 @@ pycamera = shared_module('_libcamera',\n>  # Create symlinks from the build dir to the source dir so that we can use the\n>  # Python module directly from the build dir.\n>  \n> -run_command('ln', '-fsrT', files('__init__.py'),\n> +run_command('ln', '-fs', files('__init__.py'),\n>              meson.current_build_dir() / '__init__.py',\n>              check : true)\n>  \n> -run_command('ln', '-fsrT', meson.current_source_dir() / 'utils',\n> +run_command('ln', '-fs', meson.current_source_dir() / 'utils',\n>              meson.current_build_dir() / 'utils',\n>              check : true)\n>  \n> diff --git a/utils/gen-version.sh b/utils/gen-version.sh\n> index e1f7ca7b..1b818e9e 100755\n> --- a/utils/gen-version.sh\n> +++ b/utils/gen-version.sh\n> @@ -42,7 +42,7 @@ if [ -z \"$build_dir\" ] || (echo \"$build_dir\" | grep -q \"$src_dir\")\n>  then\n>  \tgit update-index --refresh > /dev/null 2>&1\n>  fi\n> -git diff-index --quiet HEAD || version=\"$version-dirty ($(date --iso-8601=seconds))\"\n> +git diff-index --quiet HEAD || version=\"$version-dirty ($(date +%Y-%m-%dT%H:%M:%S%Z))\"\n>  \n>  # If a project version is provided, use it to replace the version number.\n>  if [ -n \"$project_version\" ]","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 72307BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Jun 2024 22:23:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7119065456;\n\tWed, 12 Jun 2024 00:23:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B58861A26\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 00:23:09 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E59B5230;\n\tWed, 12 Jun 2024 00:22:55 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"T6bbFrV6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718144576;\n\tbh=TrMLiFZbyVIRRFnk3HkPMwAoQMhkFYEBl5UYzHAJEOE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=T6bbFrV63kiiZRzy30wpBDOPWiDPp8TjS7NqB87H4PrNKOmDcAFl1tjiA+xqKW25c\n\tnsiXl07O7BPnIgnnf1reD+kR8DIvdJrfZso79hZ5li+0uPFRzl7r0maW1lv0TEb+tl\n\tIw5lN7NmrP5z7nTuJkGMcnr7IR+s4c3rADw7YLqs=","Date":"Wed, 12 Jun 2024 01:22:49 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Zach DeCook <zachdecook@librem.one>","Cc":"libcamera-devel@lists.libcamera.org,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tTomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","Message-ID":"<20240611222249.GA15006@pendragon.ideasonboard.com>","References":"<20240606130102.2660-2-zachdecook@librem.one>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240606130102.2660-2-zachdecook@librem.one>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29858,"web_url":"https://patchwork.libcamera.org/comment/29858/","msgid":"<0f873634-bbf1-4c4c-afba-8d1ca5781b96@ideasonboard.com>","date":"2024-06-12T05:54:57","subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 12/06/2024 01:22, Laurent Pinchart wrote:\n> Hi Zach,\n> \n> Thank you for the patch.\n> \n> On Thu, Jun 06, 2024 at 09:01:03AM -0400, Zach DeCook wrote:\n>> date will output a date like\n>> 2024-06-05T17:06:30EDT\n> \n> Looks like posix doesn't define a %z :( I think this one is probably OK.\n> Kieran, any opinion ?\n> \n> Where do the date and ln tools come from in your build environment ?\n> \n>>\n>> (time zone is different than currently specified)\n>>\n>> ln won't create a relative link\n>> (not a big deal because the command gets reran each time)\n> \n> Won't that cause issues if the directories are exported over NFS and\n> mounted on a different absolute path ? I think the point of the Python\n> links was to support cross-compiling on a host and running on a target\n> device with an NFS mount. Tomi, is this correct ?\n\nYes. Absolute links are not nice...\n\n  Tomi\n\n>> ---\n>> specifically tested in Alpine Linux, using busybox utils\n>>   src/py/libcamera/meson.build | 4 ++--\n>>   utils/gen-version.sh         | 2 +-\n>>   2 files changed, 3 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n>> index 4807ca7d..524d010c 100644\n>> --- a/src/py/libcamera/meson.build\n>> +++ b/src/py/libcamera/meson.build\n>> @@ -98,11 +98,11 @@ pycamera = shared_module('_libcamera',\n>>   # Create symlinks from the build dir to the source dir so that we can use the\n>>   # Python module directly from the build dir.\n>>   \n>> -run_command('ln', '-fsrT', files('__init__.py'),\n>> +run_command('ln', '-fs', files('__init__.py'),\n>>               meson.current_build_dir() / '__init__.py',\n>>               check : true)\n>>   \n>> -run_command('ln', '-fsrT', meson.current_source_dir() / 'utils',\n>> +run_command('ln', '-fs', meson.current_source_dir() / 'utils',\n>>               meson.current_build_dir() / 'utils',\n>>               check : true)\n>>   \n>> diff --git a/utils/gen-version.sh b/utils/gen-version.sh\n>> index e1f7ca7b..1b818e9e 100755\n>> --- a/utils/gen-version.sh\n>> +++ b/utils/gen-version.sh\n>> @@ -42,7 +42,7 @@ if [ -z \"$build_dir\" ] || (echo \"$build_dir\" | grep -q \"$src_dir\")\n>>   then\n>>   \tgit update-index --refresh > /dev/null 2>&1\n>>   fi\n>> -git diff-index --quiet HEAD || version=\"$version-dirty ($(date --iso-8601=seconds))\"\n>> +git diff-index --quiet HEAD || version=\"$version-dirty ($(date +%Y-%m-%dT%H:%M:%S%Z))\"\n>>   \n>>   # If a project version is provided, use it to replace the version number.\n>>   if [ -n \"$project_version\" ]\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 49C81C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Jun 2024 05:55:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 200B86545A;\n\tWed, 12 Jun 2024 07:55:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 955D161A1F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 07:55:01 +0200 (CEST)","from [192.168.88.20] (91-158-144-210.elisa-laajakaista.fi\n\t[91.158.144.210])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E663629A;\n\tWed, 12 Jun 2024 07:54:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"q7MNhwbn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718171688;\n\tbh=nt4ErVjyYIYTWlrNsrWKP7ugf/nWjicY7edqt30Ov08=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=q7MNhwbnFQ645327BNbRFuE+VUPZYyh7PZZXVNhaY6OzngL+qBE/vJC0pA1ShVB9O\n\t0nTJ45AfYveT59q2a1inFd1WyqFbFffTvwosd+lfZWLKuSjCP8wixl+OWemrEjVrpc\n\trDMebg4gvOHN+Zo9OxI43aXgZL/vSBkAWrpWvKTI=","Message-ID":"<0f873634-bbf1-4c4c-afba-8d1ca5781b96@ideasonboard.com>","Date":"Wed, 12 Jun 2024 08:54:57 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tZach DeCook <zachdecook@librem.one>","Cc":"libcamera-devel@lists.libcamera.org,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20240606130102.2660-2-zachdecook@librem.one>\n\t<20240611222249.GA15006@pendragon.ideasonboard.com>","From":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Content-Language":"en-US","Autocrypt":"addr=tomi.valkeinen@ideasonboard.com; keydata=\n\txsFNBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5ZfIi9Z4l+uUN4Zdw2\n\twCEZjx3o0Z34diXBaMRJ3rAk9yB90UJAnLtb8A97Oq64DskLF81GCYB2P1i0qrG7UjpASgCA\n\tRu0lVvxsWyIwSfoYoLrazbT1wkWRs8YBkkXQFfL7Mn3ZMoGPcpfwYH9O7bV1NslbmyJzRCMO\n\teYV258gjCcwYlrkyIratlHCek4Gr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IbDAAKCRD6PaqMvJYe\n\t9fA7EACS6exUedsBKmt4pT7nqXBcRsqm6YzT6DeCM8PWMTeaVGHiR4TnNFiT3otD5UpYQI7S\n\tsuYxoTdHrrrBzdlKe5rUWpzoZkVK6p0s9OIvGzLT0lrb0HC9iNDWT3JgpYDnk4Z2mFi6tTbq\n\txKMtpVFRA6FjviGDRsfkfoURZI51nf2RSAk/A8BEDDZ7lgJHskYoklSpwyrXhkp9FHGMaYII\n\tm9EKuUTX9JPDG2FTthCBrdsgWYPdJQvM+zscq09vFMQ9Fykbx5N8z/oFEUy3ACyPqW2oyfvU\n\tCH5WDpWBG0s5BALp1gBJPytIAd/pY/5ZdNoi0Cx3+Z7jaBFEyYJdWy1hGddpkgnMjyOfLI7B\n\tCFrdecTZbR5upjNSDvQ7RG85SnpYJTIin+SAUazAeA2nS6gTZzumgtdw8XmVXZwdBfF+ICof\n\t92UkbYcYNbzWO/GHgsNT1WnM4sa9lwCSWH8Fw1o/3bX1VVPEsnESOfxkNdu+gAF5S6+I6n3a\n\tueeIlwJl5CpT5l8RpoZXEOVtXYn8zzOJ7oGZYINRV9Pf8qKGLf3Dft7zKBP832I3PQjeok7F\n\tyjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw\n\t3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw==","In-Reply-To":"<20240611222249.GA15006@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29872,"web_url":"https://patchwork.libcamera.org/comment/29872/","msgid":"<171818529486.2248009.15165549002669372767@ping.linuxembedded.co.uk>","date":"2024-06-12T09:41:34","subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Tomi Valkeinen (2024-06-12 06:54:57)\n> On 12/06/2024 01:22, Laurent Pinchart wrote:\n> > Hi Zach,\n> > \n> > Thank you for the patch.\n> > \n> > On Thu, Jun 06, 2024 at 09:01:03AM -0400, Zach DeCook wrote:\n> >> date will output a date like\n> >> 2024-06-05T17:06:30EDT\n> > \n> > Looks like posix doesn't define a %z :( I think this one is probably OK.\n> > Kieran, any opinion ?\n> > \n> > Where do the date and ln tools come from in your build environment ?\n\nalpine+busybox seems to support %z (though not %:z which is a more exact\nmatch)\n\nkbingham@Monstersaurus:~$ run-in-docker alpine\nExecuting in alpine\n/home/kbingham # date +\"%Y-%m-%dT%H:%M:%S%:z\"\n2024-06-12T08:56:32\n/home/kbingham # busybox date +\"%Y-%m-%dT%H:%M:%S%:z\"\n2024-06-12T08:57:51\n/home/kbingham # busybox date +\"%Y-%m-%dT%H:%M:%S\"\n2024-06-12T08:58:01\n/home/kbingham # busybox date +\"%Y-%m-%dT%H:%M:%S%z\"\n2024-06-12T08:58:04+0000\n/home/kbingham # busybox date +\"%Y-%m-%dT%H:%M:%S%Z\"\n2024-06-12T08:58:08UTC\n\n\nSo if this is just about fixing/supporting alpine builds I'd go for the\n%z as it will sort better in the event the version string gets used to\nactually sort between two competing versions built at the same time but\nin different timezones ... but we're splitting hairs here so I don't\ncare ;-)\n\n\n\n> >> (time zone is different than currently specified)\n> >>\n> >> ln won't create a relative link\n> >> (not a big deal because the command gets reran each time)\n> > \n> > Won't that cause issues if the directories are exported over NFS and\n> > mounted on a different absolute path ? I think the point of the Python\n> > links was to support cross-compiling on a host and running on a target\n> > device with an NFS mount. Tomi, is this correct ?\n> \n> Yes. Absolute links are not nice...\n> \n>   Tomi\n> \n> >> ---\n> >> specifically tested in Alpine Linux, using busybox utils\n> >>   src/py/libcamera/meson.build | 4 ++--\n> >>   utils/gen-version.sh         | 2 +-\n> >>   2 files changed, 3 insertions(+), 3 deletions(-)\n> >>\n> >> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> >> index 4807ca7d..524d010c 100644\n> >> --- a/src/py/libcamera/meson.build\n> >> +++ b/src/py/libcamera/meson.build\n> >> @@ -98,11 +98,11 @@ pycamera = shared_module('_libcamera',\n> >>   # Create symlinks from the build dir to the source dir so that we can use the\n> >>   # Python module directly from the build dir.\n> >>   \n> >> -run_command('ln', '-fsrT', files('__init__.py'),\n> >> +run_command('ln', '-fs', files('__init__.py'),\n> >>               meson.current_build_dir() / '__init__.py',\n> >>               check : true)\n\nBusybox supports -T \"Treat LINK as a file, not DIR\" does that need to be\ndropped? (at least that sounds compatible against \"-T,\n--no-target-directory   treat LINK_NAME as a normal file always\")\n\nI do worry though that the 'benefit' of these symlinks is being\ncompletley lost if the relative paths aren't maintained though.\n\nSeems like it would negate the whole point of the symlink being there at\nall maybe if it couldn't actually be used by the implementor...\n\nSo if this patch was split, I'd be happy to merge the date fix already -\nbut the symlink issue sounds like it needs more investigation?\n\nPresumably we'll have to have a fallback command or have the command not\nrun at all - as the case we're trying to fix here probably aren't going\nto run the python scripts locally in the build... which is what I\nbelieve this symlink supports.\n\nSo probably better to make the link conditional on only creating it if\nit's possible.\n\n\n\n> >>   \n> >> -run_command('ln', '-fsrT', meson.current_source_dir() / 'utils',\n> >> +run_command('ln', '-fs', meson.current_source_dir() / 'utils',\n> >>               meson.current_build_dir() / 'utils',\n> >>               check : true)\n> >>   \n> >> diff --git a/utils/gen-version.sh b/utils/gen-version.sh\n> >> index e1f7ca7b..1b818e9e 100755\n> >> --- a/utils/gen-version.sh\n> >> +++ b/utils/gen-version.sh\n> >> @@ -42,7 +42,7 @@ if [ -z \"$build_dir\" ] || (echo \"$build_dir\" | grep -q \"$src_dir\")\n> >>   then\n> >>      git update-index --refresh > /dev/null 2>&1\n> >>   fi\n> >> -git diff-index --quiet HEAD || version=\"$version-dirty ($(date --iso-8601=seconds))\"\n> >> +git diff-index --quiet HEAD || version=\"$version-dirty ($(date +%Y-%m-%dT%H:%M:%S%Z))\"\n> >>   \n> >>   # If a project version is provided, use it to replace the version number.\n> >>   if [ -n \"$project_version\" ]\n> > \n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 51763BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Jun 2024 09:41:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6AA6F65467;\n\tWed, 12 Jun 2024 11:41:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 210CD6545A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 11:41:37 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DAF2F230;\n\tWed, 12 Jun 2024 11:41:23 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"c1MZA3Hh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718185284;\n\tbh=fLdh5YUiaYvXOiAgXavX7cYXmAtK59WgXyU9e9Z7xmk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=c1MZA3HhsqrMSs0QT5a1LtxH087zNMVQi24E3y3Tze6t+5XyvFB+pQwOoqC63fzPM\n\t0NISuN05gpiK0BCKRyrrmcHEAWXHO6jHfbRXnx9GywZZW99038xNlj7tdQ9XkAHPZ/\n\tyVSajtWF2/kMfQ9UEhR/p/6LVngZdpo5R1Z2fME8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<0f873634-bbf1-4c4c-afba-8d1ca5781b96@ideasonboard.com>","References":"<20240606130102.2660-2-zachdecook@librem.one>\n\t<20240611222249.GA15006@pendragon.ideasonboard.com>\n\t<0f873634-bbf1-4c4c-afba-8d1ca5781b96@ideasonboard.com>","Subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tTomi Valkeinen <tomi.valkeinen@ideasonboard.com>,\n\tZach DeCook <zachdecook@librem.one>","Date":"Wed, 12 Jun 2024 10:41:34 +0100","Message-ID":"<171818529486.2248009.15165549002669372767@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29956,"web_url":"https://patchwork.libcamera.org/comment/29956/","msgid":"<D20U3RMNZOAR.ZOKRB6JDBIV0@librem.one>","date":"2024-06-15T19:23:15","subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","submitter":{"id":199,"url":"https://patchwork.libcamera.org/api/people/199/","name":"Zach DeCook","email":"zachdecook@librem.one"},"content":"On Wed Jun 12, 2024 at 5:41 AM EDT, Kieran Bingham wrote:\n> So if this is just about fixing/supporting alpine builds I'd go for the\n> %z as it will sort better in the event the version string gets used to\n> actually sort between two competing versions built at the same time but\n> in different timezones ... but we're splitting hairs here so I don't\n> care ;-)\n\nI was just thinking possibly to reduce the patches needed by any others (otherwise, busybox has `date -Iseconds`, but at that point patching busybox to support the longer arg name would seem more logical).\n\n> Quoting Tomi Valkeinen (2024-06-12 06:54:57)\n> > Yes. Absolute links are not nice...\n> > \n> >   Tomi\n\nI brought back relative links in v2 using meson's fs.relative_to command.\n\n\n> Busybox supports -T \"Treat LINK as a file, not DIR\" does that need to be\n> dropped? (at least that sounds compatible against \"-T,\n> --no-target-directory   treat LINK_NAME as a normal file always\")\n\nI kept this (where needed) in V2\n>\n> I do worry though that the 'benefit' of these symlinks is being\n> completley lost if the relative paths aren't maintained though.\n>\n> Seems like it would negate the whole point of the symlink being there at\n> all maybe if it couldn't actually be used by the implementor...\n\n> So if this patch was split, I'd be happy to merge the date fix already\nV2 comes with two commits.","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 36DF7BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 15 Jun 2024 19:23:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 025AB6548D;\n\tSat, 15 Jun 2024 21:23:23 +0200 (CEST)","from mx1.librem.one (mx1.librem.one [138.201.176.93])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8BEA65458\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 15 Jun 2024 21:23:20 +0200 (CEST)","from smtp.librem.one (unknown [192.241.214.14])\n\tby mx1.librem.one (Postfix) with ESMTPS id 7EC1481E83;\n\tSat, 15 Jun 2024 12:23:19 -0700 (PDT)"],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=librem.one header.i=@librem.one\n\theader.b=\"Fv92f2Yl\"; dkim-atps=neutral","name mx1.librem.one;\n\tdmarc=fail (p=reject dis=none) header.from=librem.one"],"Content-Transfer-Encoding":"quoted-printable","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=librem.one; s=smtp;\n\tt=1718479397; bh=FJvKiCJagjfJmS0CLcpbTDxiFvGxrYZ8IGrNwaYagDo=;\n\th=Date:Cc:Subject:From:To:References:In-Reply-To:From;\n\tb=Fv92f2Yl5gX6m2eOuXpHYIctSgFnl1MBj0tnb0J3N2kAYuskUfN8flQ61xNbkSCk8\n\tAy5SLPDPJ7Bwp7nZFy58eFHsx6fm6/muP8LfuzrERIbvG7Ex1P/nQfctNVmpyiKCpe\n\trOOjrn/kTwbz0Z/vnhEYDFoDyaUjMju1unQx7JmYxKHprxR+wFtw9JLtzOcBssvZbR\n\tFJX5glX8typHwumss1pM9dCRPZiiCnxLp4QkYO+A0fK6qT2jffIGHArYVtuHmZkqtX\n\tLRq0nlm77D7QlPu9RFviiR4Bn1ZDFzjE+FKfnhhtzo8sbjq8M+WuLAuBVOObMKlPh0\n\t2Zem6F4Ntv41g==","Content-Type":"text/plain; charset=UTF-8","Date":"Sat, 15 Jun 2024 15:23:15 -0400","Message-Id":"<D20U3RMNZOAR.ZOKRB6JDBIV0@librem.one>","Cc":"<libcamera-devel@lists.libcamera.org>","Subject":"Re: [PATCH] build: Don't use non-posix arguments for build without\n\tGNU coreutils","From":"\"Zach DeCook\" <zachdecook@librem.one>","To":"\"Kieran Bingham\" <kieran.bingham@ideasonboard.com>, \"Laurent Pinchart\"\n\t<laurent.pinchart@ideasonboard.com>, \"Tomi Valkeinen\"\n\t<tomi.valkeinen@ideasonboard.com>","References":"<20240606130102.2660-2-zachdecook@librem.one>\n\t<20240611222249.GA15006@pendragon.ideasonboard.com>\n\t<0f873634-bbf1-4c4c-afba-8d1ca5781b96@ideasonboard.com>\n\t<171818529486.2248009.15165549002669372767@ping.linuxembedded.co.uk>","In-Reply-To":"<171818529486.2248009.15165549002669372767@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]