Browse Source

Lots of modernization into vblade 22, and no lintian errors or warnings.

David Martínez Moreno 8 years ago
parent
commit
eb85fcd2af

+ 1 - 1
debian/compat

@@ -1 +1 @@
-6
+9

+ 6 - 4
debian/control

@@ -1,14 +1,16 @@
 Source: vblade
 Section: admin
 Priority: optional
-Homepage: http://aoetools.sf.net
 Maintainer: David Martínez Moreno <ender@debian.org>
-Standards-Version: 3.8.2
-Build-Depends: debhelper (>= 6), quilt (>= 0.46-7)
+Standards-Version: 3.9.6
+Build-Depends: debhelper (>= 9)
+Homepage: http://aoetools.sf.net
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/vblade.git
+Vcs-Git: git://anonscm.debian.org/collab-maint/vblade.git
 
 Package: vblade
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: vblade-persist
 Description: virtual AoE blade emulator
  The vblade is the virtual EtherDrive (R) blade, a program that makes a

+ 26 - 20
debian/copyright

@@ -1,23 +1,29 @@
-This package was debianized by David Martínez Moreno <ender@debian.org>.
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: vblade
+Source: http://sourceforge.net/projects/aoetools/files/vblade/
 
-It was downloaded from: http://sourceforge.net/projects/aoetools/
+Files: *
+Copyright: 2005-2008 Ed Cashin <ecashin@coraid.com>
+License: GPL-2
 
-Copyright: 2005-2008 Ed L. Cashin <ecashin@coraid.com>
+Files: debian/*
+Copyright: 2005-2015 David Martínez Moreno <ender@debian.org>
+License: GPL-2
 
-License:
-This program 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; version 2 dated June, 1991.
-
-This program 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, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301, USA.
-
-On Debian GNU/Linux systems, the complete text of the GNU General
-Public License v2 can be found in `/usr/share/common-licenses/GPL-2'.
+License: GPL-2
+ This program 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; version 2 dated June, 1991.
+ .
+ This program 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, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License v2 can be found in `/usr/share/common-licenses/GPL-2'.

+ 22 - 4
debian/patches/01_no_hyphen_in_manpages.patch

@@ -1,9 +1,9 @@
 Added fixes for typical confusion hyphen <-> minus sign.
-Index: vblade-20/vblade.8
+Index: vblade/vblade.8
 ===================================================================
---- vblade-20.orig/vblade.8
-+++ vblade-20/vblade.8
-@@ -35,24 +35,24 @@ The name of the regular file or block de
+--- vblade.orig/vblade.8
++++ vblade/vblade.8
+@@ -35,39 +35,39 @@ The name of the regular file or block de
  .SS Options
  .TP
  \fB-b\fP
@@ -32,4 +32,22 @@ Index: vblade-20/vblade.8
 +The \-m flag takes an argument, a comma separated list of MAC addresses
  permitted access to the vblade.  A MAC address can be specified in upper
  or lower case, with or without colons.
+ .TP
+ \fB-o\fP
+-The -o flag takes an argument, the number of sectors at the beginning
++The \-o flag takes an argument, the number of sectors at the beginning
+ of the exported file that are excluded from AoE export (default zero).
+ .TP
+ \fB-l\fP
+-The -l flag takes an argument, the number of sectors to export.
++The \-l flag takes an argument, the number of sectors to export.
+ Defaults to the file size in sectors minus the offset.
  .SH EXAMPLE
+ In this example, the root user on a host named
+ .I nai
+ exports a file named "3TB" to the LAN on eth0 using AoE shelf address 11
+-and slot address 1.  The process runs in the foreground.  Using 
++and slot address 1.  The process runs in the foreground.  Using
+ .I vbladed
+ would have resulted in the process running as a daemon in the
+ background.

+ 3 - 3
debian/patches/03_vblade_usage.patch

@@ -1,9 +1,9 @@
 03_vblade_usage.patch: Used for avoiding calling vbladed without arguments,
 			and while at it, add the usage command line.
-Index: vblade-20/vbladed
+Index: vblade/vbladed
 ===================================================================
---- vblade-20.orig/vbladed
-+++ vblade-20/vbladed
+--- vblade.orig/vbladed
++++ vblade/vbladed
 @@ -3,4 +3,14 @@
  # output is directed to syslogd
  #

+ 35 - 0
debian/patches/hardening_ldflags.patch

@@ -0,0 +1,35 @@
+Description: Add LDFLAGS to linking phase to enable hardening.
+ The Makefile is so simple that it doesn't even contemplate the use of LDFLAGS.
+Author: David Martínez Moreno <ender@debian.org>
+Forwarded: no
+Last-Update: 2015-07-29
+
+Index: vblade/makefile
+===================================================================
+--- vblade.orig/makefile
++++ vblade/makefile
+@@ -13,19 +13,19 @@ CFLAGS += -Wall -g -O2
+ CC = gcc
+ 
+ vblade: $O
+-	${CC} -o vblade $O
++	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o vblade $O
+ 
+ aoe.o : aoe.c config.h dat.h fns.h makefile
+-	${CC} ${CFLAGS} -c $<
++	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -c $<
+ 
+ ${PLATFORM}.o : ${PLATFORM}.c config.h dat.h fns.h makefile
+-	${CC} ${CFLAGS} -c $<
++	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -c $<
+ 
+ ata.o : ata.c config.h dat.h fns.h makefile
+-	${CC} ${CFLAGS} -c $<
++	${CC} $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
+ 
+ bpf.o : bpf.c
+-	${CC} ${CFLAGS} -c $<
++	${CC} $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
+ 
+ config.h : config/config.h.in makefile
+ 	@if ${CC} ${CFLAGS} config/u64.c > /dev/null 2>&1; then \

+ 1 - 0
debian/patches/series

@@ -1,3 +1,4 @@
 01_no_hyphen_in_manpages.patch
 02_additional_cleaning.patch
 03_vblade_usage.patch
+hardening_ldflags.patch

+ 7 - 41
debian/rules

@@ -1,57 +1,23 @@
 #!/usr/bin/make -f
-# Copyright 2005, 2006, 2007 David Martínez Moreno.
-# Under GPL v2.
 
 # Uncomment this to turn on verbose mode.
 # export DH_VERBOSE=1
 
 DEB_BUILD_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
-
 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
   PLATFORM=freebsd
 else
   PLATFORM=linux
 endif
 
-build: build-stamp
-build-stamp:
-	dh_quilt_patch
+%:
+	dh $@ --parallel
+
+override_dh_auto_build:
 	$(MAKE) PLATFORM=$(PLATFORM)
-	touch build-stamp
 
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
+override_dh_auto_install:
+	$(MAKE) install prefix=debian/vblade/usr
 
-	dh_install
-	dh_installdocs
-	dh_installman
+override_dh_installchangelogs:
 	dh_installchangelogs NEWS
-	dh_link
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary-indep:
-	# do nothing
-
-binary: binary-arch binary-indep
-
-clean:
-	dh_testdir
-	dh_testroot
-	$(MAKE) clean
-	rm -f *-stamp
-	dh_quilt_unpatch
-	dh_clean

+ 1 - 0
debian/source/format

@@ -0,0 +1 @@
+3.0 (quilt)

+ 2 - 0
debian/watch

@@ -0,0 +1,2 @@
+version=3
+http://sf.net/aoetools/vblade-(.+)\.tar\.gz