Commit Graph

120 Commits

Author SHA1 Message Date
Kevin Alvarez c49f1ccb49
update cli-docs-tool to v0.5.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-06 19:15:34 +01:00
Sebastiaan van Stijn f2566760a8
Update AUTHORS header to indicate it's generated
Using both @generated, and using Go's format for generated files,
to match the format we now use on moby/moby.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-01 10:05:22 +01:00
Sebastiaan van Stijn 07ac2d8dc4
update to golang 1.19
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-08 10:40:06 +02:00
Sebastiaan van Stijn 6eec719d39
update cli-docs-tool to v0.5.0
release notes: https://github.com/docker/cli-docs-tool/releases/tag/v0.5.0

full diff: https://github.com/docker/cli-docs-tool/compare/v0.3.1...v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 16:56:44 +02:00
CrazyMax 6f799c1a1c
dockerfile: llvm needed on debian for cross comp
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 22:49:07 +02:00
CrazyMax 87b085c8cd
missing DWARF symbol table
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-25 11:27:09 +02:00
Sebastiaan van Stijn 94e08f2e2d
Makefile: don't warn "outside container" for some targets
This change allows some make targets to be ran outside the dev-container for
easier discovery and use:

- `make clean` can be used on the host (as artifacts created from within the
  development container are usually stored on the host).
- `make help` was already allowed
- `make dev` and `make shell` are added to the regular Makefile, to make it
  easier to create and start the development container.
- When attempting to run `make dev` from within the development container, a
  message is printed, and the target is cancelled:

      root@docker-cli-dev$ make dev
      you are already in the dev container

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 19:10:53 +02:00
Sebastiaan van Stijn 8fd92f1866
scripts/build: make sure build-time is in UTC
Before this:

    SOURCE_DATE_EPOCH=1606660000 DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ...
    + go build -o build/docker-darwin-amd64 -tags ' osusergo pkcs11' -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T15:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-590-g090dd58dc"' -buildmode=pie github.com/docker/cli/cmd/docker
    ...

    make -f docker.Makefile shell
    SOURCE_DATE_EPOCH=1606660000 make binary
    ...
    + go build -o build/docker-linux-amd64 -tags  -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.0-dev"' github.com/docker/cli/cmd/docker
    ...

Notice that `version.BuildTime` is `2020-11-29T15:26:40Z` outside the container,
and `2020-11-29T14:26:40Z` inside.

After this:

    SOURCE_DATE_EPOCH=1606660000 DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ...
    + go build -o build/docker-darwin-amd64 -tags ' osusergo pkcs11' -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-590-g090dd58dc.m"' -buildmode=pie github.com/docker/cli/cmd/docker
    ...

    make -f docker.Makefile shell
    SOURCE_DATE_EPOCH=1606660000 make binary
    ...
    + go build -o build/docker-linux-amd64 -tags  -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.0-dev"' github.com/docker/cli/cmd/docker
    ...

Notice that `version.BuildTime` is `2020-11-29T14:26:40Z` both outside and inside
the container.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 11:30:55 +02:00
Sebastiaan van Stijn 72ed7bd3e9
scripts/build: fix date formatting on macOS
This was introduced in 9d40c7464e, which added
support for `SOURCE_DATE_EPOCH` to override the build-time.

macOS uses the BSD flavor of `date`, which does not support the `--date` option
to set a custom time.

Before this:

    DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ./scripts/build/binary
    date: illegal option -- -
    usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
    [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

After this:

    DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ./scripts/build/binary
    Building static docker-darwin-amd64
    + go build -o build/docker-darwin-amd64 -tags ' osusergo pkcs11' -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=a4b6fe16a" -X "github.com/docker/cli/cli/version.BuildTime=2022-04-06T10:57:25Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-589-ga4b6fe16a.m"' -buildmode=pie github.com/docker/cli/cmd/docker
    ...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 11:30:19 +02:00
CrazyMax 22edabb584
fix version quad logic that trims 0 digit so returns an empty one
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-31 21:14:29 +02:00
CrazyMax 525845572a
trim leading 0 for minor in the version quad
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-31 15:54:39 +02:00
Sebastiaan van Stijn 391e6ad944
use GO_LDFLAGS instead of LDFLAGS to prevent inheriting unrelated options
When building on Fedora 36, the build failed. I suspect this is because the
rpm tools also set LDFLAGS, but with options that cannot be used;

    GO_LINKMODE=dynamic
    + ./scripts/build/binary
      /go/src/github.com/docker/cli ~/rpmbuild/BUILD/src
      Building dynamic docker-linux-arm64
      + go build -o build/docker-linux-arm64 -tags ' pkcs11' -ldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/root/rpmbuild/BUILD/src/.package_note-docker-ce-cli-0.0.0.20220330082637.68cad50-0.fc36.aarch64.ld -w -X "github.com/docker/cli/cli/version.GitCommit=68cad50" -X "github.com/docker/cli/cli/version.BuildTime=2022-03-30T20:05:36Z" -X "github.com/docker/cli/cli/version.Version=0.0.0-20220330082637-68cad50" -X "github.com/docker/cli/cli/version.PlatformName=Docker Engine - Community"' -buildmode=pie github.com/docker/cli/cmd/docker
    # github.com/docker/cli/cmd/docker
    flag provided but not defined: -Wl,-z,relro
    usage: link [options] main.o

This patch changes the variable we use to `GO_LDFLAGS`, taking a similar approach
as containerd, and various other projects using this name: https://grep.app/search?q=GO_LDFLAGS

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-31 10:30:56 +02:00
Sebastiaan van Stijn 4cd2d9ddd2
Change "COMPANY_NAME" to "PACKAGER_NAME"
The COMPANY_NAME currently sets the "CompanyName" field in the metadata
of Windows binaries. Our intent of this field is this field to contain
information about the company/party that produced the binary.

Also from [FileVersionInfo.CompanyName][FileVersionInfo.CompanyName]:

> Gets the name of the company that produced the file

Based on the above, "PACKAGER_NAME" is a bit more generic, and clearer
on intent, and we may at some point re-use this same information to
propagate equivalent fields on other platforms (rpms, debs)

[FileVersionInfo.CompanyName]: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.fileversioninfo.companyname

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 10:09:50 +02:00
Sebastiaan van Stijn f3a05eb800
vendor dependencies with go1.17
Some warnings about go1.16 compatibility, so including them here:

     + go mod tidy -modfile=vendor.mod
     github.com/docker/cli/cli/registry/client imports
           github.com/docker/distribution/registry/api/v2 imports
           github.com/gorilla/mux loaded from github.com/gorilla/mux@v1.7.0,
        but go 1.16 would select v1.8.0
     github.com/docker/cli/cli/compose/loader imports
        gopkg.in/yaml.v2 tested by
        gopkg.in/yaml.v2.test imports
        gopkg.in/check.v1 loaded from gopkg.in/check.v1@v1.0.0-20200227125254-8fa46927fb4f,
        but go 1.16 would select v1.0.0-20201130134442-10cb98267c6c
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/Shopify/logrus-bugsnag loaded from github.com/Shopify/logrus-bugsnag@v0.0.0-20170309145241-6dbc35f2c30d,
        but go 1.16 would select v0.0.0-20171204204709-577dee27f20d
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server/storage imports
        gopkg.in/rethinkdb/rethinkdb-go.v6 imports
        github.com/opentracing/opentracing-go loaded from github.com/opentracing/opentracing-go@v1.1.0,
        but go 1.16 would select v1.2.0
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server/storage imports
        gopkg.in/rethinkdb/rethinkdb-go.v6 imports
        github.com/opentracing/opentracing-go/ext loaded from github.com/opentracing/opentracing-go@v1.1.0,
        but go 1.16 would select v1.2.0
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server/storage imports
        gopkg.in/rethinkdb/rethinkdb-go.v6 imports
        github.com/opentracing/opentracing-go/log loaded from github.com/opentracing/opentracing-go@v1.1.0,
        but go 1.16 would select v1.2.0
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/spf13/viper imports
        github.com/spf13/afero loaded from github.com/spf13/afero@v1.1.2,
        but go 1.16 would select v1.2.2
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/spf13/viper imports
        github.com/spf13/cast loaded from github.com/spf13/cast@v1.3.0,
        but go 1.16 would select v1.3.1
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/spf13/viper imports
        github.com/spf13/jwalterweatherman loaded from github.com/spf13/jwalterweatherman@v1.0.0,
        but go 1.16 would select v1.1.0
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/spf13/viper imports
        gopkg.in/ini.v1 loaded from gopkg.in/ini.v1@v1.51.0,
        but go 1.16 would select v1.56.0
     github.com/docker/cli/cli/command imports
        github.com/theupdateframework/notary/client tested by
        github.com/theupdateframework/notary/client.test imports
        github.com/theupdateframework/notary/server imports
        github.com/theupdateframework/notary/utils imports
        github.com/spf13/viper imports
        github.com/spf13/afero imports
        github.com/spf13/afero/mem loaded from github.com/spf13/afero@v1.1.2,
        but go 1.16 would select v1.2.2

     To upgrade to the versions selected by go 1.16:
        go mod tidy -go=1.16 && go mod tidy -go=1.17
     If reproducibility with go 1.16 is not needed:
        go mod tidy -compat=1.17
     For other options, see:
        https://golang.org/doc/modules/pruning

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-26 19:48:14 +01:00
Sebastiaan van Stijn e20572d047
scripts/build: make sure osusergo is set for static with CGO enabled
Our previous CI probably did not cross-compile for s390x and ppc64le,
and therefore did not get these errors; the scripts/build/.variables
file sets CGO_ENABLED=1 for amd64|arm64|arm|s390x architectures if
it's not set;
87b8e57868/scripts/build/.variables (L34-L46)

When compiling statically with CGO enabled, we must have osusergo
enabled as well, so set it accordingly, to prevent;

    #53 [linux/amd64 build 2/2] RUN --mount=type=bind,target=.,ro     --mount=type=cache,target=/root/.cache     --mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk     --mount=type=tmpfs,target=cli/winresources     xx-go --wrap &&     TARGET=/out ./scripts/build/binary &&     xx-verify $([ "static" = "static" ] && echo "--static") /out/docker
    #53 953.6 # github.com/docker/cli/cmd/docker
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000022.o: in function `New':
    #53 953.6 /go/src/github.com/docker/cli/vendor/github.com/miekg/pkcs11/pkcs11.go:75: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000018.o: in function `mygetgrouplist':
    #53 953.6 /usr/local/go/src/os/user/getgrouplist_unix.go:18: warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000017.o: in function `mygetgrgid_r':
    #53 953.6 /usr/local/go/src/os/user/cgo_lookup_unix.go:40: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000017.o: in function `mygetgrnam_r':
    #53 953.6 /usr/local/go/src/os/user/cgo_lookup_unix.go:45: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000017.o: in function `mygetpwnam_r':
    #53 953.6 /usr/local/go/src/os/user/cgo_lookup_unix.go:35: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000017.o: in function `mygetpwuid_r':
    #53 953.6 /usr/local/go/src/os/user/cgo_lookup_unix.go:30: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #53 953.6 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-2402600021/000004.o: in function `_cgo_3c1cec0c9a4e_C2func_getaddrinfo':
    #53 953.6 /tmp/go-build/cgo-gcc-prolog:58: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-26 15:49:05 +01:00
CrazyMax 7dc35c03fc
validate manpages target
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:11:17 +01:00
CrazyMax a650f4ddd0
switch to cli-docs-tool for yaml docs generation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
switch to cli-docs-tool and validate yamldocs

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:11:16 +01:00
CrazyMax bea6c0d242
validate authors target
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:03:25 +01:00
Sebastiaan van Stijn 242857dd81
update/remove various tests and options related to kubernetes support
Remove various tests and utilities related to testing kubernetes support

Also removing the Kubernetes and DefaultStackOrchestrator from CreateOptions
and UpdateOptions, instead updating the flags to not be bound to a variable.

This might break some consumers of those options, but given that they've become
non-functional, that's probably ok (otherwise they may ignore the deprecation
warning and end up with non-functional code).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-24 17:53:18 +01:00
Sebastiaan van Stijn 5c4a395c52
scripts/vendor: run go mod tidy when vendoring
There was some debate about this, and wether or not tidy should be run
when vendoring, but without this, validation failed after running
`make vendor`, and manually doing a `go mod tidy` is complicated
(due to the `vendor.mod`, and because the cache is not inside the
build-cache, not on the host).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-28 11:35:36 +01:00
Sebastiaan van Stijn a4787cfc27
Merge pull request #3387 from crazy-max/vendor-gomod
vendor with go mod
2022-01-13 15:00:26 +01:00
CrazyMax 7e560ae76f
vendor with go mod
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-12-16 21:16:01 +01:00
CrazyMax 5fab1b2b10
ensure version quad for goversioninfo
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-12-10 10:50:23 +01:00
CrazyMax 4d93717ae5
ci: github actions test workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-12-07 14:50:22 +01:00
CrazyMax 62ea2bf1aa
GitHub Actions e2e tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-17 17:18:25 +01:00
CrazyMax dbac826815
Fix checkout behavior and FileVersion
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-12 10:48:31 +02:00
CrazyMax 75284bd1d1
Use goversioninfo to create Windows Version Info
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-11 16:54:22 +02:00
Silvin Lubecki aa949f2ad5
Merge pull request #3211 from crazy-max/gha
GitHub Actions for lint
2021-08-05 14:11:23 +02:00
CrazyMax 698c155478
GitHub Actions for lint
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-05 08:44:21 +02:00
Sebastiaan van Stijn c509ef7104
yamldocs: various improvements
- make sure the target directory is created if missing
- add support for custom ID's in headings through `<a>` tags (e.g.
  `<a name=heading2></a>`). This allows use of custom anchors that
  work both on GitHub (GFM doesn't support extended MarkDown), and
  in Jekyll (which does).
- add code to cleanup markdown for use in our docs:
    - remove absolute URLs to https://docs.docker.com
    - remove tabs in MarkDown, and convert them to 4 spaces. This
      prevents the YAML conversion from switching between "short"
      and "long" syntax. Tabs in code examples also don't always
      work well, so using spaces doesn't hurt for that.
- refactor some code for readability, and to be less "hacky" (still
  lots to be improved though)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-30 20:43:22 +02:00
Sebastiaan van Stijn a477a727fc
Update to go1.16.6
Keeping the dockerfiles/Dockerfile.cross image at 1.13, as we don't
have more current versions of that image. However, I don't think it's
still used, so we should remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-29 11:52:02 +02:00
Brian Goff 43dc024002
Merge pull request #2855 from Foxboron/morten/reprobuilds 2021-07-23 09:41:51 -07:00
Brian Goff 83e9eeb8a0 scripts: Allow skipping windres when WINDRES= (empty string)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-13 21:29:54 +00:00
Tibor Vass 2c40960ba1 scripts: use WINDRES env var if set
This allows setting WINDRES to mingw's windres.

For the record, mingw's windres needs --use-temp-file for a weird reason:
in that case, it keeps preprocessor arguments intact (including quotes),
without it, mingw's windres calls popen, which happens to pass the entire
command to sh -c, stripping quotes after evaluation and causing a syntax
error in mingw's windres.

To use mingw's windres, set WINDRES to:
- `x86_64-w64-mingw32-windres` on 64 bit
- `i686-w64-mingw32-windres` on 32 bit

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-13 16:55:00 +00:00
Tibor Vass 6e45f4bfe2 scripts: fix VERSION_QUAD corner case in windows resource
When the git checkout is dirty on top of a git tag (i.e., v20.10.6.m),
the VERSION_QUAD was keeping a trailing comma.
Now the trailing comma is stripped.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-13 16:52:53 +00:00
Tonis Tiigi 26b633d37b set default version from git
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-06 00:21:10 -07:00
Tonis Tiigi 8b822c9219 update windows resources generation
New solution is not hardcoded to amd64 but integrates
with the cross toolchain and support creating arm binaries.

Go has been updated so that ASLR works

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-06 00:20:59 -07:00
Tonis Tiigi 6423da8dcd dockerfile based binary building
Using cross compilation toolchains that work from any platform
Adds darwin/arm64 support and bake targets. Static and dynamic
binary targets are available, both with glibc and musl.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-06 00:20:21 -07:00
Arnaud Rebillout 6e2607c6a6 Rename bin/md2man to bin/go-md2man
In the recent PR !2877, some code was added to check if md2man is
already installed in the build environment. This is to cater to the
needs of Linux distributions.

However it turns out that Linux distributions install md2man as
bin/go-md2man instead of bin/md2man, hence the PR !2877 doesn't help
much.

This commit fixes it by settling on using the binary name go-md2man.

For reference, here the file list of the package go-md2man in several
distributions:

- Debian: <https://packages.debian.org/sid/amd64/go-md2man/filelist>
- Ubuntu: <https://packages.ubuntu.com/hirsute/amd64/go-md2man/filelist>
- Fedora: <https://fedora.pkgs.org/31/fedora-x86_64/golang-github-cpuguy83-md2man-2.0.0-0.4.20190624gitf79a8a8.fc31.x86_64.rpm.html>
- ArchLinux: <https://www.archlinux.org/packages/community/x86_64/go-md2man/>

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>
2020-12-16 10:20:00 +07:00
Morten Linderud 29bd82ba14
generate-man.sh: Only build md2man if it's not installed
Distributions uses generate-man.sh to create man pages, however it only
assumes a container environment and attempts to build binaries towards
`/go` which might be an illegal path in `fakeroot`.

This patch ensures we only build `md2man` from the vendored sources if
the command is not present. This allows distributions to supply thier
packaged `md2man`.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-12-09 23:06:18 +01:00
Morten Linderud 9d40c7464e
scripts/build/.variables: Support SOURCE_DATE_EPOCH
Repeated builds of docker is currently unreproducible as the embedded
time does not support SOURCE_DATE_EPOCH. This patch ensures we check for
the defined variable before utilizing current date.

This has been fixed previously with manpages as well

2d7091aaeb

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-11-29 16:07:46 +01:00
Sebastiaan van Stijn 43bc718895
Dockerfiles: update shellcheck v0.7.1
full diff: https://github.com/koalaman/shellcheck/compare/v0.7.0...v0.7.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-20 15:46:07 +02:00
Paul Mulders 05eebb8ccf scripts/make.ps1: actually define the CommitSuffix parameter
Signed-off-by: Paul Mulders <justinkb@gmail.com>
2020-07-10 14:36:22 +02:00
Madhur Batra 55451d3c75 Add checks for dependencies that are not vendored.
`make vendor` fails if any dependency is not vendored.

Signed-off-by: Madhur Batra <madhurbatra097@gmail.com>
2020-07-06 09:23:19 +00:00
Xiaodong Liu eeafa40154 -buildmode=pie is not supported for the mips arch
reference: 4c99c81326

Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
2020-05-12 09:14:36 +08:00
Sebastiaan van Stijn df5cedfc81
vendor: spf13/cobra v1.0.0, go-md2man v2.0.0, blackfriday v2.0.1
full diff: https://github.com/spf13/cobra/compare/v0.0.3...v1.0.0

Notable Changes

- Fish completion (including support for Go custom completion)
- API (urgent): Rename BashCompDirectives to ShellCompDirectives
- Remove/replace SetOutput on Command - deprecated
- Custom completions coded in Go (instead of Bash)
- Partial Revert of 922
- Correct documentation for InOrStdin
- Apply formatting to templates
- Revert change so help is printed on stdout again
- Update md2man to v2.0.0
- update viper to v1.4.0
- Update cmd/root.go example in README.md

vendor: update cpuguy83/go-md2man v2.0.0

full diff: https://github.com/cpuguy83/go-md2man/compare/v1.0.8...v2.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-04 17:00:46 +02:00
Sebastiaan van Stijn 7d407207c3
Merge pull request #2362 from silvin-lubecki/fix-windows-exentension
Add an exe extension to windows binary during cross build.
2020-03-03 17:22:55 +01:00
Stefan Scherer b1fd38fa77
Update Windows ico
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2020-03-02 13:02:29 +01:00
Silvin Lubecki 40aa020534 Add an exe extension to windows binary during cross build.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-02-27 15:34:23 +01:00
Sebastiaan van Stijn d443b74091
Merge pull request #1856 from arthrp/master
Forcing the creation of tmp directory
2020-01-20 14:04:39 +01:00