Um, I just wanted to mention that the real issue here isn't the OS
version, but the antique perl. FreeBSD 8.X happily runs 7.X binaries
(with a compatibility package installed), but includes perl 5.10 as
part of the "standard" distribution. Everything built from the ports
system uses perl 5.10, and it's a pain to run more than one version.
Personally I'd be happy with a nightly built for 7.X but with perl 5.10
-- just substitute "7.4" where you see "8.2".
Upgrading the nightly build scripts for perl 5.10 should be easy. First
pkg_delete perl 5.8, then pkg_add perl 5.10. A couple of lines added to
buildme.sh and a syntax fix:
Code:
--------------------
--- buildme.sh.dist 2011-07-31 17:12:42.000000000 +0100
+++ buildme.sh 2011-07-31 17:03:10.000000000 +0100
@@ -15,6 +15,7 @@
# Under 10.6, builds Universal Binaries for i386/x86_64
# Under 10.7, builds Universal Binaries for i386/x86_64
# FreeBSD 7.2 (Perl 5.8.9)
+# FreeBSD 8.2 (Perl 5.10.1)
#
# Perl 5.12.3 note:
# You should build 5.12.3 using perlbrew and the following command. GCC's
stck protector must be disabled
@@ -59,6 +60,8 @@
PERL_510=/usr/bin/perl5.10.0
elif [ -x "/usr/local/bin/perl5.10.0" ]; then
PERL_510=/usr/local/bin/perl5.10.0
+elif [ -x "/usr/local/bin/perl5.10.1" ]; then # FreeBSD 8.2
+ PERL_510=/usr/local/bin/perl5.10.1
fi
if [ $PERL_510 ]; then
@@ -113,7 +116,7 @@
# FreeBSD's make sucks
if [ $OS = "FreeBSD" ]; then
- if [ !-x /usr/local/bin/gmake ]; then
+ if [ ! -x /usr/local/bin/gmake ]; then
echo "ERROR: Please install GNU make (gmake)"
exit
fi
--------------------
Getting the distribution builder working was harder. It took me a while
to figure out what was going on with buildme.pl. The tarball builder
fires off a whole bunch of find commands, but because there's a pipe
involved there's no guarantee that one will complete before the next
one starts up, so the find instances are sometimes trying to traverse a
tree which another instance is busily deleting (and complaining about
it). I've changed that so that everything gets deleted/included in one
command:
Code:
--------------------
--- buildme.pl.dist 2011-07-31 17:13:19.000000000 +0100
+++ buildme.pl 2011-07-31 17:13:19.000000000 +0100
@@ -17,7 +17,7 @@
my $sourceDirsToExclude = ".svn tests slimp3 squeezebox /softsqueeze tools
ext/source ext-all-debug.js build";
my $revisionTextFile = "server/revision.txt";
my $revision;
-my $myVersion = "0.0.3";
+my $myVersion = "0.0.4";
my $defaultDestName = "squeezeboxserver";
my $defaultReleaseType = "nightly";
@@ -338,7 +338,7 @@
print " --destName <filename> - The name of the tarball you would
like to\n";
print " (optional) have made. Do not include the
.tar.gz/tgz,\n";
print " it will be appended
automatically.\n";
- print " --freebsd (optional) - Build a package with only
FreeBSD 7.2 binaries\n";
+ print " --freebsd (optional) - Build a package with only FreeBSD
8.2 binaries\n";
print " --arm (optional) - Build a package with only ARM Linux
binaries\n";
print " --ppc (optional) - Build a package with only PPC Linux
binaries\n";
print " --noCPAN (optional) - Build a package with no CPAN
modules included\n";
@@ -396,32 +396,31 @@
##############################################################################################
sub buildTarball {
my ($dirsToExclude, $tarballName, $dirsToInclude) = @_;
+ my ($dir,$exclusions,$inclusions,$cmd);
## Grab the variables passed to us...
- if ( ($dirsToExclude && $tarballName) || die("Problem: Not all of the
variables were passed to the BuildTarball function...") ) {
+ die("Problem: Not all of the variables were passed to the BuildTarball
function...") if !($dirsToExclude && $tarballName);
## First, lets make sure we get rid of the files we don't need for this
install
- my @dirsToExclude = split(/ /, $dirsToExclude);
- my $n = 0;
- $dirsToInclude ||= '';
- if ($dirsToInclude) {
- $dirsToInclude =~ s/ /\|/g;
- $dirsToInclude = "| grep -v -E '$dirsToInclude'" if
$dirsToInclude;
+ $inclusions = $exclusions = '';
+ foreach $dir (split(' ',$dirsToExclude)) {
+ if ($dir =~ s/!$//) {
+ $inclusions .= " $dir";
+ } else {
+ $exclusions .= " $dir";
}
-
- while ($dirsToExclude[$n]) {
- my $doInclude = '';
-
- # exclusions with a trailing ! should respect
inclusions
- if ($dirsToExclude[$n] =~ s/!$//) {
- $doInclude = $dirsToInclude;
}
+ $inclusions .= " $dirsToInclude" if $dirsToInclude;
+ $inclusions =~ s/^ //; $exclusions =~ s/^ //;
+ $inclusions =~ s/ /|/g; $exclusions =~ s/ /|/g;
- print "INFO: Removing $dirsToExclude[$n] files from
buildDir...\n";
- system("find $buildDir -depth | grep
'$dirsToExclude[$n]' $doInclude | xargs rm -rf &> /dev/null");
- $n++;
- }
+ $cmd = "find $buildDir -depth | egrep \"$exclusions\"";
+ $cmd .= " | egrep -v \"$inclusions\"" if $inclusions;
+ $cmd .= " | xargs rm -rf";
+
+ print "INFO: Removing unwanted files from buildDir...\n";
+ system($cmd);
## We want a pretty name as the output dir, so we rename the server directory
real quick
## (the old script would do an rsync here, but an rsync takes too long and is
an unnecessary waste of space, even temorarily)
@@ -435,7 +434,7 @@
## Remove the link
system("mv $buildDir/$name $buildDir/server");
}
-}
+
##############################################################################################
## Build an RPM package
##
--------------------
That's a "diff -uw", by the way. Sorry about that, but since this
needed more than a couple of braincells I used emacs, which unhelpfully
re-indented. The hacked scripts are at:
http://www.xenopsyche.com/ip/squeezeboxserver/buildme.sh
http://www.xenopsyche.com/ip/squeezeboxserver/buildme.pl
--
pallfreeman
NewsBot to luser: "You're obsolete. Nobody wants to talk to you,
irrelevant muppet".
------------------------------------------------------------------------
pallfreeman's Profile: http://forums.slimdevices.com/member.php?userid=37667
View this thread: http://forums.slimdevices.com/showthread.php?t=89187
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta