diff options
Diffstat (limited to 'scripts')
-rw-r--r--[-rwxr-xr-x] | scripts/md5check.py | 0 | ||||
-rw-r--r-- | scripts/messages/message_template.msg | 8 | ||||
-rw-r--r-- | scripts/messages/message_template.msg.sha1 | 1 | ||||
-rw-r--r-- | scripts/template_verifier.py | 24 |
4 files changed, 30 insertions, 3 deletions
diff --git a/scripts/md5check.py b/scripts/md5check.py index 1a54a2844c..1a54a2844c 100755..100644 --- a/scripts/md5check.py +++ b/scripts/md5check.py diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 77dc940335..d292653d3f 100644 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -2966,7 +2966,7 @@ version 2.0 { BillableFactor F32 } { ObjectBonusFactor F32 } { WaterHeight F32 } - { TerrainRaiseLimit F32 } + { TerrainRaiseLimit F32 } { TerrainLowerLimit F32 } { PricePerMeter S32 } { RedirectGridX S32 } @@ -4242,6 +4242,10 @@ version 2.0 Buttons Variable { ButtonLabel Variable 1 } } + { + OwnerData Variable + { OwnerID LLUUID } + } } @@ -6762,6 +6766,8 @@ version 2.0 } // And, the money transfer +// *NOTE: Unused as of 2010-04-06, because all back-end money transactions +// are done with web services via L$ API. JC { MoneyTransferBackend Low 312 Trusted Zerocoded { diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 new file mode 100644 index 0000000000..4b1ba7e2d3 --- /dev/null +++ b/scripts/messages/message_template.msg.sha1 @@ -0,0 +1 @@ +ee062c94248e9af06df5284f7186893a135084c9
\ No newline at end of file diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py index 7f3fed88a9..b44410cdd8 100644 --- a/scripts/template_verifier.py +++ b/scripts/template_verifier.py @@ -66,6 +66,7 @@ add_indra_lib_path() import optparse import os import urllib +import hashlib from indra.ipc import compatibility from indra.ipc import tokenstream @@ -228,11 +229,14 @@ http://wiki.secondlife.com/wiki/Template_verifier.py """) parser.add_option( '-u', '--master_url', type='string', dest='master_url', - default='http://secondlife.com/app/message_template/master_message_template.msg', + default='http://bitbucket.org/lindenlab/master-message-template/raw/tip/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.""") options, args = parser.parse_args(sysargs) @@ -269,8 +273,18 @@ http://wiki.secondlife.com/wiki/Template_verifier.py print "current:", current_filename current_url = 'file://%s' % current_filename - # retrieve the contents of the local template and check for syntax + # retrieve the contents of the local template current = fetch(current_url) + hexdigest = hashlib.sha1(current).hexdigest() + if not options.force_verification: + # Early exist if the template hasn't changed. + sha_url = "%s.sha1" % current_url + current_sha = fetch(sha_url) + if hexdigest == current_sha: + print "Message template SHA_1 has not changed." + sys.exit(0) + + # and check for syntax current_parsed = llmessage.parseTemplateString(current) if options.cache_master: @@ -301,6 +315,12 @@ http://wiki.secondlife.com/wiki/Template_verifier.py if acceptable: explain("--- PASS ---", compat) + if options.force_verification == False: + print "Updating sha1 to %s" % hexdigest + sha_filename = "%s.sha1" % current_filename + sha_file = open(sha_filename, 'w') + sha_file.write(hexdigest) + sha_file.close() else: explain("*** FAIL ***", compat) return 1 |