Merge ~lucaskanashiro/ubuntu/+source/libtraceevent:run-test-plus-dep8 into ubuntu/+source/libtraceevent:ubuntu/devel

Proposed by Lucas Kanashiro
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Lucas Kanashiro
Merged at revision: aa7739510321fc588c587f1aa1962bc48a9ebbb6
Proposed branch: ~lucaskanashiro/ubuntu/+source/libtraceevent:run-test-plus-dep8
Merge into: ubuntu/+source/libtraceevent:ubuntu/devel
Diff against target: 123 lines (+69/-4)
7 files modified
debian/changelog (+10/-0)
debian/control (+3/-2)
debian/patches/0001-utest-traceevent-utest.c-fix-array-definition-in-big.patch (+42/-0)
debian/patches/series (+1/-0)
debian/rules (+0/-2)
debian/tests/build-examples.sh (+10/-0)
debian/tests/control (+3/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Sergio Durigan Junior (community) Approve
Canonical Server Pending
Canonical Server Reporter Pending
Review via email: mp+438480@code.launchpad.net

Description of the change

This is an effort to promote libtraceevent to main (it is a dependency of libtracefs which is a dependency of ndctl), run the upstream make test during build and also add a DEP-8 test to compile the upstream samples against the installed version of the library.

PPA with the proposed package:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/testing

autopkgtest successfully passed localy:

autopkgtest [18:08:05]: @@@@@@@@@@@@@@@@@@@@ summary
build-examples.sh PASS

And just to confirm, I believe those changes do not require a FFe.

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

FWIW I plan to forward those changes to Debian once this MP is approved.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Hum, the build failed in s390x. Needs more investigation.

a092ff4... by Lucas Kanashiro

d/patches: add patch to fix make test in big endian architectures

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

The build was fixed on s390x. Up for review again. The added patch still needs to be forwarded to upstream.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Patch was forwarded to upstream:

https://lore.kernel<email address hidden>/T/#u

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Lucas.

There's one minor nit with the indentation of build-examples.sh, but otherwise this LGTM. Builds and tests fine locally.

One question I forgot to ask during my review of libtracefs (and that also applies here): do you intend to submit these modifications to the Debian package as well?

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: lucaskanashiro, sergiodj
Uploaders: lucaskanashiro, sergiodj
MP auto-approved

review: Approve
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thank you Sergio. Fixed the indentation issue. And yes, I'll be forwarding all those changes to Debian.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Package uploaded and changes forwarded to Debian:

https://salsa.debian.org/sudip/libtraceevent/-/merge_requests/3

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 367b4fe..a0f150d 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+libtraceevent (1:1.7.1-1ubuntu1) lunar; urgency=medium
7+
8+ * Run upstream make test in dh_auto_test.
9+ - d/control: add b-d on libcunit1-dev.
10+ - d/rules: remove override_dh_auto_test with nothing in it.
11+ * d/tests: add DEP-8 test to build samples.
12+ * d/patches: add patch to fix make test in big endian architectures.
13+
14+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Tue, 07 Mar 2023 18:01:11 -0300
15+
16 libtraceevent (1:1.7.1-1) unstable; urgency=medium
17
18 [ Debian Janitor ]
19diff --git a/debian/control b/debian/control
20index 9aafee5..32ab147 100644
21--- a/debian/control
22+++ b/debian/control
23@@ -1,7 +1,8 @@
24 Source: libtraceevent
25 Priority: optional
26-Maintainer: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
27-Build-Depends: debhelper-compat (= 13), pkg-config, asciidoc, xmlto, source-highlight
28+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
29+XSBC-Original-Maintainer: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
30+Build-Depends: debhelper-compat (= 13), pkg-config, asciidoc, xmlto, source-highlight, libcunit1-dev
31 Standards-Version: 4.6.2
32 Section: libs
33 Vcs-Browser: https://salsa.debian.org/sudip/libtraceevent
34diff --git a/debian/patches/0001-utest-traceevent-utest.c-fix-array-definition-in-big.patch b/debian/patches/0001-utest-traceevent-utest.c-fix-array-definition-in-big.patch
35new file mode 100644
36index 0000000..846bbb2
37--- /dev/null
38+++ b/debian/patches/0001-utest-traceevent-utest.c-fix-array-definition-in-big.patch
39@@ -0,0 +1,42 @@
40+From: Lucas Kanashiro <lucas.kanashiro@canonical.com>
41+Date: Tue, 7 Mar 2023 19:03:17 -0300
42+Subject: utest/traceevent-utest.c: fix array definition in big endian arches
43+
44+A comma is missing in the definition of the array values.
45+
46+Forwarded: yes, https://lore.kernel.org/linux-trace-users/9fb46232-824f-f0a5-5468-ee7240811719@ubuntu.com/T/#u
47+---
48+ utest/traceevent-utest.c | 6 +++---
49+ 1 file changed, 3 insertions(+), 3 deletions(-)
50+
51+diff --git a/utest/traceevent-utest.c b/utest/traceevent-utest.c
52+index ebd5eb9..041843e 100644
53+--- a/utest/traceevent-utest.c
54++++ b/utest/traceevent-utest.c
55+@@ -45,7 +45,7 @@ static char dyn_str_data[] = {
56+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
57+ /* common type */ 1, 0x00,
58+ #else
59+- /* common type */ 0x00, 1
60++ /* common type */ 0x00, 1,
61+ #endif
62+ /* common flags */ 0x00,
63+ /* common_preempt_count */ 0x00,
64+@@ -82,7 +82,7 @@ static char dyn_str_old_data[] = {
65+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
66+ /* common type */ 2, 0x00,
67+ #else
68+- /* common type */ 0x00, 2
69++ /* common type */ 0x00, 2,
70+ #endif
71+ /* common flags */ 0x00,
72+ /* common_preempt_count */ 0x00,
73+@@ -166,7 +166,7 @@ static char sizeof_data[] = {
74+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
75+ /* common type */ 23, 0x00,
76+ #else
77+- /* common type */ 0x00, 23
78++ /* common type */ 0x00, 23,
79+ #endif
80+ /* common flags */ 0x00,
81+ /* common_preempt_count */ 0x00,
82diff --git a/debian/patches/series b/debian/patches/series
83new file mode 100644
84index 0000000..7e18324
85--- /dev/null
86+++ b/debian/patches/series
87@@ -0,0 +1 @@
88+0001-utest-traceevent-utest.c-fix-array-definition-in-big.patch
89diff --git a/debian/rules b/debian/rules
90index 99be659..c4c5c94 100755
91--- a/debian/rules
92+++ b/debian/rules
93@@ -18,5 +18,3 @@ override_dh_auto_build:
94
95 override_dh_auto_install:
96 dh_auto_install -- doc-install $(build_flags)
97-
98-override_dh_auto_test:
99diff --git a/debian/tests/build-examples.sh b/debian/tests/build-examples.sh
100new file mode 100755
101index 0000000..2568752
102--- /dev/null
103+++ b/debian/tests/build-examples.sh
104@@ -0,0 +1,10 @@
105+#!/bin/bash
106+
107+for f in $(ls samples/*.c); do
108+ name=$(basename $f .c)
109+ flags=$(pkg-config --libs libtraceevent)
110+ cflags=$(pkg-config --cflags libtraceevent)
111+
112+ cc -o $AUTOPKGTEST_TMP/$name $f $flags $cflags
113+ echo "[I] Built example $f"
114+done
115diff --git a/debian/tests/control b/debian/tests/control
116new file mode 100644
117index 0000000..36c9b52
118--- /dev/null
119+++ b/debian/tests/control
120@@ -0,0 +1,3 @@
121+Tests: build-examples.sh
122+Depends: @, @builddeps@
123+Restrictions: superficial

Subscribers

People subscribed via source and target branches