Bug#987936: libstorj: fails to build from the source
On Sat, May 15, 2021 at 05:05:26AM +0100, Philip Wyett wrote: >... > --- libstorj-1.0.3/debian/libstorj0.symbols 2018-12-30 17:48:58.0 > + > +++ libstorj-1.0.3/debian/libstorj0.symbols 2021-05-15 04:38:45.0 > +0100 > @@ -28,7 +28,6 @@ > mnemonic_generate_indexes@Base 1.0.2 > mnemonic_to_seed@Base 1.0.2 > mnemonic_wordlist@Base 1.0.2 > - pbkdf2_hmac_sha512@Base 1.0.2 > print_int_array@Base 1.0.2 > put_shard@Base 1.0.2 > random_buffer@Base 1.0.2 >... This is an ABI break from the version in buster. Correct would be instead something like (untested): Removal from the header is fine, but libstorj-dev should get a runtime dependency on new enough nettle-dev (not the one in buster). In src/crypto.c, instead of #ifndef pbkdf2_hmac_sha512 do an #undef pbkdf2_hmac_sha512 This would still build the function into the library for legacy users compiled against the buster version of the library. cu Adrian
Bug#987936: libstorj: fails to build from the source
On Mon, 2021-05-17 at 12:45 +0200, Andrej Shadura wrote: > Hi Phil and Josue, > > On 15/05/2021 06:05, Philip Wyett wrote: > > Attached is a (NMU) debdiff that fixes the issue. Cherry picked patch from > > Fedora[1]. > > > > This RC bug can be handled however wished by the maintainer. Just one less > > to fix. :-) > > > > [1] Original patch by: Gwyn Ciesla > > It would appear Nettle 3.7.2+ ships its own implementation of > pbkdf2_hmac_sha512, which causes the conflict during the build. I think > the best way is to change to patch to use #ifndef and not just comment > it out, so it can still be built against an older Nettle (e.g. for > backports). > > I’ve pushed the changes to the Git repo and will upload this to DELAYED/0. > Hi Andrej, This fix is now in unstable, but to make it into testing/bullseye it requires an 'unblock' request filing. We are close to auto removal on June 1st, which I think we would all like to avoid. Regards Phil -- *** Playing the game for the games own sake. *** WWW: https://kathenas.org Twitter: @kathenasorg Instagram: @kathenasorg IRC: kathenas GPG: 724AA9B52F024C8B signature.asc Description: This is a digitally signed message part
Bug#987936: libstorj: fails to build from the source
Hi Phil and Josue, On 15/05/2021 06:05, Philip Wyett wrote: > Attached is a (NMU) debdiff that fixes the issue. Cherry picked patch from > Fedora[1]. > > This RC bug can be handled however wished by the maintainer. Just one less to > fix. :-) > > [1] Original patch by: Gwyn Ciesla It would appear Nettle 3.7.2+ ships its own implementation of pbkdf2_hmac_sha512, which causes the conflict during the build. I think the best way is to change to patch to use #ifndef and not just comment it out, so it can still be built against an older Nettle (e.g. for backports). I’ve pushed the changes to the Git repo and will upload this to DELAYED/0. -- Cheers, Andrej
Bug#987936: libstorj: fails to build from the source
Control: tags -1 + patch On Sat, 2021-05-15 at 05:05 +0100, Philip Wyett wrote: > On Sun, 02 May 2021 11:21:52 +0200 Andrej Shadura > wrote: > > Source: libstorj > > Version: 1.0.3-1 > > Severity: serious > > Tags: ftbfs > > Justification: fails to build from source (but built successfully in the > > past) > > User: andre...@debian.org > > Usertags: rebuild-ftbfs > > > > Dear Maintainer, > > > > While rebuilding your package from the source, I received this error: > > > > libtool: compile: gcc -DPACKAGE_NAME=\"libstorj\" > > -DPACKAGE_TARNAME=\"libstorj\" > -DPACKAGE_VERSION=\"1.0.3\" "-DPACKAGE_STRING=\"libstorj 1.0.3\"" > -DPACKAGE_BUG > > REPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" > > -DVERSION=\"1.0.3\" -DSTDC_HEADERS=1 > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRI > > NG_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 > > -DHAVE_STDINT_H=1 > -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CURL_CURL_H=1 > > -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 > > -DHAVE_MICROHTTPD_H=1 > -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I. > -Wda > > te-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<>=. > > -fstack-protector- > strong -Wformat -Werror=format-security -Wall -pedantic -O3 -MT uploade > > r.lo -MD -MP -MF .deps/uploader.Tpo -c uploader.c -fPIC -DPIC -o > > .libs/uploader.o > > In file included from crypto.h:13, > > from http.h:20, > > from uploader.h:10, > > from uploader.c:1: > > crypto.h:43:6: error: conflicting types for ‘nettle_pbkdf2_hmac_sha512’ > >43 | void pbkdf2_hmac_sha512(unsigned key_length, > > | ^~ > > /usr/include/nettle/pbkdf2.h:91:1: note: previous declaration of > > ‘nettle_pbkdf2_hmac_sha512’ > was here > >91 | pbkdf2_hmac_sha512 (size_t key_length, const uint8_t *key, > > | ^~ > > > > The complete build log is attached to the bug report. > > > > -- > > Cheers, > > Andrej > > Hi, > > Attached is a (NMU) debdiff that fixes the issue. Cherry picked patch from > Fedora[1]. > > This RC bug can be handled however wished by the maintainer. Just one less to > fix. :-) > > [1] Original patch by: Gwyn Ciesla > > Regards > > Phil > Add patch tag I forgot in the early hours. Regards Phil -- *** Playing the game for the games own sake. *** WWW: https://kathenas.org Twitter: @kathenasorg Instagram: @kathenasorg IRC: kathenas GPG: 724AA9B52F024C8B signature.asc Description: This is a digitally signed message part
Bug#987936: libstorj: fails to build from the source
On Sun, 02 May 2021 11:21:52 +0200 Andrej Shadura wrote: > Source: libstorj > Version: 1.0.3-1 > Severity: serious > Tags: ftbfs > Justification: fails to build from source (but built successfully in the past) > User: andre...@debian.org > Usertags: rebuild-ftbfs > > Dear Maintainer, > > While rebuilding your package from the source, I received this error: > > libtool: compile: gcc -DPACKAGE_NAME=\"libstorj\" > -DPACKAGE_TARNAME=\"libstorj\" -DPACKAGE_VERSION=\"1.0.3\" "-DPACKAGE_STRING=\"libstorj 1.0.3\"" -DPACKAGE_BUG > REPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" -DVERSION=\"1.0.3\" > -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRI > NG_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 > -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CURL_CURL_H=1 > -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 > -DHAVE_MICROHTTPD_H=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I. -Wda > te-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<>=. > -fstack-protector- strong -Wformat -Werror=format-security -Wall -pedantic -O3 -MT uploade > r.lo -MD -MP -MF .deps/uploader.Tpo -c uploader.c -fPIC -DPIC -o > .libs/uploader.o > In file included from crypto.h:13, > from http.h:20, > from uploader.h:10, > from uploader.c:1: > crypto.h:43:6: error: conflicting types for ‘nettle_pbkdf2_hmac_sha512’ >43 | void pbkdf2_hmac_sha512(unsigned key_length, > | ^~ > /usr/include/nettle/pbkdf2.h:91:1: note: previous declaration of > ‘nettle_pbkdf2_hmac_sha512’ was here >91 | pbkdf2_hmac_sha512 (size_t key_length, const uint8_t *key, > | ^~ > > The complete build log is attached to the bug report. > > -- > Cheers, > Andrej Hi, Attached is a (NMU) debdiff that fixes the issue. Cherry picked patch from Fedora[1]. This RC bug can be handled however wished by the maintainer. Just one less to fix. :-) [1] Original patch by: Gwyn Ciesla Regards Phil -- *** Playing the game for the games own sake. *** WWW: https://kathenas.org Twitter: @kathenasorg Instagram: @kathenasorg IRC: kathenas GPG: 724AA9B52F024C8B diff -Nru libstorj-1.0.3/debian/changelog libstorj-1.0.3/debian/changelog --- libstorj-1.0.3/debian/changelog 2018-12-30 17:48:58.0 + +++ libstorj-1.0.3/debian/changelog 2021-05-15 04:38:45.0 +0100 @@ -1,3 +1,12 @@ +libstorj (1.0.3-2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS: Cherry picked patch from Fedora (Closes: #987936) +- Add: d/patches/ftbfs-pbkdf2.patch +- Remove related item(s) from patch in: d/libstorj0.symbols + + -- Phil Wyett Sat, 15 May 2021 04:38:45 +0100 + libstorj (1.0.3-1) unstable; urgency=medium * New upstream release (1.0.3). diff -Nru libstorj-1.0.3/debian/libstorj0.symbols libstorj-1.0.3/debian/libstorj0.symbols --- libstorj-1.0.3/debian/libstorj0.symbols 2018-12-30 17:48:58.0 + +++ libstorj-1.0.3/debian/libstorj0.symbols 2021-05-15 04:38:45.0 +0100 @@ -28,7 +28,6 @@ mnemonic_generate_indexes@Base 1.0.2 mnemonic_to_seed@Base 1.0.2 mnemonic_wordlist@Base 1.0.2 - pbkdf2_hmac_sha512@Base 1.0.2 print_int_array@Base 1.0.2 put_shard@Base 1.0.2 random_buffer@Base 1.0.2 diff -Nru libstorj-1.0.3/debian/patches/ftbfs-pbkdf2.patch libstorj-1.0.3/debian/patches/ftbfs-pbkdf2.patch --- libstorj-1.0.3/debian/patches/ftbfs-pbkdf2.patch 1970-01-01 01:00:00.0 +0100 +++ libstorj-1.0.3/debian/patches/ftbfs-pbkdf2.patch 2021-05-15 04:38:45.0 +0100 @@ -0,0 +1,38 @@ +--- libstorj-1.0.3/src/crypto.c~ 2018-05-10 13:45:47.0 -0500 libstorj-1.0.3/src/crypto.c 2021-03-25 14:48:26.977246060 -0500 +@@ -215,7 +215,7 @@ + + return 0; + } +- ++/* + void pbkdf2_hmac_sha512 ( + unsigned key_length, + const uint8_t *key, +@@ -229,7 +229,7 @@ + PBKDF2 (&sha512ctx, hmac_sha512_update, hmac_sha512_digest, + SHA512_DIGEST_SIZE, iterations, salt_length, salt, length, dst); + } +- ++*/ + int increment_ctr_aes_iv(uint8_t *iv, uint64_t bytes_position) + { + if (bytes_position % AES_BLOCK_SIZE != 0) { +--- libstorj-1.0.3/src/crypto.h~ 2018-05-10 13:45:47.0 -0500 libstorj-1.0.3/src/crypto.h 2021-03-25 14:48:16.384307537 -0500 +@@ -39,13 +39,13 @@ + + int double_ripemd160sha256_as_string(uint8_t *data, uint64_t data_size, + char **digest); +- ++/* + void pbkdf2_hmac_sha512(unsigned key_length, + const uint8_t *key, + unsigned iterations, + unsigned salt_length, const uint8_t *salt, + unsigned length, uint8_t *dst); +- ++*/ + /** + * @brief Generate a bucket's key + * diff -Nru libstorj-1.0.3/debian/patches/series libstorj-1.0.3/debian/pa
Bug#987936: libstorj: fails to build from the source
Source: libstorj Version: 1.0.3-1 Severity: serious Tags: ftbfs Justification: fails to build from source (but built successfully in the past) User: andre...@debian.org Usertags: rebuild-ftbfs Dear Maintainer, While rebuilding your package from the source, I received this error: libtool: compile: gcc -DPACKAGE_NAME=\"libstorj\" -DPACKAGE_TARNAME=\"libstorj\" -DPACKAGE_VERSION=\"1.0.3\" "-DPACKAGE_STRING=\"libstorj 1.0.3\"" -DPACKAGE_BUG REPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" -DVERSION=\"1.0.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRI NG_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CURL_CURL_H=1 -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 -DHAVE_MICROHTTPD_H=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I. -Wda te-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -O3 -MT uploade r.lo -MD -MP -MF .deps/uploader.Tpo -c uploader.c -fPIC -DPIC -o .libs/uploader.o In file included from crypto.h:13, from http.h:20, from uploader.h:10, from uploader.c:1: crypto.h:43:6: error: conflicting types for ‘nettle_pbkdf2_hmac_sha512’ 43 | void pbkdf2_hmac_sha512(unsigned key_length, | ^~ /usr/include/nettle/pbkdf2.h:91:1: note: previous declaration of ‘nettle_pbkdf2_hmac_sha512’ was here 91 | pbkdf2_hmac_sha512 (size_t key_length, const uint8_t *key, | ^~ The complete build log is attached to the bug report. -- Cheers, Andrej libstorj_amd64-2021-05-01T22:14:41Z.gz Description: application/gzip