Update some pkg sources to use https:// when available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



https://www.archlinux.org/todo/use-https-in-the-url-field/
https://gist.github.com/b1tninja/9a1184a9713a16e77c7ae65d1829d589

git clone --depth=1 --no-checkout
"https://git.archlinux.org/svntogit/packages.git"; pkgs;
pushd pkgs;
git reset --hard HEAD;
git checkout HEAD -- */trunk/PKGBUILD;
doms=($(grep -PRho '(?s)(?<=source=\().*?(?=\)\s*$)' | grep -Po
'(?:((?:(?:git|svn|cvs)+)?http://)(.*?)(?=/|$))' | cut -d "/" -f 3- |
sort -u))
for dom in ${doms[@]}; do (echo "" | openssl s_client
-verify_return_error -verify 2 -verify_hostname $dom -servername $dom
-showcerts -connect $dom:443 > $dom.crt) && echo $dom; done | tee
https.txt
sed -ri 's/http:\/\/('$(sed -r 's/\|$//' <(tr "\n" "|" <
https.txt))')/https:\/\/\1/g' $(find -name PKGBUILD)

No I don't think its super elegant-- it works often, and afaik doesn't
introduce errors--- parsing bash scripts is a pita.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux