Skip to content

Commit

Permalink
Add inotify-tools package and tests. (wolfi-dev#26821)
Browse files Browse the repository at this point in the history
Fixes:

Related:

### Pre-review Checklist


#### For new package PRs only
<!-- remove if unrelated -->
- [ ] This PR is marked as fixing a pre-existing package request bug
- [ ] Alternatively, the PR is marked as related to a pre-existing
package request bug, such as a dependency
- [X] REQUIRED - The package is available under an OSI-approved or
FSF-approved license
- [X] REQUIRED - The version of the package is still receiving security
updates
- [ ] This PR links to the upstream project's support policy (e.g.
`endoflife.date`)

Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
  • Loading branch information
dlorenc committed Aug 21, 2024
1 parent d97a3c0 commit 3fbcb6c
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions inotify-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Generated from https://git.alpinelinux.org/aports/plain/main/inotify-tools/APKBUILD
package:
name: inotify-tools
version: 4.23.9.0
epoch: 0
description: C library and CLI tools providing a simple interface to inotify
copyright:
- license: GPL-2.0-only

environment:
contents:
packages:
- autoconf
- automake
- build-base
- busybox
- ca-certificates-bundle
- libtool

pipeline:
- uses: git-checkout
with:
tag: ${{package.version}}
repository: https://github.com/inotify-tools/inotify-tools
expected-commit: 5c2ab772338bcbe516306bf8cf1059ddf2fa6bb7

- uses: autoconf/configure

- uses: autoconf/make

- uses: autoconf/make-install

- uses: strip

subpackages:
- name: inotify-tools-dev
pipeline:
- uses: split/dev
dependencies:
runtime:
- inotify-tools
description: inotify-tools dev

- name: inotify-tools-libs
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/lib
mv ${{targets.destdir}}/usr/lib/* ${{targets.subpkgdir}}/usr/lib
- name: inotify-tools-doc
pipeline:
- uses: split/manpages
description: inotify-tools manpages

test:
pipeline:
- runs: |
# Create a test directory and file
TEST_DIR="test_inotifywatch"
TEST_FILE="$TEST_DIR/testfile.txt"
mkdir -p "$TEST_DIR"
touch "$TEST_FILE"
# Run inotifywatch in the background to monitor the test directory
inotifywatch -e modify,create,delete -t 5 "$TEST_DIR" &
INOTIFYWATCH_PID=$!
# Wait a moment to ensure inotifywatch is monitoring
sleep 1
# Perform some file operations in the test directory
echo "This is a test" > "$TEST_FILE"
rm "$TEST_FILE"
touch "$TEST_FILE"
# Wait for inotifywatch to complete
wait $INOTIFYWATCH_PID
update:
github:
identifier: inotify-tools/inotify-tools

0 comments on commit 3fbcb6c

Please sign in to comment.