summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog10
-rw-r--r--debian/patches/boost-fixes.patch73
-rw-r--r--debian/patches/fix-runpath.patch30
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/taglib-2.patch22
-rw-r--r--debian/salsa-ci.yml2
-rw-r--r--debian/tests/control3
-rwxr-xr-xdebian/tests/smoke77
8 files changed, 208 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog
index fcdbfa8..e681dce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ncmpcpp (0.9.2-2.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * [0de2496] chore(debian): add Salsa CI configuration
+ * [7c90da8] fix(debian): fix Boost build (Closes: #1110620)
+ * [8e8fbbb] fix(debian): fix spurious RUNPATH entries
+ * [80e657d] test(debian): add smoke autopkgtest
+
+ -- Anton Gladky <gladk@debian.org> Sun, 22 Mar 2026 10:00:28 +0100
+
ncmpcpp (0.9.2-2.2) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/patches/boost-fixes.patch b/debian/patches/boost-fixes.patch
new file mode 100644
index 0000000..031843c
--- /dev/null
+++ b/debian/patches/boost-fixes.patch
@@ -0,0 +1,73 @@
+Description: Fix build issues with modern Boost versions
+Author: Anton Gladky <gladk@debian.org>
+Bug-Debian: https://bugs.debian.org/1110620
+Forwarded: no
+Last-Update: 2026-03-21
+
+Index: ncmpcpp/m4/boost.m4
+===================================================================
+--- ncmpcpp.orig/m4/boost.m4
++++ ncmpcpp/m4/boost.m4
+@@ -1136,9 +1136,11 @@ BOOST_DEFUN([String_Algo],
+ # documentation of BOOST_FIND_LIB above. This library was introduced in Boost
+ # 1.35.0.
+ BOOST_DEFUN([System],
+-[BOOST_FIND_LIB([system], [$1],
+- [boost/system/error_code.hpp],
+- [boost::system::error_code e; e.clear();])
++[BOOST_FIND_HEADER([boost/system/error_code.hpp])
++BOOST_SYSTEM_LIBS=
++BOOST_SYSTEM_LDFLAGS=
++AC_SUBST([BOOST_SYSTEM_LIBS])
++AC_SUBST([BOOST_SYSTEM_LDFLAGS])
+ ])# BOOST_SYSTEM
+
+
+Index: ncmpcpp/src/curses/menu.h
+===================================================================
+--- ncmpcpp.orig/src/curses/menu.h
++++ ncmpcpp/src/curses/menu.h
+@@ -22,6 +22,7 @@
+ #define NCMPCPP_MENU_H
+
+ #include <boost/iterator/transform_iterator.hpp>
++#include <boost/type_traits/add_const.hpp>
+ #include <boost/range/detail/any_iterator.hpp>
+ #include <cassert>
+ #include <functional>
+Index: ncmpcpp/src/song_list.h
+===================================================================
+--- ncmpcpp.orig/src/song_list.h
++++ ncmpcpp/src/song_list.h
+@@ -21,6 +21,7 @@
+ #ifndef NCMPCPP_SONG_LIST_H
+ #define NCMPCPP_SONG_LIST_H
+
++#include <boost/type_traits/add_const.hpp>
+ #include <boost/range/detail/any_iterator.hpp>
+ #include "curses/menu.h"
+ #include "song.h"
+Index: ncmpcpp/src/interfaces.h
+===================================================================
+--- ncmpcpp.orig/src/interfaces.h
++++ ncmpcpp/src/interfaces.h
+@@ -21,6 +21,7 @@
+ #ifndef NCMPCPP_INTERFACES_H
+ #define NCMPCPP_INTERFACES_H
+
++#include <boost/type_traits/add_const.hpp>
+ #include <boost/range/detail/any_iterator.hpp>
+ #include <boost/tuple/tuple.hpp>
+ #include <string>
+Index: ncmpcpp/src/screens/search_engine.cpp
+===================================================================
+--- ncmpcpp.orig/src/screens/search_engine.cpp
++++ ncmpcpp/src/screens/search_engine.cpp
+@@ -19,6 +19,7 @@
+ ***************************************************************************/
+
+ #include <array>
++#include <boost/type_traits/add_const.hpp>
+ #include <boost/range/detail/any_iterator.hpp>
+ #include <iomanip>
+
diff --git a/debian/patches/fix-runpath.patch b/debian/patches/fix-runpath.patch
new file mode 100644
index 0000000..4a022f7
--- /dev/null
+++ b/debian/patches/fix-runpath.patch
@@ -0,0 +1,30 @@
+Description: Fix spurious RUNPATH entries in the installed binary
+Author: Anton Gladky <gladk@debian.org>
+Last-Update: 2026-03-22
+
+Index: ncmpcpp/configure.ac
+===================================================================
+--- ncmpcpp.orig/configure.ac
++++ ncmpcpp/configure.ac
+@@ -139,7 +139,7 @@ LIBS="$LIBS $BOOST_REGEX_LIBS"
+ BOOST_THREAD
+ AC_SUBST(BOOST_THREAD_LDFLAGS)
+ AC_SUBST(BOOST_THREAD_LIBS)
+-LDFLAGS+="$LDFLAGS $BOOST_THREAD_LDFLAGS"
++LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
+ LIBS="$LIBS $BOOST_THREAD_LIBS"
+
+ # icu
+Index: ncmpcpp/m4/boost.m4
+===================================================================
+--- ncmpcpp.orig/m4/boost.m4
++++ ncmpcpp/m4/boost.m4
+@@ -494,7 +494,7 @@ dnl generated only once above (before we
+ LIBS=$boost_save_LIBS
+ ])
+ test x"$boost_ldpath" != x &&
+- Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
++ Boost_lib_LDFLAGS="-L$boost_ldpath"
+ Boost_lib_LDPATH="$boost_ldpath"
+ break 7
+ else
diff --git a/debian/patches/series b/debian/patches/series
index 839d6c4..ee92620 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
taglib-2.patch
+boost-fixes.patch
+fix-runpath.patch
diff --git a/debian/patches/taglib-2.patch b/debian/patches/taglib-2.patch
index 4a3a29f..6b69df2 100644
--- a/debian/patches/taglib-2.patch
+++ b/debian/patches/taglib-2.patch
@@ -7,11 +7,11 @@ https://gitlab.archlinux.org/archlinux/packaging/packages/ncmpcpp/-/commit/a39bf
Bug-Debian: https://bugs.debian.org/1092708
Forwarded: no
---
-diff --git a/extras/artist_to_albumartist.cpp b/extras/artist_to_albumartist.cpp
-index c3ddfee3..bf5aac29 100644
---- a/extras/artist_to_albumartist.cpp
-+++ b/extras/artist_to_albumartist.cpp
-@@ -34,7 +34,7 @@ enum class CopyResult { Success, NoArtist, AlbumArtistAlreadyInPlace };
+Index: ncmpcpp/extras/artist_to_albumartist.cpp
+===================================================================
+--- ncmpcpp.orig/extras/artist_to_albumartist.cpp
++++ ncmpcpp/extras/artist_to_albumartist.cpp
+@@ -34,7 +34,7 @@ enum class CopyResult { Success, NoArtis
bool is_framelist_empty(const TagLib::ID3v2::FrameList &list)
{
for (auto it = list.begin(); it != list.end(); ++it)
@@ -20,11 +20,11 @@ index c3ddfee3..bf5aac29 100644
return false;
return true;
}
-diff --git a/src/tags.cpp b/src/tags.cpp
-index 6cd6a8c2..09731801 100644
---- a/src/tags.cpp
-+++ b/src/tags.cpp
-@@ -123,12 +123,12 @@ void writeCommonTags(const MPD::MutableSong &s, TagLib::Tag *tag)
+Index: ncmpcpp/src/tags.cpp
+===================================================================
+--- ncmpcpp.orig/src/tags.cpp
++++ ncmpcpp/src/tags.cpp
+@@ -122,12 +122,12 @@ void writeCommonTags(const MPD::MutableS
tag->setArtist(ToWString(s.getArtist()));
tag->setAlbum(ToWString(s.getAlbum()));
try {
@@ -39,7 +39,7 @@ index 6cd6a8c2..09731801 100644
} catch (boost::bad_lexical_cast &) {
std::cerr << "writeCommonTags: couldn't write 'track' tag to '" << s.getURI() << "' as it's not a positive integer\n";
}
-@@ -306,7 +306,7 @@ bool write(MPD::MutableSong &s)
+@@ -294,7 +294,7 @@ bool write(MPD::MutableSong &s)
{
writeID3v2Tags(s, mpeg_file->ID3v2Tag(true));
// write id3v2.4 tags only
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
new file mode 100644
index 0000000..26871b9
--- /dev/null
+++ b/debian/salsa-ci.yml
@@ -0,0 +1,2 @@
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..80a029f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: smoke
+Depends: @, binutils
+Restrictions: superficial
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100755
index 0000000..171406f
--- /dev/null
+++ b/debian/tests/smoke
@@ -0,0 +1,77 @@
+#!/bin/sh
+set -e
+
+PASS=0
+FAIL=0
+
+ok() { echo "OK: $*"; PASS=$((PASS + 1)); }
+fail(){ echo "FAIL: $*"; FAIL=$((FAIL + 1)); }
+
+# 1. Binary is present and executable
+if [ -x "$(command -v ncmpcpp)" ]; then
+ ok "ncmpcpp binary found in PATH"
+else
+ fail "ncmpcpp binary not found or not executable"
+fi
+
+# 2. --version exits cleanly and reports the package name
+VERSION_OUT=$(ncmpcpp --version 2>&1)
+if echo "$VERSION_OUT" | grep -q "^ncmpcpp"; then
+ ok "--version reports ncmpcpp"
+else
+ fail "--version output did not start with 'ncmpcpp': $VERSION_OUT"
+fi
+
+# 3. --help exits 0 and mentions expected flags
+HELP_OUT=$(ncmpcpp --help 2>&1)
+if echo "$HELP_OUT" | grep -q -- "--version"; then
+ ok "--help output mentions --version"
+else
+ fail "--help output missing --version flag"
+fi
+if echo "$HELP_OUT" | grep -q -- "--config"; then
+ ok "--help output mentions --config"
+else
+ fail "--help output missing --config flag"
+fi
+
+# 4. Optional screens compiled in
+for feature in "tag editor" "outputs" "visualizer" "clock"; do
+ if echo "$VERSION_OUT" | grep -q "$feature"; then
+ ok "optional screen compiled in: $feature"
+ else
+ fail "optional screen missing: $feature"
+ fi
+done
+
+# 5. Support libraries compiled in
+for lib in fftw ncurses taglib; do
+ if echo "$VERSION_OUT" | grep -q "$lib"; then
+ ok "built with support for: $lib"
+ else
+ fail "missing support for: $lib"
+ fi
+done
+
+# 6. --ignore-config-errors suppresses error on unknown option
+TMPCONF=$(mktemp)
+echo "this_is_not_a_valid_option = true" > "$TMPCONF"
+if ncmpcpp --config "$TMPCONF" --ignore-config-errors --help > /dev/null 2>&1; then
+ ok "--ignore-config-errors suppresses unknown-option error"
+else
+ fail "--ignore-config-errors did not suppress error for invalid config"
+fi
+rm -f "$TMPCONF"
+
+# 7. No custom RUNPATH in the binary (lintian: custom-library-search-path)
+BINARY=$(command -v ncmpcpp)
+RUNPATH=$(readelf -d "$BINARY" 2>/dev/null | grep -i 'runpath\|rpath' || true)
+if [ -z "$RUNPATH" ]; then
+ ok "binary has no RUNPATH/RPATH entries"
+else
+ fail "binary has unexpected RUNPATH/RPATH: $RUNPATH"
+fi
+
+echo ""
+echo "Results: $PASS passed, $FAIL failed"
+[ "$FAIL" -eq 0 ]