Commit fb3729a9 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

recipes: Move all recipes to HTTPS

Also add a check in Cerbero to ensure that no insecure URLs are used.
parent 3e86ad23
......@@ -20,7 +20,6 @@ import os
import shutil
import tarfile
import urllib.request, urllib.parse, urllib.error
import urllib.parse
from cerbero.config import Platform
from cerbero.utils import git, svn, shell, _
......@@ -108,6 +107,9 @@ class Tarball (Source):
split[2] = urllib.parse.quote(split[2])
self.url = urllib.parse.urlunsplit(split)
self.mirror_url = urllib.parse.urljoin(TARBALL_MIRROR, self.tarball_name)
o = urllib.parse.urlparse(self.url)
if o.scheme in ('http', 'ftp'):
raise FatalError('Download URL {!r} must use HTTPS'.format(self.url))
def fetch(self, redownload=False):
if not os.path.exists(self.repo_dir):
......@@ -122,7 +124,7 @@ class Tarball (Source):
return
m.action(_('Fetching tarball %s to %s') %
(self.url, self.download_path))
# Enable certificate checking Linux for now
# Enable certificate checking only on Linux for now
# FIXME: Add more platforms here after testing
cc = self.config.platform == Platform.LINUX
try:
......
......@@ -4,7 +4,9 @@ class Recipe(recipe.Recipe):
name = 'a52dec'
version = '0.7.4'
stype = SourceType.TARBALL
url = 'http://liba52.sourceforge.net/files/a52dec-%(version)s.tar.gz'
# This URL doesn't support https, so we don't use it
#url = 'http://liba52.sourceforge.net/files/a52dec-%(version)s.tar.gz'
url = 'https://gstreamer.freedesktop.org/src/mirror/a52dec-%(version)s.tar.gz'
licenses = [License.GPLv2Plus]
configure_options = '--with-pic --enable-shared'
autoreconf = True
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '2.69'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz'
url = 'https://ftp.gnu.org/gnu/autoconf/autoconf-%(version)s.tar.xz'
deps = ['m4']
files_bin = [
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '1.15.1'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.xz'
url = 'https://ftp.gnu.org/gnu/automake/automake-%(version)s.tar.xz'
deps = ['autoconf', 'gettext-tools', 'gettext-m4']
files_bin = ['bin/automake', 'bin/aclocal',
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '3.0.4'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftpmirror.gnu.org/bison/bison-3.0.4.tar.gz'
url = 'https://ftpmirror.gnu.org/bison/bison-%(version)s.tar.gz'
patches = ['bison/0001-Fix-build-invalid-instruction-on-macOS-10.3.patch']
......
......@@ -7,7 +7,7 @@ class Recipe(recipe.Recipe):
licenses = [License.BSD_like]
btype = BuildType.MAKEFILE
stype = SourceType.TARBALL
url = 'http://www.cmake.org/files/v3.7/cmake-3.7.1.tar.gz'
url = 'https://www.cmake.org/files/v3.7/cmake-%(version)s.tar.gz'
deps = ['autoconf']
add_host_build_target = False
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '0.19.8.1'
stype = SourceType.TARBALL
tarball_dirname = 'gettext-%(version)s'
url = 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.gz'
url = 'https://ftp.gnu.org/pub/gnu/gettext/gettext-%(version)s.tar.gz'
# only libraries are LGPLv2+, tools are GPLv3+ and defined below
licenses = [License.LGPLv2Plus]
autoreconf = True
......
......@@ -11,7 +11,7 @@ class Recipe(recipe.Recipe):
srcdir = 'gettext-tools'
stype = SourceType.TARBALL
tarball_dirname = 'gettext-%(version)s'
url = 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.gz'
url = 'https://ftp.gnu.org/pub/gnu/gettext/gettext-%(version)s.tar.gz'
platform_deps = {
Platform.DARWIN: ['sed'],
Platform.WINDOWS: ['libiconv', 'mingw-runtime'],}
......
......@@ -4,7 +4,8 @@ class Recipe(recipe.Recipe):
name = 'glib-tools'
version = '2.56.1'
stype = SourceType.TARBALL
url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.56/glib-%(version)s.tar.xz'
maj_ver = '.'.join(version.split('.')[0:2])
url = 'https://download.gnome.org/sources/glib/{}/glib-%(version)s.tar.xz'.format(maj_ver)
tarball_dirname = 'glib-%(version)s'
licenses = [License.LGPLv2Plus]
btype = BuildType.MESON
......
......@@ -7,7 +7,7 @@ class Recipe(recipe.Recipe):
version = '4.2.2'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.gz'
url = 'https://ftp.gnu.org/gnu/sed/sed-%(version)s.tar.gz'
def prepare(self):
if needs_xcode8_sdk_workaround(self.config):
......
......@@ -11,8 +11,7 @@ class Recipe(recipe.Recipe):
version = '1.54.1'
stype = SourceType.TARBALL
maj_ver = '.'.join(version.split('.')[0:2])
url = 'http://ftp.gnome.org/pub/GNOME/sources/{0}/{2}/{0}-{1}.tar.xz'
url = url.format(_name, version, maj_ver)
url = 'https://ftp.gnome.org/pub/GNOME/sources/{0}/{2}/{0}-{1}.tar.xz'.format(_name, version, maj_ver)
srcdir = "{0}-{1}".format(_name, version)
licenses = [License.GPLv2Plus]
btype = BuildType.CUSTOM
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '3.0.4'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz'
url = 'https://ftp.gnu.org/pub/gnu/gperf/gperf-%(version)s.tar.gz'
patches = ['gperf-0001-Don-t-override-environment-AR.patch']
files_bins = ['gperf']
......
......@@ -7,7 +7,7 @@ class Recipe(recipe.Recipe):
version = '2.4.6'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz'
url = 'https://ftp.gnu.org/gnu/libtool/libtool-%(version)s.tar.gz'
deps = ['m4']
patches = ['libtool/0001-Add-support-for-weak_framework-linking-on-Darwin.patch',
'libtool/0002-libtool-Stop-adding-bind_at_load-on-all-Darwin.patch']
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '1.4.18'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url = 'http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz'
url = 'https://ftp.gnu.org/gnu/m4/m4-%(version)s.tar.xz'
files_bins = ['m4']
patches = ['m4/0001-Fix-build-invalid-instruction-on-macOS-10.13.patch',
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '0.29.2'
licenses = [License.GPLv2]
stype = SourceType.TARBALL
url='http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz'
url = 'https://pkgconfig.freedesktop.org/releases/pkg-config-%(version)s.tar.gz'
configure_options = '--with-internal-glib --disable-host-tool '
files_bins = ['pkg-config']
......
......@@ -12,7 +12,7 @@ class Recipe(recipe.Recipe):
version = '0.35.2'
stype = SourceType.TARBALL
maj_ver = '.'.join(version.split('.')[0:2])
url = 'http://ftp.gnome.org/pub/GNOME/sources/{0}/{2}/{0}-{1}.tar.xz'
url = 'https://ftp.gnome.org/pub/GNOME/sources/{0}/{2}/{0}-{1}.tar.xz'
url = url.format(_name, version, maj_ver)
srcdir = "{0}-{1}".format(_name, version)
licenses = [License.LGPLv2_1Plus]
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '5.2.3'
licenses = [License.GPLv3]
stype = SourceType.TARBALL
url = 'http://tukaani.org/xz/xz-%(version)s.tar.bz2'
url = 'https://download.sourceforge.net/lzmautils/xz-%(version)s.tar.bz2'
files_bins = ['xz']
......
......@@ -6,7 +6,7 @@ class Recipe(recipe.Recipe):
version = '1.3.0'
licenses = [License.GPLv3]
stype = SourceType.TARBALL
url = 'http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz'
url = 'https://www.tortall.net/projects/yasm/releases/yasm-%(version)s.tar.gz'
files_bins = ['yasm']
......
......@@ -7,7 +7,7 @@ class Recipe(recipe.Recipe):
version = '1.0.6'
licenses = [License.BSD_like]
stype = SourceType.TARBALL
url = 'http://bzip.org/%(version)s/bzip2-%(version)s.tar.gz'
url = 'https://bzip.org/%(version)s/bzip2-%(version)s.tar.gz'
patches = ['bzip2/0001-Fix-Makefiles-and-add-support-for-Windows-and-OS-X.patch']
files_libs = ['libbz2']
......
......@@ -5,7 +5,7 @@ class Recipe(recipe.Recipe):
name = 'cairo'
version = '1.14.12'
stype = SourceType.TARBALL
url = 'http://cairographics.org/releases/cairo-%(version)s.tar.xz'
url = 'https://cairographics.org/releases/cairo-%(version)s.tar.xz'
# either LGPLv2.1 or MPLv1.1
licenses = [License.LGPLv2_1]
autoreconf = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment