Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B9A43200CF7 for ; Tue, 19 Sep 2017 22:30:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B80F81609DD; Tue, 19 Sep 2017 20:30:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0BFAC1609BF for ; Tue, 19 Sep 2017 22:30:54 +0200 (CEST) Received: (qmail 3211 invoked by uid 500); 19 Sep 2017 20:30:54 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 3202 invoked by uid 500); 19 Sep 2017 20:30:54 -0000 Delivered-To: apmail-libcloud-commits@libcloud.apache.org Received: (qmail 3199 invoked by uid 99); 19 Sep 2017 20:30:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Sep 2017 20:30:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0C00DE08F6; Tue, 19 Sep 2017 20:30:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tomaz@apache.org To: commits@libcloud.apache.org Date: Tue, 19 Sep 2017 20:30:54 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/11] libcloud git commit: Add a tox check which verifies we don't have any file which name is longer than 143 characters. archived-at: Tue, 19 Sep 2017 20:30:55 -0000 Repository: libcloud Updated Branches: refs/heads/trunk a594266de -> cbae34ad0 Add a tox check which verifies we don't have any file which name is longer than 143 characters. 143 characters seems to be the limit for ecryptfs file system layered on top of ext4. Source: https://askubuntu.com/questions/361976/find-files-with-a-minimum-filename-length Part of LIBCLOUD-946. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/60701af4 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/60701af4 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/60701af4 Branch: refs/heads/trunk Commit: 60701af4e610b9eeb4e3c60034300148933d69ba Parents: 59b44a0 Author: Tomaz Muraus Authored: Tue Sep 19 18:00:09 2017 +0200 Committer: Tomaz Muraus Committed: Tue Sep 19 18:14:41 2017 +0200 ---------------------------------------------------------------------- contrib/check_file_names.sh | 34 ++++++++++++++++++++++++++++++++++ tox.ini | 5 ++++- 2 files changed, 38 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/60701af4/contrib/check_file_names.sh ---------------------------------------------------------------------- diff --git a/contrib/check_file_names.sh b/contrib/check_file_names.sh new file mode 100755 index 0000000..6474347 --- /dev/null +++ b/contrib/check_file_names.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Script which checks there are no files which name is longer +# than the allowed limit +# ext4 support file name up to 255 characters long, but layering +# ecrypt on top of it drops the limit to 143 characters + +FILE_NAME_LENGTH_LIMIT=143 + +FILES=$(find libcloud/ -regextype posix-basic -regex ".*/.\{${FILE_NAME_LENGTH_LIMIT},\}") + +if [ "${FILES}" ]; then + echo "Found files which name is longer than ${FILE_NAME_LENGTH_LIMIT} characters" + echo "${FILES}" + exit 1 +fi + +exit 0 http://git-wip-us.apache.org/repos/asf/libcloud/blob/60701af4/tox.ini ---------------------------------------------------------------------- diff --git a/tox.ini b/tox.ini index f33912e..1f6983b 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py python setup.py test basepython = py2.6: python2.6 - {py2.7,lint,pylint,coverage}: python2.7 + {py2.7,checks,lint,pylint,coverage}: python2.7 docs: python3.5 pypypy: pypy pypypy3: pypy3 @@ -85,6 +85,9 @@ commands = flake8 --ignore=E402 --exclude="test" libcloud/ flake8 --ignore=E402,E902 --max-line-length=160 contrib/ python -mjson.tool libcloud/data/pricing.json +[testenv:checks] +commands = ./contrib/check_file_names.sh + [testenv:integration] deps = -r{toxinidir}/integration/requirements.txt