diff options
author | Unit 193 <unit193@ubuntu.com> | 2019-07-13 21:03:34 -0400 |
---|---|---|
committer | Unit 193 <unit193@ubuntu.com> | 2019-07-13 23:09:21 -0400 |
commit | 91ad709de018d524a241d796da1698eaf9206e68 (patch) | |
tree | 8e4d1c91c7b9223c563a937e55d64eeccbe0f065 | |
parent | 4b168e80f105e7d93f19a5cbd691593eb1f95778 (diff) | |
download | mini-dinstall-91ad709de018d524a241d796da1698eaf9206e68.tar.bz2 mini-dinstall-91ad709de018d524a241d796da1698eaf9206e68.tar.xz mini-dinstall-91ad709de018d524a241d796da1698eaf9206e68.tar.zst |
Deprecate chown_changes_files in favor of restrict_changes_files.
Closes: #821960
-rw-r--r-- | doc/mini-dinstall.1 | 2 | ||||
-rw-r--r-- | doc/mini-dinstall.conf | 2 | ||||
-rwxr-xr-x | mini-dinstall | 11 |
3 files changed, 11 insertions, 4 deletions
diff --git a/doc/mini-dinstall.1 b/doc/mini-dinstall.1 index 65aae30..ab195c4 100644 --- a/doc/mini-dinstall.1 +++ b/doc/mini-dinstall.1 @@ -243,7 +243,7 @@ Sources for the \(lqsubdir\(rq style should look like: .RE .RE .TP -.B chown_changes_files +.B restrict_changes_files Determines if the changes files should be made unreadable by others. This is enabled by default, and is a good thing, since somebody else could unexpectedly upload your package. Think carefully before changing this. diff --git a/doc/mini-dinstall.conf b/doc/mini-dinstall.conf index 1dabe52..999a31c 100644 --- a/doc/mini-dinstall.conf +++ b/doc/mini-dinstall.conf @@ -106,7 +106,7 @@ dynamic_reindex = yes # default. This will protect you from other people unexpectedly # uploading your packages. Please think carefully about your security # before you change this! -chown_changes_files = yes +restrict_changes_files = yes # Whether or not to use /usr/bin/dnotify. This doesn't work on some # systems, so you might want to disable it. Only used if diff --git a/mini-dinstall b/mini-dinstall index f9d8ec1..9874ee8 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -384,7 +384,8 @@ class DistOptionHandler: 'post_install_script': ['str', None], 'pre_install_script': ['str', None], 'dynamic_reindex': ['bool', True], - 'chown_changes_files': ['bool', True], + 'restrict_changes_files': ['bool', None], + 'chown_changes_files': ['bool', None], 'keep_old': ['bool', False], 'mail_on_success': ['bool', True], 'tweet_on_success': ['bool', False], @@ -435,6 +436,12 @@ for dist in list(distributions.keys()): distributions[dist] = distoptionhandler.get_option_map(dist) if distributions[dist]['archive_style'] not in ('simple-subdir', 'flat'): raise DinstallException('Unknown archive style "%s"' % distributions[dist]['archive_style']) + if distributions[dist]['chown_changes_files'] is not None: + logger.warn("'chown_changes_files' is deprecated, please use 'restrict_changes_files' instead") + if distributions[dist]['restrict_changes_files'] is None: + distributions[dist]['restrict_changes_files'] = distributions[dist]['chown_changes_files'] + if distributions[dist]['restrict_changes_files'] is None: + distributions[dist]['restrict_changes_files'] = True logger.debug("Distributions: %s" % distributions) @@ -803,7 +810,7 @@ class ArchiveDir: self._logger.exception('Failed to process "%s"' % changefilename) self._reject_changefile(changefilename, changefile, e) return False - if self._chown_changes_files: + if self._restrict_changes_files: do_chmod(changefilename, 0o600) target = os.path.join(self._dir, os.path.basename(changefilename)) # the final step |