From 66113e7871aede225d661473925cea4cce9e6d23 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 16 May 2024 00:01:30 +0100 Subject: gentoo auto-resync : 16:05:2024 - 00:01:30 --- dev-go/Manifest.gz | Bin 4884 -> 5058 bytes dev-go/go-dep-tarball/Manifest | 3 ++ dev-go/go-dep-tarball/files/go-dep-tarball-0 | 59 ++++++++++++++++++++++++++ dev-go/go-dep-tarball/go-dep-tarball-0.ebuild | 17 ++++++++ dev-go/go-dep-tarball/metadata.xml | 8 ++++ 5 files changed, 87 insertions(+) create mode 100644 dev-go/go-dep-tarball/Manifest create mode 100644 dev-go/go-dep-tarball/files/go-dep-tarball-0 create mode 100644 dev-go/go-dep-tarball/go-dep-tarball-0.ebuild create mode 100644 dev-go/go-dep-tarball/metadata.xml (limited to 'dev-go') diff --git a/dev-go/Manifest.gz b/dev-go/Manifest.gz index 427db42d035c..2dc53cb001d3 100644 Binary files a/dev-go/Manifest.gz and b/dev-go/Manifest.gz differ diff --git a/dev-go/go-dep-tarball/Manifest b/dev-go/go-dep-tarball/Manifest new file mode 100644 index 000000000000..c3dda1b9686c --- /dev/null +++ b/dev-go/go-dep-tarball/Manifest @@ -0,0 +1,3 @@ +AUX go-dep-tarball-0 2287 BLAKE2B 4fd20a155a4e15a3674652cde136e7f70318eb7d2234ae3f5118f345f4fe94deec0572be657abd2698a84d910799f83fd558b461e74c14e5e6bee65dc104c46c SHA512 055c795046b669470dffa45f50aedbe7797993d510f544b32e0c73f2e43c482fc2f9938fc31e2c9fff6141e7944a61642923da3755e62557b891c8fe93825f6a +EBUILD go-dep-tarball-0.ebuild 299 BLAKE2B 62bb0a403fcc4dd4a83c096a1825cd6397eaf809711403cdf0c7e1d520769afc8340aed623f9b43aad21ce0d0f2e6eb1fd994c8d8e0e18625fba0af69345fba3 SHA512 310af1abb695c23d51afe23b2794ef4b321a0564add73a8ef4b87a2ed32856879767f7bb5006d794ac709de78da3dcc502fc456854d7c6c39d15226d920e1507 +MISC metadata.xml 243 BLAKE2B 63665ae2020bc799fa6ebd6e1fca6755be6498803fdbc17cc630f9f4ffa03fbd46a9ad396e70adc3bc1c32b0a746fe4bab1c6291f32e68e636251207bca9e95c SHA512 78eab20831018fcf4957171a83aaaca9ced53380e01f083c07450c30fa1adfc02dd50ff2fa9f491dd62802f6e779264add1c47a09ade0a35cda558c1d5529ad0 diff --git a/dev-go/go-dep-tarball/files/go-dep-tarball-0 b/dev-go/go-dep-tarball/files/go-dep-tarball-0 new file mode 100644 index 000000000000..d630445fa770 --- /dev/null +++ b/dev-go/go-dep-tarball/files/go-dep-tarball-0 @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright (c) 2024, William Hubbs +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +set -e +shopt -s lastpipe + +if [[ -z $1 ]]; then +printf "%s\n" "no tarball name specified" >&2 +exit 1 +fi + +if [[ ! -f go.mod ]]; then +printf "%s %s\n" "${PWD}" "does not contain a go project" >&2 +exit 1 +fi + +work=$(mktemp -d -p '' dep-tarball-XXXXXX) +export GOMODCACHE="${work}"/go-mod +go mod download -modcacherw +mapfile -t mod_paths < <(find . -mindepth 2 -name go.mod -print) +for p in "${mod_paths[@]}"; do + printf "entering %s\n" "${p%/go.mod}" + pushd "${p%/go.mod}" > /dev/null + go mod download -modcacherw + popd > /dev/null +done +find "${GOMODCACHE}/cache/download" -type f -name '*.zip' -delete +( +cd "${work}" +XZ_OPT='-T0 -9' \ +tar --owner 0 --group 0 --posix -acf "${1}"-deps.tar.xz go-mod +rm -fr go-mod +) +mv "${work}"/*xz . diff --git a/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild b/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild new file mode 100644 index 000000000000..fc8c1b276db3 --- /dev/null +++ b/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild @@ -0,0 +1,17 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="script to package go dependencies" +HOMEPAGE="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +S="${WORKDIR}" + +src_install() { + newbin "${FILESDIR}/go-dep-tarball-0" go-dep-tarball +} diff --git a/dev-go/go-dep-tarball/metadata.xml b/dev-go/go-dep-tarball/metadata.xml new file mode 100644 index 000000000000..3b2a9c591010 --- /dev/null +++ b/dev-go/go-dep-tarball/metadata.xml @@ -0,0 +1,8 @@ + + + + +williamh@gentoo.org +William Hubbs + + -- cgit v1.2.3