Re: x11/xfce ssh-agent once per logon for minimal (no gnome/kde) installation

2010-06-04 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/06/2010 24:39:46, Steve Franks wrote:
 I'm totally lost.  What I desire is to put in my passphrase for my
 public key(s) when I logon to my box.  Since I usually install from
 ports and use xfce, I have no infrastructure for this, and I'm getting
 nowhere fast.  My Fedora box popped up a nice little enter
 passphrase box the very first time I ssh'd to my server, and now it
 'just works'.  My FreeBSD boxes (which are many - everything *but* the
 laptop with Fedora), 'just don't work'.  I've installed everything
 with 'ssh'  and either 'key' or 'agent' in the name from
 ports/security, and gone through the manpages, and tweaked countless
 environment variables, but every time I ssh on a FreeBSD box, it
 stubbornly locates the terminal I started any gui's from (i.e. meld +
 bzr), and asks for the passphrase a great many times daily.  Add that
 I've started my gui with meld (so as to continue using said terminal
 - don't love 'panels', 'choosers', 'menus', etc - guis are for word
 processors and file managers, not desktops), I can't even type in the
 passphrase there.  I  generally like using FreeBSD caveman style, but
 this is starting to drive me nuts.  No meld/bzr==no work from home==no
 happiness ;)
 
 Anyone have a 'standard' / FreeBSD-friendly best-practices for this?
 I think I'm just cluttering up my system here.

The problem you have is that you need to start ssh-agent(1) somewhere
very early in your login process, so that your entire desktop
environment can inherit all the necessary ssh-agent settings.

Exactly what to do depends on how you get into X11.  If you run
startx(1) manually when you want to switch from console to X11 then you
need to edit your ~/.xinitrc

Alternatively, if you use a display manager like xdm(1) -- ie. there's
an X based graphical login -- then you have two choices: edit your
~/.xsession or tweak the pam configuration for your login manager.

If you want to go the 'edit .xinitrc or .xsession' route then you need
to do basically the same thing for either of those two files.  They're
pretty much just scripts that start up the initial X applications for
your login session: practically speaking, that means starting up your
window manager.  It's possible you don't have either of those files
explicitly in your account: in either case the system will run a
standard default script if it can't find a user specific version.

The .xinitrc or .xsession file should look something like this:

#!/bin/sh

# Import user environment settings
. ${HOME}/.profile

eval $( ssh-agent -s )

# Eg. pop up an xterm so you can enter your ssh passphrase
xterm -geometry 80x24-91+0 -e /usr/bin/ssh-add -c ${HOME}/.ssh/id_rsa 

# Note: no '' -- this should run in the foreground
xfce

eval $( ssh-agent -k )
#
# That's All Folks!
#

This is just a rough outline, which you should adapt to your own needs
- -- in particular there are nicer apps you can use for entering a
passphrase.  Also note that you can probably omit that bit from the
.xinitrc or .xsession and have your window manager run it.  In any case,
the important bits are the two 'eval' lines bracketing the
window-manager startup.

The other possibility -- which is only available if you are using a
display manager like xdm(1) -- is tweaking the pam settings.  For xdm,
edit the file /etc/pam.d/xdm and uncomment the two lines mentioning
pam_ssh.  Now you will be able to log into your system via xdm using
your ssh passphrase, and xdm will start up ssh-agent for your session
and add your key to it.  Different display managers will have their own
pam.d files (either in /etc/pam.d or in /usr/local/etc/pam.d) but you
should be able to make equivalent changes there -- either uncomment or
add pam_ssh lines in the auth or session sections.

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwIo58ACgkQ8Mjk52CukIxm/ACgjwPTgJjq8YjN/e1uwD9be2xj
vBcAoIQ8aP+1pyV/050ooHCr9yUFjuXh
=S7kV
-END PGP SIGNATURE-
___
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: .sh getopts

2010-06-04 Thread Steve Bertrand
On 2010.06.04 00:35, Aiza wrote:
 Have this code
 
 shift; while getopts :ugr: arg; do case ${arg} in
u) action=freebsd-update;;
g) action=freebsd-upgrade;;
r) action=freebsd-rollback;;
?) exerr ${cmd_usage};;
 esac; done; shift $(( ${OPTION} -1 ))
 
 
 Command being executed looks like this, cmd action -flags  
 
 Only a single -flag in allowed on the command.

Here's my obligatory use Perl;

# it's a dirty hack out of a util script I use that calls
# methods out of a module. 99% of the code has been stripped,
# so forgive me, especially for the dirty arg count check ;)

# save file to test.pl
# chmod 755 test.pl
# Examples:

#  Help:
#  ./test.pl --help
#  ./test.pl -h

# Man page:
#  ./test.pl --man
#  ./test.pl -M

 copy/paste below this line, until _END_
#!/usr/bin/perl

use strict;
use warnings;

use Getopt::Long;
Getopt::Long::Configure qw( bundling );
use Pod::Usage;

if ( $#ARGV  0 ) {

my $arg_num = $#ARGV +1 ;
print \nYou supplied $arg_num args, when only one is allowed\n\n;

die See $0 -h\n\n;
}

my ( $help, $man ) = 0;

my $result = GetOptions(
'update|u'  = \update,
'upgrade|g' = \upgrade,
'rollback|r'= \rollback,
'help|h'= \$help,
'man|M' = \$man,
);

# begin pod2usage

pod2usage({ -verbose = 1 }) if $help;
pod2usage({ -verbose = 2 }) if $man;

sub update {

print We're updating!\n;

# do something fancy here..
exit;
}

sub upgrade
{

print We're upgrading!\n;
# more fancy stuff...
exit;
}

sub rollback {

print Ensure you have a backup, we're rolling back!\n;
# uber fancy!!!
exit;
}



=head1 NAME

perform_maintenance - Do maintenance on FreeBSD

=head1 SYNOPSIS

  # Do update

  ./test.pl --update
  ./test.pl -u

  # Do upgrade

  ./test.pl --upgrade
  ./test.pl -g

  # Do a rollback

  ./test.pl --rollback
  ./test.pl -r

  # display help

  ./test.pl --help
  ./test.pl -h

  # display the manual page

  ./test.pl --man
  ./test.pl -M



=head1 OPTIONS

=over 1



=item --update | -u

Do an update... this example simply outputs 'Update' to STDOUT.



=item --upgrade | -g

Do an upgrade... this example simply outputs 'Upgrade' to STDOUT.



=item --rollback | -r

Perform a rollback... again, of course, we only print out jibberish



=back

=head1 DESCRIPTION

This is a copy/paste of a real-life Perl application that has been
cleared out of all useful code, so it could be used as an example.

It is however an extremely handy framework for accepting both the long
and short forms of parameters, and the perldoc inclusion allows one to
dump 'error' (or more favourably put) help pages onto STDOUT for the user.

=cut

__END__
___
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: .sh getopts

2010-06-04 Thread Aiza






Steve Bertrand wrote:

On 2010.06.04 00:35, Aiza wrote:

Have this code

shift; while getopts :ugr: arg; do case ${arg} in
   u) action=freebsd-update;;
   g) action=freebsd-upgrade;;
   r) action=freebsd-rollback;;
   ?) exerr ${cmd_usage};;
esac; done; shift $(( ${OPTION} -1 ))


Command being executed looks like this, cmd action -flags  

Only a single -flag in allowed on the command.


Here's my obligatory use Perl;

# it's a dirty hack out of a util script I use that calls
# methods out of a module. 99% of the code has been stripped,
# so forgive me, especially for the dirty arg count check ;)

# save file to test.pl
# chmod 755 test.pl
# Examples:

#  Help:
#  ./test.pl --help
#  ./test.pl -h

# Man page:
#  ./test.pl --man
#  ./test.pl -M

 copy/paste below this line, until _END_
#!/usr/bin/perl

use strict;
use warnings;

use Getopt::Long;
Getopt::Long::Configure qw( bundling );
use Pod::Usage;

if ( $#ARGV  0 ) {

my $arg_num = $#ARGV +1 ;
print \nYou supplied $arg_num args, when only one is allowed\n\n;

die See $0 -h\n\n;
}

my ( $help, $man ) = 0;

my $result = GetOptions(
'update|u'  = \update,
'upgrade|g' = \upgrade,
'rollback|r'= \rollback,
'help|h'= \$help,
'man|M' = \$man,
);

# begin pod2usage

pod2usage({ -verbose = 1 }) if $help;
pod2usage({ -verbose = 2 }) if $man;

sub update {

print We're updating!\n;

# do something fancy here..
exit;
}

sub upgrade
{

print We're upgrading!\n;
# more fancy stuff...
exit;
}

sub rollback {

print Ensure you have a backup, we're rolling back!\n;
# uber fancy!!!
exit;
}



=head1 NAME

perform_maintenance - Do maintenance on FreeBSD

=head1 SYNOPSIS

  # Do update

  ./test.pl --update
  ./test.pl -u

  # Do upgrade

  ./test.pl --upgrade
  ./test.pl -g

  # Do a rollback

  ./test.pl --rollback
  ./test.pl -r

  # display help

  ./test.pl --help
  ./test.pl -h

  # display the manual page

  ./test.pl --man
  ./test.pl -M



=head1 OPTIONS

=over 1



=item --update | -u

Do an update... this example simply outputs 'Update' to STDOUT.



=item --upgrade | -g

Do an upgrade... this example simply outputs 'Upgrade' to STDOUT.



=item --rollback | -r

Perform a rollback... again, of course, we only print out jibberish



=back

=head1 DESCRIPTION

This is a copy/paste of a real-life Perl application that has been
cleared out of all useful code, so it could be used as an example.

It is however an extremely handy framework for accepting both the long
and short forms of parameters, and the perldoc inclusion allows one to
dump 'error' (or more favourably put) help pages onto STDOUT for the user.



Steve Bertrand  as the subject says .sh not perl.


___
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


portsnap refuse

2010-06-04 Thread Fbsd1
The postsnap says adding refuse statements to select the parts of the 
port tree you have use for will shorten the download process and 
conserve disk space on your host. That only the port categories not 
REFUSED will be selected and compressed for download.


Well for a test I ran portsnap with out any portsnap.conf file. The 
download process took 16 minuets. The I mv portsnap.conf.sample to 
portsnap.conf  and added REFUSE for all the categories except sysutils.


Reran the portsnap and still it took 16 minuets.

What gives here??
___
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


/var/empty has schg flag turned on. Why?

2010-06-04 Thread Fbsd1
Why does the base RELEASE have schg flag turned for the /var/empty 
directory?


Is that directory really used for anything?

Is this a release build problem?
___
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: Sluggish Apache Server

2010-06-04 Thread CyberLeo Kitsana
On 06/03/2010 03:23 PM, Barry Steyn wrote:
 Hi guys,
 
 We're having a serious problem here with our live server, it's very
 sluggish all of a sudden. The problem is that Apache is *really* slow
 responding to https requests but still fairly quick on http.

Running out of entropy, perhaps? Public-key encryption needs quite a lot
to function securely.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
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: /var/empty has schg flag turned on. Why?

2010-06-04 Thread CyberLeo Kitsana
On 06/04/2010 02:59 AM, Fbsd1 wrote:
 Why does the base RELEASE have schg flag turned for the /var/empty
 directory?
 
 Is that directory really used for anything?
 
 Is this a release build problem?

Certain daemons will chroot(2) to that directory to perform sensitive
privilege-separation operations, or when they know they will not need to
interact with the filesystem to perform their duties. The directory must
remain empty to ensure the operation is secure.

The best way to ensure no files are accidentally or intentionally
created there is to set it schg, which forbids any changes to the
directory (such as linking a file there).

-- 
Fuzzy love,
-CyberLeo
Furry Peace! - http://www.fur.com/peace/
___
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


hal-0.5.14_7 to _8 upgrade problem

2010-06-04 Thread n dhert
I have a problem with upgrading hal-0.5.14_7 to hal-0.5.14_8

how to solve this?
---
cc -DHAVE_CONFIG_H -I. -I../../..
-DPACKAGE_SYSCONF_DIR=\/usr/local/etc\ -D
PACKAGE_DATA_DIR=\/usr/local/share\
-DPACKAGE_BIN_DIR=\/usr/local/bin\ -
DPACKAGE_LOCALE_DIR=\/usr/local/share/locale\
-DPACKAGE_LOCALSTATEDIR=\/va
r\ -I../../.. -I/usr/local/include/dbus-1.0
-I/usr/local/include/dbus-1.0/incl
ude   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall
-Wchar-subscrip
ts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align
-Wsign-c
ompare -MT probe-hiddev.o -MD -MP -MF .deps/probe-hiddev.Tpo -c -o
probe-hiddev.
o probe-hiddev.c^M
probe-hiddev.c: In function 'main':^M
probe-hiddev.c:81: error: 'USB_GET_REPORT_ID' undeclared (first use in this
func
tion)^M
probe-hiddev.c:81: error: (Each undeclared identifier is reported only
once^M
probe-hiddev.c:81: error: for each function it appears in.)^M
gmake[5]: *** [probe-hiddev.o] Error 1^M
gmake[5]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
d/probing'^M
gmake[4]: *** [all-recursive] Error 1^M
gmake[4]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
d'^M
gmake[3]: *** [all-recursive] Error 1^M
gmake[3]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
gmake[2]: *** [all] Error 2^M
gmake[2]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
gmake[1]: *** [all-recursive] Error 1^M
gmake[1]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14'^M
gmake: *** [all] Error 2^M
*** Error code 1^M
^M
Stop in /usr/ports/sysutils/hal.^M
---  Build of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
(consumed
00:00:31)
---  Upgrade of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
(consume
d 00:00:31)
___
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


ncurses

2010-06-04 Thread Chip Camden
Thanks to some help from Joel Dahl on the mutt-users list, I was able to
restore correct color support in my mutt installation.  But it raises a
question about ncurses.

It seems that building mutt with the devel/ncurses port installed creates
the problem I was experiencing: most colors do not show up in mutt, and
the line-drawing characters are borked.  Deinstalling devel/ncurses and
rebuilding mutt with the base version of ncurses solves the problem.

However, x11/rxvt-unicode depends on devel/ncurses, so any time urxvt
needs rebuilding we get devel/ncurses reinstalled.  Any subsequent rebuild
of mutt restores the original problem.

Is there any way to sort this out?

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
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: ncurses

2010-06-04 Thread Chip Camden
On Jun 04 2010 17:30, sghctoma wrote:
 not exactly a solution, rather a workaround, but you can build mutt
 with s-lang (WITH_MUTT_SLANG=YES) instead of ncurses.. it works for
 me..

Thanks for the tip.  I'm not sure if I'll go that route, but I'm copying
your response to the list for posterity's sake.

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
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: ncurses

2010-06-04 Thread Roland Smith
On Fri, Jun 04, 2010 at 08:02:34AM -0700, Chip Camden wrote:
 
 It seems that building mutt with the devel/ncurses port installed creates
 the problem I was experiencing: most colors do not show up in mutt, and
 the line-drawing characters are borked.  Deinstalling devel/ncurses and
 rebuilding mutt with the base version of ncurses solves the problem.
 
 However, x11/rxvt-unicode depends on devel/ncurses, so any time urxvt
 needs rebuilding we get devel/ncurses reinstalled.  Any subsequent rebuild
 of mutt restores the original problem.
 
 Is there any way to sort this out?

You could build mutt with 'slang' support instead of ncurses. Put the
following in /etc/make.conf:

.if ${.CURDIR:M*/mail/mutt}
WITH_MUTT_SLANG=yes
.endif

OTOH, I'm using mutt-devel built with the system ncurses library
(libncursesw.so.8) in an rxvt-unicode terminal window without problems. I do
have 'LANG=en_US.UTF-8' and 'LC_ALL=en_US.UTF-8' set in my environment, 'set
charset=utf-8' in my ~/.muttrc and am using the
'Rxvt*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1' font
set in ~/.Xresources. 

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgp8ZafMXUfaB.pgp
Description: PGP signature


Re: x11/xfce ssh-agent once per logon for minimal (no gnome/kde) installation

2010-06-04 Thread Steve Franks
On Thu, Jun 3, 2010 at 11:56 PM, Matthew Seaman
m.sea...@infracaninophile.co.uk wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 04/06/2010 24:39:46, Steve Franks wrote:
 I'm totally lost.  What I desire is to put in my passphrase for my
 public key(s) when I logon to my box.  Since I usually install from
 ports and use xfce, I have no infrastructure for this, and I'm getting
 nowhere fast.  My Fedora box popped up a nice little enter
 passphrase box the very first time I ssh'd to my server, and now it
 'just works'.  My FreeBSD boxes (which are many - everything *but* the
 laptop with Fedora), 'just don't work'.  I've installed everything
 with 'ssh'  and either 'key' or 'agent' in the name from
 ports/security, and gone through the manpages, and tweaked countless
 environment variables, but every time I ssh on a FreeBSD box, it
 stubbornly locates the terminal I started any gui's from (i.e. meld +
 bzr), and asks for the passphrase a great many times daily.  Add that
 I've started my gui with meld (so as to continue using said terminal
 - don't love 'panels', 'choosers', 'menus', etc - guis are for word
 processors and file managers, not desktops), I can't even type in the
 passphrase there.  I  generally like using FreeBSD caveman style, but
 this is starting to drive me nuts.  No meld/bzr==no work from home==no
 happiness ;)

 Anyone have a 'standard' / FreeBSD-friendly best-practices for this?
 I think I'm just cluttering up my system here.

 The problem you have is that you need to start ssh-agent(1) somewhere
 very early in your login process, so that your entire desktop
 environment can inherit all the necessary ssh-agent settings.

 Exactly what to do depends on how you get into X11.  If you run
 startx(1) manually when you want to switch from console to X11 then you
 need to edit your ~/.xinitrc

 Alternatively, if you use a display manager like xdm(1) -- ie. there's
 an X based graphical login -- then you have two choices: edit your
 ~/.xsession or tweak the pam configuration for your login manager.

 If you want to go the 'edit .xinitrc or .xsession' route then you need
 to do basically the same thing for either of those two files.  They're
 pretty much just scripts that start up the initial X applications for
 your login session: practically speaking, that means starting up your
 window manager.  It's possible you don't have either of those files
 explicitly in your account: in either case the system will run a
 standard default script if it can't find a user specific version.

 The .xinitrc or .xsession file should look something like this:

 #!/bin/sh

 # Import user environment settings
 . ${HOME}/.profile

 eval $( ssh-agent -s )

 # Eg. pop up an xterm so you can enter your ssh passphrase
 xterm -geometry 80x24-91+0 -e /usr/bin/ssh-add -c ${HOME}/.ssh/id_rsa 

 # Note: no '' -- this should run in the foreground
 xfce

 eval $( ssh-agent -k )
 #
 # That's All Folks!
 #

 This is just a rough outline, which you should adapt to your own needs
 - -- in particular there are nicer apps you can use for entering a
 passphrase.  Also note that you can probably omit that bit from the
 .xinitrc or .xsession and have your window manager run it.  In any case,
 the important bits are the two 'eval' lines bracketing the
 window-manager startup.

 The other possibility -- which is only available if you are using a
 display manager like xdm(1) -- is tweaking the pam settings.  For xdm,
 edit the file /etc/pam.d/xdm and uncomment the two lines mentioning
 pam_ssh.  Now you will be able to log into your system via xdm using
 your ssh passphrase, and xdm will start up ssh-agent for your session
 and add your key to it.  Different display managers will have their own
 pam.d files (either in /etc/pam.d or in /usr/local/etc/pam.d) but you
 should be able to make equivalent changes there -- either uncomment or
 add pam_ssh lines in the auth or session sections.

        Cheers,

        Matthew

 - --
 Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
 JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkwIo58ACgkQ8Mjk52CukIxm/ACgjwPTgJjq8YjN/e1uwD9be2xj
 vBcAoIQ8aP+1pyV/050ooHCr9yUFjuXh
 =S7kV
 -END PGP SIGNATURE-



Ah, sometimes you're just a command away!  I'm surprised I couldn't
google this (too many ssh examples, all the x11+agent ones must be
hidden).

So for posterity, this is the relevant portion of .xinitrc file:
...
export SSH_ASKPASS=/usr/local/bin/x11-ssh-askpass ;export SSH_ASKPASS
eval $( ssh-agent -s )
ssh-add 
xfce4-session
eval $( ssh-agent -k )


I was using exec xfce4-session as in most of the examples for
.xinitrc files, which seemed to be mucking things up - ditching the

Re: x11/xfce ssh-agent once per logon for minimal (no gnome/kde) installation

2010-06-04 Thread Steve Franks
On Fri, Jun 4, 2010 at 9:07 AM, Steve Franks bahamasfra...@gmail.com wrote:
 On Thu, Jun 3, 2010 at 11:56 PM, Matthew Seaman
 m.sea...@infracaninophile.co.uk wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 04/06/2010 24:39:46, Steve Franks wrote:
 I'm totally lost.  What I desire is to put in my passphrase for my
 public key(s) when I logon to my box.  Since I usually install from
 ports and use xfce, I have no infrastructure for this, and I'm getting
 nowhere fast.  My Fedora box popped up a nice little enter
 passphrase box the very first time I ssh'd to my server, and now it
 'just works'.  My FreeBSD boxes (which are many - everything *but* the
 laptop with Fedora), 'just don't work'.  I've installed everything
 with 'ssh'  and either 'key' or 'agent' in the name from
 ports/security, and gone through the manpages, and tweaked countless
 environment variables, but every time I ssh on a FreeBSD box, it
 stubbornly locates the terminal I started any gui's from (i.e. meld +
 bzr), and asks for the passphrase a great many times daily.  Add that
 I've started my gui with meld (so as to continue using said terminal
 - don't love 'panels', 'choosers', 'menus', etc - guis are for word
 processors and file managers, not desktops), I can't even type in the
 passphrase there.  I  generally like using FreeBSD caveman style, but
 this is starting to drive me nuts.  No meld/bzr==no work from home==no
 happiness ;)

 Anyone have a 'standard' / FreeBSD-friendly best-practices for this?
 I think I'm just cluttering up my system here.

 The problem you have is that you need to start ssh-agent(1) somewhere
 very early in your login process, so that your entire desktop
 environment can inherit all the necessary ssh-agent settings.

 Exactly what to do depends on how you get into X11.  If you run
 startx(1) manually when you want to switch from console to X11 then you
 need to edit your ~/.xinitrc

 Alternatively, if you use a display manager like xdm(1) -- ie. there's
 an X based graphical login -- then you have two choices: edit your
 ~/.xsession or tweak the pam configuration for your login manager.

 If you want to go the 'edit .xinitrc or .xsession' route then you need
 to do basically the same thing for either of those two files.  They're
 pretty much just scripts that start up the initial X applications for
 your login session: practically speaking, that means starting up your
 window manager.  It's possible you don't have either of those files
 explicitly in your account: in either case the system will run a
 standard default script if it can't find a user specific version.

 The .xinitrc or .xsession file should look something like this:

 #!/bin/sh

 # Import user environment settings
 . ${HOME}/.profile

 eval $( ssh-agent -s )

 # Eg. pop up an xterm so you can enter your ssh passphrase
 xterm -geometry 80x24-91+0 -e /usr/bin/ssh-add -c ${HOME}/.ssh/id_rsa 

 # Note: no '' -- this should run in the foreground
 xfce

 eval $( ssh-agent -k )
 #
 # That's All Folks!
 #

 This is just a rough outline, which you should adapt to your own needs
 - -- in particular there are nicer apps you can use for entering a
 passphrase.  Also note that you can probably omit that bit from the
 .xinitrc or .xsession and have your window manager run it.  In any case,
 the important bits are the two 'eval' lines bracketing the
 window-manager startup.

 The other possibility -- which is only available if you are using a
 display manager like xdm(1) -- is tweaking the pam settings.  For xdm,
 edit the file /etc/pam.d/xdm and uncomment the two lines mentioning
 pam_ssh.  Now you will be able to log into your system via xdm using
 your ssh passphrase, and xdm will start up ssh-agent for your session
 and add your key to it.  Different display managers will have their own
 pam.d files (either in /etc/pam.d or in /usr/local/etc/pam.d) but you
 should be able to make equivalent changes there -- either uncomment or
 add pam_ssh lines in the auth or session sections.

        Cheers,

        Matthew

 - --
 Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
 JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkwIo58ACgkQ8Mjk52CukIxm/ACgjwPTgJjq8YjN/e1uwD9be2xj
 vBcAoIQ8aP+1pyV/050ooHCr9yUFjuXh
 =S7kV
 -END PGP SIGNATURE-



 Ah, sometimes you're just a command away!  I'm surprised I couldn't
 google this (too many ssh examples, all the x11+agent ones must be
 hidden).

 So for posterity, this is the relevant portion of .xinitrc file:
 ...
 export SSH_ASKPASS=/usr/local/bin/x11-ssh-askpass ;export SSH_ASKPASS
 eval $( ssh-agent -s )
 ssh-add 
 xfce4-session
 eval $( ssh-agent -k )
 

 I was using exec xfce4-session as in 

Some GMirror questions.

2010-06-04 Thread Peter Clark

Hello All,

There are a number of gmirror resources available online but there are a 
few discrepancies. I thought someone here might be able to shed some 
light on them. Also, this is on FreeBSD 8.0 RELEASE.


Does creating the mirror need to be done from a Livefs CD (in Fixit 
mode) or can it be done directly from the OS? The Handbook makes no 
reference to things like:


# Install FreeBSD on to ad0.
# Reboot with the Install CD.
# Enter Fixit mode.
 chroot /dist
 mount -t devfs devfs /dev
 gmirror load
 gmirror label -v -b round-robin gm0 /dev/ad0
 mount /dev/mirror/gm0s1a /mnt
 echo geom_mirror_load=YES  /mnt/boot/loader.conf

It just indicates jumping right in with gmirror label from the OS (at 
least it seems to).



Also, these next 2 entries in /etc/rc.conf. The Handbook does not make 
any mention of them. The way the authors state their purpose it would 
seem as though that should be done in all cases of disk mirroring. Is 
that true?


# tell the system that the swap file will be on a mirror, not a raw drive.
 echo ’swapoff=”YES”‘  /mnt/etc/rc.conf

# need to do this to make dumping cores happy since it won’t use a 
gmirror’ed drive

dumpdev=”NO”


Lastly, I know at one point the 'load' algorithm had some performance 
problems and people were saying to only use 'round-robin'. It seems as 
though some code was committed back in Dec 2009 to fix it's this. Is 
there a practical rule of thumb to using 'load' vs 'round-robin'? Is 
this an accurate way to look at it?
Round-robin because if you have two disks in a mirror, they’re both 
under the same 'load' constraints, and it is best to KISS.



Cheers,
Peter
___
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


[sterl...@camdensoftware.com: Re: ncurses]

2010-06-04 Thread Chip Camden
On Jun 04 2010 19:24, Roland Smith wrote:
 On Fri, Jun 04, 2010 at 10:12:12AM -0700, Chip Camden wrote:
  
  Thanks for all the info, but i get the same results in mutt-devel as I do
  in mutt.  WITH_MUTT_SLANG didn't seem to take either.
  
  Is there a way to specify that mutt should use the system ncurses instead
  of devel/ncurses?
 
 Looking at the port's Makefile, it depends on the system ncurses library if
 neither WITH_SLANG nor WITH_NCURSES_PORT is set. But it could still link to
 the port's library if that is first in the link path.
 
 If you build rxvt-unicode with the TERMINFO option switched OFF, urxvt-unicode
 does not depend on devel/ncurses. If you then de-install devel/ncurses and
 recompile mutt, it must use the system library.
 
 But in my experience, using a wrong font, or setting the wrong LANG or LC_ALL
 in the environment is more likely to screw things up.
 
 Roland
 -- 
 R.F.Smith   http://www.xs4all.nl/~rsmith/
 [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
 pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

Thank you -- I should have read the Makefile myself.  It was WITH_SLANG,
not WITH_MUTT_SLANG.  That solves the problem, and has the added benefit
of being able to use my default text color (SpringGreen) instead of
having to stick to the 8 normal colors.

I thought that might have also opened up urxvt's 256-color support, but
mutt still thinks I have only 8 colors.  At least I can default to my
urxvt settings for normal text, though.

Thanks again for your help!

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
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: .sh getopts

2010-06-04 Thread Robert Bonomi

m
 From owner-freebsd-questi...@freebsd.org  Thu Jun  3 23:36:28 2010
 Date: Fri, 04 Jun 2010 12:35:56 +0800
 From: Aiza aiz...@comclark.com
 To: questi...@freebsd.org questi...@freebsd.org
 Cc: 
 Subject: .sh  getopts

 Have this code

 shift; while getopts :ugr: arg; do case ${arg} in
 u) action=freebsd-update;;
 g) action=freebsd-upgrade;;
 r) action=freebsd-rollback;;
 ?) exerr ${cmd_usage};;
 esac; done; shift $(( ${OPTION} -1 ))


 Command being executed looks like this, cmd action -flags  

 Only a single -flag in allowed on the command.

 $# gives a count of parms ie:  . in this example a count of 2.

 I am looking for something to check that holds the number of flags on 
 the command. so I can code. if flag_count gt 1 = error

 Is there such a thing created by getopts?

Why bother??

 flag_count=0
 shift; while getopts :ugr: arg
   if flag_count = 1; then
 exerr ${cmd_usage}
   fi 
   flag_count=1;
   do case ${arg} in
   {{blah-blah}}

___
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: portsnap refuse

2010-06-04 Thread Lowell Gilbert
Fbsd1 fb...@a1poweruser.com writes:

 The postsnap says adding refuse statements to select the parts of the
 port tree you have use for will shorten the download process and
 conserve disk space on your host. That only the port categories not
 REFUSED will be selected and compressed for download.

You are paraphrasing here.
I'm not clear whether your paraphrase is accurate.  
It's certainly making some assumptions that are
not explicitly laid out in the manual page.

 Well for a test I ran portsnap with out any portsnap.conf file. The
 download process took 16 minuets. The I mv portsnap.conf.sample to
 portsnap.conf  and added REFUSE for all the categories except
 sysutils.

 Reran the portsnap and still it took 16 minuets.

 What gives here??

You could check whether the REFUSEd parts are getting updated after all,
then you could check whether they're in the downloaded snapshot.

My tech support crystal ball predicts that you will find your REFUSE
entries aren't really matching.  Could be wrong, but at least the tests
I suggested would point you in the right direction if it's right.
___
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


Alternate method for fetching source

2010-06-04 Thread Ross Penner
I'm trying to update my system and when I run cvsup, the connection
repeatedly has problems (TreeList failed: Network write failure:
Connection closed). I'm wondering if anybody can suggest any other
method to grab the current source files?

Thanks for any ideas
___
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: hal-0.5.14_7 to _8 upgrade problem

2010-06-04 Thread Lowell Gilbert
n dhert ndhert...@gmail.com writes:

 I have a problem with upgrading hal-0.5.14_7 to hal-0.5.14_8

 how to solve this?
 ---
 cc -DHAVE_CONFIG_H -I. -I../../..
 -DPACKAGE_SYSCONF_DIR=\/usr/local/etc\ -D
 PACKAGE_DATA_DIR=\/usr/local/share\
 -DPACKAGE_BIN_DIR=\/usr/local/bin\ -
 DPACKAGE_LOCALE_DIR=\/usr/local/share/locale\
 -DPACKAGE_LOCALSTATEDIR=\/va
 r\ -I../../.. -I/usr/local/include/dbus-1.0
 -I/usr/local/include/dbus-1.0/incl
 ude   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall
 -Wchar-subscrip
 ts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align
 -Wsign-c
 ompare -MT probe-hiddev.o -MD -MP -MF .deps/probe-hiddev.Tpo -c -o
 probe-hiddev.
 o probe-hiddev.c^M
 probe-hiddev.c: In function 'main':^M
 probe-hiddev.c:81: error: 'USB_GET_REPORT_ID' undeclared (first use in this
 func
 tion)^M
 probe-hiddev.c:81: error: (Each undeclared identifier is reported only
 once^M
 probe-hiddev.c:81: error: for each function it appears in.)^M
 gmake[5]: *** [probe-hiddev.o] Error 1^M
 gmake[5]: Leaving directory
 `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
 d/probing'^M
 gmake[4]: *** [all-recursive] Error 1^M
 gmake[4]: Leaving directory
 `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
 d'^M
 gmake[3]: *** [all-recursive] Error 1^M
 gmake[3]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
 gmake[2]: *** [all] Error 2^M
 gmake[2]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
 gmake[1]: *** [all-recursive] Error 1^M
 gmake[1]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14'^M
 gmake: *** [all] Error 2^M
 *** Error code 1^M
 ^M
 Stop in /usr/ports/sysutils/hal.^M
 ---  Build of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
 (consumed
 00:00:31)
 ---  Upgrade of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
 (consume
 d 00:00:31)

USB_GET_REPORT_ID should be getting picked up from
/usr/include/dev/usb/usb_ioctl.h these days.

Have you still got libusb (or some of its includes) installed on a
system recent enough to have it in the base system?
___
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: Alternate method for fetching source

2010-06-04 Thread Vincent Hoffman
On 04/06/2010 19:20, Ross Penner wrote:
 I'm trying to update my system and when I run cvsup, the connection
 repeatedly has problems (TreeList failed: Network write failure:
 Connection closed). I'm wondering if anybody can suggest any other
 method to grab the current source files?
   
svn works (http://wiki.freebsd.org/SubversionPrimer) or if you are ok
not to have the absolute bleeding edge
http://pub.allbsd.org/FreeBSD-snapshots/ has a daily -CURRENT snapshot
(including source)

Vince
 Thanks for any ideas
 ___
 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
   

___
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


bash instead of csh (completely)

2010-06-04 Thread Stefan Miklosovic
Hi list,

title says it, i would like completely remove csh and install bash
instead. As far I know, csh is build in system, could I remove it
manually and install bash (of course, in reverse order :D)

Are there such dependencies on csh? I know that real system scripting
is done via /bin/sh
co absence of csh shell should not break system.

Am I wrong ?

Thank you for reply

Have a nice day
___
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: bash instead of csh (completely)

2010-06-04 Thread Chris Rees
Why would you want to do that?

On 4 Jun 2010 19:57, Stefan Miklosovic miklosovic.free...@gmail.com
wrote:

Hi list,

title says it, i would like completely remove csh and install bash
instead. As far I know, csh is build in system, could I remove it
manually and install bash (of course, in reverse order :D)

Are there such dependencies on csh? I know that real system scripting
is done via /bin/sh
co absence of csh shell should not break system.

Am I wrong ?

Thank you for reply

Have a nice day
___
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
___
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: Alternate method for fetching source

2010-06-04 Thread Lars Eighner

On Fri, 4 Jun 2010, Ross Penner wrote:


I'm trying to update my system and when I run cvsup, the connection
repeatedly has problems (TreeList failed: Network write failure:
Connection closed). I'm wondering if anybody can suggest any other
method to grab the current source files?


You are talking about the system source, not the ports, right?

Actually, the advice is not much different.  In either case, cvsup does not
always work very well for big upgrades (such as across major version
numbers) and also (though it theoretically should) doesn't work well
creating a source tree from scratch.  If you install source (or ports) from
the most recent release below your taget before, cvsup is much less likely
to crack under pressure.

Also, consider changing your mirror.  Network conditions may be better for
you with some mirrors than with others.  And finally, make sure cvsup is
up-to-date with your current system.  It's in ports/net .

(Of course backup what you have before trying any of this.)

You may get a more specific response if you include uname -a for your
current system and the tags you are trying to use with cvsup.

--
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

___
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: bash instead of csh (completely)

2010-06-04 Thread Jerry McAllister
On Fri, Jun 04, 2010 at 08:56:02PM +0200, Stefan Miklosovic wrote:

 Hi list,
 
 title says it, i would like completely remove csh and install bash
 instead. As far I know, csh is build in system, could I remove it
 manually and install bash (of course, in reverse order :D)

If you are made about that, then just change your shell in 
the /etc/passwd file to  /usr/local/bin/bash   and you
will have bash as your shell.   

There is no particular reason to do so, but you can if you want.

Actually, the csh on FreeBSD is now tcsh and has most of the
cute features added that some people think they have to use bash
for.  Of course, the syntax for commands is still csh style.

 
 Are there such dependencies on csh? I know that real system scripting
 is done via /bin/sh
 co absence of csh shell should not break system.

You do not want to make bash be the default shell for root.
It should be left  as /bin/sh 

jerry


 
 Am I wrong ?
 
 Thank you for reply
 
 Have a nice day
 ___
 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
___
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: bash instead of csh (completely)

2010-06-04 Thread Polytropon
On Fri, 4 Jun 2010 20:56:02 +0200, Stefan Miklosovic 
miklosovic.free...@gmail.com wrote:
 Hi list,
 
 title says it, i would like completely remove csh and install bash
 instead. As far I know, csh is build in system, could I remove it
 manually and install bash (of course, in reverse order :D)
 
 Are there such dependencies on csh? I know that real system scripting
 is done via /bin/sh
 co absence of csh shell should not break system.
 
 Am I wrong ?

Hmmm... first of all, you know that there are some things you have
to take into mind when installing bash into the OS (e. g. attention
to use statical linking, and placing it into /bin). Keep in mind
that FreeBSD defaults to csh as the default dialog shell in many
places (e. g. /usr/share/skel), but you can also modify those
references to point to bash instead.

I don't know why you want to remove csh from the system (instead
of just not using it), but in my opinion - without any experience
or testing - it sounds possible.

You can easily build a minimal system, install bash as mentioned
before, and then remove the csh binary.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: Alternate method for fetching source

2010-06-04 Thread C. P. Ghost
On Fri, Jun 4, 2010 at 8:20 PM, Ross Penner ross.pen...@gmail.com wrote:
 I'm trying to update my system and when I run cvsup, the connection
 repeatedly has problems (TreeList failed: Network write failure:
 Connection closed). I'm wondering if anybody can suggest any other
 method to grab the current source files?

Have you tried other cvsup mirrors. There are plenty of choices at
the bottom of this page:

http://www.freebsd.org/doc/en/books/handbook/cvsup.html

Oh, and are you running cvsup or csup?

 Thanks for any ideas

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
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: bash instead of csh (completely)

2010-06-04 Thread Uwe Laverenz

Am 04.06.2010 20:56, schrieb Stefan Miklosovic:


title says it, i would like completely remove csh and install bash
instead. As far I know, csh is build in system, could I remove it
manually and install bash (of course, in reverse order :D)


What do you want to achieve with this? Installing shells/bash from ports 
followed by a chsh or vipw is not sufficient?


If you really want a system without csh please have a look at 
src.conf(5) which has the knob you want:


WITHOUT_TCSH
  Set to not build and install /bin/csh (which is tcsh(1)).

If you add WITHOUT_TCSH=YES to your /etc/src.conf you probably can get 
rid of csh after the next buildworld with the commands make delete-old; 
make delete-old-libs


Uwe
___
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: bash instead of csh (completely)

2010-06-04 Thread Michael Powell
Stefan Miklosovic wrote:

 Hi list,
 
 title says it, i would like completely remove csh and install bash
 instead. As far I know, csh is build in system, could I remove it
 manually and install bash (of course, in reverse order :D)
 
 Are there such dependencies on csh? I know that real system scripting
 is done via /bin/sh
 co absence of csh shell should not break system.

Why do you feel it is necessary to completely remove csh? It is part of the 
base install of the OS and does not prevent you from installing and using 
Bash should you choose. Since these are not mutually exclusive I see no 
reason to remove csh. Just leave it be. Arbitrarily 'removing' stuff from 
the base system without relevant reason is more likely to create a problem 
where none existed previously.

You can install Bash from ports. You should know that it is a third party 
userland application at this point. What you will find out some day when 
/usr won't mount and you're sitting in single-user mode trying to recover 
the box is bash will not be working. And if you made the mistake of changing 
root's shell to bash you will not be a happy camper.

You are certainly free to use whatever shell you want as a user. Don't mess 
with root's shell. I saw once some highly questionable so-called 
'benchmarking' where it was claimed that bash is 4 times slower than 
anything else. My own $.02 is the fixation on bash is more a result from 
people coming over to FreeBSD from Linux, and trying to drag Linux 
methodologies along with instead of looking at FreeBSD fresh and learning 
new stuff. While there is a lot of similarity and overlap, FreeBSD is *not* 
just another Linux distro.

-Mike
 




___
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: Alternate method for fetching source

2010-06-04 Thread doug


On Fri, 4 Jun 2010, Lars Eighner wrote:


On Fri, 4 Jun 2010, Ross Penner wrote:


I'm trying to update my system and when I run cvsup, the connection
repeatedly has problems (TreeList failed: Network write failure:
Connection closed). I'm wondering if anybody can suggest any other
method to grab the current source files?


You are talking about the system source, not the ports, right?

Actually, the advice is not much different.  In either case, cvsup does not
always work very well for big upgrades (such as across major version
numbers) and also (though it theoretically should) doesn't work well
creating a source tree from scratch.  If you install source (or ports) from
the most recent release below your taget before, cvsup is much less likely
to crack under pressure.

Also, consider changing your mirror.  Network conditions may be better for
you with some mirrors than with others.  And finally, make sure cvsup is
up-to-date with your current system.  It's in ports/net .

(Of course backup what you have before trying any of this.)

You may get a more specific response if you include uname -a for your
current system and the tags you are trying to use with cvsup.


I have almost exclusively used cvsup and now csup to update complete source 
trees since 1997 and other than having the mirror of my choice not be quite 
up-to-date have never had any issues. I would recommend using csup rather than 
cvsup as csup has the same syntax and is built into the base system. Assuming 
you are not tracking current, or are not updating to get a specific fix, the 
timing of mirror updates is rarely an issue. Another method of updating would be 
to use freebsd-update, see 24.2 in the handbook. If this would work for you, it 
would have the added advantage of having some extra build-in protection against 
network problems.


___
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: bash instead of csh (completely)

2010-06-04 Thread Jerry B. Altzman
On Fri, Jun 4, 2010 at 14:59, Chris Rees utis...@gmail.com wrote:

 Why would you want to do that?


To get rid of csh?
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

//jbaltz
-- 
jerry b. altzmanjba...@gmail.com  www.jbaltz.com
foo mane padme hum  twitter: @lorvax
___
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: Some GMirror questions.

2010-06-04 Thread Adam Vande More
I think you are making this harder than is needs to be.  When in doubt defer
to the Handbook and the man pages.  This also a good page
http://onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html

Lastly, I know at one point the 'load' algorithm had some performance
 problems and people were saying to only use 'round-robin'. It seems as
 though some code was committed back in Dec 2009 to fix it's this. Is there a
 practical rule of thumb to using 'load' vs 'round-robin'?


Use load.  http://www.freebsd.org/cgi/query-pr.cgi?pr=113885


 Is this an accurate way to look at it?
 Round-robin because if you have two disks in a mirror, they’re both under
 the same 'load' constraints, and it is best to KISS.


No. round-robin is a simple algorithm which alternates drive requests.  Also
two identical HD's may be mirrored but they will not really ever be same
state in terms of caching, performance, etc.

-- 
Adam Vande More
___
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: bash instead of csh (completely)

2010-06-04 Thread Eric Masson
Jerry B. Altzman jba...@gmail.com writes:

Hi,

 To get rid of csh?
 http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

This link is about csh *programming*, as standard scripts in FreeBSD use
sh, this is pointless.

Regards

-- 
 Ol: ..un plan perdu au fond d'une armoire dont seul Steve Jobs a la clé.
 BL: Qu'il a laissée dans un pantalon déposé chez un teinturier dont il a
 perdu l'adresse et le ticket !
 -+- BL in Guide du Macounet Pervers : Bien cacher sa stratégie -+-
___
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: bash instead of csh (completely)

2010-06-04 Thread Polytropon
On Fri, 4 Jun 2010 16:03:42 -0400, Jerry B. Altzman jba...@gmail.com wrote:
 On Fri, Jun 4, 2010 at 14:59, Chris Rees utis...@gmail.com wrote:
 
  Why would you want to do that?
 
 
 To get rid of csh?
 http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

The article you mentioned discusses the topic Why shouldn't I 
program in csh? As the OP already noted correctly, in FreeBSD
scripting is done by /bin/sh, the Bourne shell. Most people
scripting on FreeBSD do also use sh. In fact, I don't know
anybody seriously scripting in csh.

In terms of dialog shell quality, there surely are better
solutions than bash. Allthough bash is most common, shells
like ksh or zsh are also very powerfull (and still have
compatibility to sh). Personally, there are some things
regarding dialog use that csh does better (!) than bash,
but that's to be seen as what it is, a very individual point
of view.

Again, why get rid of csh when it's enough just not to use
it? System scripting is sh, and using chsh, modification of
adduer behaviour or different settings in /usr/share/skel
bash can be made the default dialog shell - no big deal.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: bash instead of csh (completely)

2010-06-04 Thread Stefan Miklosovic
Hi all,

First of all, thank you for your quick answers, I really appreciate it.

I dont want to start flame war about linux vs bsd but ... :)
Before I start to explain what I want to do, I want you know
I consider freebsd fr away better than linux in a lot of ways.
(it is also a reason I want to build something upon bsd instead of
linux, there are so many advantages ... ok, this post isnt about that :))

In work, we try to do some kind of linux distro, it is based on slacware.
I am not a guy who lead it, but in the way we are developing it, I think it is
 bad idea at all. Firstly, we try to do minimal slackware installation
as much it is possible, so now we are about 2.6.34 kernel, minimum
kernel modules, no man or docs, files you do not need for sure are removed.
We ended with quite usable system with quite neccessary utilities. It has
about ~150 MB.

But I think with this process, we just cut ourselves from such things like
system upgrade (if slackware would have someone :D), package upgrade
(we nearly all do manually, compiling from source) and so on ...
Note that this distro is not something massively distributed, just for
our purpose,
but problems remains.

While I always inclined to *bsd and not used linux more as it was a duty, I
want to do it in bsd way. So set up minimal bsd without things I do not need
but still stay in touch with things like package system, ports (its the same)
and system upgrades / updates. I should write my own installer and so on.

What I still miss is a way how to bend freebsd to my needs. In
linux, it is easy
as hell, remove this, change that, and it still runs. I am afraid that
if I cut off some
parts of system, I will not benefit from it anymore. For example, I
install minimal bsd,
but it contains still things I do not need (some dir like games and other
stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer (???
in year 2010, who use it?) and so on.

So I am afraid to be so brutal to just remove it ...

FreeBSD has another philosophy than Linux, but i feel Linux is more
customizable.
But understand that it is advantage and disadvantage too ...

I think I have to more study about /usr/src/ :) For example, I would
like to know,
how to install something into other dir and no to default one. Think about port.
All to /usr/local/ ... and so on. But what if I want to install it in
/ExtraStuff ? How do
I do it in make install clean way? Change port's make file ? no way .

On 6/4/10, Michael Powell nightre...@hotmail.com wrote:
 Stefan Miklosovic wrote:

 Hi list,

 title says it, i would like completely remove csh and install bash
 instead. As far I know, csh is build in system, could I remove it
 manually and install bash (of course, in reverse order :D)

 Are there such dependencies on csh? I know that real system scripting
 is done via /bin/sh
 co absence of csh shell should not break system.

 Why do you feel it is necessary to completely remove csh? It is part of the
 base install of the OS and does not prevent you from installing and using
 Bash should you choose. Since these are not mutually exclusive I see no
 reason to remove csh. Just leave it be. Arbitrarily 'removing' stuff from
 the base system without relevant reason is more likely to create a problem
 where none existed previously.

 You can install Bash from ports. You should know that it is a third party
 userland application at this point. What you will find out some day when
 /usr won't mount and you're sitting in single-user mode trying to recover
 the box is bash will not be working. And if you made the mistake of changing
 root's shell to bash you will not be a happy camper.

 You are certainly free to use whatever shell you want as a user. Don't mess
 with root's shell. I saw once some highly questionable so-called
 'benchmarking' where it was claimed that bash is 4 times slower than
 anything else. My own $.02 is the fixation on bash is more a result from
 people coming over to FreeBSD from Linux, and trying to drag Linux
 methodologies along with instead of looking at FreeBSD fresh and learning
 new stuff. While there is a lot of similarity and overlap, FreeBSD is *not*
 just another Linux distro.

 -Mike





 ___
 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

___
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: bash instead of csh (completely)

2010-06-04 Thread C. P. Ghost
On Fri, Jun 4, 2010 at 10:54 PM, Stefan Miklosovic
miklosovic.free...@gmail.com wrote:
 What I still miss is a way how to bend freebsd to my needs. In
 linux, it is easy
 as hell, remove this, change that, and it still runs. I am afraid that
 if I cut off some
 parts of system, I will not benefit from it anymore. For example, I
 install minimal bsd,
 but it contains still things I do not need (some dir like games and other
 stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer 
 (???
 in year 2010, who use it?) and so on.

You're aware of nanobsd(8)?

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
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: Alternate method for fetching source

2010-06-04 Thread Fbsd1

Ross Penner wrote:

I'm trying to update my system and when I run cvsup, the connection
repeatedly has problems (TreeList failed: Network write failure:
Connection closed). I'm wondering if anybody can suggest any other
method to grab the current source files?

Thanks for any ideas


It has been my experience that when a new RELEASE cycle starts, Like 
right now with 8.1, the ftp servers get a real workout. Having 
difficulties making it through a complete download successfully in one 
try is very unlikely.


Using ftp with a .netrc file to restart the download where it left off 
is better than restarting over from the start. Read this url all the way 
to the end where the restart is explained.


http://www.daemonforums.org/showthread.php?t=4212



___
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: bash instead of csh (completely)

2010-06-04 Thread b. f.
I dont want to start flame war about linux vs bsd but ... :)
Before I start to explain what I want to do, I want you know
I consider freebsd fr away better than linux in a lot of ways.
(it is also a reason I want to build something upon bsd instead of
linux, there are so many advantages ... ok, this post isnt about that :))

You're right -- it isn't about that.  Don't get sucked into some
stupid argument.  Bash isn't Linux.  Linux isn't bash.  If you want to
use another shell, just use it.  Bear in mind that if you install it
from FreeBSD Ports, then it and it's dependencies may not be available
in the event of an emergency, if they live on a partition separate
from /.  So unless you go to the trouble of building a
statically-linked bash and installing it in /rescue or /bin or
whatever, I wouldn't change root's shell to bash.  However, others
encountered this problem, and made a default account called toor
that is basically a root account with another shell.  You could use
that with bash instead, and leave root with a shell from the base
system. Whatever you decide to use for user accounts and your own
scripts, variables like MAKE_SH and SH in make.conf will dictate what
is used for building the base system and ports.  If you change these
to bash, you may break some builds.

...


What I still miss is a way how to bend freebsd to my needs. In
linux, it is easy
as hell, remove this, change that, and it still runs. I am afraid that
if I cut off some
parts of system, I will not benefit from it anymore. For example, I
install minimal bsd,
but it contains still things I do not need (some dir like games and other
stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer (???
in year 2010, who use it?) and so on.

So I am afraid to be so brutal to just remove it ...

It's just a matter of learning what depends on what, which takes a bit
of time.  If you're happy with a ~150MB base system, you can just use
the WITHOUT_* knobs in src.conf(5)  and the make delete-old(-libs)
targets to rip out a bunch of stuff.  If you want it even smaller,
you'll have to use picobsd(8), or nanobsd(8) (both of which require
some effort to figure out dependencies), or hack the base system
sources yourself.


FreeBSD has another philosophy than Linux, but i feel Linux is more
customizable.

Maybe some Linux distros are slightly easier to trim than the stock
FreeBSD, but only slightly.  Once you become more familiar with
FreeBSD, I'm sure that you will see the possibilities for slimming it
down.  If you are still not satisfied, you could use a hybrid system
like Debian's GNU/kfreebsd:

http://www.debian.org/ports/kfreebsd-gnu/

or Gentoo/FreeBSD:

http://www.gentoo.org/proj/en/gentoo-alt/bsd/fbsd/

But these are newer, experimental systems, with all that implies.


I think I have to more study about /usr/src/ :) For example, I would
like to know,
how to install something into other dir and no to default one. Think about 
port.
All to /usr/local/ ... and so on. But what if I want to install it in
/ExtraStuff ? How do
I do it in make install clean way? Change port's make file ? no way .

Read build(7), release(7), ports(7), src.conf(5), make.conf(5),
/usr/ports/Mk/bsd.port.mk, /usr/src/Makefile, and the tail of
/usr/src/UPDATING, for a start.  You'll want to look at setting
DESTDIR, LOCALBASE, etc.  It's all there.  Good luck.


b.
___
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: Apache 2.2, mod_auth_kerb

2010-06-04 Thread Benjamin Lee
On 06/03/2010 02:16 AM, John wrote:
 On 2010-06-03 07:45, Benjamin Lee wrote:
 On 05/20/2010 06:02 AM, John wrote:
   
 Hi list.

 I'm having problems getting mod_auth_kerb to play nice on one of my
 servers.
 I have the exact same setup on other machines and it works perfectly,
 only difference is this ones running CURRENT while they track RELEASE.

 Some info:

 # pkg_info|grep apache  pkg_info|grep kerb
 apache-2.2.15_7 Version 2.2.x of Apache web server with prefork MPM.
 mod_auth_kerb-5.4   An Apache module for authenticating users with
 Kerberos v5

 # uname -a
 FreeBSD host.example.com 9.0-CURRENT FreeBSD 9.0-CURRENT #5: Tue May 11
 20:04:45 UTC 2010 host.example.com:/usr/obj/usr/src/sys/HOST  i386


 Everything compiles and installs nicely, but when I try to do a
 'apachectl start' I get this:

 httpd: Syntax error on line 4 of /usr/local/etc/apache22/httpd.conf:
 Cannot load /usr/local/libexec/apache22/mod_auth_kerb.so into server:
 /usr/local/libexec/apache22/mod_auth_kerb.so: Undefined symbol
 gsskrb5_register_acceptor_identity

 Is this due to running current?
 If it is I will drop the issue right now, I just want to know for sure
 before I spend hours trying to solve it.
  
 Hi John,

 What is the output of 'ldd /usr/local/libexec/apache22/mod_auth_kerb.so'?


 
 /usr/local/libexec/apache22/mod_auth_kerb.so:
 libgssapi.so.10 = /usr/lib/libgssapi.so.10 (0x281b8000)
 libheimntlm.so.10 = /usr/lib/libheimntlm.so.10 (0x281c1000)
 libkrb5.so.10 = /usr/lib/libkrb5.so.10 (0x281c6000)
 libhx509.so.10 = /usr/lib/libhx509.so.10 (0x28224000)
 libcom_err.so.5 = /usr/lib/libcom_err.so.5 (0x2825a000)
 libcrypto.so.6 = /lib/libcrypto.so.6 (0x2825c000)
 libasn1.so.10 = /usr/lib/libasn1.so.10 (0x2880)
 libroken.so.10 = /usr/lib/libroken.so.10 (0x283c1000)
 libcrypt.so.5 = /lib/libcrypt.so.5 (0x283d1000)
 libc.so.7 = /lib/libc.so.7 (0x28091000)

Hi John,

It looks like libgssapi (and potentially other parts of heimdal) have
been broken in head/ since the heimdal-1.1 merge.  Thus, it's now also
broken in stable/8/ and releng/8.0/.

I've filed a PR:

http://www.freebsd.org/cgi/query-pr.cgi?pr=147454


-- 
Benjamin Lee
http://www.b1c1l1.com/



signature.asc
Description: OpenPGP digital signature


sysbench / fileio - Linux vs. FreeBSD

2010-06-04 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi List,

A week ago I started to benchmark Linux vs. FreeBSD on a Dell Poweredge
1850.

CPU: 2 x 3.4Ghz Xeon (Dual Core)
Memory: 8GB (4x2)
Disk: 1 x SEAGATE ST373454LC D404 (SCSI)

FreeBSD kazoku 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #0: Tue May 25
20:54:11 UTC 2010
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

The tests with seqrewr, seqrd, rndrd, and so on is still going on, so I
can only publish the seqwr result. (The PostgreSQL will be tested as well)

(soft-updates are on)
/dev/da0s1d on /usr (ufs, local, soft-updates)

Tested with:
sysbench --num-threads=$a --file-block-size=$bs --test=fileio
- --file-total-size=2G --file-fsync-all=no --file-test-mode=seqwr run

My first results (seqwr with 1,2,4,8,6,32 threads) can be found here.

http://tech-blog.wooh.hu/~wooh/fbsd_vs_debian_seqwr.html

Why FreeBSD is supreme with 1 and 2 thread. And why is it 2 and 3 times
slower with 4-8-16-32 threads compared to Debian? The first two tests (1
thread and 2 thread) showed me that FreeBSD is supreme in I/O, but later
tests showed me, that it can produce horrible I/O.

How can I tune my disk to make it faster? Is it possible? What is the
reason of the really slow I/O with more than 4 threads? What do you
recommend me to do? Why is it damn slow with 8K blocksize?

I have more than 15 FreeBSD servers in production environment and I
don't want to change operating system due to I/O issues. I changed my
OpenBSD servers to FreeBSD 3 years ago... :)

When all tests are ready I'll publish all the results, including the
postgresql benchmarks as well.

Best Regards,

- -- 
Adam PAPAI
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMCZMrAAoJEGq0EWvh5uiI10MIAM1iZxFZ5xssKmawHl56Ruin
zHHgb4Nc15waTLdzFGfllAayDlZqvvpoSpOVbp8qDZYlkTbYPF6aMjkehqMvQUEo
nFs7WN2VaCSOhUUQSwjqfGdnMLW9H5uyW/ZkYvgoOjQjz/vewDV6Fi+ZfGmt5Zqw
gV1ZlXFdAUOUW6c90ODOPxn+7XCA5UC2sUMPB+1iNxrTiiS6C2YQ0Vy1fCXvrhU3
51n0ES/7JBF4sk5dH1VNEU/8AeQRBOoKPuAHhZKRZZ1x+1dMkDhwdD+KUHGrRGJd
fUAZmMhjE6fRG86FbwK5jrZizHZYpE3PfpZe6tI3SIvw7NbUNrRsCMSiel+0FBg=
=k3Sw
-END PGP SIGNATURE-
___
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: bash instead of csh (completely)

2010-06-04 Thread Chad Perrin
On Fri, Jun 04, 2010 at 04:03:42PM -0400, Jerry B. Altzman wrote:
 On Fri, Jun 4, 2010 at 14:59, Chris Rees utis...@gmail.com wrote:
 
  Why would you want to do that?
 
 To get rid of csh?
 http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

As pointed out already (at least twice), that is about csh *programming*.
What this means is that nothing in that screed says that having csh
installed on your system is bad.  If you actually buy everything that
Mr. Christiansen says about how csh is bad for programming (and I don't
buy everything he says there, though I do agree with him on a lot of
other topics, particularly where Perl is concerned), you still have no
reason based on that screed to avoid using csh (or tcsh) as your
interactive shell.

Furthermore, there are reasons you shouldn't use bash for scripting.  It
is rather dependency-heavy, for a shell, and if you're going to write
shell scripts you should really try to write them to be as simple, and as
widely understandable and portable, as possible.  This basically means sh
(the Bourne shell) rather than csh, tcsh, bash, zsh, ksh, et cetera.
Even the sh-emulation that bash provides, and that many Linux systems use
instead of a real sh, is less than perfect in that regard -- but it's
close enough for government work, I suppose.

I'm about to get very opinionated, so feel free to stick your fingers in
your ears if you don't like what I have to say:

If you get to the point where your programming efforts are so
sophisticated that you can't make do with sh, you should be using a
real programming language, rather than a shell that happens to allow
scripting.  This means that by the time sh (with grep, awk, et cetera)
isn't good enough, you should really consider using something like Perl
or Ruby.  By the time sh isn't really sufficient, you're talking about
real programming, by which point the lack of clarity of the syntax of
the typical shell languages can become a real thorn in your side when it
comes to maintenance.

Maybe it's just me, but just as I don't see any particular need for MS
Access as a DBMS when it's overlapped by spreadsheets and SQLite on one
end and by a variety of more serious DBMSes like PostgreSQL on the
other end, I don't really see much point for bash as a scripting language
when it's significantly overlapped by sh on one end and Perl, Ruby, et
cetera on the other end.  I suppose your mileage may vary.

Anyway . . . ultimately, my point is that I love tcsh as an interactive
shell, and never use it for programming.  I find it odd that people
want to do programming in a typical Unix shell other than simple
scripting in sh when there are such better options available.

Perl is even more ubiquitous than bash.  Why not just use that for
scripting if you want more than sh?

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpwjTRSVHMj7.pgp
Description: PGP signature


unable to install netatalk

2010-06-04 Thread Thiago Esteves
Hello all,

 I am getting errors while trying to install netatalk from ports collection.
I am running release 6.3 p15 (I know it has already
passed its end-of-life date, I will update it as soon as possible). My ports
tree is updated.

 Any help is welcome. Here is the output:

*libtool: link: (cd .libs/libcnid.lax/libcnid_tdb.a  ar x
/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk/cnid/tdb/.libs/libcnid_tdb.a)
libtool: link: ar cru .libs/libcnid.a .libs/cnid.o .libs/cnid_init.o
.libs/libcnid.lax/libcnid_dbd.a/cnid_dbd.o
.libs/libcnid.lax/libcnid_last.a/cnid_last.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_add.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_close.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_delete.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_get.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_lookup.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_open.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_resolve.o
.libs/libcnid.lax/libcnid_tdb.a/cnid_tdb_update.o
libtool: link: ranlib .libs/libcnid.a
libtool: link: rm -fr .libs/libcnid.lax
libtool: link: ( cd .libs  rm -f libcnid.la  ln -s ../libcnid.la 
libcnid.la )
gmake[4]: Leaving directory
`/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk/cnid'
gmake[3]: Leaving directory
`/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk/cnid'
Making all in dsi
gmake[3]: Entering directory
`/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk/dsi'
/bin/sh /usr/local/bin/libtool --tag=CC   --mode=compile cc -std=gnu99
-DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../sys-I../../include
-D_U_=__attribute__((unused)) -O2 -fno-strict-aliasing -pipe -I../../sys
-MT dsi_attn.lo -MD -MP -MF .deps/dsi_attn.Tpo -c -o dsi_attn.lo dsi_attn.c
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../include
-I../../sys -I../../include -D_U_=__attribute__((unused)) -O2
-fno-strict-aliasing -pipe -I../../sys -MT dsi_attn.lo -MD -MP -MF
.deps/dsi_attn.Tpo -c dsi_attn.c  -fPIC -DPIC -o .libs/dsi_attn.o
In file included from dsi_attn.c:17:
../../include/atalk/dsi.h:63: error: field `server' has incomplete type
../../include/atalk/dsi.h:63: error: field `client' has incomplete type
gmake[3]: *** [dsi_attn.lo] Error 1
gmake[3]: Leaving directory
`/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk/dsi'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory
`/usr/ports/net/netatalk/work/netatalk-2.1.1/libatalk'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/net/netatalk/work/netatalk-2.1.1'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/net/netatalk.
*** Error code 1

Stop in /usr/ports/net/netatalk.
BSD-Server-01:/usr/ports/net/netatalk root# *



Regards,
Thiago
___
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: sysbench / fileio - Linux vs. FreeBSD

2010-06-04 Thread Igor Mozolevsky
On 5 June 2010 00:58, Adam PAPAI w...@wooh.hu wrote:

 How can I tune my disk to make it faster? Is it possible? What is the
 reason of the really slow I/O with more than 4 threads? What do you
 recommend me to do? Why is it damn slow with 8K blocksize?

Does linux still have async disk writes by default?


Igor
___
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: sysbench / fileio - Linux vs. FreeBSD

2010-06-04 Thread Bruce Cran
On Saturday 05 June 2010 00:58:35 Adam PAPAI wrote:

 Why FreeBSD is supreme with 1 and 2 thread. And why is it 2 and 3 times
 slower with 4-8-16-32 threads compared to Debian? The first two tests (1
 thread and 2 thread) showed me that FreeBSD is supreme in I/O, but later
 tests showed me, that it can produce horrible I/O.
 
 How can I tune my disk to make it faster? Is it possible? What is the
 reason of the really slow I/O with more than 4 threads? What do you
 recommend me to do? Why is it damn slow with 8K blocksize?

Some quick tests show that ufs does do rather poorly on my system too. I have 
the following filesystems setup:

/var : ufs with softupdates
/usr/obj : zfs with checksums disabled
/usr/src : zfs with compression enabled
/home   : zfs with compression disabled and checksums enabled

I ran a test with a blocksize of 8KB and 16 threads.

/var   : 25.2MB/s
/usr/obj : 64.8MB/s
/usr/src : 386.3MB/s
/home   : 60.3MB/s

-- 
Bruce Cran
___
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


Booting Xserve on 8.0

2010-06-04 Thread Chris

I have two new Xserves (last years units, 2.8 quad cores). After
fighting with OSX for two months, I decided to see if I could install
FreeBSD since that is what we have always run on our 10 servers
since the 90s (and those two months would have been over in two
days had we had FreeBSD from the start). I decided to give it a try
tonight after a particularly low ebb in the frustration over trying to  
make

OSX, NOT do user friendly enterprise things, but just configure normal
simple applications that we take for granted can be configured and
stay configured on FreeBSD.

I'm wondering if there is someone on the list who may have information
on this. I used the boot from CD procedure that apple provides
at http://support.apple.com/kb/HT2778?viewlocale=en_US and it will
not boot the 8.0 ISO. I configured one normal intel box using this CD
so I think it's a good disk, and I verified that the Xserve would read
it as a data disk. But I can't get it to boot on the xserve. Bootloader
issue?

It pops the disk out and puts the gray folder with a question mark to
tell me to give it a disk it can read. I tried the i386 8.0 CD and had  
the

same results.

I have read where people are installing the PPC version on xserves.
Is it possible the amd64 version is not somehow bootable in a modern
xserve? Any ideas? Would it be appropriate to ask this on the amd64
list?

___
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: hal-0.5.14_7 to _8 upgrade problem

2010-06-04 Thread n dhert
 USB_GET_REPORT_ID should be getting picked up from
 /usr/include/dev/usb/usb_ioctl.h these days.

 Have you still got libusb (or some of its includes) installed on a
 system recent enough to have it in the base system?
On my system, I do have :
]$ ls -la /usr/include/dev/usb/usb_ioctl.h
-r--r--r--  1 root  wheel  9809 May 17 14:57
/usr/include/dev/usb/usb_ioctl.h

On the other hand portupgrading always gives me:
---  ** Upgrade tasks 1: 0 done, 1 ignored, 0 skipped and 1 failed
---  Listing the results (+:done / -:ignored / *:skipped / !:failed)
- devel/libusb (marked as IGNORE)
! sysutils/hal (hal-0.5.14_7)   (compiler error)

It seems it still tries to do something with the devel/libusb port?
$ pkg_info | grep libusb
libusb-0.1.12_4 Library giving userland programs access to USB devices
seems to show it is installed.
My system started at 7.2 and was upgraded to 8.0 and has given this
devel/libusb (marked as IGNORE) even since.
If I look on a different system installed for the first time right with 8.0,

$ pkg_info | grep libusb reports nothing.


2010/6/4 Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org

  n dhert ndhert...@gmail.com writes:

  I have a problem with upgrading hal-0.5.14_7 to hal-0.5.14_8
 
  how to solve this?
  ---
  cc -DHAVE_CONFIG_H -I. -I../../..
  -DPACKAGE_SYSCONF_DIR=\/usr/local/etc\ -D
  PACKAGE_DATA_DIR=\/usr/local/share\
  -DPACKAGE_BIN_DIR=\/usr/local/bin\ -
  DPACKAGE_LOCALE_DIR=\/usr/local/share/locale\
  -DPACKAGE_LOCALSTATEDIR=\/va
  r\ -I../../.. -I/usr/local/include/dbus-1.0
  -I/usr/local/include/dbus-1.0/incl
  ude   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall
  -Wchar-subscrip
  ts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align
  -Wsign-c
  ompare -MT probe-hiddev.o -MD -MP -MF .deps/probe-hiddev.Tpo -c -o
  probe-hiddev.
  o probe-hiddev.c^M
  probe-hiddev.c: In function 'main':^M
  probe-hiddev.c:81: error: 'USB_GET_REPORT_ID' undeclared (first use in
 this
  func
  tion)^M
  probe-hiddev.c:81: error: (Each undeclared identifier is reported only
  once^M
  probe-hiddev.c:81: error: for each function it appears in.)^M
  gmake[5]: *** [probe-hiddev.o] Error 1^M
  gmake[5]: Leaving directory
  `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
  d/probing'^M
  gmake[4]: *** [all-recursive] Error 1^M
  gmake[4]: Leaving directory
  `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebs
  d'^M
  gmake[3]: *** [all-recursive] Error 1^M
  gmake[3]: Leaving directory
 `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
  gmake[2]: *** [all] Error 2^M
  gmake[2]: Leaving directory
 `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'^M
  gmake[1]: *** [all-recursive] Error 1^M
  gmake[1]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14'^M
  gmake: *** [all] Error 2^M
  *** Error code 1^M
  ^M
  Stop in /usr/ports/sysutils/hal.^M
  ---  Build of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
  (consumed
  00:00:31)
  ---  Upgrade of sysutils/hal ended at: Thu, 03 Jun 2010 00:09:33 +0200
  (consume
  d 00:00:31)

 USB_GET_REPORT_ID should be getting picked up from
 /usr/include/dev/usb/usb_ioctl.h these days.

 Have you still got libusb (or some of its includes) installed on a
 system recent enough to have it in the base system?

___
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