Re: rrdtool-chroot pango-basic-fc.so

2016-04-23 Thread Predrag Punosevac
Stuart Henderson  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 -   1.2
> +++ files/rrdtool-chroot.sh   24 Apr 2016 01:03:36 -
> @@ -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() {
>   /cache/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
>  }
>  



Re: rrdtool-chroot pango-basic-fc.so

2016-04-23 Thread Stuart Henderson
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?

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 -   1.2
+++ files/rrdtool-chroot.sh 24 Apr 2016 01:03:36 -
@@ -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() {
/cache/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
 }
 



Re: rrdtool-chroot pango-basic-fc.so

2016-04-23 Thread Predrag Punosevac
Predrag Punosevac wrote:

> I must have done something stupid during the upgrade from 5.8 to 5.9
> (amd64)
> 
> # /usr/local/share/examples/rrdtool/rrdtool-chroot enable 
> cp: /usr/local/lib/pango/*/modules/pango-basic-fc.so: No such file or
> directory
> 
> Directory /usr/local/lib/pango is indeed missing. 
> 
> # pkg_info pango
> Information for inst:pango-1.38.1
> 
> However I don't see that the package contains /usr/lib/pongo/1.8/modules
> anymore (I downloaded and extracted package manually).
> 
> To add insult to injury it seems that rrdtool-chroot is not behaving
> correctly on my machine. After commenting out the line in rrdtool-chroot
> enable which is suppose to copy pango-basic-fc.so I noticed that rrdtool
> binaries were not coppied to /var/www/bin. 
> 
> I did that manually and now I can see nice graphs in the syweb of my
> home network. The only thing I noticed about symon/symux is that it has
> problems with sensor(cpu0.temp0) data
> 
> # /usr/local/share/examples/symon/c_smrrds.sh all  
> /var/www/symon/rrds/localhost/io_cd0.rrd exists - ignoring
> /var/www/symon/rrds/localhost/io_sd2.rrd exists - ignoring
> /var/www/symon/rrds/localhost/io_sd1.rrd exists - ignoring
> /var/www/symon/rrds/localhost/io_sd0.rrd exists - ignoring
> /var/www/symon/rrds/localhost/if_em0.rrd exists - ignoring
> /var/www/symon/rrds/localhost/proc_httpd.rrd exists - ignoring
> ERROR: parsing min val - Cannot convert '-U' to float
> could not create /var/www/symon/rrds/localhost/sensor_cpu0.temp0.rrd
> /var/www/symon/rrds/localhost/mbuf.rrd exists - ignoring
> /var/www/symon/rrds/localhost/pf.rrd exists - ignoring
> /var/www/symon/rrds/localhost/if_lo0.rrd exists - ignoring
> /var/www/symon/rrds/localhost/mem.rrd exists - ignoring
> /var/www/symon/rrds/localhost/cpu0.rrd exists - ignoring
> 
> 
> Also on syweb it seems that the following layouts are broken pf and
> total_firewall (I don't get graphs but it could be very well related to
> above problem with rrdtool running in chroot).
> 
> Any ideas?
> 
> Predrag

rrdtool-chroot script is broken for me on the freshly installed 5.9.
with the same error