• [gentoo-dev] pycargoebuild can now generate "crate tarballs"

    From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to All on Wed Nov 29 18:00:01 2023
    Hi, everyone.

    app-portage/pycargoebuild-0.12 brings a new useful feature: generating
    "crate tarballs" that can be used to easily deliver all crates,
    resulting in much smaller Manifest, ebuild and much faster fetch+unpack.
    This is currently experimental, so I'd appreciate your testing
    and feedback.

    Long story short, run pycargoebuild with --crate-tarball, e.g.:

    $ pycargoebuild --crate-tarball -i fractal-5.ebuild \
    /tmp/portage/net-im/fractal-5/work/fractal-5/
    [...]
    INFO Crate tarball written to /tmp/dist/fractal-5.0.0-crates.tar.xz


    pycargoebuild will fetch all crates (as usual), repack them into a
    single .tar.xz and put empty CRATES="\n" into the ebuild (some
    whitespace is required to workaround cargo.eclass right now). You may
    want to rename the tarball (the default name is based off Cargo.toml
    metadata), upload it somewhere and then add it to SRC_URI.

    Note that GIT_CRATES aren't repacked.

    Now some numbers, for fractal-5:

    ebuild: 15 KiB → 4 KiB
    Manifest: 180 KiB → 1.5 KiB
    download time: 70 s → 2 s
    distfile count: 597 → 4
    distdir size: 76 MiB → 45 MiB
    unpack time: 15 s → 6 s

    --
    Best regards,
    Michał Górny


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

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmVnbesSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO+l8H/3nP5rKC5J6bd3Q8rmcAPNASsJGGdOkI 0e8+iq+CQspQoTS4vxBBPjPDUjO/pwUGcZZaIVNg/rbwPcmLgaxcaGBz195i3wNG eil1nD8SNls47mIkyDCzl7Z03d2Z/9IH9V2wN0KkSgNx6Vo42lZ9fvoe3MgaMewJ 9ydn8CNzz+Q4L5qEFLWKBUpPELU4WE0V0vIio6afPIm+jbT0YGba/3mhnhdKESOk BnYoiavaZAoHgcJh8GDBmNdV62H6EYBpu4cLkSYlNsPuK7cpmANx1/+AZPeQi0N0 jEgbDpVdFeBtJpirAn5D2GPzYmeEFvuOT/OtSl1ci2LOPhrISH+M2Go=
    =bSPX
    -----END PGP SIGNATURE-----

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