First, here are my old posts on the subject:
- Saving Private Bandwidth (good background, but out of date)
- Saving Private MacBandwidth (no longer needed in 1.9.3)
- Upgrading to sl_proxy 1.9.1 (sort of the same stuff below)
- Compiling sl_proxy for Cygwin (again, more of what's below)
This gets a little technical, so I apologize to those who don't quite follow along. Making a patch file for these is pretty easy, but the last time I did it, I didn't put in the version number. Unfortunately, my old patch file won't work on this source. I plan to make a new patch file this weekend, but I thought I'd write down what I did first.
For Mac:
- Edit each of these Makefile.am files, changing all the instances of 'chown' from "chown nobody.$GRP" to "chown nobody:$$GRP"
- sl_proxy-1.9.3/sl_info/Makefile.am
- sl_proxy-1.9.3/sl_relay/Makefile.am
- sl_proxy-1.9.3/sl_proxy/Makefile.am
- sl_proxy-1.9.3/sip_forwarder/Makefile.am
- autoreconf && ./configure && make
The problem is there's no yp headers in Cygwin. All one has to do is remove the checks, surrounding them with #ifndef __CYGWIN__ blocks.
- junkbox_lib-1.2.4/Lib/password.h @ line 38
#ifndef __CYGWIN__
#include <rpcsvc/ypclnt.h>
#endif // __CYGWIN__
- junkbox_lib-1.2.4/Lib/password.c
#ifndef __CYGWIN__@line 74-164
// for NIS
pw = getnisnam(user_id);
if (pw!=NULL) {
strncpy(pass, pw->pw_passwd, LPASS);
free_pw(pw);
return pass;
}
#endif // __CYGWIN__
#ifndef __CYGWIN__
/**
struct passwd* getnisnam(char* usrid)
(lots of code)
free(nis);
return pw;
}
#endif // __CYGWIN__
/**
void free_pw(struct passwd* pw)
These processes won't auto-start on boot, even if you run 'make install'. It will place the executables into /usr/local/bin and make some inet.d changes in /etc, but they aren't honored on boot. I always start them by hand, using 'screen' so I can easily disconnect or reconnect to see the logs. Like I wrote in my earlier posts, I create a screen console for each process and run these commands (on cygwin, you don't need to 'sudo'):
sudo /usr/local/bin/sl_info -l -v0 -d -f1
sudo /usr/local/bin/sl_cache -l -v0 -lx -xpr 90 -d
sudo /usr/local/bin/sl_relay -v0 -cs -ci -d
This is wonderful! Please do post your patch soon, I'd never heard of it before and really want to try it out!
ReplyDelete