[arch-commits] Commit in ecasound/trunk (2 files)
David Runge
dvzrv at gemini.archlinux.org
Wed Dec 29 14:17:26 UTC 2021
Date: Wednesday, December 29, 2021 @ 14:17:25
Author: dvzrv
Revision: 1087250
upgpkg: ecasound 2.9.3-7: Rebuild to fix issues with LTO and ncurses >= 6.3.
Add -ffat-lto-objects to CFLAGS and CXXFLAGS to prevent mangled static libs.
Add patch for printf-style format strings used with ncurses >= 6.3.
Simplify quoting in file.
Added:
ecasound/trunk/ecasound-2.9.3-ncurses_6.3_format_string.patch
Modified:
ecasound/trunk/PKGBUILD
------------------------------------------------+
PKGBUILD | 43 +++++++++++++----------
ecasound-2.9.3-ncurses_6.3_format_string.patch | 43 +++++++++++++++++++++++
2 files changed, 69 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-29 14:14:24 UTC (rev 1087249)
+++ PKGBUILD 2021-12-29 14:17:25 UTC (rev 1087250)
@@ -5,15 +5,15 @@
pkgname=ecasound
pkgver=2.9.3
-pkgrel=6
+pkgrel=7
pkgdesc="Command-line multitrack audio processor"
-arch=('x86_64')
+arch=(x86_64)
url="https://ecasound.seul.org/ecasound/"
-license=('GPL2' 'LGPL2.1')
-groups=('pro-audio')
-depends=('gcc-libs' 'glibc' )
-makedepends=('alsa-lib' 'audiofile' 'jack' 'lv2' 'liblo' 'libmikmod'
-'libsamplerate' 'libsndfile' 'lilv' 'ncurses' 'python' 'readline' 'ruby')
+license=(GPL2 LGPL2.1)
+groups=(pro-audio)
+depends=(gcc-libs glibc )
+makedepends=(alsa-lib audiofile jack lv2 liblo libmikmod
+libsamplerate libsndfile lilv ncurses python readline ruby)
optdepends=('bash: for libecasoundc-config and libecasound-config'
'lame: MP3 encoding'
'libfaad2: for .aac/.m4a/.mp4 file support'
@@ -24,15 +24,22 @@
'ruby: ECI API'
'timidity++: for .mid file support'
'vorbis-tools: for .ogg file support')
-provides=('lv2-host')
-source=("https://ecasound.seul.org/download/$pkgname-$pkgver.tar.gz"
- python310.patch)
+provides=(lv2-host)
+source=(
+ "https://ecasound.seul.org/download/$pkgname-$pkgver.tar.gz"
+ "${pkgname}-2.9.3-ncurses_6.3_format_string.patch"
+ python310.patch
+)
sha512sums=('4f70e6f54cd05194a4ffe80905e7488d16d32d684c87736dfdac7b3aebf3d20cbf417964d75e00e781f6f0614b8b699061c69fcbf7e1761d66ce1abfcd5f1140'
+ '319761060a5ecf5a525c934d0e4d5662a25ea7f9b10e0d4044646cc080b54a30302f06e0790e0bc1f1c792dd58c6981d6ab6d3f55fe3ef9ae149d8cbc0e644ba'
'985e7351e163189d6a1c78953d6f09a7d5da36395b3ac91d555f33bb108588ccbf1a1a98ec33cbecd0c61bba236a06067e9e3337f4c1f58edf1531dad8638352')
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 -i ../python310.patch
+ # fix format string error due to ncurses >= 6.3
+ # https://sourceforge.net/p/ecasound/bugs/54/
+ patch -Np1 -i ../"${pkgname}-2.9.3-ncurses_6.3_format_string.patch"
# lv2core is deprecated in favor of lv2:
# https://sourceforge.net/p/ecasound/bugs/52/
sed -e 's/lv2core/lv2/g' -i configure.ac
@@ -40,9 +47,13 @@
sed -e 's/sitedir/vendordir/' -i configure.ac
# using c++98 lilv is not compatible
sed -e 's/c++98/c++11/' -i configure.ac
- autoreconf -vfi
+ autoreconf -fiv
}
build() {
+ # prevent static lib mangling with LTO
+ CFLAGS+=' -ffat-lto-objects'
+ CXXFLAGS+=' -ffat-lto-objects'
+
cd "$pkgname-$pkgver"
./configure --prefix=/usr
make
@@ -49,13 +60,11 @@
}
package() {
- depends+=('libasound.so' 'libjack.so' 'libaudiofile.so' 'liblo.so'
- 'liblilv-0.so' 'libncursesw.so' 'libreadline.so' 'libsamplerate.so'
- 'libsndfile.so')
+ depends+=(libasound.so libjack.so libaudiofile.so liblo.so liblilv-0.so
+ libncursesw.so libreadline.so libsamplerate.so libsndfile.so)
+
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
- # docs
- install -vDm 644 {AUTHORS,BUGS,NEWS,README,RELNOTES,TODO} \
- -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ install -vDm 644 {AUTHORS,BUGS,NEWS,README,RELNOTES,TODO} -t "${pkgdir}/usr/share/doc/${pkgname}/"
}
# vim:set ts=2 sw=2 et:
Added: ecasound-2.9.3-ncurses_6.3_format_string.patch
===================================================================
--- ecasound-2.9.3-ncurses_6.3_format_string.patch (rev 0)
+++ ecasound-2.9.3-ncurses_6.3_format_string.patch 2021-12-29 14:17:25 UTC (rev 1087250)
@@ -0,0 +1,43 @@
+From f2edef1f1e7b56f43ceea63f0d3024474f813b5d Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich at gmail.com>
+Date: Fri, 5 Nov 2021 23:26:19 +0000
+Subject: [PATCH] ecasignalview.cpp: always use "%s"-style format for
+ printf()-style functions
+
+`ncuses-6.3` added printf-style function attributes and now makes
+it easier to catch cases when user input is used in palce of format
+string when built with CFLAGS=-Werror=format-security:
+
+ ecasignalview.cpp:360:13:
+ error: format not a string literal and no format arguments [-Werror=format-security]
+ 360 | mvprintw(r++, 0, bar);
+ | ~~~~~~~~^~~~~~~~~~~~~
+
+Let's wrap all the missing places with "%s" format.
+---
+ ecatools/ecasignalview.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ecatools/ecasignalview.cpp b/ecatools/ecasignalview.cpp
+index ea56a138..7f3b765b 100644
+--- a/ecatools/ecasignalview.cpp
++++ b/ecatools/ecasignalview.cpp
+@@ -351,13 +351,13 @@ void ecasv_output_init(void)
+ ecasv_rate_msec, ecasv_buffersize, avg_length); */
+ ++r;
+ const char* bar="------------------------------------------------------------------------------\n";
+- mvprintw(r++, 0, bar);
++ mvprintw(r++, 0, "%s", bar);
+ mvprintw(r, 0, "channel");
+ if (ecasv_log_display_mode)
+ mvprintw(r++,38, "%s avg-peak dB max-peak dB clipped\n", ecasv_bar_buffer);
+ else
+ mvprintw(r++,38, "%s avg-peak max-peak clipped\n", ecasv_bar_buffer);
+- mvprintw(r++, 0, bar);
++ mvprintw(r++, 0, "%s", bar);
+
+ memset(ecasv_bar_buffer, ' ', ecasv_bar_length_const - 4);
+ ecasv_bar_buffer[ecasv_bar_length_const - 4] = 0;
+--
+2.33.1
+
More information about the arch-commits
mailing list