Package: ii
Severity: wishlist
Tags: patch

Dear Maintainer,

thanks for maintaining ii.

As of 2018-02-04 ii version 1.8 is available. Please consider packaging it. Feel
free to use the patch attached as you think fit to do so (no attribution
required). [1]

Regards,
itd
--
[1]: Intended patch usage:
mkdir ii-1.8
wget https://deb.debian.org/debian/pool/main/i/ii/ii_1.7-2.debian.tar.gz
tar -xf ii_1.7-2.debian.tar.gz -C ii-1.8
cd ii-1.8
patch -p2 < ../0001-ii-1.8-update.patch
origtargz
# build package
>From 40126542ca841266b4efd080cad701201189d4fc Mon Sep 17 00:00:00 2001
From: itd <i...@firemail.cc>
Date: Wed, 21 Feb 2018 10:11:14 +0100
Subject: [PATCH] ii-1.8 update

---
 ii/debian/changelog                                | 14 +++++
 ii/debian/compat                                   |  2 +-
 ii/debian/control                                  |  6 +-
 ii/debian/copyright                                | 72 ++++++++++------------
 .../remove_static_lib_search_path_includes.patch   | 26 --------
 ii/debian/patches/respect_dpkg_buildflags.patch    | 18 +++---
 ii/debian/patches/series                           |  1 -
 ii/debian/rules                                    |  1 +
 ii/debian/tests/control                            |  2 +
 ii/debian/tests/smoke-test                         | 15 +++++
 ii/debian/watch                                    |  2 +-
 11 files changed, 79 insertions(+), 80 deletions(-)
 delete mode 100644 
ii/debian/patches/remove_static_lib_search_path_includes.patch
 create mode 100644 ii/debian/tests/control
 create mode 100644 ii/debian/tests/smoke-test

diff --git a/ii/debian/changelog b/ii/debian/changelog
index 65d2a45..eaaf878 100644
--- a/ii/debian/changelog
+++ b/ii/debian/changelog
@@ -1,3 +1,17 @@
+ii (1.8-1.1) unstable; urgency=medium
+
+  * New upstream release.
+  * Fix watchfile (upstream URL changed).
+  * Bump compat level and debhelper dependency to 11.
+  * Bump standards version.
+  * Update patch respect_dpkg_buildflags.patch.
+  * Enable hardening (requires dpkg-dev >= 1.16.1.1).
+  * Switch to machine-readable copyright file.
+  * Experimental autopkgtest smoke-test.
+  * Switch to HTTPS upstream links.
+
+ -- Nico Golde <n...@debian.org>  Wed, 21 Feb 2018 10:11:53 +0100
+
 ii (1.7-2) unstable; urgency=high
 
   * Enable hardening options.
diff --git a/ii/debian/compat b/ii/debian/compat
index 7f8f011..b4de394 100644
--- a/ii/debian/compat
+++ b/ii/debian/compat
@@ -1 +1 @@
-7
+11
diff --git a/ii/debian/control b/ii/debian/control
index 82e55cd..e1a7611 100644
--- a/ii/debian/control
+++ b/ii/debian/control
@@ -2,9 +2,9 @@ Source: ii
 Section: net
 Priority: optional
 Maintainer: Nico Golde <n...@debian.org>
-Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.16.1~)
-Standards-Version: 3.9.4
-Homepage: http://tools.suckless.org/ii/
+Build-Depends: debhelper (>= 11~), dpkg-dev (>= 1.16.1.1)
+Standards-Version: 4.1.3
+Homepage: https://tools.suckless.org/ii/
 
 Package: ii
 Architecture: any
diff --git a/ii/debian/copyright b/ii/debian/copyright
index 1fa15ca..545b620 100644
--- a/ii/debian/copyright
+++ b/ii/debian/copyright
@@ -1,39 +1,33 @@
-This package was debianized by Daniel Baumann <dan...@debian.org> on
-Sat,  3 Feb 2007 19:08:00 +0100 and is now maintained by
-Nico Golde <n...@debian.org>
-
-It was downloaded from <http://www.suckless.org/download>.
-
-Upstream Author: Nico Golde and Anselm Garbe <i...@modprobe.de>
-
-Copyright: 2005-2007 Nico Golde
-           2005-2006 and Anselm Garbe
-
-License:
-
-  MIT/X Consortium License
-
-  Copyright (C) 2005-2007 Nico Golde <n...@ngolde.de>
-  Copyright (C) 2005-2006 Anselm R. Garbe <garb...@gmail.com>
-
-  Permission is hereby granted, free of charge, to any person obtaining a
-  copy of this software and associated documentation files (the
-  "Software"), to deal in the Software without restriction, including
-  without limitation the rights to use, copy, modify, merge, publish,
-  distribute, sublicense, and/or sell copies of the Software, and to
-  permit persons to whom the Software is furnished to do so, subject to
-  the following conditions:
-
-  The above copyright notice and this permission notice shall be included
-  in all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-The Debian packaging is Copyright (C) 2007-2009, Nico Golde <n...@debian.org> 
and
-is licensed under the GPL-2, see `/usr/share/common-licenses/GPL-2'.
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ii
+Source: https://tools.suckless.org/ii/
+
+Files:     *
+Copyright: 2014-2018 Hiltjo Posthuma <hil...@codemadness.org>
+           2005-2006 Anselm R. Garbe <garb...@wmii.de>
+           2005-2011 Nico Golde <n...@ngolde.de>
+ .
+License:   MIT/X-Consortium-License
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+Files:     debian/*
+Copyright: 2007-2009 Nico Golde <n...@ngolde.de>
+License:   GPL-2
+ On Debian systems a copy of this license may be found at
+ '`/usr/share/common-licenses/GPL-2'.
diff --git a/ii/debian/patches/remove_static_lib_search_path_includes.patch 
b/ii/debian/patches/remove_static_lib_search_path_includes.patch
deleted file mode 100644
index 80e6e2b..0000000
--- a/ii/debian/patches/remove_static_lib_search_path_includes.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: do not include static library paths in the search path
-This package has one or more -L/usr/lib in its build system,
-which will make it ftbfs if there is libraries under /usr/lib,
-while is not the default architecture, mips* for example.
- .
- ii (1.7-2) unstable; urgency=high
- .
-   * Enable hardening options.
-   * Introduce build-arch and build-indep targets to rules.
-   * Fix upstream homepage (Closes: #693116).
-   * Do not explicitely include /usr/lib as library search path,
-     but just use the default (Closes: #722784).
-Author: Nico Golde <n...@debian.org>
-Bug-Debian: http://bugs.debian.org/722784
-
---- ii-1.7.orig/config.mk
-+++ ii-1.7/config.mk
-@@ -16,7 +16,7 @@ VERSION     = 1.7
- 
- # includes and libs
- INCLUDES    = -I. -I${INCDIR} -I/usr/include
--LIBS        = -L${LIBDIR} -L/usr/lib -lc
-+LIBS        = -lc
- # uncomment and comment other variables for compiling on Solaris
- #LIBS = -L${LIBDIR} -L/usr/lib -lc -lsocket -lnsl
- #CFLAGS      = -g ${INCLUDES} -DVERSION=\"${VERSION}\"
diff --git a/ii/debian/patches/respect_dpkg_buildflags.patch 
b/ii/debian/patches/respect_dpkg_buildflags.patch
index 9b764c5..0308802 100644
--- a/ii/debian/patches/respect_dpkg_buildflags.patch
+++ b/ii/debian/patches/respect_dpkg_buildflags.patch
@@ -1,12 +1,12 @@
 Author: Nico Golde <n...@debian.org>
 Description: Respect dpkg-buildflags
---- ii-1.7.orig/config.mk
-+++ ii-1.7/config.mk
-@@ -23,5 +23,5 @@ LIBS        = -lc
+--- ii-1.8.orig/config.mk
++++ ii-1.8/config.mk
+@@ -21,5 +21,5 @@
+ #LDFLAGS = ${LIBS}
  
- # compiler
- CC          = cc
--CFLAGS      = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
--LDFLAGS     = ${LIBS}
-+CFLAGS      += -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
-+LDFLAGS     += ${LIBS}
+ # release
+-CFLAGS   = -Os ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_DEFAULT_SOURCE
+-LDFLAGS  = -s ${LIBS}
++CFLAGS   += ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_DEFAULT_SOURCE 
-D_FORTIFY_SOURCE=2
++LDFLAGS  += ${LIBS}
diff --git a/ii/debian/patches/series b/ii/debian/patches/series
index 3fe74cb..72c0739 100644
--- a/ii/debian/patches/series
+++ b/ii/debian/patches/series
@@ -1,2 +1 @@
-remove_static_lib_search_path_includes.patch
 respect_dpkg_buildflags.patch
diff --git a/ii/debian/rules b/ii/debian/rules
index 33eabe6..3f3985e 100755
--- a/ii/debian/rules
+++ b/ii/debian/rules
@@ -3,6 +3,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
diff --git a/ii/debian/tests/control b/ii/debian/tests/control
new file mode 100644
index 0000000..9cb0db0
--- /dev/null
+++ b/ii/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: smoke-test
+Depends: @, shunit2
diff --git a/ii/debian/tests/smoke-test b/ii/debian/tests/smoke-test
new file mode 100644
index 0000000..33af27a
--- /dev/null
+++ b/ii/debian/tests/smoke-test
@@ -0,0 +1,15 @@
+#!/bin/bash
+# smoke-test: try running ii
+exec 2>&1
+
+test_connect_to_localhost() {
+       out=$(ii -s localhost -p 0 2>&1)
+       code=$?
+       set -e
+       # ii set its exit code to 1
+       assertEquals 1 "${code}"
+       # ii failed to connect with below message (but execution succeeded)
+       assertEquals 'ii: could not connect to localhost:0: Connection refused' 
"${out}"
+}
+
+. shunit2
diff --git a/ii/debian/watch b/ii/debian/watch
index a691fa4..5c8e940 100644
--- a/ii/debian/watch
+++ b/ii/debian/watch
@@ -1,2 +1,2 @@
 version=3
-http://code.suckless.org/dl/tools/ii-(.*)\.tar\.gz
+https://dl.suckless.org/tools/ii-(.*)\.tar\.gz
-- 
2.11.0

Reply via email to