add upstream autodetection helpers