Jails and common ports
Cross-posting this to freebsd-ports because it's mostly about the ports infrastructure and how I might (ab)use it... I'm looking into setting up jails, and was hoping I was onto something with using ports to maintain application software but I hit a snag and I'm hoping someone can either tell me how to do what I want or at least say nope...you're on crack thinking that will work ;) I'm trying to set up a number of jails on my system following the handbook suggestions for Application of Jails (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-application.html). That means I have a master read-only instance for the base system (world), and read-write instances of key directories for each jail. This is ideal for what I'd like to do because I only have to do one world upgrade to upgrade all my jails. I'd like to extend that idea to a number of common ports. For instance, I'd like to have gettext, libtool, etc., installed once and be able to do a single portupgrade to update it for all jails. My initial plan was to make an /opt folder in the master filesystem and use the master jail to install ports (PREFIX=/opt and LOCALBASE=/opt). I added the /opt/bin and /opt/sbin to the path and /opt/lib to the ld_config directories for the child jails and they were indeed able to see the first couple of ports I installed. However, I started hitting issues with libtool and friends. The children would not find them, and would go ahead and start installing their own local copies of those ports. Turns out quite a few tools are defined in /usr/ports/Mk/* and are defined relative to LOCALBASE. If I leave LOCALBASE and PREFIX alone in the child jails so they'll use /usr/local for their specific ports, I can't recognize and use other ports like libtool installed in /opt; it doesn't seem right to set LOCALBASE in the child jails since I want them to use /usr/local for anything I haven't provided. I really would like to avoid the joy of making hard-links, etc., for all the files in the common packages, but I didn't see any way to override settings for these individual ports. I did edit some Makefiles and add '--prefix=/opt' to the CONFIGURE_ARGS for those ports, and everything worked fine, but I'd prefer to do it the right way (e.g. not editing Makefiles). Is there a variable I'm not seeing that would allow me to do this kind of crazy thing, or am I better off either setting up hard links and/or using automated package building and just repeating pkg_upgrades in each jail? If it's the latter, does someone know of a decent all-in-one doc to help me at least set up some features so I update ports once in a master and just get packages from the same place (I can piece it together myself from all the other docs I've found and been reading, but if someone has already written it up, hate to reinvent it myself :) ). Thanks in advance. -- Marcus I. Ryan, [EMAIL PROTECTED] -- People often find it easier to be a result of the past than a cause of the future. -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
slapd hangs in nss configuration
I'm trying to set up NSS with an OpenLDAP backend on one server. When I try to start slapd after I've enabled nss, slapd hangs and won't start. It seems to relate directly to group nss because if I simply change the nsswitch.conf to be: passwd: files ldap groups: files slapd starts fine. As soon as I add ldap to the groups line, slapd won't start. All involved groups I can think of (wheel, ldap, etc.) are in the local groups file. I tried groups: files [success=return] ldap as well, but either way it still tries to go to ldap. Truss shows it's not exactly hanging, but it's stuck in a loop -- the same truss output keeps repeating: 83287: poll({11 0x0|IN|PRI|NVAL|RDNORM|RDBAND|WRBAND },1,3) = 0 (0x0) 83287: shutdown(0xb,0x2) = 0 (0x0) 83287: close(11) = 0 (0x0) 83287: gettimeofday({1151263559 839848},0x0) = 0 (0x0) 83287: getpid() = 83287 (0x14557) 83287: sendto(0x3,0x7fffca50,0,0x0,NULL,0x0) = 118 (0x76) 83287: stat(/usr/local/etc/nss_ldap.conf,0x7fffce90) = 0 (0x0) 83287: getpid() = 83287 (0x14557) 83287: geteuid() = 0 (0x0) 83287: socket(0x1,0x1,0x0) = 11 (0xb) 83287: fcntl(11,F_GETFL,0x80122ebe4) = 2 (0x2) 83287: fcntl(11,F_SETFL,0x6) = 0 (0x0) 83287: connect(0xb,{ AF_UNIX /var/run/openldap/ldapi },106) ERR#61 'Connection refused' 83287: shutdown(0xb,0x2) = 0 (0x0) 83287: close(11) = 0 (0x0) 83287: gettimeofday({1151263559 840968},0x0) = 0 (0x0) 83287: getpid() = 83287 (0x14557) 83287: sendto(0x3,0x7fffca50,0,0x0,NULL,0x0) = 142 (0x8e) 83287: gettimeofday({1151263559 841282},0x0) = 0 (0x0) 83287: getpid() = 83287 (0x14557) 83287: sendto(0x3,0x7fffca50,0,0x0,NULL,0x0) = 97 (0x61) 83287: nanosleep({16 0}) = 0 (0x0) 83287: stat(/usr/local/etc/nss_ldap.conf,0x7fffce90) = 0 (0x0) 83287: getpid() = 83287 (0x14557) 83287: geteuid() = 0 (0x0) 83287: socket(0x2,0x1,0x0) = 11 (0xb) 83287: setsockopt(0xb,0x6,0x1,0x7fffd014,0x4) = 0 (0x0) 83287: fcntl(11,F_GETFL,0x80122ebe4) = 2 (0x2) 83287: fcntl(11,F_SETFL,0x6) = 0 (0x0) 83287: connect(0xb,{ AF_INET 127.0.0.1:389 },16) ERR#36 'Operation now in progress' I'm pretty well stumped at this point, except to update the slapd startup script to update nsswitch.conf... -- Marcus I. Ryan, [EMAIL PROTECTED] Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Creating large memory disks
I need to know how to create a large memory disk in FreeBSD 4.6x. I've figured out how to create a 10M malloc-backed disk, but I want a ramdrive more on the order of 128M. How can I do that? The md man page indicates it's possible, but talks about preloading it in loader.conf. However the reply from Terry Lambert to a similar request said it should be done after boot. Any tips or guides? The post I'm referring to is: http://spitfire.velocet.net/pipermail/freebsd-hackers/2002-March/018270.html Help would be greatly appreciated. Thanks. -- Marcus I. Ryan, [EMAIL PROTECTED] --- Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. -- Matt Groening --- - This mail sent through IMP: http://horde.org/imp/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message