diff options
Diffstat (limited to 'distro/pkg/deb')
-rw-r--r-- | distro/pkg/deb/README.Debian | 38 | ||||
-rw-r--r-- | distro/pkg/deb/README.source | 66 | ||||
-rw-r--r-- | distro/pkg/deb/changelog | 5 | ||||
-rw-r--r-- | distro/pkg/deb/compat | 1 | ||||
-rw-r--r-- | distro/pkg/deb/control | 73 | ||||
-rw-r--r-- | distro/pkg/deb/copyright | 79 | ||||
-rw-r--r-- | distro/pkg/deb/gbp.conf | 4 | ||||
-rw-r--r-- | distro/pkg/deb/libyang-dev.install | 3 | ||||
-rw-r--r-- | distro/pkg/deb/libyang-modules.install | 1 | ||||
-rw-r--r-- | distro/pkg/deb/libyang-tools.examples | 1 | ||||
-rw-r--r-- | distro/pkg/deb/libyang-tools.install | 3 | ||||
-rw-r--r-- | distro/pkg/deb/libyang3.install | 1 | ||||
-rwxr-xr-x | distro/pkg/deb/rules | 12 | ||||
-rw-r--r-- | distro/pkg/deb/source/format | 1 | ||||
-rw-r--r-- | distro/pkg/deb/tests/control | 3 | ||||
-rwxr-xr-x | distro/pkg/deb/tests/yanglint | 18 | ||||
-rw-r--r-- | distro/pkg/deb/watch | 4 |
17 files changed, 313 insertions, 0 deletions
diff --git a/distro/pkg/deb/README.Debian b/distro/pkg/deb/README.Debian new file mode 100644 index 0000000..fc680d0 --- /dev/null +++ b/distro/pkg/deb/README.Debian @@ -0,0 +1,38 @@ +Debian packaging for libyang +============================ + +Where to file issues +-------------------- + +Please file issues on the Debian BTS as usual. You could also open issues +on github, but if it's something about the Debian packaging it's better to +stick with the proper Debian ways. The Debian BTS is where other people +involved with Debian go look for bugs regarding a package, so that's where +they should be. + +Building straight off git +------------------------- + +Just the normal: + +``` +git clone https://github.com/CESNET/libyang -b debian/master +cd libyang +dpkg-buildpackage +``` + +Building a Debian .dsc +---------------------- + +Again, pretty much the normal: + +``` +git clone https://github.com/CESNET/libyang -b debian/master +wget -Olibyang_0.16.105.orig.tar.gz https://github.com/CESNET/libyang/archive/v0.16-r3.tar.gz +cd libyang +dpkg-source -b . +``` + +(Note the diverging release numbering though.) + + -- Ondřej Surý <Ondřej Surý <ondrej@debian.org>>, Fri, 22 May 2020 11:10:55 +0200 diff --git a/distro/pkg/deb/README.source b/distro/pkg/deb/README.source new file mode 100644 index 0000000..b1d916d --- /dev/null +++ b/distro/pkg/deb/README.source @@ -0,0 +1,66 @@ +This module uses gbp and upstream git repository + +To update this package, first import the changes from upstream: +- git fetch --all + +Find the latest version: +VERSION=$(git describe --tags $(git rev-list '--tags=v2*' --max-count=1) | sed 's/^v//') +echo $VERSION + +Update debian/sid branch +- git checkout debian/master +- git merge v$VERSION + +Update the debian/copyright file: +- cme update dpkg-copyright +See also https://github.com/dod38fr/config-model/wiki/Updating-debian-copyright-file-with-cme + +Check patches (and cleanup if necessary): +- gbp pq rebase --commit --drop + +Download upstream tarball: +- uscan --download --verbose --download-version $VERSION + +Add pristine-tar: +- pristine-tar commit ../libyang_$VERSION.orig.tar.gz v$VERSION + +Generate a temporary changelog: +- gbp dch --new-version=$VERSION-1 --snapshot --auto --commit debian/ + +Test the first build:: +- gbp buildpackage --git-ignore-new --git-pristine-tar --git-no-purge + +Regenerate the symbol file (See https://qt-kde-team.pages.debian.net/symbolfiles.html) +- pkgkde-symbolshelper batchpatch -v $VERSION < <path_to>/buildlog + +See https://www.debian.org/doc/manuals/maint-guide/advanced.en.html#librarysymbols +and dpkg-gensymbols man page + +Update the changelog: +- gbp dch -Ra -c + +Once everything is fine, build a source package and tag: +- gbp buildpackage -S --git-tag + +Push on salsa: +- gbp push + +For more details, see +https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html#gbp.import.upstream.git.notarball + +Maintainer Notes (moved from README.md) +======================================= + +* the project version number is actually the SO ABI version. The release + point numbers (0.16-r3) isn't used for Debian. + +* it's intentional that the SONAME is libyang.so.0.16 and not libyang.so.0. + ABI compatibility is indicated by the first two numbers being equal; + the third number is incremented for compatible changes. cf. + CESNET/libyang#656 + +* the watch file doesn't work yet but the libyang people agreed to make + future release tags the same as the internal version number. At that point + the watch file will work. + + -- Ondřej Surý <Ondřej Surý <ondrej@debian.org>>, Tue, 21 Jul 2020 16:31:52 +0200 diff --git a/distro/pkg/deb/changelog b/distro/pkg/deb/changelog new file mode 100644 index 0000000..22366df --- /dev/null +++ b/distro/pkg/deb/changelog @@ -0,0 +1,5 @@ +libyang3 ({{ version }}-{{ release }}) unstable; urgency=medium + + * upstream packaging + + -- Ondřej Surý <ondrej@debian.org> Tue, 04 May 2021 22:20:03 +0200 diff --git a/distro/pkg/deb/compat b/distro/pkg/deb/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/distro/pkg/deb/compat @@ -0,0 +1 @@ +10 diff --git a/distro/pkg/deb/control b/distro/pkg/deb/control new file mode 100644 index 0000000..35cb549 --- /dev/null +++ b/distro/pkg/deb/control @@ -0,0 +1,73 @@ +Source: libyang3 +Section: libs +Homepage: https://github.com/CESNET/libyang/ +Maintainer: Ondřej Surý <ondrej@debian.org> +Priority: optional +Standards-Version: 4.5.0 +Build-Depends: cmake, + debhelper (>= 10), + libcmocka-dev <!nocheck>, + libpcre2-dev, + pkg-config +Vcs-Browser: https://github.com/CESNET/libyang/tree/master +Vcs-Git: https://github.com/CESNET/libyang.git + +Package: libyang3 +Depends: ${misc:Depends}, + ${shlibs:Depends} +Architecture: any +Multi-Arch: same +Description: parser toolkit for IETF YANG data modeling - runtime + Libyang implements functions to process schemas expressed in the + YANG data modeling language defined by the IETF in RFCs 6020/7950. + Schemas expressed in this language primarily describe configuration + used by larger network equipment like routers and switches. + . + In addition to handling the schemas itself, the library also provides + functions to process data described by the schemas. + . + The library is implemented in C and provides an API for other software + to use in processing configurations. + +Package: libyang-dev +Depends: libpcre2-dev, + libyang3 (= ${binary:Version}), + ${misc:Depends} +Conflicts: libyang2-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Description: parser toolkit for IETF YANG data modeling - development files + Libyang implements functions to process schemas expressed in the + YANG data modeling language defined by the IETF in RFCs 6020/7950. + Schemas expressed in this language primarily describe configuration + used by larger network equipment like routers and switches. + . + In addition to handling the schemas itself, the library also provides + functions to process data described by the schemas. + . + This package contains the C headers, a pkgconfig file, and .so entry point + for libyang. + +Package: libyang-tools +Depends: libyang3 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Breaks: libyang2-tools (<< ${source:Version}) +Replaces: libyang2-tools (<< ${source:Version}) +Section: devel +Architecture: any +Multi-Arch: foreign +Description: parser toolkit for IETF YANG data modeling - executable tools + This package provides the "yanglint" and "yangre" tools which can be used + during the creation of IETF YANG schemas. The tools are not generally + useful for normal operation where libyang primarily processes configuration + data, not schemas. + +Package: libyang-modules +Section: devel +Architecture: all +Description: parser toolkit for IETF YANG data modeling - YANG modules + This package provides the IETF YANG modules used by libyang. These modules + are embedded into libyang so this package is not necessary for libyang + operation. diff --git a/distro/pkg/deb/copyright b/distro/pkg/deb/copyright new file mode 100644 index 0000000..03af3c3 --- /dev/null +++ b/distro/pkg/deb/copyright @@ -0,0 +1,79 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libyang +License: BSD-3-clause + +Files: * +Copyright: 2015-2021 by CESNET, z.s.p.o. +License: BSD-3-clause + +Files: */iana-*.yin */iana-*.yang */ietf-*.yin */ietf-*.yang */ietf-*.h +Copyright: 2011-2018 by the IETF Trust and the persons identified as authors +License: IETF-BSD-3-clause + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + . + This version of this YANG module is part of RFC 6536; see + the RFC itself for full legal notices. + +Files: tools/lint/linenoise/* +Copyright: + Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com> + Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com> +License: BSD-2-clause + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + * 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. + . + 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 OWNER 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. + +Files: debian/* +Copyright: 2018 by David Lamparter + 2020-2021 Ondřej Surý +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: + . + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + * 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. + . + * Neither the name of libyang 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. diff --git a/distro/pkg/deb/gbp.conf b/distro/pkg/deb/gbp.conf new file mode 100644 index 0000000..23917b9 --- /dev/null +++ b/distro/pkg/deb/gbp.conf @@ -0,0 +1,4 @@ +[DEFAULT] +pristine-tar = False +debian-branch = master +upstream-tree = SLOPPY diff --git a/distro/pkg/deb/libyang-dev.install b/distro/pkg/deb/libyang-dev.install new file mode 100644 index 0000000..452d7e0 --- /dev/null +++ b/distro/pkg/deb/libyang-dev.install @@ -0,0 +1,3 @@ +usr/include/libyang/*.h +usr/lib/*/*.so +usr/lib/*/pkgconfig/*.pc diff --git a/distro/pkg/deb/libyang-modules.install b/distro/pkg/deb/libyang-modules.install new file mode 100644 index 0000000..04b1c2d --- /dev/null +++ b/distro/pkg/deb/libyang-modules.install @@ -0,0 +1 @@ +usr/share/yang/modules/libyang diff --git a/distro/pkg/deb/libyang-tools.examples b/distro/pkg/deb/libyang-tools.examples new file mode 100644 index 0000000..63c4cb1 --- /dev/null +++ b/distro/pkg/deb/libyang-tools.examples @@ -0,0 +1 @@ +tools/lint/examples/* diff --git a/distro/pkg/deb/libyang-tools.install b/distro/pkg/deb/libyang-tools.install new file mode 100644 index 0000000..04f859b --- /dev/null +++ b/distro/pkg/deb/libyang-tools.install @@ -0,0 +1,3 @@ +usr/bin/yanglint +usr/bin/yangre +usr/share/man/man1 diff --git a/distro/pkg/deb/libyang3.install b/distro/pkg/deb/libyang3.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/distro/pkg/deb/libyang3.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/distro/pkg/deb/rules b/distro/pkg/deb/rules new file mode 100755 index 0000000..58f845d --- /dev/null +++ b/distro/pkg/deb/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +include /usr/share/dpkg/default.mk + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_BUILD_TYPE:String="Release" diff --git a/distro/pkg/deb/source/format b/distro/pkg/deb/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/distro/pkg/deb/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/distro/pkg/deb/tests/control b/distro/pkg/deb/tests/control new file mode 100644 index 0000000..ca73c4a --- /dev/null +++ b/distro/pkg/deb/tests/control @@ -0,0 +1,3 @@ +Tests: yanglint +Depends: gzip, + libyang-tools diff --git a/distro/pkg/deb/tests/yanglint b/distro/pkg/deb/tests/yanglint new file mode 100755 index 0000000..30719e0 --- /dev/null +++ b/distro/pkg/deb/tests/yanglint @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +# Setup the test file +trap 'rm -f "${TESTFILE}"; rmdir "${TESTDIR}"' EXIT +TESTDIR=$(mktemp -d /tmp/yanglint.XXXXXX) +TESTFILE="${TESTDIR}/ietf-interfaces.yang" + +# Unpack or copy the test file +if test -f /usr/share/doc/libyang-tools/examples/ietf-interfaces.yang.gz; then + gunzip -c < /usr/share/doc/libyang-tools/examples/ietf-interfaces.yang.gz > "${TESTFILE}" +else + cp /usr/share/doc/libyang-tools/examples/ietf-interfaces.yang "${TESTFILE}" +fi + +# Lint the test file +yanglint "${TESTFILE}" diff --git a/distro/pkg/deb/watch b/distro/pkg/deb/watch new file mode 100644 index 0000000..b391882 --- /dev/null +++ b/distro/pkg/deb/watch @@ -0,0 +1,4 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libyang-$1.tar.gz%" \ + https://github.com/CESNET/libyang/releases \ + (?:.*?/)?v?(\d[\d.]*)(?:-r\d+)?\.tar\.gz debian uupdate |