[Debian-iot-packaging] [libjwt] 02/02: Import Debian changes 1.8.0+dfsg-1

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Aug 28 20:02:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository libjwt.

commit cd52798ab62a14afbebb17fc08ffb36f4eff2dea
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Tue Jul 25 19:32:33 2017 +0200

    Import Debian changes 1.8.0+dfsg-1
    
    libjwt (1.8.0+dfsg-1) unstable; urgency=medium
    
      * Initial release
---
 debian/changelog             |   5 ++
 debian/compat                |   1 +
 debian/control               |  39 ++++++++++++
 debian/copyright             | 146 +++++++++++++++++++++++++++++++++++++++++++
 debian/libjwt-dev.install    |   2 +
 debian/libjwt0.install       |   1 +
 debian/patches/series        |   1 +
 debian/patches/use-b64.patch | 133 +++++++++++++++++++++++++++++++++++++++
 debian/rules                 |  26 ++++++++
 debian/source/format         |   1 +
 debian/watch                 |   7 +++
 11 files changed, 362 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f63b963
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libjwt (1.8.0+dfsg-1) unstable; urgency=medium
+
+  * Initial release
+
+ -- Thorsten Alteholz <debian at alteholz.de>  Tue, 25 Jul 2017 19:32:33 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..0fe998a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: libjwt
+Section: devel
+Priority: optional
+Maintainer: Thorsten Alteholz <debian at alteholz.de>
+Build-Depends: debhelper (>= 10)
+	, pkg-config
+	, libjansson-dev
+	, libssl-dev
+	, libb64-dev
+	, check
+#	, gnutls-dev
+Standards-Version: 4.0.0
+Homepage: https://github.com/benmcollins/libjwt
+#Vcs-Git: https://anonscm.debian.org/collab-maint/oauth2-server.git
+#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/oauth2-server.git
+
+Package: libjwt0
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: C library to handle JWT (JSON Web Token)
+ libjwt is a library which allows you to encode and decode 
+ JSON Web Tokens (JWT).
+ .
+ JSON Web Tokens are an open, industry standard RFC 7519 method for 
+ representing claims securely between two parties.
+
+Package: libjwt-dev
+Architecture: any
+Section: libdevel
+Depends: libjwt0 (= ${binary:Version})
+        , ${misc:Depends}
+Description: C library to handle JWT (JSON Web Token) - development
+ libjwt is a library which allows you to encode and decode 
+ JSON Web Tokens (JWT).
+ .
+ JSON Web Tokens are an open, industry standard RFC 7519 method for 
+ representing claims securely between two parties.
+ .
+ This package contains the development files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..64d36f7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,146 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: hoel
+Source: https://github.com/benmcollins/libjwt
+Files-Excluded:
+  libjwt/base64.*
+
+Files: *
+Copyright: 2015-2017 Ben Collins <ben at cyphre.com>
+License: LGPL-3+
+
+Files: libjwt/jwt-gnutls.c
+Copyright: 2017 Nicolas Mora <mail at babelouest.org>
+License: LGPL-3+
+
+Files: tests/*
+Copyright: 2017 nobody
+License: public-domain
+
+Files: m4/ax_code_coverage.m4
+Copyright: 2012, 2016 Philip Withnall
+	   2012 Xan Lopez
+	   2012 Christian Persch
+	   2012 Paolo Borelli
+	   2012 Dan Winship
+	   2015 Bastien ROUCARIES
+License: LGPL-2.1+
+
+Files: m4/ax_valgrind_check.m4
+Copyright:  2014, 2015, 2016 Philip Withnall <philip.withnall at collabora.co.uk>
+License: permissive
+
+Files: doxygen.mk m4/doxygen.m4
+Copyright: 2004 Oren Ben-Kiki
+License: GPL-3+ with Autoconf exception
+
+Files: debian/*
+Copyright: 2017 Thorsten Alteholz <debian at alteholz.de>
+License: LGPL-3+
+
+License: LGPL-3+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+ .
+ This library 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
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with the JWT Library; if not, see
+ <http://www.gnu.org/licenses/>.
+
+License: public-domain
+ Public domain, no copyright. Use at your own risk.
+
+License: GPL-3+ with Autoconf exception
+ This file is part of Autoconf.  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, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ 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.
+ .
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the Autoconf Configure Script Exception,
+ version 3.0, as published by the Free Software Foundation.
+ .
+ You should have received a copy of the GNU General Public License
+ and a copy of the Autoconf Configure Script Exception along with
+ this program; see the files COPYINGv3 and COPYING.EXCEPTION
+ respectively.  If not, see <http://www.gnu.org/licenses/>.
+ .
+ The GNU General Public License version 3 may be found on Debian systems
+ in /usr/share/common-licenses/GPL-3.
+ .
+ The Autoconf Configure Script Exception version 3 is below:
+ .
+		    AUTOCONF CONFIGURE SCRIPT EXCEPTION
+			Version 3.0, 18 August 2009
+ .
+  Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
+  Everyone is permitted to copy and distribute verbatim copies
+  of this license document, but changing it is not allowed.
+ .
+ This Exception is an additional permission under section 7 of the GNU
+ General Public License, version 3 ("GPLv3").  It applies to a given
+ file that bears a notice placed by the copyright holder of the file
+ stating that the file is governed by GPLv3 along with this Exception.
+ .
+ The purpose of this Exception is to allow distribution of Autoconf's
+ typical output under terms of the recipient's choice (including
+ proprietary).
+ .
+ 0. Definitions
+ .
+ "Covered Code" is the source or object code of a version of Autoconf
+ that is a covered work under this License.
+ .
+ "Normally Copied Code" for a version of Autoconf means all parts of
+ its Covered Code which that version can copy from its code (i.e., not
+ from its input file) into its minimally verbose, non-debugging and
+ non-tracing output.
+ .
+ "Ineligible Code" is Covered Code that is not Normally Copied Code.
+ .
+ 1. Grant of Additional Permission.
+ .
+ You have permission to propagate output of Autoconf, even if such
+ propagation would otherwise violate the terms of GPLv3.  However, if
+ by modifying Autoconf you cause any Ineligible Code of the version you
+ received to become Normally Copied Code of your modified version, then
+ you void this Exception for the resulting covered work.  If you convey
+ that resulting covered work, you must remove this Exception in accordance
+ with the second paragraph of Section 7 of GPLv3.
+ .
+ 2. No Weakening of Autoconf Copyleft.
+ .
+ The availability of this Exception does not imply any general presumption
+ that third-party software is unaffected by the copyleft requirements of
+ the license of Autoconf.
+
+License: LGPL-2.1+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version.
+ .
+ This library 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 Lesser
+ General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+License: permissive
+ Copying and distribution of this file, with or without modification, are
+ permitted in any medium without royalty provided the copyright notice
+ and this notice are preserved.  This file is offered as-is, without any
+ warranty.
diff --git a/debian/libjwt-dev.install b/debian/libjwt-dev.install
new file mode 100644
index 0000000..a517054
--- /dev/null
+++ b/debian/libjwt-dev.install
@@ -0,0 +1,2 @@
+libjwt/.libs/libjwt*.so usr/lib
+include/jwt.h usr/include
diff --git a/debian/libjwt0.install b/debian/libjwt0.install
new file mode 100644
index 0000000..0e03ea3
--- /dev/null
+++ b/debian/libjwt0.install
@@ -0,0 +1 @@
+libjwt/.libs/libjwt*.so.* usr/lib
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7f8db14
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+use-b64.patch
diff --git a/debian/patches/use-b64.patch b/debian/patches/use-b64.patch
new file mode 100644
index 0000000..737a692
--- /dev/null
+++ b/debian/patches/use-b64.patch
@@ -0,0 +1,133 @@
+Description: use the packaged libb64 in order to avoid license problems
+             with the base64.* files from Apple
+Author: Thorsten Alteholz <debian at alteholz.de>
+Index: libjwt-1.8.0/libjwt/Makefile.am
+===================================================================
+--- libjwt-1.8.0.orig/libjwt/Makefile.am	2017-07-28 11:56:18.169637742 +0200
++++ libjwt-1.8.0/libjwt/Makefile.am	2017-07-28 12:21:36.332466436 +0200
+@@ -1,6 +1,6 @@
+ lib_LTLIBRARIES = libjwt.la
+ 
+-libjwt_la_SOURCES = jwt.c base64.c
++libjwt_la_SOURCES = jwt.c
+ 
+ if HAVE_OPENSSL
+ libjwt_la_SOURCES += jwt-openssl.c
+@@ -11,8 +11,8 @@
+ # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+ libjwt_la_LDFLAGS = -version-info 3:1:3 $(OPENSSL_LDFLAGS) $(GNUTLS_LDFLAGS) $(JANSSON_LDFLAGS)
+ libjwt_la_CPPFLAGS = -I$(top_srcdir)/include $(OPENSSL_INCLUDES) $(GNUTLS_INCLUDES) $(CODE_COVERAGE_CPPFLAGS) -Wall
+-libjwt_la_CFLAGS = $(JANSSON_CFLAGS) $(OPENSSL_CFLAGS) $(GNUTLS_CFLAGS) $(CODE_COVERAGE_CFLAGS)
+-libjwt_la_LIBADD = $(JANSSON_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(CODE_COVERAGE_LDFLAGS)
++libjwt_la_CFLAGS = $(B64_CFLAGS) $(JANSSON_CFLAGS) $(OPENSSL_CFLAGS) $(GNUTLS_CFLAGS) $(CODE_COVERAGE_CFLAGS)
++libjwt_la_LIBADD = $(B64_LIBS) $(JANSSON_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(CODE_COVERAGE_LDFLAGS)
+ 
+ pkgconfiglibdir = $(libdir)/pkgconfig
+ pkgconfiglib_DATA = libjwt.pc
+Index: libjwt-1.8.0/libjwt/jwt-gnutls.c
+===================================================================
+--- libjwt-1.8.0.orig/libjwt/jwt-gnutls.c	2017-07-28 11:56:18.169637742 +0200
++++ libjwt-1.8.0/libjwt/jwt-gnutls.c	2017-07-28 11:56:18.165637502 +0200
+@@ -27,7 +27,8 @@
+ #include <jwt.h>
+ 
+ #include "jwt-private.h"
+-#include "base64.h"
++#include <b64/cencode.h>
++#include <b64/cdecode.h>
+ #include "config.h"
+ 
+ /* Workaround to use GnuTLS 3.5 EC signature encode/decode functions that
+Index: libjwt-1.8.0/libjwt/jwt.c
+===================================================================
+--- libjwt-1.8.0.orig/libjwt/jwt.c	2017-07-28 11:56:18.169637742 +0200
++++ libjwt-1.8.0/libjwt/jwt.c	2017-07-28 14:13:18.673993727 +0200
+@@ -27,10 +27,47 @@
+ 
+ #include <jwt.h>
+ 
++#include <b64/cencode.h>
++#include <b64/cdecode.h>
+ #include "jwt-private.h"
+-#include "base64.h"
+ #include "config.h"
+ 
++int jwt_Base64encode(char *coded_dst, const char *plain_src, int len_plain_src)
++{
++  base64_encodestate _state;
++  int _count, _i, _len;
++  char *_rp = coded_dst, *_wp = coded_dst;
++
++  base64_init_encodestate(&_state);
++  _count = base64_encode_block(plain_src, len_plain_src, coded_dst, &_state);
++  _count += base64_encode_blockend(coded_dst + _count, &_state);
++
++  /*
++   * the b64 library might insert \n after some chars,
++   * these must be removed again
++   * (at least in order to pass the tests)
++   */
++  _len=_count;
++  for (_i=0; _i<_len; _i++ ) {
++    if (*_rp != '\n') *_wp++=*_rp;
++    else _count--;
++    _rp++;
++  }
++  coded_dst[_count] = 0;
++
++  return _count;
++}
++
++int jwt_Base64decode(char *plain_dst, const char *coded_src)
++{
++ base64_decodestate _state;
++ int _count = 0;
++
++ base64_init_decodestate(&_state);
++ _count = base64_decode_block(coded_src, strlen(coded_src), plain_dst, &_state);
++
++ return _count;
++}
+ 
+ static const char *jwt_alg_str(jwt_alg_t alg)
+ {
+Index: libjwt-1.8.0/libjwt/jwt-private.h
+===================================================================
+--- libjwt-1.8.0.orig/libjwt/jwt-private.h	2017-07-28 11:56:18.169637742 +0200
++++ libjwt-1.8.0/libjwt/jwt-private.h	2017-07-28 11:56:18.165637502 +0200
+@@ -28,6 +28,9 @@
+ };
+ 
+ /* Helper routines. */
++int jwt_Base64encode(char *coded_dst, const char *plain_src, int len_plain_src);
++int jwt_Base64decode(char *plain_dst, const char *coded_src);
++
+ void jwt_base64uri_encode(char *str);
+ void *jwt_b64_decode(const char *src, int *ret_len);
+ 
+Index: libjwt-1.8.0/configure.ac
+===================================================================
+--- libjwt-1.8.0.orig/configure.ac	2017-05-31 04:38:10.000000000 +0200
++++ libjwt-1.8.0/configure.ac	2017-07-28 12:14:27.422800063 +0200
+@@ -23,6 +23,11 @@
+ PKG_CHECK_MODULES([JANSSON], [jansson >= 2.0])
+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [true], [true])
+ 
++AC_SUBST([B64_CFLAGS], [])
++AC_SUBST([B64_LIBS], [-lb64])
++# does not work
++#PKG_CHECK_MODULES([B64], [b64 >= 0.0])
++
+ AX_VALGRIND_CHECK
+ 
+ AX_CODE_COVERAGE
+Index: libjwt-1.8.0/libjwt/libjwt.pc.in
+===================================================================
+--- libjwt-1.8.0.orig/libjwt/libjwt.pc.in	2017-05-31 04:38:10.000000000 +0200
++++ libjwt-1.8.0/libjwt/libjwt.pc.in	2017-07-28 12:09:36.201372656 +0200
+@@ -9,4 +9,4 @@
+ 
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -ljwt
+-Libs.private: @JANSSON_LIBS@ @OPENSSL_LIBS@
++Libs.private: @JANSSON_LIBS@ @OPENSSL_LIBS@ @B64_LIBS@
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..1fcb6c7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+%:
+	dh $@ --with autoreconf
+
+#override_dh_auto_configure:
+#	#XXX LIBS="-lm" dh_auto_configure -- --without-openssl
+#	#-dh_auto_configure -- --without-openssl
+#	dh_auto_configure
+
+override_dh_auto_install:
+	echo dh_auto_install
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..11b3256
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,7 @@
+version=4
+
+# https://github.com/benmcollins/libjwt
+opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libjwt-$1.tar.gz%,dversionmangle=s/\+dfsg\d*$//" \
+   https://github.com/benmcollins/libjwt/tags \
+   (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/libjwt.git



More information about the Debian-iot-packaging mailing list