Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libvpd/files/, sys-libs/libvpd/
Date: Wed, 30 Nov 2022 18:00:19
Message-Id: 1669831209.d2357f2fa5f75ec020cdaea0491ef4d584023b1a.gyakovlev@gentoo
1 commit: d2357f2fa5f75ec020cdaea0491ef4d584023b1a
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 30 17:58:02 2022 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 30 18:00:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2357f2f
7
8 sys-libs/libvpd: drop 2.2.8-r1
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 sys-libs/libvpd/Manifest | 1 -
13 sys-libs/libvpd/files/2.2.8-gcc11.patch | 84 ------------------------------
14 sys-libs/libvpd/files/2.2.8-warnings.patch | 52 ------------------
15 sys-libs/libvpd/libvpd-2.2.8-r1.ebuild | 48 -----------------
16 4 files changed, 185 deletions(-)
17
18 diff --git a/sys-libs/libvpd/Manifest b/sys-libs/libvpd/Manifest
19 index 86db8dfddfa6..3e825ef8afde 100644
20 --- a/sys-libs/libvpd/Manifest
21 +++ b/sys-libs/libvpd/Manifest
22 @@ -1,2 +1 @@
23 -DIST libvpd-2.2.8.tar.gz 52725 BLAKE2B 76bdc6ddf80236a6848185273c2cac181d44214f0c609d7c5af6fa4d09a7cd816324af35745617ce3daa7268311e2ed754335600df1d4970a324eb327015d051 SHA512 d0b7d1760c6ae54717c538405c651317b7318dec5780961f5386c09b7d245e35a84c2fc47d89c47c3cd2168d73d7186f5819981d52c3ba962514639833dc62aa
24 DIST libvpd-2.2.9.tar.gz 53747 BLAKE2B c8898e2f604431b74bf5e10fc99e7a9b5540b825f2a996776109a2b2b636f732ff8d9f7956ffea1231e5b023e285eee641a873a68fcd8a2d6a6d9e64c5ab3b18 SHA512 e32a80e0f3aaedbaaac64dbdedfee7eeb2e7a7b6d2d737bca4678d26caadab77032a7c26211a5fc3caed3724488bc8fa99620ceac05f8d156ca90f4452cfaf0a
25
26 diff --git a/sys-libs/libvpd/files/2.2.8-gcc11.patch b/sys-libs/libvpd/files/2.2.8-gcc11.patch
27 deleted file mode 100644
28 index 7e09f8329bba..000000000000
29 --- a/sys-libs/libvpd/files/2.2.8-gcc11.patch
30 +++ /dev/null
31 @@ -1,84 +0,0 @@
32 -From 83ccb994e30364c0703d7b8c15817d56b42da2e6 Mon Sep 17 00:00:00 2001
33 -From: Kamalesh Babulal <kamalesh@××××××××××××××.com>
34 -Date: Wed, 7 Apr 2021 14:11:41 +0530
35 -Subject: [PATCH] Remove dynamic exception specification
36 -MIME-Version: 1.0
37 -Content-Type: text/plain; charset=UTF-8
38 -Content-Transfer-Encoding: 8bit
39 -
40 -Tomasz Kłoczko reported that the build fails, while compiling
41 -with GCC 11:
42 -
43 -In file included from src/vpdretriever.cpp:25:
44 -./src/libvpd-2/vpdretriever.hpp:62:33: error: ISO C++17 does not allow dynamic exception specifications
45 - 62 | throw( VpdException& );
46 - | ^~~~~
47 -./src/libvpd-2/vpdretriever.hpp:74:33: error: ISO C++17 does not allow dynamic exception specifications
48 - 74 | throw( VpdException& );
49 - | ^~~~~
50 -src/vpdretriever.cpp:50:37: error: ISO C++17 does not allow dynamic exception specifications
51 - 50 | string dbFileName ) throw( VpdException& )
52 - | ^~~~~
53 -src/vpdretriever.cpp:62:39: error: ISO C++17 does not allow dynamic exception specifications
54 - 62 | VpdRetriever::VpdRetriever( ) throw( VpdException& )
55 - | ^~~~~
56 -make: *** [Makefile:660: src/vpdretriever.lo] Error 1
57 -
58 -As part of
59 -http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html,
60 -the dynamic exception specification have been removed. Remove the
61 -throw specifier, to specify that the function might throw an exception.
62 -
63 -Signed-off-by: Kamalesh Babulal <kamalesh@××××××××××××××.com>
64 -Signed-off-by: Vasant Hegde <hegdevasant@××××××××××××××.com>
65 ----
66 - src/libvpd-2/vpdretriever.hpp | 6 ++----
67 - src/vpdretriever.cpp | 4 ++--
68 - 2 files changed, 4 insertions(+), 6 deletions(-)
69 -
70 -diff --git a/src/libvpd-2/vpdretriever.hpp b/src/libvpd-2/vpdretriever.hpp
71 -index 0d91ac4..1be2664 100644
72 ---- a/src/libvpd-2/vpdretriever.hpp
73 -+++ b/src/libvpd-2/vpdretriever.hpp
74 -@@ -58,8 +58,7 @@ namespace lsvpd
75 - * @param dbFileName
76 - * The file name for the VPD database.
77 - */
78 -- VpdRetriever( string envDir, string dbFileName )
79 -- throw( VpdException& );
80 -+ VpdRetriever( string envDir, string dbFileName );
81 -
82 - /**
83 - * Builds A VpdRetriever object that can be used for reading the
84 -@@ -70,8 +69,7 @@ namespace lsvpd
85 - * this constructor, there were serious underlying issues that
86 - * are not recoverable. Uses the default dir and filename
87 - */
88 -- VpdRetriever( )
89 -- throw( VpdException& );
90 -+ VpdRetriever( );
91 - ~VpdRetriever( );
92 -
93 - /**
94 -diff --git a/src/vpdretriever.cpp b/src/vpdretriever.cpp
95 -index 9f7e7a0..470047e 100644
96 ---- a/src/vpdretriever.cpp
97 -+++ b/src/vpdretriever.cpp
98 -@@ -47,7 +47,7 @@ namespace lsvpd
99 - const string VpdRetriever::UDEV_NOTIFY_FILE ( "/run/run.vpdupdate" );
100 -
101 - VpdRetriever::VpdRetriever( string envDir,
102 -- string dbFileName ) throw( VpdException& )
103 -+ string dbFileName )
104 - {
105 - try {
106 - db = new VpdDbEnv( envDir, dbFileName, true );
107 -@@ -59,7 +59,7 @@ namespace lsvpd
108 - }
109 - }
110 -
111 -- VpdRetriever::VpdRetriever( ) throw( VpdException& )
112 -+ VpdRetriever::VpdRetriever( )
113 - {
114 - struct stat vpd_stat,udev_stat;
115 - const string vpddb = VpdRetriever::DEFAULT_DIR + VpdRetriever::DEFAULT_FILE;
116
117 diff --git a/sys-libs/libvpd/files/2.2.8-warnings.patch b/sys-libs/libvpd/files/2.2.8-warnings.patch
118 deleted file mode 100644
119 index 1419de3dda49..000000000000
120 --- a/sys-libs/libvpd/files/2.2.8-warnings.patch
121 +++ /dev/null
122 @@ -1,52 +0,0 @@
123 -From 72b75e1976b50372f07271a5235ee8e9c75bdac4 Mon Sep 17 00:00:00 2001
124 -From: Kamalesh Babulal <kamalesh@×××××××××.com>
125 -Date: Mon, 21 Jun 2021 11:42:02 +0530
126 -Subject: [PATCH] vpddbenv_c: fix compile warnings
127 -
128 -src/vpddbenv_c.c: In function 'new_vpddbenv':
129 -src/vpddbenv_c.c:56:17: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=]
130 - 56 | strncat( ret->fullPath, "/" , 1 );
131 - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 -src/vpddbenv_c.c:58:17: warning: 'strncat' accessing between 258 and 9223372036854775804 bytes at offsets 514 and 257 may overlap 1 byte at offset 514 [-Wrestrict]
133 - 58 | strncat( ret->fullPath, ret->dbFileName, strlen(ret->dbFileName) );
134 - |
135 - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136 -
137 -While compiling the code with GCC-11 (Fedora 34), the GCC complains
138 -about src string length and N bytes mentioned in the strncat() are of
139 -same length. It gets suspicious, when strncat() mimics strcat(), the
140 -strcat() was replaced using strncat() by the commit 38de4e65205
141 -("libvpd: Convert strcat to strncat") as part of secure coding.
142 -
143 -refactor the code using snprintf(), making the code lean and keep the
144 -GCC happy as well.
145 -
146 -Signed-off-by: Kamalesh Babulal <kamalesh@×××××××××.com>
147 -Signed-off-by: Vasant Hegde <hegdevasant@××××××××××××××.com>
148 ----
149 - src/vpddbenv_c.c | 12 ++++--------
150 - 1 file changed, 4 insertions(+), 8 deletions(-)
151 -
152 -diff --git a/src/vpddbenv_c.c b/src/vpddbenv_c.c
153 -index 96aecd3..bae36e9 100644
154 ---- a/src/vpddbenv_c.c
155 -+++ b/src/vpddbenv_c.c
156 -@@ -50,14 +50,10 @@ struct vpddbenv * new_vpddbenv( const char *dir, const char *file )
157 - ret->dbFileName[MAX_NAME_LENGTH] = '\0';
158 - }
159 -
160 -- strncpy( ret->fullPath, ret->envDir , FULL_PATH_SIZE - 1);
161 --
162 -- if (strlen(ret->fullPath) + 1 < FULL_PATH_SIZE)
163 -- strncat( ret->fullPath, "/" , 1 );
164 -- if (strlen(ret->fullPath) + strlen(ret->dbFileName) < FULL_PATH_SIZE)
165 -- strncat( ret->fullPath, ret->dbFileName, strlen (ret->dbFileName) );
166 --
167 -- ret->fullPath[FULL_PATH_SIZE - 1] = '\0';
168 -+ if ( ( strlen( ret->envDir ) + strlen( ret->dbFileName ) + 1 ) <
169 -+ FULL_PATH_SIZE )
170 -+ snprintf( ret->fullPath, FULL_PATH_SIZE,
171 -+ "%s/%s", ret->envDir, ret->dbFileName );
172 -
173 - rc = sqlite3_open( ret->fullPath, &(ret->db) );
174 - if( rc != SQLITE_OK )
175
176 diff --git a/sys-libs/libvpd/libvpd-2.2.8-r1.ebuild b/sys-libs/libvpd/libvpd-2.2.8-r1.ebuild
177 deleted file mode 100644
178 index 3b69e327edd6..000000000000
179 --- a/sys-libs/libvpd/libvpd-2.2.8-r1.ebuild
180 +++ /dev/null
181 @@ -1,48 +0,0 @@
182 -# Copyright 1999-2021 Gentoo Authors
183 -# Distributed under the terms of the GNU General Public License v2
184 -
185 -EAPI=7
186 -inherit autotools udev
187 -
188 -DESCRIPTION="Library implementation for listing Vital Product Data"
189 -HOMEPAGE="https://github.com/power-ras/libvpd"
190 -SRC_URI="https://github.com/power-ras/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
191 -
192 -LICENSE="LGPL-2.1+"
193 -SLOT="0"
194 -KEYWORDS="ppc ppc64"
195 -
196 -DEPEND="
197 - dev-db/sqlite:3
198 - sys-libs/zlib:=
199 -"
200 -RDEPEND="${DEPEND}"
201 -
202 -PATCHES=(
203 - "${FILESDIR}/2.2.8-gcc11.patch"
204 - "${FILESDIR}/2.2.8-warnings.patch"
205 -)
206 -
207 -src_prepare() {
208 - default
209 - eautoreconf
210 -}
211 -
212 -src_configure() {
213 - # sysconfdir is used only to establish where the udev rules file should go
214 - # unfortunately it also adds the subdirs on its own so we strip it down to
215 - # dirname
216 - local myconf=(
217 - --disable-static
218 - --localstatedir="${EPREFIX}/var"
219 - --sysconfdir="$( dirname $(get_udevdir) )"
220 - )
221 -
222 - econf "${myconf[@]}"
223 -}
224 -
225 -src_install() {
226 - default
227 - keepdir /var/lib/lsvpd
228 - find "${D}" -name '*.la' -delete || die
229 -}