mirror of
https://github.com/open62541/open62541.git
synced 2025-06-03 04:00:21 +00:00
refactor(tools): Remove the packaging tools -- now handled out-of-tree at https://salsa.debian.org/jpfr/open62541
This commit is contained in:
parent
207e695e84
commit
d748b69f60
50
.github/workflows/debian_packing.yml
vendored
50
.github/workflows/debian_packing.yml
vendored
@ -1,50 +0,0 @@
|
||||
name: "Debian Package Generation"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
tags:
|
||||
- 'v1.*'
|
||||
- 'v1.*.*'
|
||||
|
||||
jobs:
|
||||
Debian-Package-Branch-Preperation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||
- run: git fetch --prune --unshallow --tags
|
||||
- run: python ./tools/prepare_packaging.py
|
||||
- run: git checkout -b pack-tmp
|
||||
- run: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- run: git config --local user.name "github-actions[bot]"
|
||||
- run: cp -r deps/mdnsd deps/mdnsd_back
|
||||
- run: cp -r deps/ua-nodeset deps/ua-nodeset_back
|
||||
- run: git rm -rf --cached deps/mdnsd
|
||||
- run: git rm -rf --cached deps/ua-nodeset
|
||||
- run: mv deps/mdnsd_back deps/mdnsd
|
||||
- run: rm -rf deps/mdnsd/.git
|
||||
- run: mv deps/ua-nodeset_back deps/ua-nodeset
|
||||
- run: rm -rf deps/ua-nodeset/.git
|
||||
- run: rm -rf .gitmodules
|
||||
- run: git add deps/*
|
||||
- run: git add debian/*
|
||||
- run: git add CMakeLists.txt
|
||||
- run: git commit -m "[ci skip] Pack with inline submodules"
|
||||
- name: Branch name
|
||||
run: echo running on branch pack/${GITHUB_REF##*/}
|
||||
- name: Get the current branch name
|
||||
shell: bash
|
||||
run: echo "::set-output name=branch::${GITHUB_REF##*/}"
|
||||
id: myref
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: pack/${{ steps.myref.outputs.branch }}
|
||||
force: true
|
@ -1,5 +0,0 @@
|
||||
open62541 (1.4.0) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release of the 1.4.0 version.
|
||||
|
||||
-- open62541 Team <open62541-core@googlegroups.com> Mon, 13 May 2024 10:51:28 +0100
|
@ -1 +0,0 @@
|
||||
10
|
@ -1,48 +0,0 @@
|
||||
Source: open62541
|
||||
Priority: optional
|
||||
Maintainer: open62541 Team <open62541-core@googlegroups.com>
|
||||
Build-Depends: debhelper (>= 9), cmake (>= 3.13), python3 (>= 3.7), libmbedtls-dev (>= 2.16.0)
|
||||
Standards-Version: 4.4.1
|
||||
Section: libs
|
||||
Homepage: https://open62541.org/
|
||||
Vcs-Git: https://github.com/open62541/open62541.git
|
||||
Vcs-Browser: https://github.com/open62541/open62541
|
||||
|
||||
Package: libopen62541-<soname>
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libmbedtls12 | libmbedtls14
|
||||
Description: open62541 (<http://open62541.org>) is an open source implementation
|
||||
of OPC UA (OPC Unified Architecture / IEC 62541) written in the C language. The
|
||||
library is usable with all major compilers and provides the necessary tools to
|
||||
implement dedicated OPC UA clients and servers, or to integrate OPC UA-based
|
||||
communication into existing applications.
|
||||
.
|
||||
This package provides the open62541 shared library
|
||||
|
||||
Package: libopen62541-<soname>-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: libopen62541-<soname> (= ${binary:Version}), ${misc:Depends}, libmbedtls-dev
|
||||
Description: open62541 (<http://open62541.org>) is an open source implementation
|
||||
of OPC UA (OPC Unified Architecture / IEC 62541) written in the C language. The
|
||||
library is usable with all major compilers and provides the necessary tools to
|
||||
implement dedicated OPC UA clients and servers, or to integrate OPC UA-based
|
||||
communication into existing applications.
|
||||
.
|
||||
This package provides the open62541 header and development files
|
||||
|
||||
Package: libopen62541-<soname>-tools
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends}, python3
|
||||
Recommends: libopen62541-<soname>-dev
|
||||
Description: open62541 (<http://open62541.org>) is an open source implementation
|
||||
of OPC UA (OPC Unified Architecture / IEC 62541) written in the C language. The
|
||||
library is usable with all major compilers and provides the necessary tools to
|
||||
implement dedicated OPC UA clients and servers, or to integrate OPC UA-based
|
||||
communication into existing applications.
|
||||
.
|
||||
This package provides some open62541 tools, e.g. the nodeset compiler
|
@ -1,119 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: open62541
|
||||
Upstream-Contact: open62541 Team <open62541-core@googlegroups.com>
|
||||
Source: https://open62541.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 2019, open62541 Team <open62541-core@googlegroups.com>
|
||||
License: MPL-2.0
|
||||
|
||||
Files: deps/ziptree.*
|
||||
Copyright: 2018, 2021-2022 Julius Pfrommer
|
||||
License: MPL-2.0
|
||||
|
||||
Files: deps/open62541_queue.h
|
||||
Copyright: 1991, 1993, The Regents of the University of California.
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: deps/base64.c
|
||||
Copyright: 2005-2011, Jouni Malinen
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: deps/parse_num.c
|
||||
Copyright: 2005-2013, Rich Felker
|
||||
License: MIT
|
||||
|
||||
Files: deps/itoa.c
|
||||
Copyright: 2017, Techie Delight
|
||||
License: MIT
|
||||
|
||||
Files: deps/mp_printf.*
|
||||
Copyright: 2014-2019, Marco Paland
|
||||
2021-2023, Eyal Rozenberg
|
||||
License: MIT
|
||||
|
||||
Files: deps/pcg_basic.*
|
||||
Copyright: 2014, Melissa O'Neill
|
||||
License: Apache-2.0
|
||||
|
||||
Files: deps/dtoa.*
|
||||
Copyright: 2013, Andreas Samoljuk
|
||||
2023, Julius Pfrommer
|
||||
License: BSL-1.0
|
||||
|
||||
License: MPL-2.0
|
||||
On Debian systems, the complete text of the Mozilla Public License, Version 2.0
|
||||
can be found in /usr/share/common-licenses/MPL-2.0.
|
||||
|
||||
License: MIT
|
||||
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.
|
||||
|
||||
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 University 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 REGENTS 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 REGENTS 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.
|
||||
|
||||
License: Apache-2.0
|
||||
On Debian systems, the complete text of the Apache License, Version 2.0 can be
|
||||
found in /usr/share/common-licenses/Apache-2.0.
|
||||
|
||||
License: BSL-1.0
|
||||
Boost Software License 1.0
|
||||
.
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by this
|
||||
license (the “Software”) to use, reproduce, display, distribute, execute, and
|
||||
transmit the Software, and to prepare derivative works of the Software, and to
|
||||
permit third-parties to whom the Software is furnished to do so, all subject to
|
||||
the following:
|
||||
.
|
||||
The copyright notices in the Software and this entire statement, including the
|
||||
above license grant, this restriction and the following disclaimer, must be
|
||||
included in all copies of the Software, in whole or in part, and all derivative
|
||||
works of the Software, unless such copies or derivative works are solely in the
|
||||
form of machine-executable object code generated by a source language
|
||||
processor.
|
||||
.
|
||||
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@ -1,3 +0,0 @@
|
||||
usr/include
|
||||
usr/lib/*/*.so
|
||||
usr/lib/*/pkgconfig/open62541.pc
|
@ -1,5 +0,0 @@
|
||||
usr/lib/*/cmake/open62541/*
|
||||
usr/share/open62541/*.py
|
||||
usr/share/open62541/certs
|
||||
usr/share/open62541/nodeset_compiler
|
||||
usr/share/open62541/schema
|
@ -1 +0,0 @@
|
||||
usr/lib/*/*.so.*
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DH_VERBOSE = 1
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=REDUCED -DUA_ENABLE_DATATYPES_ALL=ON -DUA_ENABLE_ENCRYPTION="MBEDTLS" -DUA_ENABLE_PUBSUB=ON -DUA_ENABLE_PUBSUB_ENCRYPTION=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON -DUA_ENABLE_AMALGAMATION=OFF -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"
|
||||
|
||||
override_dh_auto_test:
|
||||
dh_auto_test -- ARGS+=--output-on-failure
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake
|
@ -1 +0,0 @@
|
||||
3.0 (native)
|
@ -1,5 +0,0 @@
|
||||
[buildconfig]
|
||||
builder = tito.builder.Builder
|
||||
tagger = tito.tagger.VersionTagger
|
||||
changelog_do_not_remove_cherrypick = 0
|
||||
changelog_format = %s (%ae)
|
@ -1,101 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import re
|
||||
from email.utils import formatdate
|
||||
import datetime
|
||||
import shutil
|
||||
|
||||
# Get the base filesystem paths.
|
||||
# The current path is used as the "build environment"
|
||||
dirpath = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)),".."))
|
||||
debian_path = os.path.join(dirpath, "tools/packaging/debian")
|
||||
target_debian_path = os.path.join(dirpath, "debian")
|
||||
shutil.copytree(debian_path, target_debian_path, ignore=shutil.ignore_patterns('*-template'))
|
||||
|
||||
# Unpack the library version from the git information
|
||||
git_describe_version = subprocess.check_output(["git", "describe", "--tags", "--dirty", "--match", "v*"]).decode('utf-8').strip()
|
||||
|
||||
# v1.2
|
||||
# v1.2.3
|
||||
# v1.2.3-rc1
|
||||
# v1.2.3-rc1-dirty
|
||||
# v1.2.3-5-g4538abcd
|
||||
# v1.2.3-5-g4538abcd-dirty
|
||||
# git_describe_version = "v1.2.3"
|
||||
|
||||
m = re.match(r"^v([0-9]{1,4})(\.[0-9]{1,4})?(\.[0-9]{1,4})?(-(.*){1,100})?$", git_describe_version)
|
||||
version_major = m.group(1) if m.group(1) is not None else "0"
|
||||
version_minor = m.group(2).replace(".", "") if m.group(2) is not None else "0"
|
||||
version_patch = m.group(3).replace(".", "") if m.group(3) is not None else "0"
|
||||
version_label = m.group(4) if m.group(4) is not None else ""
|
||||
#print("major {} minor {} patch {} label {}".format(version_major, version_minor, version_patch, version_label))
|
||||
|
||||
# We can not use unstable for now, because dpkg-buildpackage wants to sign them
|
||||
# It will fail with gpg: skipped "open62541 Team <open62541-core@googlegroups.com>": No secret key
|
||||
#debian_distribution = "unstable"
|
||||
#if version_label is not "":
|
||||
debian_distribution = "UNRELEASED"
|
||||
|
||||
changelog_file = os.path.join(debian_path, "changelog")
|
||||
|
||||
# remove leading 'v'
|
||||
changelog_version = git_describe_version[1:] if git_describe_version[0] == 'v' else git_describe_version
|
||||
# replace all '-' with '~' in version
|
||||
changelog_version = changelog_version.replace('-', '~')
|
||||
|
||||
# prefix the version string with the current ISO datetime to ensure correct version ordering.
|
||||
# See https://github.com/open62541/open62541/issues/3140
|
||||
changelog_version = datetime.datetime.utcnow().replace(microsecond=0).isoformat().replace('-', '').replace(':', '') + '~' + changelog_version
|
||||
|
||||
# Create an updated changelog file with the version information
|
||||
with open(changelog_file) as original:
|
||||
data = original.read()
|
||||
with open(os.path.join(target_debian_path, "changelog"), 'w') as modified:
|
||||
new_entry = """open62541 ({version}) {distribution}; urgency=medium
|
||||
|
||||
* Full changelog is available here:
|
||||
https://github.com/open62541/open62541/blob/master/CHANGELOG
|
||||
|
||||
-- open62541 Team <open62541-core@googlegroups.com> {time}
|
||||
""".format(version=changelog_version, time=formatdate(), distribution = debian_distribution)
|
||||
|
||||
modified.write(new_entry + "\n" + data)
|
||||
|
||||
# Create control file and replace template variables
|
||||
control_file_template = os.path.join(debian_path, "control-template")
|
||||
control_file = os.path.join(target_debian_path, "control")
|
||||
shutil.copy(control_file_template, control_file)
|
||||
with open(control_file, 'r+') as f:
|
||||
content = f.read()
|
||||
f.seek(0)
|
||||
f.truncate()
|
||||
f.write(content.replace('<soname>', f"{version_major}.{version_minor}"))
|
||||
|
||||
# rename the install template to match the soname
|
||||
install_file_template = os.path.join(debian_path, "libopen62541.install-template")
|
||||
install_file = os.path.join(target_debian_path, f"libopen62541-{version_major}.{version_minor}.install")
|
||||
shutil.copy(install_file_template, install_file)
|
||||
|
||||
install_file_template = os.path.join(debian_path, "libopen62541-dev.install-template")
|
||||
install_file = os.path.join(target_debian_path, f"libopen62541-{version_major}.{version_minor}-dev.install")
|
||||
shutil.copy(install_file_template, install_file)
|
||||
|
||||
install_file_template = os.path.join(debian_path, "libopen62541-tools.install-template")
|
||||
install_file = os.path.join(target_debian_path, f"libopen62541-{version_major}.{version_minor}-tools.install")
|
||||
shutil.copy(install_file_template, install_file)
|
||||
|
||||
# Update CMakeLists.txt to include full version string
|
||||
with open(os.path.join(dirpath,"CMakeLists.txt"), 'r+') as f:
|
||||
lines = f.readlines()
|
||||
f.seek(0)
|
||||
f.truncate()
|
||||
for idx, line in enumerate(lines):
|
||||
if idx == 1:
|
||||
f.write(f'set(OPEN62541_VERSION "{git_describe_version}")\n')
|
||||
f.write(line)
|
Loading…
Reference in New Issue
Block a user