Skip to content

Commit 45b3a61

Browse files
Vitexuswarp-agent
andcommitted
Add Debian packaging for python3-opentelemetry-api 1.40.0
- Based on upstream main branch - Package for opentelemetry-api 1.40.0 Co-Authored-By: Warp <agent@warp.dev>
1 parent 9ee6de8 commit 45b3a61

6 files changed

Lines changed: 211 additions & 0 deletions

File tree

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#!groovy
2+
3+
// Aktuální verze Pipeline: https://github.com/VitexSoftware/BuildImages/blob/main/Test/Jenkinsfile-parael
4+
5+
String[] distributions = [
6+
'debian:bookworm',
7+
'debian:trixie',
8+
'debian:forky',
9+
'ubuntu:jammy',
10+
'ubuntu:noble'
11+
]
12+
13+
String vendor = 'vitexsoftware'
14+
String imagePrefix = 'multiflexi-'
15+
16+
properties([
17+
copyArtifactPermission('*')
18+
])
19+
20+
node {
21+
ansiColor('xterm') {
22+
stage('SCM Checkout') {
23+
checkout scm
24+
}
25+
}
26+
}
27+
28+
def branches = [:]
29+
30+
distributions.each { distro ->
31+
branches[distro] = {
32+
def (distroFamily, distroCode) = distro.split(':')
33+
def imageName = "${vendor}/${imagePrefix}${distroCode}:latest"
34+
def buildImage
35+
def artifacts = []
36+
def buildVer
37+
38+
node {
39+
ansiColor('xterm') {
40+
stage("Checkout ${distro}") {
41+
checkout scm
42+
buildImage = docker.image(imageName)
43+
44+
sh 'git checkout debian/changelog'
45+
buildVer = sh(
46+
script: "dpkg-parsechangelog --show-field Version",
47+
returnStdout: true
48+
).trim() + ".${env.BUILD_NUMBER}~${distroCode}"
49+
}
50+
51+
stage("Build ${distro}") {
52+
buildImage.inside('--ipc=host') {
53+
sh """
54+
dch -b -v ${buildVer} "${env.BUILD_TAG}"
55+
sudo apt-get update --allow-releaseinfo-change
56+
sudo chown -R jenkins:jenkins . ..
57+
debuild-pbuilder -r'sudo -E' -i -us -uc -b
58+
mkdir -p \$WORKSPACE/dist/debian/
59+
rm -rf \$WORKSPACE/dist/debian/*
60+
for deb in \$(awk '{print \$1}' debian/files); do
61+
mv "../\$deb" \$WORKSPACE/dist/debian/
62+
done
63+
"""
64+
artifacts = sh(
65+
script: "awk '{print \$1}' debian/files",
66+
returnStdout: true
67+
).trim().split('\n')
68+
}
69+
}
70+
71+
stage("Test ${distro}") {
72+
buildImage.inside('--ipc=host') {
73+
def debconf_debug = 0
74+
sh """
75+
cd \$WORKSPACE/dist/debian/
76+
dpkg-scanpackages . /dev/null > Packages
77+
gzip -9c Packages > Packages.gz
78+
cd \$WORKSPACE
79+
echo "deb [trusted=yes] file://///\$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list
80+
sudo apt-get update --allow-releaseinfo-change
81+
"""
82+
artifacts.each { deb_file ->
83+
if (deb_file.endsWith('.deb')) {
84+
def pkgName = deb_file.tokenize('/')[-1].replaceFirst(/_.*/, '')
85+
def distroCodename = sh(
86+
script: "lsb_release -sc",
87+
returnStdout: true
88+
).trim()
89+
echo "Installing ${pkgName} on ${distroCodename}"
90+
sh """
91+
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=${debconf_debug} \
92+
apt-get -y install ${pkgName} \
93+
|| sudo apt-get -y -f install
94+
"""
95+
}
96+
}
97+
}
98+
}
99+
100+
stage("Archive artifacts ${distro}") {
101+
buildImage.inside('--ipc=host') {
102+
artifacts.each { deb_file ->
103+
println "Archiving artifact: ${deb_file}"
104+
archiveArtifacts artifacts: "dist/debian/${deb_file}"
105+
}
106+
107+
sh '''
108+
set -e
109+
if [ -f debian/files ]; then
110+
while read -r file _; do
111+
[ -n "$file" ] || continue
112+
rm -f "dist/debian/$file" || true
113+
rm -f "../$file" || true
114+
rm -f "$WORKSPACE/$file" || true
115+
done < debian/files
116+
fi
117+
'''
118+
}
119+
}
120+
121+
}
122+
}
123+
}
124+
}
125+
126+
127+
parallel branches
128+
129+
node {
130+
stage('Publish to Aptly') {
131+
publishDebToAptly()
132+
}
133+
}

opentelemetry-api/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
python-opentelemetry-api (1.40.0-1) unstable; urgency=medium
2+
3+
* New upstream release 1.40.0
4+
* Synced with upstream main branch
5+
6+
-- Vítězslav Dvořák <info@vitexsoftware.cz> Mon, 27 Jan 2026 16:47:00 +0100

opentelemetry-api/debian/control

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Source: python-opentelemetry-api
2+
Section: python
3+
Priority: optional
4+
Maintainer: Vítězslav Dvořák <info@vitexsoftware.cz>
5+
Build-Depends:
6+
debhelper-compat (= 13),
7+
dh-python,
8+
pybuild-plugin-pyproject,
9+
python3-all,
10+
python3-hatchling,
11+
Standards-Version: 4.7.0
12+
Homepage: https://opentelemetry.io
13+
Vcs-Git: https://github.com/open-telemetry/opentelemetry-python.git
14+
Vcs-Browser: https://github.com/open-telemetry/opentelemetry-python
15+
Rules-Requires-Root: no
16+
17+
Package: python3-opentelemetry-api
18+
Architecture: all
19+
Depends:
20+
${misc:Depends},
21+
${python3:Depends},
22+
python3-deprecated (>= 1.2.6),
23+
Description: OpenTelemetry Python API
24+
OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument,
25+
generate, collect, and export telemetry data (metrics, logs, and traces)
26+
for analysis in order to understand software performance and behavior.
27+
.
28+
This package provides the OpenTelemetry API for Python, which defines the
29+
interfaces for creating and managing telemetry data.
30+
.
31+
This package provides the Python 3 library.

opentelemetry-api/debian/copyright

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: opentelemetry-api
3+
Upstream-Contact: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
4+
Source: https://github.com/open-telemetry/opentelemetry-api
5+
6+
Files: *
7+
Copyright: 2019-2024 OpenTelemetry Authors
8+
License: Apache-2.0
9+
10+
Files: debian/*
11+
Copyright: 2026 Vítězslav Dvořák <info@vitexsoftware.cz>
12+
License: Apache-2.0
13+
14+
License: Apache-2.0
15+
Permission is hereby granted, free of charge, to any person obtaining a copy
16+
of this software and associated documentation files (the "Software"), to deal
17+
in the Software without restriction, including without limitation the rights
18+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+
copies of the Software, and to permit persons to whom the Software is
20+
furnished to do so, subject to the following conditions:
21+
.
22+
The above copyright notice and this permission notice shall be included in
23+
all copies or substantial portions of the Software.
24+
.
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
IMPLIED, INCLUDING BUT NOT LIApache-2.0ED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31+
THE SOFTWARE.

opentelemetry-api/debian/rules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/make -f
2+
3+
export PYBUILD_NAME=opentelemetry-api
4+
5+
%:
6+
dh $@ --with python3 --buildsystem=pybuild
7+
8+
override_dh_auto_test:
9+
# Skip tests
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (native)

0 commit comments

Comments
 (0)