-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ubuntu-24.04' into 24.04-openjdk-21-jre-headless
- Loading branch information
Showing
8 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package: diffutils | ||
|
||
essential: | ||
- diffutils_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- libc6_libs | ||
contents: | ||
/usr/bin/cmp: | ||
/usr/bin/diff: | ||
/usr/bin/diff3: | ||
/usr/bin/sdiff: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/diffutils/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package: dpkg | ||
|
||
essential: | ||
- dpkg_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- dpkg_config | ||
- dpkg_var | ||
- libbz2-1.0_libs | ||
- libc-bin_ldconfig | ||
- libc6_libs | ||
- liblzma5_libs | ||
- libmd0_libs | ||
- libselinux1_libs | ||
- libzstd1_libs | ||
- tar_tar | ||
- zlib1g_libs | ||
contents: | ||
/usr/bin/dpkg: | ||
/usr/bin/dpkg-deb: | ||
/usr/bin/dpkg-divert: | ||
/usr/bin/dpkg-maintscript-helper: | ||
/usr/bin/dpkg-query: | ||
/usr/bin/dpkg-realpath: | ||
/usr/bin/dpkg-split: | ||
/usr/bin/dpkg-statoverride: | ||
/usr/bin/dpkg-trigger: | ||
/usr/bin/update-alternatives: | ||
/usr/libexec/dpkg/*: | ||
/usr/sbin/start-stop-daemon: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/dpkg/copyright: | ||
|
||
config: | ||
contents: | ||
/etc/dpkg/dpkg.cfg: | ||
/etc/dpkg/dpkg.cfg.d/: | ||
|
||
locales: | ||
essential: | ||
- dpkg_bins | ||
contents: | ||
/usr/share/locale/**/dpkg.mo: | ||
|
||
tables: | ||
contents: | ||
/usr/share/dpkg/*table: | ||
|
||
var: | ||
# Directories that are included in the tarball because they need to exist in /var | ||
contents: | ||
/var/lib/dpkg/alternatives/: | ||
/var/lib/dpkg/info/: | ||
/var/lib/dpkg/parts/: | ||
/var/lib/dpkg/updates/: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package: ocl-icd-libopencl1 | ||
|
||
essential: | ||
- ocl-icd-libopencl1_copyright | ||
|
||
slices: | ||
libs: | ||
essential: | ||
- libc6_libs | ||
contents: | ||
/usr/lib/*-linux-*/libOpenCL.so.1*: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/ocl-icd-libopencl1/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package: tar | ||
|
||
essential: | ||
- tar_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- tar_rmt | ||
- tar_tar | ||
contents: | ||
/usr/sbin/tarcat: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/tar/copyright: | ||
|
||
rmt: | ||
essential: | ||
- libc6_libs | ||
contents: | ||
/etc/rmt: {symlink: /usr/sbin/rmt-tar} | ||
/usr/sbin/rmt-tar: | ||
|
||
tar: | ||
essential: | ||
- libacl1_libs | ||
- libc6_libs | ||
- libselinux1_libs | ||
contents: | ||
/usr/bin/tar: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
summary: Integration tests for diffutils | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices diffutils_bins)" | ||
mkdir "${rootfs}/test" | ||
echo "This is a test file" > "${rootfs}/test1.txt" | ||
echo "This is another test file" > "${rootfs}/test2.txt" | ||
# Compare two different files with cmp | ||
chroot "${rootfs}/" cmp -b /test1.txt /test2.txt | grep -q '/test1.txt /test2.txt differ: byte 10, line 1' | ||
# Compare with diff | ||
cp "${rootfs}/test1.txt" "${rootfs}/test3.txt" | ||
[[ "$(chroot "${rootfs}/" diff /test1.txt /test3.txt)" == "" ]] | ||
# Compare with diff3 | ||
chroot "${rootfs}/" diff3 -a /test1.txt /test2.txt /test3.txt | grep -q -e '====2' -e '[1-3]:1c' | ||
# ...and sdiff | ||
chroot "${rootfs}/" sdiff /test1.txt /test2.txt | grep -q -E 'This is a test file\s+| This is another test file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
summary: Integration tests for dpkg | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices coreutils_bins diffutils_bins dpkg_bins)" | ||
# Get a sample deb file to install. Contains no dependencies or install scripts. | ||
wget -P "${rootfs}/" http://archive.ubuntu.com/ubuntu/pool/main/l/lsb-release-minimal/lsb-release_12.1-1_all.deb | ||
# Run a smoke test for dpkg to ensure that it does not throw an error | ||
chroot "${rootfs}/" dpkg --install ./lsb-release_12.1-1_all.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
summary: Integration tests for tar | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices tar_tar)" | ||
mkdir "${rootfs}/test" | ||
echo "This is a test file" > "${rootfs}/test/test.txt" | ||
touch --date=2020-01-01T00:00:00Z "${rootfs}/test/test.txt" | ||
touch --date=2020-01-01T00:00:00Z "${rootfs}/test/" | ||
# Create an uncompressed tarball and compare to a known hash. | ||
chroot "${rootfs}/" tar -cf test.tar /test/ | ||
[[ $(sha256sum "${rootfs}/test.tar" | cut -d' ' -f1) == f5893661db55f15954c90dee860ee6c93042ea482c303f5f162c8078cdc79928 ]] | ||
# Decompress back to a new directory and ensure the file is correct. | ||
mkdir "${rootfs}/test-result" | ||
chroot "${rootfs}/" tar -xf test.tar -C /test-result | ||
[[ "$(cat ${rootfs}/test/test.txt)" == "$(cat ${rootfs}/test-result/test/test.txt)" ]] | ||
# Check modification times | ||
[[ $(stat -c %Y ${rootfs}/test-result/test) == 1577836800 ]] | ||
[[ $(stat -c %Y ${rootfs}/test-result/test) == 1577836800 ]] | ||
# Expect an error gzipping a tarball since gzip is not installed in the chroot. | ||
! chroot "${rootfs}/" tar -czf test.tar.gz /test/ 2| grep -q "tar (child): gzip: Cannot exec: No such file or directory" | ||
# New environment for rmt slice. | ||
rootfs="$(install-slices tar_rmt)" | ||
# We can't really do much with rmt, so just check that the executable works. | ||
chroot "${rootfs}/" rmt-tar --version |