diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-12 05:48:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-12 05:48:13 +0100 |
commit | 8d9dd6a2b8f0525f6337deacd0cc20027f645396 (patch) | |
tree | 055778f8b0feeae92daec20b5693a21a206ea379 /media-sound/vimpc | |
parent | 02930d1eb5af78d32b1597af6af24163895d9e0f (diff) |
gentoo auto-resync : 12:05:2023 - 05:48:13
Diffstat (limited to 'media-sound/vimpc')
-rw-r--r-- | media-sound/vimpc/Manifest | 4 | ||||
-rw-r--r-- | media-sound/vimpc/files/vimpc-0.09.2-wformat-security.patch | 103 | ||||
-rw-r--r-- | media-sound/vimpc/vimpc-0.09.2-r2.ebuild | 56 | ||||
-rw-r--r-- | media-sound/vimpc/vimpc-9999.ebuild | 37 |
4 files changed, 188 insertions, 12 deletions
diff --git a/media-sound/vimpc/Manifest b/media-sound/vimpc/Manifest index 9abfef8e0243..5d21be7ae149 100644 --- a/media-sound/vimpc/Manifest +++ b/media-sound/vimpc/Manifest @@ -1,5 +1,7 @@ AUX vimpc-0.09.2-boost.patch 8262 BLAKE2B 4f35c6bf2a5b2d9072a2cba699fe8175af60f5c18d61fd57fdc497e06dd9260eacb41a29af5db6003f40b0b1e7f28a2fed4abe532b64aabd9f7265eab035bf6e SHA512 f1680f0f63277fdc0b57af24558e3715de656f39fdad00ed218c32542bbbe0a63f891b75802709275d4b0e7bac086ed5ea74cded4c37cbfc5c34586c067abac1 +AUX vimpc-0.09.2-wformat-security.patch 3679 BLAKE2B bcde98b9a477316bd9d5bb7e2c40702f0a73ddb0a68886f18e85d82c296af6b44a47f0085c23a909fdf7647af4b631dde958d3028497fea962b5c3c1526cf452 SHA512 674878c30aa9050163c6ed2327fcfe957bd750d0f5451a425010914f5b4e8ea075aa9e47b7e35181b5b996f945c4ab347dcc25248f2565c2cef04efdafe08fa9 DIST vimpc-0.09.2.tar.gz 452593 BLAKE2B b6cbeab32318e723d7be114255fba7360fa2608d03bde6b2186d47b1cb8e74b4369d0d2b1d683cf5668232bf4581e9acb79d726308b18ff0d82122aa979f81a1 SHA512 456e2d2c0510273c071b24c2dd8f90b73d40a0b02565c00ea986a78f1231cb26fb053ce5b0d1476647c813b84684e400c21948086299e445ffd651c2af46d4c9 EBUILD vimpc-0.09.2-r1.ebuild 883 BLAKE2B 109572f2207822b6415ecfbb5e4dc98f4453b7ff9e4b0c0abf719423bc1ccf2b857459dff4bdc2acd5076b03ceb45e358260711b6437f3dc58f19252e5543572 SHA512 de9fcb8e3bbf39d5b57775310f7c530a9d98b3af223e6b986486ece18a8a0623b2b7398e9100fa1d72189d155a029e31e06024e1066e08dec90e49fe01dcbaf9 -EBUILD vimpc-9999.ebuild 791 BLAKE2B 12cb3bf53815fe9e688e6e8cf85283fa48419aa1baa2f61df71163bcc2591f18845e428a0db66456eb3e4718e874ee78f3261ff6dab92756a704a40b808956ee SHA512 bec3d1fd2a27e6196902e23b8827d41c391aee5c6bc68b838b68fd650553ec2739d26d167ec015ca0c14b377dab7905b7a44acd1aeb8f7b2d77c6c4165c1db54 +EBUILD vimpc-0.09.2-r2.ebuild 1170 BLAKE2B be626be6fd1821325b369e3c87748b4be595011fa86c9d65f0cb97d111a4dd681b7dec98a495f27291500026ffc771d39f9cc8922747d54d7bcb0b7ee4b7a1e5 SHA512 eb0931f0500aa461dd95485a2bd31a35c0b914b297eee8f92597c251fd93f0a2fbc2a6c68e1cec04ad94246623c18020de415b0509cbb75059ee0fbb7b2aeb8c +EBUILD vimpc-9999.ebuild 1170 BLAKE2B be626be6fd1821325b369e3c87748b4be595011fa86c9d65f0cb97d111a4dd681b7dec98a495f27291500026ffc771d39f9cc8922747d54d7bcb0b7ee4b7a1e5 SHA512 eb0931f0500aa461dd95485a2bd31a35c0b914b297eee8f92597c251fd93f0a2fbc2a6c68e1cec04ad94246623c18020de415b0509cbb75059ee0fbb7b2aeb8c MISC metadata.xml 524 BLAKE2B 210e96d9fc04676e3a8afcbc80540f894c0fe4473be7b4661648c9e4c00a7e4a37b6159163f62d4d87e6fff914c87cd4c80d7a003f28a2763d5c5178e10c4106 SHA512 bcdfc62784b3bb9413d151da39598a9c1fc0093d0bac075c58514d66f24852a1b7d438aeb24bcb44f83c67f7c630f0f63ab646ccc4c959fd5106fb6bbf9b9e4e diff --git a/media-sound/vimpc/files/vimpc-0.09.2-wformat-security.patch b/media-sound/vimpc/files/vimpc-0.09.2-wformat-security.patch new file mode 100644 index 000000000000..2d8c09e416e5 --- /dev/null +++ b/media-sound/vimpc/files/vimpc-0.09.2-wformat-security.patch @@ -0,0 +1,103 @@ +https://github.com/boysetsfrog/vimpc/commit/055ecdce0720fdfc9ec2528c520b6c33da36271b + +From 055ecdce0720fdfc9ec2528c520b6c33da36271b Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyich@gmail.com> +Date: Wed, 3 Nov 2021 08:25:58 +0000 +Subject: [PATCH] vimpc: 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: + + src/window/listwindow.cpp:120:16: + error: format not a string literal and no format arguments [-Werror=format-security] + 120 | mvwprintw(window, line, 0, BlankLine.c_str()); + | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Let's wrap all the missing places with "%s" format. +--- a/src/screen.cpp ++++ b/src/screen.cpp +@@ -1489,7 +1489,7 @@ void Screen::ClearStatus() const + wattron(statusWindow_, A_REVERSE); + } + +- mvwprintw(statusWindow_, 0, 0, BlankLine.c_str()); ++ mvwprintw(statusWindow_, 0, 0, "%s", BlankLine.c_str()); + + if (settings_.Get(Setting::ColourEnabled) == true) + { +@@ -1516,7 +1516,7 @@ void Screen::UpdateTabWindow() const + wattron(tabWindow_, COLOR_PAIR(settings_.colours.TabWindow)); + } + +- mvwprintw(tabWindow_, 0, 0, BlankLine.c_str()); ++ mvwprintw(tabWindow_, 0, 0, "%s", BlankLine.c_str()); + wmove(tabWindow_, 0, 0); + + std::string name = ""; +--- a/src/window/directorywindow.cpp ++++ b/src/window/directorywindow.cpp +@@ -220,8 +220,8 @@ void DirectoryWindow::Print(uint32_t line) const + + wattron(window, A_BOLD); + std::string const Directory = "/" + directory_.CurrentDirectory(); +- mvwprintw(window, line, 0, BlankLine.c_str()); +- mvwprintw(window, line, 1, Directory.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); ++ mvwprintw(window, line, 1, "%s", Directory.c_str()); + wattroff(window, A_BOLD); + + if (settings_.Get(Setting::ColourEnabled) == true) +@@ -250,7 +250,7 @@ void DirectoryWindow::Print(uint32_t line) const + wattron(window, A_REVERSE); + } + +- mvwprintw(window, line, 0, BlankLine.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); + + uint8_t expandCol = 1; + +@@ -276,7 +276,7 @@ void DirectoryWindow::Print(uint32_t line) const + } + else + { +- mvwprintw(window, line, 0, BlankLine.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); + } + } + } +--- a/src/window/help.cpp ++++ b/src/window/help.cpp +@@ -64,7 +64,7 @@ void HelpWindow::Print(uint32_t line) const + WINDOW * window = N_WINDOW(); + + std::string const BlankLine(Columns(), ' '); +- mvwprintw(window, line, 0, BlankLine.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); + wmove(window, line, 0); + + if ((FirstLine() + line) < help_.Size()) +--- a/src/window/listwindow.cpp ++++ b/src/window/listwindow.cpp +@@ -117,7 +117,7 @@ void ListWindow::Print(uint32_t line) const + else + { + std::string const BlankLine(Columns(), ' '); +- mvwprintw(window, line, 0, BlankLine.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); + } + #else + SelectWindow::Print(line); +--- a/src/window/lyricswindow.cpp ++++ b/src/window/lyricswindow.cpp +@@ -61,7 +61,7 @@ void LyricsWindow::Print(uint32_t line) const + WINDOW * window = N_WINDOW(); + + std::string const BlankLine(Columns(), ' '); +- mvwprintw(window, line, 0, BlankLine.c_str()); ++ mvwprintw(window, line, 0, "%s", BlankLine.c_str()); + wmove(window, line, 0); + + if ((FirstLine() == 0) && (line == 0)) + diff --git a/media-sound/vimpc/vimpc-0.09.2-r2.ebuild b/media-sound/vimpc/vimpc-0.09.2-r2.ebuild new file mode 100644 index 000000000000..a6a60a208193 --- /dev/null +++ b/media-sound/vimpc/vimpc-0.09.2-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="An ncurses based mpd client with vi-like key bindings" +HOMEPAGE="https://github.com/boysetsfrog/vimpc" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/boysetsfrog/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/boysetsfrog/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="boost taglib" + +RDEPEND=" + dev-libs/libpcre + media-libs/libmpdclient + boost? ( dev-libs/boost:= ) + taglib? ( media-libs/taglib ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-boost.patch + "${FILESDIR}"/${P}-wformat-security.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # Tests here seem to make cppunit linked into the main vimpc binary + # Not clear how to run them either + econf \ + $(use_enable boost) \ + $(use_enable taglib) \ + --disable-test +} + +src_install() { + local DOCS=( AUTHORS README.md doc/vimpcrc.example ) + default + + # vimpc will look for help.txt + docompress -x /usr/share/doc/${PF}/help.txt +} diff --git a/media-sound/vimpc/vimpc-9999.ebuild b/media-sound/vimpc/vimpc-9999.ebuild index 5d7ee52d0a6e..a6a60a208193 100644 --- a/media-sound/vimpc/vimpc-9999.ebuild +++ b/media-sound/vimpc/vimpc-9999.ebuild @@ -1,26 +1,37 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools git-r3 +inherit autotools -DESCRIPTION="An ncurses based mpd client with vi like key bindings" +DESCRIPTION="An ncurses based mpd client with vi-like key bindings" HOMEPAGE="https://github.com/boysetsfrog/vimpc" -EGIT_REPO_URI="https://github.com/boysetsfrog/${PN}.git" - -LICENSE="GPL-3" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/boysetsfrog/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/boysetsfrog/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3+" SLOT="0" IUSE="boost taglib" -RDEPEND="dev-libs/libpcre +RDEPEND=" + dev-libs/libpcre media-libs/libmpdclient boost? ( dev-libs/boost:= ) - taglib? ( media-libs/taglib )" + taglib? ( media-libs/taglib ) +" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" -DOCS=( AUTHORS README.md doc/vimpcrc.example ) +PATCHES=( + "${FILESDIR}"/${P}-boost.patch + "${FILESDIR}"/${P}-wformat-security.patch +) src_prepare() { default @@ -28,12 +39,16 @@ src_prepare() { } src_configure() { + # Tests here seem to make cppunit linked into the main vimpc binary + # Not clear how to run them either econf \ $(use_enable boost) \ - $(use_enable taglib) + $(use_enable taglib) \ + --disable-test } src_install() { + local DOCS=( AUTHORS README.md doc/vimpcrc.example ) default # vimpc will look for help.txt |