Adding upstream version 3.1.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
64dbec996d
commit
cfcebb1a7d
569 changed files with 205393 additions and 0 deletions
38
distro/pkg/deb/README.Debian
Normal file
38
distro/pkg/deb/README.Debian
Normal file
|
@ -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
|
66
distro/pkg/deb/README.source
Normal file
66
distro/pkg/deb/README.source
Normal file
|
@ -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
|
5
distro/pkg/deb/changelog
Normal file
5
distro/pkg/deb/changelog
Normal file
|
@ -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
|
1
distro/pkg/deb/compat
Normal file
1
distro/pkg/deb/compat
Normal file
|
@ -0,0 +1 @@
|
|||
10
|
73
distro/pkg/deb/control
Normal file
73
distro/pkg/deb/control
Normal file
|
@ -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.
|
79
distro/pkg/deb/copyright
Normal file
79
distro/pkg/deb/copyright
Normal file
|
@ -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.
|
4
distro/pkg/deb/gbp.conf
Normal file
4
distro/pkg/deb/gbp.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
[DEFAULT]
|
||||
pristine-tar = False
|
||||
debian-branch = master
|
||||
upstream-tree = SLOPPY
|
3
distro/pkg/deb/libyang-dev.install
Normal file
3
distro/pkg/deb/libyang-dev.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
usr/include/libyang/*.h
|
||||
usr/lib/*/*.so
|
||||
usr/lib/*/pkgconfig/*.pc
|
1
distro/pkg/deb/libyang-modules.install
Normal file
1
distro/pkg/deb/libyang-modules.install
Normal file
|
@ -0,0 +1 @@
|
|||
usr/share/yang/modules/libyang
|
1
distro/pkg/deb/libyang-tools.examples
Normal file
1
distro/pkg/deb/libyang-tools.examples
Normal file
|
@ -0,0 +1 @@
|
|||
tools/lint/examples/*
|
3
distro/pkg/deb/libyang-tools.install
Normal file
3
distro/pkg/deb/libyang-tools.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
usr/bin/yanglint
|
||||
usr/bin/yangre
|
||||
usr/share/man/man1
|
1
distro/pkg/deb/libyang3.install
Normal file
1
distro/pkg/deb/libyang3.install
Normal file
|
@ -0,0 +1 @@
|
|||
usr/lib/*/*.so.*
|
12
distro/pkg/deb/rules
Executable file
12
distro/pkg/deb/rules
Executable file
|
@ -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"
|
1
distro/pkg/deb/source/format
Normal file
1
distro/pkg/deb/source/format
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
3
distro/pkg/deb/tests/control
Normal file
3
distro/pkg/deb/tests/control
Normal file
|
@ -0,0 +1,3 @@
|
|||
Tests: yanglint
|
||||
Depends: gzip,
|
||||
libyang-tools
|
18
distro/pkg/deb/tests/yanglint
Executable file
18
distro/pkg/deb/tests/yanglint
Executable file
|
@ -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}"
|
4
distro/pkg/deb/watch
Normal file
4
distro/pkg/deb/watch
Normal file
|
@ -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
|
125
distro/pkg/rpm/libyang.spec
Normal file
125
distro/pkg/rpm/libyang.spec
Normal file
|
@ -0,0 +1,125 @@
|
|||
%if 0%{?rhel} == 8
|
||||
%undefine __cmake_in_source_build
|
||||
%endif
|
||||
|
||||
Name: libyang
|
||||
Version: {{ version }}
|
||||
Release: {{ release }}%{?dist}
|
||||
Summary: YANG data modeling language library
|
||||
Url: https://github.com/CESNET/libyang
|
||||
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
License: BSD
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: cmake(cmocka) >= 1.0.1
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(libpcre2-8) >= 10.21
|
||||
|
||||
%package modules
|
||||
Summary: YANG modules for libyang
|
||||
|
||||
%package devel
|
||||
Summary: Development files for libyang
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: pcre2-devel
|
||||
|
||||
%package devel-doc
|
||||
Summary: Documentation of libyang API
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%package tools
|
||||
Summary: YANG validator tools
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# This was not properly split out before
|
||||
Conflicts: %{name} < 1.0.225-3
|
||||
|
||||
%description modules
|
||||
YANG modules for libyang.
|
||||
|
||||
%description devel
|
||||
Headers of libyang library.
|
||||
|
||||
%description devel-doc
|
||||
Documentation of libyang API.
|
||||
|
||||
%description tools
|
||||
YANG validator tools.
|
||||
|
||||
%description
|
||||
Libyang is YANG data modeling language parser and toolkit
|
||||
written (and providing API) in C.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||
mkdir build
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DCMAKE_BUILD_TYPE:String="Release" \
|
||||
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
|
||||
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
|
||||
..
|
||||
make
|
||||
%else
|
||||
%cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO
|
||||
%cmake_build
|
||||
%if "x%{?suse_version}" == "x"
|
||||
cd %{__cmake_builddir}
|
||||
%endif
|
||||
%endif
|
||||
make doc
|
||||
|
||||
%check
|
||||
%if ( 0%{?rhel} == 0 ) || 0%{?rhel} > 7
|
||||
%if "x%{?suse_version}" == "x"
|
||||
cd %{__cmake_builddir}
|
||||
%endif
|
||||
%endif
|
||||
ctest --output-on-failure -V %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||
cd build
|
||||
make DESTDIR=%{buildroot} install
|
||||
%else
|
||||
%cmake_install
|
||||
cp -a doc/html %{buildroot}/%{_docdir}/libyang/html
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_libdir}/libyang.so.3
|
||||
%{_libdir}/libyang.so.3.*
|
||||
|
||||
%files modules
|
||||
%{_datadir}/yang/modules/libyang/*.yang
|
||||
%dir %{_datadir}/yang/
|
||||
%dir %{_datadir}/yang/modules/
|
||||
%dir %{_datadir}/yang/modules/libyang/
|
||||
|
||||
%files tools
|
||||
%{_bindir}/yanglint
|
||||
%{_bindir}/yangre
|
||||
%{_datadir}/man/man1/yanglint.1.gz
|
||||
%{_datadir}/man/man1/yangre.1.gz
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libyang.so
|
||||
%{_libdir}/pkgconfig/libyang.pc
|
||||
%{_includedir}/libyang/*.h
|
||||
%dir %{_includedir}/libyang/
|
||||
|
||||
%files devel-doc
|
||||
%{_docdir}/libyang
|
||||
|
||||
%changelog
|
||||
* {{ now }} Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
|
||||
- upstream package
|
Loading…
Add table
Add a link
Reference in a new issue