Skip to content

Commit

Permalink
Merge branch 'ubuntu-24.10' into vim-tiny_oracular
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdcordeiro authored Feb 18, 2025
2 parents d258ecc + e0cfc44 commit efdd02f
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 0 deletions.
39 changes: 39 additions & 0 deletions slices/ca-certificates-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package: ca-certificates-java

essential:
- ca-certificates-java_copyright

slices:
bins:
essential:
- ca-certificates-java_data-with-certs
- ca-certificates_bins
# chisel tool does not allow per-architecture packages
# openjdk-8 is not published for RISCV in the archive
# - openjdk-8-jre-headless_security
contents:
# In order to generate Java keystore in a chiselled chroot
# execute following commands, assuming that 'rootfs' is the
# output directory and openjdk-8-jre-headless_security is
# also installed.
# cd rootfs
# sudo chroot . /bin/bash /usr/sbin/update-ca-certificates
# sudo chroot . find /etc/ssl/certs/ -name *.pem -exec echo +{} \; > certs
# `mkdir proc && mount -t proc /proc proc/` or
# `chroot . ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java proc/self/exe`
# sudo chroot . /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
# -jar /usr/share/ca-certificates-java/ca-certificates-java.jar < certs
# rm certs
# See tests/spread/integration/ca-certificates-java/task.yaml
/etc/ssl/certs/java/:
/usr/share/ca-certificates-java/ca-certificates-java.jar:

data-with-certs:
essential:
- ca-certificates_data-with-certs
contents:
/etc/ssl/certs/java/:

copyright:
contents:
/usr/share/doc/ca-certificates-java/copyright:
16 changes: 16 additions & 0 deletions slices/netcat-openbsd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package: netcat-openbsd

essential:
- netcat-openbsd_copyright

slices:
bins:
essential:
- libbsd0_libs
- libc6_libs
contents:
/usr/bin/nc.openbsd:

copyright:
contents:
/usr/share/doc/netcat-openbsd/copyright:
33 changes: 33 additions & 0 deletions slices/unzip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package: unzip

essential:
- unzip_copyright

slices:
bins:
essential:
- libbz2-1.0_libs
- libc6_libs
contents:
/usr/bin/funzip:
/usr/bin/unzip:
/usr/bin/unzipsfx:
# Should be a hard link, but Chisel does not yet support hard links
# not yet support hard links.
# TODO update this to a hard link once a
# newer version of Chisel is released with
# https://github.com/canonical/chisel/commit/9d9d2144cf47586d02ff7566b8764e70057987a4
/usr/bin/zipinfo: {symlink: /usr/bin/unzip}

scripts:
essential:
- dash_bins
- grep_deprecated
- sed_bins
- unzip_bins
contents:
/usr/bin/zipgrep:

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

essential:
- zip_copyright

slices:
bins:
essential:
- libbz2-1.0_libs
- libc6_libs
contents:
/usr/bin/zip:
/usr/bin/zipcloak:
/usr/bin/zipnote:
/usr/bin/zipsplit:

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

environment:
SLICE/bins: "bins"

execute: |
# Test bins slice installation
echo "SLICE=${SLICE}"
rootfs="$(install-slices ca-certificates-java_${SLICE} openjdk-8-jre-headless_security)"
cd ${rootfs}
chroot . /bin/bash /usr/sbin/update-ca-certificates
chroot . find /etc/ssl/certs/ -name *.pem -exec echo +{} \; > ${rootfs}/certs
mkdir -p proc/self
for java in $(find /usr/lib/jvm -name java -type f); do
ln -s /${java} proc/self/exe
chroot . /${java} -jar /usr/share/ca-certificates-java/ca-certificates-java.jar < certs
done
9 changes: 9 additions & 0 deletions tests/spread/integration/netcat-openbsd/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for netcat-openbsd

execute: |
rootfs="$(install-slices netcat-openbsd_bins)"
chroot "${rootfs}/" nc.openbsd -h
chroot "${rootfs}/" nc.openbsd -l 1234 >testfile &
echo "Hello World" | chroot "${rootfs}/" nc.openbsd -q 1 -w 1 127.0.0.1 1234
test "$(cat testfile)" = "Hello World"
14 changes: 14 additions & 0 deletions tests/spread/integration/unzip/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
summary: Integration tests for unzip

execute: |
rootfs="$(install-slices base-files_bin unzip_bins unzip_scripts zip_bins)"
chroot "${rootfs}/" unzip -hh
chroot "${rootfs}/" unzipsfx -hh
echo "Hello, World" > "${rootfs}/testfile.txt"
chroot "${rootfs}" zip testfile.zip testfile.txt
test "$(chroot "${rootfs}" unzip -p testfile.zip testfile.txt)" = "Hello, World"
test "$(chroot "${rootfs}" zipinfo -1 testfile.zip)" = "testfile.txt"
test "$( chroot "${rootfs}" funzip testfile.zip )" = "Hello, World"
chroot "${rootfs}" zipgrep "Hello" testfile.zip
18 changes: 18 additions & 0 deletions tests/spread/integration/zip/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
summary: Integration tests for zip

execute: |
rootfs="$(install-slices unzip_bins zip_bins)"
chroot "${rootfs}/" zip -h2
chroot "${rootfs}/" zipcloak -h
chroot "${rootfs}/" zipnote -h
chroot "${rootfs}/" zipsplit -h
echo "Hello, World" > "${rootfs}/testfile.txt"
chroot "${rootfs}" zip testfile.zip testfile.txt
chroot "${rootfs}" zipnote testfile.zip > foo.tmp
echo -e "@ This is a test comment" >> foo.tmp
chroot "${rootfs}" zipnote -w testfile.zip < foo.tmp
test "$(chroot "${rootfs}" zipnote testfile.zip | tail -n1)" = "\@ This is a test comment"
chroot "${rootfs}" zipsplit testfile.zip
test "$(chroot "${rootfs}" unzip -p testfil1.zip testfile.txt)" = "Hello, World"

0 comments on commit efdd02f

Please sign in to comment.