[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66df632598aeafc48ecb15434e3d997438414e7f.camel@perches.com>
Date: Thu, 02 Jul 2020 13:19:12 -0700
From: Joe Perches <joe@...ches.com>
To: Jonathan Corbet <corbet@....net>,
Bjorn Helgaas <helgaas@...nel.org>
Cc: "Alexander A. Klimov" <grandmaster@...klimov.de>,
bhelgaas@...gle.com, robh+dt@...nel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
kishon@...com, lorenzo.pieralisi@....com, hongxing.zhu@....com,
l.stach@...gutronix.de, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-imx@....com, m-karicheri2@...com, songxiaowei@...ilicon.com,
wangbinghui@...ilicon.com, amurray@...goodpenguin.co.uk,
sathyanarayanan.kuppuswamy@...ux.intel.com, hkallweit1@...il.com,
rafael.j.wysocki@...el.com, rdunlap@...radead.org,
linux-pci@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: PCI: Replace lkml.org, spinics, gmane with lore.kernel.org
On Tue, 2020-06-30 at 22:35 -0700, Joe Perches wrote:
> On Tue, 2020-06-30 at 14:04 -0600, Jonathan Corbet wrote:
> > On Tue, 30 Jun 2020 13:09:17 -0500
> > Bjorn Helgaas <helgaas@...nel.org> wrote:
> >
> > > PCI: Replace lkml.org, spinics, gmane with lore.kernel.org
> > >
> > > The lkml.org, spinics.net, and gmane.org archives are not very reliable
> > > and, in some cases, not even easily accessible. Replace links to them with
> > > links to lore.kernel.org, the archives hosted by kernel.org.
> > >
> > > I found the gmane items via the Wayback Machine archive at
> > > https://web.archive.org/.
> >
> > Heh...now *that* sounds like a project that could generate a lot of churn,
> > and perhaps even be worth it. Settling on a consistent (and working!)
> > email archive would improve the docs quite a bit. I'll add that to the
> > list...
>
> At least for the lkml.org/lkml links
> here's the current -next diff done by a
> script that looks at the message-id of
> each lkml.org link.
btw: if you want to run the script for specific
paths, here's the script.
You could run it using:
bash convert_lkml_to_lore.sh <path>
---
$ cat convert_lkml_to_lore.sh
#!/bin/bash
cvt_lkml_to_lore ()
{
tmpfile=$(mktemp ./.cvt_links.XXXXXXX)
header=$(echo $1 | sed 's@...ml/@...ml/headers/@')
wget -qO - $header > $tmpfile
if [[ $? == 0 ]] ; then
link=$(grep -i '^Message-Id:' $tmpfile | head -1 | \
sed -r -e 's/^\s*Message-Id:\s*<\s*//' -e 's/\s*>\s*$//' -e 's@^@https://lore.kernel.org/r/@')
# echo "testlink: $link"
if [ -n "$link" ] ; then
wget -qO - $link > /dev/null
if [[ $? == 0 ]] ; then
echo $link
fi
fi
fi
rm -f $tmpfile
}
git grep -P -o "\bhttps?://(?:www.)?lkml.org/lkml[\/\w]+" $@ |
while read line ; do
echo $line
file=$(echo $line | cut -f1 -d':')
link=$(echo $line | cut -f2- -d':')
newlink=$(cvt_lkml_to_lore $link)
if [[ -n "$newlink" ]] ; then
sed -i -e "s#\b$link\b#$newlink#" $file
fi
done
Powered by blists - more mailing lists