Skip to content

Commit

Permalink
feat(24.04): add SDF for file and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
eunufe committed Jan 8, 2025
1 parent 3801300 commit 2b6898e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
16 changes: 16 additions & 0 deletions slices/file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package: file

essential:
- file_copyright

slices:
bins:
essential:
- libc6_libs
- libmagic1t64_libs
contents:
/usr/bin/file:

copyright:
contents:
/usr/share/doc/file/copyright:
13 changes: 13 additions & 0 deletions slices/libmagic-mgc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package: libmagic-mgc

essential:
- libmagic-mgc_copyright

slices:
data:
contents:
/usr/lib/file/magic.mgc:

copyright:
contents:
/usr/share/doc/libmagic-mgc/copyright:
21 changes: 21 additions & 0 deletions slices/libmagic1t64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package: libmagic1t64

essential:
- libmagic1t64_copyright

slices:
libs:
essential:
- libbz2-1.0_libs
- libc6_libs
- liblzma5_libs
- libmagic-mgc_data
- zlib1g_libs
contents:
/etc/magic:
/etc/magic.mime:
/usr/lib/*-linux-*/libmagic.so.1*:

copyright:
contents:
/usr/share/doc/libmagic1t64/copyright:
13 changes: 13 additions & 0 deletions tests/spread/integration/file/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
summary: Integration tests for file

execute: |
rootfs="$(install-slices file_bins)"
chroot "${rootfs}/" file --help
echo "Hello World" > "${rootfs}/testfile"
output=$(chroot "${rootfs}/" \
file -b testfile)
if [ "$output" != "ASCII text" ]; then
echo "file failed"
exit 1
fi

0 comments on commit 2b6898e

Please sign in to comment.