Thursday, November 11, 2010

Building ubuntu 10.10 deb for glusterfs 3.1 with posix acl support for samba ntfs acl

Tips for compiling glusterfs 3.1 with posix acl support (for samba ntfs acl)


sudo apt-get build-dep glusterfs-server
mkdir glusterfs
cd glusterfs
wget http://download.gluster.com/pub/gluster/glusterfs/3.1/LATEST/glusterfs-3.1.0.tar.gz
tar -xpvf glusterfs-3.1.0.tar.gz
ln -s glusterfs-3.1.0.tar.gz glusterfs_3.1.0.orig.tar.gz
cd glusterfs-3.1.0
mkdir debian



create debian/control with content:

Source: glusterfs
Section: admin
Priority: optional
Maintainer: none
Build-Depends: cdbs, debhelper (>= 7), autotools-dev, bison, flex,
libfuse-dev (>= 2.6.5), libibverbs-dev (>= 1.0.4), help2man, python-central,
libdb-dev, attr
Standards-Version: 3.8.4
Homepage: http://www.gluster.org/docs/index.php/GlusterFS


Package: glusterfs
Version: 3.1.0-2
Architecture: amd64
Conflicts: glusterfs-server, glusterfs-client
Depends: ${misc:Depends}, ${shlibs:Depends}, python, fuse-utils (>= 2.7.4), lsb-base (>= 3.0-6)
Suggests:
Description: clustered file-system (client package)
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
.
This package provides the FUSE based GlusterFS tool.



and debian/rules:


#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

include /usr/share/cdbs/1/class/autotools.mk


DEB_PYTHON_SYSTEM=pycentral





and debian/changelog


glusterfs (3.1.0-2) unstable; urgency=low

* New upstream release.

-- anonymous <foo@example.com
> Thu, 12 Nov 2010 20:23:01 +0200




chmod +x debian/rules


Enable Posix ACL support:
sed -i 's/^#define DISABLE_POSIX_ACL//' xlators/mount/fuse/src/fuse-bridge.h


Insert to the extras/init.d/glusterd-Debian.in and extras/init.d/glusterd-Debian.in
after 
PID=`test -f $PIDFILE && cat $PIDFILE`
line
CONFIGFILE=/etc/glusterfs/glusterd.vol


sed -i '/PID=/{p;s/.*/CONFIGFILE=\/etc\/glusterfs\/glusterd.vol/;}' extras/init.d/glusterd-Debian.in
sed -i '/PID=/{p;s/.*/CONFIGFILE=\/etc\/glusterfs\/glusterd.vol/;}' extras/init.d/glusterd-Debian



debuild -us -uc


now we can install:


sudo dpkg -i ../glusterfs_3.1.0-2_amd64.deb


For enable server:
sudo update-rc.d glusterd defaults


and for internal nfs server and InfiniBand support:
sudo apt-get install nfs-common portmap libibverbs1


You can download latest binary deb file from the http://dl.dropbox.com/u/2296931/glusterfs/glusterfs_3.2.0-2_amd64.deb

Tested on Ubuntu 10.04 and Ubuntu 10.10


Automate all operations with bash script: 
http://dl.dropbox.com/u/2296931/glusterfs/mkdeb.sh