Message ID | 20250205-jag-bringup_fixes-v2-1-48f70c0d0a08@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] bringup: Use full path when creating custom_source file | expand |
On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: > Avoid "file not found" failures related to relative paths in > custom_source > > Signed-off-by: Joel Granados <joel.granados@kernel.org> Looks good. Thanks for checking! Reviewed-by: Daniel Gomez <da.gomez@samsung.com> > --- > After discussion in the list there is only one patch remaining. I have > dropped the ones that were "shot down" and kept the one that makes sure > we use full paths instead of relative; which seems to be a good idea. > > Changes in v2: > - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path > when creating custom_source file", because some have already gone into > mainline and some other were "shot down" > - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org > --- > > --- > scripts/bringup_guestfs.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh > index 74eecea..2c41999 100755 > --- a/scripts/bringup_guestfs.sh > +++ b/scripts/bringup_guestfs.sh > @@ -110,7 +110,7 @@ build_custom_image() > CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" > CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" > CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" > - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" > + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" > > mkdir -p ${CUSTOM_IMAGE_DIR} > > > --- > base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 > change-id: 20241217-jag-bringup_fixes-24ef1bc4211a > > Best regards, > -- > Joel Granados <joel.granados@kernel.org> > >
On Wed, Feb 05, 2025 at 11:18:54AM +0100, Daniel Gomez wrote: > On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: > > Avoid "file not found" failures related to relative paths in > > custom_source > > > > Signed-off-by: Joel Granados <joel.granados@kernel.org> > > Looks good. Thanks for checking! > > Reviewed-by: Daniel Gomez <da.gomez@samsung.com> Applied, thanks! > > > --- > > After discussion in the list there is only one patch remaining. I have > > dropped the ones that were "shot down" and kept the one that makes sure > > we use full paths instead of relative; which seems to be a good idea. > > > > Changes in v2: > > - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path > > when creating custom_source file", because some have already gone into > > mainline and some other were "shot down" > > - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org > > --- > > > > --- > > scripts/bringup_guestfs.sh | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh > > index 74eecea..2c41999 100755 > > --- a/scripts/bringup_guestfs.sh > > +++ b/scripts/bringup_guestfs.sh > > @@ -110,7 +110,7 @@ build_custom_image() > > CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" > > CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" > > CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" > > - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" > > + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" > > > > mkdir -p ${CUSTOM_IMAGE_DIR} > > > > > > --- > > base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 > > change-id: 20241217-jag-bringup_fixes-24ef1bc4211a > > > > Best regards, > > -- > > Joel Granados <joel.granados@kernel.org> > > > >
On 2/8/25 7:24 AM, Daniel Gomez wrote: > On Wed, Feb 05, 2025 at 11:18:54AM +0100, Daniel Gomez wrote: >> On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: >>> Avoid "file not found" failures related to relative paths in >>> custom_source >>> >>> Signed-off-by: Joel Granados <joel.granados@kernel.org> >> >> Looks good. Thanks for checking! >> >> Reviewed-by: Daniel Gomez <da.gomez@samsung.com> > > Applied, thanks! > > >> >>> --- >>> After discussion in the list there is only one patch remaining. I have >>> dropped the ones that were "shot down" and kept the one that makes sure >>> we use full paths instead of relative; which seems to be a good idea. >>> >>> Changes in v2: >>> - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path >>> when creating custom_source file", because some have already gone into >>> mainline and some other were "shot down" >>> - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org >>> --- >>> >>> --- >>> scripts/bringup_guestfs.sh | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh >>> index 74eecea..2c41999 100755 >>> --- a/scripts/bringup_guestfs.sh >>> +++ b/scripts/bringup_guestfs.sh >>> @@ -110,7 +110,7 @@ build_custom_image() >>> CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" >>> CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" >>> CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" >>> - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" >>> + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" My understanding is that 'realpath' is not available on every distribution...? Daniel, Luis, if this usage is OK, I'd like to use 'realpath' in one or two other spots. >>> mkdir -p ${CUSTOM_IMAGE_DIR} >>> >>> >>> --- >>> base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 >>> change-id: 20241217-jag-bringup_fixes-24ef1bc4211a >>> >>> Best regards, >>> -- >>> Joel Granados <joel.granados@kernel.org> >>> >>> >
On Sat, Feb 08, 2025 at 10:55:12AM +0100, Chuck Lever wrote: > On 2/8/25 7:24 AM, Daniel Gomez wrote: > > On Wed, Feb 05, 2025 at 11:18:54AM +0100, Daniel Gomez wrote: > >> On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: > >>> Avoid "file not found" failures related to relative paths in > >>> custom_source > >>> > >>> Signed-off-by: Joel Granados <joel.granados@kernel.org> > >> > >> Looks good. Thanks for checking! > >> > >> Reviewed-by: Daniel Gomez <da.gomez@samsung.com> > > > > Applied, thanks! > > > > > >> > >>> --- > >>> After discussion in the list there is only one patch remaining. I have > >>> dropped the ones that were "shot down" and kept the one that makes sure > >>> we use full paths instead of relative; which seems to be a good idea. > >>> > >>> Changes in v2: > >>> - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path > >>> when creating custom_source file", because some have already gone into > >>> mainline and some other were "shot down" > >>> - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org > >>> --- > >>> > >>> --- > >>> scripts/bringup_guestfs.sh | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh > >>> index 74eecea..2c41999 100755 > >>> --- a/scripts/bringup_guestfs.sh > >>> +++ b/scripts/bringup_guestfs.sh > >>> @@ -110,7 +110,7 @@ build_custom_image() > >>> CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" > >>> CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" > >>> CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" > >>> - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" > >>> + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" > > My understanding is that 'realpath' is not available on every > distribution...? Daniel, Luis, if this usage is OK, I'd like to use > 'realpath' in one or two other spots. realpath is included coreutils, and it seems to be available on all supported host distros. My quick check: + podman run --rm -it debian:latest bash -c 'dpkg -L coreutils | grep realpath' /usr/bin/realpath /usr/share/man/man1/realpath.1.gz + podman run --rm -it fedora:latest bash -c 'rpm -ql coreutils | grep realpath' /usr/bin/realpath + podman run --rm -it opensuse/tumbleweed bash -c 'rpm -ql coreutils | grep realpath' /usr/bin/realpath + podman run --rm -it ubuntu:latest bash -c 'dpkg -L coreutils | grep realpath' /usr/bin/realpath /usr/share/man/man1/realpath.1.gz I'm curious, which distros are not shipping realpath? > > > >>> mkdir -p ${CUSTOM_IMAGE_DIR} > >>> > >>> > >>> --- > >>> base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 > >>> change-id: 20241217-jag-bringup_fixes-24ef1bc4211a > >>> > >>> Best regards, > >>> -- > >>> Joel Granados <joel.granados@kernel.org> > >>> > >>> > > > > > -- > Chuck Lever
On 2/8/25 2:31 PM, Daniel Gomez wrote: > On Sat, Feb 08, 2025 at 10:55:12AM +0100, Chuck Lever wrote: >> On 2/8/25 7:24 AM, Daniel Gomez wrote: >>> On Wed, Feb 05, 2025 at 11:18:54AM +0100, Daniel Gomez wrote: >>>> On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: >>>>> Avoid "file not found" failures related to relative paths in >>>>> custom_source >>>>> >>>>> Signed-off-by: Joel Granados <joel.granados@kernel.org> >>>> >>>> Looks good. Thanks for checking! >>>> >>>> Reviewed-by: Daniel Gomez <da.gomez@samsung.com> >>> >>> Applied, thanks! >>> >>> >>>> >>>>> --- >>>>> After discussion in the list there is only one patch remaining. I have >>>>> dropped the ones that were "shot down" and kept the one that makes sure >>>>> we use full paths instead of relative; which seems to be a good idea. >>>>> >>>>> Changes in v2: >>>>> - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path >>>>> when creating custom_source file", because some have already gone into >>>>> mainline and some other were "shot down" >>>>> - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org >>>>> --- >>>>> >>>>> --- >>>>> scripts/bringup_guestfs.sh | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh >>>>> index 74eecea..2c41999 100755 >>>>> --- a/scripts/bringup_guestfs.sh >>>>> +++ b/scripts/bringup_guestfs.sh >>>>> @@ -110,7 +110,7 @@ build_custom_image() >>>>> CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" >>>>> CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" >>>>> CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" >>>>> - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" >>>>> + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" >> >> My understanding is that 'realpath' is not available on every >> distribution...? Daniel, Luis, if this usage is OK, I'd like to use >> 'realpath' in one or two other spots. > > realpath is included coreutils, and it seems to be available on all supported > host distros. My quick check: > > + podman run --rm -it debian:latest bash -c 'dpkg -L coreutils | grep realpath' > /usr/bin/realpath > /usr/share/man/man1/realpath.1.gz > + podman run --rm -it fedora:latest bash -c 'rpm -ql coreutils | grep realpath' > /usr/bin/realpath > + podman run --rm -it opensuse/tumbleweed bash -c 'rpm -ql coreutils | grep realpath' > /usr/bin/realpath > + podman run --rm -it ubuntu:latest bash -c 'dpkg -L coreutils | grep realpath' > /usr/bin/realpath > /usr/share/man/man1/realpath.1.gz > > I'm curious, which distros are not shipping realpath? While looking at basename/dirname last week, I found articles such as this one: https://superuser.com/questions/771104/usr-bin-realpath-not-found-in-centos-6-5 But I see that the submission date on that article is a decade ago. If we believe realpath is available on every recent distro we care to run kdevops on, then there is no good reason to avoid using it. >>>>> mkdir -p ${CUSTOM_IMAGE_DIR} >>>>> >>>>> >>>>> --- >>>>> base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 >>>>> change-id: 20241217-jag-bringup_fixes-24ef1bc4211a >>>>> >>>>> Best regards, >>>>> -- >>>>> Joel Granados <joel.granados@kernel.org> >>>>> >>>>> >>> >> >> >> -- >> Chuck Lever
On Sat, Feb 08, 2025 at 03:58:28PM +0100, Chuck Lever wrote: > On 2/8/25 2:31 PM, Daniel Gomez wrote: > > On Sat, Feb 08, 2025 at 10:55:12AM +0100, Chuck Lever wrote: > >> On 2/8/25 7:24 AM, Daniel Gomez wrote: > >>> On Wed, Feb 05, 2025 at 11:18:54AM +0100, Daniel Gomez wrote: > >>>> On Wed, Feb 05, 2025 at 09:50:51AM +0100, Joel Granados wrote: > >>>>> Avoid "file not found" failures related to relative paths in > >>>>> custom_source > >>>>> > >>>>> Signed-off-by: Joel Granados <joel.granados@kernel.org> > >>>> > >>>> Looks good. Thanks for checking! > >>>> > >>>> Reviewed-by: Daniel Gomez <da.gomez@samsung.com> > >>> > >>> Applied, thanks! > >>> > >>> > >>>> > >>>>> --- > >>>>> After discussion in the list there is only one patch remaining. I have > >>>>> dropped the ones that were "shot down" and kept the one that makes sure > >>>>> we use full paths instead of relative; which seems to be a good idea. > >>>>> > >>>>> Changes in v2: > >>>>> - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path > >>>>> when creating custom_source file", because some have already gone into > >>>>> mainline and some other were "shot down" > >>>>> - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org > >>>>> --- > >>>>> > >>>>> --- > >>>>> scripts/bringup_guestfs.sh | 2 +- > >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>>> > >>>>> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh > >>>>> index 74eecea..2c41999 100755 > >>>>> --- a/scripts/bringup_guestfs.sh > >>>>> +++ b/scripts/bringup_guestfs.sh > >>>>> @@ -110,7 +110,7 @@ build_custom_image() > >>>>> CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" > >>>>> CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" > >>>>> CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" > >>>>> - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" > >>>>> + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" > >> > >> My understanding is that 'realpath' is not available on every > >> distribution...? Daniel, Luis, if this usage is OK, I'd like to use > >> 'realpath' in one or two other spots. > > > > realpath is included coreutils, and it seems to be available on all supported > > host distros. My quick check: > > > > + podman run --rm -it debian:latest bash -c 'dpkg -L coreutils | grep realpath' > > /usr/bin/realpath > > /usr/share/man/man1/realpath.1.gz > > + podman run --rm -it fedora:latest bash -c 'rpm -ql coreutils | grep realpath' > > /usr/bin/realpath > > + podman run --rm -it opensuse/tumbleweed bash -c 'rpm -ql coreutils | grep realpath' > > /usr/bin/realpath > > + podman run --rm -it ubuntu:latest bash -c 'dpkg -L coreutils | grep realpath' > > /usr/bin/realpath > > /usr/share/man/man1/realpath.1.gz > > > > I'm curious, which distros are not shipping realpath? > > While looking at basename/dirname last week, I found articles such as > this one: > > > https://superuser.com/questions/771104/usr-bin-realpath-not-found-in-centos-6-5 > > But I see that the submission date on that article is a decade ago. > > If we believe realpath is available on every recent distro we care to > run kdevops on, then there is no good reason to avoid using it. I agree with that! > > > >>>>> mkdir -p ${CUSTOM_IMAGE_DIR} > >>>>> > >>>>> > >>>>> --- > >>>>> base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 > >>>>> change-id: 20241217-jag-bringup_fixes-24ef1bc4211a > >>>>> > >>>>> Best regards, > >>>>> -- > >>>>> Joel Granados <joel.granados@kernel.org> > >>>>> > >>>>> > >>> > >> > >> > >> -- > >> Chuck Lever > > > -- > Chuck Lever
diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 74eecea..2c41999 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -110,7 +110,7 @@ build_custom_image() CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw" CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok" CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf" - CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index" + CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)" mkdir -p ${CUSTOM_IMAGE_DIR}
Avoid "file not found" failures related to relative paths in custom_source Signed-off-by: Joel Granados <joel.granados@kernel.org> --- After discussion in the list there is only one patch remaining. I have dropped the ones that were "shot down" and kept the one that makes sure we use full paths instead of relative; which seems to be a good idea. Changes in v2: - Only one patch remains : "[PATCH RESEND 10/12] bringup: Use full path when creating custom_source file", because some have already gone into mainline and some other were "shot down" - Link to v1: https://lore.kernel.org/r/20241218-jag-bringup_fixes-v1-0-0bf2e07c640c@kernel.org --- --- scripts/bringup_guestfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 4bffd17ac6a3ac757a26897a75ffa185d623a8e4 change-id: 20241217-jag-bringup_fixes-24ef1bc4211a Best regards,