Received: from out-30.mta1.migadu.com (out-30.mta1.migadu.com [95.215.58.30]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id CC6322236F5 for <~alpine/users@lists.alpinelinux.org>; Wed, 1 Feb 2023 13:21:52 +0000 (UTC) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1675257711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wNqx2oytqeDiR0CUcEDoIcNOvjMBHNIEOsA0FeBJxNY=; b=pNKq4Q801oXYqCskHwS24rZ5Crlpl9q8OuBmh3I3HS7f5Zs9FMKak28g+xAkqXartHDnQr 2ipsmBwecpPYUzMWmuYzx1rhfbMgLl2+o7qMc3hUuOR4jH06XVH6qUaNCfdTEdPWitZ6ej ZzxcyshyYkOZjVzSSlIJWv/Dq60/B9o= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 01 Feb 2023 14:21:50 +0100 Message-Id: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "alice" To: "Alexander Scherbatiy" , <~alpine/users@lists.alpinelinux.org> Subject: Re: Font dependencies in Alpine Linux References: <59c4dca8-5cd0-1a7f-043f-924448927ece@bell-sw.com> <469f059e-969c-444b-6cd3-4b7646e63f77@bell-sw.com> In-Reply-To: <469f059e-969c-444b-6cd3-4b7646e63f77@bell-sw.com> X-Migadu-Flow: FLOW_OUT On Wed Feb 1, 2023 at 2:12 PM CET, Alexander Scherbatiy wrote: > On 2/1/23 15:38, alice wrote: > > > On Wed Feb 1, 2023 at 12:43 PM CET, Alexander Scherbatiy wrote: > >> Hello, > >> > >> If I install dejavu fonts on systems ubuntu:20.04, fedora:35, > >> opensuse/leap:15.4 in docker they do not install fontconfig and freety= pe > >> as dependencies. > >> > >> DejaVu fonts have dependencies on fontconfig and freetype libraries on > >> Linux Alpine . > >> > >> --------- > >> > >> docker run -it alpine:3.17 ash > >> / # apk update > >> / # apk add font-dejavu > >> (1/10) Installing libexpat (2.5.0-r0) > >> (2/10) Installing brotli-libs (1.0.9-r9) > >> (3/10) Installing libbz2 (1.0.8-r4) > >> (4/10) Installing libpng (1.6.38-r0) > >> (5/10) Installing freetype (2.12.1-r0) > >> (6/10) Installing fontconfig (2.14.1-r0) > >> (7/10) Installing encodings (1.0.6-r0) > >> (8/10) Installing libfontenc (1.1.6-r0) > >> (9/10) Installing mkfontscale (1.2.2-r1) > >> (10/10) Installing font-dejavu (2.37-r3) > >> Executing busybox-1.35.0-r29.trigger > >> Executing fontconfig-2.14.1-r0.trigger > >> Executing mkfontscale-1.2.2-r1.trigger > >> OK: 28 MiB in 25 packages > >> --------- > >> > >> The use case which I have is using a docker with Linux Alpine to > >> generate reports with Java in headless mode. > >> Java allows to use fonts on systems where the fontconfig is not > >> installed by providing paths to fonts in /lib/fontconfig.properti= es > >> file. > >> Java also can be built with bundled freetype which is a subset of the > >> full freetype library. > > freetype is merely a dependency of fontconfig in this case > > > >> > >> Is it necessary that fonts have dependencies on fontconfig and freetyp= e > >> libraries in Alpine Linux? > > yes, as normally using the fonts generally requires it. > > > > i suppose it's not impossible to not depend on it paired with any fonts > > directly, but strictly speaking there is generally no difference, excep= t in > > your special usecase. you'd probably say the same goes for mkfontscale? > =C2=A0 Yes. The general question is that fonts on Alpine Linux has more= =20 > dependencies than fonts on other systems. > =C2=A0 For example, if I use ubuntu:20.04, dejavu fonts depend only on= =20 > fonts-dejavu-core and fonts-dejavu-extra > > =C2=A0--------- > =C2=A0docker run -it ubuntu:20.04 bash > =C2=A0apt update > =C2=A0apt install fonts-dejavu > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following additional packages will be installed: > =C2=A0 fonts-dejavu-core fonts-dejavu-extra > The following NEW packages will be installed: > =C2=A0 fonts-dejavu fonts-dejavu-core fonts-dejavu-extra > 0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded. > Need to get 2996 kB of archives. > After this operation, 10.5 MB of additional disk space will be used. > --------- > > > The aim is to use a docker image with Java as small as possible. > > What is the right way to setup Alpine Linux docker with fonts and=20 > without additional dependencies for my use case? > My be fonts can be just copied during docker image creation instead of=20 > just font installation from packages? merely dropping the dependencies could be looked at by someone if they want= ed, i don't have the energy currently , but for your usecase: - exactly that, just copy what you want. - use: $ apk add -t mkfontscale $ apk add -t fontconfig (note individual commands with nothing else) this is a hack(!) that creates a virtual package with no dependencies with = a pkgver of the current date, so it will then uninstall the real ones that ex= ist (since the dependency is satisfied via name only, and this virtual has the highest version). you end up with no dependencies. > > Thanks, > Alexander. > > > > >> Thanks, > >> Alexander.