Tony writes: > I've just about put the finishing touches on packaging up BackupPC for > FreeBSD. Works pretty well, but I ran into a snag early on. I've > worked it out, but somehow I don't think the way I went about it is the > "right" way to do it. > > I got the good old problem of: > > BackupPC::Lib->new failed > > Now, this wasn't because of not be setuid backuppc. I was. The issue > is that under FreeBSD, anything NOT installed with the base OS gets > placed in /usr/local/packagename, which config files in > /usr/local/etc/packagename, and startup scripts in > /usr/local/etc/rc.d/packagename. > > No matter what I tried, I just could not get BackupPC to see the > light on where I had placed the config file. I finally patched > BackupPC/Lib.pm at line 90. I changed the path argument to be > /usr/local/etc/BackupPC. After that everything worked beautifully.
Yes - the config file path is embedded in that file by the configure.pl installation script. > Somehow I just don't think that's the right way to do this. I keep > thinking that there has to be a way to pass Lib.pm the right config file > path to begin with, but I just haven't been able to find it. It has > been very frustrating. :P I probably should have made it a command-line option... > So...before I go packaging this up with a non-standard Lib.pm, any last > words for me? (Please...no 4 letter curses, I did try to do it right > the first time! RTFM doesn't count either. I've read it until I'm > cross-eyed. :P) The configure.pl script gives you full flexibility to set the paths for installation, config files etc. You can run it in batch mode with command-line options. I'm not sure what other packagers have done, but I assume the typical approach is to run configure.pl in batch mode, and then package the results. You should document the options you gave to configure.pl so people know what goes where. Craig ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ BackupPC-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/
