From f21dd9e88818f7f0883c8293bf743b9c56b77deb Mon Sep 17 00:00:00 2001 From: Alex Young Date: Wed, 30 May 2012 17:35:07 +0100 Subject: [PATCH] Basic debian packaging Add a build dependency on rake_utils, but we get simple debian packages out of it. --- Rakefile | 18 ++-- debian/changelog | 198 +++++++++++++++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 14 +++ debian/copyright | 53 +++++++++++ debian/flexnbd.install | 1 + debian/rules | 14 +++ debian/source/format | 1 + 8 files changed, 295 insertions(+), 5 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/flexnbd.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/Rakefile b/Rakefile index beebc72..da25c4b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,6 @@ +require 'rake_utils/debian' +include RakeUtils::DSL + DEBUG = true ALL_SOURCES =FileList['src/*'] @@ -75,9 +78,14 @@ OBJECTS.zip( SOURCES ).each do |o,c| end desc "Remove all build targets, binaries and temporary files" -rule 'clean' do - sh "rm -rf *~ build " + ( - TEST_MODULES.map { |n| ["tests/check_#{n}", "tests/check_#{n}.o"] }.flatten - ). - join(" ") +task :clean do + sh "rm -rf *~ build" +end + +namespace :pkg do + deb do |t| + t.code_files = ALL_SOURCES + ["Rakefile"] + t.pkg_name = "flexnbd" + t.generate_changelog! + end end diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a789000 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,198 @@ +flexnbd (0.0.1-33) unstable; urgency=low + + * Added tag 0.0.1 for changeset 27409c2c1313 [r33] + + -- Alex Young Wed, 30 May 2012 17:11:10 +0100 + +flexnbd (0.0.1-31) unstable; urgency=low + + * Fixed bug where ACL was accidentally deleted when being set from control [r31] + + -- mbloch Wed, 30 May 2012 13:03:02 +0100 + +flexnbd (0.0.1-30) unstable; urgency=low + + * Fix the usage message [r30] + + -- nick Wed, 30 May 2012 11:28:32 +0100 + +flexnbd (0.0.1-29) unstable; urgency=low + + * Fixed race in tests. [r29] + + -- mbloch Tue, 29 May 2012 17:01:54 +0100 + +flexnbd (0.0.1-28) unstable; urgency=low + + * Added getopt_long command-line handling. [r28] + + -- Alex Young Wed, 30 May 2012 15:19:40 +0100 + +flexnbd (0.0.1-27) unstable; urgency=low + + * Added .h files to the Rakefile [r27] + + -- Alex Young Wed, 30 May 2012 15:06:06 +0100 + +flexnbd (0.0.1-26) unstable; urgency=low + + * Rearranged the project to have src/ and build/ directories [r26] + + -- Alex Young Wed, 30 May 2012 09:51:20 +0100 + +flexnbd (0.0.1-25) unstable; urgency=low + + * Added .INCOMPLETE hack to aid with marking finished transfers. [r25] + + -- Matthew Bloch Tue, 29 May 2012 11:24:24 +0100 + +flexnbd (0.0.1-24) unstable; urgency=low + + * Added mirror write barrier / final pass stuff & clean exit afterwards. [r24] + + -- Matthew Bloch Tue, 29 May 2012 04:03:28 +0100 + +flexnbd (0.0.1-23) unstable; urgency=low + + * Lots of errors spotted by Alex fixed, added mutexes to accept & I/O, added [r23] + + -- mbloch Tue, 29 May 2012 00:59:12 +0100 + +flexnbd (0.0.1-22) unstable; urgency=low + + * Added another write/read test, fixed bugs in splice() usage and IPv6 [r22] + + -- Matthew Bloch Sun, 27 May 2012 14:40:16 +0100 + +flexnbd (0.0.1-21) unstable; urgency=low + + * First few external tests with test/unit, some minor tidying of internal data [r21] + + -- Matthew Bloch Thu, 24 May 2012 01:39:35 +0100 + +flexnbd (0.0.1-20) unstable; urgency=low + + * Pulled some duplicated code out of control.c into [r20] + + -- mbloch Wed, 23 May 2012 14:03:30 +0100 + +flexnbd (0.0.1-19) unstable; urgency=low + + * Split control-socket functions into separate file. [r19] + + -- Matthew Bloch Wed, 23 May 2012 00:42:14 +0100 + +flexnbd (0.0.1-18) unstable; urgency=low + + * Fixed mirroring to work (error reporting suspect though). [r18] + + -- Matthew Bloch Tue, 22 May 2012 00:22:06 +0100 + +flexnbd (0.0.1-17) unstable; urgency=low + + * Initial, untested mirror implementation and resolved some type confusion [r17] + + -- Matthew Bloch Mon, 21 May 2012 04:03:17 +0100 + +flexnbd (0.0.1-16) unstable; urgency=low + + * More valgrind-found bugs, extracted open_and_mmap from main code. [r16] + + -- Matthew Bloch Mon, 21 May 2012 04:00:45 +0100 + +flexnbd (0.0.1-15) unstable; urgency=low + + * Fixed some uninitialised variables courtesy of valgrind. [r15] + + -- Matthew Bloch Mon, 21 May 2012 03:59:43 +0100 + +flexnbd (0.0.1-14) unstable; urgency=low + + * Mostly finished bitset tests, fixed test build to include utilities, remove [r14] + + -- Matthew Bloch Mon, 21 May 2012 03:17:32 +0100 + +flexnbd (0.0.1-13) unstable; urgency=low + + * Tweaks to bitset.h, established a C test framework. [r13] + + -- Matthew Bloch Sun, 20 May 2012 14:38:46 +0100 + +flexnbd (0.0.1-12) unstable; urgency=low + + * Fixed segfaulting access control, allowed change to acl via control socket. [r12] + + -- Matthew Bloch Sat, 19 May 2012 12:48:03 +0100 + +flexnbd (0.0.1-11) unstable; urgency=low + + * Added dummy control socket answering / changed serve_accept_loop to use [r11] + + -- Matthew Bloch Fri, 18 May 2012 23:39:16 +0100 + +flexnbd (0.0.1-10) unstable; urgency=low + + * Added control socket, doesn't do anything yet. [r10] + + -- mbloch Fri, 18 May 2012 18:44:34 +0100 + +flexnbd (0.0.1-9) unstable; urgency=low + + * Added .hgignore file [r9] + + -- Matthew Bloch Fri, 18 May 2012 13:25:54 +0100 + +flexnbd (0.0.1-8) unstable; urgency=low + + * Stopped NBD writes from committing all-zero blocks to disc (tentative, needs [r8] + + -- Matthew Bloch Fri, 18 May 2012 13:24:35 +0100 + +flexnbd (0.0.1-7) unstable; urgency=low + + * Split code out into separate compilation units (first pass, anyway). [r7] + + -- Matthew Bloch Thu, 17 May 2012 20:14:22 +0100 + +flexnbd (0.0.1-6) unstable; urgency=low + + * Non-functioning commit, half-way through adding sparse bitmap feature. [r6] + + -- Matthew Bloch Thu, 17 May 2012 11:54:25 +0100 + +flexnbd (0.0.1-5) unstable; urgency=low + + * Added write mode. [r5] + + -- Matthew Bloch Wed, 16 May 2012 11:58:41 +0100 + +flexnbd (0.0.1-4) unstable; urgency=low + + * Added working read via splice syscall. [r4] + + -- Matthew Bloch Wed, 16 May 2012 03:20:09 +0100 + +flexnbd (0.0.1-3) unstable; urgency=low + + * Added Rakefile [r3] + + -- mbloch Wed, 16 May 2012 01:27:14 +0100 + +flexnbd (0.0.1-2) unstable; urgency=low + + * Silly bug fixes, added ACL support, added parser for read/write requests. [r2] + + -- mbloch Tue, 15 May 2012 18:40:58 +0100 + +flexnbd (0.0.1-1) unstable; urgency=low + + * Some debugging, got it to serve. [r1] + + -- Matthew Bloch Tue, 15 May 2012 03:16:19 +0100 + +flexnbd (0.0.1-0) unstable; urgency=low + + * It compiles :) [r0] + + -- Matthew Bloch Tue, 15 May 2012 02:42:03 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..458d46a --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: flexnbd +Section: unknown +Priority: extra +Maintainer: Alex Young +Build-Depends: cdbs, debhelper (>= 7), ruby, rake, gcc +Standards-Version: 3.8.1 +Homepage: http://bigv.io/ + +Package: flexnbd +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: FlexNBD server + An NBD server offering push-mirroring and intelligent sparse file handling + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..dba1271 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,53 @@ +This work was packaged for Debian by: + + Alex Young on Wed, 30 May 2012 16:46:58 +0100 + +It was downloaded from: + + + +Upstream Author(s): + + + + +Copyright: + + + + +License: + +### SELECT: ### + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. +### OR ### + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. +########## + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +The Debian packaging is: + + Copyright (C) 2012 Alex Young + +you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/debian/flexnbd.install b/debian/flexnbd.install new file mode 100644 index 0000000..6c73f84 --- /dev/null +++ b/debian/flexnbd.install @@ -0,0 +1 @@ +build/flexnbd usr/bin diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8303c60 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_build: + rake flexnbd + +override_dh_auto_clean: + rake clean diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)