From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/, sys-apps/flashrom/files/
Date: Tue, 2 Jul 2024 14:03:30 +0000 (UTC) [thread overview]
Message-ID: <1719929005.dc64c2c846bf8301f6a4295fbd2777cf357ef88b.grobian@gentoo> (raw)
commit: dc64c2c846bf8301f6a4295fbd2777cf357ef88b
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 2 14:01:33 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jul 2 14:03:25 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc64c2c8
sys-apps/flashrom-1.3.0-r3: fix function definition mismatch for real
Previous patch was bonkers and caused by spi_master backport patch that
was adapted in a wrong way.
Fix for real now by (not) changing the signature. 1.4.0 should resolve
this entire mess for us.
Closes: https://bugs.gentoo.org/915617
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.../flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch | 11 -----------
sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch | 8 ++++++--
.../{flashrom-1.3.0-r2.ebuild => flashrom-1.3.0-r3.ebuild} | 6 +++++-
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch b/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
deleted file mode 100644
index 22243937b960..000000000000
--- a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/dummyflasher.c
-+++ b/dummyflasher.c
-@@ -930,7 +930,7 @@
- .read = default_spi_read,
- .write_256 = dummy_spi_write_256,
- .write_aai = default_spi_write_aai,
-- .probe_opcode = dummy_spi_probe_opcode,
-+ .probe_opcode = &dummy_spi_probe_opcode,
- };
-
- static const struct par_master par_master_dummyflasher = {
diff --git a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
index 72298f8cfca3..ae2641af4a0a 100644
--- a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
+++ b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
@@ -1,6 +1,10 @@
Backported upstream commit
https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f396719
+This commit didn't apply straight because const/non-const changes were
+made inbetween, so there are some additional changes to silence more
+picky compilers like https://bugs.gentoo.org/915617
+
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -148,7 +148,6 @@
@@ -77,7 +81,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len);
-+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode);
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode);
/* spi25.c */
int probe_spi_rdid(struct flashctx *flash);
@@ -235,7 +239,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
}
-bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
-+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode)
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
{
- return true;
+ if (!flash->mst->spi.probe_opcode)
diff --git a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild
similarity index 96%
rename from sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
rename to sys-apps/flashrom/flashrom-1.3.0-r3.ebuild
index 0607f1d76a6d..ce98d59584d8 100644
--- a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
+++ b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild
@@ -103,7 +103,6 @@ BDEPEND="test? ( dev-util/cmocka )"
PATCHES=(
"${FILESDIR}"/${PN}-1.3.0_spi-master.patch
"${FILESDIR}"/${PN}-1.3.0-c99.patch
- "${FILESDIR}"/${PN}-1.3.0-llvm-dummyflasher.patch
"${FILESDIR}"/${PN}-1.3.0-libflashrom.patch
)
@@ -116,6 +115,11 @@ src_prepare() {
sed -i -e 's/-DCONFIG_LINUX_MTD=1/-UCONFIG_LINUX_MTD/' \
meson.build || die
fi
+
+ # enable warnings
+ sed -i \
+ -e 's:^warning_flags = \[:warning_flags = \[ '"'-Wall'"' \]\nno = \[:' \
+ meson.build || die
}
src_configure() {
next reply other threads:[~2024-07-02 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:03 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-13 4:46 [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/, sys-apps/flashrom/files/ Sam James
2021-01-27 17:29 Marek Szuba
2020-07-28 22:14 Marek Szuba
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=1719929005.dc64c2c846bf8301f6a4295fbd2777cf357ef88b.grobian@gentoo \
--to=grobian@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