Skip to content

Commit

Permalink
enable static build releases with CGO_ENABLED=0 (#1935)
Browse files Browse the repository at this point in the history
Also removing darwin build, since we do brew install.

Removing solaris since it doesn't build anymore.

Fixes #1933
  • Loading branch information
harshavardhana authored Dec 22, 2016
1 parent 4a96d65 commit d733d68
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 60 deletions.
90 changes: 33 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,13 @@ version Print version.
```

## 1. Download Minio Client

## GNU/Linux
### Binary Download
| Platform | Architecture | URL |
| ---------- | -------- |------|
|GNU/Linux|64-bit Intel|https://dl.minio.io/client/mc/release/linux-amd64/mc|
||32-bit Intel|https://dl.minio.io/client/mc/release/linux-386/mc|
||32-bit ARM|https://dl.minio.io/client/mc/release/linux-arm/mc|
|Apple OS X|64-bit Intel|https://dl.minio.io/client/mc/release/darwin-amd64/mc|
|Microsoft Windows|64-bit|https://dl.minio.io/client/mc/release/windows-amd64/mc.exe|
||32-bit|https://dl.minio.io/client/mc/release/windows-386/mc.exe |
|FreeBSD|64-bit|https://dl.minio.io/client/mc/release/freebsd-amd64/mc|
|Solaris/Illumos|64-bit|https://dl.minio.io/client/mc/release/solaris-amd64/mc|

### Install from Homebrew

Install minio packages using [Homebrew](http://brew.sh/)

```sh
brew install minio-mc
mc --help
```

### Install from Source

Source installation is intended only for developers and advanced users. `mc update` command does not support upgrading from source based installation. Please download official releases from https://minio.io/downloads/#minio-client.

If you do not have a working Golang environment, please follow [How to install Golang](https://docs.minio.io/docs/how-to-install-golang).

```sh

go get -u github.com/minio/mc

```

## 2. Run Minio Client


### GNU/Linux

```sh

Expand All @@ -69,24 +38,34 @@ chmod +x mc

```

### OS X
## macOS
### Homebrew
Install mc packages using [Homebrew](http://brew.sh/)

```sh

chmod 755 mc
./mc --help
brew install minio-mc
mc --help

```

### Microsoft Windows
## Microsoft Windows
### Binary Download
| Platform | Architecture | URL |
| ---------- | -------- |------|
|Microsoft Windows|64-bit|https://dl.minio.io/client/mc/release/windows-amd64/mc.exe|
||32-bit|https://dl.minio.io/client/mc/release/windows-386/mc.exe |

```sh

mc.exe --help

```

### Solaris/Illumos
## FreeBSD
### Binary Download
| Platform | Architecture | URL |
| ---------- | -------- |------|
|FreeBSD|64-bit|https://dl.minio.io/client/mc/release/freebsd-amd64/mc|

```sh

Expand All @@ -95,23 +74,22 @@ chmod 755 mc

```

### FreeBSD
## Install from Source
Source installation is intended only for developers and advanced users. `mc update` command does not support upgrading from source based installation. Please download official releases from https://minio.io/downloads/#minio-client.

If you do not have a working Golang environment, please follow [How to install Golang](https://docs.minio.io/docs/how-to-install-golang).

```sh

chmod 755 mc
./mc --help
go get -u github.com/minio/mc

```

## 3. Add a Cloud Storage Service

Note: If you are planning to use `mc` only on POSIX compatible filesystems, you may skip this step and proceed to **Step 4**.
## Add a Cloud Storage Service
If you are planning to use `mc` only on POSIX compatible filesystems, you may skip this step and proceed to [everyday use](#everyday-use).

To add one or more Amazon S3 compatible hosts, please follow the instructions below. `mc` stores all its configuration information in ``~/.mc/config.json`` file.

#### Usage

```sh

mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY> <API-SIGNATURE>
Expand All @@ -121,16 +99,15 @@ mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY
Alias is simply a short name to you cloud storage service. S3 end-point, access and secret keys are supplied by your cloud storage provider. API signature is an optional argument. By default, it is set to "S3v4".

### Example - Minio Cloud Storage

Minio server displays URL, access and secret keys.

```sh

mc config host add minio http://192.168.1.51 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12 S3v4

```
### Example - Amazon S3 Cloud Storage

### Example - Amazon S3 Cloud Storage
Get your AccessKeyID and SecretAccessKey by following [AWS Credentials Guide](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html).

```sh
Expand All @@ -140,7 +117,6 @@ mc config host add s3 https://s3.amazonaws.com BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo
```

### Example - Google Cloud Storage

Get your AccessKeyID and SecretAccessKey by following [Google Credentials Guide](https://cloud.google.com/storage/docs/migrating?hl=en#keys)

```sh
Expand All @@ -151,8 +127,7 @@ mc config host add gcs https://storage.googleapis.com BKIKJAA5BMMU2RHO6IBB V8f1

NOTE: Google Cloud Storage only supports Legacy Signature Version 2, so you have to pick - S3v2

## 4. Test Your Setup

## Test Your Setup
`mc` is pre-configured with https://play.minio.io:9000, aliased as "play". It is a hosted Minio server for testing and development purpose. To test Amazon S3, simply replace "play" with "s3" or the alias you used at the time of setup.

*Example:*
Expand All @@ -169,8 +144,8 @@ mc ls play
[2016-03-20 09:08:36 PDT] 0B s3git-test/

```
## 5. Everyday Use

<a name="everyday-use"></a>
## Everyday Use
You may add shell aliases to override your common Unix tools.

```sh
Expand All @@ -182,11 +157,12 @@ alias mkdir='mc mb'
alias pipe='mc pipe'

```
## 6. Explore Further

## Explore Further
- [Minio Client Complete Guide](https://docs.minio.io/docs/minio-client-complete-guide)
- [Minio Quickstart Guide](https://docs.minio.io/docs/minio-quickstart-guide)
- [The Minio documentation website](https://docs.minio.io)

## 7. Contribute
## Contribute to Minio Project
Please follow Minio [Contributor's Guide](https://github.com/minio/mc/blob/master/CONTRIBUTING.md)

[Contributors Guide](https://github.com/minio/mc/blob/master/CONTRIBUTING.md)
6 changes: 3 additions & 3 deletions buildscripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _init() {
fi

# List of supported architectures
SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 darwin/amd64 solaris/amd64 freebsd/amd64'
SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 freebsd/amd64'

## System binaries
CP=`which cp`
Expand All @@ -46,8 +46,8 @@ go_build() {
# Release shasum name
release_shasum="$release_str/$os-$arch/$(basename $package).shasum"

# Go build to build the binary.
GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin
# Using `go build` to build the binary.
CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin

# Create copy
if [ $os == "windows" ]; then
Expand Down

0 comments on commit d733d68

Please sign in to comment.