From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/nitrocli/, app-crypt/nitrocli/files/
Date: Tue, 28 May 2019 02:36:31 +0000 (UTC) [thread overview]
Message-ID: <1559010981.e2f4fcdd819a8b4812c2aacd303a28654d575ece.gyakovlev@gentoo> (raw)
commit: e2f4fcdd819a8b4812c2aacd303a28654d575ece
Author: Daniel Mueller <deso <AT> posteo <DOT> net>
AuthorDate: Mon May 27 18:18:32 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue May 28 02:36:21 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f4fcdd
app-crypt/nitrocli: Add patch for build failure with Rust 1.35
With dev-lang/rust-1.35 (or higher, presumably) nitrocli fails to build
because of a unused comments that are flagged starting with this
version.
The change has been fixed upstream and with this change we add a patch
back porting the fix to 0.2.3.
Closes: https://bugs.gentoo.org/686870
Signed-off-by: Daniel Müller <deso <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/12119
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/nitrocli_-_fix-rust-1.35-build.patch | 52 ++++++++++++++++++++++
app-crypt/nitrocli/nitrocli-0.2.3-r1.ebuild | 5 +++
2 files changed, 57 insertions(+)
diff --git a/app-crypt/nitrocli/files/nitrocli_-_fix-rust-1.35-build.patch b/app-crypt/nitrocli/files/nitrocli_-_fix-rust-1.35-build.patch
new file mode 100644
index 00000000000..d5da3b1f48d
--- /dev/null
+++ b/app-crypt/nitrocli/files/nitrocli_-_fix-rust-1.35-build.patch
@@ -0,0 +1,52 @@
+From 5383aa73b339e6a53ff027ee6012a3428f67466a Mon Sep 17 00:00:00 2001
+From: Daniel Mueller <deso@posteo.net>
+Date: Fri, 24 May 2019 17:39:14 -0700
+Subject: [PATCH] Allow for unused doc comments on macros
+
+With Rust 1.35 we get compile errors due to doc comments that are added
+to macro invocations but not actually included in the expanded output.
+The rustc wrongly assumes that we want to document the resulting code
+and not just provide details about the invocation itself.
+This change explicitly allows for those cases. Alternatively we could
+have "downgraded" the doc comments to normal comments or removed them
+altogether. There is little difference between those alternatives.
+---
+ nitrocli/src/args.rs | 2 ++
+ nitrocli/src/pinentry.rs | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/nitrocli/src/args.rs b/nitrocli/src/args.rs
+index 7f0bfc..7e4f83 100644
+--- a/nitrocli/src/args.rs
++++ b/nitrocli/src/args.rs
+@@ -101,6 +101,7 @@ impl<'io> Stdio for ExecCtx<'io> {
+ }
+
+ /// The available Nitrokey models.
++#[allow(unused_doc_comments)]
+ Enum! {DeviceModel, [
+ Pro => "pro",
+ Storage => "storage"
+@@ -116,6 +117,7 @@ impl From<DeviceModel> for nitrokey::Model {
+ }
+
+ /// A top-level command for nitrocli.
++#[allow(unused_doc_comments)]
+ Enum! {Command, [
+ Config => ("config", config),
+ Lock => ("lock", lock),
+diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs
+index 837032..8bab65 100644
+--- a/nitrocli/src/pinentry.rs
++++ b/nitrocli/src/pinentry.rs
+@@ -30,6 +30,7 @@ type CowStr = borrow::Cow<'static, str>;
+ ///
+ /// The available PIN types correspond to the PIN types used by the Nitrokey devices: user and
+ /// admin.
++#[allow(unused_doc_comments)]
+ Enum! {PinType, [
+ Admin => "admin",
+ User => "user"
+--
+2.21.0
+
diff --git a/app-crypt/nitrocli/nitrocli-0.2.3-r1.ebuild b/app-crypt/nitrocli/nitrocli-0.2.3-r1.ebuild
index 40b62ff2d19..fb74af29209 100644
--- a/app-crypt/nitrocli/nitrocli-0.2.3-r1.ebuild
+++ b/app-crypt/nitrocli/nitrocli-0.2.3-r1.ebuild
@@ -67,6 +67,11 @@ RDEPEND="
RESTRICT="test"
QA_FLAGS_IGNORED="/usr/bin/nitrocli"
+src_prepare() {
+ eapply -p2 "${FILESDIR}/${PN}_-_fix-rust-1.35-build.patch"
+ default
+}
+
src_install() {
cargo_src_install --path=.
next reply other threads:[~2019-05-28 2:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 2:36 Georgy Yakovlev [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-07 5:42 [gentoo-commits] repo/gentoo:master commit in: app-crypt/nitrocli/, app-crypt/nitrocli/files/ Joonas Niilola
2024-01-20 13:21 Joonas Niilola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1559010981.e2f4fcdd819a8b4812c2aacd303a28654d575ece.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox