freepops-0.2.9/0000755000175000017500000000000011125434250012372 5ustar tassitassifreepops-0.2.9/scripts/0000755000175000017500000000000011125434250014061 5ustar tassitassifreepops-0.2.9/scripts/cvs2changelog.lua0000755000175000017500000000327010717576731017337 0ustar tassitassi#!/usr/bin/lua --print("called with :") --table.foreach(arg,print) function is_all(s,c) for i=1,string.len(s) do if string.byte(s,i) ~= string.byte(c) then return false end end return true end function basename(s) local _,_,x,y = string.find(s,"(.*)/(.*)") if x == nil or y == nil then return s else return basename(y) end end if #arg < 2 then print([[ cvs2changelog.lua should be called with 2 aguments: 1) the number of days 2) the file name ]]) os.exit(1) end file = "/tmp/cvs2changelog-"..string.gsub(arg[2],"/","-")..arg[1] os.execute("cvs log -d \">"..arg[1].." day ago\" "..arg[2].." 2 ".. file) f = io.open(file,"r") log = {} current = {} passed = {} status = "nothing" for l in f:lines() do local _,_,x = string.find(l,"^(revision)") -- the begin of a block if x ~= nil and status == "nothing" then table.insert(log,current) status = "revision" -- print(table.concat(passed,'\n')) -- table.foreach(current, print) passed = {} current = {} end table.insert(passed, l) if status == "revision" then local _,_,r = string.find(l,"^revision ([%d%.]+)") current.revision = r status = "date" elseif status == "date" then local _,_,a = string.find(l,"author: ([%w]+);") local _,_,n = string.find(l,"lines: (.+)$") current.author = a current.lines = n status = "comment" elseif status == "comment" then if is_all(l,"-") or is_all(l,"=") then status = "nothing" else current.comment = (current.comment or "" ) .. string.gsub(l,"\n","") end end end table.insert(log,current) table.foreach(log,function(_,v) if v.revision ~= nil then print("- " .. arg[2] .. ": " .. v.comment .. " ("..v.author..")") end end) freepops-0.2.9/scripts/compile-openssl-universal.sh0000755000175000017500000000162210570636765021562 0ustar tassitassi#!/bin/sh set -e set -x rm -rf openssl-0.9.7l/ tar -xvzf openssl-0.9.7l.tar.gz cd openssl-0.9.7l/ ./Configure --prefix=/Users/enricotassi/freepops/lib 'darwin/gcc:gcc -O3 -fomit-frame-pointer -DB_ENDIAN -arch ppc -isysroot /Developer/SDKs/MacOSX10.3.9.sdk/ -mmacosx-version-min=10.3 -D_REENTRANT' make || true mv libssl.a SAVE.libssl.a.10.3.ppc mv libcrypto.a SAVE.libcrypto.a.10.3.ppc make clean ./Configure --prefix=/Users/enricotassi/freepops/lib 'darwin/gcc:gcc -O3 -fomit-frame-pointer -fno-common -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4 -D_REENTRANT' make || true mv libssl.a SAVE.libssl.a.10.4.i386 mv libcrypto.a SAVE.libcrypto.a.10.4.i386 lipo -create -output libssl.a SAVE.libssl.a.10.3.ppc SAVE.libssl.a.10.4.i386 lipo -create -output libcrypto.a SAVE.libcrypto.a.10.3.ppc SAVE.libcrypto.a.10.4.i386 file libssl.a file libcrypto.a sudo make install #eof freepops-0.2.9/scripts/compile-zlib-universal.sh0000755000175000017500000000173110570636766021041 0ustar tassitassi#!/bin/sh set -e set -x rm -rf zlib-1.2.3 tar -xvzf zlib-1.2.3.tar.gz cd zlib-1.2.3 CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.3.9.sdk/ -mmacosx-version-min=10.3" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk/" \ ./configure --prefix=/Users/enricotassi/freepops/lib CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.3.9.sdk/ -mmacosx-version-min=10.3" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk/" \ make mv libz.a SAVE.libz.a.10.3 make clean CFLAGS="-arch i386 -arch x86_64 -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=/Users/enricotassi/freepops/lib CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ make mv libz.a libz.a.10.4 lipo -create -output libz.a SAVE.libz.a.10.3 libz.a.10.4 sudo make install file libz.a freepops-0.2.9/scripts/countlines.sh0000755000175000017500000000254010552440052016604 0ustar tassitassi#!/bin/bash CONTRIB="getdate getopt pthread regex lua luadoc luafilesystem ." i=0 OLDDIR=`pwd` for X in modules/src/* src/ ; do [ -d $X ] || continue [ `basename $X` != "CVS" ] || continue modules[$i]=`basename $X` cd $X C[$i]=$(expr `find . -name \*.c -exec wc -l \{\} \; | cut -f 1 -d " " | tr -s "\n" "+" | sed s/\+/\ +\ /g` `find . -name \*.h -exec wc -l \{\} \; | cut -f 1 -d " " | tr -s "\n" "+" | sed s/\+/\ +\ /g` 0) L[$i]=$(expr `find . -name \*.lua -exec wc -l \{\} \; | cut -f 1 -d " " | tr -s "\n" "+" | sed s/\+/\ +\ /g` `find . -name \*.pkg -exec wc -l \{\} \; | cut -f 1 -d " " | tr -s "\n" "+" | sed s/\+/\ +\ /g` 0) cd $OLDDIR i=`expr $i + 1` done CC=0 LL=0 for (( j = 0 ; j < $i ; j = j + 1 )); do N=`echo $CONTRIB | grep "${modules[$j]} " | wc -l` if [ $N -eq 1 ]; then continue; fi CC=`expr $CC + ${C[$j]}` LL=`expr $LL + ${L[$j]}` done echo echo -e "\t+----------------------+-------+-------+" echo -e "\t| module | C | LUA |" echo -e "\t+----------------------+-------+-------+" for (( j = 0 ; j < $i ; j = j + 1 )); do printf "\t| %-20s | %5d | %5d |\n" ${modules[$j]} ${C[$j]} ${L[$j]} done echo -e "\t+----------------------+-------+-------+" printf "\t| %-20s | %5d | %5d |\n" "total*" $CC $LL echo -e "\t+----------------------+-------+-------+" echo echo -e "* without contrib modules:\n\t$CONTRIB" echo freepops-0.2.9/scripts/compile-expat-universal.sh0000755000175000017500000000063111021616400021167 0ustar tassitassi#!/bin/sh PREFIX=/Users/gares/freepops/ set -e #set -x rm -rf expat-1.95.8 tar -xvzf expat-1.95.8.tar.gz cd expat-1.95.8 CFLAGS="-arch ppc -arch i386 -arch x86_64 -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=$PREFIX --disable-shared && \ make && sudo make install file .libs/libexpat.a freepops-0.2.9/scripts/compile-curl-universal.sh0000755000175000017500000000153711117005512021023 0ustar tassitassi#!/bin/sh PREFIX=/Users/gares/freepops/ set -e #set -x rm -rf curl-7.18.1 tar -xvzf curl-7.18.1.tar.gz cd curl-7.18.1 CFLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=$PREFIX --disable-shared --with-ssl=/Developer/SDKs/MacOSX10.4u.sdk/usr/include/openssl/ && \ make && sudo make install && make distclean CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=$PREFIX --disable-shared --with-ssl=/Developer/SDKs/MacOSX10.4u.sdk/usr/include/openssl/ && \ make lipo -create -output ../libcurl.a lib/.libs/libcurl.a $PREFIX/lib/libcurl.a sudo mv ../libcurl.a $PREFIX/lib/ file $PREFIX/lib/libcurl.a # && sudo make install freepops-0.2.9/scripts/compile-gettext-universal.sh0000755000175000017500000000060411103063134021533 0ustar tassitassi#!/bin/sh PREFIX=/Users/gares/freepops/ set -e #set -x rm -rf gettext-0.17/ tar -xvzf gettext-0.17.tar.gz cd gettext-0.17/ CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=$PREFIX --disable-shared && \ make && sudo make install file .libs/libgettext.a freepops-0.2.9/scripts/compile-fltk-universal.sh0000755000175000017500000000150311020307207021006 0ustar tassitassi#!/bin/sh set -e set -x PREFIX=/Users/gares/freepops/ rm -rf fltk-1.1.7 tar -xvzf fltk-1.1.7-source.tar.gz cd fltk-1.1.7 mkdir private for ARCH in ppc i386; do make clean CFLAGS="-arch $ARCH -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ CXXFLAGS="-arch $ARCH -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -mmacosx-version-min=10.4" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" \ ./configure --prefix=$PREFIX --disable-gl --disable-threads && make for X in lib/*.a; do mv $X private/`basename $X`.$ARCH; done mv fluid/fluid private/fluid.$ARCH done for X in lib/libfltk.a lib/libfltk_forms.a lib/libfltk_images.a lib/libfltk_jpeg.a lib/libfltk_png.a fluid/fluid; do lipo -create -output $X private/`basename $X`.ppc private/`basename $X`.i386 done file lib/libfltk.a sudo make install freepops-0.2.9/scripts/add_head.sh0000755000175000017500000000125110552440052016130 0ustar tassitassi#!/bin/bash function usage { echo "usage: add_head.sh [-t] file headfile" echo " -t : test only (do not patch)" } function add_head { TEST_ONLY=0 if [ -z "$1" -o -z "$2" ] ; then usage exit 1 fi if [ "$1" = "-t" -a -z "$3" ] ; then usage exit 1 fi if [ "$1" = "-t" ] ; then TEST_ONLY=1 FILE="$2" HEAD="$3" FILENEW="$2--" else FILE="$1" HEAD="$2" FILENEW="$1--" fi TMP=`mktemp` L=`wc -l $HEAD | cut -f 1 -d " "` head -n $L $FILE > $TMP if diff $TMP $HEAD >/dev/null; then echo "skipping $FILE" else if [ $TEST_ONLY -eq 0 ] ; then mv $FILE $FILENEW cat $HEAD $FILENEW > $FILE rm $FILENEW else echo "patching $FILE" fi fi rm $TMP } add_head "$@" freepops-0.2.9/scripts/close_ch.sh0000755000175000017500000000260510717601103016201 0ustar tassitassi#!/bin/bash LAST_LINE=`grep "^[0-9]" ChangeLog | head -n 1` LAST_VERSION=`echo $LAST_LINE | cut -d " " -f 2` LAST_DATE=`echo $LAST_LINE | cut -d " " -f 1` NEW_DATE=`date +%d/%m/%Y` NEW_VERSON_MAJ=`echo $LAST_VERSION | cut -d "." -f 1` NEW_VERSON_MIN=`echo $LAST_VERSION | cut -d "." -f 2` NEW_VERSON_PATCH=`echo $LAST_VERSION | cut -d "." -f 3` (( NEW_VERSON_PATCH= $NEW_VERSON_PATCH + 1 )) NEW_VERSION="$NEW_VERSON_MAJ.$NEW_VERSON_MIN.$NEW_VERSON_PATCH" LAST_DAY=`echo $LAST_DATE| cut -d "/" -f 1` LAST_MONTH=`echo $LAST_DATE| cut -d "/" -f 2` LAST_YEAR=`echo $LAST_DATE| cut -d "/" -f 3` LAST_DAYS=`date -d $LAST_MONTH/$LAST_DAY/$LAST_YEAR +%s` NEW_DAYS=`date +%s` ((DAYS= $NEW_DAYS - $LAST_DAYS )) ((DAYS= $DAYS / 86400)) echo "[`date`] Please wait... cvs mining is slow... (starting from $DAYS days ago)" make distclean >/dev/null 2>/dev/null rm -f ChangeLog-NEW ALL=`cvs log -d "> $DAYS days ago" 2>/dev/null | scripts/modified.lua` ALL_NO=`echo $ALL | wc -w` i=0 for F in $ALL; do echo -en "\rprocessing file $i of $ALL_NO" scripts/cvs2changelog.lua $DAYS $F >> ChangeLog-NEW ((i=$i+1)) done echo cat ChangeLog-NEW | scripts/cvschpretty.lua > ChangeLog-NEW-PRETTY echo "$NEW_DATE $NEW_VERSION" > ChangeLog-Head cat ChangeLog-Head ChangeLog-NEW-PRETTY ChangeLog > ChangeLog-Complete mv ChangeLog-Complete ChangeLog rm ChangeLog-NEW ChangeLog-NEW-PRETTY ChangeLog-Head echo "[`date`] Finished" freepops-0.2.9/scripts/escaped.lua0000644000175000017500000000065210706642660016205 0ustar tassitassi#!/usr/bin/lua assert(os.setlocale("en_US"),"unable to set locale") res = {} for i=0,255 do local _,_,c = string.find(string.char(i),"(%C)") if c ~= nil then table.insert(res,string.format("%s = %03d",c,string.byte(c))) end end q = math.ceil(#res/4) fake = " " for i=1,q-1 do print(string.format("\t%s\t\t%s\t\t%s\t\t%s", res[i] or fake, res[i+q] or fake, res[i+q+q] or fake, res[i+q+q+q] or fake)) end freepops-0.2.9/scripts/modified.lua0000755000175000017500000000042510717576133016365 0ustar tassitassi#! /usr/bin/lua status = "nothing" curfile = nil for l in io.lines() do f = string.match(l,"^Working file: (.*)") curfile = f or curfile r = string.match(l,"selected revisions: (%d*)") if r ~= nil and tonumber(r) ~= nil and tonumber(r) > 0 then print(curfile) end end freepops-0.2.9/scripts/dailybuild.sh0000644000175000017500000000147111103063342016536 0ustar tassitassi#!/bin/sh #set -x export PATH=/bin:/usr/bin/:/usr/local/bin/ rm -fr /tmp/fp mkdir -p /tmp/fp/toupload/ cd /tmp/fp while [ ! -d freepops ]; do cvs -d:ext:gareuselesinge@cvs.freepops.org:/cvsroot/freepops/ \ co freepops sleep 30 done cd freepops ./configure.sh linux make tgz-dist cp dist-tgz/*.tar.gz ../toupload/ make -C /home/tassi/Projects/freepops/mingw32_freepops/ switch-to-gnutls \ make -C buildfactory dist-win-gnutls cp dist-win/*.exe ../toupload/ make -C /home/tassi/Projects/freepops/mingw32_freepops/ switch-to-openssl \ make distclean make -C buildfactory dist-win-openssl cp dist-win/*.exe ../toupload/ cd ../toupload scp * marcello.cs.unibo.it:public_html/beta/daily/ ssh marcello.cs.unibo.it &>/dev/null <> /tmp/freepops.pbuild.sh.check_bases.err \ 1>> /tmp/freepops.pbuild.sh.check_bases.out for X in $TODO; do D=`pwd` TMP=`mktemp -d` echo -e "\n *** preparing .dsc ($X) ***\n" prepare_dsc $TMP $X cd $TMP echo -e "\n *** building ($X) ***\n" build $X $D cd $D echo -e "\n *** cleaning ($X) ***\n" rm -rf $TMP done #eof freepops-0.2.9/scripts/check-status-published.sh0000755000175000017500000000052411102355466021002 0ustar tassitassi#!/bin/bash echo The following files differ from the one published: TODO=`find ../updates/published/ -name \*.lua` for F in $TODO; do bF=`basename $F` F1=`find . -name $bF | head -n 1` if ! diff $F $F1 >/dev/null; then D=`diff -u $F $F1 | grep -v 'Id:.*Exp' | wc -l` if [ $D -gt 9 ]; then echo ' ' $bF "($D lines)" fi fi done freepops-0.2.9/scripts/build_rpm_expat.so.0.sh0000755000175000017500000000163610552440052020362 0ustar tassitassi#!/bin/bash set -e function inform_cvs(){ echo -e "In order to properly build deb for all debian distros you must" echo -e "have the pbuilder and sudo packages installed and the packages" echo -e "CVS module. In the latest you will find a README." echo -e "Try one of the following\n" echo -e "cvs -d :ext:$USER@cvs.sf.net:/cvsroot/freepops co packages" echo -e "cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/freepops login && \ " echo -e " cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/freepops co packages\n" echo -e "This script should be called only by the packages/ scripts, " echo -e "not by hand." exit 1 } [ -d ../packages/ ] || inform_cvs OLD=`pwd` cd /tmp rm -rf freepops-expat mkdir freepops-expat cd freepops-expat apt-get source --download-only expat tar -xvzf *orig.tar.gz mv expat-* expat cd expat ./configure make cd $OLD make distclean make -C buildfactory dist-rpm mv dist-rpm ../packages/freepops-rpm freepops-0.2.9/scripts/cvschpretty.lua0000755000175000017500000000116710717600716017162 0ustar tassitassi#!/usr/bin/lua comments = {} for l in io.stdin:lines() do --print("processo ", l) local fname = string.match(l,"- ([^:]*):") local comment = string.match(l,"- [^:]*:(.*)") --print("ottengo" , fname, comment) if comment and fname and fname ~= 'ChangeLog' then if comments[comment] == nil then comments[comment] = {fname} else table.insert(comments[comment],fname) end end end lines = {} for k,v in pairs(comments) do table.sort(v) filename = table.concat(v,", ") k = string.gsub(k," "," ") table.insert(lines, "- " .. filename .. ":" .. k) end table.sort(lines) for _,l in ipairs(lines) do print(l) end freepops-0.2.9/scripts/create_jail.sh0000755000175000017500000000461611103031356016665 0ustar tassitassi#!/bin/sh ############################################################################### # Made by Enrico Tassi # Distributed under the GPL license # # This script should create a jail for freepopsd. # # # #configure this################################################################ FPBIN="/usr/bin/freepopsd" FPFILES="/usr/share/freepops/lua" FPCONF="/etc/freepops" CHROOTDIR="/var/lib/freepops/chroot-jail/" USER="nobody" GROUP="nogroup" #options parsing############################################################### case "$1" in create) echo -n "Creating chroot-jail for freepops in $CHROOTDIR ..." ;; get-dir) echo -n "$CHROOTDIR" exit 0 ;; *) echo "usage: create_jail.sh (create|get-dir)" exit 1 ;; esac #create the jail############################################################### # should we set umask here? #clean rm -rf $CHROOTDIR # create the dir tree mkdir -p $CHROOTDIR cd $CHROOTDIR for X in var/log/ var/lib/freepops/lua_updates/ var/run/ etc/ usr/share/freepops/ usr/bin/ usr/lib/ lib/ dev/ home/nobody; do mkdir -p $X done # set permissions chmod g+w var/log/ chmod g+w var/run/ chown $USER.$GROUP var/log/ chown $USER.$GROUP var/run/ # for 64 bit ln -s lib lib64 cd usr ln -s lib lib64 cd .. # needed libs that are linked at compile time for X in `ldd $FPBIN | sed 's/=>/*/' | cut -d '*' -f 2 | cut -d \( -f 1 | tr -d '[:blank:]' | cut -c 2-`; do mkdir -p `dirname $X` cp /$X $X done # libc6 for X in `dpkg -L libc6 | grep "^/lib/.*so.*" | grep -v "^/.*/.*/"`; do mkdir -p .`dirname $X` cp $X .$X done #copy etc conffiles for X in /etc/resolv.conf /etc/hosts /etc/services; do cp $X etc/ done #create ad hoc files echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/sh" > etc/passwd echo "nogroup:x:65534:" > etc/group #make /dev/null mknod -m 0666 dev/null c 1 3 #make /dev/random mknod -m 0444 dev/random c 1 8 #make /dev/urandom mknod -m 0444 dev/urandom c 1 9 #copy freepops files cp $FPBIN usr/bin/ cp -r $FPFILES usr/share/freepops/ cp -r $FPCONF etc/ #create the script############################################################# cat > $CHROOTDIR/start.sh << EOT #!/bin/sh export HOME=/home/$USER/ export USER=$USER cd $CHROOTDIR exec -a chroot chroot . usr/bin/freepopsd \$@ -s $USER.$GROUP EOT chmod a+rx $CHROOTDIR/start.sh #thats all folks############################################################### echo "done." #eof freepops-0.2.9/configure.sh0000755000175000017500000002124711117162641014723 0ustar tassitassi#!/bin/sh # vim:ts=4: usage() { cat << EOT usage: ./configure.sh