Re: mod_security 2.5.9

2009-08-09 Thread Mel Flynn
On Sunday 09 August 2009 04:24:37 Charles Howse wrote:
 On Aug 8, 2009, at 11:38 PM, Mel Flynn wrote:
  On Saturday 08 August 2009 19:38:42 Charles Howse wrote:
  On Aug 8, 2009, at 11:36 AM, Mel Flynn wrote:
  On Saturday 08 August 2009 08:00:47 Charles Howse wrote:
  Just wondering if anyone has tried updating from mod_security 2.5.9
  to
  2.5.9_1 via portupgrade.
  It fails with a linker error for me.
 
  And can we see the actual linker error?
 
  Thought I had included enough in my original post.
  Here's the mod_security part of 'portupgrade -a'
 
  ...
  [Updating the pkgdb format:bdb_btree in /var/db/pkg ... - 51
  packages found (-0 +1) . done]
  ---  Upgrading 'mod_security-2.5.9' to 'mod_security-2.5.9_1' (www/
  mod_security)
  ---  Building '/usr/ports/www/mod_security'
 
  ...
 
  checking for libapr config script... /usr/local/bin/apr-1-config
  configure: using ' -lcrypt  -pthread' for apr Library
 
 ^^
 
  /usr/local/share/apr/build-1/libtool --silent --mode=link cc -o
  mod_security2.la -R/usr/local/lib  -L/usr/local/lib -L/usr/local/
  lib -
  L/usr/local/lib -lpcre -lxml2 -lz -liconv -lm -rpath /usr/local/
  libexec/apache22 -module -avoid-versionmsc_release.lo msc_lua.lo
  acmp.lo msc_geo.lo pdf_protect.lo msc_reqbody.lo persist_dbm.lo
  msc_pcre.lo msc_util.lo msc_parsers.lo modsecurity.lo
  msc_multipart.lo
  msc_xml.lo msc_logging.lo re_variables.lo re_tfns.lo re_actions.lo
  re_operators.lo re.lo apache2_util.lo apache2_io.lo apache2_config.lo
  mod_security2.lo
  # XXX there is mlogc-static target in the Makefile, too
  cd /usr/ports/www/mod_security/work/modsecurity-apache_2.5.9/apache2
   /usr/bin/env SHELL=/bin/sh NO_LINT=YES   PREFIX=/usr/local
  LOCALBASE=/usr/local X11BASE=/usr/local  MOTIFLIB=-L/usr/local/lib -
  lXm -lXp LIBDIR=/usr/lib  CC=cc CFLAGS=-O2 -fno-strict-
  aliasing -
  pipe CXX=c++ CXXFLAGS=-O2 -fno-strict-aliasing -pipe
  MANPREFIX=/
  usr/local BSD_INSTALL_PROGRAM=install  -s -o root -g wheel -m 555
  BSD_INSTALL_SCRIPT=install  -o root -g wheel -m 555
  BSD_INSTALL_DATA=install  -o root -g wheel -m 444
  BSD_INSTALL_MAN=install  -o root -g wheel -m 444 make -f Makefile
  mlogc
 
  Building dynamically linked mlogc...
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_yield'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_destroy'
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_create'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_init'
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_exit'
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_equal'
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_detach'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_setstacksize'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_getdetachstate'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_setguardsize'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_attr_setdetachstate'
  /usr/local/lib/libapr-1.so: undefined reference to `pthread_join'
  /usr/local/lib/libapr-1.so: undefined reference to
  `pthread_cond_timedwait'
  *** Error code 1
 
  Apparently -pthread isn't passed here. I've tried to reproduce this,
  but I
  can't. Could you show the output of:
  make -C /usr/ports/www/mod_security actual-package-depends

 r...@curly /root# make -C /usr/ports/www/mod_security actual-package-
 depends
 pcre-7.9:devel/pcre
 apr-gdbm-db42-1.3.8.1.3.9:devel/apr
 curl-7.19.5_1:ftp/curl
 libxml2-2.7.3:textproc/libxml2
 apache-2.2.11_7:www/apache22
 pkg-config-0.23_1:devel/pkg-config
 expat-2.0.1:textproc/expat2
 gdbm-1.8.3_3:databases/gdbm
 db42-4.2.52_5:databases/db42
 libiconv-1.13.1:converters/libiconv
 ca_root_nss-3.11.9_2:security/ca_root_nss
 pkg-config-0.23_1:devel/pkg-config
 libiconv-1.13.1:converters/libiconv
 expat-2.0.1:textproc/expat2
 perl-5.8.9_3:lang/perl5.8
 pcre-7.9:devel/pcre
 libiconv-1.13.1:converters/libiconv
 r...@curly /root#

  Also the contents of /var/db/ports/apr/options.

 r...@curly /root# cat /var/db/ports/apr/options
 # This file is auto-generated by 'make config'.
 # No user-servicable parts inside!
 # Options for apr-gdbm-db42-1.3.3.1.3.4_1
 _OPTIONS_READ=apr-gdbm-db42-1.3.3.1.3.4_1
 WITH_THREADS=true
 WITHOUT_IPV6=true
 WITH_GDBM=true
 WITH_BDB=true
 WITHOUT_NDBM=true
 WITHOUT_LDAP=true
 WITHOUT_MYSQL=true
 WITHOUT_PGSQL=true

Ok, reproduced in a clean jail on a 6.4-p6 box, amd64.
I tried setting WITH_THREADS in www/apache22 options (built without first), 
but that didn't change anything.
I built apache22 with defaults + APR_FROM_PORTS.

On the working machine (7.1) I see no mention of pthread in the mlogc makefile 
either, so perhaps the linker got smarter in 7.x.

I've attached a patch that fixes the issue.
@maintainers: do you want a PR for this?
-- 
Mel
--- Makefile.orig   2009-08-05 12:31:21.0 -0800
+++ Makefile

Re: mod_security 2.5.9

2009-08-09 Thread Mel Flynn
On Sunday 09 August 2009 18:31:55 Charles Howse wrote:
 On Aug 9, 2009, at 3:42 PM, Mel Flynn wrote:
  I've attached a patch that fixes the issue.

 blush
 Whoops, looks like I've stepped in over my head.
 Exactly how do I use this patch?
 /blush

cd /usr/ports/www/mod_security
patch  /path/to/patch
make build

You can also not use the patch and do:
cd /usr/ports/www/mod_security
make patch
cd `make -V WRKSRC`
sed -i.orig -e 's,@APR_LD_LINK@,@APR_LD_LINK@ @ARP_LIBS@,' \
mlogc-src/Makefile.in
cd /usr/ports/www/mod_security
make build

But that only works one time. The patch fixes the port so that it works every 
time.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mod_security 2.5.9

2009-08-08 Thread Mel Flynn
On Saturday 08 August 2009 08:00:47 Charles Howse wrote:

 Just wondering if anyone has tried updating from mod_security 2.5.9 to
 2.5.9_1 via portupgrade.
 It fails with a linker error for me.

And can we see the actual linker error?
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Recovering loss of /var/db/pkg ?

2009-08-08 Thread Mel Flynn
On Saturday 08 August 2009 03:02:05 b. f. wrote:

 2) write a script to get the names of all files that belonged to ports
 and swing through a ports tree, associating the files with ports via
 the pkg-plist and PLIST_FILES variables; or

This is quite complex, time consuming and prone to error the more ports tree 
and installed ports are out of sync. Either way, you will want to compare 
files against the generate-plist target (and the resulting contents of 
$TMPPLIST), as more and more ports use dynamic package list features.

To prevent this from happening in the future, I've written a small periodic 
script that you can put in /usr/local/etc/periodic/daily and backs up the list 
of origins of installed ports.

On the first run (or more to the point, if /var/backup/pkglist.prev doesn't 
exist), it will dump the current list. Otherwise, it will compare with the 
previous run and provide a diff if anything changed. So:
- if you set $daily_backup_pkglist_enable to YES in /etc/periodic.conf
- if you have daily reports mailed to an off-machine address
- and if you keep the first run and all diffs

You can recreate an accurate list of installed ports, when applying all diffs 
in sequence, even if you newfs'd /var on the machine.
-- 
Mel

#!/bin/sh
#
# $Coar: periodic/daily/203.backup-pkglist.sh,v 1.3 2009/08/08 17:04:41 mel 
Exp $
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi

daily_backup_pkglist_enable=${daily_backup_pkglist_enable:-NO}
daily_backup_pkglist_dbdir=${daily_backup_pkglist_dbdir:-/var/db/pkg}

create_pkglist()
{
local f
f=$1

for CFILE in ${daily_backup_pkglist_dbdir}/*/+CONTENTS; do
sed -ne 's,^...@comment ORIGIN:,,p' ${CFILE}
done | sort  ${f}
}

case $daily_backup_pkglist_enable in
[Yy][Ee][Ss])
if [ ! -d ${daily_backup_pkglist_dbdir} ]
then
echo '$daily_backup_pkglist_enable is enabled but' \
${daily_backup_pkglist_dbdir} doesn't exist
rc=2
else
bak=/var/backups
rc=0

echo 
echo Backing up list of package origins:

create_pkglist $bak/pkglist.cur
if [ ! -f $bak/pkglist.prev ]
then
echo no $bak/pkglist.prev. Dumping full list for prosperity:
cat $bak/pkglist.cur
cp -p $bak/pkglist.cur $bak/pkglist.prev
fi

if ! cmp -s $bak/pkglist.prev $bak/pkglist.cur
then
[ $rc -lt 1 ]  rc=1
echo $host pkglist diffs:
diff -u $bak/pkglist.prev $bak/pkglist.cur
mv $bak/pkglist.cur $bak/pkglist.prev
fi
fi;;

*)  rc=0;;
esac

exit $rc

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: net-mgmt/flowd - broken ?

2009-08-08 Thread Mel Flynn
On Wednesday 05 August 2009 10:35:02 Kalle Møller wrote:
 Hi

 I'm trying to build flowd with perl

 make WITH_PERL=YES

 But it returns that it is broken ?

PR filed: http://www.freebsd.org/cgi/query-pr.cgi?pr=137560
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Setting up LAN: no route to host

2009-08-08 Thread Mel Flynn
On Saturday 08 August 2009 16:38:39 Nerius Landys wrote:
 I'm trying to set up a LAN that is isolated from the internet, and I
 don't know what to put in /etc/rc.conf for certain variables.  I'm
 running FreeBSD 7.1 with the latest patches.

 So far my /etc/rc.conf file has the following lines:

 defaultrouter=192.168.0.1 # I would like to leave this blank, but I
 put something here anyways.
 hostname=speedy.i
 ifconfig_fxp0=inet 192.168.0.254  network 255.255.255.0
 ifconfig_fxp0=up

First:
You override the first line with the second line. So in the end, all you 
accomplish is mark the interface up.
Second:
network in the first line should be netmask

You should delete the second line (an interface will be marked up if an IP 
address is assigned to it) and fix the netmask keyword.

You may want to read up on sh(1) how it treats variables.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Building home router: 192.168.0.x to access internet

2009-08-08 Thread Mel Flynn
On Saturday 08 August 2009 18:32:30 Nerius Landys wrote:

 First, my choise of internal network IP addresses is 192.168.0.x.  My
 router machine's IP address will be 192.168.0.254 (that's the
 interface facing the internal network).  The IP addresses of the
 machines behind the router will start at 192.168.0.2 and go up.  I'm
 wondering if this choice of IP addresses is conventional or good.  Is
 this numbering scheme decent?

Convention is to use the lowest host IP address for the router and the highest 
for broadcast. Yet, it is only convention. There's nothing stopping you from 
using other address, as long as your client machines know this.

 If so, can someone give me a really minimal yet secure packet filter
 rule set that would do the job? (I'm prepared to read the pf docs,
 which will take me a few hours.)  The router will connect to the
 outside via DHCP, and from what I remember I had to add a rule to not
 drop packets that were DHCP-related.

There's actually a nice example in the PF FAQ that covers some basics:
http://www.openbsd.org/faq/pf/tagging.html

There used to be a sample pf.conf, but I see that got nuked, yet there still 
are examples in /usr/share/examples/pf/.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mod_security 2.5.9

2009-08-08 Thread Mel Flynn
On Saturday 08 August 2009 19:38:42 Charles Howse wrote:
 On Aug 8, 2009, at 11:36 AM, Mel Flynn wrote:
  On Saturday 08 August 2009 08:00:47 Charles Howse wrote:
  Just wondering if anyone has tried updating from mod_security 2.5.9
  to
  2.5.9_1 via portupgrade.
  It fails with a linker error for me.
 
  And can we see the actual linker error?

 Thought I had included enough in my original post.
 Here's the mod_security part of 'portupgrade -a'

 ...
 [Updating the pkgdb format:bdb_btree in /var/db/pkg ... - 51
 packages found (-0 +1) . done]
 ---  Upgrading 'mod_security-2.5.9' to 'mod_security-2.5.9_1' (www/
 mod_security)
 ---  Building '/usr/ports/www/mod_security'

...

 checking for libapr config script... /usr/local/bin/apr-1-config
 configure: using ' -lcrypt  -pthread' for apr Library
^^
 /usr/local/share/apr/build-1/libtool --silent --mode=link cc -o
 mod_security2.la -R/usr/local/lib  -L/usr/local/lib -L/usr/local/lib -
 L/usr/local/lib -lpcre -lxml2 -lz -liconv -lm -rpath /usr/local/
 libexec/apache22 -module -avoid-versionmsc_release.lo msc_lua.lo
 acmp.lo msc_geo.lo pdf_protect.lo msc_reqbody.lo persist_dbm.lo
 msc_pcre.lo msc_util.lo msc_parsers.lo modsecurity.lo msc_multipart.lo
 msc_xml.lo msc_logging.lo re_variables.lo re_tfns.lo re_actions.lo
 re_operators.lo re.lo apache2_util.lo apache2_io.lo apache2_config.lo
 mod_security2.lo
 # XXX there is mlogc-static target in the Makefile, too
 cd /usr/ports/www/mod_security/work/modsecurity-apache_2.5.9/apache2
  /usr/bin/env SHELL=/bin/sh NO_LINT=YES   PREFIX=/usr/local
 LOCALBASE=/usr/local X11BASE=/usr/local  MOTIFLIB=-L/usr/local/lib -
 lXm -lXp LIBDIR=/usr/lib  CC=cc CFLAGS=-O2 -fno-strict-aliasing -
 pipe CXX=c++ CXXFLAGS=-O2 -fno-strict-aliasing -pipe  MANPREFIX=/
 usr/local BSD_INSTALL_PROGRAM=install  -s -o root -g wheel -m 555
 BSD_INSTALL_SCRIPT=install  -o root -g wheel -m 555
 BSD_INSTALL_DATA=install  -o root -g wheel -m 444
 BSD_INSTALL_MAN=install  -o root -g wheel -m 444 make -f Makefile
 mlogc

 Building dynamically linked mlogc...
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_yield'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_attr_destroy'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_create'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_attr_init'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_exit'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_equal'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_detach'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_attr_setstacksize'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_attr_getdetachstate'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_attr_setguardsize'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_attr_setdetachstate'
 /usr/local/lib/libapr-1.so: undefined reference to `pthread_join'
 /usr/local/lib/libapr-1.so: undefined reference to
 `pthread_cond_timedwait'
 *** Error code 1

Apparently -pthread isn't passed here. I've tried to reproduce this, but I 
can't. Could you show the output of:
make -C /usr/ports/www/mod_security actual-package-depends

Also the contents of /var/db/ports/apr/options.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: KDE3 -- KDE4

2009-08-07 Thread Mel Flynn
On Thursday 06 August 2009 19:26:20 Paul Schmehl wrote:
 --On August 6, 2009 9:29:30 PM -0500 Mel Flynn

 mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Thursday 06 August 2009 15:21:14 Paul Schmehl wrote:
  Can someone who has already done this upgrade suggest the best way to go
  about it?  Do I need to completely uninstall kde3 first?  Is there an
  upgrade path that's not fraught with gotchas?
 
  Wait a week I'd say. KDE 4.3.0 has hit the ports tree rather fast to be
  in
  time for the ports freeze and a lot of stuff is being ironed out. In
  fact,
  probably the best time is after the ports freeze is over. But I expect
  the big
  gotchas to be gone in a few days.
  --

 Thanks, Mel.  I'll wait.  Will there be instructions in
 /usr/ports/UPDATING after the freeze?  (There's nothing in there now about
 upgrading.)

The 20090804 entries deal with KDE4 (indirectly). Some people have experience 
problems having KDE3 (in particular qt33) around, but these are build 
problems. If one makes packages on a clean machine, then you shouldn't be 
affected and a fix to address that has already been committed.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: net-mgmt/flowd - broken ?

2009-08-07 Thread Mel Flynn
On Thursday 06 August 2009 06:54:52 Kalle Møller wrote:
 Damn have no clue how to build fix or anything with plist ... Except it
 seemd to be a list of the files used ??

Try attached patch. Checking WITH_PYTHON now. Also fixed pkg-install while I 
was in there to respect a FLOWD_UID variable, so that one can assign a uid 
rather then using the next available.
-- 
Mel
Index: net-mgmt/flowd/Makefile
===
RCS file: /home/ncvs/ports/net-mgmt/flowd/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- net-mgmt/flowd/Makefile 13 Jul 2009 16:22:56 -  1.14
+++ net-mgmt/flowd/Makefile 7 Aug 2009 20:44:36 -
@@ -22,13 +22,14 @@
 MAN5=  flowd.conf.5
 PORTDOCS=  README INSTALL
 FLOWD_USER?=   _flowd
+.if defined(FLOWD_UID)
+SCRIPTS_ENV+=  FLOWD_UID=${FLOWD_UID}
+.endif
 
 .if defined(WITH_PERL)
 USE_PERL5= yes
 PLIST_SUB+=WITH_PERL=
-#MAN3PREFIX=   ${PREFIX}/lib/perl5/${PERL_VERSION}
-#MAN3= Flowd.3
-BROKEN=Incomplete pkg-plist
+MAN3=  Flowd.3
 .else
 PLIST_SUB+=WITH_PERL=@comment 
 .endif
@@ -67,9 +68,10 @@
 
 .if defined(WITH_PERL)
cd ${WRKSRC}/Flowd-perl  \
-   ${PERL} Makefile.PL   \
+   ${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3  \
${GMAKE}  \
-   ${GMAKE} install
+   ${GMAKE} install;
+   -${RM} -f ${SITE_PERL}/${PERL_ARCH}/perllocal.pod
 .endif
 
 .if defined(WITH_PYTHON)
Index: net-mgmt/flowd/pkg-install
===
RCS file: /home/ncvs/ports/net-mgmt/flowd/pkg-install,v
retrieving revision 1.2
diff -u -r1.2 pkg-install
--- net-mgmt/flowd/pkg-install  4 Jun 2005 00:43:20 -   1.2
+++ net-mgmt/flowd/pkg-install  7 Aug 2009 20:16:59 -
@@ -20,9 +20,15 @@
shell=/nonexistent
fi
uhome=/var/empty
+   if [ -z ${FLOWD_UID} ]; then
+   uid=`${PW} usernext`;
+   uid=${uid%%:*}
+   else
+   uid=${FLOWD_UID}
+   fi
 
if ! ${PW} show user ${USER} -q /dev/null; then
-   if ! ${PW} add user ${USER} -g ${GROUP} -d ${uhome} \
+   if ! ${PW} add user ${USER} -u ${uid} -g ${GROUP} -d ${uhome} 
\
-c flowd privilege separation user -s 
${shell} -p * \
; then
e=$?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Mouse still crashes with Synaptics

2009-08-07 Thread Mel Flynn
On Friday 07 August 2009 03:21:30 Bertram Scharpf wrote:
 Hi,

 Am Donnerstag, 06. Aug 2009, 15:37:34 -0800 schrieb Mel Flynn:
  On Thursday 06 August 2009 12:46:21 Bertram Scharpf wrote:
 
  You might get some help on freebsd-x11 list.

 As I mentioned twice I manage to reproduce the problem just
 calling dd. It is definitely not an X11 issue.

 I really made great effort on pointing this out. This is very
 disappointing.

I have reasons to mention the freebsd-x11 list. One being that the synaptics 
X11 driver is the primary - if not sole - consumer of any support in psm for 
it. But feel free to find a list that suits you more. I doubt anyone here is 
willing to disappoint you more.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: eclipse install (SOLVED broken ports tree)

2009-08-06 Thread Mel Flynn
On Thursday 06 August 2009 00:07:33 Coert Waagmeester wrote:

 I have PKGDIR variable exported.

Ack, yeah. Should've thought of that. It's a badly chosen variable name for 
pkg_add. You could make an alias though:
alias pkg_keep='env PKGDIR=/path/to/whatever pkg_add -K'
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mouse still crashes with Synaptics

2009-08-06 Thread Mel Flynn
On Thursday 06 August 2009 12:46:21 Bertram Scharpf wrote:
 Hi,

 Am Dienstag, 04. Aug 2009, 13:26:24 +0200 schrieb Bertram Scharpf:
  an Acer notebook with a Synaptics Touchpad makes some trouble
  here.

 This is a real mess. Nobody gives me any help and I do not know
 what to try any further.

I sometimes run stuff under nobody, but never mail with it.

FWIW, you don't need synaptics support or driver for vertical scrolling
on a touchpad, only for the horizontal scrolling and some extra features.
The psm driver nor moused has been taught about horizontal scrolling
last time I checked.

Kernel debugging is outlined in the developers handbook and a minute
investigated in searching the archives, the FreeBSD website or even
google, would have shown you that.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html

You might get some help on freebsd-x11 list.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: KDE3 -- KDE4

2009-08-06 Thread Mel Flynn
On Thursday 06 August 2009 15:21:14 Paul Schmehl wrote:
 Can someone who has already done this upgrade suggest the best way to go
 about it?  Do I need to completely uninstall kde3 first?  Is there an
 upgrade path that's not fraught with gotchas?

Wait a week I'd say. KDE 4.3.0 has hit the ports tree rather fast to be in 
time for the ports freeze and a lot of stuff is being ironed out. In fact, 
probably the best time is after the ports freeze is over. But I expect the big 
gotchas to be gone in a few days.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Wierd X crash

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 04:37:38 Coert Waagmeester wrote:

 I am fairly new to FreeBSD. I use linux a lot.

 Am running FreeBSD 7.2 i386 with the nvidia 173 driver with an AGP
 GeForce FX 5200.


 My X works, with xinerama and two screens, perfectly,
 but as soon as I hold down any key (like Backspace to remove a line of
 text) X crashes.

Any key? Even one that does not create scrolling on the screen? like backspace 
in an empty file?
Unless someone else has seen this, sounds really hard to debug without a 
coredump :/
The only long shot I got to offer is that nvidia provides TwinView which does 
the same as Xinerama and you might want to try that out instead. There's 
detailed information about it in one of the Nvidia README's.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: kernel designations terminology confusion -- amd64 used for into quad core

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 05:27:55 Erik Trulsson wrote:

 The amd64 architecture is called that because it was AMD who invented and
 created it and was for a while the only one using it and since AMD named
 the architecture AMD64 that was the name FreeBSD used too.  Later Intel
 also started using it (while using their own name(s) for it), but FreeBSD
 has stuck with the name amd64.

This isn't completely correct. There is actually an ia64 architecture, before 
Intel was ready to give up the who dictates the PC 64bit architecture 
battle. There's a handful of CPU's who use that instruction set, but later 
Intel switched to supporting AMD's instruction set and thus the PC 64 bit 
architecture now is amd64.

It'll be fun to see people asking in a few years why Oracle processors are 
called sparc64...
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to find real CPU temperature?

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 04:04:18 Erik Norgaard wrote:
 Unga wrote:
  Here is what it show on my computer:
 
  sysctl -a | grep hw.acpi.thermal
  hw.acpi.thermal.min_runtime: 0
  hw.acpi.thermal.polling_rate: 10
  hw.acpi.thermal.user_override: 0
  hw.acpi.thermal.tz0.temperature: 19.0C
  hw.acpi.thermal.tz0.active: -1
  hw.acpi.thermal.tz0.passive_cooling: 1
  hw.acpi.thermal.tz0.thermal_flags: 0
  hw.acpi.thermal.tz0._PSV: 90.0C
  hw.acpi.thermal.tz0._HOT: -1
  hw.acpi.thermal.tz0._CRT: 90.0C
  hw.acpi.thermal.tz0._ACx: 90.0C -1 -1 -1 -1 -1 -1 -1 -1 -1
  hw.acpi.thermal.tz0._TC1: 4
  hw.acpi.thermal.tz0._TC2: 3
  hw.acpi.thermal.tz0._TSP: 60
 
  so which is the CPU temperature, 19.0C or 90.0C? Where does it documented
  what hw.acpi.thermal.tz0.temperature means?

  From that it appears the kernel can't read the temperature sensor, this
 may be a problem with the ACPI not being properly supported for your
 processor.

 The 90.0C entries are different entries that take action against
 overheating, if the temperature reaches 90 putting your system to sleep
 or throtling down speed.

_PSV = throttle down CPU speed
_CRT = critical shutdown temperature

Given that these are the same value, this indeed looks like ACPI problems. 
These values should be different, and can be quite a few degrees apart, so 
that the passive cooling actually has some time to do it's work.

The acpi_thermal(4) man page details all the values. One can also use sysctl -
d hw.acpi.thermal.tz0.passive_cooling to get a short description.

If you want these values to make more sense, you should take the issue up with 
the acpi mailing list and be ready to do some debugging. At minimum you should 
provide the info outlined here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/acpi-debug.html
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: find question

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 07:00:40 Glen Barber wrote:
 On Wed, Aug 5, 2009 at 3:36 AM, Matthew

 Seamanm.sea...@infracaninophile.co.uk wrote:
  Try this as:
 
 for line in $( cat $FILELIST ) ; do
 echo $line
 find $line -type f  $TMPFILE
 done
 
  *assuming that none of the directory names in $FILELIST contain spaces*

for line in $( cat $FILELIST | sed -e 's/\ //g') ; do
echo $line
find $line -type f  $TMPFILE
done

 This *should* fix any directories containing spaces.

And also make find look in non-existing directories.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Opera in your repos

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 07:02:18 Ilya Shpan'kov wrote:

 I work in Opera Software - yes, we make a proprietary browser ;)
 Last 7 years I use GNU/Linux and know that, for example, in Russia the
 Opera browser is very popular in BSD Community. Well, there is a
 question: whether Opera is included to your distro and if not - how we can
 fix this problem? We are ready for any discussions, technical help or
 agreement, if necessary.

Well, we can start to agree that FreeBSD is not a distro, but a UNIX 
operating system. :)
Opera is available in the ports system as 3rd party software made to work on 
FreeBSD. There are 3 opera ports, which you can view here:
http://www.freshports.org/www/opera
http://www.freshports.org/www/opera-devel
http://www.freshports.org/www/linux-opera (through linux emulation)

There are no issues I'm aware of, that's specific to the FreeBSD/Opera 
combination (no flash support is an issue with Adobe, not Opera and I got one 
bugreport in the queue, that I'm also not sure is FreeBSD specific, more 
built-in torrent application specific).
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: find question

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 07:33:42 Glen Barber wrote:
 On Wed, Aug 5, 2009 at 11:12 AM, Mel

 Flynnmel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Wednesday 05 August 2009 07:00:40 Glen Barber wrote:
  On Wed, Aug 5, 2009 at 3:36 AM, Matthew
 
  Seamanm.sea...@infracaninophile.co.uk wrote:
   Try this as:
  
  for line in $( cat $FILELIST ) ; do
  echo $line
  find $line -type f  $TMPFILE
  done
  
   *assuming that none of the directory names in $FILELIST contain
   spaces*
 
 for line in $( cat $FILELIST | sed -e 's/\ //g') ; do
 echo $line
 find $line -type f  $TMPFILE
 done
 
  This *should* fix any directories containing spaces.
 
  And also make find look in non-existing directories.

 True, but any script that needs to find directories containing spaces
 is going to be hack-ish.

 for line in $( cat $FILELIST | sed -e 's/\ /SPACE/g') ; do
echo $line | sed -e 's/SPACE/\ /g'
find $line -type f  $TMPFILE
 done

Not really, simply quote your arguments so that IFS is not in the picture. The 
OP had the right the idea by using a pipe+while read.

% echo My Documents|while read LINE; do find ${LINE} -type f; done
My Documents/foo

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Looking for fast graphical web browser

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 09:57:30 Randall Wood wrote:
 On Mon, Aug 03, 2009 at 11:53:22AM +0200, Wolfgang Riegler wrote:
  Has anyone tested Arora?

 I'm actually surprised no one has recommended Konqueror.  It's not my
 favorite browser (I happen to love Opera) but it would seem to mostly fit
 the bill of fast, graphical.  One trick it does that I appreciate is
 assigning a letter to every link.  When you hold down the control key, the
 letters appear and you can navigate just by pressing control and a letter
 key.  Konqueror certainly has its detractors though, so I guess it's a
 matter of taste.

Well, the script support and rendering bugs are a bit too noticeable for my 
taste. Though last time I tried was KDE 4.1.x. I suppose I could give it 
another shot with 4.3 in the tree.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Wierd X crash

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 10:17:19 Coert Waagmeester wrote:
 On Wed, 2009-08-05 at 06:36 -0800, Mel Flynn wrote:
  On Wednesday 05 August 2009 04:37:38 Coert Waagmeester wrote:
   I am fairly new to FreeBSD. I use linux a lot.
  
   Am running FreeBSD 7.2 i386 with the nvidia 173 driver with an AGP
   GeForce FX 5200.
  
  
   My X works, with xinerama and two screens, perfectly,
   but as soon as I hold down any key (like Backspace to remove a line of
   text) X crashes.
 
  Any key? Even one that does not create scrolling on the screen? like
  backspace in an empty file?
  Unless someone else has seen this, sounds really hard to debug without a
  coredump :/
  The only long shot I got to offer is that nvidia provides TwinView which
  does the same as Xinerama and you might want to try that out instead.
  There's detailed information about it in one of the Nvidia README's.

 Twinview did indeed completely solve the problem!

 What are the (dis)advantages of TwinView and Xinerama?

TwinView is preferred on nvidia cards. I don't know the exact history, but I 
think XFree and nvidia were working on multi-monitor/vidcard support around 
the same time and nvidia came up with TwinView, while XFree provided Xinerama.

Apparently, nvidia didn't like the Xinerama API and stuck with it's own, while 
incorporating some compatibility functions to make things work better, but I 
always found TwinView to work as advertized and Xinerama being buggy. Of 
course, my experience is no measurement for past and future results ;)
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: net-mgmt/flowd - broken ?

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 10:35:02 Kalle Møller wrote:

 make WITH_PERL=YES

 But it returns that it is broken ?

 flowd-0.9.1_1 is marked as broken: Incomplete pkg-plist.

 Without perl it installs fine. The problem is that I need the perl part to
 get some of the other tools to work :S

 Anything I can do to get this not broken ...

You could fix the plist and ping the maintainer (added to CC).
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sshd and dhcp bind to specific address

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 13:11:08 Stefan Miklosovic wrote:

 my pc gets ip address from dhcp server,
 but on my pc, there is running
 sshd.

 I want to make ssh to listen to only one
 ip address, but if ip changes due to dhcp,
 ssh server do not work properly.

 I know, that dhcp is able to assign ip address
 to client from some range e.g. 192.168.0.1-254
 It is possible to do the same with ssh in case
 that it is not possible to do it only with one ip?

 I want a solution which would work every time,
 not only some specific one.

Create a script called /etc/dhclient-exit-hooks. Check the dhclient-script 
manpage for some info on the available variables. From there you can work out 
if $new_ip_address is different from $old_ip_address, rewrite /etc/sshd_config 
with the new ip address and restart sshd.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: eclipse install

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 13:53:22 Coert Waagmeester wrote:

 I tried it via the ports, but this error keeps popping up:
 Missing pkg-descr for patch-2.5.9.

I believe you have a defective ports tree. You should have the following file:
SHA256 (/usr/ports/devel/patch/pkg-descr) = 
629097523839c5e305a4115c1b3629029b734166e5ff8f73923812e0149e9912

If you do not, then try updating your ports tree and look for errors/warnings 
with whatever method you're using.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problems with FreeBSD installation

2009-08-05 Thread Mel Flynn
On Wednesday 05 August 2009 13:01:30 Miguel wrote:
 Hi,

 I've been trying to install FreeBSD in my laptop, but without success.  I
 started with 7.2, but during installation i got the error:

   No disk found!  Please verify that your disk controller...

 Looking at the logs, everything seems fine to me (although its my first
 time on the FreeBSD world).  I get lines such as:

 atapci0: ATI IXP600 SATA300 controller [...]
 atapci0: [ITHREAD]
 atapci0: AHCI Version 01.10 controller with 4 ports detected
 ata2: ATA channel 0 on atapci0
 ata2: [ITHREAD]
 ata3: ATA channel 1 on atapci0
 ata3: [ITHREAD]
 ata4: ATA channel 2 on atapci0
 ata4: [ITHREAD]
 ata5: ATA channel 3 on atapci0
 ata5: [ITHREAD]
 [...]
 atapci1: ATI IPX600 UDMA 133 controller [...]
 ata0: ATA channel 0 on atapci1
 ata0: [ITHREAD]
 [...]

 (Note that i wrote these logs manually -- got some photos that I can upload
 to some URL if needed.)

 So, could not find any issues in the logs, apart from some ACPI errors:

 acpi0_check: nexus0 attached
 acpi0_check: acpi0 not-present
 acpi0_check: acpi0 not-present
 acpi0_check: acpi0 not-present
 acpi0_check: acpi0 not-present
 ...

 in fact, I have some other ACPI-related errors at the beginning of the
 logs, but these are common also on Linux -- I believe these are due to a
 buggy BIOS, which unfortunately I am not able to upgrade since I have not
 windows installed (I have a Toshiba Satellite A210).

 Anyway, I decided to try a more recent version of FreeBSD and downloaded

   8.0-CURRENT-200906-amd64-disc1.iso

 which was the most recent snapshot for my Turion64 processor.

 Tried to boot it but this time the installation just freeze before the
 install application event starts.  Last log lines are:

 acpi0: Could not initialise SystemIO handler: AE_NOT_EXIST
 device_attach: acpi0 attach returned 6
 Timecounters tick every 1.000 msec
 md0: Preload image /boot/mfsroot 4194304 bytes at 0x80fd8660
 SMP: AP CPU #1 Launched!
 WARNING: WITNESS option enabled, expect reduced performance.
 Trying to mount root from ufs:/dev/md0
 warning: no time-of-day clock registered, system time will not be set
 accurately

 And at this point... nothing else -- system freezes.

 Please let me know if anyone has any suggestions for me to have a FreeBSD
 installation on my laptop.  I am, of course, available to provide any
 additional information you might need to debug the issue.

Your best bet is to poll the mobile list (CC'd) to see if anyone was able to 
get FreeBSD working on this laptop (or even to know whether this is a lost 
cause till somebody makes some patches for this laptop). Since 7.2 also does 
not work and with 8.0-RELEASE being in it's final stages, it's unlikely you 
can get some priority from the developers for it being a regression bug. The 
acpi and missing disk can be related (most likely are), but unless you get at 
least a live FS working (even the USB image for 8.0-BETA2) it will be hard to 
get an acpidump(8). So this really depends on someone knowledgeable having 
this laptop or BIOS tricks that get you to a stage where more info can be 
gathered and saved/snapshot.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Secure password generation...blasphemy!

2009-08-04 Thread Mel Flynn
On Monday 03 August 2009 18:28:52 Modulok wrote:

 I wrote a python script which uses /dev/random, and hashes the output
 with sha256. I then truncate the output to the desired length.
 Blasphemy! According to the superstitious password crowd my passwords
 are not very secure ... maybe.

They aren't, because you reduce the random to a much less random, *because* 
you are hashing.
You're much better off, using ctype to determine if the byte you got is 
typeable on a keyboard and if not getting the next byte. Or use an array of 
allowed characters and read the rands as integers modulus the size of the 
array.

But as others have stated, you're reinventing the wheel, and even FreeBSD's 
adduser(8) can generate random passwords that are suitable for most uses. You 
should really answer Kurt's questions to determine how secure they should be.

As far as Pseudo generators go, they will generate the same sequence for the 
same seed, so if the seed is guessable by an attacker, you should not use 
them.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ftps ?(off-topic)

2009-08-04 Thread Mel Flynn
On Tuesday 04 August 2009 00:14:39 Mark Stapper wrote:

 It would be nice to hear more she-calling on these lists though...
 So maybe mailing list etiquette should state anyone posting to a mailing
 list should be referred to as she like we do with boats and
 institutions like the court... (well in dutch we do...)
 However, Frederique should imply the person who started this thread is
 female.

OK, that grew out of proportion real quick. The number of knowledgeable 
actively posting females on this list is very low, which is why I think we 
should cherish them, like an endangered species (or ladies if you will). No 
need to go overboard :)
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cvs tag usage

2009-08-04 Thread Mel Flynn
On Tuesday 04 August 2009 12:52:54 Erik Trulsson wrote:
 On Tue, Aug 04, 2009 at 03:07:20PM -0400, Glen Barber wrote:
  On Tue, Aug 4, 2009 at 1:43 PM, David Southwellda...@vizion2000.net 
wrote:
   I am confused about the usage of the tag for src.
  
   I took a look at the web pages and found the following choices:
  
   _7_BP
   _7_2_BP
 
  BP ?

 BP = Branch Point.  It is a tag which marks the place where the
 corresponding branch was created.

And for developers or interesting parties, one can create cvs diff using
-rRELENG_7_2_BP -rRELENG_7_2_RELEASE to see how many fixes hit the tree during 
the final release stage.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: find question

2009-08-04 Thread Mel Flynn
On Tuesday 04 August 2009 17:06:56 Jay Hall wrote:
 I am sure this is something I am doing that is obviously wrong, but I
 cannot figure it out.

 I am reading a list of directories from a file, and then listing all
 of the files in the directory to a file.

 Here is the code.

 #!/usr/local/bin/bash
  cat ${FILELIST} | while read LINE
  do
[ -z ${LINE} ]  continue
  echo ${LINE}
  `find ${LINE} -type f  ${TMPFILE}`
  done

 Here is the output.
 /usr/home/windowsaccess

  empty line

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Moused crashes with Synaptics

2009-08-04 Thread Mel Flynn
On Tuesday 04 August 2009 03:26:24 Bertram Scharpf wrote:

 Further I seem to have missed something else. I found the page
 http://wiki.freebsd.org/SynapticsTouchpad where are mentioned some
 sysctls:

   hw.psm.synaptics_support=1
   hw.psm.synaptics.vscroll_hor_area=1300

 I don't have those ctls here and I cannot find the kernel driver
 that provides them.

That's because they're loader tunables. You set them in /boot/loader.conf. The 
LOADER TUNABLES section of psm(4) details it.

Note that I had not a very good experience with the synaptics driver about a 
year ago and haven't tried since. YMMV.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ftps ?

2009-08-03 Thread Mel Flynn
On Monday 03 August 2009 04:26:32 Neal Hogan wrote:
 2009/8/3 Odhiambo  $B%o%7%s%H%s(B odhia...@gmail.com:
  On Mon, Aug 3, 2009 at 2:48 PM, Frederique Rijsdijk 
 
  frederi...@isafeelin.org wrote:
  Odhiambo $B%o%7%s%H%s(B wrote:
   What is ftps?
 
  # grep ftps /etc/services
  ftps-data   989/tcp# ftp protocol, data, over TLS/SSL
  ftps-data   989/udp
  ftps990/tcp# ftp protocol, control, over TLS/SSL
  ftps990/udp
 
  pure-ftpd supports TLS/SSL.
 
  I am wondering if it can do this.

 I was curious about the OP's use of 'ftps too. Perhaps, he could
 explain what plain-old-ftp doesn't do and what he wants it to do.

When in doubt, use she. :)
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ftps ?

2009-08-03 Thread Mel Flynn
On Monday 03 August 2009 03:28:15 Frederique Rijsdijk wrote:
 I'm looking into running ftps for my webhosting server. But the ftpd of
 BSD seems incapable of doing so.

 Are there plans to implement this, or am I overlooking something?

 I'm aware of the fact that I can run a ftp server from ports to do this,
 but I would like to keep it as simple as possible.

O'Reilly's Network security with OpenSSL claims stunnel is capable of doing 
this. I guess it's similar to installing a port for the ftpd, except that you 
can just keep your old ftpd config, which is likely to be more elaborate then 
stunnel's.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: freebsd-update userland sources

2009-08-03 Thread Mel Flynn
On Sunday 02 August 2009 16:10:37 Tom Mende wrote:
 Is there a way to get freebsd-update to keep userland sources up to
 date?

Since it is for binary upgrades, it doesn't make much sense, but ...

 By way of background, I am trying not to use csup / cvsup and like
 processes as their past, admittedly incorrect, usage by me, combined
 with my incompetent salvage operations, has hosed my systems to the
 point of needing to be reinstalled from scratch. I have been using a
 combination of portsnap and freebsd-update to keep my 7.2-RELEASE
 system up to date and commenced this at about 6.3-RELEASE and have
 managed to not hose the system since that time. It now however appears
 I need to have userland sources to keep fusefs-kmod up to date.

 /usr/ports/sysutils/fusefs-kmodmake install clean
 ===  fusefs-kmod-0.3.9.p1.20080208_6 requires the userland sources to
 be installed. Set SRC_BASE if it is not in /usr/src.
 *** Error code 1

This is one case where one requires sources. You would still need csup/cvsup 
and if you're tracking a -RELEASE branch, it does not do very much. Also, 
because you're not actually going to build world/kernel, the risk of hosing 
your system is limited.

What freebsd-update could however do, is maintain a 'standard-supfile' that 
would have the correct tag at all times. For example:

Would you like to install a supfile for this release in /etc? [y/n] y
   Please choose a mirror [cvsup$random.FreeBSD.org]:
freebsd-update installs standard-supfile from examples as /etc with 
configured mirror and correct release tag

freebsd-update shows how to invoke csup and a crontab example or periodic 
grows a csup script like attached
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: gmirror on different disks

2009-08-03 Thread Mel Flynn
On Friday 31 July 2009 02:24:31 Grzegorz Danecki wrote:
 Hello everybody!

 I'm just wondering, I had gmirror with two disks:

 Master:  ad0 ST3160815AS/4.AAB Serial ATA II
 Master:  ad2 ST3160815AS/4.AAB Serial ATA II

 unfortunately ad0 failed today, leaving me with degraded array and ad0
 offline.

 I did

 # gmirror forget gm0, then shutdown, ad0 was replaced with:

 ad0: 152626MB Seagate ST3160815AS 3.AAD at ata0-master SATA300

 with different firmware I think.

 Then gmirror insert gm0 /dev/ad0

 (...)
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: rebuilding provider
 ad0 finished.
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: provider ad0
 activated.

 But the disk is a little bit smaller:

 1. Name: mirror/gm0
Mediasize: 160040803328 (149G)
^^
Sectorsize: 512
Mode: r5w5e6
 Consumers:
 1. Name: ad2
Mediasize: 160041885696 (149G)
^^
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 1
SyncID: 1
ID: 3791030614
 2. Name: ad0
Mediasize: 160040803840 (149G)
^^

Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 1
SyncID: 1
ID: 2477089776

 # gmirror status
   NameStatus  Components
 mirror/gm0  COMPLETE  ad2
   ad0

 I mean - should I make the RAID once again with exactly the same drives, or
 can I leave it as it is right now?

The mirror rescaled to the size of the smallest provider and didn't report any 
problems during sync, so you should be fine.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Windows 2008 + AD + PF + bridge = problems?

2009-08-03 Thread Mel Flynn
On Friday 31 July 2009 10:15:56 markham roan wrote:

 A packet capture revealed a number of anomalies.  Once the server starts
 trying to join the domain, we get all sorts of TCP transmission errors,
 retries, duplicate ACKs etc.  In some cases, the public side of the
 firewall will send an ICMP host-unreachable message for a host which is
 clearly being BINAT.

 I've tinkered with net.inet.ip.intr_queue_maxlen, but it doesn't seem to
 help.  net.inet.ip.intr_queue_drops isn't increasing at a noticeable rate,
 anyway.

 Does anyone have any thoughts and/or advice on where I can go from here?

No experience with the case at hand, but I do see that Vista started to use 
IGMP protocol even when there's no obvious need to do so. Given that allow 
all does in fact only allow a handful of IP protocols, excluding IGMP, you 
may want to investigate if you're not silently blocking (or not translating) 
one of the more obscure IP protocols.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 7.2 RELEASE ? Buggy as hell

2009-07-30 Thread Mel Flynn
On Thursday 30 July 2009 12:50:11 Andrew Gould wrote:
 On Thu, Jul 30, 2009 at 3:06 PM, Adam Vande Moreamvandem...@gmail.com 
wrote:
  On Thu, Jul 30, 2009 at 2:32 PM, PJ af.gour...@videotron.ca wrote:
  I have (supposedly, as I am told by my bootup) upgraded to 7.2
  Wonderful. But how do i make this thing work. I've managed to do it on
  an amd64 on an ACER Travelmate 4400 running at 1600mhz.
  This box runs on 3ghz; Xorg comes up and the mouse is dead. Flashplayer9
  with linux-emulator f8 and all the tweaks does not work, acroread9 does
  not either,
  hal is useless. I've tried turning off the option AllowEmptyInput to
  off; i've tried starting hal - and when I run startx, the configuration
  file is the default built-in... I don't understand what the hell is
  going on... None of the solutions on google seem to work either...
  oh, but there is some sunlight in neverneverland... I can boot and I can
  install all kinds of files - funny, I don't want to play with this
  crap... and I certainly am not going to reinstall after all I have gone
  through... If I do reinstall, it will be another OS.
  If it all works on amd64, what's wrong with i386?
  I think it's time to switch to something more reliable.
 
  There's nothing wrong i386, at least in the regard you're suggesting.
   Try
 
  searching deeper within yourself for the issue.
 
  --
  Adam Vande More

 I don't think that answer was helpful.

It's the right answer though.

 PJ is not alone in frustration regarding 7.2.  For many users, it's
 hard to tell whether the balance of difficulties lies in bugs or new
 manual configuration requirements of 7.2.

 I think much of the frustration lies in our perception of STABLE.
 When we upgraded from 7.1 (or 7.0), we expected a fairly smooth ride.
 I had frustrations related to X (hal), mounting drives (hal), printing
 (cups vs applications), and printing (gimp vs hpijs).  Yes, I read the
 (uncentralized) documentation.

I think release CD's should not contain packages anymore, cause everything you 
describe here, has absolutely nothing to do with FreeBSD 7.2, but with 3rd 
party software that happened to be packaged at release time.
You should really be using PCBSD if you want a packaged desktop system, for 
which the developers claim responsibility and for which much (if not all) of 
the configuration has been done for you.
When using FreeBSD you are expected to understand the handbook, configure 
things on your own and be able to troubleshoot problems and/or provide the 
right information in case you need help. If you can't do this, then FreeBSD is 
not the right tool for you. No harm in that, nobody forces you to use FreeBSD 
nor will convict you for using an OS that suits you better.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 7.2 RELEASE ? Buggy as hell

2009-07-30 Thread Mel Flynn
On Thursday 30 July 2009 14:50:07 Freminlins wrote:
 2009/7/30 Mel Flynn
 mel.flynn+fbsd.questi...@mailing.thruhere.netmel.flynn%2bfbsd.questi...@m
ailing.thruhere.net

  You should really be using PCBSD if you want a packaged desktop system,
  for which the developers claim responsibility and for which much (if not
  all) of
  the configuration has been done for you.

 I disagree with that. It even says on the FreeBSD web site FreeBSD® is an
 advanced operating system for modern server, desktop

The key is that the Xorg software is *not* part of FreeBSD. It may work, it 
may not. A FreeBSD release is shipped with the intention that all software in 
base and kernel are working by default and if it's not, the FreeBSD 
developers claim responsibility for fixing it. The line is gray where it comes 
to X11, yet it's still a line.

 I have used FreeBSD on the desktop for about 6 years (but not yet running
 7.2). It has mostly been a pleasure. I didn't like it when X was changed to
 individual packages, as it now takes considerably longer to install. And
 the output from pkg_info takes correspondingly longer to search through. It
 also installs two scripting languages (Perl and Python). I haven't had a
 problem configuring X for years.

I never claimed that FreeBSD can't be used on a desktop, I've been doing that 
since 4.7-RELEASE. Whether you and me can do it, is not up for dispute. What 
is, is that bugs are attributed to 7.2-RELEASE, which are all bugs in 3rd 
party software and should be reported to ports@, with proper information if 
people care about those problems getting fixed. Even then it may be out of the 
hands of those volunteers, if it relies on propriety software of which the 
developers have expressed no interest to support FreeBSD (like flash).

 If something has changed which then causes problems to end users, then that
 is not good. And it's no good telling people use PCBSD or something else.
 That's not what we want. We want to use FreeBSD on the desktop.

And we are. It's not for everybody and PCBSD is a FreeBSD desktop system 
specifically created for people that don't want to do all the configuring and 
troubleshooting that may come with installing a desktop system. PCBSD is 
FreeBSD (the latest major version -STABLE), with extra effort to make things 
easier and people claiming responsibility for a working graphical desktop.

 Don't try and put people off using FreeBSD. It would be much better to help
 them resolves the problems they are having.

As said above, PCBSD is FreeBSD. And for many, it is the best help one can 
give. One must first learn to walk, if one wants to run.

Also, if you _really_ want things to change for *BSD, then you should acquire 
a group of people that are willing and able to fork Xorg, get rid of it's hal 
and python dependency, repackage sensibly and do some proper release 
engineering. Especially the latter is what is causing the problems of late. 
Either that, or convince the Xorg people to do that.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 7.2 RELEASE ? Buggy as hell

2009-07-30 Thread Mel Flynn
On Thursday 30 July 2009 18:24:54 Andrew Gould wrote:
 On Thu, Jul 30, 2009 at 4:08 PM, Mel

 Flynnmel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Thursday 30 July 2009 12:50:11 Andrew Gould wrote:
  On Thu, Jul 30, 2009 at 3:06 PM, Adam Vande Moreamvandem...@gmail.com
 
  wrote:
   On Thu, Jul 30, 2009 at 2:32 PM, PJ af.gour...@videotron.ca wrote:
   I have (supposedly, as I am told by my bootup) upgraded to 7.2
   Wonderful. But how do i make this thing work. I've managed to do it
   on an amd64 on an ACER Travelmate 4400 running at 1600mhz.
   This box runs on 3ghz; Xorg comes up and the mouse is dead.
   Flashplayer9 with linux-emulator f8 and all the tweaks does not work,
   acroread9 does not either,
   hal is useless. I've tried turning off the option AllowEmptyInput to
   off; i've tried starting hal - and when I run startx, the
   configuration file is the default built-in... I don't understand what
   the hell is going on... None of the solutions on google seem to work
   either... oh, but there is some sunlight in neverneverland... I can
   boot and I can install all kinds of files - funny, I don't want to
   play with this crap... and I certainly am not going to reinstall
   after all I have gone through... If I do reinstall, it will be
   another OS.
   If it all works on amd64, what's wrong with i386?
   I think it's time to switch to something more reliable.
  
   There's nothing wrong i386, at least in the regard you're suggesting.
Try
  
   searching deeper within yourself for the issue.
  
   --
   Adam Vande More
 
  I don't think that answer was helpful.
 
  It's the right answer though.
 
  PJ is not alone in frustration regarding 7.2.  For many users, it's
  hard to tell whether the balance of difficulties lies in bugs or new
  manual configuration requirements of 7.2.
 
  I think much of the frustration lies in our perception of STABLE.
  When we upgraded from 7.1 (or 7.0), we expected a fairly smooth ride.
  I had frustrations related to X (hal), mounting drives (hal), printing
  (cups vs applications), and printing (gimp vs hpijs).  Yes, I read the
  (uncentralized) documentation.
 
  I think release CD's should not contain packages anymore, cause
  everything you describe here, has absolutely nothing to do with FreeBSD
  7.2, but with 3rd party software that happened to be packaged at release
  time.
  You should really be using PCBSD if you want a packaged desktop system,
  for which the developers claim responsibility and for which much (if not
  all) of the configuration has been done for you.

The paragraph below is a generalized statement, perhaps I should've used 'one' 
instead of 'you'.

  When using FreeBSD you are expected to understand the handbook, configure
  things on your own and be able to troubleshoot problems and/or provide
  the right information in case you need help. If you can't do this, then
  FreeBSD is not the right tool for you. No harm in that, nobody forces you
  to use FreeBSD nor will convict you for using an OS that suits you
  better.
  --
  Mel

 Your answer is presumptuous.  You've already assumed that my problems
 lie in my inability or lack of willingness to read the documentation
 and perform configuration.  I have been running X on FreeBSD
 successfully since version 4.0 and have been reading documentation and
 configuring my system since 2000.  I'm not just talking about X, I'm
 talking about postfix, postgresql, samba, apache with webdav over ssl,
 etc.

 I am having far more trouble with a STABLE release than I had with
 5.0.

That is very weird, since most of the community regards the 5.x series as the 
worst in FreeBSD's history. They were a transitional release to dismiss the 
GIANT locking in favor of fine grained kernel locks as the main design change. 
I've personally seen significant improvements in both reliability and 
performance since 5.x, with respect to kernel and base. I'm seeing absolutely 
no issues with postfix or postgresql (especially since on 64-bit I can now 
increase kernel memory to satisfy postgresql's SHM requirements), don't have 
critical samba installations so can't comment on that and webdav over ssl I 
don't provide at all. Could you point me to some PR's you've filed? You got me 
curious now.

 It is easy, and technically correct, to separate the core FreeBSD
 system from the ports.  This I grant you.  Beyond the initial
 clarification, however, it is not the least bit useful.  To the world
 of FreeBSD users, even many of the technically advanced users, FreeBSD
 would lose much of its usefulness without the ports.  So, beyond
 saying that it's not your problem, what have you accomplished?

See $subject. As far as I'm concerned, 7.2 is the best release so far. The OP 
makes it sound like FreeBSD is the cause of all his problems, while looking at 
his posts, some can be attributed to himself and the rest to factors beyond 
FreeBSD's control, probably including hardware.

 I'll get off my soap box

Re: Don't know how to make /usr/ports/dns/bind96/work/.build....

2009-07-29 Thread Mel Flynn
On Wednesday 29 July 2009 10:57:05 Doug Barton wrote:
 Dan Mahoney, System Admin wrote:
  I believe Mel is right here. 'make clean ; make config ; make' worked
  for me.
 
  As does a second make after getting this error, but it's nonintuitive,
  and probably a ports bug.

 I'm not sure why 'make clean' is nonintuitive in the context of
 changing OPTIONS. What is your expectation of how it should work?

What he means is that make without arguments or make install as per handbook, 
will build the build target which will invoke the config target if OPTIONS 
changed or no options file is found.

However, this is a corner case, as it applies to:
- Ports that change PREFIX using OPTIONS
- For which no options file is available or the OPTIONS list has changed
- When the PREFIX is actually changed through toggling the appropriate option.

This applies surely to less then 100 (probably more like a dozen) ports on the 
18k that are in the tree and only affects people who do not use ports-mgmt 
software. As such it is not worth fixing, IMHO.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Don't know how to make /usr/ports/dns/bind96/work/.build....

2009-07-28 Thread Mel Flynn
On Tuesday 28 July 2009 20:24:27 Dan Mahoney, System Admin wrote:

 make: don't know how to make
 /usr/ports/dns/bind96/work/.build_done.bind96._usr_local. Stop
 *** Error code 2

 Someone else had the same problem, and they also chose overwrite-base:

 http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2007-08/msg00035.
html

 But it was dismissed because he was using sudo, however the real reason
 is because this problem goes away a second time.

Most likely because that option changes PREFIX, so the BUILD_COOKIE changed, 
but the target was already in make's list of targets to make. After options 
are stored in /var/db/ports, BUILD_COOKIE will end in ._usr.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Syslog date format

2009-07-27 Thread Mel Flynn
On Sunday 26 July 2009 21:20:23 Modulok wrote:

 One would think that ISO 8601 date strings would make more sense, in
 addition not being language dependent. But I guess that's out.

It isn't too hard to convert on the fly. The real problem is that syslog
dates do not contain a year and timezone. The taillog program below sig
therefore may lie about the generated date. Most notably a year is
non-optional in ISO 8601.
Anyway, taillog is basically tail(1), except it shows the following:
% sudo taillog -2 /var/log/cron
2009-07-27 00:11:00-0800 smoochies /usr/sbin/cron[25808]: (operator) CMD 
(/usr/libexec/save-entropy)
2009-07-27 00:15:00-0800 smoochies /usr/sbin/cron[25834]: (root) CMD 
(/usr/libexec/atrun)

-- 
Mel

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering sh file.  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#   taillog/BSDmakefile
#   taillog/taillog.c
#
echo x - taillog/BSDmakefile
sed 's/^X//' taillog/BSDmakefile  'f307a85b0a9ff60c11589de765a71b95'
X# $Coar: utils/taillog/BSDmakefile,v 1.1 2009/07/27 07:58:48 mel Exp $
XPROG=taillog
XNO_MAN=yes
X
X.include bsd.prog.mk
f307a85b0a9ff60c11589de765a71b95
echo x - taillog/taillog.c
sed 's/^X//' taillog/taillog.c  '4c238c819ad69dd9d8586db323e29997'
X/*
X * vim: ts=4 sw=4 fdm=marker tw=78 ai noet
X * Copyright (c) 2009 Mel Flynn
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *notice, this list of conditions and the following disclaimer in the
X *documentation and/or other materials provided with the distribution.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X * Taillog: tail(1) helper that converts syslog date format to ISO-8601.
X */
X#include sys/cdefs.h
X__FBSDID($Coar: utils/taillog/taillog.c,v 1.1 2009/07/27 07:58:48 mel Exp $);
X
X#include sys/types.h
X#include sys/param.h
X#include sys/resource.h
X#include sys/time.h
X#include sys/wait.h
X
X#include stdio.h
X#include unistd.h
X#include string.h
X#include time.h
X
X#include sysexits.h
X#include err.h
X
X#define TAIL /usr/bin/tail
X
Xstatic inline void init_tp(const struct tm *now, struct tm *tp);
X
Xint main(int argc, char **argv)
X{
X   pid_t pid;
X   int fildes[2], res;
X   struct tm *now;
X   time_t clock;
X
X   tzset();
X   clock = time(NULL);
X   now = localtime(clock);
X
X   res = pipe(fildes);
X   if( (pid = fork()) == 0 ) /* Child */
X   {
X   close(fildes[0]);
X   if( dup2(fildes[1], STDOUT_FILENO)  0 )
X   err(EX_OSERR, dup2());
X   argv[0] = strdup(TAIL);
X   if( (res = execv(TAIL, argv))  0 )
X   err(EX_OSERR, Failed to run tail);
X   }
X   else if( pid  0 ) /* Parent */
X   {
X   char buf[BUFSIZ];
X   FILE *in;
X
X   close(fildes[1]);
X   if( (in = fdopen(fildes[0], r)) == NULL )
X   err(EX_OSERR, fdopen());
X
X   while( fgets(buf, BUFSIZ, in) != NULL )
X   {
X   struct tm tp;
X   size_t len = strlen(buf);
X   char *ptr, tbuf[32];
X
X   init_tp(now, tp);
X   ptr = strptime(buf, %b %e %T, tp);
X   if( ptr == NULL )
X   {
X   warnx(Line does not start with syslog date);
X   printf(%s, buf);
X   }
X   else
X   {
X   if( strftime(tbuf, sizeof(tbuf), %Y-%m-%d 
%H:%M:%S%z, tp) == 0 )
X   err(EX_SOFTWARE, Can't convert time);
X   res = printf(%s%s, tbuf, ptr);
X

Re: How to find what symlink points to?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 05:45:13 Unga wrote:

   Hi all
  
   I need to remove some unwanted symlinks on /dev using
 
  a C program.
 
   The struct dirent only shows the symlink name, how
 
  do I find what that
 
   symlink points to for verification purpose?
 
  By using the readlink(2) system call.

 But readlink(2) fails with errno set to 2. Can readlink(2) use with dev
 nodes?

Works for me. errno 2 is ENOENT (No such file or directory). I would inspect 
if your request path points to the right location.

% ./rl /dev/stderr
/dev/stderr = fd/2

% cat rl.c
#include sys/types.h
#include sys/param.h
#include unistd.h
#include stdio.h
#include stdlib.h
#include string.h

#include err.h

int main(int argc, char **argv)
{
char path[MAXPATHLEN], buf[MAXPATHLEN+1];
ssize_t res;

if( argc != 2 )
exit(67);

(void)strlcpy(path, argv[1], sizeof(path));
res = readlink(path, buf, sizeof(buf));
if( res  0 )
err(EXIT_FAILURE, readlink());
buf[MAXPATHLEN] = '\0';
printf(%s = %s\n, path, buf);

return (0);
}

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: limit to number of files seen by ls?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 12:42:32 Chris Cowart wrote:
 John Almberg wrote:
  Which is why I'm starting to think that (a) my problem is different
  or (b) I'm so clueless that there isn't any problem at all, and I'm
  just not understanding something (most likely scenario!)

 It looks to me like the thread began assuming that you must be typing
 `ls *` in order to run into problems.

Yeah, I just noticed that too. So how did you determine there should be ~4000 
files in the directory when ls shows ~2300. Also, does ls give an error 
message?
ls -l /tmp/out should clear that up and you can use wc -l /tmp/out to see how 
many files are returned.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What order are options in rc.conf processed?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 13:43:04 Peter Steele wrote:

 In a recent reboot test, when ourapp started, it checked to see if an
 IP was assigned to the system and there was not, causing it to take an
 unexpected logic path. Our understanding though was that since we had an
 entry in rc.conf defining the IP then our app should have started after
 that IP was assigned. Is this true or is there potentially a timing
 issue here?

It is false. See the manpage for rcorder, specifically the BEFORE and REQUIRE 
keywords. However, there still may be a timing issue, if ourapp requires the 
interface to be up (not just an IP assigned).
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bind 9 (Was: bsdstats) - fatal error: RUNTIME_CHECK(((pthread_mutex_destroy(((manager-lock))) == 0)

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 13:17:51 Anton Shterenlikht wrote:
 On ia64 8.0-beta1 SMP, running bsdstats-5.4_2,
 I get this error:

 # /usr/local/etc/periodic/monthly/300.statistics
 /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/task.c:1023: fatal
 error: RUNTIME_CHECK(((pthread_mutex_destroy(((manager-lock))) == 0) ? 0
 : 34) == 0) failed

That error from bind,

 [:1: unexpected operator

Is not handled gracefully in the bsdstats script.

The annoyance is that ISC Bind finds it not useful to print errno, which is 
what you'd need to figure out why this lock can't be destroyed. It is however 
a programming error in bind, or a rare case of stack corruption by the kernel.

If you see this error a lot or can reliably reproduce it, I'd file a PR.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql50-server root login

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 18:21:04 Tim Judd wrote:
 After running mysql_install_db, the mysql files are owned by
 root:wheel instead of mysql:mysql

 I've noticed that is a missing step in the docs.
 # mysql_install_db
 # chown -R mysql:mysql /var/db/mysql

Or...you can just not do this at all.

 # /usr/local/etc/rc.d/mysql start

Will create the auth tables, if they don't exist, with the correct ownerships:

mysql_prestart()
{
if [ ! -d ${mysql_dbdir}/mysql/. ]; then
mysql_create_auth_tables || return 1
fi

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bind 9 (Was: bsdstats) - fatal error: RUNTIME_CHECK(((pthread_mutex_destroy(((manager-lock))) == 0)

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 18:35:17 Marc G. Fournier wrote:
 --On Monday, July 27, 2009 14:07:44 -0800 Mel Flynn

 mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Monday 27 July 2009 13:17:51 Anton Shterenlikht wrote:
  On ia64 8.0-beta1 SMP, running bsdstats-5.4_2,
  I get this error:
 
  # /usr/local/etc/periodic/monthly/300.statistics
  /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/task.c:1023: fatal
  error: RUNTIME_CHECK(((pthread_mutex_destroy(((manager-lock))) == 0) ?
  0
 
  : 34) == 0) failed
 
  That error from bind,
 
  [:1: unexpected operator
 
  Is not handled gracefully in the bsdstats script.

 Is there something I can do to improve the script to handle it better?

Well, if OP can provide sh -x /usr/local/etc/periodic/monthly/300.statistics 
output, it's easier to see which variable is empty as a result of a resolver 
error. Then fix the test expression and either exit or use a retry_x_times 
mechanism.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to find what symlink points to?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 20:54:51 Unga wrote:

 Thanks everybody for valuable replies. In fact, I also used readlink(2) but
 fed the symlink path directly from dirent, which was partial, readlink(2)
 requires full path.

Nope it doesn't. It's the classical opendir does not chdir problem. 
readlink(2) requires a path that resolves from the current working directory 
of the program. If you opendir(3) /dev and are in /, then dirent-d_name is 
not valid for your cwd. Either you have to chdir or prepend the path given to 
opendir to dirent-d_name.

% ./rl /dev/stdout
stdout = fd/1

See the diff on previous rl.c below.

-- 
Mel

--- rl.c.orig   2009-07-27 09:19:58.0 -0800
+++ rl.c2009-07-27 21:25:48.0 -0800
@@ -9,13 +9,31 @@

 int main(int argc, char **argv)
 {
-   char path[MAXPATHLEN], buf[MAXPATHLEN+1];
+   char path[MAXPATHLEN], buf[MAXPATHLEN+1], *ptr;
ssize_t res;

if( argc != 2 )
exit(67);

(void)strlcpy(path, argv[1], sizeof(path));
+   ptr = strrchr(path, '/');
+   if( ptr != NULL )
+   {
+   char *tmp = ptr + 1;
+
+   if( ptr == path )
+   {
+   if( strlen(path) == 1 )
+   errx(67, / can never be a symlink);
+   chdir(/);
+   }
+   else
+   {
+   *ptr = '\0';
+   (void)chdir(path);
+   }
+   (void)strlcpy(path, tmp, sizeof(path));
+   }
res = readlink(path, buf, sizeof(buf));
if( res  0 )
err(EXIT_FAILURE, readlink());

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 1 linux_base port (Re: 7.2 amd64 Flash)

2009-07-26 Thread Mel Flynn
On Saturday 25 July 2009 23:25:41 per...@pluto.rain.com wrote:
 Boris Samorodov b...@ipt.ru wrote:
  PJ af.gour...@videotron.ca writes:
   I already had f8 installed as well as fc-4
 
  That's wrong. Two linux_base ports should not be installed
  at a system ...

 Might it be advisable for each new linux_base port to declare
 itself incompatible with all earlier ones, to prevent this
 kind of error?  (Cc: ports@)

They are, -f8/Makefile:
CONFLICTS=  linux_base-gentoo* linux_base-fc4 linux_base-fc6 \
linux_base-f7 linux-glib2

Someone installed with DISABLE_CONFLICTS and has a bleeding foot.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: limit to number of files seen by ls?

2009-07-26 Thread Mel Flynn
On Saturday 25 July 2009 23:34:50 Matthew Seaman wrote:

 It's fairly rare to run into this as a practical
 limitation during most day to day use, and there are various tricks like
 using xargs(1) to extend the usable range.  Even so, for really big
 applications that need to process long lists of data, you'ld have to code
 the whole thing to input the list via a file or pipe.

ls itself is not glob(3) aware, but there are programs that are, like scp. So 
the fastest solution in those cases is to single quote the argument and let 
the program expand the glob. for loops are also a common work around:
ls */* == for f in */*; do ls $f; done

Point of it all being, that the cause of the OP's observed behavior is only 
indirectly related to the directory size. He will have the same problem if he 
divides the 4000 files over 4 directories and calls ls */*.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: limit to number of files seen by ls?

2009-07-26 Thread Mel Flynn
On Sunday 26 July 2009 10:24:31 John Almberg wrote:
 On Jul 26, 2009, at 4:45 AM, Mel Flynn wrote:
  On Saturday 25 July 2009 23:34:50 Matthew Seaman wrote:
  It's fairly rare to run into this as a practical
  limitation during most day to day use, and there are various
  tricks like
  using xargs(1) to extend the usable range.  Even so, for really big
  applications that need to process long lists of data, you'ld have
  to code
  the whole thing to input the list via a file or pipe.
 
  ls itself is not glob(3) aware, but there are programs that are,
  like scp. So
  the fastest solution in those cases is to single quote the argument
  and let
  the program expand the glob. for loops are also a common work around:
  ls */* == for f in */*; do ls $f; done
 
  Point of it all being, that the cause of the OP's observed behavior
  is only
  indirectly related to the directory size. He will have the same
  problem if he
  divides the 4000 files over 4 directories and calls ls */*

 H'mmm... I haven't come back on this question, because I want my next
 question to be an intelligent one, but I'm having a hard time
 understanding what is going on. I'm reading up on this, and as soon
 as I know enough to either understand the issue, or ask an
 intelligent question, I will do so...

When a program is executed with arguments, there is a system imposed limit on 
the size of this argument list. On FreeBSD this limit can be seen with sysctl 
kern.argmax, which is the length in bytes.
When you do ls *, what really happens is that the shell expands the asterisk 
to all entries in the current directory, except entries starting with a dot 
(hidden files and directories). As a result, ls is really called as:
ls file1 file2  fileN

If the string length of file1 to fileN is bigger then kern.argmax, then you 
will get argument list too long error.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Restarting daemons after portupgrade/portmanager

2009-07-25 Thread Mel Flynn
On Friday 24 July 2009 14:57:13 Axel wrote:

 So far, so good. But what about the other daemons that still seem to run
 after upgrade (Apache, Courier IMAP etc)? Are the new version running
 fine after the upgrade, or should I set AFTERINSTALL to do a restart of
 these daemons, to make sure they run the upgraded version?

I don't know about Courier, but Apache is generally not affected by on-disk 
versions of libraries. The CGI programs however, are, since they're started up 
and shutdown with each request (or in the case of FCGI in X requests) - the 
Apache workers are spawned from the root process and use that process image.

So there is no definite need to shut down Apache and disrupt service. If a 
running webserver is important to you, I also would not do this automatically. 
For example, jpeg could be upgraded before Apache and a module for Apache 
needing it, yet this module is depending on Apache and therefore not 
recompiled yet. As a result, this module tries to load a non-existing library 
and Apache restart will fail.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: vim port have a lot of broken links ??

2009-07-25 Thread Mel Flynn
On Saturday 25 July 2009 02:29:30 Kalle Møller wrote:
 Spot on.. My server is ipv6 ready.. (We are the hosting department of the
 ISP if we should examine all ticket we get with.. Its the networks fault we
 wouldn't do anything else :D )

 And fetch -4 http://ftp.vim.org/pub/vim/patches/7.2/7.2.002 is working
 fine. So it must be that it tries ipv6 first.

/usr/ports/Mk/bsd.port.mk states:
# FETCH_ARGS- Arguments to ftp/http fetch command.
# Default: -ApRr

Override it in /etc/make.conf:
FETCH_ARGS=-4ApRr

Or one could set it in your shell environment for the duration that IPv6 is 
not working.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: X errors when I open gvim

2009-07-25 Thread Mel Flynn
On Saturday 25 July 2009 13:38:24 Andrew Falanga wrote:

 When I open gVim from the command line, I get the following errors:

 Xlib:  extension Generic Event Extension missing on display :0.0.

 How do I fix this?

What's there to fix? The warnings are harmless, search the archives for more 
info.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: linux emulator

2009-07-24 Thread Mel Flynn
On Friday 24 July 2009 06:58:05 PJ wrote:
 Let's try 3 questions, all related.
 1. Which linux emulator is one supposed to use or is this something that
 should not be installed and left to be handled as a dependency by ports?

fc4 is the default. But Skype for example, really wants fc6 or higher. I would 
use fc6 on new installs.

 2. I am trying to install ogle on FreeBSD 7.2 running on amd64. I have
 installed linux-base-fc4. Installation stops on linux-atk
 (accessibility). It seems there exists an .so file from version 1.9.1_3
 - needless to say, this is rather strange as I never installed
 linux-atk. Now, maybe it was part of the base-fc4 port; but the
 accessibility/linux-atk version is 1.9.1-1, something less than 1.9.1_3
 I would think. What is going on here?

Could you not paraphrase but copy and paste the error?

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: jpeg-7 - rebuild all dependencies - how?

2009-07-24 Thread Mel Flynn
On Friday 24 July 2009 05:52:37 chris scott wrote:

 maybe it would be a good idea for ports to have an event log like yum does
 on centos. Just a simple log of stuff added, removed, and upgraded. It
 would be invaluable in this situation as you could see what was removed and
 it would be fairly easy to recover. It just may take a little time.

Err, this is available through cvs log/cvs diff.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: jpeg-7 - rebuild all dependencies - how?

2009-07-24 Thread Mel Flynn
On Friday 24 July 2009 09:51:18 Jerry wrote:
 On Fri, 24 Jul 2009 13:55:42 +0100

 Daniel Bye danie...@slightlystrange.org wrote:
  On Fri, Jul 24, 2009 at 02:03:43PM +0200, Ewald Jenisch wrote:
   Hi,
  
   Updating one of my sytems I followed /usr/ports/UPDATING and did a
   pkg_delete -r jpeg-6b_7 - only to discover that everything that
 
  Au contraire, Blackadder. UPDATING says to run either of
 
  portmaster -r jpeg*
 
  OR
 
  portupgrade -fr graphics/jpeg

 Which, unfortunately, does not build /x11/kdelibs3 with the updated
 jpeg library.

It should, otherwise the tool you're using does the wrong thing and you should 
file a bug report for that tool. kdelibs3 uses libmng and qt33 and those 
should be rebuilt before kdelibs3 by the upgrade tool.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: vim port have a lot of broken links ??

2009-07-24 Thread Mel Flynn
On Friday 24 July 2009 17:37:37 Kalle Møller wrote:
 Well any other port works flawless. It's only the vim ports (other = screen
 sudo wget bash apache22 mysql-server subversion etc)

 And the ISP is not the problem - I works for them in the network department
 (its on a 10 G link :D )

 I just made a make distclean and make again

 = vim-7.2.tar.bz2 doesn't seem to exist in /tmp/ports/distfiles/vim.
 = Attempting to fetch from http://ftp.vim.org/pub/vim/unix/.
 fetch: transfer timed out
 = Attempting to fetch from
 http://mirrors.24-7-solutions.net/pub/vim/unix/. vim-7.2.tar.bz2   
100% of 7034 kB  254 kBps 00m00s

 This takes 2-3 min And the 24-7 site only have to around 190  the last
 40 needs to wait for both primary and 24-7 to timeout before the 3rd site
 delivers


 Looked a little deeper... It seems like I can

 wget http://ftp.vim.org/pub/vim/patches/7.2/7.2.002

 But i cannont

 fetch http://ftp.vim.org/pub/vim/patches/7.2/7.2.002

 wget goes smoothly but fetch times out

Check your environment for the HTTP_PROXY value, aside from IPv6 like Steve 
said.
Additionally, you can sort various master sites to your preferences:
- /usr/ports/Mk/bsd.sites.mk lists various master sites for ports that have 
many.
- In there we see:
  .if !defined(IGNORE_MASTER_SITE_VIM)
MASTER_SITE_VIM+= \
http://ftp.vim.org/pub/vim/unix/ \
http://mirrors.24-7-solutions.net/pub/vim/unix/ \
  ... etc ..
- So we can put in /etc/make.conf:
IGNORE_MASTER_SITE_VIM=yes
MASTER_SITE_VIM=list_of_sites_that_work_best

I regularly change this master sites based on geographical location.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: A question for developers

2009-07-24 Thread Mel Flynn
On Friday 24 July 2009 18:49:10 Steve Bertrand wrote:
 Forgive the verbosity.

Forgiven, yet snipped ;)

 My desires/don't mind:

 - easily set tab width
See securemodelines.vim below sig. Put in $LOCALBASE/share/vim/vim72/plugin.

And the modeline below in C-style comments, within the first or last 5 lines 
of a file will set the TabStop to 4, will use 4 for ShiftWith (Number of 
spaces to use for each step of (auto)indent.), set the TextWidth to 78, will 
NOt ExpandTabs to spaces, enable AutoIndent if syntax is recognized.

/*
 * vim: ts=4 sw=4 noet tw=78 ai
 */

Additionally you want to copy $LOCALBASE/share/vim/vim72/vimrc_example.vim to 
~/.vimrc so you're not stuck in vi compatible mode.

 - fingers near home row
Home/End works, as well as ctrl-a/crtl-e in edit mode.

 - I'm competent/comfortable with CTRL, SHFT etc
Ctrl-R is redo, Ctrl-L refresh screen, shift-; aka : activates command line, 
some useful ones:
:r /foo/bar
   Read file /foo/bar into current position
:r!make -C /usr/ports/editors/vim -V MAINTAINER
   Read output of command into current position (this particular one is handy 
for send-pr)
:set paste
:set nopaste
   Turn off/on auto indenting, so that the OS/Desktop buffer can be pasted 
unmodified.
:split
   Split current file into two windows, switchable with two times ctrl-w
:split ../include/foo.h
   Split current file into two windows, where the top one now loads 
../include/foo.h
:vsplit
   Split windows vertically, rather then horizontally

Split is repeatable and will keep adding virtual windows. Use :close or :quit 
to close a window.

 - *very* quick basic movements within a file (preferably a single
 keyboard gesture will pg-up/dn, end of line, start of line, top, bot,
 erase line, cp line, insert line etc)
pg-up/dn, works
$, for EOL, ^ for SOL
gg for top of file, G for EOF
dd for erase line, or S for erase and insert (Substitute)
yy for yank line, I for insert SOL, A for insert EOL
v for visual mode, which allows selecting regions to do stuff with.

 - smooth copy/paste with a mouse if I want to transfer from devel box to
 my workstation, and back into a different window
It's turned on by default in .vimrc, but I turned it off cause Konsole allows 
me to copy/paste to my desktop. By default vim uses it's own clipboard, which 
means it's limited to current instance or requires closing of vim, so that the 
new instance reads the clipboard contents from ~/.viminfo. If your client 
doesn't copy/paste smoothly, this might be an issue.

 - syntax highlighting (opening/closing braces/brackets/parens) would be
 really nice, but since my win32 client seems black/white, I think this
 is a pipe dream. I can easily live without this. As a matter of fact, I
 negate this statement

Syntax highlighting depends on what your client can support and what terminal 
emulation you're advertising. The default .vimrc mentioned above respects 
$TERM and checks it's termcap for color support. So, this depends more on how 
much time you want to spend figuring out why your terminal emulation doesn't 
support colors. Also, the default assumed background is light, if you're 
really using a dark background (white on black terminal), you will want to 
add:
set bg=dark

to .vimrc.
The used colorscheme then changes accordingly.

 - simple in-editor search/replace would be a nice-have (especially if it
 either understood everything as text, or comprehended Perl-type regexp

:%s/search/replace/g replaces all occurrences in a file, using a dialect of 
basic re. You will want to read :help sub-replace-special and :help pattern.

 - be able to have multiple files open simultaneously for editing, and an
 easy way to flip back and forth (a virtual 'tab' system, if you please)

ctrl-w ctrl-w you'll get used to.

To use securemodelines.vim, put in .vimrc:
set modelines=0
let g:secure_modelines_allowed_items = [
\ textwidth,   tw,
\ softtabstop, sts,
\ tabstop, ts,
\ shiftwidth,  sw,
\ expandtab,   et,   noexpandtab, noet,
\ filetype,ft,
\ foldmethod,  fdm,
\ readonly,ro,   noreadonly, noro,
\ backup,  bkp,  nobackup, nobkp,
\ autoindent,  ai,
\ syntax,  syn
\ ]

-- 
Mel

 vim: set sw=4 sts=4 et ft=vim :
 Script:   securemodelines.vim
 Version:  20070518
 Author:   Ciaran McCreesh ciar...@ciaranm.org
 Homepage: http://ciaranm.org/tag/securemodelines
 Requires: Vim 7
 License:  Redistribute under the same terms as Vim itself
 Purpose:  A secure alternative to modelines

if compatible || v:version  700
finish
endif

if (! exists(g:secure_modelines_allowed_items))
let g:secure_modelines_allowed_items = [
\ textwidth,   tw,
\ softtabstop, sts,
\ tabstop, ts,
\ shiftwidth,  sw

Re: limit to number of files seen by ls?

2009-07-23 Thread Mel Flynn
On Thursday 23 July 2009 09:41:26 Karl Vogel wrote:
  On Wed, 22 Jul 2009 20:01:57 -0400,
  John Almberg jalmb...@identry.com said:

 J A client has a directory with a big-ish number of jpgs... maybe 4000.
 J Problem is, I can only see 2329 of them with ls, and I'm running into
 J other problems, I think.

 J Question: Is there some limit to the number of files that a directory
 J can contain? Or rather, is there some number where things like ls start
 J working incorrectly?

Every version of Unix I've ever used had an upper limit on the size
of the argument list you could pass to a program, so it won't just be
ls that's affected here.  That's why I use 1,000 as a rule of thumb
for the maximum number of files I put in a directory.

That arbitrary number works simply because kern.argmax default has been raised 
somewhere in 6.x (before it was 64kB).
% echo `sysctl -n kern.argmax`/1000|bc
262

And MAXNAMLEN in sys/dirent.h is 255.
Knowing your way around maximum arguments length through xargs as suggested in 
this thread is much better solution then trying to exercise control over 
directory sizes, which may or not be under your control in the first place.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: K3b-DVD

2009-07-23 Thread Mel Flynn
On Monday 20 July 2009 16:39:45 ajtiM wrote:
 Hi!

 My system: FreeBSD 7.2, KDE 3.5.10

 I did try to burn data DVD with my NEC DVD ND-1300A but I got an error:
 :-( Media is not formatted or unsupported

I had this writer at one point. Check the NEC site for supported media. It 
doesn't support all writeable DVD layers, especially the low cost ones, 
however there are some firmware upgrades that add new media support.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: K3b-DVD

2009-07-23 Thread Mel Flynn
On Thursday 23 July 2009 12:57:42 ajtiM wrote:
 On Thursday 23 July 2009 13:51:51 Mel Flynn wrote:
  On Monday 20 July 2009 16:39:45 ajtiM wrote:
   Hi!
  
   My system: FreeBSD 7.2, KDE 3.5.10
  
   I did try to burn data DVD with my NEC DVD ND-1300A but I got an error:
   :-( Media is not formatted or unsupported
 
  I had this writer at one point. Check the NEC site for supported media.
  It doesn't support all writeable DVD layers, especially the low cost
  ones, however there are some firmware upgrades that add new media
  support.

 It hasfirmware upgrade but I need Windows. On my computer is just FreeBSD.

Put the drive on a windows computer or buy new media that is compatible. 
There's no other way, unfortunately. There is however a PDF on the site with 
compatible media.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ccache make buildworld fails (mmap problem?)

2009-07-20 Thread Mel Flynn
On Mon, 20 Jul 2009 08:46:48 +0900, Hashimoto hsm...@gmail.com wrote:
 Hello.
 I have a problem about ccache.
 I installed devel/ccache from ports.
 make buildworld stopped immediately and failed.
 In the ccache log file, I found the Faild to mmap message.
 
 I also tried to reinstall devel/libtool15
 following /usr/local/share/doc/ccache/cchace-howto-freebsd.txt .
 But, again, it failed.
 
 When I disable ccache, make buildworld  installing devel/libtool15
 successfully finishes.
 
 Any suggestions?

http://lists.freebsd.org/pipermail/freebsd-hackers/2009-July/029141.html
-- 
Mel

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hald: kmem_malloc error

2009-07-18 Thread Mel Flynn
On Friday 17 July 2009 18:59:49 Andrey Shuvikov wrote:

 I'm trying to configure X and according to the manual enabled DBUS and
 HALD. But when hald is starting up I get kernel panic:

 kmem_malloc: entry not found or misaligned

 Does anyone know what could be wrong? I have memory dump if it can
 help but it's big (173M).

If you have a file /var/crash/vmcore.0, you will want to run the
following command:
kgdb /boot/kernel/kernel /var/crash/vmcore.0
Then type bt at the prompt and paste output here.

More info:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html

uname -a and dmesg output also help in diagnosing this problem.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Zero size allocation with Yealink VOIP USB Phone, 7.2-RELEASE (Was: Re: hald: kmem_malloc error)

2009-07-18 Thread Mel Flynn
[ Adding usb@ and keeping long context for that purpose ]

On Saturday 18 July 2009 08:29:32 Andrey Shuvikov wrote:
 On Sat, Jul 18, 2009 at 2:02 AM, Mel

 Flynnmel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Friday 17 July 2009 18:59:49 Andrey Shuvikov wrote:
  I'm trying to configure X and according to the manual enabled DBUS and
  HALD. But when hald is starting up I get kernel panic:
 
  kmem_malloc: entry not found or misaligned
 
  Does anyone know what could be wrong? I have memory dump if it can
  help but it's big (173M).
 
  If you have a file /var/crash/vmcore.0, you will want to run the
  following command:
  kgdb /boot/kernel/kernel /var/crash/vmcore.0
  Then type bt at the prompt and paste output here.
 
  More info:
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ker
 neldebug.html
 
  uname -a and dmesg output also help in diagnosing this problem.
  --
  Mel

 The uname output is:

 FreeBSD foxtrot.home 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1
 08:49:13 UTC 2009
 r...@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

 The kgdb output:

 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are welcome to change it and/or distribute copies of it under certain
 conditions. Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i386-marcel-freebsd...

 Unread portion of the kernel message buffer:
 panic: kmem_malloc: entry not found or misaligned
 cpuid = 0
 Uptime: 52s
 Physical memory: 2034 MB
 Dumping 176 MB: 161 145 129 113 97 81 65 49 33 17 1

 Reading symbols from /boot/kernel/linux.ko...Reading symbols from
 /boot/kernel/linux.ko.symbols...done.
 done.
 Loaded symbols for /boot/kernel/linux.ko
 #0  doadump () at pcpu.h:196
 196   pcpu.h: No such file or directory.
   in pcpu.h
 (kgdb) bt
 #0  doadump () at pcpu.h:196
 #1  0xc07e25a7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
 #2  0xc07e2879 in panic (fmt=Variable fmt is not available.
 ) at /usr/src/sys/kern/kern_shutdown.c:574
 #3  0xc0a1cdc0 in kmem_malloc (map=0xc147108c, size=0, flags=2)
 at /usr/src/sys/vm/vm_kern.c:381
 #4  0xc0a13357 in page_alloc (zone=0x0, bytes=0, pflag=0xe7b6497f \002,
 wait=2) at /usr/src/sys/vm/uma_core.c:952
 #5  0xc0a15e20 in uma_large_malloc (size=0, wait=2)
 at /usr/src/sys/vm/uma_core.c:2706
 #6  0xc07d16f8 in malloc (size=0, mtp=0xc0c46580, flags=2)
^^
 at /usr/src/sys/kern/kern_malloc.c:393
 #7  0xc0743044 in uhidopen (dev=0xc5713000, flag=1, mode=8192,
 p=0xc5c6a460) at /usr/src/sys/dev/usb/uhid.c:428
In kgdb can you print the entire softcell as follows:
f 7
p *sc

Hopefully that will provide sufficient information for the usb developers to 
fix this problem.

 #8  0xc07a56a0 in giant_open (dev=0xc5713000, oflags=1, devtype=8192,
 td=0xc5c6a460) at /usr/src/sys/kern/kern_conf.c:332
 #9  0xc076e1fc in devfs_open (ap=0xe7b64a88)
 at /usr/src/sys/fs/devfs/devfs_vnops.c:908
 #10 0xc0af88d2 in VOP_OPEN_APV (vop=0xc0c47ee0, a=0xe7b64a88)
 at vnode_if.c:371
 #11 0xc0870829 in vn_open_cred (ndp=0xe7b64b7c, flagp=0xe7b64c78, cmode=0,
 cred=0xc5470100, fp=0xc5b57da8) at vnode_if.h:199
 #12 0xc0870973 in vn_open (ndp=0xe7b64b7c, flagp=0xe7b64c78, cmode=0,
 fp=0xc5b57da8) at /usr/src/sys/kern/vfs_vnops.c:94
 #13 0xc086e0a3 in kern_open (td=0xc5c6a460,
 path=0xbfbfe90c Address 0xbfbfe90c out of bounds,
 pathseg=UIO_USERSPACE, flags=1, mode=0)
 at /usr/src/sys/kern/vfs_syscalls.c:1042
 #14 0xc086e610 in open (td=0xc5c6a460, uap=0xe7b64cfc)
 at /usr/src/sys/kern/vfs_syscalls.c:1009
 #15 0xc0ae4495 in syscall (frame=0xe7b64d38)
 at /usr/src/sys/i386/i386/trap.c:1090
 #16 0xc0ac9260 in Xint0x80_syscall ()
 at /usr/src/sys/i386/i386/exception.s:255
 #17 0x0033 in ?? ()
 Previous frame inner to this frame (corrupt stack?)
 (kgdb) q

 The dmesg:

 Copyright (c) 1992-2009 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
 FreeBSD is a registered trademark of The FreeBSD Foundation.
 FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009
 r...@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 Timecounter i8254 frequency 1193182 Hz quality 0
 CPU: Intel(R) Core(TM)2 Duo CPU E8400  @ 3.00GHz (2999.67-MHz 686-class
 CPU) Origin = GenuineIntel  Id = 0x10676  Stepping = 6
  
 Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MC
A,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
 Features2=0x8e3fdSSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PD
CM,SSE4.1 AMD Features=0x2010NX,LM
   AMD Features2=0x1LAHF
   Cores per package: 2
 real memory  = 2146893824 (2047 MB)
 avail memory = 2091225088 (1994 MB)
 ACPI APIC

Re: Zero size allocation with Yealink VOIP USB Phone, 7.2-RELEASE (Was: Re: hald: kmem_malloc error)

2009-07-18 Thread Mel Flynn
On Saturday 18 July 2009 12:20:17 Andrey Shuvikov wrote:

 How did you know it's Yealink? Just because
 it's the only uhid device?

Yes, that's why the dmesg was useful.

 Thanks a lot!

You're very welcome.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: upgrade from Firefox 3.0 to Firefox 3.5

2009-07-17 Thread Mel Flynn
On Friday 17 July 2009 16:28:22 Polytropon wrote:
 On Fri, 17 Jul 2009 18:07:36 -0600, Chad Perrin per...@apotheon.com wrote:
  On Sat, Jul 18, 2009 at 01:43:47AM +0200, Polytropon wrote:
   On Fri, 17 Jul 2009 16:48:37 -0600, Chad Perrin per...@apotheon.com 
wrote:
So . . . how do I upgrade Firefox from 3.0 to 3.5 without running the
risk of losing everything (bookmarks, a 100-tab session, et cetera)?
  
   Well, I don't think those settings get altered in any way - they do not
   reside in the port's directories (where it will be installed into).
   To be sure, make a backup copy of your ~/.mozilla/ directory before.
 
  Does that cover both bookmarks *and* my tab session?

 I think so. Because a !root user cannot write to Firefox's directories
 (inside the /usr/local/ subtree), data local to the user will be stored
 in his home directory. The correct path is ~/.mozilla/firefox and maybe
 ~/.mozilla/default.

 I can at least confirm it for the bookmarks. I haven't checked for
 tab sessions because I'm not using that feature.

 But just judging from a conceptual point of view: WHY NOT? :-)

Sessions are stored in sessionstore.js. Bookmarks, user modified settings even 
extensions are in ~/.mozilla/firefox. If you don't trust what people here say, 
feel free to run find ~/.mozilla/firefox -type f and deduct from the file and 
directory names what is stored per user. Most files are plain text, so you can 
enlighten yourself when in doubt.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Clearing ttyv0 after boot

2009-07-17 Thread Mel Flynn
On Friday 17 July 2009 18:11:56 Joe Snikeris wrote:

 As the subject suggests, I'd like to clear ttyv0 immediately after
 booting so that it looks exactly like the other ttys.  I suspect I
 might have to add a local rc script, but I'm fairly new to FreeBSD and
 am not sure if this is the correct way to go.

 Does anyone have any pointers?

This recently came up on this list:
http://www.freebsd.org/cgi/getmsg.cgi?fetch=83142+0+/usr/local/www/db/text/2009/freebsd-questions/20090510.freebsd-questions

To do this during at the end of rc stage take hints from
/etc/rc.d/syscons, the rc(8) manpage and rcorder(8) about when to launch
this script. Ideally you want to REQUIRE what the last script reported
by rcorder PROVIDEs and possibly delay execution a bit (see
/etc/rc.d/bgfsck for an example of that), since you can't really hook
into the login prompt is now displayed event.

Also, if you want the console to stay the same, you will need to
configure /etc/syslog.conf and change the line that sends to /dev/console
to send it to /var/log/console.log. newsyslog.conf(5) is already
configured to rotate that log.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automatic screen lock when leaving desk

2009-07-16 Thread Mel Flynn
On Wednesday 15 July 2009 04:53:19 Jonathan McKeown wrote:
 On Wednesday 15 July 2009 12:45:02 Matthew Seaman wrote:
  I used to be a NeXTie, and the Screensaver.app there had a really nifty
  little feature.  I'm surprised it's not been copied into other
  screensaver applications since, as it's pretty simple.  They just had a
  facility where moving the mouse cursor to one corner of the screen and
  leaving it still for a few seconds would cause the screen saver / screen
  lock to come on straight away.

 KDE 3.5 provides this feature - it's under Advanced Options on the
 screensaver configuration.

And 4.x too. Visually timed at ~3 seconds.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automatic screen lock when leaving desk

2009-07-16 Thread Mel Flynn
On Wednesday 15 July 2009 01:20:19 Frederique Rijsdijk wrote:

 I guess I'll look into the bluetooth thing. That looks quite doable.

If you can spare the time, I'd appreciate write-up of how you got it working 
on FreeBSD as it's the first bluetooth application that seems worthwhile to 
me.
I also remembered a gadget on thinkgeek [1], but unfortunately the software 
part requires windows.

[1] http://www.thinkgeek.com/computing/accessories/76ed/
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SSO solution in ports?

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 06:54:39 Bill Moran wrote:
 In response to John Almberg jalmb...@identry.com:
  I am trying to build a set of web applications that are accessed
  through a web portal that uses a Single Sign On (SSO) solution.
  Problem is, there are MANY competing SSO solutions. Since building
  the client side of the SSO system is more than enough for me, I was
  wondering if there are any SSO servers in ports that I can just
  install and use? A CAS solution would be the best, but I'll look at
  anything.

 The most widely supported I know of is LDAP, and OpenLDAP works pretty
 well.

That won't really work as LDAP can't read a browser cookie or maintain session 
information. LDAP is a good choice as storage backend.

Your best bet is probably to use an OpenID based solution, as support for this 
sign on method is growing in web applications, so you lessen the chance of 
having to maintain your custom glue into the application. The security/phpmyid 
port is one implementation that allows you to run your own OpenID server.

http://openid.net/
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD FIBs (setfib) - How to modify?

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 09:47:11 Nikos Vassiliadis wrote:
 Brent Bloxam wrote:
  Nikos Vassiliadis wrote:
  Brent Bloxam wrote:
  The documentation on FIBs is pretty slim unless I've been looking in
  the wrong places, all I've seen are a few mentions in errata and
  release notes. setfib(1) doesn't offer much in the way of associated
  commands, and definitely doesn't explain how to actually work with a
  FIB. I'm curious if there's a command to specifically modify a FIB
  beyond 0, besides something like
 
  setfib 1 route add ...
 
  setfib selects the routing table for locally originated
  outgoing packets. Besides locally originated packets, there
  are packets arriving from the network and need to be forwarded.
  These packets can be classified in a specific routing table
  with the aid of ipfw. That's all there is. I can't think
  of something else that needs to be thought with regard to
  multiple routing tables.
 
  HTH, Nikos
 
  Sorry, perhaps I wasn't clear. What I'm interested in is if there's a
  way to deal with *modifying* those other routing tables, besides using
  setfib as I described (e.g., you want to have a different default
  gateway). There would be no reason to have multiple routing tables if
  they're carbon copies of one another.

 setfib has no internal commands. setfib runs the command you tell it
 to in a specific routing table. You modify/inspect the routing tables
 with the standard tools, that is route, netstat, some dynamic routing
 daemon(quagga, etc) and in general everything that's related to the
 routing table.

 Just start a shell in FIB 10 and every command forked from
 that shell will be bound to FIB 10.
 setfib 10 csh
 ... do some work
 exit
 you're back in FIB 0.

I guess the main question here is what is 10? or what is an FIB?. How does 
one create such an FIB id (which I can't find in docs either). For example, on 
my system if I do:
% setfib 2 fetch http://www.freebsd.org/docs.html
setfib: 2: invalid FIB (max 0)

I would expect to see some info in
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing.html

Naturally there's some info here:
http://en.wikipedia.org/wiki/Forwarding_information_base

but that doesn't have any practical information on how to create one.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problems following PHP upgrade

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 08:06:19 Michael Doyle wrote:

 /usr/local/www/apache22/logs/httpd-error.log contains multiple lines
 of the form:
 [Thu Jul 16 16:13:33 2009] [notice] child pid xxx exit signal Illegal
 instruction (4)

This would suggest that you compiled for the wrong processor. If that's not 
the case, are you using the sqlite extension (inlined assembly)?
One other candidate is zend_alloc.c, but the diff with 5.2.9 doesn't show me 
anything changed in that area.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Hosting help

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 10:55:48 Marissa wrote:
 They said the guy gave
 them the username and info but then took off and they can't get ahold of
 them. 

 I need to delete the items off the server so I can
 host the site but whenever I try it says I don't have access. Is there
 anything you can do to help?

There's 3 major possibilities:
1) The username and info the vanished guy gave does not have permission to 
delete those files.
2) You're using the wrong method to delete those files
3) Deletion is prohibited by the server

For this specific problem we'd need to know:
- What protocol are you using to delete the files (FTP / WebDav / SSH)?
- Whether the username is root (nothing else needed, just yes/no)?
- What the exact message is you get when trying to delete a file. Most notably 
there's a difference between permission denied and operation not 
permitted, so don't paraphrase the error message, but copy/paste if possible.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD FIBs (setfib) - How to modify?

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 10:04:20 Brent Bloxam wrote:
 Mel Flynn wrote:
I guess the main question here is what is 10? or what is an FIB?.

 How does

  one create such an FIB id (which I can't find in docs either). For
  example, on my system if I do:
  % setfib 2 fetch http://www.freebsd.org/docs.html
  setfib: 2: invalid FIB (max 0)
 
  I would expect to see some info in
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing
 .html
 
  Naturally there's some info here:
  http://en.wikipedia.org/wiki/Forwarding_information_base
 
  but that doesn't have any practical information on how to create one.

 I'm not sure if you're curious or trying to clarify on my question, but
 I'm past the point of creating and was interested in modifying.

Yep, was trying to clarify your question, which obviously I didn't do very 
well. :)

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Resetting user password in cron

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 16:39:51 Jos Chrispijn wrote:
 Can someone tell me how I can reset a user's password best in a cron job?
 If I do a password change from the prompt, I now have to re-enter the
 password, which I would not like to do in a cron job. Thanks/

Take a look at pw(8), specifically usermod command, -h and -H option.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Mel Flynn
On Monday 13 July 2009 14:27:46 Karl Vogel wrote:

It's very easy to set up a caching nameserver without using all the
memory on your system.

It's much easier to turn your HIGH-performance webserver into a slug, by 
running stuff you don't need on the same machine. Memory unused by the 
webserver can then be used by the OS to provide filesystem caching, which 
indirectly greatly benefits a webserver, much more then a local cache can 
speed things up.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

2009-07-14 Thread Mel Flynn
On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:

 I am going thru my first FreeBSD upgrade and it's not going too smoothly. I
 originally started the upgrade using the freebsd-update method. This is
 what I've done so far (all as root user):

There's a few misconceptions in your understanding of the upgrade process, 
which I'll try to address below. However, you're also using the wrong sequence 
of events. You *first* want to update your kernel and base system, only then 
your ports.

 PS. I am using a custom kernel.

As such, freebsd-update cannot upgrade your kernel.

 1. ran portsnap fetch update - [success]

 2. ran portupgrade -va [portupgradenot found - i hadn't installed it
 yet

 3. ran freebsd-update fetch [success] (i know this was out of sequence
 from the guide)

 4. installed portupgrade (make install clean from the dir in ports) [ssh
 connection dropped, so i had to login again]

 5. installed portupgrade (make install) [success] then make clean
 [success]

 6. ran portupgrade -va [long process begins... strangely, several X
 components install although this is not desired]

echo WITHOUT_X11=yes /etc/make.conf

 7. ran freebsd-update fetch again [success]

 8. ran freebsd-update upgrade -r 7.2-RELEASE [ssh connection dies during
 preparing to download files, so i log in again]

 9. ran freebsd-update upgrade -r 7.2-RELEASE [~27,000 updates..] and of
 course ssh connection dies during Fetching 3060 files although applying
 patches succeeds. A note: these disconnects are not at all common during a
 normal ssh connection to this computer, it seems due to the
 resource-intense operations required for updating freebsd.

More likely to be bad queuing in the gateway or you're hitting the default 
session timeout of 5 minutes of inactivity. See man ssh_config for 
ServerAliveInteral and TCPKeepAlive.

 10. log back in, ran freebsd-update upgrade -r 7.2-RELEASE [..success]

 11. ran freebsd-update install [and of course ssh dies during Installing
 updates...]

 12. log back in, ran freebsd-update install.

 13. Then i ran nextboot -k GENERIC and got /boot/GENERIC doesn't exist.
 so, i copied kernel.old to /boot/GENERIC

This is out of sequence and likely the cause for some problems. First of all, 
you must be sure that kernel.old is really a GENERIC 7.0-RELEASE kernel. 
Secondly, this step /should/ have been run /before/ freebsd-update install.

 14. Ok, maybe this was the problem. for some reason at this point i decide
 to run freebsd-update install again, and get no updates are available.

 15. Then I run freebsd-update -r 7.2-RELEASE upgrade again.. it downloads
 some patches, but then i get this error: /usr/sbin/freebsd-update: cannot
 open files/.gz: No such file or directory about 100 times.. plus, i get
 questions like

Running an upgrade again, without a rollback is generally not a good idea.

 The following file will be removed, as it no longer exists in
 FreeBSD 7.2-RELEASE: /boot/device.hints
 Does this look reasonable (y/n)?

 which doesn't look very good.

 16. so, i issued a shutdown -r now command and crossed my fingers.. the
 system is still up, but it hasn't been upgraded (uname still reports
 7.0-p11 for booting form the GENERIC kernel, and 7.0-p9 for the custom
 kernel). on top, make buildworld fails with:

 Stop in /usr/src/secure/lib/libssh.
 *** Error code 1 

 every time.

 and worse,

 any csup command dies with /libexec/ld-elf.so.1: /lib/libc.so.7: version
 FBSD_1.1 required by /lib/libthr.so.3 not found along with a lot of other
 commands... any ideas??

Your world and kernel are out of sync, because of loading a not upgraded 
kernel with a freebsd-update'd 7.2 world. I would try fetching the 7.2 livefs 
ISO, mount it as a vnode and install the GENERIC kernel from there to get your 
system back in working order.
Example steps:
$ sha256 /data/isos/7.2-RELEASE-i386-livefs.iso
SHA256 (/data/isos/7.2-RELEASE-i386-livefs.iso) = 
4faa7b9d78d125f9b28521247e32e1f0bef3b0b0f21b654ba22c6e79ca3301ce

$ sudo mdconfig -a -t vnode -f /data/isos/7.2-RELEASE-i386-livefs.iso -u 0
$ sudo mount -t cd9660 /dev/md0 /mnt
$ sudo mv /boot/kernel /boot/kernel.bogus
$ sudo cp -Rp /mnt/boot/kernel /boot/
$ shutdown -r now # may need sudo if you're not in operator group

If you still have problems after this, it's likely you need single user mode 
to get back into working order. Given the number of errors given by the second 
freebsd-update upgrade command I wouldn't trust a freebsd-update rollback.

This would be where I'd restore the backups using a livecd and restart the 
freebsd-update process, this time sticking verbatim to the handbook, but 
skipping the portupgrade test run.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 11:51:40 Mel Flynn wrote:
 On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:
  I am going thru my first FreeBSD upgrade and it's not going too smoothly.
  I originally started the upgrade using the freebsd-update method. This
  is what I've done so far (all as root user):

 There's a few misconceptions in your understanding of the upgrade process,
 which I'll try to address below. However, you're also using the wrong
 sequence of events. You *first* want to update your kernel and base system,
 only then your ports.

  PS. I am using a custom kernel.

 As such, freebsd-update cannot upgrade your kernel.

That should be , without the intermediate use of a GENERIC kernel..

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: port-upgrade freebsd-update causing page faults and slow performance

2009-07-14 Thread Mel Flynn
Maybe you shouldn't run those while typing an email?

Seriously, ENOTENOUGHINFO | EQUESTIONMISSING.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: turning off the wireless network radio

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 12:28:40 Chad Perrin wrote:
 On Tue, Jul 14, 2009 at 12:20:25PM +0200, Maciej Milewski wrote:
  Dnia wtorek 14 lipiec 2009 o 07:38:49 Chad Perrin napisał(a):
   I'm having a real bitch of a time trying to figure out how to shut down
   the wireless adapter's radio.  The driver module won't unload as long
   as the adapter is active, and neither ifconfig nor iwicontrol are
   providing a solution either.
  
   I'm using (as you may have guessed by mention of iwicontrol) an Intel
   wireless adapter, with if_iwi.ko as my driver module.  It's an Intel
   PRO/Wireless 2200BG Network Connection according to pciconf -lv.
  
   Thanks in advance.
 
  You can try doing this by software switch:
  sysctl -a | grep rfkill
  dev.ath.0.rfkill: 0
  This switch should disable radio.
  I don't know if it is supported by iwi driver but you can try.

 At first glance, it looks like the iwi equivalent is dev.iwi.0.radio,
 where 1 is on and 0 is off.  It won't let me set it to 0, though,
 claiming it's a read-only sysctl setting.

 . . . and trying to set the debug.iwi sysctl setting to 1 caused the
 computer to reboot (not intended behavior, I'm sure).  Bah.  I wonder if
 there's something wrong with my driver.

There is plenty wrong with the driver, also with the product. Unfortunately, 
Intel does not support the FreeBSD team with developers for the wireless cards 
as they do with the wired cards and the iwi driver is particularly plagued.

At present the best working Intel wireless on FreeBSD is the wpi, but it is on 
the virge of the same fate as Benjamin Close is lacking time to support it.

There's a group of people working on improving iwn for the 5000 series, effort 
spawned from this list, but as of yet I haven't seen anything hit the source 
tree.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 07:52:43 Bill Moran wrote:
 In response to Frederique Rijsdijk frederi...@isafeelin.org:
  I'm looking for a way to automaticaly lock my X session when I leave my
  desk. Probably just using 'xlockmore -mode blank' or such. But how to
  detect?
 
  It could be infrared based (heat signature), video based (webcam w/
  motion detection) or even mechanical (switch in seat? meh..).
 
  And how would FreeBSD interface with such device? Most likely via USB,
  since my lt doesn't have any serial ports.
 
  Any ideas? Experience?

 Unless your requirements are really as strict as you state, you're probably
 better off just installing xscreensaver and configuring it to lock the
 screen after a reasonable amount of inactivity.

And use xev to figure out the keycode of an unused key on your keyboard you
can easily access (like multimedia keys). Then you can activate it
when leaving your spot or when that creepy guy from accounting tries to
look over your shoulder. You would probably need some window/session manager
that supports global key shortcuts.

I like the bluetooth idea too, with the caveat that the range might not be
sufficient. There's an article about it here:
http://johnny.chadda.se/2007/08/09/lock-and-unlock-your-gnome-screensaver-using-your-bluetooth-phone/

I don't use bluetooth at all, so can't help you with the FreeBSD specifics.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 17:36:24 Polytropon wrote:

 so in my opinion it's
 always safe to first umount, then remove.

Kids (or aging muscles) force you to revise your view. Not to mention low 
quality USB camera cables. AFAIK the panic is resolved in 8.x though. Not sure 
about the 7.x series.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copy directory tree as hard links...

2009-07-13 Thread Mel Flynn
On Monday 13 July 2009 00:17:14 Matthew Seaman wrote:
 Modulok wrote:
  What is the easiest way to copy a directory tree as hard links?
 
  Linux has a nice little 'cp -al' flag combo to do this. The FreeBSD
  cp(1) manual page says to use pax or tar, but how do I get the ability
  to rename the file without first creating a destination file? I don't
  want an archive, just regular directory tree sitting right next to the
  original, but with a new name ... consisting of of hard links back to
  the original. For example on linux I could do something like:
 
  $ ls
  foo/
 
  $ cp -al foo bar
 
  The result would be a new copy of foo, which takes up no additional
  space, as all files share the same inodes. Is there an easy way to do
  this on FreeBSD?

 cpio(1)

snip

 You might also consider using nullfs mounts. In /etc/fstab:

 /some/dir /other/dir nullfs rw 0 0

 See mount_nullfs(8).

There's one important difference there:
rm bar/baz disconnects the hardlink, while with nullfs both foo/baz and 
bar/baz are gone (assuming rw mount). unionfs would replicate the hardlink 
behavior with quite a few caveats.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should DNS be on same server as webserver?

2009-07-13 Thread Mel Flynn
On Monday 13 July 2009 08:36:42 John Almberg wrote:
 The other day, a FreeBSD 'expert' told me that it is important to
 have the DNS server for a domain on the same server as the domain's
 web server. Supposedly, this saves doing tons of DNS look ups over
 the network. Instead, they are done locally.

Bogus. A high-performance webserver should not be doing DNS lookups, other 
then application driven ones, like verification of email domains upon 
registration. If having hostnames in the live logs is mandatory by some weird 
company policy or the webserver does not provide a configuration setting to 
turn this behavior off, then more performance is gained by having the 
nameserver on the network gateway as the likeliness of cache hits and 
especially negative cache hits is increased. As others have mentioned, network 
overhead is negligible. Human noticeable delays are caused by upstream DNS 
servers slowly or not at all responding when a client IP is being resolved.

Secondly, a named cache size depends on available memory. A high performance 
webserver uses plenty of that, so you wouldn't be able to grow the named cache 
to almost caching the entire net size, which you would be able to on a 
dedicated machine.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump hangs on 7.1

2009-07-12 Thread Mel Flynn
On Friday 10 July 2009 08:29:01 Len Conrad wrote:
 FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009
 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

 CPU: Intel(R) Xeon(R) CPU   E5420  @ 2.50GHz (2496.26-MHz 686-class
 CPU) Origin = GenuineIntel  Id = 0x1067a  Stepping = 10
   AMD Features=0x2010NX,LM
   AMD Features2=0x1LAHF
   Cores per package: 4
 real memory  = 3484745728 (3323 MB)
 avail memory = 3405537280 (3247 MB)
 ACPI APIC Table: DELL   PE_SC3  
 FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1
  cpu2 (AP): APIC ID:  2
  cpu3 (AP): APIC ID:  3


 /sbin/dump -0uanL -f - / | ssh dump_ima...@xxx.net dd
 of=/var/ftp/dump_images/mx1-root-test

 dump has completed only once. Several other dumps have all gotten under
 way, target file is created and increases until the hang.

 CTRL-C gets back to shell,eg:

   DUMP: Date of this level 0 dump: Fri Jul 10 10:25:33 2009
   DUMP: Date of last level 0 dump: the epoch
   DUMP: Dumping snapshot of /dev/da0s1d (/usr) to standard output
   DUMP: mapping (Pass I) [regular files]
   DUMP: mapping (Pass II) [directories]
   DUMP: estimated 1713942 tape blocks.
   DUMP: dumping (Pass III) [directories]
   DUMP: dumping (Pass IV) [regular files]
 ^C  DUMP: Interrupt received.
   DUMP: Do you want to abort dump?: (yes or no) Killed by signal 2.
   DUMP: Broken pipe
   DUMP: The ENTIRE dump is aborted.

 Hangs always in Pass IV

What's the output ps -auwwx|grep dump at the time of the dump.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Out of memory during request for 32 bytes

2009-07-12 Thread Mel Flynn
On Friday 10 July 2009 06:06:06 Wojciech Puchar wrote:
 do uname -a

 if you are on 32-bit arch you may add

 kern.dfldsiz=2147483648
 kern.maxdsiz=2147483648


 to /boot/loader.conf


 but most likely you'll need to edit /etc/login.conf

 On Fri, 10 Jul 2009, Per olof Ljungmark wrote:
  Apache web server on 7-STABLE running nagios and OTRS. My problem is I
  cannot understand what I should increase to satisfy those memory-hungry
  Perl scripts?
 
  Out of memory during request for 32 bytes, total sbrk() is 17192960

This only shows ~16M in use, so process data size shouldn't be affected. Check 
the apache start up script for the limits args, login.conf for the user apache 
runs on and anything where default memory limit of 16MB triggers a hit in 
stuff you read somewhere when setting this up.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why this flash drive not detected in devd?

2009-07-12 Thread Mel Flynn
On Saturday 11 July 2009 00:36:09 Sagara Wijetunga wrote:

 I prefer to handle mounting through an automounter even without KDE
 running.

I think most users want to handle the disk based on the content not on the 
device that has the disk. Ideally I would want my desktop to:
1) automount below a root that I can configure
2) when a disk is labeled, use the lowercase version of the label as 
mountpoint, resolving conflicts using 2-digit serial suffixes.
3) when a disk is not labeled, mount it temporarily using a unique name (f.e. 
using uuid(3)), provide me with an option to label it
   a) if yes, label and remount, asking me to abort if this means disk content 
gets lost
   b) if no, show me where it's mounted.

Of course, YMMV, but I really don't care if my SD card with my photos is in 
the built-in SD card holder, in the camera itself or on an USB SD card reader 
I plugged in. I want my photos to be under ~/photos each time.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing MATLAB: /lib/libXp.so.6: ELF file OS ABI invalid

2009-07-12 Thread Mel Flynn
On Sunday 12 July 2009 11:34:52 Daniel Underwood wrote:
 During installation of Matlab, just after accepting the licnse
 agreement, I get this error:

 /home/daniel/matlab-install/update/bin/glnx86/xsetup: error while
 loading shared libraries: /lib/libXp.so.6: ELF file OS ABI invalid

 I even tried # brandelf -t Linux /compat/linux/lib/libXp.so.6 but I
 still get the same error.

 How do I fix this?

What's the output of:
sysctl compat.linux.osrelease
ls /var/db/pkg|grep linux_base
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump hangs on 7.1

2009-07-12 Thread Mel Flynn
On Sunday 12 July 2009 11:03:00 Len Conrad wrote:
 On Friday 10 July 2009 08:29:01 Len Conrad wrote:
  FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009
  r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
  CPU: Intel(R) Xeon(R) CPU   E5420  @ 2.50GHz (2496.26-MHz
  686-class CPU) Origin = GenuineIntel  Id = 0x1067a  Stepping = 10
AMD Features=0x2010NX,LM
AMD Features2=0x1LAHF
Cores per package: 4
  real memory  = 3484745728 (3323 MB)
  avail memory = 3405537280 (3247 MB)
  ACPI APIC Table: DELL   PE_SC3  
  FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
   cpu0 (BSP): APIC ID:  0
   cpu1 (AP): APIC ID:  1
   cpu2 (AP): APIC ID:  2
   cpu3 (AP): APIC ID:  3
 
 
  /sbin/dump -0uanL -f - / | ssh dump_ima...@xxx.net dd
  of=/var/ftp/dump_images/mx1-root-test
 
  dump has completed only once. Several other dumps have all gotten under
  way, target file is created and increases until the hang.
 
  CTRL-C gets back to shell,eg:
 
DUMP: Date of this level 0 dump: Fri Jul 10 10:25:33 2009
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping snapshot of /dev/da0s1d (/usr) to standard output
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 1713942 tape blocks.
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
  ^C  DUMP: Interrupt received.
DUMP: Do you want to abort dump?: (yes or no) Killed by signal 2.
DUMP: Broken pipe
DUMP: The ENTIRE dump is aborted.
 
  Hangs always in Pass IV
 
 What's the output ps -auwwx|grep dump at the time of the dump.

 when the dump hangs:

 ps auxww | grep dump

 root61360  0.0  0.0  3128  1168  p0  I+1:47PM   0:00.06 /sbin/dump
 -0uanL -f - / (dump)

 root61361  0.0  0.1  5560  2768  p0  I+1:47PM   0:03.65 ssh
 x...@xxx.net dd of=/var/ftp/dump_images/mx1-root-test

 root61364  0.0  0.0  3128  1528  p0  I+1:47PM   0:00.36 dump:
 /dev/da0s1a: pass 4: 92.66% done, finished in 0:00 at Sun Jul 12 13:47:52
 2009 (dump)

procstat -k 61364 please?
Is the percentage always the same for the same disk?
If you kill dd on the other side, does dump notice it?
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump hangs on 7.1

2009-07-12 Thread Mel Flynn
On Sunday 12 July 2009 13:20:49 Len Conrad wrote:
 At 04:04 PM 7/12/2009, you wrote:
 On Sunday 12 July 2009 11:03:00 Len Conrad wrote:
  On Friday 10 July 2009 08:29:01 Len Conrad wrote:
   FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009
   r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
  
   CPU: Intel(R) Xeon(R) CPU   E5420  @ 2.50GHz (2496.26-MHz
   686-class CPU) Origin = GenuineIntel  Id = 0x1067a  Stepping = 10
 AMD Features=0x2010NX,LM
 AMD Features2=0x1LAHF
 Cores per package: 4
   real memory  = 3484745728 (3323 MB)
   avail memory = 3405537280 (3247 MB)
   ACPI APIC Table: DELL   PE_SC3  
   FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1
cpu2 (AP): APIC ID:  2
cpu3 (AP): APIC ID:  3
  
  
   /sbin/dump -0uanL -f - / | ssh dump_ima...@xxx.net dd
   of=/var/ftp/dump_images/mx1-root-test
  
   dump has completed only once. Several other dumps have all gotten
   under way, target file is created and increases until the hang.
  
   CTRL-C gets back to shell,eg:
  
 DUMP: Date of this level 0 dump: Fri Jul 10 10:25:33 2009
 DUMP: Date of last level 0 dump: the epoch
 DUMP: Dumping snapshot of /dev/da0s1d (/usr) to standard output
 DUMP: mapping (Pass I) [regular files]
 DUMP: mapping (Pass II) [directories]
 DUMP: estimated 1713942 tape blocks.
 DUMP: dumping (Pass III) [directories]
 DUMP: dumping (Pass IV) [regular files]
   ^C  DUMP: Interrupt received.
 DUMP: Do you want to abort dump?: (yes or no) Killed by signal
   2. DUMP: Broken pipe
 DUMP: The ENTIRE dump is aborted.
  
   Hangs always in Pass IV
  
  What's the output ps -auwwx|grep dump at the time of the dump.
 
  when the dump hangs:
 
  ps auxww | grep dump
 
  root61360  0.0  0.0  3128  1168  p0  I+1:47PM   0:00.06
  /sbin/dump -0uanL -f - / (dump)
 
  root61361  0.0  0.1  5560  2768  p0  I+1:47PM   0:03.65 ssh
  x...@xxx.net dd of=/var/ftp/dump_images/mx1-root-test
 
  root61364  0.0  0.0  3128  1528  p0  I+1:47PM   0:00.36 dump:
  /dev/da0s1a: pass 4: 92.66% done, finished in 0:00 at Sun Jul 12
  13:47:52 2009 (dump)
 
 procstat -k 61364 please?

 I ran it again, diff pid:

 procstat -k 67765
   PIDTID COMM TDNAME   KSTACK
 67765 100159 dump -mi_switch sleepq_switch
 sleepq_catch_signals sleepq_wait_sig _sleep sbwait soreceive_generic
 soreceive soo_read dofileread kern_readv read syscall Xint0x80_syscall

It looks like it's waiting ssh/dd to report. Is the same happening when you 
dump to a local file (on a different partition obviously)? This would rule out 
inter process communications within dump itself.

FYI, I'm using this daily through periodic with a few 7.1-STABLE machines and 
-current. Although, I do compress (with gzip and bzip2 on faster CPU's) before 
transfer. The only difference is that I don't use then -n flag to dump. Worth 
a try, though I doubt the so_receive it's waiting on is because it's unable to 
notify a human in the operator group.

If you're comfortable doing so, you could grab a 7.2-RELEASE livefs CD to see 
if this issue persists using the dump tools from there, though I don't know of 
any particular fixes in this area.

 Is the percentage always the same for the same disk?

 no, it varies widely.

 If you kill dd on the other side, does dump notice it?

 yes, I kill dd on the target, and the dump shows:

   DUMP: dumping (Pass IV) [regular files]
 Terminated
   DUMP: Broken pipe
   DUMP: The ENTIRE dump is aborted.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing MATLAB: /lib/libXp.so.6: ELF file OS ABI invalid

2009-07-12 Thread Mel Flynn
On Sunday 12 July 2009 11:34:52 Daniel Underwood wrote:
 During installation of Matlab, just after accepting the licnse
 agreement, I get this error:

 /home/daniel/matlab-install/update/bin/glnx86/xsetup: error while
 loading shared libraries: /lib/libXp.so.6: ELF file OS ABI invalid

 I even tried # brandelf -t Linux /compat/linux/lib/libXp.so.6 but I
 still get the same error.

 How do I fix this?

On Sunday 12 July 2009 15:26:59 Daniel Underwood wrote:
 FYI:

 I believe initially libXp.so.6 was not located in /compat/linux/lib/,
 so I copied it there from /usr/local/lib/.  I believe I also tried to
 brand the file, but before branding the file and after branding the
 file I get this same error message.

That explains a lot. Remove that file and install /usr/ports/x11/linux-xorg-
libs. The correct libXp.so.6 should then be installed.

The article could use a pre-requisite section though. It's not obvious to 
everyone that the linux emulation uses it's own Xorg.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD for a high school class? (long)

2009-07-12 Thread Mel Flynn
On Thursday 09 July 2009 07:07:19 Glen Barber wrote:
 Hi, Chris

 On Thu, Jul 9, 2009 at 10:58 AM, Chriseaglet...@hughes.net wrote:
  Sorry for the OT-ness of this. I only work with FreeBSD for servers.
  Have used it as the sole systems for a business since the late 1900s.
  Twice I've put up X-Windows machines but we never bothered to
  use them for one reason or another. Now my son's school is short
  computers for a High School HTML class I'm going to help teach
  this fall. The official teacher is excited about FreeBSD since we can
  use old equipment that is donated.
 
  There are two issues. We will not get enough FreeBSD systems up
  to cover all kids in the class. Some will have to use the 10.4/3 OS-X
  G3s we already have. For the remainder of systems, I've told them
  I need a minimum 256GB Ram, 500+Mhz, ~10GB hard drive. I will
  put Apache on both types of boxes so they have a testing platform,
  hope to put firefox on each so they have a consistent browser. The
  confusing thing will be Finder and Textedit, versus whatever I use for
  a window manager on the FreeBSD systems.
 
  The two questions are:
 
  1. Taking the specs into account, what is the window manager that
  will provide the closest match to the Apple desktop for mouse ops,
  browsing files/directories, and editing text files. I suppose I should
  add running Firefox (or a reasonable similar browser that will
  render HTML and execute Javascript identically).

 Although I will probably be lit on fire for this, I'd have to say KDE3
 would probably be the closest.  There even is the baghira theme, which
 mimics the OSX interface.  I haven't used either in over a year or so,
 however.

I remember running KDE3 with firefox-1 on a P-III 900 with 256MB, FBSD 4.x and 
window switching ('alt-tab') wasn't a joy, being in permanent swap. On the 
plus side, you could install Quanta, which is more geared to web development, 
but in default mode is just a fancy text editor with a file tree on the left-
hand side of the canvas.
I would however, go with firefox2, which is sufficient for your classes and 
firefox3 will have too much bloat. Opera-9.x is also something you should 
seriously consider, although part of it's speed comes from using memory 
aggressively so the 256MB might come into play. It's my primary browser at the 
moment and I have so far only reported 1 site that is unusable and I'm not 
sure it was Opera's fault to begin with (in case you're interested: 
http://www.newsagaya.com/ - hover the shop button).
I also had apache running (+ mysqld + php), all for local development. The key 
is to strip down anything fancy you don't need in the GUI and apache modules.
Additionally you could assign them an NFS directory and centralize apache on a 
server. It is trivial to assign www.$studentname.$class.lan to the webserver 
IP, mapping the vhost to the NFS directory. A bonus is that students would be 
able to see each others' work and better understand the client-server model 
that always comes into play with web development.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Install guide (Was: Re: Urgent help needed : portmaster dies on py-cairo)

2009-07-09 Thread Mel Flynn
On Wednesday 08 July 2009 19:45:05 Manish Jain wrote:

 ==
 Part-1)Immediately after a fresh FreeBSD-7.2#RELEASE install :

 I assume you will at some stage or the other install a linux port, eg
 acroread8 or acroread9, linux-ymessenger, etc. Incidentally, unless you
 have specific needs, prefer acroread8 over acroread9.

Adding to assumptions: one wants to use gnome as desktop.

 All following steps are to be executed as root.

 a)Make sure /etc/rc.conf has at least the following 5 lines.
 dbus_enable=YES
 hald_enable=YES
 polkitd_enable=YES
 gnome_enable=YES
 linux_enable=YES

 b)Make sure /boot/loader.conf has at least the following 3 lines.
 kern.maxdsiz=734003200

This is a) not needed and b) doesn't do anything useful, since the default 
will still be the compiled default, unless you also set kern.defdsiz. The only 
thing this does is allow the datasize limit to be raised to 700M, using 
limits(1), but since the default still is 512M an unaware application will 
still fail malloc(3) if allocating beyond 512M.

 linprocfs_load=YES
 linsysfs_load=YES

Which ports you mention require linsysfs?

 c)Make sure /etc/fstab has at least the following 3 lines.
 proc/proc   procfs
 rw00
 linproc /usr/compat/linux/proclinprocfsrw00
 linsys   /usr/compat/linux/sys  linsysfs  rw0
  0

Better to use /compat/linux/*. While by default it resides on /usr, it is 
convenient to be able to change the symlink, for example to test a new 
linux_base port without wiping the current one or to free up space on the /usr 
partition.

 d)Upgrage from python25 to python26 along with all dependent ports
 as follows :

 rm -rf /usr/ports 2/dev/null

Or you can simply not install the ports distribution, since this is the first 
thing you do. I also don't understand why you install a boatload of packages 
from CD/DVD only to complicate things by upgrading by my estimate at least 
70%. Why not just portsnap and build the leafs?

 mkdir -p /usr/ports/distfiles
 portsnap fetch extract
 cd  /usr/ports/ports-mgmt/portupgrade
 make deinstall  2/dev/null
 make install clean
 portupgrade -C -r -o  lang/python26  lang/python25
 portupgrade -rfx python26 python26
 pkgdb -F

 Before doing anything further, reboot.

This needs a reason. I don't know any.

 Immediately after reboot, execute
 Part-2.


 Part-2) Steps to be followed whenever a significant number new
 ports/patches are available and you need to ensure your ports as well as
 your ports directory are up to date :

 thisdate=`date +%Y-%m-%n`
I assume that's %d, since %n is a newline.

 rm  /root/portupgrade-${thisdate}.log 2/dev/null
 portsnap fetch update
 portupgrade -ace -uRl  /root/portupgrade-${thisdate}.log
 pkgdb -F

 Note : If you plan to install any linux ports, you should have said yes
 to 'Linux binary compatibility' at the time you installed FreeBSD. If
 you didn't, the very first port you need to build is
 emulators/linux_base-fc4

If you use net/skype you will need linux_base-fc6, so again using sysinstall 
can be a problem.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FixIt CD Tool Availability

2009-07-09 Thread Mel Flynn
On Saturday 04 July 2009 11:06:52 Michel Talon wrote:
 Drew Tomlinson wrote:
  The command 'gmirror label root ad8a ad6a' does not return an error but
  no device is created in /dev/mirror
 
  The command 'zpool create data  raid1z ad14d ad12d ad8d ad6d' gives me
  an error about the ZFS library being unavailable.
 
  Are these tools supposed to work when using the Fix It CD?  If not, does
  7.2-RELEASE-amd64-disc1.iso have these tools?

 One can load kernel modules from the fixit cdrom, but as far as i
 remember this requires some manipulations.

snip chrooting to /mnt2 and redoing shell env

The manipulation is far simpler:
sysctl kern.module_path=/dist/boot/kernel

It's so simple, I don't know why it's not set in the fixit shell. And after 
battling with gmirror and a faulty IDE cable last weekend, I really hated 
typing it.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: vde qemu write: No buffer space available

2009-06-30 Thread Mel Flynn
On Friday 26 June 2009 10:04:13 Adam Vande More wrote:
 I'm having issues with high network throughput with vde and qemu.  There
 are two qemu vm's each running debian lenny and they are configured for
 drbd. The vm's work fine until drbd is started then the networking fails. 
 The only message I get(on the host side) is

 write: No buffer space available

It can be a driver issue, but the error message is somewhat misleading as it 
can be the result of an ill-configured firewall rule. Typically this happens 
when no state exists for the outgoing connection.

 which is echoed to console, and nothing appears in the logs.  I believe
 this to be an issue with vde, but I can't be certain because I can't seem
 to find any way to turn on more extensive logging.  Anyone have an idea how
 to resolve this?

You should check netstat -m to make sure there are mbufs available and if 
there is check your firewall. If all seems ok, try freebsd-net list for any 
known issues, since you didn't get any me too's here. You may want to 
specify a bit more info, like pciconf -lv for the vde device, vmstat -i at the 
time of the errors, ifconfig vde0 output and any firewall information 
(including I don't have one or error persists if firewall is disabled).
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libtool shared

2009-06-29 Thread Mel Flynn
On Sunday 28 June 2009 14:18:54 alexus wrote:

 ltconfig:432: gcc -E conftest.c
 ltconfig:547: checking if gcc PIC flag -fPIC works
 ltconfig:548: gcc -c  -fPIC -DPIC  conftest.c 15
 ltconfig:591: checking if gcc static flag -static works
 ltconfig:592: gcc -o conftest-static conftest.c  15
 ltconfig:624: checking for ld used by GCC
 GNU ld version 2.15 [FreeBSD] 2004-05-23
 ltconfig:971: checking if global_symbol_pipe works
 ltconfig:972: gcc -c   conftest.c 15
 ltconfig:975: eval /usr/bin/nm -B conftest.o | sed -n -e 's/^.*
 [ABCDGISTUW] \([_A-Za-z][_A-Za-z0-9]*\)$/\1 \1/p'  conftest.nm
 ltconfig:1033: gcc -o conftest  -fno-builtin   conftest.c conftestm.o 15

It stops here? It should give a reason and configure should continue 
eventually. Or did you CTRL-C the process and output didn't end up in the file 
yet? Let the entire configure run through, then inspect config.log where 
configure eventually says it's unable to build shared libraries.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: named startup problems upgrading from 7.1p4 to 7.1p5 or 7.1p6

2009-06-28 Thread Mel Flynn
On Sunday 28 June 2009 03:24:26 Ian wrote:

 I tried adding various echo statements to /etc/rc.d/named and found that
 the script seems to run right through.

rc_debug=YES in /etc/rc.conf is REALLY handy for this.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libtool shared

2009-06-28 Thread Mel Flynn
On Sunday 28 June 2009 12:40:24 alexus wrote:

 company policy not too use ports, any other suggestions?

Understand GNU autotools in detail, the patches for it in the respective
ports, how to read config.log and whether all this is worth compliance to
company policy.
Note: the above requires at least two weeks of non-productive self-education
on the boss' clock, judging from the fact you post configure output, rather
then config.log snippets (without being judgmental or condescending: it shows
you are just starting with the GNU autotools experience). Recently
Giorgos posted a nice summary of what you'd need to learn [1].

Of course, I'm presuming installing/maintaining software is something that
belongs to your daily tasks. If you only need to fix this specific problem,
we would need output from config.log around the lines where it says it can't
build shared libs.

[1] http://www.freebsd.org/cgi/mid.cgi?db=midid=87hbyk6h02@kobe.laptop
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


<    1   2   3   4   5   6   7   8   9   10   >