From fcb62eedc76e7c393f6187aef4a89fcd526c7f05 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Wed, 9 Feb 2022 15:52:46 +0000 Subject: [PATCH] Validate LIBGIT2 args are set correctly Signed-off-by: Paulo Gomes --- .github/workflows/e2e.yaml | 4 ++-- ATTRIBUTIONS.md | 45 +++++++++++++++++++++----------------- Dockerfile | 4 ++-- Makefile | 7 ++++++ docs/api/source.md | 8 +++---- 5 files changed, 40 insertions(+), 28 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 482e7cacb..2ce9efcb3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -27,6 +27,8 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Verify + run: make verify - name: Run tests run: make test - name: Setup Kubernetes @@ -38,8 +40,6 @@ jobs: uses: fluxcd/pkg/actions/kustomize@main - name: Setup Helm uses: fluxcd/pkg/actions/helm@main - - name: Verify - run: make verify - name: Run E2E tests env: CREATE_CLUSTER: false diff --git a/ATTRIBUTIONS.md b/ATTRIBUTIONS.md index 6d0ff8a58..20d5ada82 100644 --- a/ATTRIBUTIONS.md +++ b/ATTRIBUTIONS.md @@ -12,7 +12,7 @@ https://github.com/libssh2/libssh2/ No changes were made to its original source code. -Copyright notice (https://raw.githubusercontent.com/libssh2/libssh2/main/COPYING): +Copyright notice (https://raw.githubusercontent.com/libssh2/libssh2/master/COPYING): /* Copyright (c) 2004-2007 Sara Golemon * Copyright (c) 2005,2006 Mikhail Gusarov @@ -477,30 +477,35 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------------------------------------------------------------- -The regex library (deps/regex/) is licensed under the GNU LGPL -(available at the end of this file). +The bundled PCRE implementation (deps/pcre/) is licensed under the BSD +license. -Definitions for data structures and routines for the regular -expression library. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008 -Free Software Foundation, Inc. -This file is part of the GNU C Library. + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. + * 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. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. + * Neither the name of the University of Cambridge nor the name of Google + Inc. nor the names of their contributors may be used to endorse or + promote products derived from this software without specific prior + written permission. -You should have received a copy of the GNU Lesser General Public -License along with the GNU C Library; if not, write to the Free -Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 OWNER 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. ---------------------------------------------------------------------- diff --git a/Dockerfile b/Dockerfile index ca9289fef..d73cc47b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ ARG BASE_VARIANT=alpine ARG GO_VERSION=1.17 ARG XX_VERSION=1.1.0 -ARG LIBGIT2_IMG -ARG LIBGIT2_TAG +ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2 +ARG LIBGIT2_TAG=libgit2-1.1.1-6 FROM ${LIBGIT2_IMG}:${LIBGIT2_TAG} AS libgit2-libs diff --git a/Makefile b/Makefile index 5ece814ef..039ea68f1 100644 --- a/Makefile +++ b/Makefile @@ -201,6 +201,13 @@ e2e: ./hack/ci/e2e.sh verify: update-attributions fmt vet manifests api-docs +ifneq ($(shell grep -o 'LIBGIT2_IMG ?= \w.*' Makefile | cut -d ' ' -f 3):$(shell grep -o 'LIBGIT2_TAG ?= \w.*' Makefile | cut -d ' ' -f 3), \ + $(shell grep -o "LIBGIT2_IMG=\w.*" Dockerfile | cut -d'=' -f2):$(shell grep -o "LIBGIT2_TAG=\w.*" Dockerfile | cut -d'=' -f2)) + @{ \ + echo "LIBGIT2_IMG and LIBGIT2_TAG must match in both Makefile and Dockerfile"; \ + exit 1; \ + } +endif ifneq (, $(shell git status --porcelain --untracked-files=no)) @{ \ echo "working directory is dirty:"; \ diff --git a/docs/api/source.md b/docs/api/source.md index 8cc4f8ddf..9aabeee23 100644 --- a/docs/api/source.md +++ b/docs/api/source.md @@ -171,7 +171,7 @@ Kubernetes meta/v1.Duration (Optional) -

The timeout for download operations, defaults to 20s.

+

The timeout for download operations, defaults to 60s.

@@ -343,7 +343,7 @@ Kubernetes meta/v1.Duration (Optional) -

The timeout for remote Git operations like cloning, defaults to 20s.

+

The timeout for remote Git operations like cloning, defaults to 60s.

@@ -1047,7 +1047,7 @@ Kubernetes meta/v1.Duration (Optional) -

The timeout for download operations, defaults to 20s.

+

The timeout for download operations, defaults to 60s.

@@ -1379,7 +1379,7 @@ Kubernetes meta/v1.Duration (Optional) -

The timeout for remote Git operations like cloning, defaults to 20s.

+

The timeout for remote Git operations like cloning, defaults to 60s.