commit: bae954e2f69ee76d74570e30d6ddd1482ebad49b Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Tue May 5 13:13:52 2015 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Wed May 6 06:36:53 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bae954e2
Use consistent rules for filenames of ebuils and misc files. So far non-ebuild filenames were allowed to contain a : (colon). This is a problematic character as it is illegal in both Mac OS and MS-Windows (and there are Prefix profiles for these). Also it has a special meaning as path separator and as remote host indicator in scp and other programs. This limits the allowed characters in filenames to [A-Za-z0-9._+-] which is the same as IEEE Std 1003.1-2013, section 3.278, with the addition of the plus character. See also bug 411127. bin/repoman | 4 ++-- pym/portage/repository/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/repoman b/bin/repoman index e9c89c2..37e11b2 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1,5 +1,5 @@ #!/usr/bin/python -bO -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Next to do: dep syntax checking in mask files @@ -88,7 +88,7 @@ util.initialize_logger() # 14 is the length of DESCRIPTION="" max_desc_len = 100 -allowed_filename_chars="a-zA-Z0-9._-+:" +allowed_filename_chars="a-zA-Z0-9._+-" pv_toolong_re = re.compile(r'[0-9]{19,}') GPG_KEY_ID_REGEX = r'(0x)?([0-9a-fA-F]{8}|[0-9a-fA-F]{16}|[0-9a-fA-F]{24}|[0-9a-fA-F]{32}|[0-9a-fA-F]{40})!?' bad = create_color_func("BAD") diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 5da1810..e44b619 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -38,7 +38,7 @@ if sys.hexversion >= 0x3000000: basestring = str # Characters prohibited by repoman's file.name check. -_invalid_path_char_re = re.compile(r'[^a-zA-Z0-9._\-+:/]') +_invalid_path_char_re = re.compile(r'[^a-zA-Z0-9._\-+/]') _valid_profile_formats = frozenset( ['pms', 'portage-1', 'portage-2', 'profile-bashrcs', 'profile-set',