#38265 closed enhancement (fixed)
selfupdate should fetch tarball over HTTP
Reported by: | raimue (Rainer Müller) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.10.0 |
Component: | base | Version: | 2.1.3 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), larryv (Lawrence Velázquez), umeshksingla (Umesh Singla) | |
Port: |
Description
The selfupdate method currently gets base.tar via rsync, checks the .rmd160 signature, extracts it and then compares the version. This has the drawback that it always downloads the base source code (at least once) and keeps it on disk. Furthermore rsync might not be available for users behind firewalls, making selfupdate impossible for them at the moment.
Instead selfupdate should do the following:
- Download a single file indicating the latest version (similar to macports_version)
- Compare the latest version available with the current installed version. If latest version is installed, goto end.
- Fetch the tarball and .rmd160 signature from a mirror with the filenames MacPorts-${version}.tar.bz2{,.rmd160}
- Verify signature
- Extract source, build and install
- After successful installation, delete tarball, .rmd160 signature file and extracted source
The advantages of this approach:
- The version is compared before downloading any files
- Tarballs are only downloaded if a newer version is available
- Fetch works over HTTP and thus allows operation behind firewalls
Attachments (1)
Change History (9)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
Changed 7 years ago by raimue (Rainer Müller)
Attachment: | selfupdate-over-https-wip.patch added |
---|
comment:3 Changed 7 years ago by raimue (Rainer Müller)
I found this old patch lying around, which I write quite some time ago. It is a work in progress and mostly untested, but it can be used as a starting point if someone else wants to pick it up.
comment:4 Changed 7 years ago by umeshksingla (Umesh Singla)
Cc: | umeshksingla added |
---|
comment:6 Changed 23 months ago by jmroot (Joshua Root)
WIP PR that was linked from duplicate ticket https://github.com/macports/macports-base/pull/184
comment:7 Changed 4 months ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 Changed 4 months ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.10.0 |
---|
Note: See
TracTickets for help on using
tickets.
But this problem would go away and solve itself if we replaced the selfupdate mechanism with just using the MacPorts port, as proposed in wiki:SummerOfCode#self-management