Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,39 @@ jobs:
}
& $exe

deb-package:
name: Build DEB packages on Ubuntu
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- name: Set up OS
run: |
sudo apt-get update
sudo apt-get install -y devscripts quilt lintian
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Prepare environment
run: |
uscan --download-current-version
sudo apt build-dep -y .
QUILT_PATCHES=debian/patches quilt push -a
- name: Build
run: debuild --no-lintian -us -uc
- name: Check
run: |
set -o pipefail
lintian ../*.deb | tee lintian.txt
- name: Summarize Results
if: always()
run: |
echo "## lintian results:" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat lintian.txt >> $GITHUB_STEP_SUMMARY || true
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ dkms.conf
qcbortest
qcbormin

# Development tool state
.pc/
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
qcbor (1.6.1-1) UNRELEASED; urgency=medium

* Initial deb packaging.

-- Brian Sipos <brian.sipos@gmail.com> Sat, 20 Jun 2026 00:05:07 -0400
35 changes: 35 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Source: qcbor
Section: libs
Priority: optional
Maintainer: Brian Sipos <brian.sipos@gmail.com>
Rules-Requires-Root: no
Build-Depends: cmake, debhelper-compat (= 13)
Build-Depends-Indep: doxygen
Standards-Version: 4.6.2
Homepage: https://github.com/laurencelundblade/QCBOR
Vcs-Browser: https://github.com/laurencelundblade/QCBOR
Vcs-Git: https://salsa.debian.org/debian/qcbor.git

Package: libqcbor1
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: CBOR encoder/decoder library
This is a comprehensive, powerful, commercial-quality CBOR encoder and decoder
that is still suited for small devices.

Package: libqcbor-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libqcbor1 (= ${binary:Version}), ${misc:Depends}
Description: Development files for the QCBOR library
These are development files needed to build and link to the QCBOR library.

Package: libqcbor-doc
Section: doc
Architecture: all
Depends: ${misc:Depends}
Description: documentation for qcbor
This is API documentation in the form of HTML generated
from the API with Doxygen.
46 changes: 46 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files-Excluded:
.github
test/half_to_double_from_rfc7049.*
Source: https://github.com/laurencelundblade/QCBOR
Upstream-Name: QCBOR
Upstream-Contact: Laurence Lundblade

Files:
*
Copyright:
2016-2018, The Linux Foundation
2018-2020, Laurence Lundblade
License: BSD-3-clause

Files:
debian/*
Copyright:
2026 Brian Sipos <brian.sipos@gmail.com>
License: BSD-3-clause

License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
6 changes: 6 additions & 0 deletions debian/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[DEFAULT]
upstream-tag=v%(version)s

# No tarballs to track (upstream uses git):
pristine-tar = False
pristine-tar-commit = False
2 changes: 2 additions & 0 deletions debian/libqcbor-dev.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/include
usr/lib
3 changes: 3 additions & 0 deletions debian/libqcbor-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/include/qcbor/*
usr/lib/*/lib*.so
usr/lib/*/cmake/qcbor/*
1 change: 1 addition & 0 deletions debian/libqcbor-doc.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doxygen/html/
1 change: 1 addition & 0 deletions debian/libqcbor1.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/*/lib*.so.*
Empty file added debian/libqcbor1.triggers
Empty file.
52 changes: 52 additions & 0 deletions debian/patches/remove-bcp78.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Description: Remove offending copyrighted source
Author: Brian Sipos <brian.sipos@gmail.com>
Origin: other
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: QCBOR/test/CMakeLists.txt
===================================================================
--- QCBOR.orig/test/CMakeLists.txt
+++ QCBOR/test/CMakeLists.txt
@@ -24,7 +24,6 @@ add_library(qcbor_test_lib STATIC)
target_sources(qcbor_test_lib
PRIVATE
float_tests.c
- half_to_double_from_rfc7049.c
qcbor_decode_tests.c
qcbor_encode_tests.c
run_tests.c
===================================================================
--- QCBOR.orig/test/float_tests.h
+++ QCBOR/test/float_tests.h
@@ -15,7 +15,7 @@

#include <stdint.h>

-#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
+#if 0

/* This tests a large number half-precision values
* in the conversion to/from half/double against
===================================================================
--- QCBOR.orig/test/float_tests.c
+++ QCBOR/test/float_tests.c
@@ -36,7 +36,7 @@ MakeTestResultCode(uint32_t uTestCase,
}


-#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
+#if 0

#include "half_to_double_from_rfc7049.h"

--- QCBOR.orig/test/run_tests.c
+++ QCBOR/test/run_tests.c
@@ -128,7 +128,7 @@ static test_entry s_tests[] = {
TEST_ENTRY(CBORTestIssue134),
#endif /* #ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
#ifndef USEFULBUF_DISABLE_ALL_FLOAT
-#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
+#if 0
TEST_ENTRY(HalfPrecisionAgainstRFCCodeTest),
TEST_ENTRY(FloatValuesTests),
#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove-bcp78.patch
11 changes: 11 additions & 0 deletions debian/qcbor.doc-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Document: qcbor
Title: QCBOR Library Manual
Author: Laurence Lundblade
Abstract:
API documentation in the form of HTML generated
from the API with Doxygen.
Section: unknown

Format: HTML
Index: /usr/share/doc/qcbor/html/index.html
Files: /usr/share/doc/qcbor/html/*.html
1 change: 1 addition & 0 deletions debian/qcbor1.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib
1 change: 1 addition & 0 deletions debian/qcbor1.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/*/lib*.so.*
35 changes: 35 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/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 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 $@

override_dh_auto_clean:
dh_auto_clean
rm -rf doxygen/html
rm -rf usr/share/doc

override_dh_auto_configure:
dh_auto_configure -Scmake -- \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_QCBOR_WARN=ON \
-DBUILD_QCBOR_TEST=APP

override_dh_auto_build:
dh_auto_build
# Build Doxygen docs if the 'nodoc' build option is not set
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
(cd doxygen && doxygen)
endif
1 change: 1 addition & 0 deletions debian/shlibs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libqcbor 1 libqcbor1 (>> 1.6.1-0)
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
10 changes: 10 additions & 0 deletions debian/upstream/metadata.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Example file for upstream/metadata.
# See https://wiki.debian.org/UpstreamMetadata for more info/fields.
# Below an example based on a github project.

# Bug-Database: https://github.com/<user>/qcbor/issues
# Bug-Submit: https://github.com/<user>/qcbor/issues/new
# Changelog: https://github.com/<user>/qcbor/blob/master/CHANGES
# Documentation: https://github.com/<user>/qcbor/wiki
# Repository-Browse: https://github.com/<user>/qcbor
# Repository: https://github.com/<user>/qcbor.git
2 changes: 2 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version=4
https://github.com/laurencelundblade/QCBOR/tags .*/v?(\d.*)@ARCHIVE_EXT@
Loading