Opened 10 years ago

Last modified 5 years ago

#38265 new enhancement

selfupdate should fetch tarball over HTTP

Reported by: raimue (Rainer Müller) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version: 2.1.3
Keywords: Cc: ryandesign (Ryan Schmidt), larryv (Lawrence Velázquez), umeshksingla (Umesh Singla)


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:

  1. Download a single file indicating the latest version (similar to macports_version)
  2. Compare the latest version available with the current installed version. If latest version is installed, goto end.
  3. Fetch the tarball and .rmd160 signature from a mirror with the filenames MacPorts-${version}.tar.bz2{,.rmd160}
  4. Verify signature
  5. Extract source, build and install
  6. 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)

selfupdate-over-https-wip.patch (13.2 KB) - added by raimue (Rainer Müller) 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

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

comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

Changed 5 years ago by raimue (Rainer Müller)

comment:3 Changed 5 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 5 years ago by umeshksingla (Umesh Singla)

Cc: umeshksingla added

comment:5 Changed 5 years ago by raimue (Rainer Müller)

Has duplicate #16954.

Note: See TracTickets for help on using tickets.