[squid-users] simple script to get squid 3.5.12 from Debian sid on Jessie.

L.P.H. van Belle belle at bazuin.nl
Fri Jan 22 15:46:14 UTC 2016


No, this is NOT a problem at all. 
You need 4 ! files and no other sid depends, just debian Jessie. 
Its a quick write, but should be error free, tested until the squid compile. 

I use a separated VM for this and all my created debs are available throuh webaccess, like normal, below is based on "local install" if you want to have is network available, look het het apt/sources.list.d/lcoalrepo.list,
change to needed hostname for your webserver etc.. not explained here.. 
but should be easy to do.

Create a file, add content below ( sed CODE ),
chmod +x and run it. (as root) 

In the end you have a compiled squid 3.5.12, ready to instal with ssl enabled. Which is just a apt-get install squid then. 
And !! all squid3 is now changed to squid !! 

Enjoy, and have a nice weekend,  

Greetz, 

Louis


### CODE, run as root, can be beter, but a quicky for you. 
#!/bin/bash 

SETPATH=`pwd` 
if [ ! -e /etc/apt/sources.list.d/sid.list ]; then
# adding sid repo
cat << EOF >> /etc/apt/sources.list.d/sid.list
#
#deb http://ftp.nl.debian.org/debian/ sid main non-free contrib
deb-src http://ftp.nl.debian.org/debian/ sid main non-free contrib
EOF
fi

if [ ! -e /etc/apt/sources.list.d/localrepo.list ]; then
# adding local repo ( webserver based )
cat << EOF >> /etc/apt/sources.list.d/localrepo.list
#
# change if you done have a webserver.
#file:/var/www/mydebs ./ 
deb http://localhost/mydebs/ ./
EOF

fi

if [ ! -e /var/www/mydebs ]; then 
# get dependes, sources and build sources, setup local apt. 
mkdir -p  /var/www/mydebs 
apt-get install dpkg-dev -y
fi

for x in c-icap c-icap-modules libecap squid ; do 
apt-get build-dep $x
apt-get source $x
if [ $x = squid ]; then 
	sed -i 's/--with-default-user=proxy/--with-default-user=proxy \\/g' squid3-3.5.12/debian/rules
	sed -i '/with-default-user=proxy/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ --enable-ssl \\'  squid3-3.5.12/debian/rules
	sed -i '/enable-ssl/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ --with-open-ssl=/etc/ssl/openssl.cnf \\'  squid3-3.5.12/debian/rules
	sed -i '/with-open-ssl/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ --enable-linux-netfilter'  squid3-3.5.12/debian/rules
fi
apt-get source $x -b 

cp *.deb /var/www/mydebs
cd /var/www/mydebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
cd $SETPATH
echo "Running apt-get update, please wait."
apt-get update 2> /dev/null
sleep 1
done

## CODE ENDS,.



More information about the squid-users mailing list