Skip to content

Commit

Permalink
Warn when using unsigned rsync for base or ports
Browse files Browse the repository at this point in the history
See: https://trac.macports.org/ticket/53414
(cherry picked from commit bebd94a)
  • Loading branch information
jmroot committed Feb 17, 2017
1 parent 7718ad4 commit 88c62db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/macports1.0/macports.tcl
Expand Up @@ -748,6 +748,10 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
set sources_default [concat [list $url] $flags]
}
}
if {[string match rsync://*rsync.macports.org/release/ports/ $url]} {
ui_warn "MacPorts is configured to use an unsigned source for the ports tree.\
Please edit sources.conf and change '$url' to '[string range $url 0 end-6]tarballs/ports.tar'."
}
lappend sources [concat [list $url] $flags]
} else {
ui_warn "$sources_conf specifies invalid source '$line', ignored."
Expand Down Expand Up @@ -924,6 +928,10 @@ proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
if {![info exists rsync_dir]} {
global macports::rsync_dir
set macports::rsync_dir macports/release/tarballs/base.tar
} elseif {[string range $rsync_dir end-3 end] ne ".tar" && [string match *.macports.org ${macports::rsync_server}]} {
ui_warn "MacPorts is configured to use an unsigned source for selfupdate.\
Please edit macports.conf and change the rsync_dir setting to\
match macports.conf.default."
}
if {![info exists rsync_options]} {
global macports::rsync_options
Expand Down

0 comments on commit 88c62db

Please sign in to comment.