• Re: [gentoo-dev] [PATCH] metadata/install-qa-check.d: make the FHS path

    From Haelwenn (lanodan) Monnier@21:1/5 to All on Fri Mar 29 06:00:01 2024
    [2024-03-28 23:54:35-0400] Eli Schwartz:
    * QA Notice: The ebuild is installing to one or more unexpected paths:
    *
    * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/legion_prof_files * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/serializer_examples
    *
    * Please fix the ebuild to use correct FHS/Gentoo policy paths.

    This message is hard to understand. Is it saying that the resulting
    package contains files prefixed with ${D} which would be immensely
    broken? Is it saying that these paths are *directories* and the FHS does
    not approve of directories in /usr/bin/*/?

    In fact, it's the latter. Fix this in two ways:

    - clarify that it's an unexpected directory, not just some kind of path

    I guess it would also make sense to have a trailing slash as extra
    indication of it being a directory like `ls -F` does.

    - strip ${D} so that people can better visualize what sort of path gets
    installed. This has the downside of not being able to copy/paste the
    path in order to inspect the image directory, but I think this is a
    very small downside. Usually by the time you see this message, portage
    has cleaned up. And if it hasn't, you can still copy/paste that from:

    Completed installing sys-cluster/legion-9999 into /var/tmp/portage/sys-cluster/legion-9999/image

    Could maybe be confusable with installers not supporting DESTDIR though (although the sandbox messages look *very* different).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Eli Schwartz on Fri Mar 29 15:20:02 2024
    On Thu, 2024-03-28 at 23:54 -0400, Eli Schwartz wrote:
    * QA Notice: The ebuild is installing to one or more unexpected paths:
    *
    * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/legion_prof_files
    * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/serializer_examples
    *
    * Please fix the ebuild to use correct FHS/Gentoo policy paths.

    This message is hard to understand. Is it saying that the resulting
    package contains files prefixed with ${D} which would be immensely
    broken? Is it saying that these paths are *directories* and the FHS does
    not approve of directories in /usr/bin/*/?

    In fact, it's the latter. Fix this in two ways:

    - clarify that it's an unexpected directory, not just some kind of path

    - strip ${D} so that people can better visualize what sort of path gets
    installed. This has the downside of not being able to copy/paste the
    path in order to inspect the image directory, but I think this is a
    very small downside. Usually by the time you see this message, portage
    has cleaned up. And if it hasn't, you can still copy/paste that from:

    Completed installing sys-cluster/legion-9999 into /var/tmp/portage/sys-cluster/legion-9999/image

    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    ---
    metadata/install-qa-check.d/08gentoo-paths | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/metadata/install-qa-check.d/08gentoo-paths b/metadata/install-qa-check.d/08gentoo-paths
    index 5b8607fd5f96..0b92a7a1c132 100644
    --- a/metadata/install-qa-check.d/08gentoo-paths
    +++ b/metadata/install-qa-check.d/08gentoo-paths
    @@ -70,9 +70,9 @@ gentoo_path_check() {
    # report
    # ------
    if [[ -n ${bad_paths[@]} ]]; then
    - eqawarn "QA Notice: The ebuild is installing to one or more unexpected paths:"
    + eqawarn "QA Notice: The ebuild is installing to one or more unexpected directories:"
    eqawarn
    - eqatag -v non-gentoo-paths "${bad_paths[@]}"
    + eqatag -v non-gentoo-paths "${bad_paths[@]#${D%/}}"
    eqawarn
    eqawarn "Please fix the ebuild to use correct FHS/Gentoo policy paths."
    fi

    LGTM. Thanks!

    --
    Best regards,
    Michał Górny


    -----BEGIN PGP SIGNATURE-----

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmYGzWsSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOz3UIAK2FOp4TpYOfRMLdTqaZJcFxSiDWndDe YoATKMa2O84S9CUzq9LaHC/mi+NqPeiIP6KPAoqboKVm/4g0xfHaeoAUxNte+2yJ nSkO6ZH3WGvAY9sDwTX3LfvVoKCalvIGT/dr16qhGsbFAIA01KveUpv/r0Mhxt/i Y9jEndn8cGSQkpYdy5WRL/p/fYgDD0GSDDpvokgtD7twDcTbVs7NgFEO6W7vX4WJ q92GOAdAMn38Ybu/97y4hNAyC2BtXp+W7jn0oFHlLqANdT7hbziQpMDzVS6mwRpS 120gJrtqZG0Fo39/nogt/YpoivA5o/p6kA4PJsZLToeA8Xvj4Lnk8Co=
    =8uZl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to Eli Schwartz on Fri Mar 29 19:50:02 2024
    Eli Schwartz <eschwartz93@gmail.com> writes:

    * QA Notice: The ebuild is installing to one or more unexpected paths:
    *
    * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/legion_prof_files
    * /var/tmp/portage/sys-cluster/legion-9999/image/usr/bin/serializer_examples
    *
    * Please fix the ebuild to use correct FHS/Gentoo policy paths.

    This message is hard to understand. Is it saying that the resulting
    package contains files prefixed with ${D} which would be immensely
    broken? Is it saying that these paths are *directories* and the FHS does
    not approve of directories in /usr/bin/*/?

    In fact, it's the latter. Fix this in two ways:

    - clarify that it's an unexpected directory, not just some kind of path

    - strip ${D} so that people can better visualize what sort of path gets
    installed. This has the downside of not being able to copy/paste the
    path in order to inspect the image directory, but I think this is a
    very small downside. Usually by the time you see this message, portage
    has cleaned up. And if it hasn't, you can still copy/paste that from:

    Completed installing sys-cluster/legion-9999 into /var/tmp/portage/sys-cluster/legion-9999/image

    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    ---

    LGTM. Thanks.

    metadata/install-qa-check.d/08gentoo-paths | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/metadata/install-qa-check.d/08gentoo-paths b/metadata/install-qa-check.d/08gentoo-paths
    index 5b8607fd5f96..0b92a7a1c132 100644
    --- a/metadata/install-qa-check.d/08gentoo-paths
    +++ b/metadata/install-qa-check.d/08gentoo-paths
    @@ -70,9 +70,9 @@ gentoo_path_check() {
    # report
    # ------
    if [[ -n ${bad_paths[@]} ]]; then
    - eqawarn "QA Notice: The ebuild is installing to one or more unexpected paths:"
    + eqawarn "QA Notice: The ebuild is installing to one or more unexpected directories:"
    eqawarn
    - eqatag -v non-gentoo-paths "${bad_paths[@]}"
    + eqatag -v non-gentoo-paths "${bad_paths[@]#${D%/}}"
    eqawarn
    eqawarn "Please fix the ebuild to use correct FHS/Gentoo policy paths."
    fi

    -----BEGIN PGP SIGNATURE-----

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZgcMlV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZDePQEArUkMGPprjUvv2uQ+4FicHyEWWjqJ0ruhT15t UJ5sKboBAIoSZ/9HeLrw0L7D0RFTNBJpUj8CdKZwKvwz0hV8lZAF
    =FwQl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)