Re: sorta newb help compiling samba
On Fri, 10 Apr 2009 14:31:06 -0500, Adam Vandemore amvandem...@gmail.com said: A How do you handle major builds that use FBSD specific patches A asterisk for example? Fortunately I haven't had to build asterisk or anything else that large. If I did, I'd probably try building under Solaris first, and when installing under FBSD, I'd examine any patches and put them in by hand. My only experience with a major ports build was attempting to upgrade Firefox; 20 minutes after starting, I was left with a literally unbootable system. I had to yank the drive, give it to a buddy to verify that my files were still present, do a complete installation with a more recent FBSD version on a clean drive, and restore my stuff from the original system. I'm perfectly willing to admit that I botched something in the Firefox upgrade, but I've also run into problems installing anything that remotely depends on perl. I use the same version on all my servers, and I got tired of seeing unable to find perl-5.8.whatever; configure scripts test for capability rather than version number to avoid this problem. Some of my servers are not allowed to have any network access, which means no chasing dependencies; I put in a CD with some source and run a build script. -- Karl Vogel I don't speak for the USAF or my company Seen in an East African newspaper: A new swimming pool is rapidly taking shape since the contractors have thrown in the bulk of their workers. ___ 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: sorta newb help compiling samba
On Fri, 10 Apr 2009 21:44:14 +0200, Polytropon free...@edvax.de said: P Why don't you use echo -n which suppresses the newline instead of involving P another program to do something that echo can do on its own? This is how P FreeBSD does it in its system scripts. Some of my scripts date back to 1994, and they've been run under FreeBSD, Linux, and Solaris using /bin/sh, ATT Korn shell, Solaris's version of the Korn shell (which is sure as hell *NOT* the same thing), pdksh, and bash. Unfortunately, echo -n hasn't behaved consistently, so I used the (pretty gross) hack # echo without newline necho () { echo $* | tr -d '\012' } P And according to P test -d /usr/bin || exit 0 # /usr not mounted P Woudln't it be more compliant to exit 1 to signal an error due to /usr not P being mounted? Probably. The only times I've ever tried to do anything without /usr mounted is when running single-user, so a message saying /usr/bin is missing wouldn't be a bad idea. -- Karl Vogel I don't speak for the USAF or my company The danger is not that one class is unfit to govern. All classes are unfit to govern.--Lord Acton ___ 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: sorta newb help compiling samba
2009/4/9 Gary Gatten ggat...@waddell.com: Yup - tried samba3 and a couple others. None of them liked a function about current_time in krb5. What's up with the top posting thing? You don't like the most recent stuff at the top? No, top posting is horrible! And frowned upon in this community http://www.freebsd.org/doc/en/articles/mailing-list-faq/article.html#ETIQUETTE-REPLYING Don't worry about it, most of us did it at the start :P Chris -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? ___ 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: sorta newb help compiling samba
Karl Vogel wrote: On Fri, 10 Apr 2009 14:31:06 -0500, Adam Vandemore amvandem...@gmail.com said: A How do you handle major builds that use FBSD specific patches A asterisk for example? Fortunately I haven't had to build asterisk or anything else that large. If I did, I'd probably try building under Solaris first, and when installing under FBSD, I'd examine any patches and put them in by hand. My only experience with a major ports build was attempting to upgrade Firefox; 20 minutes after starting, I was left with a literally unbootable system. I had to yank the drive, give it to a buddy to verify that my files were still present, do a complete installation with a more recent FBSD version on a clean drive, and restore my stuff from the original system. I'm perfectly willing to admit that I botched something in the Firefox upgrade, but I've also run into problems installing anything that remotely depends on perl. I use the same version on all my servers, and I got tired of seeing unable to find perl-5.8.whatever; configure scripts test for capability rather than version number to avoid this problem. Some of my servers are not allowed to have any network access, which means no chasing dependencies; I put in a CD with some source and run a build script. A shot in dark at the problem is upgrading firefox also upgraded perl from 5.8.8 to 5.8.9(possibility w/ threaded perl). If some other of your apps expected perl 5.8.8 on boot and didn't find then that could cause an issue similar to your description. Since perl is such a huge part of the ports collection, when perl is updated, all of it's dependencies should be rebuilt against the new version. That's relatively easy to accomplish using something like portupgrade or portmaster. I've had to take steps like you describe before, but I try to keep the things I maintain separately to an absolute minimum as in addition to the time consumption aspect of it, I tend to forget things which then blow in my face so I find it easier to use more conventional means. Also a good idea to keep on top of /usr/ports/UPDATING as well which will give you a heads up on such a thing. The entry referencing the perl upgrade: 20090113: AFFECTS: users of lang/perl5.8 AUTHOR: s...@freebsd.org lang/perl5.8 has been updated to 5.8.9. You should update everything depending on perl. The easiest way to do that is to use perl-after-upgrade script supplied with lang/perl5.8. Please see its manual page for details. ___ 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: sorta newb help compiling samba
On Fri, 10 Apr 2009, Karl Vogel wrote: On Fri, 10 Apr 2009 21:44:14 +0200, Polytropon free...@edvax.de said: P Why don't you use echo -n which suppresses the newline instead of involving P another program to do something that echo can do on its own? This is how P FreeBSD does it in its system scripts. Some of my scripts date back to 1994, and they've been run under FreeBSD, Linux, and Solaris using /bin/sh, ATT Korn shell, Solaris's version of the Korn shell (which is sure as hell *NOT* the same thing), pdksh, and bash. Unfortunately, echo -n hasn't behaved consistently, so I used the (pretty gross) hack # echo without newline necho () { echo $* | tr -d '\012' } Some people recommend using printf instead. -Warren Block * Rapid City, South Dakota USA ___ 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: sorta newb help compiling samba
On Sat, 11 Apr 2009 19:49:31 -0500, Adam Vande More amvandem...@gmail.com said: A A shot in dark at the problem is upgrading firefox also upgraded perl A from 5.8.8 to 5.8.9(possibility w/ threaded perl). No, I installed perl-5.8.8 by hand back when the ports version was somewhere around 5.8.4; this happened long before the Firefox episode. I've used CPAN quite a bit for modules, and I keep the basic file setup CPAN creates for use with non-networked systems; I have a short script that configures, builds, and installs perl followed by a specific set of modules in the right order. All necessary sources are already present, so nothing has to be downloaded, and the only interactive parts of the installation are things like the termcap/terminfo modules asking you to press a key in the next 5 seconds, etc. This way, I get consistent versions of perl and its modules across all my servers, regardless of OS. A If some other of your apps expected perl 5.8.8 on boot and didn't find A then that could cause an issue similar to your description. I can see writing tests for a specific capability, like perl -e 'use enum;' 2 /dev/null to see if the enumerated types module has been installed, but I can't see a reason to require anything more specific than (say) perl 5.6 or above. -- Karl Vogel I don't speak for the USAF or my company PETA - People Eating Tasty Animals --bumper sticker ___ 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: sorta newb help compiling samba
On Wed, 8 Apr 2009 13:21:17 -0500, Gary Gatten ggat...@waddell.com said: G I've been playing with various flavors of *nix off and on for almost twenty G years, but not doing much development the make process often causes me G issues - as is the case with samba. This is why I only use the ports system for small, simple builds like rsync. For anything major (Perl, OpenSSH, OpenSSL, Apache ...) I either use a pre-built package or build directly from source. I used these commands for my most recent Samba build: me% CC=gcc ./configure --with-acl-support \ --with-configdir=/usr/local/etc \ --prefix=/usr/local me% make root# make install I use a (fairly generic) script to handle starting and stopping Samba cleanly. It also handles log rotation. It's attached below, if you're interested. The killpg program used is derived from kill, but sends its signals to a process group instead of a process. -- Karl Vogel I don't speak for the USAF or my company You know you're a redneck if you've ever been involved in a custody fight over a hunting dog. --- #!/bin/sh # # $Id: samba.server,v 1.1 2004/05/13 23:32:35 vogelke Exp $ # $Source: /doc/sitelog/fs001/services/RCS/samba.server,v $ # # NAME: #samba.server # # SYNOPSIS: #samba.server [start|stop|stat|restart|dologs|help] #samba.server -v # # DESCRIPTION: #Script file to start and stop Samba services. #-v means print the version and exit. # #Non-option argument is one of the following: # start -- starts Samba service # stop -- stops Samba service # stat -- displays status of Samba service #restart -- stops and restarts Samba # dologs -- stops Samba, moves log directory, restarts Samba # help -- this message # # INSTALLATION: #Put this in at least two places: where the system looks for #startup/shutdown files, and someplace where root can run it. # # AUTHOR: #Karl Vogel vogelke+u...@pobox.com #Oasis Systems, Inc. #Based on Life with qmail script. PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin export PATH umask 022 tag=`basename $0` test -d /usr/bin || exit 0 # /usr not mounted logdir=/var/log/samba3 smprog=/usr/local/sbin/smbd nmprog=/usr/local/sbin/nmbd smsg=smbd daemon nmsg=nmbd daemon # echo without newline necho () { echo $* | tr -d '\012' } # exit with message die () { echo fatal: $@ 2 exit 1 } # when this is run logmsg () { logfile=/var/log/$tag echo `date` $USER $* $logfile } killproc() { # kill the named process(es) pname=`basename $1` pfile=/usr/local/var/locks/$pname.pid pid= test -f $pfile pid=`cat $pfile` case $pid in ) echo $pname not running ;; *) for x in 15 1 9; do killpg -$x $pid sleep 1 done rm $pfile ;; esac } showproc() { # show the named process(es) pname=`basename $1` pfile=/usr/local/var/locks/$pname.pid pid= test -f $pfile pid=`cat $pfile` hdr=USER PID PPID PGID STARTED TIME COMMAND popt='-axw -o user,pid,ppid,pgid,start,time,command' case $pid in ) return 1 ;; *) echo; echo $hdr ps $popt | grep $pname return 0 ;; esac } # print version version () { lsedscr='s/RCSfile: // s/.Date: // s/,v . .Revision: / v/ s/\$//g' lrevno='$RCSfile: samba.server,v $ $Revision: 1.1 $' lrevdate='$Date: 2004/05/13 23:32:35 $' echo $lrevno $lrevdate | sed -e $lsedscr } # -- case $1 in start) if showproc $smprog then echo $smsg already running else necho starting the $smsg env - PATH=$PATH $smprog -D echo . fi if showproc $nmprog then echo $nmsg already running else necho starting the $nmsg env - PATH=$PATH $nmprog -D echo . fi ;; stop) # we can use smbstatus -p for this... killproc smbd killproc nmbd ;; stat) showproc $smprog echo $smsg running showproc $nmprog echo $nmsg running ;; restart) $0 stop sleep 3 $0 start ;; dologs) $0 stop symlink='/var/log/samba3' newlog=`date +/space/logs/%Y/%m%d` mkdir -p $newlog if test -d $newlog; then test -L $symlink rm $symlink ln -s $newlog $symlink || echo ln -s failed 2 test -L $symlink || echo $symlink not a link 2 else echo cannot mkdir $newlog 2 fi ( cd /usr/local/var mv log.nmbd log.nmbd.old mv log.smbd log.smbd.old touch log.nmbd log.smbd chmod 640 log.nmbd chmod 640 log.smbd ) sleep 3 $0 start ;; help) cat HELP start -- starts Samba service stop -- stops
Re: sorta newb help compiling samba
Karl Vogel wrote: On Wed, 8 Apr 2009 13:21:17 -0500, Gary Gatten ggat...@waddell.com said: G I've been playing with various flavors of *nix off and on for almost twenty G years, but not doing much development the make process often causes me G issues - as is the case with samba. This is why I only use the ports system for small, simple builds like rsync. For anything major (Perl, OpenSSH, OpenSSL, Apache ...) I either use a pre-built package or build directly from source. I used these commands for my most recent Samba build: me% CC=gcc ./configure --with-acl-support \ --with-configdir=/usr/local/etc \ --prefix=/usr/local me% make root# make install I use a (fairly generic) script to handle starting and stopping Samba cleanly. It also handles log rotation. It's attached below, if you're interested. The killpg program used is derived from kill, but sends its signals to a process group instead of a process. How do you handle major builds that use FBSD specific patchesasterisk for example? -- Adam Vandemore Systems Administrator IMED Mobility (605) 498-1610 ___ 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: sorta newb help compiling samba
Just a small sidenote according to your shell script: You're defining # echo without newline necho () { echo $* | tr -d '\012' } Why don't you use echo -n which suppresses the newline instead of involving another program to do something that echo can do on its own? This is how FreeBSD does it in its system scripts. echo -n Starting service... start_service echo done. And according to test -d /usr/bin || exit 0 # /usr not mounted Woudln't it be more compliant to exit 1 to signal an error due to /usr not being mounted? Exit code 0 is usually used to signal that no error has happened (successful program run), which isn't the case when the script is not (completely) run. -- Polytropon From 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: sorta newb help compiling samba
On Wed, 08 Apr 2009 23:39:55 +0300, Gary Gatten ggat...@waddell.com wrote: I found a 3.3.1 package - if my current attempts at the port upgrades fails I'll try this route. Thanks again! Gary Hey, If I were you, first of all, I would try the make clean; make distclean;make rmconfig; make install clean thinghy first. But then again, I'm not you :P. So wish you pull it off eventually. Good luck, Claudius ___ 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: sorta newb help compiling samba
Latest error below. Going with the pkg_add... libsmb/clikrb5.c: In function `krb5_set_real_time': libsmb/clikrb5.c:132: error: dereferencing pointer to incomplete type libsmb/clikrb5.c:133: error: dereferencing pointer to incomplete type The following command failed: cc -I. -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/usr/local/include -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/usr/local/include -DLDAP_DEPRECATED -O2 -fno-strict-aliasing -pipe -DLDAP_DEPRECATED -O -D_SAMBA_BUILD_=3 -I/usr/local/include -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c libsmb/clikrb5.c -o libsmb/clikrb5.o gmake: *** [libsmb/clikrb5.o] Error 1 *** Error code 2 Stop in /usr/ports/net/samba33/samba33. *** Error code 1 -Original Message- From: Vasadi I. Claudiu Florin [mailto:claudiu.vas...@gmail.com] Sent: Wednesday, April 08, 2009 3:41 PM To: Gary Gatten Cc: freebsd-questions@freebsd.org Subject: Re: sorta newb help compiling samba On Wed, 08 Apr 2009 23:39:55 +0300, Gary Gatten ggat...@waddell.com wrote: I found a 3.3.1 package - if my current attempts at the port upgrades fails I'll try this route. Thanks again! Gary Hey, If I were you, first of all, I would try the make clean; make distclean;make rmconfig; make install clean thinghy first. But then again, I'm not you :P. So wish you pull it off eventually. Good luck, Claudius font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ 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: sorta newb help compiling samba
LOL - pkg_add failed, couldn't find openLDAP! I thought ports and packages was supposed to automagically address all the dependencies! Trying to install krb5 now - couple other users reported same issue I had so maybe recent port is fixed. Did I mention how much fun this is?! -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Gary Gatten Sent: Wednesday, April 08, 2009 5:08 PM To: Vasadi I. Claudiu Florin Cc: freebsd-questions@freebsd.org Subject: RE: sorta newb help compiling samba Latest error below. Going with the pkg_add... libsmb/clikrb5.c: In function `krb5_set_real_time': libsmb/clikrb5.c:132: error: dereferencing pointer to incomplete type libsmb/clikrb5.c:133: error: dereferencing pointer to incomplete type The following command failed: cc -I. -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/usr/local/include -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/usr/local/include -DLDAP_DEPRECATED -O2 -fno-strict-aliasing -pipe -DLDAP_DEPRECATED -O -D_SAMBA_BUILD_=3 -I/usr/local/include -I/usr/ports/net/samba33/samba33/work/samba-3.3.3/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c libsmb/clikrb5.c -o libsmb/clikrb5.o gmake: *** [libsmb/clikrb5.o] Error 1 *** Error code 2 Stop in /usr/ports/net/samba33/samba33. *** Error code 1 -Original Message- From: Vasadi I. Claudiu Florin [mailto:claudiu.vas...@gmail.com] Sent: Wednesday, April 08, 2009 3:41 PM To: Gary Gatten Cc: freebsd-questions@freebsd.org Subject: Re: sorta newb help compiling samba On Wed, 08 Apr 2009 23:39:55 +0300, Gary Gatten ggat...@waddell.com wrote: I found a 3.3.1 package - if my current attempts at the port upgrades fails I'll try this route. Thanks again! Gary Hey, If I were you, first of all, I would try the make clean; make distclean;make rmconfig; make install clean thinghy first. But then again, I'm not you :P. So wish you pull it off eventually. Good luck, Claudius font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ 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 font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ 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