Skip to content

Add drill / ldnsutils #554

@polarathene

Description

@polarathene

drill has much less dependencies linked than dig (bind9-dnsutils_bins_) or kdig (no knot-dnsutils slice). In an image approx 50MB in size already (porting attempt to chisel here) with common shared dependencies, adding dig increased image weight by 47MB, while this custom slice for drill only adds 480KB (3 files).

I have not written a custom slice before this, and the below example that I pieced together seems accurate for drill, but from what I understand the slices must be aligned to a package name which would be a bit misleading as I've excluded anything unrelated to drill.

Sharing here in case it helps someone else :)


ldnsutils.yaml:

package: ldnsutils

essential:
  - ldnsutils_copyright

slices:
  bins:
    essential:
      - libc6_libs
      - libldns3t64_libs
    contents:
      /usr/bin/drill:

  copyright:
    contents:
      /usr/share/doc/ldnsutils/copyright:

libldns3t64.yaml:

package: libldns3t64

essential:
  - libldns3t64_copyright

slices:
  libs:
    essential:
      - libc6_libs
      - libidn2-0_libs
      - libssl3t64_libs
    contents:
      /usr/lib/*-linux-*/libldns.so.*:

  copyright:
    contents:
      /usr/share/doc/libldns3t64/copyright:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions