Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ addons:
matrix:
fast_finish: true
include:
- env: ENV=checks
python: 2.7
before_script: TOX_ENV=checks
- env: ENV=lint
python: 2.7
before_script: TOX_ENV=lint
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
Changes in current version of Apache Libcloud
---------------------------------------------

Common
~~~~~~

- Fix an issue with installation failing on some operating system and file
systems combinations (e.g. ecryptfs layered on top of ext4) which don't
support file names longer than 143 characters. (LIBCLOUD-946, GITHUB-1112)

Reported by Cyrille Verrier.
[Tomaz Muraus]

Compute
~~~~~~~

Expand Down
34 changes: 34 additions & 0 deletions contrib/check_file_names.sh
Original file line number Diff line number Diff line change
@@ -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-egrep -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
8 changes: 6 additions & 2 deletions libcloud/test/compute/test_azure_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class AzureNodeDriverTests(LibcloudTestCase):

TENANT_ID = '77777777-7777-7777-7777-777777777777'
SUBSCRIPTION_ID = '99999999-9999-9999-9999-999999999999'
SUBSCRIPTION_ID = '99999999'
APPLICATION_ID = '55555555-5555-5555-5555-555555555555'
APPLICATION_PASS = 'p4ssw0rd'

Expand Down Expand Up @@ -381,7 +381,11 @@ def _update(self, fixture, body):

def __getattr__(self, n):
def fn(method, url, body, headers):
fixture = self.fixtures.load(n + ".json")
# Note: We use shorter fixture name so we don't exceed 143
# character limit for file names
file_name = n.replace('99999999_9999_9999_9999_999999999999',
AzureNodeDriverTests.SUBSCRIPTION_ID)
fixture = self.fixtures.load(file_name + ".json")

if method in ('POST', 'PUT'):
try:
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down