Revert "Dealing with trailing whitespaces"

The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319.

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2015-03-25 09:56:49 -06:00
parent f08e9f44a9
commit 0252ad0adc
21 changed files with 111 additions and 145 deletions

View File

@ -113,7 +113,7 @@ It is the responsibility of the subsystem maintainers to process patches affecti
manner. manner.
* If the change affects areas of the code which are not part of a subsystem, * If the change affects areas of the code which are not part of a subsystem,
or if subsystem maintainers are unable to reach a timely decision, it must be approved by or if subsystem maintainers are unable to reach a timely decision, it must be approved by
the core maintainers. the core maintainers.
* If the change affects the UI or public APIs, or if it represents a major change in architecture, * If the change affects the UI or public APIs, or if it represents a major change in architecture,
@ -200,11 +200,11 @@ for each.
2-code-review = "requires more code changes" 2-code-review = "requires more code changes"
1-design-review = "raises design concerns" 1-design-review = "raises design concerns"
4-merge = "general case" 4-merge = "general case"
# Docs approval # Docs approval
[Rules.review.docs-approval] [Rules.review.docs-approval]
# Changes and additions to docs must be reviewed and approved (LGTM'd) by a minimum of two docs sub-project maintainers. # Changes and additions to docs must be reviewed and approved (LGTM'd) by a minimum of two docs sub-project maintainers.
# If the docs change originates with a docs maintainer, only one additional LGTM is required (since we assume a docs maintainer approves of their own PR). # If the docs change originates with a docs maintainer, only one additional LGTM is required (since we assume a docs maintainer approves of their own PR).
# Merge # Merge
[Rules.review.states.4-merge] [Rules.review.states.4-merge]
@ -268,7 +268,7 @@ made through a pull request.
# The chief architect is responsible for the overall integrity of the technical architecture # The chief architect is responsible for the overall integrity of the technical architecture
# across all subsystems, and the consistency of APIs and UI. # across all subsystems, and the consistency of APIs and UI.
# #
# Changes to UI, public APIs and overall architecture (for example a plugin system) must # Changes to UI, public APIs and overall architecture (for example a plugin system) must
# be approved by the chief architect. # be approved by the chief architect.
"Chief Architect" = "shykes" "Chief Architect" = "shykes"
@ -314,7 +314,7 @@ made through a pull request.
] ]
# The chief maintainer is responsible for all aspects of quality for the project including # The chief maintainer is responsible for all aspects of quality for the project including
# code reviews, usability, stability, security, performance, etc. # code reviews, usability, stability, security, performance, etc.
# The most important function of the chief maintainer is to lead by example. On the first # The most important function of the chief maintainer is to lead by example. On the first
# day of a new maintainer, the best advice should be "follow the C.M.'s example and you'll # day of a new maintainer, the best advice should be "follow the C.M.'s example and you'll
# be fine". # be fine".
@ -359,9 +359,9 @@ made through a pull request.
# has a dedicated group of maintainers, which are dedicated to that subsytem and responsible # has a dedicated group of maintainers, which are dedicated to that subsytem and responsible
# for its quality. # for its quality.
# This "cellular division" is the primary mechanism for scaling maintenance of the project as it grows. # This "cellular division" is the primary mechanism for scaling maintenance of the project as it grows.
# #
# The maintainers of each subsytem are responsible for: # The maintainers of each subsytem are responsible for:
# #
# 1. Exposing a clear road map for improving their subsystem. # 1. Exposing a clear road map for improving their subsystem.
# 2. Deliver prompt feedback and decisions on pull requests affecting their subsystem. # 2. Deliver prompt feedback and decisions on pull requests affecting their subsystem.
# 3. Be available to anyone with questions, bug reports, criticism etc. # 3. Be available to anyone with questions, bug reports, criticism etc.
@ -371,9 +371,9 @@ made through a pull request.
# road map of the project. # road map of the project.
# #
# #### How to review patches to your subsystem # #### How to review patches to your subsystem
# #
# Accepting pull requests: # Accepting pull requests:
# #
# - If the pull request appears to be ready to merge, give it a `LGTM`, which # - If the pull request appears to be ready to merge, give it a `LGTM`, which
# stands for "Looks Good To Me". # stands for "Looks Good To Me".
# - If the pull request has some small problems that need to be changed, make # - If the pull request has some small problems that need to be changed, make
@ -384,9 +384,9 @@ made through a pull request.
# - If the PR only needs a few changes before being merged, any MAINTAINER can # - If the PR only needs a few changes before being merged, any MAINTAINER can
# make a replacement PR that incorporates the existing commits and fixes the # make a replacement PR that incorporates the existing commits and fixes the
# problems before a fast track merge. # problems before a fast track merge.
# #
# Closing pull requests: # Closing pull requests:
# #
# - If a PR appears to be abandoned, after having attempted to contact the # - If a PR appears to be abandoned, after having attempted to contact the
# original contributor, then a replacement PR may be made. Once the # original contributor, then a replacement PR may be made. Once the
# replacement PR is made, any contributor may close the original one. # replacement PR is made, any contributor may close the original one.
@ -584,12 +584,12 @@ made through a pull request.
Name = "Solomon Hykes" Name = "Solomon Hykes"
Email = "solomon@docker.com" Email = "solomon@docker.com"
GitHub = "shykes" GitHub = "shykes"
[people.spf13] [people.spf13]
Name = "Steve Francia" Name = "Steve Francia"
Email = "steve.francia@gmail.com" Email = "steve.francia@gmail.com"
GitHub = "spf13" GitHub = "spf13"
[people.sven] [people.sven]
Name = "Sven Dowideit" Name = "Sven Dowideit"
Email = "SvenDowideit@home.org.au" Email = "SvenDowideit@home.org.au"

View File

@ -77,7 +77,7 @@ test-docker-py: build
$(DOCKER_RUN_DOCKER) hack/make.sh binary test-docker-py $(DOCKER_RUN_DOCKER) hack/make.sh binary test-docker-py
validate: build validate: build
$(DOCKER_RUN_DOCKER) hack/make.sh validate-gofmt validate-dco validate-toml validate-spaces $(DOCKER_RUN_DOCKER) hack/make.sh validate-gofmt validate-dco validate-toml
shell: build shell: build
$(DOCKER_RUN_DOCKER) bash $(DOCKER_RUN_DOCKER) bash

4
NOTICE
View File

@ -10,9 +10,9 @@ The following is courtesy of our legal counsel:
Use and transfer of Docker may be subject to certain restrictions by the Use and transfer of Docker may be subject to certain restrictions by the
United States and other governments. United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not It is your responsibility to ensure that your use and/or transfer does not
violate applicable laws. violate applicable laws.
For more information, please see http://www.bis.doc.gov For more information, please see http://www.bis.doc.gov

View File

@ -22,7 +22,7 @@
# must have access to the socket for the completions to function correctly # must have access to the socket for the completions to function correctly
# #
# Note for developers: # Note for developers:
# Please arrange options sorted alphabetically by long name with the short # Please arrange options sorted alphabetically by long name with the short
# options immediately following their corresponding long form. # options immediately following their corresponding long form.
# This order should be applied to lists, alternatives and code blocks. # This order should be applied to lists, alternatives and code blocks.
@ -257,8 +257,8 @@ _docker_build() {
;; ;;
--file|-f) --file|-f)
_filedir _filedir
return return
;; ;;
esac esac
case "$cur" in case "$cur" in

View File

@ -3,7 +3,7 @@
# AUTHOR: Jessica Frazelle <jess@docker.com> # AUTHOR: Jessica Frazelle <jess@docker.com>
# COMMENTS: # COMMENTS:
# This file describes how to build a gparted container with all # This file describes how to build a gparted container with all
# dependencies installed. It uses native X11 unix socket. # dependencies installed. It uses native X11 unix socket.
# Tested on Debian Jessie # Tested on Debian Jessie
# USAGE: # USAGE:
# # Download gparted Dockerfile # # Download gparted Dockerfile

View File

@ -10,11 +10,11 @@ cat <<-EOF
Description=$desc Description=$desc
Author=$auth Author=$auth
After=docker.service After=docker.service
[Service] [Service]
ExecStart=/usr/bin/docker start -a $cid ExecStart=/usr/bin/docker start -a $cid
ExecStop=/usr/bin/docker stop -t 2 $cid ExecStop=/usr/bin/docker stop -t 2 $cid
[Install] [Install]
WantedBy=local.target WantedBy=local.target
EOF EOF

View File

@ -1,5 +1,5 @@
# /etc/sysconfig/docker # /etc/sysconfig/docker
# #
# Other arguments to pass to the docker daemon process # Other arguments to pass to the docker daemon process
# These will be parsed by the sysv initscript and appended # These will be parsed by the sysv initscript and appended
# to the arguments list passed to docker -d # to the arguments list passed to docker -d

View File

@ -14,9 +14,9 @@ justTar=
usage() { usage() {
echo >&2 echo >&2
echo >&2 "usage: $0 [options] repo suite [mirror]" echo >&2 "usage: $0 [options] repo suite [mirror]"
echo >&2 echo >&2
echo >&2 'options: (not recommended)' echo >&2 'options: (not recommended)'
echo >&2 " -p set an http_proxy for debootstrap" echo >&2 " -p set an http_proxy for debootstrap"
@ -26,20 +26,20 @@ usage() {
echo >&2 " -s # skip version detection and tagging (ie, precise also tagged as 12.04)" echo >&2 " -s # skip version detection and tagging (ie, precise also tagged as 12.04)"
echo >&2 " # note that this will also skip adding universe and/or security/updates to sources.list" echo >&2 " # note that this will also skip adding universe and/or security/updates to sources.list"
echo >&2 " -t # just create a tarball, especially for dockerbrew (uses repo as tarball name)" echo >&2 " -t # just create a tarball, especially for dockerbrew (uses repo as tarball name)"
echo >&2 echo >&2
echo >&2 " ie: $0 username/debian squeeze" echo >&2 " ie: $0 username/debian squeeze"
echo >&2 " $0 username/debian squeeze http://ftp.uk.debian.org/debian/" echo >&2 " $0 username/debian squeeze http://ftp.uk.debian.org/debian/"
echo >&2 echo >&2
echo >&2 " ie: $0 username/ubuntu precise" echo >&2 " ie: $0 username/ubuntu precise"
echo >&2 " $0 username/ubuntu precise http://mirrors.melbourne.co.uk/ubuntu/" echo >&2 " $0 username/ubuntu precise http://mirrors.melbourne.co.uk/ubuntu/"
echo >&2 echo >&2
echo >&2 " ie: $0 -t precise.tar.bz2 precise" echo >&2 " ie: $0 -t precise.tar.bz2 precise"
echo >&2 " $0 -t wheezy.tgz wheezy" echo >&2 " $0 -t wheezy.tgz wheezy"
echo >&2 " $0 -t wheezy-uk.tar.xz wheezy http://ftp.uk.debian.org/debian/" echo >&2 " $0 -t wheezy-uk.tar.xz wheezy http://ftp.uk.debian.org/debian/"
echo >&2 echo >&2
} }
@ -145,10 +145,10 @@ if [ -z "$strictDebootstrap" ]; then
sudo chroot . dpkg-divert --local --rename --add /sbin/initctl sudo chroot . dpkg-divert --local --rename --add /sbin/initctl
sudo ln -sf /bin/true sbin/initctl sudo ln -sf /bin/true sbin/initctl
# see https://github.com/docker/docker/issues/446#issuecomment-16953173 # see https://github.com/docker/docker/issues/446#issuecomment-16953173
# shrink the image, since apt makes us fat (wheezy: ~157.5MB vs ~120MB) # shrink the image, since apt makes us fat (wheezy: ~157.5MB vs ~120MB)
sudo chroot . apt-get clean sudo chroot . apt-get clean
if strings usr/bin/dpkg | grep -q unsafe-io; then if strings usr/bin/dpkg | grep -q unsafe-io; then
# while we're at it, apt is unnecessarily slow inside containers # while we're at it, apt is unnecessarily slow inside containers
# this forces dpkg not to call sync() after package extraction and speeds up install # this forces dpkg not to call sync() after package extraction and speeds up install
@ -159,7 +159,7 @@ if [ -z "$strictDebootstrap" ]; then
# (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584254#82), # (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584254#82),
# and ubuntu lucid/10.04 only has 1.15.5.6 # and ubuntu lucid/10.04 only has 1.15.5.6
fi fi
# we want to effectively run "apt-get clean" after every install to keep images small (see output of "apt-get clean -s" for context) # we want to effectively run "apt-get clean" after every install to keep images small (see output of "apt-get clean -s" for context)
{ {
aptGetClean='"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";' aptGetClean='"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";'
@ -167,17 +167,17 @@ if [ -z "$strictDebootstrap" ]; then
echo "APT::Update::Post-Invoke { ${aptGetClean} };" echo "APT::Update::Post-Invoke { ${aptGetClean} };"
echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";'
} | sudo tee etc/apt/apt.conf.d/no-cache > /dev/null } | sudo tee etc/apt/apt.conf.d/no-cache > /dev/null
# and remove the translations, too # and remove the translations, too
echo 'Acquire::Languages "none";' | sudo tee etc/apt/apt.conf.d/no-languages > /dev/null echo 'Acquire::Languages "none";' | sudo tee etc/apt/apt.conf.d/no-languages > /dev/null
# helpful undo lines for each the above tweaks (for lack of a better home to keep track of them): # helpful undo lines for each the above tweaks (for lack of a better home to keep track of them):
# rm /usr/sbin/policy-rc.d # rm /usr/sbin/policy-rc.d
# rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl # rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
# rm /etc/dpkg/dpkg.cfg.d/02apt-speedup # rm /etc/dpkg/dpkg.cfg.d/02apt-speedup
# rm /etc/apt/apt.conf.d/no-cache # rm /etc/apt/apt.conf.d/no-cache
# rm /etc/apt/apt.conf.d/no-languages # rm /etc/apt/apt.conf.d/no-languages
if [ -z "$skipDetection" ]; then if [ -z "$skipDetection" ]; then
# see also rudimentary platform detection in hack/install.sh # see also rudimentary platform detection in hack/install.sh
lsbDist='' lsbDist=''
@ -187,14 +187,14 @@ if [ -z "$strictDebootstrap" ]; then
if [ -z "$lsbDist" ] && [ -r etc/debian_version ]; then if [ -z "$lsbDist" ] && [ -r etc/debian_version ]; then
lsbDist='Debian' lsbDist='Debian'
fi fi
case "$lsbDist" in case "$lsbDist" in
Debian) Debian)
# add the updates and security repositories # add the updates and security repositories
if [ "$suite" != "$debianUnstable" -a "$suite" != 'unstable' ]; then if [ "$suite" != "$debianUnstable" -a "$suite" != 'unstable' ]; then
# ${suite}-updates only applies to non-unstable # ${suite}-updates only applies to non-unstable
sudo sed -i "p; s/ $suite main$/ ${suite}-updates main/" etc/apt/sources.list sudo sed -i "p; s/ $suite main$/ ${suite}-updates main/" etc/apt/sources.list
# same for security updates # same for security updates
echo "deb http://security.debian.org/ $suite/updates main" | sudo tee -a etc/apt/sources.list > /dev/null echo "deb http://security.debian.org/ $suite/updates main" | sudo tee -a etc/apt/sources.list > /dev/null
fi fi
@ -220,7 +220,7 @@ if [ -z "$strictDebootstrap" ]; then
;; ;;
esac esac
fi fi
# make sure our packages lists are as up to date as we can get them # make sure our packages lists are as up to date as we can get them
sudo chroot . apt-get update sudo chroot . apt-get update
sudo chroot . apt-get dist-upgrade -y sudo chroot . apt-get dist-upgrade -y
@ -229,23 +229,23 @@ fi
if [ "$justTar" ]; then if [ "$justTar" ]; then
# create the tarball file so it has the right permissions (ie, not root) # create the tarball file so it has the right permissions (ie, not root)
touch "$repo" touch "$repo"
# fill the tarball # fill the tarball
sudo tar --numeric-owner -caf "$repo" . sudo tar --numeric-owner -caf "$repo" .
else else
# create the image (and tag $repo:$suite) # create the image (and tag $repo:$suite)
sudo tar --numeric-owner -c . | $docker import - $repo:$suite sudo tar --numeric-owner -c . | $docker import - $repo:$suite
# test the image # test the image
$docker run -i -t $repo:$suite echo success $docker run -i -t $repo:$suite echo success
if [ -z "$skipDetection" ]; then if [ -z "$skipDetection" ]; then
case "$lsbDist" in case "$lsbDist" in
Debian) Debian)
if [ "$suite" = "$debianStable" -o "$suite" = 'stable' ] && [ -r etc/debian_version ]; then if [ "$suite" = "$debianStable" -o "$suite" = 'stable' ] && [ -r etc/debian_version ]; then
# tag latest # tag latest
$docker tag $repo:$suite $repo:latest $docker tag $repo:$suite $repo:latest
if [ -r etc/debian_version ]; then if [ -r etc/debian_version ]; then
# tag the specific debian release version (which is only reasonable to tag on debian stable) # tag the specific debian release version (which is only reasonable to tag on debian stable)
ver=$(cat etc/debian_version) ver=$(cat etc/debian_version)

View File

@ -29,41 +29,41 @@ function template() {
# this should always match the template from CONTRIBUTING.md # this should always match the template from CONTRIBUTING.md
cat <<- EOM cat <<- EOM
Description of problem: Description of problem:
\`docker version\`: \`docker version\`:
`${DOCKER_COMMAND} -D version` `${DOCKER_COMMAND} -D version`
\`docker info\`: \`docker info\`:
`${DOCKER_COMMAND} -D info` `${DOCKER_COMMAND} -D info`
\`uname -a\`: \`uname -a\`:
`uname -a` `uname -a`
Environment details (AWS, VirtualBox, physical, etc.): Environment details (AWS, VirtualBox, physical, etc.):
How reproducible: How reproducible:
Steps to Reproduce: Steps to Reproduce:
1. 1.
2. 2.
3. 3.
Actual Results: Actual Results:
Expected Results: Expected Results:
Additional info: Additional info:
EOM EOM
} }
@ -81,7 +81,7 @@ echo -ne "Do you use \`sudo\` to call docker? [y|N]: "
read -r -n 1 use_sudo read -r -n 1 use_sudo
echo "" echo ""
if [ "x${use_sudo}" = "xy" -o "x${use_sudo}" = "xY" ]; then if [ "x${use_sudo}" = "xy" -o "x${use_sudo}" = "xY" ]; then
export DOCKER_COMMAND="sudo ${DOCKER}" export DOCKER_COMMAND="sudo ${DOCKER}"
fi fi

View File

@ -6,7 +6,7 @@ FROM ubuntu
MAINTAINER SvenDowideit@docker.com MAINTAINER SvenDowideit@docker.com
# Add the PostgreSQL PGP key to verify their Debian packages. # Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc # It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
# Add PostgreSQL's repository. It contains the most recent stable release # Add PostgreSQL's repository. It contains the most recent stable release
@ -33,7 +33,7 @@ RUN /etc/init.d/postgresql start &&\
createdb -O docker docker createdb -O docker docker
# Adjust PostgreSQL configuration so that remote connections to the # Adjust PostgreSQL configuration so that remote connections to the
# database are possible. # database are possible.
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf`` # And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf``

View File

@ -45,7 +45,6 @@ DEFAULT_BUNDLES=(
validate-dco validate-dco
validate-gofmt validate-gofmt
validate-toml validate-toml
validate-spaces
binary binary

View File

@ -3,23 +3,23 @@
if [ -z "$VALIDATE_UPSTREAM" ]; then if [ -z "$VALIDATE_UPSTREAM" ]; then
# this is kind of an expensive check, so let's not do this twice if we # this is kind of an expensive check, so let's not do this twice if we
# are running more than one validate bundlescript # are running more than one validate bundlescript
VALIDATE_REPO='https://github.com/docker/docker.git' VALIDATE_REPO='https://github.com/docker/docker.git'
VALIDATE_BRANCH='master' VALIDATE_BRANCH='master'
if [ "$TRAVIS" = 'true' -a "$TRAVIS_PULL_REQUEST" != 'false' ]; then if [ "$TRAVIS" = 'true' -a "$TRAVIS_PULL_REQUEST" != 'false' ]; then
VALIDATE_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git" VALIDATE_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
VALIDATE_BRANCH="${TRAVIS_BRANCH}" VALIDATE_BRANCH="${TRAVIS_BRANCH}"
fi fi
VALIDATE_HEAD="$(git rev-parse --verify HEAD)" VALIDATE_HEAD="$(git rev-parse --verify HEAD)"
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH" git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)" VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD" VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD"
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD" VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
validate_diff() { validate_diff() {
if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then
git diff "$VALIDATE_COMMIT_DIFF" "$@" git diff "$VALIDATE_COMMIT_DIFF" "$@"

View File

@ -5,7 +5,7 @@ DEST=$1
if [ -z "$DOCKER_CLIENTONLY" ]; then if [ -z "$DOCKER_CLIENTONLY" ]; then
source "$(dirname "$BASH_SOURCE")/.dockerinit" source "$(dirname "$BASH_SOURCE")/.dockerinit"
hash_files "$DEST/dockerinit-$VERSION" hash_files "$DEST/dockerinit-$VERSION"
else else
# DOCKER_CLIENTONLY must be truthy, so we don't need to bother with dockerinit :) # DOCKER_CLIENTONLY must be truthy, so we don't need to bother with dockerinit :)

View File

@ -18,17 +18,17 @@ for d in "$CROSS/"*/*; do
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
mkdir -p "$DEST/$GOOS/$GOARCH" mkdir -p "$DEST/$GOOS/$GOARCH"
TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME.tgz" TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME.tgz"
mkdir -p "$DEST/build" mkdir -p "$DEST/build"
mkdir -p "$DEST/build/usr/local/bin" mkdir -p "$DEST/build/usr/local/bin"
cp -L "$d/$BINARY_FULLNAME" "$DEST/build/usr/local/bin/docker$BINARY_EXTENSION" cp -L "$d/$BINARY_FULLNAME" "$DEST/build/usr/local/bin/docker$BINARY_EXTENSION"
tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr
hash_files "$TGZ" hash_files "$TGZ"
rm -rf "$DEST/build" rm -rf "$DEST/build"
echo "Created tgz: $TGZ" echo "Created tgz: $TGZ"
done done

View File

@ -1,33 +0,0 @@
#!/bin/bash
source "$(dirname "$BASH_SOURCE")/.validate"
#Ignoring files from vendor/, builder/parser/testfiles*, docs/theme/mkdocs/tipuesearch*, ending with .md and .go
ignoreFiles='^builder/parser/testfiles*|^docs/theme/mkdocs/tipuesearch*|^vendor/|\.md$|\.go$'
IFS=$'\n'
files=( $(validate_diff --diff-filter=ACMR --name-only | grep -v "$ignoreFiles" || true) )
unset IFS
badFiles=()
for f in "${files[@]}"; do
if [ "$(git show "$VALIDATE_HEAD:$f" | grep '[[:space:]]$')" ]; then
badFiles+=( "$f" )
fi
done
if [ ${#badFiles[@]} -eq 0 ]; then
echo 'Congratulations! All text files are properly formatted.'
else
{
echo "These files have trailing whitespaces:"
for f in "${badFiles[@]}"; do
echo " - $f"
done
echo
echo 'Please reformat the above files using, for example:'
echo '"ex -sc "'"%s/[[:space:]]*$//g|x"'" file" and commit the result.'
echo
} >&2
false
fi

View File

@ -11,17 +11,17 @@ clone() {
vcs=$1 vcs=$1
pkg=$2 pkg=$2
rev=$3 rev=$3
pkg_url=https://$pkg pkg_url=https://$pkg
target_dir=src/$pkg target_dir=src/$pkg
echo -n "$pkg @ $rev: " echo -n "$pkg @ $rev: "
if [ -d $target_dir ]; then if [ -d $target_dir ]; then
echo -n 'rm old, ' echo -n 'rm old, '
rm -fr $target_dir rm -fr $target_dir
fi fi
echo -n 'clone, ' echo -n 'clone, '
case $vcs in case $vcs in
git) git)
@ -32,10 +32,10 @@ clone() {
hg clone --quiet --updaterev $rev $pkg_url $target_dir hg clone --quiet --updaterev $rev $pkg_url $target_dir
;; ;;
esac esac
echo -n 'rm VCS, ' echo -n 'rm VCS, '
( cd $target_dir && rm -rf .{git,hg} ) ( cd $target_dir && rm -rf .{git,hg} )
echo done echo done
} }

View File

@ -4624,7 +4624,7 @@ func TestBuildExoticShellInterpolation(t *testing.T) {
_, err := buildImage(name, ` _, err := buildImage(name, `
FROM busybox FROM busybox
ENV SOME_VAR a.b.c ENV SOME_VAR a.b.c
RUN [ "$SOME_VAR" = 'a.b.c' ] RUN [ "$SOME_VAR" = 'a.b.c' ]

View File

@ -23,20 +23,20 @@ Certificate:
7e:4e:78:7d:0a:9e:8f:42:43 7e:4e:78:7d:0a:9e:8f:42:43
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Basic Constraints: X509v3 Basic Constraints:
CA:FALSE CA:FALSE
Netscape Comment: Netscape Comment:
Easy-RSA Generated Certificate Easy-RSA Generated Certificate
X509v3 Subject Key Identifier: X509v3 Subject Key Identifier:
DE:42:EF:2D:98:A3:6C:A8:AA:E0:8C:71:2C:9D:64:23:A9:E2:7E:81 DE:42:EF:2D:98:A3:6C:A8:AA:E0:8C:71:2C:9D:64:23:A9:E2:7E:81
X509v3 Authority Key Identifier: X509v3 Authority Key Identifier:
keyid:66:EE:C3:17:3D:3D:AB:44:01:6B:6F:B2:99:19:BD:AA:02:B5:34:FB keyid:66:EE:C3:17:3D:3D:AB:44:01:6B:6F:B2:99:19:BD:AA:02:B5:34:FB
DirName:/C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain DirName:/C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
serial:FD:AB:EC:6A:84:27:04:A7 serial:FD:AB:EC:6A:84:27:04:A7
X509v3 Extended Key Usage: X509v3 Extended Key Usage:
TLS Web Client Authentication TLS Web Client Authentication
X509v3 Key Usage: X509v3 Key Usage:
Digital Signature Digital Signature
Signature Algorithm: sha1WithRSAEncryption Signature Algorithm: sha1WithRSAEncryption
1c:44:26:ea:e1:66:25:cb:e4:8e:57:1c:f6:b9:17:22:62:40: 1c:44:26:ea:e1:66:25:cb:e4:8e:57:1c:f6:b9:17:22:62:40:

View File

@ -23,20 +23,20 @@ Certificate:
1d:7b:6c:7b:be:89:6b:88:8b 1d:7b:6c:7b:be:89:6b:88:8b
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Basic Constraints: X509v3 Basic Constraints:
CA:FALSE CA:FALSE
Netscape Comment: Netscape Comment:
Easy-RSA Generated Certificate Easy-RSA Generated Certificate
X509v3 Subject Key Identifier: X509v3 Subject Key Identifier:
9E:F8:49:D0:A2:76:30:5C:AB:2B:8A:B5:8D:C6:45:1F:A7:F8:CF:85 9E:F8:49:D0:A2:76:30:5C:AB:2B:8A:B5:8D:C6:45:1F:A7:F8:CF:85
X509v3 Authority Key Identifier: X509v3 Authority Key Identifier:
keyid:DC:A5:F1:76:DB:4E:CD:8E:EF:B1:23:56:1D:92:80:99:74:3B:EA:6F keyid:DC:A5:F1:76:DB:4E:CD:8E:EF:B1:23:56:1D:92:80:99:74:3B:EA:6F
DirName:/C=US/ST=CA/L=SanFrancisco/O=Evil Inc/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain DirName:/C=US/ST=CA/L=SanFrancisco/O=Evil Inc/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
serial:E7:21:1E:18:41:1B:96:83 serial:E7:21:1E:18:41:1B:96:83
X509v3 Extended Key Usage: X509v3 Extended Key Usage:
TLS Web Client Authentication TLS Web Client Authentication
X509v3 Key Usage: X509v3 Key Usage:
Digital Signature Digital Signature
Signature Algorithm: sha1WithRSAEncryption Signature Algorithm: sha1WithRSAEncryption
48:76:c0:18:fa:0a:ee:4e:1a:ec:02:9d:d4:83:ca:94:54:a1: 48:76:c0:18:fa:0a:ee:4e:1a:ec:02:9d:d4:83:ca:94:54:a1:

View File

@ -23,22 +23,22 @@ Certificate:
a8:05:32:1e:f9:95:09:14:75 a8:05:32:1e:f9:95:09:14:75
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Basic Constraints: X509v3 Basic Constraints:
CA:FALSE CA:FALSE
Netscape Cert Type: Netscape Cert Type:
SSL Server SSL Server
Netscape Comment: Netscape Comment:
Easy-RSA Generated Server Certificate Easy-RSA Generated Server Certificate
X509v3 Subject Key Identifier: X509v3 Subject Key Identifier:
14:02:FD:FD:DD:13:38:E0:71:EA:D1:BE:C0:0E:89:1A:2D:B6:19:06 14:02:FD:FD:DD:13:38:E0:71:EA:D1:BE:C0:0E:89:1A:2D:B6:19:06
X509v3 Authority Key Identifier: X509v3 Authority Key Identifier:
keyid:66:EE:C3:17:3D:3D:AB:44:01:6B:6F:B2:99:19:BD:AA:02:B5:34:FB keyid:66:EE:C3:17:3D:3D:AB:44:01:6B:6F:B2:99:19:BD:AA:02:B5:34:FB
DirName:/C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain DirName:/C=US/ST=CA/L=SanFrancisco/O=Fort-Funston/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
serial:FD:AB:EC:6A:84:27:04:A7 serial:FD:AB:EC:6A:84:27:04:A7
X509v3 Extended Key Usage: X509v3 Extended Key Usage:
TLS Web Server Authentication TLS Web Server Authentication
X509v3 Key Usage: X509v3 Key Usage:
Digital Signature, Key Encipherment Digital Signature, Key Encipherment
Signature Algorithm: sha1WithRSAEncryption Signature Algorithm: sha1WithRSAEncryption
40:0f:10:39:c4:b7:0f:0d:2f:bf:d2:16:cc:8e:d3:9a:fb:8b: 40:0f:10:39:c4:b7:0f:0d:2f:bf:d2:16:cc:8e:d3:9a:fb:8b:

View File

@ -23,22 +23,22 @@ Certificate:
9e:02:5c:be:65:98:a4:b4:b5 9e:02:5c:be:65:98:a4:b4:b5
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Basic Constraints: X509v3 Basic Constraints:
CA:FALSE CA:FALSE
Netscape Cert Type: Netscape Cert Type:
SSL Server SSL Server
Netscape Comment: Netscape Comment:
Easy-RSA Generated Server Certificate Easy-RSA Generated Server Certificate
X509v3 Subject Key Identifier: X509v3 Subject Key Identifier:
1F:E0:57:CA:CB:76:C9:C4:86:B9:EA:69:17:C0:F3:51:CE:95:40:EC 1F:E0:57:CA:CB:76:C9:C4:86:B9:EA:69:17:C0:F3:51:CE:95:40:EC
X509v3 Authority Key Identifier: X509v3 Authority Key Identifier:
keyid:DC:A5:F1:76:DB:4E:CD:8E:EF:B1:23:56:1D:92:80:99:74:3B:EA:6F keyid:DC:A5:F1:76:DB:4E:CD:8E:EF:B1:23:56:1D:92:80:99:74:3B:EA:6F
DirName:/C=US/ST=CA/L=SanFrancisco/O=Evil Inc/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain DirName:/C=US/ST=CA/L=SanFrancisco/O=Evil Inc/OU=changeme/CN=changeme/name=changeme/emailAddress=mail@host.domain
serial:E7:21:1E:18:41:1B:96:83 serial:E7:21:1E:18:41:1B:96:83
X509v3 Extended Key Usage: X509v3 Extended Key Usage:
TLS Web Server Authentication TLS Web Server Authentication
X509v3 Key Usage: X509v3 Key Usage:
Digital Signature, Key Encipherment Digital Signature, Key Encipherment
Signature Algorithm: sha1WithRSAEncryption Signature Algorithm: sha1WithRSAEncryption
04:93:0e:28:01:94:18:f0:8c:7c:d3:0c:ad:e9:b7:46:b1:30: 04:93:0e:28:01:94:18:f0:8c:7c:d3:0c:ad:e9:b7:46:b1:30: