From: Ladislav Michl <oss-lists@triops.cz>
To: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [RFC PATCH] ptxdist: add repology sub command
Date: Sun, 20 Apr 2025 20:59:53 +0200 [thread overview]
Message-ID: <aAVEKYHQy3Mw7yj9@lenoch> (raw)
In-Reply-To: <CAH+2xPCdNDpMGCcnNd5pn12=w_k+W3pnx2amio-51A-vjPauFQ@mail.gmail.com>
On Sun, Apr 20, 2025 at 06:18:32PM +0200, Bruno Thomsen wrote:
> Hi
>
> I also started with ptxdist-lint but might have removed a little too
> much of the makefile
> and relied too much on the bash script part :)
> It would be nice if we could run more makefile to get dynamic versions
> and licenses resolved
> before handoff to bash script. Or maybe we should do it more like spdx
> sbom in Python.
>
> The sorting and indentation is currently done externally by jq, but
> that could be moved inside
> ptxd_make_world_repology script function.
>
> Also I am a bit unsure if this cross rule variable access is actually
> more of a bug then a feature.
>
> $ rg XORG_LIB_X11_LICENSE
> rules/libx11-locale.make
> 24:LIBX11_LOCALE_LICENSE = $(XORG_LIB_X11_LICENSE)
>
> rules/xorg-lib-X11.make
> 24:XORG_LIB_X11_LICENSE := MIT
I guess we are overcomplicating it. What about simply (working concept):
$ cat scripts/lib/ptxd_make_world_repology.sh
PTX_PACKAGES_TARGET := \
$(sort $(filter-out host-system-%,$(filter-out host-%,$(filter-out image-%,$(PTX_PACKAGES_ALL)))))
PHONY += ptxdist-repology
ptx/repology = \
@$(foreach pkg,$(PTX_PACKAGES_TARGET), \
echo "{\"name\": \"${pkg}\", \"version\": \"$($(PTX_MAP_TO_PACKAGE_$(pkg))_VERSION)\", \"license\": \"$($(PTX_MAP_TO_PACKAGE_$(pkg))_LICENSE)\"}"$(ptx/nl))
ptxdist-repology:
@$(call targetinfo)
@$(call ptx/repology)
# vim: syntax=make
EOF
Doing all inside makefile quite simplifies it and performance is
probably not critical here.
> Ladislav you can find latest development version of this repology support here:
> https://github.com/baxeno/ptxdist/tree/repology_support
> (you can send PR directly if you wish)
I'll try to cook up something but not sooner than next week.
l.
next prev parent reply other threads:[~2025-04-20 19:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 11:33 Bruno Thomsen
2025-04-19 21:10 ` Ladislav Michl
2025-04-20 8:41 ` Ladislav Michl
2025-04-20 16:18 ` Bruno Thomsen
2025-04-20 18:59 ` Ladislav Michl [this message]
2025-04-21 15:51 ` Ladislav Michl
2025-04-26 10:13 ` Michael Olbrich
2025-04-26 16:23 ` Bruno Thomsen
2025-04-27 14:58 ` Michael Olbrich
2025-04-28 6:24 ` Ladislav Michl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAVEKYHQy3Mw7yj9@lenoch \
--to=oss-lists@triops.cz \
--cc=bruno.thomsen@gmail.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox