forked from waja/action-debian-package
Implement lintian support
This commit is contained in:
parent
2d5606cf18
commit
b43ffb1f6d
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
@ -16,30 +16,37 @@ jobs:
|
||||||
arch: arm
|
arch: arm
|
||||||
repo: https://salsa.debian.org/debian/at.git
|
repo: https://salsa.debian.org/debian/at.git
|
||||||
ref: debian/3.1.23-1
|
ref: debian/3.1.23-1
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: lolcat
|
- package: lolcat
|
||||||
arch: arm64
|
arch: arm64
|
||||||
repo: https://salsa.debian.org/ruby-team/lolcat.git
|
repo: https://salsa.debian.org/ruby-team/lolcat.git
|
||||||
ref: debian/100.0.1-2
|
ref: debian/100.0.1-2
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: micro
|
- package: micro
|
||||||
arch: amd64
|
arch: amd64
|
||||||
repo: https://salsa.debian.org/go-team/packages/micro.git
|
repo: https://salsa.debian.org/go-team/packages/micro.git
|
||||||
ref: debian/2.0.6-2_bpo10+1
|
ref: debian/2.0.6-2_bpo10+1
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: dropbear
|
- package: dropbear
|
||||||
arch: amd64
|
arch: amd64
|
||||||
repo: https://salsa.debian.org/debian/dropbear.git
|
repo: https://salsa.debian.org/debian/dropbear.git
|
||||||
ref: debian/2016.74-5+deb9u1
|
ref: debian/2016.74-5+deb9u1
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: deber
|
- package: deber
|
||||||
arch: arm64
|
arch: arm64
|
||||||
repo: https://github.com/dawidd6/deber.git
|
repo: https://github.com/dawidd6/deber.git
|
||||||
ref: v1.0.0
|
ref: v1.0.0
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: netcat-openbsd
|
- package: netcat-openbsd
|
||||||
arch: arm64
|
arch: arm64
|
||||||
repo: https://git.launchpad.net/ubuntu/+source/netcat-openbsd
|
repo: https://git.launchpad.net/ubuntu/+source/netcat-openbsd
|
||||||
ref: import/1.206-1ubuntu1
|
ref: import/1.206-1ubuntu1
|
||||||
|
lintian_opts: "-v"
|
||||||
- package: iproute2
|
- package: iproute2
|
||||||
arch: arm
|
arch: arm
|
||||||
repo: https://git.launchpad.net/ubuntu/+source/iproute2
|
repo: https://git.launchpad.net/ubuntu/+source/iproute2
|
||||||
ref: import/4.18.0-1ubuntu2_ubuntu18.04.1
|
ref: import/4.18.0-1ubuntu2_ubuntu18.04.1
|
||||||
|
lintian_opts: "-v"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -51,6 +58,7 @@ jobs:
|
||||||
cpu_architecture: ${{matrix.arch}}
|
cpu_architecture: ${{matrix.arch}}
|
||||||
source_directory: ${{matrix.package}}
|
source_directory: ${{matrix.package}}
|
||||||
artifacts_directory: artifacts
|
artifacts_directory: artifacts
|
||||||
|
lintian_opts: ${{matrix.lintian_opts}}
|
||||||
- name: Check files
|
- name: Check files
|
||||||
run: |
|
run: |
|
||||||
ls -lh artifacts/${{matrix.package}}*.*
|
ls -lh artifacts/${{matrix.package}}*.*
|
||||||
|
|
|
@ -19,6 +19,10 @@ inputs:
|
||||||
os_distribution:
|
os_distribution:
|
||||||
description: OS distribution name, value from `debian/changelog` is used if not defined
|
description: OS distribution name, value from `debian/changelog` is used if not defined
|
||||||
required: false
|
required: false
|
||||||
|
lintian_opts:
|
||||||
|
description: Command line parameters provided to 'lintian'
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
runs:
|
runs:
|
||||||
using: node16
|
using: node16
|
||||||
main: main.js
|
main: main.js
|
||||||
|
|
21
main.js
21
main.js
|
@ -38,6 +38,7 @@ async function main() {
|
||||||
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
||||||
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
||||||
const osDistribution = core.getInput("os_distribution") || ""
|
const osDistribution = core.getInput("os_distribution") || ""
|
||||||
|
const lintianOpts = core.getInput("lintian_opts") || ""
|
||||||
|
|
||||||
const workspaceDirectory = process.cwd()
|
const workspaceDirectory = process.cwd()
|
||||||
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
||||||
|
@ -70,7 +71,8 @@ async function main() {
|
||||||
workspaceDirectory: workspaceDirectory,
|
workspaceDirectory: workspaceDirectory,
|
||||||
sourceDirectory: sourceDirectory,
|
sourceDirectory: sourceDirectory,
|
||||||
buildDirectory: buildDirectory,
|
buildDirectory: buildDirectory,
|
||||||
artifactsDirectory: artifactsDirectory
|
artifactsDirectory: artifactsDirectory,
|
||||||
|
lintianOpts: lintianOpts
|
||||||
}
|
}
|
||||||
console.log(details)
|
console.log(details)
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
@ -151,7 +153,7 @@ async function main() {
|
||||||
"exec",
|
"exec",
|
||||||
container,
|
container,
|
||||||
"bash", "-c",
|
"bash", "-c",
|
||||||
`apt-get install -yq -t '${imageTag}' dpkg-dev debhelper devscripts || apt-get install -yq dpkg-dev debhelper devscripts`
|
`apt-get install -yq -t '${imageTag}' dpkg-dev debhelper devscripts lintian || apt-get install -yq dpkg-dev debhelper devscripts lintian`
|
||||||
])
|
])
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
|
@ -185,6 +187,21 @@ async function main() {
|
||||||
])
|
])
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
|
core.startGroup("Run static analysis")
|
||||||
|
await exec.exec("docker", [
|
||||||
|
"exec",
|
||||||
|
container,
|
||||||
|
"find",
|
||||||
|
buildDirectory,
|
||||||
|
"-maxdepth", "1",
|
||||||
|
"-name", `*${version}*.changes`,
|
||||||
|
"-type", "f",
|
||||||
|
"-print",
|
||||||
|
"-exec", "lintian", lintianOpts, "{}", "\+"
|
||||||
|
|
||||||
|
])
|
||||||
|
core.endGroup()
|
||||||
|
|
||||||
core.startGroup("Install built packages")
|
core.startGroup("Install built packages")
|
||||||
await exec.exec("docker", [
|
await exec.exec("docker", [
|
||||||
"exec",
|
"exec",
|
||||||
|
|
Loading…
Reference in a new issue