mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
Update prebuilt.py to set permissions correctly on created Packages file.
Since the local Packages file is a temporary file, other users won't have permissions to read it. rsync copies those permissions over to the remote server. To ensure remote server has the right permissions, we need to use chmod a+r on either the local file or the remote file. In this case, I chose to run rsync on the remote file. TEST=rsync -av --chmod=a+r foo bar and verify permissions are added to bar. BUG=chromium-os:5311 Change-Id: Iee4c8df00b36b9f9434546603195ea1906b289f1 Review URL: http://codereview.chromium.org/5501001
This commit is contained in:
parent
7efdebf35f
commit
a8ae0bc63b
@ -441,11 +441,12 @@ def UploadPrebuilt(build_path, upload_location, version, binhost_base_url,
|
||||
ssh_server, remote_path = remote_location.split(':', 1)
|
||||
d = { 'pkg_index': tmp_packages_file.name,
|
||||
'pkgs': pkgs,
|
||||
'remote_packages': '%s/Packages' % remote_location.rstrip('/'),
|
||||
'remote_path': remote_path,
|
||||
'remote_location': remote_location,
|
||||
'ssh_server': ssh_server }
|
||||
cmds = ['ssh %(ssh_server)s mkdir -p %(remote_path)s' % d,
|
||||
'rsync -av %(pkg_index)s %(remote_location)s/Packages' % d]
|
||||
'rsync -av --chmod=a+r %(pkg_index)s %(remote_packages)s' % d]
|
||||
if pkgs:
|
||||
cmds.append('rsync -Rav %(pkgs)s %(remote_location)s/' % d)
|
||||
for cmd in cmds:
|
||||
|
Loading…
x
Reference in New Issue
Block a user