From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 6/6] ptxd_make_world_lint: check for usage of deprecated FTP protocol
Date: Tue, 28 May 2024 08:10:47 +0200 [thread overview]
Message-ID: <ZlV1Z6ATVHdIqUM5@pengutronix.de> (raw)
In-Reply-To: <20240527201347.673604-6-l.stach@pengutronix.de>
On Mon, May 27, 2024 at 10:13:47PM +0200, Lucas Stach wrote:
> FTP is on its way out, so it should not be used in package URLs
> anymore. Add a lint check to ensure that.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> scripts/lib/ptxd_make_world_lint.sh | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/scripts/lib/ptxd_make_world_lint.sh b/scripts/lib/ptxd_make_world_lint.sh
> index 01a35d4801b8..94d43d6bee4f 100644
> --- a/scripts/lib/ptxd_make_world_lint.sh
> +++ b/scripts/lib/ptxd_make_world_lint.sh
> @@ -281,6 +281,23 @@ ptxd_make_world_lint_credits() {
> export -f ptxd_make_world_lint_credits
> PTXDIST_LINT_COMMANDS="${PTXDIST_LINT_COMMANDS} credits"
>
> +ptxd_make_world_lint_ftp() {
> + local filefd file
> +
> + echo "Checking for deprecated FTP protocol use in package URL ..."
> +
> + exec {filefd}< <(ptxd_make_world_lint_makefiles)
> + while read file <&${filefd}; do
> + if grep -q "URL.*ftp://" "${file}"; then
This will not detect multiline URL patterns. How about this:
if grep -qzP '_URL\b.*=(.*\\\n)*.*\bftp://' "${file}"; then
Michael
> + ptxd_lint_error "'$(ptxd_print_path "${file}")' contains deprecated FTP URL."
> + fi
> + done
> + exec {filefd}<&-
> + echo
> +}
> +export -f ptxd_make_world_lint_ftp
> +PTXDIST_LINT_COMMANDS="${PTXDIST_LINT_COMMANDS} ftp"
> +
> unset ptxd_make_world_lint_cross_whitelist
> # we don't care about the initmethod
> ptxd_make_world_lint_cross_whitelist+="INITMETHOD_BBINIT INITMETHOD_SYSTEMD "
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-05-28 6:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 20:13 [ptxdist] [PATCH 1/6] grub: replace download URL with HTTPS Lucas Stach
2024-05-27 20:13 ` [ptxdist] [PATCH 2/6] efax: " Lucas Stach
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-27 20:13 ` [ptxdist] [PATCH 3/6] gdb: " Lucas Stach
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-27 20:13 ` [ptxdist] [PATCH 4/6] gdbserver: " Lucas Stach
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-27 20:13 ` [ptxdist] [PATCH 5/6] ptxd_make_get: drop passive FTP options Lucas Stach
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-27 20:13 ` [ptxdist] [PATCH 6/6] ptxd_make_world_lint: check for usage of deprecated FTP protocol Lucas Stach
2024-05-28 6:10 ` Michael Olbrich [this message]
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-06-10 19:41 ` [ptxdist] [APPLIED] grub: replace download URL with HTTPS Michael Olbrich
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=ZlV1Z6ATVHdIqUM5@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=l.stach@pengutronix.de \
--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