• Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in s

    From Eli Schwartz@21:1/5 to All on Sun Aug 25 17:40:02 2024
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------vW737YtibSIyF5Xy09f22sK6
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    On 8/25/24 11:33 AM, Michał Górny wrote:
    Closes: https://bugs.gentoo.org/937642
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 0f9dc8d14d5e..39705c5c3c84 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
    local strays=()
    local p
    mapfile -d $'\0' -t strays < <(
    + # jar for jpype, https://bugs.gentoo.org/937642
    find "${sitedir}" -maxdepth 1 -type f '!' '(' \
    -name '*.egg-info' -o \
    + -name '*.jar' -o \
    -name '*.pth' -o \
    -name '*.py' -o \
    -name '*.pyi' -o \


    Copying my comment from the bug report:

    I don't think it makes sense to add a special exception for jar files.
    If we think that packages may be legitimately storing *data* files at
    the top level, we should either relax the check in general, or allow
    adding a suppression variable for packages to suppress this check.


    --
    Eli Schwartz


    --------------vW737YtibSIyF5Xy09f22sK6--

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

    wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCZstPfgUDAAAAAAAKCRCEp9ErcA0vV0tr AP99wblCgTS/eIPI/NWsPz21T1FXjfenYZzjDEUaiF7y2wEA2gXixfZDCuu7/GC3QCPOv5YrqCpV 2nf5/sizWHzSJQo=
    =881X
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to Sam James on Sun Aug 25 18:10:01 2024
    Sam James <sam@gentoo.org> writes:

    Eli Schwartz <eschwartz@gentoo.org> writes:

    On 8/25/24 11:33 AM, Michał Górny wrote:
    Closes: https://bugs.gentoo.org/937642
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 0f9dc8d14d5e..39705c5c3c84 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
    local strays=()
    local p
    mapfile -d $'\0' -t strays < <(
    + # jar for jpype, https://bugs.gentoo.org/937642
    find "${sitedir}" -maxdepth 1 -type f '!' '(' \
    -name '*.egg-info' -o \
    + -name '*.jar' -o \
    -name '*.pth' -o \
    -name '*.py' -o \
    -name '*.pyi' -o \


    Copying my comment from the bug report:

    I don't think it makes sense to add a special exception for jar files.
    If we think that packages may be legitimately storing *data* files at
    the top level, we should either relax the check in general, or allow
    adding a suppression variable for packages to suppress this check.

    Unfortunately, I think I agree -- we should probably blacklist, not whitelist.

    Or maybe we keep it as-is but with an opt-out var, with documentation
    saying not to use it without strong justification.

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

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

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZstWkl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZA3HgEAgCfWx0qBpAoCEl6Hg4UpRxp7Qc1wjFP3Q6M7 g8OUQ4EBAN9Hql6DYWe3XxeigwYwXhXKmpPz0stt0D42bm3DIkEF
    =POOl
    -----END PGP SIGNATURE-----

    --- 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 Tue Sep 3 09:30:01 2024
    On Sun, 2024-08-25 at 11:36 -0400, Eli Schwartz wrote:
    On 8/25/24 11:33 AM, Michał Górny wrote:
    Closes: https://bugs.gentoo.org/937642
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 0f9dc8d14d5e..39705c5c3c84 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
    local strays=()
    local p
    mapfile -d $'\0' -t strays < <(
    + # jar for jpype, https://bugs.gentoo.org/937642
    find "${sitedir}" -maxdepth 1 -type f '!' '(' \
    -name '*.egg-info' -o \
    + -name '*.jar' -o \
    -name '*.pth' -o \
    -name '*.py' -o \
    -name '*.pyi' -o \


    Copying my comment from the bug report:

    I don't think it makes sense to add a special exception for jar files.
    If we think that packages may be legitimately storing *data* files at
    the top level, we should either relax the check in general, or allow
    adding a suppression variable for packages to suppress this check.


    If you don't like JPype's design decisions, take it up to them. This is
    not my fight.

    This is the simplest solution to the problem at hand. The check is
    primarily supposed to detect obvious violations, such as common Poetry
    use screwups that install random documentation and package configuration
    files (LICENSE, README, pyproject.toml...) there. I don't see a point
    in adding a lot of complexity for theoretical purity.

    --
    Best regards,
    Michał Górny


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

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmbWuZwSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOhUYH/1EVPl3AW3Uu3mh9u8s5RI9YA6XXGuTQ yXSxCOqLH2cRcCtz+tL3e4O4O6gbbuZtY5xi8HA9goy1hefUNzByswGA+LO0pJEA jqTOqN6gxnf8UNFzrwohl/r6osrXvhkux/5dtKA5htmnGionci1i7UXLtvSiKu83 wYo0eds5uPUJMcpuokX1DWucspHMmfOeOcoGA/JpUnb65Gg1mh5LM5iEGmNjeM2N QD3gchgnnxXWugNKQhdKx069oAKAglZ4Oonwczz6JuXf1tZ3QaP4yTXJ4YAmPz6N Bda6TDjcRUYHqoQ/gv6zXZK59TD2CNm2STQ0+4hD25OCpMZZRJ/Az7g=
    =qZkt
    -----END PGP SIGNATURE-----

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