chiark / gitweb /
update local_copy_dir rsync to handle FAT and filesystems with perms
authorHans-Christoph Steiner <hans@eds.org>
Thu, 3 Jul 2014 01:03:26 +0000 (21:03 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 14 Jul 2014 19:02:20 +0000 (15:02 -0400)
With FAT filesystems, the user, group, and permissions will not be at all
preserved.  With file systems like ext4 that have perms, the umask might
not be set to something that makes sense for the public repo files, which
are meant to be published and therefore readible by all.

If need be, it would be easy enough to add a config option for rsync's
chmod string, to address setups that have specific permissions needs.

fixes #23 https://gitlab.com/fdroid/fdroidserver/issues/23

fdroidserver/server.py

index 0911b5be72e6dbc9a48ae147a54fac28b814d734..9cf5b9196f156043d6ea82f6d3d3fba761d54cfd 100644 (file)
@@ -143,7 +143,8 @@ def update_serverwebroot(repo_section):
 
 
 def _local_sync(fromdir, todir):
-    rsyncargs = ['rsync', '--archive', '--one-file-system', '--delete']
+    rsyncargs = ['rsync', '--recursive', '--links', '--times',
+                 '--one-file-system', '--delete', '--chmod=Da+rx,Fa-x,a+r,u+w']
     # use stricter rsync checking on all files since people using offline mode
     # are already prioritizing security above ease and speed
     rsyncargs += ['--checksum']