PDA

View Full Version : Build a package from the source package (samba 3.2.3-3)



johnrw
10-17-2008, 03:19 AM
Once easy way to introduce errors into the installation is for a Knoppix user to install Debian .deb binary packages.
Though built with slightly differing versions of other system libraries, but different nonetheless, it can introduce
problems with programs you will most probably use often. There is a better way. Build a binary .deb you can
immediately install afterward. Apt-get can do this also... and here is a quick link to show that method. You
don't need to be root user using the apt-get method.
http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html

Now even though I disregard the notion in this example... I do so to keep it brief.
I like this method because it seems to be a more incremental way to do it. That way if something in the way of
conflicts or dependencies is a problem... I can fix it before proceeding. Here are the steps I used to build
Samba 3.2.3.

mkdir samba-test
cd samba-test/

apt-get source samba
cd samba-3.2.3/

# This next step revealed I needed to install libtalloc-dev and libtalloc1
# I probably should have built these from source, but I just installed them from apt-get.
apt-get build-dep samba

# Here I really had no idea what sort of comment to attach... except I wanted make sure I'd know what version
of Knoppix was used to build it.
dch -l local 'samba-3.2.3-3_knoppix-5.3.1'
# This failed because of a dependancy on a library not installed, I think it was libfam
debuild -us -uc
# I then followed the suggestion to override with a -d since famd is not even installed.
debuild -us -uc -d

# This next bunch of debs is really one long line, though I could have used creative wildcards.
dpkg -i samba_3.2.3-3local1_i386.deb libwbclient0_3.2.3-3local1_i386.deb libpam-smbpass_3.2.3-3local1_i386.deb libsmbclient_3.2.3-3local1_i386.deb samba-common_3.2.3-3local1_i386.deb

dpkg -l | grep samba
ii samba 2:3.2.3-3local1
a LanManager-like file and printer server fo
ii samba-common 2:3.2.3-3local1
Samba common files used by both the server a

When installing them... I was told I had modified my config files... and given a choice to keep,
replace, see a diff, and some other useful options... in the case of a conflict of /etc/samba/smb.conf
between the one in the.deb and the one already on my system.
And there it is... Samba 3.2.3-3 locally built and installed.