Search squid archive

Re: simple script to get squid 3.5.12 from Debian sid on Jessie.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not sure that this script will work. The script isn't doing much more then adding an unstable entry to the sources list and trying to _install_ the dependencies (Yes, apt-get build-deb squid will install the depencies directly on my debian jessie system)

As I described before: This will not work, because of the missing libecap3 that could not be installed on a stable debian without installing a bunch of other dependencies.


L.P.H. van Belle <belle@xxxxxxxxx> schrieb am Fr., 22. Jan. 2016 um 16:46 Uhr:
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,.


_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux