Skip to content

Commit

Permalink
fixes for debian directory
Browse files Browse the repository at this point in the history
The patch creates several packages:

ceph: The uber package that depends on ceph-mds ceph-osd ceph-mon ceph-fuse and ceph-source
ceph-mds: The ceph meta data server daemon
ceph-osd: The ceph object storage daemon
ceph-mon: The ceph cluster monitor
ceph-fuse: The ceph fuse client
ceph-source: The source for the ceph client kernel module for use with module-assistant
ceph-misc: Some ceph misc installed binaries
ceph-doc: What little ceph documentations in the source tarball

Hopefully this is useful.

Thanks,
- David Brown
  • Loading branch information
Brown, David M JR authored and liewegas committed Jul 24, 2008
1 parent cd57913 commit 524ec39
Show file tree
Hide file tree
Showing 22 changed files with 188 additions and 123 deletions.
1 change: 1 addition & 0 deletions debian/README.ceph
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a meta package to obtain all the ceph file system packages.
1 change: 1 addition & 0 deletions debian/ceph-cmon.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
1 change: 0 additions & 1 deletion debian/ceph-doc.docs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#DOCS#

1 change: 0 additions & 1 deletion debian/ceph-doc.install
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#DOCS#

1 change: 1 addition & 0 deletions debian/ceph-fuse.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
1 change: 1 addition & 0 deletions debian/ceph-fuse.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/cfuse
1 change: 1 addition & 0 deletions debian/ceph-mds.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
1 change: 1 addition & 0 deletions debian/ceph-mds.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/cmds
1 change: 1 addition & 0 deletions debian/ceph-misc.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
2 changes: 2 additions & 0 deletions debian/ceph-misc.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/bin/dumpjournal
usr/bin/streamtest
1 change: 1 addition & 0 deletions debian/ceph-mon.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/cmon
1 change: 1 addition & 0 deletions debian/ceph-osd.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
2 changes: 2 additions & 0 deletions debian/ceph-osd.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/bin/cosd
usr/bin/dupstore
1 change: 1 addition & 0 deletions debian/ceph-source.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/src/modules
1 change: 1 addition & 0 deletions debian/ceph-source.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/src/*
1 change: 1 addition & 0 deletions debian/ceph.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/doc/ceph
1 change: 1 addition & 0 deletions debian/ceph.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/doc/ceph/*
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ceph (0.1-1) unstable; urgency=low
ceph (0.3-1) unstable; urgency=low

* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>

Expand Down
72 changes: 69 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,79 @@ Source: ceph
Section: admin
Priority: optional
Maintainer: Sage Weil <[email protected]>
Build-Depends: debhelper (>= 5), autotools-dev, autoconf, automake, g++, gcc
Build-Depends: debhelper (>= 5), autotools-dev, autoconf, automake, g++, gcc, cdbs, libfuse-dev, libboost-dev
Standards-Version: 3.7.2

Package: ceph
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libc6, libstdc++6, libfuse2, libcommoncpp2-1.6-0
Depends: ${shlibs:Depends}, ${misc:Depends}, ceph-mon, ceph-osd, ceph-mds, ceph-fuse, ceph-source
Recommends: fuse-utils
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
excellent performance, reliability, and scalability.

Package: ceph-mon
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the monitor package and contains the monitor daemon and associated
utilities.

Package: ceph-mds
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the meta data server package and contains the meta data server daemon.

Package: ceph-osd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the object storage package and contains the object storage daemon.

Package: ceph-fuse
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the ceph fuse package and contains the ceph fuse for mounting ceph
with fuse.

Package: ceph-source
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the ceph kernel source package for use with module-assistant.

Package: ceph-misc
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the ceph misc installed binaries.

Package: ceph-doc
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ceph distributed file system
Ceph is a distributed network file system designed to provide
excellent performance, reliability, and scalability.
.
This is the ceph documentation.

22 changes: 22 additions & 0 deletions debian/control.modules.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Source: ceph
Section: contrib/otherosfs
Priority: extra
Maintainer: sage <[email protected]>
Build-Depends: debhelper (>= 5)
Standards-Version: 0.3

Package: ceph-modules-_KVERS_
Architecture: any
Depends: linux-modules-_KVERS_ | linux-image-_KVERS_
Provides: ceph-modules
Description: ceph modules for Linux (kernel _KVERS_)
This package contains the set of loadable kernel modules for the
ceph distributed parallel file system.
.
This package contains the compiled kernel modules for _KVERS_
.
If you have compiled your own kernel, you will most likely need to build
your own ceph-modules. The ceph-source package has been
provided for use with the Debian's module-assistant or kernel-package
utilities to produce a version of ceph-modules for your kernel.

136 changes: 19 additions & 117 deletions debian/rules
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,124 +1,26 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS
CC=gcc-4.1
CXX=g++-4.1

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_PYTHON_SYSTEM=pycentral
DEB_DH_INSTALL_SOURCEDIR = debian/tmp

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

config.status: configure
dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
./autogen.sh
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
common-install-arch::
mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/usr/share/doc/ceph
cp debian/README.ceph $(DEB_DH_INSTALL_SOURCEDIR)/usr/share/doc/ceph/
mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph
(cd src/kernel ; tar -cf - * ) | ( cd $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph ; tar -xf - )
cp src/include/ceph_fs.h $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/ceph_fs.h
mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/debian
-cp debian/* $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/debian
mv $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/debian/rules.modules.in $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/debian/rules
chmod +x $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules/ceph/debian/rules
( cd $(DEB_DH_INSTALL_SOURCEDIR)/usr/src ; tar -cjf ceph.tar.bz2 modules )
rm -rf $(DEB_DH_INSTALL_SOURCEDIR)/usr/src/modules


#Architecture
build: build-arch build-indep

build-arch: build-arch-stamp
build-arch-stamp: config.status
$(MAKE)
touch $@

build-indep: build-indep-stamp
build-indep-stamp: config.status
# $(MAKE) doc
touch $@

clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp

test \! -f Makefile || $(MAKE) distclean
rm -f config.sub config.guess

dh_clean

install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i

# Add here commands to install the indep part of the package into
# debian/<package>-doc.
#INSTALLDOC#

dh_install -i

install-arch:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s

# Add here commands to install the arch part of the package into
# debian/tmp.
$(MAKE) DESTDIR=$(CURDIR)/debian/ceph install

dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common

binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
60 changes: 60 additions & 0 deletions debian/rules.modules.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/make -f

PACKAGE=ceph-modules
### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules

# prefix of the target package name
# PACKAGE=pvfs-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make

# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)

# The kdist_configure target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the neccessary debian/ files
kdist_configure: prep-deb-files

# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean:
$(MAKE) $(MFLAGS) clean

### end KERNEL SETUP

# the binary-modules rule is invoked by module-assistant while processing the
# kdist* targets. It is called by module-assistant or make-kpkg and *not*
# during a normal build

binary-modules: prep-deb-files
dh_testroot
dh_clean -k
$(MAKE) KERNELDIR=$(KSRC) all
mkdir -p ./debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/ceph
cp ceph.ko ./debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/ceph/
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_strip
dh_installmodules
dh_install
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
dh_clean -k

0 comments on commit 524ec39

Please sign in to comment.