Weblogs for debstar

Posted by debstar on Fri 11 Aug 2006 at 13:56
Tags: ,
Dear all, here is my 2c tips.

Firstly, let me tell you the reasons for which I need to build a package from source :
  1. I use Debian Sarge with a quite outdated package version,
  2. I need to install a recent version,
  3. using the apt tools is preferred,
  4. downloading a .deb file and install it doesn't work because of dependencies.

You may also need to build a package in unstable or testing version if for one reason or another, a recent version is required.

The package in question is Squid because in 2.5.x versions, the authentication scheme used for parent proxy is only Basic HTTP. However NEGOTIATE, KERBEROS and NTLM handling exist only in 2.6.x+ versions.
The 2.5.x versions worked for me before because my parent proxy was an MS-Proxy then MS ISA 2000. Now, they changed it into MS ISA 2004 without the Basic HTTP authentication scheme (security policy) so the need to upgrade.

This example is to build the .deb packages for the last stable version of Squid, at this writing 2.6.1-3. You need to download the files advised by http://packages.debian.org. I choosed the testing version in lieu of unstable because the version in testing is now the stable version of Squid. The files are : squid_2.6.1-3.diff.gz, squid_2.6.1.orig.tar.gz and squid_2.6.1-3.dsc

Issue the command :
$ cat squid_2.6.1-3.dsc
and you'll find the developpement libraries required to build the packages. For me I had to install these :
# apt-get install libpam0g-dev libldap2-dev dpatch po-debconf libdb4.3-dev fakeroot


Here is the steps to build the .deb files needed :
$ dpkg-source -x squid_2.6.1-3.dsc
$ cd squid-2.6.1/
$ gunzip -c ../squid_2.6.1-3.diff.gz| patch
$ fakeroot debian/rules binary

All the binary packages are in parent directory, Actually :
$ ls ../*deb
squid_2.6.1-3_i386.deb
squid-cgi_2.6.1-3_i386.deb
squidclient_2.6.1-3_i386.deb
squid-common_2.6.1-3_all.deb


The next step is to put these .deb files somewhere and update the apt database :
Insert this line in your /etc/apt/source.list. For one liners :
# echo "deb file:/home/debstar/mirror ./" >> /etc/apt/sources.list

$ mv *deb /home/debstar/mirror
$ dpkg-scanpackages /home/debstar/mirror /dev/null | gzip -f9 > /home/debstar/mirror/Packages.gz
# apt-get update
# apt-get install squid-common squid


Et voilà, it may complains of a bash script not found : log_daemon_msg but at least you are now using a recent stable release without upgrading to Sid.


$Id: Signature $
Nirina Michel RATOANDROMANANA

Debian is my 80/20 way.

 

Posted by debstar on Fri 10 Jun 2005 at 14:09
Tags: none.
If you have a network of windows clients and want to build a backup server with GNU/Linux, this 2 cents tip is for you. You need rsync, samba version 3, quota and cwrsync for windows clients.
First, the principles.
(*) Windows clients backup their files via rsync onto the backup server.
(*) If a user want to restore a file, his/her home directory can be browsed inside the network neighborhood as read only.
(*) Configure properly quota so the backup server won't run out of disk space.

On the server side, you need to install samba, winbind, quota, quotatool & rsync.
apt-get install samba winbind quota quotatool rsync

Then you configure you /etc/samba/smb.conf according to your network settings which is for samba and winbind while with /etc/rsync.conf, you don't need to change it. In /etc/samba/smb.conf, the following lines are essentials :
...
[homes]
   comment = Home Directories
   browseable = no
   writable = no
...
Seemlessly, these lines are available here and you just need to uncomment them. It's time to configure quota : You only need to edit /etc/fstab and, accordingly to your partitions (I put the homedir of the domain users under /home/DOMAIN and with its own partition) :
/dev/hda6   /home/DOMAIN   ext3   defaults,usrquota   0          0
This little bash script is helpfull when it's time to apply the quota rule for each domain user thanks to quotatool and wbinfo utilities :
#!/bin/sh
for i in `wbinfo -u`; do
    quotatool -u $i -bq 200M -l '250 Mb' /home/DOMAIN/
    # soft limit of 200 MBytes and hard limit of 250 MBytes
done

On the client side, we need to install cwrsync in a directory e.g C:\CWRSYNC. This batch can be scheduled to run once a day :
SET CWRSYNCHOME=C:\CWRSYNC
SET CYGWIN=NONTSEC
SET HOME=%HOMEDRIVE%%HOMEPATH%
SET PATH=%PATH%;%CWRSYNCHOME%
; The interresting thing begin here
rsync %USERNAME%@backup:
; To list the files on the server
rsync -auvzP /dir_to_backup/ %USERNAME%@backup:
; Copies the files in the directory onto the server
; If you want to assign a drive in the command above

Now, you can run this batch script to check evrything is okay.

 

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search