Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 798687

Summary: Total http to https upgrade for ebuild properties (for all tree)
Product: Gentoo Linux Reporter: Nikita Zlobin <cook60020tmp>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: floppym
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: git status
git diff
conversion command output
resulting git-status
resulting git-diff
conversion command output

Description Nikita Zlobin 2021-06-25 11:35:16 UTC
I made bash script, which upgrades urls in all ebuilds in tree from http to https.

It's not perfect yet. For now it checks only urls in quotes and in begining of string value (doesn't check subsequent urls, which may present in all of HOMEPAGE, SRC_URI and *_REPO_URI). Though if gathered, it will replace any occurences of "http://${host}" in ebuild. Or almost any.

I'm currently testing it with gentoo portage tree, though don't know if will even propose - so much changes, with all packages having different maintainer.

I decided to start it after discovered, that bash homepage could use https but doesn't while in readline ebuild same homepage url has https.

https://gist.github.com/nick87720z/5b405351c34b1cb6c0998484599fb182

Reproducible: Always
Comment 1 Nikita Zlobin 2021-06-25 20:15:25 UTC
If someone already tried that script - there was nasty typo, feeding curl with http url instead of https for test. Probably, must as serious as sneaky.
Comment 2 Nikita Zlobin 2021-06-28 09:33:27 UTC
Script itself is almost ready.
The only disconvenience: it replaces all occurences of http://${host} for given host through file, including arguments for sed and e* log, even comments.
Comment 3 Nikita Zlobin 2021-06-28 13:27:14 UTC
Created attachment 719760 [details]
git status
Comment 4 Nikita Zlobin 2021-06-28 13:32:59 UTC
Created attachment 719763 [details, diff]
git diff

These are changes by 'ebuilds-upgrade-http-urls' script, for portage commit 504deaeeb866e8acba3e87f32676b95332dae2c8
(bash ebuilds are not there, because I commited them a bit earlier, in my local branch).
Comment 5 Nikita Zlobin 2021-06-28 15:32:09 UTC
Created attachment 719814 [details]
conversion command output
Comment 6 Nikita Zlobin 2021-06-28 15:35:00 UTC
Created attachment 719817 [details]
resulting git-status
Comment 7 Nikita Zlobin 2021-06-28 15:36:44 UTC
Created attachment 719820 [details]
resulting git-diff
Comment 8 Nikita Zlobin 2021-06-28 15:37:25 UTC
Created attachment 719823 [details]
conversion command output
Comment 9 Mike Gilbert gentoo-dev 2021-07-02 17:42:23 UTC
I don't mean to ruin your party, but I'm not sure why you filed a bug report for this.

If you would like to submit patches to update URLs in ebuilds, please file separate bugs or open a pull request on github.

If you want to publish your script, there are many places you might do so. Bugzilla isn't really the place for it.
Comment 10 Nikita Zlobin 2021-07-02 18:13:03 UTC
ok, anyway thanks for reply