I have created an RPM Spec file (shown below) which includes several
packages including one for the kernel-client modules.  Note, you need to
change the "kernel" definition in the spec file to whatever kernel
version you are building against.

 

Here's how I organized the packages:

 

ceph

>  ceph-mds

>  ceph-osd

>  ceph-extras

>  kmod-ceph

ceph-devel

 

The ceph package will pull in all four packages (ceph-mds, ceph-osd,
ceph-extras, and kmod-ceph).  The ceph-devel package pulls in all of the
requirements to compile the ceph source code.

 

Hope this helps, and maybe it can be added to the git source repository.

 

-Brock

 

%define pkg_version 0.3
%define kernel 2.6.23.1-42.fc8
# Build against the running kernel - this can be changed to whatever
kernel version you want to build against.
%define kernel %(uname -r)
%define mybuildroot
%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define optflags ""

Name:             ceph
Version:    %{pkg_version}~gitdccae6d2cdff13f6a1ce545fde2623222222979a
Release:    1%{?dist}
Packager:   Brock Erwin <[EMAIL PROTECTED]>
Summary:    ceph mds, osd, and kernel-client
License:    LGPL
Group:            Utilities/System
URL:        http://ceph.newdream.net/
Source:     %{name}-%{pkg_version}.tar.gz
BuildRequires:    gcc-c++, libtool, libtool-ltdl-devel, boost-devel,
git, perl, perl-devel, swig, fuse-devel, gdbm, kernel-devel == %{kernel}
BuildRoot:  %{mybuildroot}
Requires:   ceph-mds, ceph-osd, kmod-ceph-%{kernel}, ceph-extras

%description
Ceph is a distributed network file system designed to provide excellent
performance, reliability, and scalability.

%package mds
Summary:    mds binaries
Group:            Utilities/System
Requires:   libstdc++, glibc-devel, glibc, libgcc
%description mds
mds binaries

%package osd
Summary:        Git tools for importing Subversion repositories
Group:          Utilities/System
Requires:   libstdc++, glibc-devel, glibc, libgcc
%description osd
osd binaries

%package -n kmod-ceph-%{kernel}
Summary:        kernel-client tools for mounting the ceph file system.
Group:          Utilities/System
Requires:       libstdc++, glibc-devel, glibc, libgcc
%description -n kmod-ceph-%{kernel}
kernel-client module

%package devel
Summary:        kernel-client tools for mounting the ceph file system.
Group:          Utilities/System
Requires:       gcc-c++, libtool, libtool-ltdl-devel, boost-devel, git,
perl, perl-devel, swig, fuse-devel, gdbm, kernel-devel == %{kernel}
%description devel
ceph-development/building requirements

%package extras
Summary:        kernel-client tools for mounting the ceph file system.
Group:          Utilities/System
Requires:       libstdc++ 
%description extras
extra ceph binaries used for testing and stuff...

%prep
%setup -q -n %{name}-%{pkg_version}

%build
./autogen.sh
%{configure}
make %{_smp_mflags}
make -C src/kernel KERNELDIR=/lib/modules/%{kernel}/build # Build the
kernel module

%install
%{makeinstall}
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel}/extra
install src/kernel/ceph.ko $RPM_BUILD_ROOT/lib/modules/%{kernel}/extra
# Install the kernel module
mkdir -p $RPM_BUILD_ROOT/usr/share/ceph
install README $RPM_BUILD_ROOT/usr/share/ceph
install INSTALL $RPM_BUILD_ROOT/usr/share/ceph

%clean
rm -rf $RPM_BUILD_ROOT

%files
/usr/share/ceph/README

%files mds
%{_bindir}/cmds
# Monitor files below
%{_bindir}/cmon
%{_bindir}/cmonctl
%{_bindir}/crushtool
%{_bindir}/mkmonfs
%{_bindir}/monmaptool
%{_bindir}/osdmaptool

%files osd
%{_bindir}/cosd
%{_bindir}/dupstore

%files -n kmod-ceph-%{kernel}
/lib/modules/%{kernel}/extra/ceph.ko

%files extras
%{_bindir}/cfuse
%{_bindir}/csyn
%{_bindir}/dumpjournal
%{_bindir}/fakefuse
%{_bindir}/fakesyn
%{_bindir}/mkfs.ebofs
%{_bindir}/psim
%{_bindir}/streamtest
%{_bindir}/test.ebofs

%files devel
/usr/share/ceph/INSTALL

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ceph-devel mailing list
Ceph-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ceph-devel

Reply via email to