Skip to content
Snippets Groups Projects
Commit 4beceec9 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Merge branch 'master' into lib-refactor

parents 9148f7ca 916115d0
No related branches found
No related tags found
1 merge request!16Various package rebuilds and updates including movement to zlib-ng and mac support
......@@ -68,7 +68,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
set(TEMPLATE_VERIFIER_MASTER_URL "http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg" CACHE STRING "Location of the master message template")
set(TEMPLATE_VERIFIER_MASTER_URL "https://git.alchemyviewer.org/alchemy/master-message-template/-/raw/master/message_template.msg" CACHE STRING "Location of the master message template")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
......
......@@ -2225,7 +2225,6 @@ if (LINUX)
add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2)
# Make sure we don't run two instances of viewer_manifest.py at the same time.
add_dependencies(llpackage copy_l_viewer_manifest)
check_message_template(llpackage)
endif (PACKAGE)
endif (LINUX)
......
7fc11a544e5cf4c027e78caba029d158c4269dfa8c21f0a6d760153e77d3d346
\ No newline at end of file
......@@ -67,6 +67,7 @@ def add_indra_lib_path():
import os
import urllib
import hashlib
import certifi
from indra.ipc import compatibility
from indra.ipc import tokenstream
......@@ -141,7 +142,7 @@ def fetch(url):
return open(file_name).read()
else:
# *FIX: this doesn't throw an exception for a 404, and oddly enough the sl.com 404 page actually gets parsed successfully
return ''.join(urllib.urlopen(url).readlines())
return ''.join(urllib.urlopen(url, cafile = certifi.where()).readlines())
def cache_master(master_url):
"""Using the url for the master, updates the local cache, and returns an url to the local cache."""
......@@ -229,14 +230,14 @@ def run(sysargs):
""")
parser.add_option(
'-u', '--master_url', type='string', dest='master_url',
default='http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg',
default='https://git.alchemyviewer.org/alchemy/master-message-template/-/raw/master/message_template.msg',
help="""The url of the master message template.""")
parser.add_option(
'-c', '--cache_master', action='store_true', dest='cache_master',
default=False, help="""Set to true to attempt use local cached copy of the master template.""")
parser.add_option(
'-f', '--force', action='store_true', dest='force_verification',
default=False, help="""Set to true to skip the sha_1 check and force template verification.""")
default=False, help="""Set to true to skip the sha_256 check and force template verification.""")
options, args = parser.parse_args(sysargs)
......@@ -275,13 +276,13 @@ def run(sysargs):
# retrieve the contents of the local template
current = fetch(current_url)
hexdigest = hashlib.sha1(current).hexdigest()
hexdigest = hashlib.sha256(current).hexdigest()
if not options.force_verification:
# Early exist if the template hasn't changed.
sha_url = "%s.sha1" % current_url
sha_url = "%s.sha256" % current_url
current_sha = fetch(sha_url)
if hexdigest == current_sha:
print "Message template SHA_1 has not changed."
print "Message template SHA_256 has not changed."
sys.exit(0)
# and check for syntax
......@@ -316,8 +317,8 @@ def explain(header, compat):
if acceptable:
explain("--- PASS ---", compat)
if options.force_verification == False:
print "Updating sha1 to %s" % hexdigest
sha_filename = "%s.sha1" % current_filename
print "Updating sha256 to %s" % hexdigest
sha_filename = "%s.sha256" % current_filename
sha_file = open(sha_filename, 'w')
sha_file.write(hexdigest)
sha_file.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment