Add azcopy and dcos-cli SPECS (#3297)

* Add azcopy and dcos-cli SPECS

* Update change log for azcopy dcos-cli SPECS
This commit is contained in:
chalamalasetty 2022-07-04 21:34:21 -07:00 committed by GitHub
parent 8472d2ac15
commit 4c12ae94e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 150 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -1944,6 +1944,7 @@
"license": "[Microsoft MIT License](/LICENSES-AND-NOTICES/LICENSE.md)",
"specs": [
"application-gateway-kubernetes-ingress",
"azcopy",
"azure-iot-sdk-c",
"azure-storage-cpp",
"bazel",
@ -1961,6 +1962,7 @@
"coredns-1.8.4",
"coredns-1.8.6",
"dbus-x11",
"dcos-cli",
"debugedit",
"dejavu-fonts",
"distroless-packages",

View File

@ -0,0 +1,6 @@
{
"Signatures": {
"azure-storage-azcopy-10.15.0.tar.gz": "f850ee5f3d45d3769d9929a98abc3d2b997e90ad4fd6dc49a487b248e6e8d78c",
"azure-storage-azcopy-10.15.0-vendor.tar.gz": "bf1719f4db07dc4b5102ecde72a85fa646fe85730a506d635cb3c4e49e8b162b"
}
}

66
SPECS/azcopy/azcopy.spec Normal file
View File

@ -0,0 +1,66 @@
Summary: The new Azure Storage data transfer utility - AzCopy v10
Name: azcopy
Version: 10.15.0
Release: 1%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Applications/Tools
URL: https://github.com/Azure/azure-storage-azcopy
Source0: https://github.com/Azure/azure-storage-azcopy/archive/refs/tags/v%{version}.tar.gz#/azure-storage-%{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# How to re-build this file:
# 1. wget https://github.com/Azure/azure-storage-azcopy/archive/refs/tags/v%{version}.tar.gz -O azure-storage-%{name}-%{version}.tar.gz
# 2. tar -xf azure-storage-%{name}-%{version}.tar.gz
# 3. cd azure-storage-%{name}-%{version}
# 4. go mod vendor
# 5. tar --sort=name \
# --mtime="2021-04-26 00:00Z" \
# --owner=0 --group=0 --numeric-owner \
# --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
# -cf azure-storage-%{name}-%{version}-vendor.tar.gz vendor
#
# NOTES:
# - You require GNU tar version 1.28+.
# - The additional options enable generation of a tarball with the same hash every time regardless of the environment.
# See: https://reproducible-builds.org/docs/archives/
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
Source1: azure-storage-%{name}-%{version}-vendor.tar.gz
BuildRequires: golang >= 1.17.9
BuildRequires: git
%global debug_package %{nil}
%define our_gopath %{_topdir}/.gopath
%description
AzCopy v10 is a command-line utility that you can use to copy data to
and from containers and file shares in Azure Storage accounts.
AzCopy V10 presents easy-to-use commands that are optimized for high
performance and throughput.
%prep
%setup -q -n azure-storage-%{name}-%{version}
%build
tar --no-same-owner -xf %{SOURCE1}
export GOPATH=%{our_gopath}
go build -buildmode=pie -mod=vendor
%install
install -D -m 0755 ./azure-storage-azcopy %{buildroot}%{_bindir}/azcopy
%check
go test -mod=vendor
./azure-storage-azcopy --version
%files
%defattr(-,root,root)
%license LICENSE
%doc NOTICE.txt README.md
%{_bindir}/azcopy
%changelog
* Fri Jul 01 2022 Suresh Babu Chalamalasetty <schalam@microsoft.com> - 10.15.0-1
- Original version for CBL-Mariner.
- License verified.

View File

@ -0,0 +1,5 @@
{
"Signatures": {
"dcos-cli-1.2.0.tar.gz": "d75c4aae6571a7d3f5a2dad0331fe3adab05a79e2966c0715409d6a2be2c6105"
}
}

View File

@ -0,0 +1,50 @@
Summary: The command line for DC/OS
Name: dcos-cli
Version: 1.2.0
Release: 1%{?dist}
License: Apache-2.0
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Applications/Tools
URL: https://github.com/dcos/dcos-cli
Source0: https://github.com/dcos/dcos-cli/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: golang >= 1.17.1
BuildRequires: git
%global debug_package %{nil}
%define our_gopath %{_topdir}/.gopath
%description
The command line for DC/OS.
%prep
%autosetup -p1
%build
export GOPATH=%{our_gopath}
export NO_DOCKER=1
# No mod download append -mod=vebdor to use vednor cache locally
sed -i 's/CGO_ENABLED=0 go build/CGO_ENABLED=0 go build -mod=vendor/' ./Makefile
# Use correct version
sed -i 's/VERSION?=$(shell git rev-parse HEAD)/VERSION?=%{version}/' ./Makefile
make
%install
install -m 755 -d %{buildroot}%{_bindir}
install -p -m 755 -t %{buildroot}%{_bindir} ./build/linux/dcos
%check
export NO_DOCKER=1
go test -mod=vendor
./build/linux/dcos --version
%files
%defattr(-,root,root)
%license LICENSE
%doc NOTICE README.md
%{_bindir}/dcos
%changelog
* Fri Jul 01 2022 Suresh Babu Chalamalasetty <schalam@microsoft.com> - 1.2.0-1
- Original version for CBL-Mariner.
- License verified.

View File

@ -720,6 +720,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "azcopy",
"version": "10.15.0",
"downloadUrl": "https://github.com/Azure/azure-storage-azcopy/archive/refs/tags/v10.15.0.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -2092,6 +2102,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "dcos-cli",
"version": "1.2.0",
"downloadUrl": "https://github.com/dcos/dcos-cli/archive/refs/tags/1.2.0.tar.gz"
}
}
},
{
"component": {
"type": "other",