Skip to content

Commit

Permalink
feat(24.10): add slices for NGINX GeoIP modules and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
norrisjeremy committed Dec 18, 2024
1 parent c88c891 commit e4151b5
Show file tree
Hide file tree
Showing 19 changed files with 310 additions and 0 deletions.
17 changes: 17 additions & 0 deletions slices/geoip-bin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package: geoip-bin

essential:
- geoip-bin_copyright

slices:
bins:
essential:
- libc6_libs
- libgeoip1t64_libs
contents:
/usr/bin/geoiplookup:
/usr/bin/geoiplookup6:

copyright:
contents:
/usr/share/doc/geoip-bin/copyright:
14 changes: 14 additions & 0 deletions slices/geoip-database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package: geoip-database

essential:
- geoip-database_copyright

slices:
data:
contents:
/usr/share/GeoIP/GeoIP.dat:
/usr/share/GeoIP/GeoIPv6.dat:

copyright:
contents:
/usr/share/doc/geoip-database/copyright:
26 changes: 26 additions & 0 deletions slices/geoipupdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package: geoipupdate

essential:
- geoipupdate_copyright

slices:
bins:
essential:
- ca-certificates_data
- geoipupdate_config
- libc6_libs
contents:
/usr/bin/geoipupdate:

config:
contents:
/etc/GeoIP.conf:

services:
contents:
/usr/lib/systemd/system/geoipupdate.service:
/usr/lib/systemd/system/geoipupdate.timer:

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

essential:
- libgeoip1t64_copyright

slices:
libs:
essential:
- libc6_libs
contents:
/usr/lib/*-linux-*/libGeoIP.so.1*:

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

essential:
- libmaxminddb0_copyright

slices:
libs:
essential:
- libc6_libs
contents:
/usr/lib/*-linux-*/libmaxminddb.so.0*:

copyright:
contents:
/usr/share/doc/libmaxminddb0/copyright:
27 changes: 27 additions & 0 deletions slices/libnginx-mod-http-geoip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package: libnginx-mod-http-geoip

essential:
- libnginx-mod-http-geoip_copyright

slices:
modules:
essential:
# libnginx-mod-http-geoip depends on nginx-abi, which is a virtual
# package provided by nginx, hence the dependency on nginx_bins.
- libc6_libs
- libgeoip1t64_libs
- libnginx-mod-http-geoip_config
- nginx_bins
contents:
/usr/lib/nginx/modules/ngx_http_geoip_module.so:

config:
contents:
# This symlink is created by the maintainer scipts
/etc/nginx/modules-enabled/50-mod-http-geoip.conf:
symlink: /usr/share/nginx/modules-available/mod-http-geoip.conf
/usr/share/nginx/modules-available/mod-http-geoip.conf:

copyright:
contents:
/usr/share/doc/libnginx-mod-http-geoip/copyright:
28 changes: 28 additions & 0 deletions slices/libnginx-mod-http-geoip2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package: libnginx-mod-http-geoip2

essential:
- libnginx-mod-http-geoip2_copyright

slices:
modules:
essential:
# libnginx-mod-http-geoip2 depends on nginx-abi, which is a virtual
# package provided by nginx, hence the dependency on nginx_bins.
- libc6_libs
- libmaxminddb0_libs
- libnginx-mod-http-geoip2_config
- libnginx-mod-stream_modules
- nginx_bins
contents:
/usr/lib/nginx/modules/ngx_http_geoip2_module.so:

config:
contents:
# This symlink is created by the maintainer scipts
/etc/nginx/modules-enabled/50-mod-http-geoip2.conf:
symlink: /usr/share/nginx/modules-available/mod-http-geoip2.conf
/usr/share/nginx/modules-available/mod-http-geoip2.conf:

copyright:
contents:
/usr/share/doc/libnginx-mod-http-geoip2/copyright:
28 changes: 28 additions & 0 deletions slices/libnginx-mod-stream-geoip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package: libnginx-mod-stream-geoip

essential:
- libnginx-mod-stream-geoip_copyright

slices:
modules:
essential:
# libnginx-mod-stream-geoip depends on nginx-abi, which is a virtual
# package provided by nginx, hence the dependency on nginx_bins.
- libc6_libs
- libgeoip1t64_libs
- libnginx-mod-stream-geoip_config
- libnginx-mod-stream_modules
- nginx_bins
contents:
/usr/lib/nginx/modules/ngx_stream_geoip_module.so:

config:
contents:
# This symlink is created by the maintainer scipts
/etc/nginx/modules-enabled/70-mod-stream-geoip.conf:
symlink: /usr/share/nginx/modules-available/mod-stream-geoip.conf
/usr/share/nginx/modules-available/mod-stream-geoip.conf:

copyright:
contents:
/usr/share/doc/libnginx-mod-stream-geoip/copyright:
28 changes: 28 additions & 0 deletions slices/libnginx-mod-stream-geoip2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package: libnginx-mod-stream-geoip2

essential:
- libnginx-mod-stream-geoip2_copyright

slices:
modules:
essential:
# libnginx-mod-stream-geoip2 depends on nginx-abi, which is a virtual
# package provided by nginx, hence the dependency on nginx_bins.
- libc6_libs
- libmaxminddb0_libs
- libnginx-mod-stream-geoip2_config
- libnginx-mod-stream_modules
- nginx_bins
contents:
/usr/lib/nginx/modules/ngx_stream_geoip2_module.so:

config:
contents:
# This symlink is created by the maintainer scipts
/etc/nginx/modules-enabled/70-mod-stream-geoip2.conf:
symlink: /usr/share/nginx/modules-available/mod-stream-geoip2.conf
/usr/share/nginx/modules-available/mod-stream-geoip2.conf:

copyright:
contents:
/usr/share/doc/libnginx-mod-stream-geoip2/copyright:
26 changes: 26 additions & 0 deletions slices/libnginx-mod-stream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package: libnginx-mod-stream

essential:
- libnginx-mod-stream_copyright

slices:
modules:
essential:
# libnginx-mod-stream depends on nginx-abi, which is a virtual package
# provided by nginx, hence the dependency on nginx_bins.
- libc6_libs
- libnginx-mod-stream_config
- nginx_bins
contents:
/usr/lib/nginx/modules/ngx_stream_module.so:

config:
contents:
# This symlink is created by the maintainer scipts
/etc/nginx/modules-enabled/50-mod-stream.conf:
symlink: /usr/share/nginx/modules-available/mod-stream.conf
/usr/share/nginx/modules-available/mod-stream.conf:

copyright:
contents:
/usr/share/doc/libnginx-mod-stream/copyright:
16 changes: 16 additions & 0 deletions slices/mmdb-bin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package: mmdb-bin

essential:
- mmdb-bin_copyright

slices:
bins:
essential:
- libc6_libs
- libmaxminddb0_libs
contents:
/usr/bin/mmdblookup:

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

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices geoip-bin_bins)"
chroot "${rootfs}/" geoiplookup -h
chroot "${rootfs}/" geoiplookup6 -h
8 changes: 8 additions & 0 deletions tests/spread/integration/geoipupdate/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
summary: Integration tests for geoipupdate

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices geoipupdate_bins)"
chroot "${rootfs}/" geoipupdate -V
9 changes: 9 additions & 0 deletions tests/spread/integration/libnginx-mod-http-geoip/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for libnginx-mod-http-geoip

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices base-files_var base-passwd_data libnginx-mod-http-geoip_modules)"
# This will fail if loading of the NGINX module fails.
chroot "${rootfs}/" nginx -t
9 changes: 9 additions & 0 deletions tests/spread/integration/libnginx-mod-http-geoip2/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for libnginx-mod-http-geoip2

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices base-files_var base-passwd_data libnginx-mod-http-geoip2_modules)"
# This will fail if loading of the NGINX module fails.
chroot "${rootfs}/" nginx -t
9 changes: 9 additions & 0 deletions tests/spread/integration/libnginx-mod-stream-geoip/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for libnginx-mod-stream-geoip

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices base-files_var base-passwd_data libnginx-mod-stream-geoip_modules)"
# This will fail if loading of the NGINX module fails.
chroot "${rootfs}/" nginx -t
9 changes: 9 additions & 0 deletions tests/spread/integration/libnginx-mod-stream-geoip2/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for libnginx-mod-stream-geoip2

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices base-files_var base-passwd_data libnginx-mod-stream-geoip2_modules)"
# This will fail if loading of the NGINX module fails.
chroot "${rootfs}/" nginx -t
9 changes: 9 additions & 0 deletions tests/spread/integration/libnginx-mod-stream/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Integration tests for libnginx-mod-stream

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices base-files_var base-passwd_data libnginx-mod-stream_modules)"
# This will fail if loading of the NGINX module fails.
chroot "${rootfs}/" nginx -t
8 changes: 8 additions & 0 deletions tests/spread/integration/mmdb-bin/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
summary: Integration tests for mmdb-bin

execute: |
# Chisel a minimum number of slices to give us a runnable system that we can
# test in.
rootfs="$(install-slices mmdb-bin_bins)"
chroot "${rootfs}/" mmdblookup --version

0 comments on commit e4151b5

Please sign in to comment.