Skip to content

Commit

Permalink
add lsof package (#33969)
Browse files Browse the repository at this point in the history
adds lsof package

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
Co-authored-by: Scott Moser <scott.moser@chainguard.dev>
  • Loading branch information
kranurag7 and smoser authored Nov 15, 2024
1 parent d17a007 commit b5df175
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions lsof.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package:
name: lsof
version: 4.99.3
epoch: 0
description: List Open Files
copyright:
- license: lsof

environment:
contents:
packages:
- autoconf
- automake
- bash
- build-base
- busybox
- groff
- libtool
- linux-headers
- openssf-compiler-options
- pkgconf-dev

pipeline:
- uses: git-checkout
with:
repository: https://github.com/lsof-org/lsof
tag: ${{package.version}}
expected-commit: 2e4c7a1a9bc7258dc5b6a3ab28ebca44174279a8

- name: "update release version in configure.ac"
runs: |
# configure.ac in release tarballs has updated major.minor.micro (4.99.3)
# git has just major.minor.0 (4.99.0). So change
# AC_INIT([lsof],[4.99.0])
# to
# AC_INIT([lsof],[4.99.3])
expected="AC_INIT([lsof],[${{package.version}}])"
grep -F -q "$expected" configure.ac &&
{ echo "configure.ac did not need updating"; exit 0; }
sed -i '1s/\(AC_INIT(\[lsof\],\)\[\([^\[]\+\)]/\1[${{package.version}}]/' configure.ac
grep -F "$expected" configure.ac && exit 0
echo "patching version into configure.ac seems to have failed"
- runs: autoreconf -vif

- uses: autoconf/configure

- uses: autoconf/make

- uses: autoconf/make-install

- uses: strip

subpackages:
- name: lsof-dev
description: dev library for lsof
dependencies:
runtime:
- lsof
pipeline:
- uses: split/dev
test:
pipeline:
- uses: test/pkgconf

- name: lsof-doc
pipeline:
- uses: split/manpages
description: lsof manpages

- name: lsof-debug
pipeline:
- uses: split/debug
description: lsof debug

update:
enabled: true
github:
identifier: lsof-org/lsof

test:
pipeline:
- name: Verify lsof installation
runs: |
set +x
fail() { echo "FAIL:" "$@"; exit 1; }
# both -h and -v output to stderr
lsof -h 2>&1 || fail "'lsof -h' exited $?"
echo "PASS: 'lsof -h' exited 0"
ver="${{package.version}}"
out=$(lsof -v 2>&1) || fail "'lsof -v' exited $?"
echo "$out" | grep -F -q -- "$ver" ||
fail "'lsof -v' output did not include '$ver': $out"
echo "PASS: 'lsof -v' contained version '$ver' in output"

0 comments on commit b5df175

Please sign in to comment.