Allow Syft to build with podman (#537)

* Don't check the Built-By flag

Signed-off-by: Josh Bressers <josh@bress.net>

* Remove alpine pinning to resolve conflict with main

Signed-off-by: Josh Bressers <josh@bress.net>
This commit is contained in:
Josh Bressers 2021-10-11 11:39:34 -05:00 committed by GitHub
parent b25f5b664b
commit f2840029d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,7 @@ func TestParseJar(t *testing.T) {
fixture: "test-fixtures/java-builds/packages/example-jenkins-plugin.hpi", fixture: "test-fixtures/java-builds/packages/example-jenkins-plugin.hpi",
ignoreExtras: []string{ ignoreExtras: []string{
"Plugin-Version", // has dynamic date "Plugin-Version", // has dynamic date
"Built-By", // podman returns the real UID
"Build-Jdk", // can't guarantee the JDK used at build time "Build-Jdk", // can't guarantee the JDK used at build time
}, },
expected: map[string]pkg.Package{ expected: map[string]pkg.Package{
@ -112,7 +113,7 @@ func TestParseJar(t *testing.T) {
"Plugin-License-Url": "https://opensource.org/licenses/MIT", "Plugin-License-Url": "https://opensource.org/licenses/MIT",
"Plugin-License-Name": "MIT License", "Plugin-License-Name": "MIT License",
"Created-By": "Apache Maven", "Created-By": "Apache Maven",
"Built-By": "?", //"Built-By": "?",
//"Build-Jdk": "14.0.1", //"Build-Jdk": "14.0.1",
"Jenkins-Version": "2.164.3", "Jenkins-Version": "2.164.3",
"Minimum-Java-Version": "1.8", "Minimum-Java-Version": "1.8",
@ -162,6 +163,7 @@ func TestParseJar(t *testing.T) {
fixture: "test-fixtures/java-builds/packages/example-java-app-maven-0.1.0.jar", fixture: "test-fixtures/java-builds/packages/example-java-app-maven-0.1.0.jar",
ignoreExtras: []string{ ignoreExtras: []string{
"Build-Jdk", // can't guarantee the JDK used at build time "Build-Jdk", // can't guarantee the JDK used at build time
"Built-By", // podman returns the real UID
}, },
expected: map[string]pkg.Package{ expected: map[string]pkg.Package{
"example-java-app-maven": { "example-java-app-maven": {
@ -178,7 +180,7 @@ func TestParseJar(t *testing.T) {
// extra fields... // extra fields...
"Archiver-Version": "Plexus Archiver", "Archiver-Version": "Plexus Archiver",
"Created-By": "Apache Maven 3.6.3", "Created-By": "Apache Maven 3.6.3",
"Built-By": "?", //"Built-By": "?",
//"Build-Jdk": "14.0.1", //"Build-Jdk": "14.0.1",
"Main-Class": "hello.HelloWorld", "Main-Class": "hello.HelloWorld",
}, },