Skip to content

Commit

Permalink
Merge branch 'master' into ghc-9.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
csasarak committed Jan 16, 2024
2 parents 7fd5a01 + cbedc6d commit 9819795
Show file tree
Hide file tree
Showing 37 changed files with 179 additions and 406 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/install-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
# add_config "build-users-group ="
sudo mkdir -p /etc/nix
sudo chmod 0755 /etc/nix
sudo cp $workdir/nix.conf /etc/nix/nix.conf
sudo cp "$workdir"/nix.conf /etc/nix/nix.conf
fi

if [[ $INPUT_INSTALL_OPTIONS != "" ]]; then
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ jobs:
run: |
mkdir release
find . -type f -path '*/fossa/fossa.exe' -exec cp {} release \;
find . -type f -path '*/pathfinder/pathfinder.exe' -exec cp {} release \;
cp target/release/diagnose.exe release
cp target/release/millhone.exe release
Expand All @@ -209,7 +208,6 @@ jobs:
run: |
mkdir release
find . -type f -path '*/fossa/fossa' -exec cp {} release \;
find . -type f -path '*/pathfinder/pathfinder' -exec cp {} release \;
cp target/release/diagnose release
cp target/release/millhone release
Expand Down Expand Up @@ -247,7 +245,6 @@ jobs:
# '--options runtime' enables the hardened runtime: https://developer.apple.com/documentation/security/hardened_runtime
# The hardened runtime is required for notarization.
codesign --options runtime -s 'FOSSA, Inc.' release/fossa
codesign --options runtime -s 'FOSSA, Inc.' release/pathfinder
codesign --options runtime -s 'FOSSA, Inc.' release/diagnose
codesign --options runtime -s 'FOSSA, Inc.' release/millhone
Expand Down Expand Up @@ -317,15 +314,13 @@ jobs:
run: |
cosign version
cosign sign-blob --yes --bundle "Linux-binaries/fossa.bundle" "Linux-binaries/fossa"
cosign sign-blob --yes --bundle "Linux-binaries/pathfinder.bundle" "Linux-binaries/pathfinder"
cosign sign-blob --yes --bundle "Linux-binaries/diagnose.bundle" "Linux-binaries/diagnose"
cosign sign-blob --yes --bundle "Linux-binaries/millhone.bundle" "Linux-binaries/millhone"
- name: Verify Signatures
if: ${{ github.ref_type == 'tag' }}
run: |
cosign verify-blob --bundle "Linux-binaries/fossa.bundle" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/$GITHUB_WORKFLOW_REF" "Linux-binaries/fossa"
cosign verify-blob --bundle "Linux-binaries/pathfinder.bundle" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/$GITHUB_WORKFLOW_REF" "Linux-binaries/pathfinder"
cosign verify-blob --bundle "Linux-binaries/diagnose.bundle" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/$GITHUB_WORKFLOW_REF" "Linux-binaries/diagnose"
cosign verify-blob --bundle "Linux-binaries/millhone.bundle" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-identity "https://github.com/$GITHUB_WORKFLOW_REF" "Linux-binaries/millhone"
Expand All @@ -338,8 +333,6 @@ jobs:
# release both formats but default to using tar.gz when installing.
- name: Bundle binaries
env:
LINUX_PATHFINDER_TAR_PATH: "release/pathfinder_${{ steps.get-version.outputs.VERSION }}_linux_amd64.tar"
LINUX_PATHFINDER_ZIP_PATH: "release/pathfinder_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip"
LINUX_FOSSA_TAR_PATH: "release/fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.tar"
LINUX_FOSSA_ZIP_PATH: "release/fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip"
LINUX_DIAGNOSE_TAR_PATH: "release/diagnose_${{ steps.get-version.outputs.VERSION }}_linux_amd64.tar"
Expand All @@ -352,40 +345,33 @@ jobs:
ls -R
chmod +x Linux-binaries/*
zip -j "$LINUX_PATHFINDER_ZIP_PATH" Linux-binaries/pathfinder
zip -j "$LINUX_FOSSA_ZIP_PATH" Linux-binaries/fossa
zip -j "$LINUX_DIAGNOSE_ZIP_PATH" Linux-binaries/diagnose
zip -j "$LINUX_MILLHONE_ZIP_PATH" Linux-binaries/millhone
tar --create --verbose --file "$LINUX_FOSSA_TAR_PATH" --directory Linux-binaries fossa
tar --create --verbose --file "$LINUX_PATHFINDER_TAR_PATH" --directory Linux-binaries pathfinder
tar --create --verbose --file "$LINUX_DIAGNOSE_TAR_PATH" --directory Linux-binaries diagnose
tar --create --verbose --file "$LINUX_MILLHONE_TAR_PATH" --directory Linux-binaries millhone
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
tar --append --file "$LINUX_FOSSA_TAR_PATH" --directory Linux-binaries fossa.bundle
tar --append --file "$LINUX_PATHFINDER_TAR_PATH" --directory Linux-binaries pathfinder.bundle
tar --append --file "$LINUX_DIAGNOSE_TAR_PATH" --directory Linux-binaries diagnose.bundle
tar --append --file "$LINUX_MILLHONE_TAR_PATH" --directory Linux-binaries millhone.bundle
zip -j "$LINUX_FOSSA_ZIP_PATH" Linux-binaries/fossa.bundle
zip -j "$LINUX_PATHFINDER_ZIP_PATH" Linux-binaries/pathfinder.bundle
zip -j "$LINUX_DIAGNOSE_ZIP_PATH" Linux-binaries/diagnose.bundle
zip -j "$LINUX_MILLHONE_ZIP_PATH" Linux-binaries/millhone.bundle
fi
gzip "$LINUX_PATHFINDER_TAR_PATH"
gzip "$LINUX_FOSSA_TAR_PATH"
gzip "$LINUX_DIAGNOSE_TAR_PATH"
gzip "$LINUX_MILLHONE_TAR_PATH"
chmod +x macOS-binaries/*
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/fossa
zip -j release/pathfinder_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/pathfinder
zip -j release/diagnose_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/diagnose
zip -j release/millhone_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/millhone
chmod +x Windows-binaries/*
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/fossa.exe
zip -j release/pathfinder_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/pathfinder.exe
zip -j release/diagnose_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/diagnose.exe
zip -j release/millhone_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/millhone.exe
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,14 @@ jobs:
- name: "Check for incorrect FOSSA wording"
run: |
! grep 'Fossa ' **/*.md
shellcheck-check:
name: "Lint bash scripts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: run shellcheck
uses: sudo-bot/action-shellcheck@latest
with:
# https://github.com/koalaman/shellcheck#how-to-use
cli-args: "*.sh ./.github/scripts/*.sh"
9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# FOSSA CLI Changelog

## v3.8.30

- Fix an issue with long-option syntax for older versions of `sbt` ([#1356](https://github.com/fossas/fossa-cli/pull/1356))
- Debug: add more logging for debugging missing dependencies. ([#1360](https://github.com/fossas/fossa-cli/pull/1360))

## v3.8.29
- Prevents showing SCM warnings in fossa analyze, test, and report [#1354](https://github.com/fossas/fossa-cli/pull/1354)
- Pathfinder: Pathfinder has been deprecated and removed. ([#1350](https://github.com/fossas/fossa-cli/pull/1350))

## v3.8.28
- VSI: no longer reports paths inside of extracted archives with the `!_fossa.virtual_!` literal [#1345](https://github.com/fossas/fossa-cli/pull/1345)

Expand Down
8 changes: 0 additions & 8 deletions app/pathfinder/Main.hs

This file was deleted.

2 changes: 1 addition & 1 deletion docs/references/experimental/binary-discovery/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Binary Discovery

FOSSA supports the ability to flag all binary dependencies discovered in your project source tree as unlicensed dependencies via an opt-in flag.
FOSSA supports the ability to flag all binary dependencies discovered in your project source tree as unlicensed dependencies via an opt-in flag (`--experimental-enable-binary-discovery`).

The core idea behind this feature is that some organizations wish to validate all potential sources of intellectual property rights,
and binaries are potential sources of intellectual property rights data for which we typically cannot automatically discover licensing information.
Expand Down
1 change: 1 addition & 0 deletions fourmolu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ let-style: inline
# If you have issues with operator formatting, usually you can find the right fixity in the haddocks.
fixities:
- infixr 0 $
- infixr 2 ||
- infixl 3 <|>
- infixr 3 &&
- infix 4 ==
Expand Down
39 changes: 20 additions & 19 deletions install-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ execute() {
(cd "${tmpdir}" && untar "${TARBALL}")
log_debug "setting up bindir: $BINDIR"
mkdir -p "$BINDIR" 2> /dev/null || sudo mkdir -p "$BINDIR"
for binexe in "fossa" ; do
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
log_debug "installing binary: $binexe"
# Use mv instead of cp, as copying when a binary already exists in that spot can create an invalid binary on macOS
mv "${srcdir}/${binexe}" "${BINDIR}/${binexe}" 2> /dev/null || sudo cp "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
done
binexe="fossa"
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
log_debug "installing binary: $binexe"
# Use mv instead of cp, as copying when a binary already exists in that spot can create an invalid binary on macOS
mv "${srcdir}/${binexe}" "${BINDIR}/${binexe}" 2> /dev/null || sudo cp "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
}
is_supported_platform() {
platform=$1
Expand Down Expand Up @@ -135,9 +134,6 @@ is_command() {
echoerr() {
echo "$@" 1>&2
}
log_prefix() {
echo "$0"
}
_logp=6
log_set_priority() {
_logp="$1"
Expand Down Expand Up @@ -198,7 +194,7 @@ uname_arch() {
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
esac
echo ${arch}
echo "${arch}"
}
uname_os_check() {
os=$(uname_os)
Expand Down Expand Up @@ -260,19 +256,24 @@ http_download_curl() {
local_file=$1
source_url=$2
header=$3
if [ ! -z "$3" ]; then
header="-H $header"
if [ -n "$header" ]; then
HTTP_CODE=$(curl -w '%{HTTP_CODE}' -sL -H "$header" -H "Cache-Control: no-cache" -o "$local_file" "$source_url") || (log_debug "curl command failed." && return 1)
fi
if [ -z "$header" ]; then
HTTP_CODE=$(curl -w '%{HTTP_CODE}' -sL -H "Cache-Control: no-cache" -o "$local_file" "$source_url") || (log_debug "curl command failed." && return 1)
fi
HTTP_CODE=$(curl -w '%{HTTP_CODE}' -sL $header -H "Cache-Control: no-cache" -o "$local_file" "$source_url") || (log_debug "curl command failed." && return 1)
return 0
}
http_download_wget() {
local_file=$1
source_url=$2
if [ ! -z $3 ]; then
header="--header $3"
header=$3
if [ -n "$header" ]; then
HTTP_CODE=$(wget -q --header "$header" --no-cache --server-response -O "$local_file" "$source_url" 2>&1 | awk 'NR==1{print $2}') || (log_debug "wget command failed." && return 1)
fi
if [ -z "$header" ]; then
HTTP_CODE=$(wget -q --no-cache --server-response -O "$local_file" "$source_url" 2>&1 | awk 'NR==1{print $2}') || (log_debug "wget command failed." && return 1)
fi
HTTP_CODE=$(wget -q $header --no-cache --server-response -O "$local_file" "$source_url" 2>&1 | awk 'NR==1{print $2}') || (log_debug "wget command failed." && return 1)
return 0
}
http_download() {
Expand Down
25 changes: 10 additions & 15 deletions install-v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ execute() {
srcdir="${tmpdir}"
(cd "${tmpdir}" && untar "${TARBALL}")
install -d -m 775 "${BINDIR}" 2> /dev/null || install -d "${BINDIR}"
for binexe in "fossa" ; do
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
install "${srcdir}/${binexe}" "${BINDIR}/" 2> /dev/null || sudo install "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
done
binexe="fossa"
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
install "${srcdir}/${binexe}" "${BINDIR}/" 2> /dev/null || sudo install "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
}
is_supported_platform() {
platform=$1
Expand Down Expand Up @@ -133,9 +132,6 @@ is_command() {
echoerr() {
echo "$@" 1>&2
}
log_prefix() {
echo "$0"
}
_logp=6
log_set_priority() {
_logp="$1"
Expand Down Expand Up @@ -195,7 +191,7 @@ uname_arch() {
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
esac
echo ${arch}
echo "${arch}"
}
uname_os_check() {
os=$(uname_os)
Expand Down Expand Up @@ -359,14 +355,14 @@ print_deprecation_warning() {
log_crit "-------------------"
log_crit ""
log_crit "You are installing FOSSA CLI v1, which is no longer in active"
log_crit "development. FOSSA will not address new defects found in CLI v1."
log_crit "development. FOSSA will not address new defects found in CLI v1."
log_crit ""
log_crit "Please upgrade to the latest FOSSA CLI."
log_crit ""
log_crit "Please upgrade to FOSSA CLI v3 by using install-latest script"
log_crit "-------------------------------------------------------------"
log_crit "-------------------------------------------------------------"
log_crit " curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash"
log_crit ""
log_crit ""
log_crit "Migration guide for FOSSA CLI v3"
log_crit "--------------------------------"
log_crit " https://github.com/fossas/fossa-cli/blob/master/docs/differences-from-v1.md#how-to-upgrade-to-fossa-3x"
Expand All @@ -376,7 +372,6 @@ print_deprecation_warning() {
PROJECT_NAME="fossa-cli"
OWNER=fossas
REPO="fossa-cli"
BINARY=fossa
FORMAT=tar.gz
OS=$(uname_os)
ARCH=$(uname_arch)
Expand Down
25 changes: 10 additions & 15 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ execute() {
srcdir="${tmpdir}"
(cd "${tmpdir}" && untar "${TARBALL}")
install -d -m 775 "${BINDIR}" 2> /dev/null || install -d "${BINDIR}"
for binexe in "fossa" ; do
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
install "${srcdir}/${binexe}" "${BINDIR}/" 2> /dev/null || sudo install "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
done
binexe="fossa"
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
fi
install "${srcdir}/${binexe}" "${BINDIR}/" 2> /dev/null || sudo install "${srcdir}/${binexe}" "${BINDIR}/"
log_info "installed ${BINDIR}/${binexe}"
}
is_supported_platform() {
platform=$1
Expand Down Expand Up @@ -133,9 +132,6 @@ is_command() {
echoerr() {
echo "$@" 1>&2
}
log_prefix() {
echo "$0"
}
_logp=6
log_set_priority() {
_logp="$1"
Expand Down Expand Up @@ -195,7 +191,7 @@ uname_arch() {
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
esac
echo ${arch}
echo "${arch}"
}
uname_os_check() {
os=$(uname_os)
Expand Down Expand Up @@ -359,14 +355,14 @@ print_deprecation_warning() {
log_crit "-------------------"
log_crit ""
log_crit "You are installing FOSSA CLI v1, which is no longer in active"
log_crit "development. FOSSA will not address new defects found in CLI v1."
log_crit "development. FOSSA will not address new defects found in CLI v1."
log_crit ""
log_crit "Please upgrade to the latest FOSSA CLI."
log_crit ""
log_crit "Please upgrade to FOSSA CLI v3 by using install-latest script"
log_crit "-------------------------------------------------------------"
log_crit "-------------------------------------------------------------"
log_crit " curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash"
log_crit ""
log_crit ""
log_crit "Migration guide for FOSSA CLI v3"
log_crit "--------------------------------"
log_crit " https://github.com/fossas/fossa-cli/blob/master/docs/differences-from-v1.md#how-to-upgrade-to-fossa-3x"
Expand All @@ -376,7 +372,6 @@ print_deprecation_warning() {
PROJECT_NAME="fossa-cli"
OWNER=fossas
REPO="fossa-cli"
BINARY=fossa
FORMAT=tar.gz
OS=$(uname_os)
ARCH=$(uname_arch)
Expand Down
6 changes: 3 additions & 3 deletions integration-test/Analysis/ScalaSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
module Analysis.ScalaSpec (spec) where

import Analysis.FixtureExpectationUtils (
DependencyResultsSummary (DependencyResultsSummary),
DependencyResultsSummary (..),
testSuiteDepResultSummary,
)
import Analysis.FixtureUtils (
AnalysisTestFixture (AnalysisTestFixture),
FixtureArtifact (FixtureArtifact),
AnalysisTestFixture (..),
FixtureArtifact (..),
FixtureEnvironment (NixEnv),
)
import Path (reldir)
Expand Down
Loading

0 comments on commit 9819795

Please sign in to comment.