Stuart Henderson <[email protected]> wrote:
> Ah, it seems that pango got simplified again. What files did you end up
> needing to copy into the chroot? Would you be able to try it with this diff?
>
I think you are right. I ended up doing the following 2 lines from the
script
cp -p /usr/local/bin/rrdtool /var/www/usr/local/bin
for i in $(ldd /usr/local/bin/rrdtool | grep 'lib/' | awk '{
print $7 }'
) ; do \
cp -p $i /var/www/usr/lib/
done
to get a semi-functional syweb instance at home. I am too busy until
next weekend to look this again.
Predrag
> Index: files/rrdtool-chroot.sh
> ===================================================================
> RCS file: /cvs/ports/net/rrdtool/files/rrdtool-chroot.sh,v
> retrieving revision 1.2
> diff -u -p -r1.2 rrdtool-chroot.sh
> --- files/rrdtool-chroot.sh 6 Apr 2014 17:01:34 -0000 1.2
> +++ files/rrdtool-chroot.sh 24 Apr 2016 01:03:36 -0000
> @@ -1,7 +1,7 @@
> #!/bin/ksh
> #
> # make rrdtool(1) available in webserver chroot(8): copy in library
> -# dependencies and generate barebones pango/fontconfig/pango configuration
> +# dependencies and generate barebones fontconfig configuration
>
> # WARNING: /var/www/usr/libexec/ld.so and /var/www/lib/* may be shared
> # by other executables in the chroot(8)
> @@ -12,12 +12,11 @@ if [ "$(id -u)" -ne 0 ]; then
> fi
>
> do_enable() {
> - mkdir -p
> /var/www{/etc/{pango,fonts/TTF},/usr/lib,/usr/libexec,${LOCALBASE}/bin,${X11BASE}/lib,/cache/fontconfig}
> + mkdir -p
> /var/www{/etc/fonts/TTF,/usr/lib,/usr/libexec,${LOCALBASE}/bin,${X11BASE}/lib,/cache/fontconfig}
> cp -p ${LOCALBASE}/bin/rrdtool /var/www${LOCALBASE}/bin
> for i in $(ldd ${LOCALBASE}/bin/rrdtool | grep 'lib/' | awk '{ print $7
> }') ; do \
> cp -p $i /var/www/usr/lib/
> done
> - cp -p ${LOCALBASE}/lib/pango/*/modules/pango-basic-fc.so
> /var/www/usr/lib/
> cp -p /usr/libexec/ld.so /var/www/usr/libexec/
> cp -p /usr/X11R6/lib/X11/fonts/TTF/DejaVuSans.ttf /var/www/etc/fonts/TTF
> cat << EOF > /var/www/etc/fonts/fonts.conf
> @@ -28,21 +27,16 @@ do_enable() {
> <cachedir>/cache/fontconfig</cachedir>
> </fontconfig>
> EOF
> - cat << EOF > /var/www/etc/pango/pango.modules
> -/usr/lib/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape
> PangoRenderFc common:
> -EOF
> }
>
> do_disable() {
> rm -rf /var/www/usr/local/bin/rrdtool \
> /var/www/usr/libexec/ld.so \
> /var/www/etc/fonts \
> - /var/www/etc/pango \
> /var/www/cache/fontconfig
> for i in $(ldd ${LOCALBASE}/bin/rrdtool | grep 'lib/' | awk '{ print $7
> }') ; do \
> rm -f /var/www/usr/lib/$(basename $i | sed -e 's,\.so.*,,')*
> done
> - rm -f /var/www/usr/lib/pango-basic-fc.so
> rmdir
> /var/www{/etc/fonts,${LOCALBASE}/bin,${LOCALBASE},/usr/lib,/usr/libexec,/usr}
> 2>/dev/null
> }
>