From 718d2faf19743520fddd2a71de0a18eaf85eea67 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Mon, 9 Jan 2023 11:25:29 -0600 Subject: [PATCH 01/43] Update to 0.14.0. Fixes rhbz#2158200. --- .gitignore | 1 + aerc.spec | 5 +++-- sources | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8bef6e3..e27d0c9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /aerc-0.10.0.tar.gz /aerc-0.12.0.tar.gz /aerc-0.13.0.tar.gz +/aerc-0.14.0.tar.gz diff --git a/aerc.spec b/aerc.spec index 02bfb9c..f404753 100644 --- a/aerc.spec +++ b/aerc.spec @@ -3,7 +3,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -Version: 0.13.0 +Version: 0.14.0 %global topdir %{name}-%{version} %gometa @@ -40,7 +40,7 @@ Requires: notmuch # Disable building of aerc that we handle manually in the SPEC and # preserve mtimes -sed -e 's|install: $(DOCS) aerc|install: $(DOCS)|' \ +sed -e 's|install: $(DOCS) aerc wrap|install: $(DOCS)|' \ -e 's|install -m|install -pm|' \ -i Makefile @@ -61,6 +61,7 @@ export LDFLAGS="-X main.Prefix=%{_prefix} \ -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} -X main.Version=%{version} " %gobuild -o aerc %{goipath} +%gobuild -o wrap filters/wrap.go %install export PREFIX=%{_prefix} diff --git a/sources b/sources index 1f20daa..1320b40 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aerc-0.13.0.tar.gz) = b7cb67ebcae3a809b365cbf8bb5d52b8525059c70665d27bcab93b697fe3eceb51807f26e953a6a50b4fc4b8acceb27693510b65495d5cd9c1fb4a5e7ded48e2 +SHA512 (aerc-0.14.0.tar.gz) = d12502a809c5163bc81bfa3bfbd471a03f4e8e56084e00e7bb52619a8ac6f34df78342c0e8e82d6cdfd4fe1bc0c375dd65366a442875621b20bbd040a9025831 From 3d890be202194dd77021f5d486579d65a53a4faa Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 11 Jan 2023 14:03:03 -0600 Subject: [PATCH 02/43] Make %files section consistent --- aerc.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aerc.spec b/aerc.spec index f404753..dbd8843 100644 --- a/aerc.spec +++ b/aerc.spec @@ -77,12 +77,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/aerc.desktop %license LICENSE %doc doc README.md %{_bindir}/aerc -%{_mandir}/man1/%{name}.1* -%{_mandir}/man1/%{name}-*.1.* -%{_mandir}/man5/%{name}-*.5.* -%{_mandir}/man7/%{name}-*.7.* -%{_datadir}/aerc +%{_datadir}/aerc/ %{_datadir}/applications/aerc.desktop +%{_mandir}/man1/aerc-*.1.* +%{_mandir}/man1/aerc.1* +%{_mandir}/man5/aerc-*.5.* +%{_mandir}/man7/aerc-*.7.* %changelog %autochangelog From 49084185756a08403ad69fefd1dce093d07441ed Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 11 Jan 2023 14:07:04 -0600 Subject: [PATCH 03/43] Add patch to correct filter install location --- 0001-doc-fix-English-typos.patch | 80 ++++++++ ...-them-in-PREFIX-libexec-aerc-filters.patch | 186 ++++++++++++++++++ aerc.spec | 9 + 3 files changed, 275 insertions(+) create mode 100644 0001-doc-fix-English-typos.patch create mode 100644 0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch diff --git a/0001-doc-fix-English-typos.patch b/0001-doc-fix-English-typos.patch new file mode 100644 index 0000000..4cf74fa --- /dev/null +++ b/0001-doc-fix-English-typos.patch @@ -0,0 +1,80 @@ +From 7faaeb2eef58129b86ebcb6689b6f67381afd0df Mon Sep 17 00:00:00 2001 +From: Robin Jarry +Date: Wed, 4 Jan 2023 23:44:35 +0100 +Subject: [PATCH 1/2] doc: fix English typos + +Reported by Lintian (Debian). + +Signed-off-by: Robin Jarry +Acked-by: Moritz Poldrack +--- + commands/account/import-mbox.go | 2 +- + doc/aerc-config.5.scd | 4 ++-- + doc/aerc-search.1.scd | 2 +- + widgets/compose.go | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/commands/account/import-mbox.go b/commands/account/import-mbox.go +index 7dab195..59fdfab 100644 +--- a/commands/account/import-mbox.go ++++ b/commands/account/import-mbox.go +@@ -122,7 +122,7 @@ func (ImportMbox) Execute(aerc *widgets.Aerc, args []string) error { + } + } + } +- infoStr := fmt.Sprintf("%s: imported %d of %d sucessfully.", args[0], appended, len(messages)) ++ infoStr := fmt.Sprintf("%s: imported %d of %d successfully.", args[0], appended, len(messages)) + log.Debugf(infoStr) + aerc.SetStatus(infoStr) + } +diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd +index d48e38a..45b41c6 100644 +--- a/doc/aerc-config.5.scd ++++ b/doc/aerc-config.5.scd +@@ -539,7 +539,7 @@ These options are configured in the *[compose]* section of _aerc.conf_. + *address-book-cmd* = _khard email --remove-first-line --parsable %s_ + + *file-picker-cmd* = __ +- Specifies the command to be used to select attachments. Any occurence of ++ Specifies the command to be used to select attachments. Any occurrence of + _%s_ in the *file-picker-cmd* will be replaced with the argument __ + to *:attach -m* __. + +@@ -570,7 +570,7 @@ These options are configured in the *[compose]* section of _aerc.conf_. + + # MULTIPART CONVERTERS + +-Converters allow to generate _multipart/alternative_ messages by converting the ++Converters allow generating _multipart/alternative_ messages by converting the + main _text/plain_ body into any other text MIME type with the *:multipart* + command. Only exact MIME types are accepted. The commands are invoked with + _sh -c_ and are expected to output valid UTF-8 text. +diff --git a/doc/aerc-search.1.scd b/doc/aerc-search.1.scd +index 8349874..9b375d5 100644 +--- a/doc/aerc-search.1.scd ++++ b/doc/aerc-search.1.scd +@@ -57,7 +57,7 @@ aerc-search - search and filter patterns and options for *aerc*(1) + + __ *(y[ear]|m[onth]|w[eek]|d[ay])* + __ is a positive integer that represents the number +- of the time units in the past. Mutiple relative terms ++ of the time units in the past. Multiple relative terms + can will be accumulated. The units can also be + abbreviated by a single letter such that yesterday would + correspond to _1d_ (equivalent to _1 day_ or _1_day_) +diff --git a/widgets/compose.go b/widgets/compose.go +index 4f08afa..c4e3ad5 100644 +--- a/widgets/compose.go ++++ b/widgets/compose.go +@@ -127,7 +127,7 @@ func (c *Composer) SwitchAccount(newAcct *AccountView) error { + editor.loadValue() + } + c.Invalidate() +- log.Debugf("account sucessfully switched") ++ log.Debugf("account successfully switched") + return nil + } + +-- +2.39.0 + diff --git a/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch b/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch new file mode 100644 index 0000000..6e82cb1 --- /dev/null +++ b/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch @@ -0,0 +1,186 @@ +From 04921a023831f71dbe97eaebc1e44000a311dbab Mon Sep 17 00:00:00 2001 +From: Robin Jarry +Date: Sun, 8 Jan 2023 20:44:22 +0100 +Subject: [PATCH 2/2] filters: install them in $PREFIX/libexec/aerc/filters + +The filesystem hierarchy standard describes /usr/share as +"Architecture-independent data". This folder is not intended for +executable scripts and especially not for arch specific binary files +(such as the wrap filter). + +Lintian reports an error with aerc 0.14.0: + + arch-dependent-file-in-usr-share [usr/share/aerc/filters/wrap] + +Which I had to fix by moving the filter into /usr/libexec. + +Install all filters into $PREFIX/libexec/aerc/filters and update the +default SearchDirs to look them up in here as well. + +Link: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html +Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/a0ca00260ffd +Signed-off-by: Robin Jarry +Acked-by: Moritz Poldrack +--- + Makefile | 21 ++++++++++++--------- + config/config.go | 12 +++++++++++- + doc/aerc-config.5.scd | 7 +++++-- + doc/aerc-templates.7.scd | 4 ++-- + 4 files changed, 30 insertions(+), 14 deletions(-) + +diff --git a/Makefile b/Makefile +index aa0ac4a..9f6bd0d 100644 +--- a/Makefile ++++ b/Makefile +@@ -7,6 +7,7 @@ VPATH=doc + PREFIX?=/usr/local + BINDIR?=$(PREFIX)/bin + SHAREDIR?=$(PREFIX)/share/aerc ++LIBEXECDIR?=$(PREFIX)/libexec/aerc + MANDIR?=$(PREFIX)/share/man + GO?=go + GOFLAGS?= +@@ -17,6 +18,7 @@ GO_LDFLAGS:= + GO_LDFLAGS+=-X main.Version=$(VERSION) + GO_LDFLAGS+=-X main.Flags=$(flags) + GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR) ++GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.libexecDir=$(LIBEXECDIR) + GO_LDFLAGS+=$(GO_EXTRA_LDFLAGS) + + GOSRC!=find * -name '*.go' | grep -v filters/wrap.go +@@ -109,7 +111,7 @@ clean: + install: $(DOCS) aerc wrap + mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \ + $(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets \ +- $(DESTDIR)$(PREFIX)/share/applications ++ $(DESTDIR)$(PREFIX)/share/applications $(DESTDIR)$(LIBEXECDIR)/filters + install -m755 aerc $(DESTDIR)$(BINDIR)/aerc + install -m644 aerc.1 $(DESTDIR)$(MANDIR)/man1/aerc.1 + install -m644 aerc-search.1 $(DESTDIR)$(MANDIR)/man1/aerc-search.1 +@@ -127,14 +129,14 @@ install: $(DOCS) aerc wrap + install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf + install -m644 config/aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf + install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf +- install -m755 filters/calendar $(DESTDIR)$(SHAREDIR)/filters/calendar +- install -m755 filters/colorize $(DESTDIR)$(SHAREDIR)/filters/colorize +- install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff +- install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html +- install -m755 filters/html-unsafe $(DESTDIR)$(SHAREDIR)/filters/html-unsafe +- install -m755 filters/plaintext $(DESTDIR)$(SHAREDIR)/filters/plaintext +- install -m755 filters/show-ics-details.py $(DESTDIR)$(SHAREDIR)/filters/show-ics-details.py +- install -m755 wrap $(DESTDIR)$(SHAREDIR)/filters/wrap ++ install -m755 filters/calendar $(DESTDIR)$(LIBEXECDIR)/filters/calendar ++ install -m755 filters/colorize $(DESTDIR)$(LIBEXECDIR)/filters/colorize ++ install -m755 filters/hldiff $(DESTDIR)$(LIBEXECDIR)/filters/hldiff ++ install -m755 filters/html $(DESTDIR)$(LIBEXECDIR)/filters/html ++ install -m755 filters/html-unsafe $(DESTDIR)$(LIBEXECDIR)/filters/html-unsafe ++ install -m755 filters/plaintext $(DESTDIR)$(LIBEXECDIR)/filters/plaintext ++ install -m755 filters/show-ics-details.py $(DESTDIR)$(LIBEXECDIR)/filters/show-ics-details.py ++ install -m755 wrap $(DESTDIR)$(LIBEXECDIR)/filters/wrap + install -m644 templates/new_message $(DESTDIR)$(SHAREDIR)/templates/new_message + install -m644 templates/quoted_reply $(DESTDIR)$(SHAREDIR)/templates/quoted_reply + install -m644 templates/forward_as_body $(DESTDIR)$(SHAREDIR)/templates/forward_as_body +@@ -177,6 +179,7 @@ uninstall: + $(RM) $(DESTDIR)$(MANDIR)/man7/aerc-templates.7 + $(RM) $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7 + $(RM) -r $(DESTDIR)$(SHAREDIR) ++ $(RM) -r $(DESTDIR)$(LIBEXECDIR) + ${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR) + $(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man1 + $(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man5 +diff --git a/config/config.go b/config/config.go +index 09fb5ef..12da665 100644 +--- a/config/config.go ++++ b/config/config.go +@@ -31,12 +31,14 @@ func mapName(raw string) string { + + // Set at build time + var shareDir string ++var libexecDir string + + func buildDefaultDirs() []string { + var defaultDirs []string + + prefixes := []string{ + xdg.ConfigHome(), ++ "~/.local/libexec", + xdg.DataHome(), + } + +@@ -51,7 +53,13 @@ func buildDefaultDirs() []string { + } + } + +- // Add custom buildtime shareDir ++ // Add custom buildtime dirs ++ if libexecDir != "" && libexecDir != "/usr/local/libexec/aerc" { ++ libexecDir, err := homedir.Expand(libexecDir) ++ if err == nil { ++ defaultDirs = append(defaultDirs, libexecDir) ++ } ++ } + if shareDir != "" && shareDir != "/usr/local/share/aerc" { + shareDir, err := homedir.Expand(shareDir) + if err == nil { +@@ -60,7 +68,9 @@ func buildDefaultDirs() []string { + } + + // Add fixed fallback locations ++ defaultDirs = append(defaultDirs, "/usr/local/libexec/aerc") + defaultDirs = append(defaultDirs, "/usr/local/share/aerc") ++ defaultDirs = append(defaultDirs, "/usr/libexec/aerc") + defaultDirs = append(defaultDirs, "/usr/share/aerc") + + return defaultDirs +diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd +index 45b41c6..1330856 100644 +--- a/doc/aerc-config.5.scd ++++ b/doc/aerc-config.5.scd +@@ -616,8 +616,8 @@ filters need to be able to read from standard input. Many programs support + reading from stdin by putting _-_ instead of a path to a file. You can also + chain together multiple filters by piping with _|_. + +-aerc ships with some default filters installed in the share directory (usually +-_/usr/share/aerc/filters_). Note that these may have additional dependencies ++aerc ships with some default filters installed in the libexec directory (usually ++_/usr/libexec/aerc/filters_). Note that these may have additional dependencies + that aerc does not have alone. + + The filter commands are invoked with _sh -c command_. The following folders are +@@ -625,8 +625,11 @@ appended to the system *$PATH* to allow referencing filters from their name only + + ``` + ${XDG_CONFIG_HOME:-~/.config}/aerc/filters ++~/.local/libexec/aerc/filters + ${XDG_DATA_HOME:-~/.local/share}/aerc/filters ++$PREFIX/libexec/aerc/filters + $PREFIX/share/aerc/filters ++/usr/libexec/aerc/filters + /usr/share/aerc/filters + ``` + +diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd +index 6c9e319..2f0d5f2 100644 +--- a/doc/aerc-templates.7.scd ++++ b/doc/aerc-templates.7.scd +@@ -111,7 +111,7 @@ aerc provides the following additional functions: + Execute external command, provide the second argument to its stdin. + + ``` +- {{exec `/usr/local/share/aerc/filters/html` .OriginalText}} ++ {{exec `/usr/libexec/aerc/filters/html` .OriginalText}} + ``` + + *toLocal* +@@ -142,7 +142,7 @@ aerc provides the following additional functions: + Example: Automatic HTML parsing for text/html mime type messages + ``` + {{if eq .OriginalMIMEType "text/html"}} +- {{exec `/usr/local/share/aerc/filters/html` .OriginalText | wrap 72 | quote}} ++ {{exec `/usr/libexec/aerc/filters/html` .OriginalText | wrap 72 | quote}} + {{else}} + {{wrap 72 .OriginalText | quote}} + {{end}} +-- +2.39.0 + diff --git a/aerc.spec b/aerc.spec index dbd8843..ffe2638 100644 --- a/aerc.spec +++ b/aerc.spec @@ -24,6 +24,13 @@ URL: %{gourl} # The forge macros don't support Sourcehut. # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +# doc: fix English typos +# https://git.sr.ht/~rjarry/aerc/commit/10b995f0196c8243132c3f435d4e11b3c9700e35 +Patch: 0001-doc-fix-English-typos.patch +# filters: install them in $PREFIX/libexec/aerc/filters +# https://git.sr.ht/~rjarry/aerc/commit/04303172d4f96b284e0c915ce4a7b87e1439bb87 +# Depends on previous patch. Slightly modified to remove CHANGELOG.md conflict. +Patch: 0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch BuildRequires: scdoc BuildRequires: desktop-file-utils @@ -37,6 +44,7 @@ Requires: notmuch %prep %goprep +%autopatch -p1 # Disable building of aerc that we handle manually in the SPEC and # preserve mtimes @@ -79,6 +87,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/aerc.desktop %{_bindir}/aerc %{_datadir}/aerc/ %{_datadir}/applications/aerc.desktop +%{_libexecdir}/aerc/ %{_mandir}/man1/aerc-*.1.* %{_mandir}/man1/aerc.1* %{_mandir}/man5/aerc-*.5.* From b4b8520cab89219668d38a80b99b6905400ab0d2 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 11 Jan 2023 13:58:30 -0600 Subject: [PATCH 04/43] Fix LDFLAGS to match upstream Makefile --- aerc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aerc.spec b/aerc.spec index ffe2638..d843e75 100644 --- a/aerc.spec +++ b/aerc.spec @@ -64,10 +64,13 @@ echo 'golang(github.com/brunnre8/go.notmuch)' %build export BUILDTAGS=notmuch -export LDFLAGS="-X main.Prefix=%{_prefix} \ +export LDFLAGS="\ + -X main.Version=%{version} \ + -X main.Prefix=%{_prefix} \ -X main.ShareDir=%{_datadir}/aerc \ - -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} - -X main.Version=%{version} " + -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ + -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ + " %gobuild -o aerc %{goipath} %gobuild -o wrap filters/wrap.go From ae2f87e58ddecbc02eb53fee429e8cf3a8604489 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:28:08 +0000 Subject: [PATCH 05/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering From fcb3c706ae6b79b3032d65dae9fb8efe5252d5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sun, 16 Jul 2023 21:35:53 +0200 Subject: [PATCH 06/43] Update to 0.15.2 Close: rhbz#2190014, rhbz#2163057 --- .gitignore | 1 + 0001-doc-fix-English-typos.patch | 80 -------- ...-them-in-PREFIX-libexec-aerc-filters.patch | 186 ------------------ aerc.spec | 21 +- sources | 2 +- 5 files changed, 9 insertions(+), 281 deletions(-) delete mode 100644 0001-doc-fix-English-typos.patch delete mode 100644 0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch diff --git a/.gitignore b/.gitignore index e27d0c9..92dcc4f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /aerc-0.12.0.tar.gz /aerc-0.13.0.tar.gz /aerc-0.14.0.tar.gz +/aerc-0.15.2.tar.gz diff --git a/0001-doc-fix-English-typos.patch b/0001-doc-fix-English-typos.patch deleted file mode 100644 index 4cf74fa..0000000 --- a/0001-doc-fix-English-typos.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 7faaeb2eef58129b86ebcb6689b6f67381afd0df Mon Sep 17 00:00:00 2001 -From: Robin Jarry -Date: Wed, 4 Jan 2023 23:44:35 +0100 -Subject: [PATCH 1/2] doc: fix English typos - -Reported by Lintian (Debian). - -Signed-off-by: Robin Jarry -Acked-by: Moritz Poldrack ---- - commands/account/import-mbox.go | 2 +- - doc/aerc-config.5.scd | 4 ++-- - doc/aerc-search.1.scd | 2 +- - widgets/compose.go | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/commands/account/import-mbox.go b/commands/account/import-mbox.go -index 7dab195..59fdfab 100644 ---- a/commands/account/import-mbox.go -+++ b/commands/account/import-mbox.go -@@ -122,7 +122,7 @@ func (ImportMbox) Execute(aerc *widgets.Aerc, args []string) error { - } - } - } -- infoStr := fmt.Sprintf("%s: imported %d of %d sucessfully.", args[0], appended, len(messages)) -+ infoStr := fmt.Sprintf("%s: imported %d of %d successfully.", args[0], appended, len(messages)) - log.Debugf(infoStr) - aerc.SetStatus(infoStr) - } -diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd -index d48e38a..45b41c6 100644 ---- a/doc/aerc-config.5.scd -+++ b/doc/aerc-config.5.scd -@@ -539,7 +539,7 @@ These options are configured in the *[compose]* section of _aerc.conf_. - *address-book-cmd* = _khard email --remove-first-line --parsable %s_ - - *file-picker-cmd* = __ -- Specifies the command to be used to select attachments. Any occurence of -+ Specifies the command to be used to select attachments. Any occurrence of - _%s_ in the *file-picker-cmd* will be replaced with the argument __ - to *:attach -m* __. - -@@ -570,7 +570,7 @@ These options are configured in the *[compose]* section of _aerc.conf_. - - # MULTIPART CONVERTERS - --Converters allow to generate _multipart/alternative_ messages by converting the -+Converters allow generating _multipart/alternative_ messages by converting the - main _text/plain_ body into any other text MIME type with the *:multipart* - command. Only exact MIME types are accepted. The commands are invoked with - _sh -c_ and are expected to output valid UTF-8 text. -diff --git a/doc/aerc-search.1.scd b/doc/aerc-search.1.scd -index 8349874..9b375d5 100644 ---- a/doc/aerc-search.1.scd -+++ b/doc/aerc-search.1.scd -@@ -57,7 +57,7 @@ aerc-search - search and filter patterns and options for *aerc*(1) - - __ *(y[ear]|m[onth]|w[eek]|d[ay])* - __ is a positive integer that represents the number -- of the time units in the past. Mutiple relative terms -+ of the time units in the past. Multiple relative terms - can will be accumulated. The units can also be - abbreviated by a single letter such that yesterday would - correspond to _1d_ (equivalent to _1 day_ or _1_day_) -diff --git a/widgets/compose.go b/widgets/compose.go -index 4f08afa..c4e3ad5 100644 ---- a/widgets/compose.go -+++ b/widgets/compose.go -@@ -127,7 +127,7 @@ func (c *Composer) SwitchAccount(newAcct *AccountView) error { - editor.loadValue() - } - c.Invalidate() -- log.Debugf("account sucessfully switched") -+ log.Debugf("account successfully switched") - return nil - } - --- -2.39.0 - diff --git a/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch b/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch deleted file mode 100644 index 6e82cb1..0000000 --- a/0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 04921a023831f71dbe97eaebc1e44000a311dbab Mon Sep 17 00:00:00 2001 -From: Robin Jarry -Date: Sun, 8 Jan 2023 20:44:22 +0100 -Subject: [PATCH 2/2] filters: install them in $PREFIX/libexec/aerc/filters - -The filesystem hierarchy standard describes /usr/share as -"Architecture-independent data". This folder is not intended for -executable scripts and especially not for arch specific binary files -(such as the wrap filter). - -Lintian reports an error with aerc 0.14.0: - - arch-dependent-file-in-usr-share [usr/share/aerc/filters/wrap] - -Which I had to fix by moving the filter into /usr/libexec. - -Install all filters into $PREFIX/libexec/aerc/filters and update the -default SearchDirs to look them up in here as well. - -Link: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html -Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/a0ca00260ffd -Signed-off-by: Robin Jarry -Acked-by: Moritz Poldrack ---- - Makefile | 21 ++++++++++++--------- - config/config.go | 12 +++++++++++- - doc/aerc-config.5.scd | 7 +++++-- - doc/aerc-templates.7.scd | 4 ++-- - 4 files changed, 30 insertions(+), 14 deletions(-) - -diff --git a/Makefile b/Makefile -index aa0ac4a..9f6bd0d 100644 ---- a/Makefile -+++ b/Makefile -@@ -7,6 +7,7 @@ VPATH=doc - PREFIX?=/usr/local - BINDIR?=$(PREFIX)/bin - SHAREDIR?=$(PREFIX)/share/aerc -+LIBEXECDIR?=$(PREFIX)/libexec/aerc - MANDIR?=$(PREFIX)/share/man - GO?=go - GOFLAGS?= -@@ -17,6 +18,7 @@ GO_LDFLAGS:= - GO_LDFLAGS+=-X main.Version=$(VERSION) - GO_LDFLAGS+=-X main.Flags=$(flags) - GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR) -+GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.libexecDir=$(LIBEXECDIR) - GO_LDFLAGS+=$(GO_EXTRA_LDFLAGS) - - GOSRC!=find * -name '*.go' | grep -v filters/wrap.go -@@ -109,7 +111,7 @@ clean: - install: $(DOCS) aerc wrap - mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \ - $(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets \ -- $(DESTDIR)$(PREFIX)/share/applications -+ $(DESTDIR)$(PREFIX)/share/applications $(DESTDIR)$(LIBEXECDIR)/filters - install -m755 aerc $(DESTDIR)$(BINDIR)/aerc - install -m644 aerc.1 $(DESTDIR)$(MANDIR)/man1/aerc.1 - install -m644 aerc-search.1 $(DESTDIR)$(MANDIR)/man1/aerc-search.1 -@@ -127,14 +129,14 @@ install: $(DOCS) aerc wrap - install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf - install -m644 config/aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf - install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf -- install -m755 filters/calendar $(DESTDIR)$(SHAREDIR)/filters/calendar -- install -m755 filters/colorize $(DESTDIR)$(SHAREDIR)/filters/colorize -- install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff -- install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html -- install -m755 filters/html-unsafe $(DESTDIR)$(SHAREDIR)/filters/html-unsafe -- install -m755 filters/plaintext $(DESTDIR)$(SHAREDIR)/filters/plaintext -- install -m755 filters/show-ics-details.py $(DESTDIR)$(SHAREDIR)/filters/show-ics-details.py -- install -m755 wrap $(DESTDIR)$(SHAREDIR)/filters/wrap -+ install -m755 filters/calendar $(DESTDIR)$(LIBEXECDIR)/filters/calendar -+ install -m755 filters/colorize $(DESTDIR)$(LIBEXECDIR)/filters/colorize -+ install -m755 filters/hldiff $(DESTDIR)$(LIBEXECDIR)/filters/hldiff -+ install -m755 filters/html $(DESTDIR)$(LIBEXECDIR)/filters/html -+ install -m755 filters/html-unsafe $(DESTDIR)$(LIBEXECDIR)/filters/html-unsafe -+ install -m755 filters/plaintext $(DESTDIR)$(LIBEXECDIR)/filters/plaintext -+ install -m755 filters/show-ics-details.py $(DESTDIR)$(LIBEXECDIR)/filters/show-ics-details.py -+ install -m755 wrap $(DESTDIR)$(LIBEXECDIR)/filters/wrap - install -m644 templates/new_message $(DESTDIR)$(SHAREDIR)/templates/new_message - install -m644 templates/quoted_reply $(DESTDIR)$(SHAREDIR)/templates/quoted_reply - install -m644 templates/forward_as_body $(DESTDIR)$(SHAREDIR)/templates/forward_as_body -@@ -177,6 +179,7 @@ uninstall: - $(RM) $(DESTDIR)$(MANDIR)/man7/aerc-templates.7 - $(RM) $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7 - $(RM) -r $(DESTDIR)$(SHAREDIR) -+ $(RM) -r $(DESTDIR)$(LIBEXECDIR) - ${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR) - $(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man1 - $(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man5 -diff --git a/config/config.go b/config/config.go -index 09fb5ef..12da665 100644 ---- a/config/config.go -+++ b/config/config.go -@@ -31,12 +31,14 @@ func mapName(raw string) string { - - // Set at build time - var shareDir string -+var libexecDir string - - func buildDefaultDirs() []string { - var defaultDirs []string - - prefixes := []string{ - xdg.ConfigHome(), -+ "~/.local/libexec", - xdg.DataHome(), - } - -@@ -51,7 +53,13 @@ func buildDefaultDirs() []string { - } - } - -- // Add custom buildtime shareDir -+ // Add custom buildtime dirs -+ if libexecDir != "" && libexecDir != "/usr/local/libexec/aerc" { -+ libexecDir, err := homedir.Expand(libexecDir) -+ if err == nil { -+ defaultDirs = append(defaultDirs, libexecDir) -+ } -+ } - if shareDir != "" && shareDir != "/usr/local/share/aerc" { - shareDir, err := homedir.Expand(shareDir) - if err == nil { -@@ -60,7 +68,9 @@ func buildDefaultDirs() []string { - } - - // Add fixed fallback locations -+ defaultDirs = append(defaultDirs, "/usr/local/libexec/aerc") - defaultDirs = append(defaultDirs, "/usr/local/share/aerc") -+ defaultDirs = append(defaultDirs, "/usr/libexec/aerc") - defaultDirs = append(defaultDirs, "/usr/share/aerc") - - return defaultDirs -diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd -index 45b41c6..1330856 100644 ---- a/doc/aerc-config.5.scd -+++ b/doc/aerc-config.5.scd -@@ -616,8 +616,8 @@ filters need to be able to read from standard input. Many programs support - reading from stdin by putting _-_ instead of a path to a file. You can also - chain together multiple filters by piping with _|_. - --aerc ships with some default filters installed in the share directory (usually --_/usr/share/aerc/filters_). Note that these may have additional dependencies -+aerc ships with some default filters installed in the libexec directory (usually -+_/usr/libexec/aerc/filters_). Note that these may have additional dependencies - that aerc does not have alone. - - The filter commands are invoked with _sh -c command_. The following folders are -@@ -625,8 +625,11 @@ appended to the system *$PATH* to allow referencing filters from their name only - - ``` - ${XDG_CONFIG_HOME:-~/.config}/aerc/filters -+~/.local/libexec/aerc/filters - ${XDG_DATA_HOME:-~/.local/share}/aerc/filters -+$PREFIX/libexec/aerc/filters - $PREFIX/share/aerc/filters -+/usr/libexec/aerc/filters - /usr/share/aerc/filters - ``` - -diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd -index 6c9e319..2f0d5f2 100644 ---- a/doc/aerc-templates.7.scd -+++ b/doc/aerc-templates.7.scd -@@ -111,7 +111,7 @@ aerc provides the following additional functions: - Execute external command, provide the second argument to its stdin. - - ``` -- {{exec `/usr/local/share/aerc/filters/html` .OriginalText}} -+ {{exec `/usr/libexec/aerc/filters/html` .OriginalText}} - ``` - - *toLocal* -@@ -142,7 +142,7 @@ aerc provides the following additional functions: - Example: Automatic HTML parsing for text/html mime type messages - ``` - {{if eq .OriginalMIMEType "text/html"}} -- {{exec `/usr/local/share/aerc/filters/html` .OriginalText | wrap 72 | quote}} -+ {{exec `/usr/libexec/aerc/filters/html` .OriginalText | wrap 72 | quote}} - {{else}} - {{wrap 72 .OriginalText | quote}} - {{end}} --- -2.39.0 - diff --git a/aerc.spec b/aerc.spec index d843e75..987d75c 100644 --- a/aerc.spec +++ b/aerc.spec @@ -3,7 +3,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -Version: 0.14.0 +Version: 0.15.2 %global topdir %{name}-%{version} %gometa @@ -24,18 +24,12 @@ URL: %{gourl} # The forge macros don't support Sourcehut. # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -# doc: fix English typos -# https://git.sr.ht/~rjarry/aerc/commit/10b995f0196c8243132c3f435d4e11b3c9700e35 -Patch: 0001-doc-fix-English-typos.patch -# filters: install them in $PREFIX/libexec/aerc/filters -# https://git.sr.ht/~rjarry/aerc/commit/04303172d4f96b284e0c915ce4a7b87e1439bb87 -# Depends on previous patch. Slightly modified to remove CHANGELOG.md conflict. -Patch: 0002-filters-install-them-in-PREFIX-libexec-aerc-filters.patch BuildRequires: scdoc BuildRequires: desktop-file-utils BuildRequires: gnupg BuildRequires: notmuch-devel +BuildRequires: gcc Requires: notmuch @@ -63,16 +57,15 @@ sed -i "s|github.com/zenhack/go.notmuch|github.com/brunnre8/go.notmuch|" $(find echo 'golang(github.com/brunnre8/go.notmuch)' %build +%set_build_flags +make wrap colorize export BUILDTAGS=notmuch -export LDFLAGS="\ - -X main.Version=%{version} \ +export LDFLAGS="-X main.Version=%{version} \ -X main.Prefix=%{_prefix} \ - -X main.ShareDir=%{_datadir}/aerc \ + -X main.Flags=$(echo -- $(GOFLAGS) | base64 | tr -d '\r\n') \ -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ - -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ - " + -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir}" %gobuild -o aerc %{goipath} -%gobuild -o wrap filters/wrap.go %install export PREFIX=%{_prefix} diff --git a/sources b/sources index 1320b40..e0a0b5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aerc-0.14.0.tar.gz) = d12502a809c5163bc81bfa3bfbd471a03f4e8e56084e00e7bb52619a8ac6f34df78342c0e8e82d6cdfd4fe1bc0c375dd65366a442875621b20bbd040a9025831 +SHA512 (aerc-0.15.2.tar.gz) = 8744c6c5ea45fc8ad2ab46367e92d3859fab962843db4329c7655b0afe7b72dbea21dae588d44eab314a31da89d15e5b6543224699556aed31e0b3b9c7b0ddbc From d12a4b4c2f3b2df24d2c8c64c61b0e57fa2ac42e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 12:59:07 +0000 Subject: [PATCH 07/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From ea1773ac56a692c58de5cf9259baa1f759c702af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 12:20:51 +0000 Subject: [PATCH 08/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e198bd07b97f72599d5957129f4895b7ca82d6ee Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:44:45 +0000 Subject: [PATCH 09/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a376476322b161216bd7bb72c1794b8168e2be0e Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sun, 11 Feb 2024 21:36:49 +0000 Subject: [PATCH 10/43] Rebuild for golang 1.22.0 From 7f775d57961a740767e11401386e4a02fbe6d2a4 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 19:59:31 +0000 Subject: [PATCH 11/43] Update to 0.16.0. Fixes rhbz#2241065. --- .gitignore | 1 + aerc.spec | 4 +++- sources | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 92dcc4f..9c038b1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /aerc-0.13.0.tar.gz /aerc-0.14.0.tar.gz /aerc-0.15.2.tar.gz +/aerc-0.16.0.tar.gz diff --git a/aerc.spec b/aerc.spec index 987d75c..dcbb0e8 100644 --- a/aerc.spec +++ b/aerc.spec @@ -3,7 +3,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -Version: 0.15.2 +Version: 0.16.0 %global topdir %{name}-%{version} %gometa @@ -81,10 +81,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/aerc.desktop %license LICENSE %doc doc README.md %{_bindir}/aerc +%{_bindir}/carddav-query %{_datadir}/aerc/ %{_datadir}/applications/aerc.desktop %{_libexecdir}/aerc/ %{_mandir}/man1/aerc-*.1.* +%{_mandir}/man1/carddav-query.1* %{_mandir}/man1/aerc.1* %{_mandir}/man5/aerc-*.5.* %{_mandir}/man7/aerc-*.7.* diff --git a/sources b/sources index e0a0b5e..534c10f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aerc-0.15.2.tar.gz) = 8744c6c5ea45fc8ad2ab46367e92d3859fab962843db4329c7655b0afe7b72dbea21dae588d44eab314a31da89d15e5b6543224699556aed31e0b3b9c7b0ddbc +SHA512 (aerc-0.16.0.tar.gz) = 8196424915f8f6dc80bad0f936e34b7f51298665af3579ae8c06699a4f1caf962258185a432909911920ec1eb089c9f178c9086c54c0e799a44e1e0dac907fd8 From d32072edbaa7f39c4bae03142b2708e69aac7f03 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:15:52 +0000 Subject: [PATCH 12/43] Sort BuildRequires [skip changelog] --- aerc.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aerc.spec b/aerc.spec index dcbb0e8..62dd07b 100644 --- a/aerc.spec +++ b/aerc.spec @@ -25,11 +25,12 @@ URL: %{gourl} # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: scdoc BuildRequires: desktop-file-utils +# wrap and colorize filters are written in C +BuildRequires: gcc BuildRequires: gnupg BuildRequires: notmuch-devel -BuildRequires: gcc +BuildRequires: scdoc Requires: notmuch From 89992b35ca1a72cafb54ce3bfcaa08abc3db7346 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:17:12 +0000 Subject: [PATCH 13/43] Build contrib filters after the main application This build flow is more logical and makes sure all the build flags are set in the right order. [skip changelog] --- aerc.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aerc.spec b/aerc.spec index 62dd07b..a398c03 100644 --- a/aerc.spec +++ b/aerc.spec @@ -58,8 +58,6 @@ sed -i "s|github.com/zenhack/go.notmuch|github.com/brunnre8/go.notmuch|" $(find echo 'golang(github.com/brunnre8/go.notmuch)' %build -%set_build_flags -make wrap colorize export BUILDTAGS=notmuch export LDFLAGS="-X main.Version=%{version} \ -X main.Prefix=%{_prefix} \ @@ -68,6 +66,12 @@ export LDFLAGS="-X main.Version=%{version} \ -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir}" %gobuild -o aerc %{goipath} +# The go macros interfere with C build flags. +# Reset LDFLAGS and set other missing build flags. +unset LDFLAGS +%set_build_flags +%make_build wrap colorize doc + %install export PREFIX=%{_prefix} %make_install From 47ebbcb9ab9fd6d9ec0680a65c67008d4aa1366b Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:18:20 +0000 Subject: [PATCH 14/43] Reformat LDFLAGS and remove invalid main.Flags [skip changelog] --- aerc.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aerc.spec b/aerc.spec index a398c03..41d016d 100644 --- a/aerc.spec +++ b/aerc.spec @@ -59,11 +59,13 @@ echo 'golang(github.com/brunnre8/go.notmuch)' %build export BUILDTAGS=notmuch -export LDFLAGS="-X main.Version=%{version} \ +export LDFLAGS="\ + -X main.Version=%{version} \ -X main.Prefix=%{_prefix} \ - -X main.Flags=$(echo -- $(GOFLAGS) | base64 | tr -d '\r\n') \ + -X main.ShareDir=%{_datadir}/aerc \ -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ - -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir}" + -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ + " %gobuild -o aerc %{goipath} # The go macros interfere with C build flags. From 08bef49fcf6eb3697e4dd9af10b6a34367ff6f7e Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:18:52 +0000 Subject: [PATCH 15/43] Run tests for filters [skip changelog] --- aerc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aerc.spec b/aerc.spec index 41d016d..494ca2a 100644 --- a/aerc.spec +++ b/aerc.spec @@ -28,6 +28,7 @@ Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: desktop-file-utils # wrap and colorize filters are written in C BuildRequires: gcc +BuildRequires: glibc-all-langpacks BuildRequires: gnupg BuildRequires: notmuch-devel BuildRequires: scdoc @@ -81,6 +82,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/aerc.desktop %if %{with check} %check +LANG=en_US.UTF-8 ./filters/test.sh %gocheck %endif From b8bbb85f284eb8a765edf4da8ace59faf0006cd2 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:06:29 +0000 Subject: [PATCH 16/43] Remove contraction from %description [skip changelog] --- aerc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aerc.spec b/aerc.spec index 494ca2a..57830e0 100644 --- a/aerc.spec +++ b/aerc.spec @@ -9,7 +9,7 @@ Version: 0.16.0 %gometa %global common_description %{expand: -Aerc is an email client that runs in your terminal. It's highly +Aerc is an email client that runs in your terminal. It is highly efficient and extensible, perfect for the discerning hacker.} %global golicenses LICENSE From e5e4f3222a98483c465ded460a1baabb72772bbf Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:06:50 +0000 Subject: [PATCH 17/43] Remove unnecessary %golicenses and %godocs definitions We don't use %gopkg, so these are redundant. [skip changelog] --- aerc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/aerc.spec b/aerc.spec index 57830e0..a2bcd50 100644 --- a/aerc.spec +++ b/aerc.spec @@ -12,9 +12,6 @@ Version: 0.16.0 Aerc is an email client that runs in your terminal. It is highly efficient and extensible, perfect for the discerning hacker.} -%global golicenses LICENSE -%global godocs doc README.md - Name: aerc Release: %autorelease Summary: Email client for your terminal From 8aeee5cdc3e5bfa2b1bd016a1e0265fe3e88152d Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:16:10 +0000 Subject: [PATCH 18/43] Build with vendored dependencies by default aerc has a lot of dependencies and is picky about them. Upstream does a good job at keeping them updated. aerc is prone to crashes with Fedora's dependency versions, many of which are out of date. --- .gitignore | 1 + aerc.spec | 15 ++++++++++++--- mkvendor.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100755 mkvendor.sh diff --git a/.gitignore b/.gitignore index 9c038b1..336a0ca 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /aerc-0.14.0.tar.gz /aerc-0.15.2.tar.gz /aerc-0.16.0.tar.gz +/aerc-0.16.0-vendor.tar.gz diff --git a/aerc.spec b/aerc.spec index a2bcd50..905cd36 100644 --- a/aerc.spec +++ b/aerc.spec @@ -1,5 +1,9 @@ # Generated by go2rpm 1.6.0 %bcond_without check +# aerc has a lot of dependencies and is picky about them. Upstream does a good +# job at keeping them updated. aerc is prone to crashes with Fedora's +# dependency versions, many of which are out of date +%bcond_without vendor # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc @@ -21,6 +25,7 @@ URL: %{gourl} # The forge macros don't support Sourcehut. # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source: aerc-%{version}-vendor.tar.gz BuildRequires: desktop-file-utils # wrap and colorize filters are written in C @@ -36,8 +41,8 @@ Requires: notmuch %{common_description} %prep -%goprep -%autopatch -p1 +%autosetup -n %{topdir} -p1 %{?with_vendor:-b1} +%goprep -e %{?with_vendor:-k} # Disable building of aerc that we handle manually in the SPEC and # preserve mtimes @@ -45,15 +50,19 @@ sed -e 's|install: $(DOCS) aerc wrap|install: $(DOCS)|' \ -e 's|install -m|install -pm|' \ -i Makefile +%if %{without vendor} # From go.mod replace statements: # replace golang.org/x/crypto => github.com/ProtonMail/go-crypto v0.0.0-20200420072808-71bec3603bf3 # replace github.com/zenhack/go.notmuch => github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name "*.go" -type f) sed -i "s|github.com/zenhack/go.notmuch|github.com/brunnre8/go.notmuch|" $(find . -name "*.go" -type f) +%endif %generate_buildrequires +%if %{without vendor} %go_generate_buildrequires echo 'golang(github.com/brunnre8/go.notmuch)' +%endif %build export BUILDTAGS=notmuch @@ -84,7 +93,7 @@ LANG=en_US.UTF-8 ./filters/test.sh %endif %files -%license LICENSE +%license LICENSE %{?with_vendor:vendor/modules.txt} %doc doc README.md %{_bindir}/aerc %{_bindir}/carddav-query diff --git a/mkvendor.sh b/mkvendor.sh new file mode 100755 index 0000000..445789b --- /dev/null +++ b/mkvendor.sh @@ -0,0 +1,47 @@ +#!/usr/bin/bash -x + +set -euo pipefail + +NAME="aerc" +googlestuff="true" + +usage() { + echo "./mkvendor.sh [-n (disable proxy and sumbdb)] VERSION" + if [ -n "${1-}" ]; then + exit "${1}" + fi +} + +do_env() { + if [ "${googlestuff}" = "true" ]; then + GOPROXY=https://proxy.golang.org,direct + GOSUMDB=sum.golang.org + export GOPROXY GOSUMDB + fi +} + + +while getopts "-nh" OPT; do + case "${OPT}" in + n) + googlestuff="" + ;; + h) + usage 0 + ;; + *) + usage 1 + ;; + esac +done +shift "$((OPTIND-1))" +version="${1}" || usage 1 + + +rm -rf "${NAME}-${version}/" +tar xf "${NAME}-${version}.tar.gz" +cd "${NAME}-${version}" +do_env +go mod vendor +cd - +tar czf "${NAME}-${version}-vendor.tar.gz" "${NAME}-${version}/vendor" diff --git a/sources b/sources index 534c10f..d14a1f0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (aerc-0.16.0.tar.gz) = 8196424915f8f6dc80bad0f936e34b7f51298665af3579ae8c06699a4f1caf962258185a432909911920ec1eb089c9f178c9086c54c0e799a44e1e0dac907fd8 +SHA512 (aerc-0.16.0-vendor.tar.gz) = 92e7d134a94db8afcc9102e9d15c7aae8c1b10c74db78ff6e918521a17700e12ec8d27375778e902190291df399d4b76b2564e52a704cf40d7ba7194144e2614 From dc390515313b66884143356d5da0436b387418a7 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 23 Dec 2023 22:20:39 +0000 Subject: [PATCH 19/43] Use modern %bcond syntax [skip changelog] --- aerc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aerc.spec b/aerc.spec index 905cd36..7ad4dd2 100644 --- a/aerc.spec +++ b/aerc.spec @@ -1,9 +1,9 @@ # Generated by go2rpm 1.6.0 -%bcond_without check +%bcond check 1 # aerc has a lot of dependencies and is picky about them. Upstream does a good # job at keeping them updated. aerc is prone to crashes with Fedora's # dependency versions, many of which are out of date -%bcond_without vendor +%bcond vendor 1 # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc From 7f5912f15760651d69e72f518362f58a4cbbcd66 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 1 Feb 2024 04:30:40 +0000 Subject: [PATCH 20/43] Update to 0.17.0. Fixes rhbz#2241065. --- .gitignore | 2 ++ aerc.spec | 2 +- sources | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 336a0ca..b874950 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /aerc-0.15.2.tar.gz /aerc-0.16.0.tar.gz /aerc-0.16.0-vendor.tar.gz +/aerc-0.17.0.tar.gz +/aerc-0.17.0-vendor.tar.gz diff --git a/aerc.spec b/aerc.spec index 7ad4dd2..a7f694f 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -Version: 0.16.0 +Version: 0.17.0 %global topdir %{name}-%{version} %gometa diff --git a/sources b/sources index d14a1f0..cf5ca6a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.16.0.tar.gz) = 8196424915f8f6dc80bad0f936e34b7f51298665af3579ae8c06699a4f1caf962258185a432909911920ec1eb089c9f178c9086c54c0e799a44e1e0dac907fd8 -SHA512 (aerc-0.16.0-vendor.tar.gz) = 92e7d134a94db8afcc9102e9d15c7aae8c1b10c74db78ff6e918521a17700e12ec8d27375778e902190291df399d4b76b2564e52a704cf40d7ba7194144e2614 +SHA512 (aerc-0.17.0.tar.gz) = 6648123c37da36f932825e7caec268765bf285124a4473055b86ac48cfa937a250b03d2404764c2c93a978bb56dc9279550e5bf66aa0ff09f90525c5ead7c062 +SHA512 (aerc-0.17.0-vendor.tar.gz) = b9b479c0f6fac1cdf48df5ab9591409dcfc042e99be44f4c1178202572f90ada0b2ef9dbe675392f95e0aef3e19221bb87ad4f419d42ff8badecc3d3761b68dc From ed696d0c8b160b264f24b04007e414de23f3b586 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 23 Feb 2024 23:48:06 +0000 Subject: [PATCH 21/43] Attempt to account for licenses of vendored components [skip changelog] --- LICENSES.dependencies | 55 +++++++++++++++++++++++++++++++++++++++++++ aerc.spec | 13 ++++++---- 2 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 LICENSES.dependencies diff --git a/LICENSES.dependencies b/LICENSES.dependencies new file mode 100644 index 0000000..d754836 --- /dev/null +++ b/LICENSES.dependencies @@ -0,0 +1,55 @@ +./LICENSE: MIT +./vendor/git.sr.ht/~rjarry/go-opt/LICENSE: MIT +./vendor/git.sr.ht/~rockorager/go-jmap/LICENSE: MIT +./vendor/git.sr.ht/~rockorager/tcell-term/LICENSE: MIT +./vendor/github.com/ProtonMail/go-crypto/LICENSE: BSD-3-Clause +./vendor/github.com/arran4/golang-ical/LICENSE: Apache-2.0 +./vendor/github.com/creack/pty/LICENSE: MIT +./vendor/github.com/danwakefield/fnmatch/LICENSE: BSD-2-Clause +./vendor/github.com/davecgh/go-spew/LICENSE: ISC +./vendor/github.com/emersion/go-imap-sortthread/LICENSE: MIT +./vendor/github.com/emersion/go-imap/LICENSE: MIT +./vendor/github.com/emersion/go-maildir/LICENSE: MIT +./vendor/github.com/emersion/go-mbox/LICENSE: MIT +./vendor/github.com/emersion/go-message/LICENSE: MIT +./vendor/github.com/emersion/go-msgauth/LICENSE: MIT +./vendor/github.com/emersion/go-pgpmail/LICENSE: MIT +./vendor/github.com/emersion/go-sasl/LICENSE: MIT +./vendor/github.com/emersion/go-smtp/LICENSE: MIT +./vendor/github.com/emersion/go-textwrapper/LICENSE: MIT +./vendor/github.com/fsnotify/fsevents/LICENSE: BSD-3-Clause +./vendor/github.com/fsnotify/fsnotify/LICENSE: BSD-3-Clause +./vendor/github.com/gatherstars-com/jwz/LICENSE: Apache-2.0 +./vendor/github.com/gdamore/encoding/LICENSE: Apache-2.0 +./vendor/github.com/gdamore/tcell/v2/LICENSE: Apache-2.0 +./vendor/github.com/go-ini/ini/LICENSE: Apache-2.0 +./vendor/github.com/golang/protobuf/LICENSE: BSD-3-Clause +./vendor/github.com/golang/snappy/LICENSE: BSD-3-Clause +./vendor/github.com/lithammer/fuzzysearch/LICENSE: MIT +./vendor/github.com/lucasb-eyer/go-colorful/LICENSE: MIT +./vendor/github.com/mattn/go-isatty/LICENSE: MIT +./vendor/github.com/mattn/go-runewidth/LICENSE: MIT +./vendor/github.com/pkg/errors/LICENSE: BSD-2-Clause +./vendor/github.com/pmezard/go-difflib/LICENSE: BSD-3-Clause +./vendor/github.com/rivo/uniseg/LICENSE.txt: MIT +./vendor/github.com/riywo/loginshell/LICENSE: MIT +./vendor/github.com/stretchr/testify/LICENSE: MIT +./vendor/github.com/syndtr/goleveldb/LICENSE: BSD-2-Clause +./vendor/github.com/xo/terminfo/LICENSE: MIT +./vendor/golang.org/x/crypto/LICENSE: BSD-3-Clause +./vendor/golang.org/x/mod/LICENSE: BSD-3-Clause +./vendor/golang.org/x/net/LICENSE: BSD-3-Clause +./vendor/golang.org/x/oauth2/LICENSE: BSD-3-Clause +./vendor/golang.org/x/sys/LICENSE: BSD-3-Clause +./vendor/golang.org/x/term/LICENSE: BSD-3-Clause +./vendor/golang.org/x/text/LICENSE: BSD-3-Clause +./vendor/golang.org/x/tools/LICENSE: BSD-3-Clause +./vendor/google.golang.org/appengine/LICENSE: Apache-2.0 +./vendor/google.golang.org/protobuf/LICENSE: BSD-3-Clause + +The following license files were found but the correct license identifier couldn't be determined. +./vendor/github.com/cloudflare/circl/LICENSE (MANUALLY DETECTED as BSD-3-Clause) +./vendor/gopkg.in/yaml.v3/LICENSE (MANUALLY DETECTED as Apache-2.0 AND MIT) + +Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT + diff --git a/aerc.spec b/aerc.spec index a7f694f..2665e8b 100644 --- a/aerc.spec +++ b/aerc.spec @@ -20,12 +20,16 @@ Name: aerc Release: %autorelease Summary: Email client for your terminal -License: MIT +SourceLicense: MIT +# See LICENSES.dependencies +License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC URL: %{gourl} # The forge macros don't support Sourcehut. # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 -Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source: aerc-%{version}-vendor.tar.gz +Source0 %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: aerc-%{version}-vendor.tar.gz +# https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_vendor_licenses.py +Source2: LICENSES.dependencies BuildRequires: desktop-file-utils # wrap and colorize filters are written in C @@ -43,6 +47,7 @@ Requires: notmuch %prep %autosetup -n %{topdir} -p1 %{?with_vendor:-b1} %goprep -e %{?with_vendor:-k} +cp %{SOURCE2} . # Disable building of aerc that we handle manually in the SPEC and # preserve mtimes @@ -93,7 +98,7 @@ LANG=en_US.UTF-8 ./filters/test.sh %endif %files -%license LICENSE %{?with_vendor:vendor/modules.txt} +%license LICENSE %{?with_vendor:vendor/modules.txt LICENSES.dependencies} %doc doc README.md %{_bindir}/aerc %{_bindir}/carddav-query From 8d4be78b8a9588356b2f2fe1c8b2cd454085ff1f Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 23 Feb 2024 23:50:23 +0000 Subject: [PATCH 22/43] Take advantage of new forge macros features [skip changelog] --- aerc.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/aerc.spec b/aerc.spec index 2665e8b..ce76671 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,8 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -Version: 0.17.0 -%global topdir %{name}-%{version} +%global version0 0.17.0 %gometa @@ -17,6 +16,7 @@ Aerc is an email client that runs in your terminal. It is highly efficient and extensible, perfect for the discerning hacker.} Name: aerc +Version: %{forgeversion} Release: %autorelease Summary: Email client for your terminal @@ -24,9 +24,7 @@ SourceLicense: MIT # See LICENSES.dependencies License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC URL: %{gourl} -# The forge macros don't support Sourcehut. -# https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 -Source0 %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0 %{forgesource} Source1: aerc-%{version}-vendor.tar.gz # https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_vendor_licenses.py Source2: LICENSES.dependencies @@ -45,7 +43,7 @@ Requires: notmuch %{common_description} %prep -%autosetup -n %{topdir} -p1 %{?with_vendor:-b1} +%autosetup -p1 %{forgesetupargs} %{?with_vendor:-b1} %goprep -e %{?with_vendor:-k} cp %{SOURCE2} . From 834efbb3a710581634c3c252d9468f830cf8654a Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 24 Feb 2024 04:28:33 +0000 Subject: [PATCH 23/43] Remove outdated seds - Makefile has been replaced with a macro-ized GNUMakefile - go.notmuch has been replaced with internal bindings. [skip changelog] --- aerc.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/aerc.spec b/aerc.spec index ce76671..b34e1a3 100644 --- a/aerc.spec +++ b/aerc.spec @@ -47,24 +47,15 @@ Requires: notmuch %goprep -e %{?with_vendor:-k} cp %{SOURCE2} . -# Disable building of aerc that we handle manually in the SPEC and -# preserve mtimes -sed -e 's|install: $(DOCS) aerc wrap|install: $(DOCS)|' \ - -e 's|install -m|install -pm|' \ - -i Makefile - %if %{without vendor} # From go.mod replace statements: # replace golang.org/x/crypto => github.com/ProtonMail/go-crypto v0.0.0-20200420072808-71bec3603bf3 -# replace github.com/zenhack/go.notmuch => github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name "*.go" -type f) -sed -i "s|github.com/zenhack/go.notmuch|github.com/brunnre8/go.notmuch|" $(find . -name "*.go" -type f) %endif %generate_buildrequires %if %{without vendor} %go_generate_buildrequires -echo 'golang(github.com/brunnre8/go.notmuch)' %endif %build From 4b22604ae8d4afcc80125516604fd59b5bb1ee76 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 24 Feb 2024 06:30:03 +0000 Subject: [PATCH 24/43] Sync LDFLAGS definition with upstream Makefile [skip changelog] --- aerc.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/aerc.spec b/aerc.spec index b34e1a3..8f9c391 100644 --- a/aerc.spec +++ b/aerc.spec @@ -61,12 +61,11 @@ sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name " %build export BUILDTAGS=notmuch export LDFLAGS="\ - -X main.Version=%{version} \ - -X main.Prefix=%{_prefix} \ - -X main.ShareDir=%{_datadir}/aerc \ - -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ - -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ - " + -X main.Version=%{version} \ + -X main.Date="$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" \ + -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ + -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ + " %gobuild -o aerc %{goipath} # The go macros interfere with C build flags. From 53c793f903675aff1685e7d6c25c61de95911060 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sun, 25 Feb 2024 19:51:50 +0000 Subject: [PATCH 25/43] Use upstream Makefile to build aerc --- aerc.spec | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/aerc.spec b/aerc.spec index 8f9c391..a5b8a15 100644 --- a/aerc.spec +++ b/aerc.spec @@ -59,20 +59,26 @@ sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name " %endif %build -export BUILDTAGS=notmuch -export LDFLAGS="\ - -X main.Version=%{version} \ - -X main.Date="$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" \ - -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \ - -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \ - " -%gobuild -o aerc %{goipath} - -# The go macros interfere with C build flags. -# Reset LDFLAGS and set other missing build flags. -unset LDFLAGS %set_build_flags -%make_build wrap colorize doc +# GO_BUILDTAGS: Enable notmuch explicitly instead of relying on auto-detection +# in build script. +# GO_LDFLAGS: Set to an empty string so the C LDFLAGS set by %%set_build_flags +# aren't read instead. +GO_BUILDTAGS=notmuch GO_LDFLAGS="" + +# BUILD_OPTS: Set `go build` flags +# DATE: Set DATE based on SOURCE_DATE_EPOCH. The Makefile sets it based on the +# current time. +# GOFLAGS: Set to an empty string. We want to clear the definition from the Makefile. +# GO_EXTRA_LDFLAGS: Set `go build -ldflags` argument +# Other values should be self-explanatory +%make_build \ + BUILD_OPTS=%{gobuild_baseflags_shescaped} \ + DATE="$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" \ + GOFLAGS= \ + GO_EXTRA_LDFLAGS=%{gobuild_ldflags_shescaped} \ + PREFIX=%{_prefix} \ + VERSION=%{version} \ %install export PREFIX=%{_prefix} From 1c57e1eec6842ccead79c00f47b485e52a209091 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:41:06 +0000 Subject: [PATCH 26/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 7c980294728afdb477ad3298dd0a6f21c0afb108 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 5 Jul 2024 12:11:23 +0200 Subject: [PATCH 27/43] Update to 0.18.0. - Regenerate specfile with go2rpm and go-vendor-tools --- .gitignore | 2 ++ LICENSES.dependencies | 55 ------------------------------------------- aerc.spec | 55 ++++++++++++++++++++----------------------- go-vendor-tools.toml | 2 ++ mkvendor.sh | 47 ------------------------------------ sources | 4 ++-- 6 files changed, 31 insertions(+), 134 deletions(-) delete mode 100644 LICENSES.dependencies create mode 100644 go-vendor-tools.toml delete mode 100755 mkvendor.sh diff --git a/.gitignore b/.gitignore index b874950..2c189de 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ /aerc-0.16.0-vendor.tar.gz /aerc-0.17.0.tar.gz /aerc-0.17.0-vendor.tar.gz +/aerc-0.18.0.tar.gz +/aerc-0.18.0-vendor.tar.bz2 diff --git a/LICENSES.dependencies b/LICENSES.dependencies deleted file mode 100644 index d754836..0000000 --- a/LICENSES.dependencies +++ /dev/null @@ -1,55 +0,0 @@ -./LICENSE: MIT -./vendor/git.sr.ht/~rjarry/go-opt/LICENSE: MIT -./vendor/git.sr.ht/~rockorager/go-jmap/LICENSE: MIT -./vendor/git.sr.ht/~rockorager/tcell-term/LICENSE: MIT -./vendor/github.com/ProtonMail/go-crypto/LICENSE: BSD-3-Clause -./vendor/github.com/arran4/golang-ical/LICENSE: Apache-2.0 -./vendor/github.com/creack/pty/LICENSE: MIT -./vendor/github.com/danwakefield/fnmatch/LICENSE: BSD-2-Clause -./vendor/github.com/davecgh/go-spew/LICENSE: ISC -./vendor/github.com/emersion/go-imap-sortthread/LICENSE: MIT -./vendor/github.com/emersion/go-imap/LICENSE: MIT -./vendor/github.com/emersion/go-maildir/LICENSE: MIT -./vendor/github.com/emersion/go-mbox/LICENSE: MIT -./vendor/github.com/emersion/go-message/LICENSE: MIT -./vendor/github.com/emersion/go-msgauth/LICENSE: MIT -./vendor/github.com/emersion/go-pgpmail/LICENSE: MIT -./vendor/github.com/emersion/go-sasl/LICENSE: MIT -./vendor/github.com/emersion/go-smtp/LICENSE: MIT -./vendor/github.com/emersion/go-textwrapper/LICENSE: MIT -./vendor/github.com/fsnotify/fsevents/LICENSE: BSD-3-Clause -./vendor/github.com/fsnotify/fsnotify/LICENSE: BSD-3-Clause -./vendor/github.com/gatherstars-com/jwz/LICENSE: Apache-2.0 -./vendor/github.com/gdamore/encoding/LICENSE: Apache-2.0 -./vendor/github.com/gdamore/tcell/v2/LICENSE: Apache-2.0 -./vendor/github.com/go-ini/ini/LICENSE: Apache-2.0 -./vendor/github.com/golang/protobuf/LICENSE: BSD-3-Clause -./vendor/github.com/golang/snappy/LICENSE: BSD-3-Clause -./vendor/github.com/lithammer/fuzzysearch/LICENSE: MIT -./vendor/github.com/lucasb-eyer/go-colorful/LICENSE: MIT -./vendor/github.com/mattn/go-isatty/LICENSE: MIT -./vendor/github.com/mattn/go-runewidth/LICENSE: MIT -./vendor/github.com/pkg/errors/LICENSE: BSD-2-Clause -./vendor/github.com/pmezard/go-difflib/LICENSE: BSD-3-Clause -./vendor/github.com/rivo/uniseg/LICENSE.txt: MIT -./vendor/github.com/riywo/loginshell/LICENSE: MIT -./vendor/github.com/stretchr/testify/LICENSE: MIT -./vendor/github.com/syndtr/goleveldb/LICENSE: BSD-2-Clause -./vendor/github.com/xo/terminfo/LICENSE: MIT -./vendor/golang.org/x/crypto/LICENSE: BSD-3-Clause -./vendor/golang.org/x/mod/LICENSE: BSD-3-Clause -./vendor/golang.org/x/net/LICENSE: BSD-3-Clause -./vendor/golang.org/x/oauth2/LICENSE: BSD-3-Clause -./vendor/golang.org/x/sys/LICENSE: BSD-3-Clause -./vendor/golang.org/x/term/LICENSE: BSD-3-Clause -./vendor/golang.org/x/text/LICENSE: BSD-3-Clause -./vendor/golang.org/x/tools/LICENSE: BSD-3-Clause -./vendor/google.golang.org/appengine/LICENSE: Apache-2.0 -./vendor/google.golang.org/protobuf/LICENSE: BSD-3-Clause - -The following license files were found but the correct license identifier couldn't be determined. -./vendor/github.com/cloudflare/circl/LICENSE (MANUALLY DETECTED as BSD-3-Clause) -./vendor/gopkg.in/yaml.v3/LICENSE (MANUALLY DETECTED as Apache-2.0 AND MIT) - -Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT - diff --git a/aerc.spec b/aerc.spec index a5b8a15..13fbb7f 100644 --- a/aerc.spec +++ b/aerc.spec @@ -1,15 +1,15 @@ -# Generated by go2rpm 1.6.0 +# Generated by go2rpm 1.14.0 %bcond check 1 -# aerc has a lot of dependencies and is picky about them. Upstream does a good -# job at keeping them updated. aerc is prone to crashes with Fedora's -# dependency versions, many of which are out of date -%bcond vendor 1 + +# We use vendored deps, as aerc has a lot of dependencies and is picky about +# them. Upstream does a good job at keeping them updated. aerc is prone to +# crashes with Fedora's dependency versions, many of which are out of date. # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.17.0 +%global version0 0.18.0 -%gometa +%gometa -L %global common_description %{expand: Aerc is an email client that runs in your terminal. It is highly @@ -21,42 +21,35 @@ Release: %autorelease Summary: Email client for your terminal SourceLicense: MIT -# See LICENSES.dependencies +# Generated by go-vendor-tools License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC URL: %{gourl} -Source0 %{forgesource} -Source1: aerc-%{version}-vendor.tar.gz -# https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_vendor_licenses.py -Source2: LICENSES.dependencies +Source0: %{gosource} +# Generated by go-vendor-tools +Source1: %{archivename}-vendor.tar.bz2 +Source2: go-vendor-tools.toml BuildRequires: desktop-file-utils # wrap and colorize filters are written in C BuildRequires: gcc BuildRequires: glibc-all-langpacks +BuildRequires: go-vendor-tools BuildRequires: gnupg BuildRequires: notmuch-devel BuildRequires: scdoc Requires: notmuch -%description -%{common_description} +%description %{common_description} %prep -%autosetup -p1 %{forgesetupargs} %{?with_vendor:-b1} -%goprep -e %{?with_vendor:-k} -cp %{SOURCE2} . - -%if %{without vendor} -# From go.mod replace statements: -# replace golang.org/x/crypto => github.com/ProtonMail/go-crypto v0.0.0-20200420072808-71bec3603bf3 -sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name "*.go" -type f) -%endif +%goprep -A +%setup -q -T -D -a1 %{forgesetupargs} +%autopatch -p1 %generate_buildrequires -%if %{without vendor} -%go_generate_buildrequires -%endif +%go_vendor_license_buildrequires -c %{S:2} + %build %set_build_flags @@ -84,16 +77,18 @@ GO_BUILDTAGS=notmuch GO_LDFLAGS="" export PREFIX=%{_prefix} %make_install desktop-file-validate %{buildroot}/%{_datadir}/applications/aerc.desktop +%go_vendor_license_install -c %{S:2} -%if %{with check} %check +%go_vendor_license_check -c %{S:2} +%if %{with check} LANG=en_US.UTF-8 ./filters/test.sh %gocheck %endif -%files -%license LICENSE %{?with_vendor:vendor/modules.txt LICENSES.dependencies} -%doc doc README.md +%files -f %{go_vendor_license_filelist} +%license vendor/modules.txt +%doc doc README.md CHANGELOG.md %{_bindir}/aerc %{_bindir}/carddav-query %{_datadir}/aerc/ diff --git a/go-vendor-tools.toml b/go-vendor-tools.toml new file mode 100644 index 0000000..a04291c --- /dev/null +++ b/go-vendor-tools.toml @@ -0,0 +1,2 @@ +[licensing] +detector = "trivy" diff --git a/mkvendor.sh b/mkvendor.sh deleted file mode 100755 index 445789b..0000000 --- a/mkvendor.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/bash -x - -set -euo pipefail - -NAME="aerc" -googlestuff="true" - -usage() { - echo "./mkvendor.sh [-n (disable proxy and sumbdb)] VERSION" - if [ -n "${1-}" ]; then - exit "${1}" - fi -} - -do_env() { - if [ "${googlestuff}" = "true" ]; then - GOPROXY=https://proxy.golang.org,direct - GOSUMDB=sum.golang.org - export GOPROXY GOSUMDB - fi -} - - -while getopts "-nh" OPT; do - case "${OPT}" in - n) - googlestuff="" - ;; - h) - usage 0 - ;; - *) - usage 1 - ;; - esac -done -shift "$((OPTIND-1))" -version="${1}" || usage 1 - - -rm -rf "${NAME}-${version}/" -tar xf "${NAME}-${version}.tar.gz" -cd "${NAME}-${version}" -do_env -go mod vendor -cd - -tar czf "${NAME}-${version}-vendor.tar.gz" "${NAME}-${version}/vendor" diff --git a/sources b/sources index cf5ca6a..b3522e4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.17.0.tar.gz) = 6648123c37da36f932825e7caec268765bf285124a4473055b86ac48cfa937a250b03d2404764c2c93a978bb56dc9279550e5bf66aa0ff09f90525c5ead7c062 -SHA512 (aerc-0.17.0-vendor.tar.gz) = b9b479c0f6fac1cdf48df5ab9591409dcfc042e99be44f4c1178202572f90ada0b2ef9dbe675392f95e0aef3e19221bb87ad4f419d42ff8badecc3d3761b68dc +SHA512 (aerc-0.18.0.tar.gz) = ac45ce6a0e6078e009713745b29f5631fe6177f9d43044b4de97bb011f1f660476cb280ed12ee0eb2cee71e93589ae3c651df869ca01f88b31b7f3abaadcfeb2 +SHA512 (aerc-0.18.0-vendor.tar.bz2) = 70671762309b576b19e4adc61c885e11c79a2ada2a1eb2d07f1bce381a9e8e76801416f6e1c85a9ea146e58707b67989fbd627efc16011c2fedc3fd92048bca2 From 2ba4d2219d4f51008371ea91b9c05cfde6245c0d Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Mon, 5 Aug 2024 01:48:24 -0500 Subject: [PATCH 28/43] Update to 0.18.2. --- .gitignore | 2 ++ aerc.spec | 2 +- sources | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2c189de..82db965 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ /aerc-0.17.0-vendor.tar.gz /aerc-0.18.0.tar.gz /aerc-0.18.0-vendor.tar.bz2 +/aerc-0.18.2.tar.gz +/aerc-0.18.2-vendor.tar.bz2 diff --git a/aerc.spec b/aerc.spec index 13fbb7f..fddff19 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.18.0 +%global version0 0.18.2 %gometa -L diff --git a/sources b/sources index b3522e4..4530278 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.18.0.tar.gz) = ac45ce6a0e6078e009713745b29f5631fe6177f9d43044b4de97bb011f1f660476cb280ed12ee0eb2cee71e93589ae3c651df869ca01f88b31b7f3abaadcfeb2 -SHA512 (aerc-0.18.0-vendor.tar.bz2) = 70671762309b576b19e4adc61c885e11c79a2ada2a1eb2d07f1bce381a9e8e76801416f6e1c85a9ea146e58707b67989fbd627efc16011c2fedc3fd92048bca2 +SHA512 (aerc-0.18.2.tar.gz) = accce8bf2d5e90bffa615e58c68cb187e2eb0ede64bbebe69735c1367c51f286d2dfa505f6b0c67a5958f32afacb9903b1c12e397e64e49403807b78d3bad25c +SHA512 (aerc-0.18.2-vendor.tar.bz2) = 19259fdb89ca1dbb6ecd55288cd420b1def826ef42905ff931278d0cbacd0c810c90dd0812ec5a812a751497e58e1cdd6472c7b6191961fccd5bd67153112ca1 From e4cd9b05c843d695bd10f7ec09a2682b29508fa4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:40:34 +0000 Subject: [PATCH 29/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 218748edd81acc1564ad3cad62cc932faeb28799 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 15 Jan 2025 20:58:40 +0100 Subject: [PATCH 30/43] Update to 0.19.0. The new html filter is enabled by default and depends on w3m. Add other optional/weak dependencies for tools that are commonly used along with aerc. --- .gitignore | 2 + aerc.spec | 14 +++++- sources | 4 +- tests-fix-error-with-go-1.24.patch | 73 ++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 tests-fix-error-with-go-1.24.patch diff --git a/.gitignore b/.gitignore index 82db965..9db9358 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ /aerc-0.18.0-vendor.tar.bz2 /aerc-0.18.2.tar.gz /aerc-0.18.2-vendor.tar.bz2 +/aerc-0.19.0.tar.gz +/aerc-0.19.0-vendor.tar.bz2 diff --git a/aerc.spec b/aerc.spec index fddff19..86dfa29 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.18.2 +%global version0 0.19.0 %gometa -L @@ -28,6 +28,7 @@ Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml +Patch: tests-fix-error-with-go-1.24.patch BuildRequires: desktop-file-utils # wrap and colorize filters are written in C @@ -38,7 +39,16 @@ BuildRequires: gnupg BuildRequires: notmuch-devel BuildRequires: scdoc +# for libnotmuch.so Requires: notmuch +# used in the builtin `html` filter +Requires: w3m +# aerc is mainly targeted at developers using a git+email workflow +Recommends: git-email +# for email signing/verification, encryption/decryption +Recommends: gnupg2 +# for network isolation with unshare in the builtin `html` filter +Recommends: util-linux %description %{common_description} @@ -88,7 +98,7 @@ LANG=en_US.UTF-8 ./filters/test.sh %files -f %{go_vendor_license_filelist} %license vendor/modules.txt -%doc doc README.md CHANGELOG.md +%doc README.md CHANGELOG.md %{_bindir}/aerc %{_bindir}/carddav-query %{_datadir}/aerc/ diff --git a/sources b/sources index 4530278..fa21520 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.18.2.tar.gz) = accce8bf2d5e90bffa615e58c68cb187e2eb0ede64bbebe69735c1367c51f286d2dfa505f6b0c67a5958f32afacb9903b1c12e397e64e49403807b78d3bad25c -SHA512 (aerc-0.18.2-vendor.tar.bz2) = 19259fdb89ca1dbb6ecd55288cd420b1def826ef42905ff931278d0cbacd0c810c90dd0812ec5a812a751497e58e1cdd6472c7b6191961fccd5bd67153112ca1 +SHA512 (aerc-0.19.0.tar.gz) = 8c8fa57d5b105734c719e4a4aed60ded5657ad53f53fe6f05f75bbe75820b510a551f93f0079f364f3f79ac46a801be10f344c3d488e39a120ef6929162d0407 +SHA512 (aerc-0.19.0-vendor.tar.bz2) = 9070156dc35ff807447b44b4558c1f1994c732f613408e55035b5212b77d8d9c382964c7aea078371775253a0790cd86534ca50839d26a75f0ca8e45c5acf4ac diff --git a/tests-fix-error-with-go-1.24.patch b/tests-fix-error-with-go-1.24.patch new file mode 100644 index 0000000..d679d5a --- /dev/null +++ b/tests-fix-error-with-go-1.24.patch @@ -0,0 +1,73 @@ +From 0c8672b987fbe5d8f1bbfb9530177ec69729a4fc Mon Sep 17 00:00:00 2001 +From: Robin Jarry +Date: Thu, 16 Jan 2025 14:52:23 +0100 +Subject: [PATCH aerc] tests: fix error with go 1.24 + +Fix the following error when running tests with go 1.24: + +lib/iterator/iterator_test.go:58:12: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:62:13: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:66:12: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:69:12: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:83:12: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:87:13: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:91:12: non-constant format string in call to (*testing.common).Errorf +lib/iterator/iterator_test.go:94:12: non-constant format string in call to (*testing.common).Errorf + +Signed-off-by: Robin Jarry +--- + lib/iterator/iterator_test.go | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lib/iterator/iterator_test.go b/lib/iterator/iterator_test.go +index 01ab9ff97cda..9e6da43a5622 100644 +--- a/lib/iterator/iterator_test.go ++++ b/lib/iterator/iterator_test.go +@@ -55,18 +55,18 @@ func checkUids(t *testing.T, factory iterator.Factory, + got = append(got, iter.Value().(models.UID)) + } + if len(got) != len(want) { +- t.Errorf(label + "number of elements not correct") ++ t.Errorf("%s: number of elements not correct", label) + } + for i, u := range want { + if got[i] != u { +- t.Errorf(label + "order not correct") ++ t.Errorf("%s: order not correct", label) + } + } + if iter.StartIndex() != start { +- t.Errorf(label + "start index not correct") ++ t.Errorf("%s: start index not correct", label) + } + if iter.EndIndex() != end { +- t.Errorf(label + "end index not correct") ++ t.Errorf("%s: end index not correct", label) + } + } + +@@ -80,17 +80,17 @@ func checkThreads(t *testing.T, factory iterator.Factory, + got = append(got, iter.Value().(*types.Thread)) + } + if len(got) != len(want) { +- t.Errorf(label + "number of elements not correct") ++ t.Errorf("%s: number of elements not correct", label) + } + for i, th := range want { + if got[i].Uid != th.Uid { +- t.Errorf(label + "order not correct") ++ t.Errorf("%s: order not correct", label) + } + } + if iter.StartIndex() != start { +- t.Errorf(label + "start index not correct") ++ t.Errorf("%s: start index not correct", label) + } + if iter.EndIndex() != end { +- t.Errorf(label + "end index not correct") ++ t.Errorf("%s: end index not correct", label) + } + } +-- +2.47.1 + From a334582c73c0b37c25578be39b5ff41b5b388f82 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sat, 25 Jan 2025 22:09:21 +0100 Subject: [PATCH 31/43] Update to 0.20.0 --- .gitignore | 2 + aerc.spec | 3 +- sources | 4 +- tests-fix-error-with-go-1.24.patch | 73 ------------------------------ 4 files changed, 5 insertions(+), 77 deletions(-) delete mode 100644 tests-fix-error-with-go-1.24.patch diff --git a/.gitignore b/.gitignore index 9db9358..6d84168 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ /aerc-0.18.2-vendor.tar.bz2 /aerc-0.19.0.tar.gz /aerc-0.19.0-vendor.tar.bz2 +/aerc-0.20.0.tar.gz +/aerc-0.20.0-vendor.tar.bz2 diff --git a/aerc.spec b/aerc.spec index 86dfa29..bf2d1d9 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.19.0 +%global version0 0.20.0 %gometa -L @@ -28,7 +28,6 @@ Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml -Patch: tests-fix-error-with-go-1.24.patch BuildRequires: desktop-file-utils # wrap and colorize filters are written in C diff --git a/sources b/sources index fa21520..1da226b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.19.0.tar.gz) = 8c8fa57d5b105734c719e4a4aed60ded5657ad53f53fe6f05f75bbe75820b510a551f93f0079f364f3f79ac46a801be10f344c3d488e39a120ef6929162d0407 -SHA512 (aerc-0.19.0-vendor.tar.bz2) = 9070156dc35ff807447b44b4558c1f1994c732f613408e55035b5212b77d8d9c382964c7aea078371775253a0790cd86534ca50839d26a75f0ca8e45c5acf4ac +SHA512 (aerc-0.20.0.tar.gz) = 424fd3021129abc0ab33c30a92b4a340b427de288cbae8a6a6b35fec2d61acf6a34e32a68a447fe38f762c1a1dd21327250f8624a4563eb7ce227fe260d1f45f +SHA512 (aerc-0.20.0-vendor.tar.bz2) = 9070156dc35ff807447b44b4558c1f1994c732f613408e55035b5212b77d8d9c382964c7aea078371775253a0790cd86534ca50839d26a75f0ca8e45c5acf4ac diff --git a/tests-fix-error-with-go-1.24.patch b/tests-fix-error-with-go-1.24.patch deleted file mode 100644 index d679d5a..0000000 --- a/tests-fix-error-with-go-1.24.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0c8672b987fbe5d8f1bbfb9530177ec69729a4fc Mon Sep 17 00:00:00 2001 -From: Robin Jarry -Date: Thu, 16 Jan 2025 14:52:23 +0100 -Subject: [PATCH aerc] tests: fix error with go 1.24 - -Fix the following error when running tests with go 1.24: - -lib/iterator/iterator_test.go:58:12: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:62:13: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:66:12: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:69:12: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:83:12: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:87:13: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:91:12: non-constant format string in call to (*testing.common).Errorf -lib/iterator/iterator_test.go:94:12: non-constant format string in call to (*testing.common).Errorf - -Signed-off-by: Robin Jarry ---- - lib/iterator/iterator_test.go | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/lib/iterator/iterator_test.go b/lib/iterator/iterator_test.go -index 01ab9ff97cda..9e6da43a5622 100644 ---- a/lib/iterator/iterator_test.go -+++ b/lib/iterator/iterator_test.go -@@ -55,18 +55,18 @@ func checkUids(t *testing.T, factory iterator.Factory, - got = append(got, iter.Value().(models.UID)) - } - if len(got) != len(want) { -- t.Errorf(label + "number of elements not correct") -+ t.Errorf("%s: number of elements not correct", label) - } - for i, u := range want { - if got[i] != u { -- t.Errorf(label + "order not correct") -+ t.Errorf("%s: order not correct", label) - } - } - if iter.StartIndex() != start { -- t.Errorf(label + "start index not correct") -+ t.Errorf("%s: start index not correct", label) - } - if iter.EndIndex() != end { -- t.Errorf(label + "end index not correct") -+ t.Errorf("%s: end index not correct", label) - } - } - -@@ -80,17 +80,17 @@ func checkThreads(t *testing.T, factory iterator.Factory, - got = append(got, iter.Value().(*types.Thread)) - } - if len(got) != len(want) { -- t.Errorf(label + "number of elements not correct") -+ t.Errorf("%s: number of elements not correct", label) - } - for i, th := range want { - if got[i].Uid != th.Uid { -- t.Errorf(label + "order not correct") -+ t.Errorf("%s: order not correct", label) - } - } - if iter.StartIndex() != start { -- t.Errorf(label + "start index not correct") -+ t.Errorf("%s: start index not correct", label) - } - if iter.EndIndex() != end { -- t.Errorf(label + "end index not correct") -+ t.Errorf("%s: end index not correct", label) - } - } --- -2.47.1 - From 11af76f5de3479d76dd7381429095607e1f0d07a Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 27 Jan 2025 22:12:32 +0100 Subject: [PATCH 32/43] Update to 0.20.1 --- .gitignore | 2 ++ aerc.spec | 2 +- sources | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6d84168..70f398a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ /aerc-0.19.0-vendor.tar.bz2 /aerc-0.20.0.tar.gz /aerc-0.20.0-vendor.tar.bz2 +/aerc-0.20.1.tar.gz +/aerc-0.20.1-vendor.tar.bz2 diff --git a/aerc.spec b/aerc.spec index bf2d1d9..6bf15b9 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.20.0 +%global version0 0.20.1 %gometa -L diff --git a/sources b/sources index 1da226b..eed1a8b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.20.0.tar.gz) = 424fd3021129abc0ab33c30a92b4a340b427de288cbae8a6a6b35fec2d61acf6a34e32a68a447fe38f762c1a1dd21327250f8624a4563eb7ce227fe260d1f45f -SHA512 (aerc-0.20.0-vendor.tar.bz2) = 9070156dc35ff807447b44b4558c1f1994c732f613408e55035b5212b77d8d9c382964c7aea078371775253a0790cd86534ca50839d26a75f0ca8e45c5acf4ac +SHA512 (aerc-0.20.1.tar.gz) = 7221217b7f0e6f92b589864b2e214b3edad3a2f702ab1d6b83f11eba6bb443bf334e76dbb61a67a13a9673e5e5106428ea3ba0ade940dc7f2cf488076783f4a5 +SHA512 (aerc-0.20.1-vendor.tar.bz2) = 5c940f028f1701631dc9b293b462de1f5c260de781517e8b199a2e92da7d6532f76f675963459f917ff5535b90a4bb1084e9a19093690f9dcf7357d9a898f66a From d71010e4dbbcb1a20ac0e69884078c7154c947fa Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 16 Apr 2025 12:17:08 +0200 Subject: [PATCH 33/43] exclude i686 arch for i686 leaf package https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval --- aerc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aerc.spec b/aerc.spec index 6bf15b9..4e320db 100644 --- a/aerc.spec +++ b/aerc.spec @@ -9,7 +9,7 @@ %global goipath git.sr.ht/~rjarry/aerc %global version0 0.20.1 -%gometa -L +%gometa -L -f %global common_description %{expand: Aerc is an email client that runs in your terminal. It is highly From eadf8f930e4137da58966eebff524f29b3d0d2a8 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Thu, 5 Jun 2025 09:15:40 +0200 Subject: [PATCH 34/43] Fix CVE-2025-49466 (fedora#2370376) --- aerc.spec | 3 ++ open-fix-opening-text-html-messages.patch | 38 ++++++++++++++++ ...only-use-part-basename-for-temp-file.patch | 45 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 open-fix-opening-text-html-messages.patch create mode 100644 open-only-use-part-basename-for-temp-file.patch diff --git a/aerc.spec b/aerc.spec index 4e320db..789eb80 100644 --- a/aerc.spec +++ b/aerc.spec @@ -29,6 +29,9 @@ Source0: %{gosource} Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml +Patch0: open-only-use-part-basename-for-temp-file.patch +Patch1: open-fix-opening-text-html-messages.patch + BuildRequires: desktop-file-utils # wrap and colorize filters are written in C BuildRequires: gcc diff --git a/open-fix-opening-text-html-messages.patch b/open-fix-opening-text-html-messages.patch new file mode 100644 index 0000000..e810860 --- /dev/null +++ b/open-fix-opening-text-html-messages.patch @@ -0,0 +1,38 @@ +From 2bbe75fe0bc87ab4c1e16c5a18c6200224391629 Mon Sep 17 00:00:00 2001 +From: Nicole Patricia Mazzuca +Date: Fri, 9 May 2025 09:32:21 +0200 +Subject: [PATCH aerc] open: fix opening text/html messages + +This fixes a bug introduced in 93bec0de8ed5ab3d6b1f01026fe2ef20fa154329: +aerc started using `path.Base()`, which returns `"."` on an empty +path, but still checked for `""` two lines later. + +On macOS, the result is that aerc attempts to open the directory: + +``` +open /var/folders/vn/hs0zvdsx3vq6svvry8s1bnym0000gn/T/aerc-4229266673: is a directory +``` + +Signed-off-by: Nicole Patricia Mazzuca +Acked-by: Robin Jarry +--- + + commands/msgview/open.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/commands/msgview/open.go b/commands/msgview/open.go +index a6e43cb8da5f..7c770d4a90b7 100644 +--- a/commands/msgview/open.go ++++ b/commands/msgview/open.go +@@ -59,7 +59,7 @@ func (o Open) Execute(args []string) error { + } + filename := path.Base(part.FileName()) + var tmpFile *os.File +- if filename == "" { ++ if filename == "." { + extension := "" + if exts, _ := mime.ExtensionsByType(mimeType); len(exts) > 0 { + extension = exts[0] +-- +2.49.0 + diff --git a/open-only-use-part-basename-for-temp-file.patch b/open-only-use-part-basename-for-temp-file.patch new file mode 100644 index 0000000..04333ef --- /dev/null +++ b/open-only-use-part-basename-for-temp-file.patch @@ -0,0 +1,45 @@ +From 93bec0de8ed5ab3d6b1f01026fe2ef20fa154329 Mon Sep 17 00:00:00 2001 +From: Robin Jarry +Date: Wed, 9 Apr 2025 10:49:24 +0200 +Subject: [PATCH aerc] open: only use part basename for temp file + +When an attachment part has a name such as "/tmp/55208186_AllDocs.pdf", +aerc creates a temp folder and tries to store the file by blindly +concatenating the path as follows: + + /tmp/aerc-3444057757/tmp/55208186_AllDocs.pdf + +And when writing to this path, it gets a "No such file or directory" +error because the intermediate "tmp" subfolder isn't created. + +Reported-by: Erik Colson +Signed-off-by: Robin Jarry +--- + + commands/msgview/open.go | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/commands/msgview/open.go b/commands/msgview/open.go +index 4293b7e4892c..a6e43cb8da5f 100644 +--- a/commands/msgview/open.go ++++ b/commands/msgview/open.go +@@ -5,6 +5,7 @@ import ( + "io" + "mime" + "os" ++ "path" + "path/filepath" + + "git.sr.ht/~rjarry/aerc/app" +@@ -56,7 +57,7 @@ func (o Open) Execute(args []string) error { + app.PushError(err.Error()) + return + } +- filename := part.FileName() ++ filename := path.Base(part.FileName()) + var tmpFile *os.File + if filename == "" { + extension := "" +-- +2.49.0 + From 57ead0b6f28f7f8bbc3813f8dcb66cd243c2f6cf Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 12 Jun 2025 14:29:19 -0500 Subject: [PATCH 35/43] Remove redundant manual dependency on notmuch The binary links to libnotmuch.so, so the RPM dependency generator already generates a dependency for it. ... $ fedrq pkgs -S aerc -F requires | grep libnotmuch libnotmuch.so.5()(64bit) --- aerc.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/aerc.spec b/aerc.spec index 789eb80..d38ca6e 100644 --- a/aerc.spec +++ b/aerc.spec @@ -41,8 +41,6 @@ BuildRequires: gnupg BuildRequires: notmuch-devel BuildRequires: scdoc -# for libnotmuch.so -Requires: notmuch # used in the builtin `html` filter Requires: w3m # aerc is mainly targeted at developers using a git+email workflow From 7594891867cc15650438b808dc07362d7f79ab1d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:48:31 +0000 Subject: [PATCH 36/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 7e766529bfe09e875528ad370651ab806effdc45 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 24 Jul 2025 23:45:24 -0500 Subject: [PATCH 37/43] Rebuild From e5f5c0e032ebf2d54371fc928f597ffe2f5c016f Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 15 Aug 2025 14:18:59 -0500 Subject: [PATCH 38/43] Rebuild for golang-1.25.0 --- aerc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aerc.spec b/aerc.spec index d38ca6e..e67c9a6 100644 --- a/aerc.spec +++ b/aerc.spec @@ -17,7 +17,7 @@ efficient and extensible, perfect for the discerning hacker.} Name: aerc Version: %{forgeversion} -Release: %autorelease +Release: %autorelease.1 Summary: Email client for your terminal SourceLicense: MIT @@ -111,4 +111,7 @@ LANG=en_US.UTF-8 ./filters/test.sh %{_mandir}/man7/aerc-*.7.* %changelog +* Fri Aug 15 2025 Maxwell G - 0.20.1-1.1 +- Rebuild for golang-1.25.0 + %autochangelog From a84788c31750e0f364263bc4288d0de019582126 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 15 Aug 2025 15:24:36 -0500 Subject: [PATCH 39/43] Revert "Rebuild for golang-1.25.0" This reverts commit e5f5c0e032ebf2d54371fc928f597ffe2f5c016f. --- aerc.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aerc.spec b/aerc.spec index e67c9a6..d38ca6e 100644 --- a/aerc.spec +++ b/aerc.spec @@ -17,7 +17,7 @@ efficient and extensible, perfect for the discerning hacker.} Name: aerc Version: %{forgeversion} -Release: %autorelease.1 +Release: %autorelease Summary: Email client for your terminal SourceLicense: MIT @@ -111,7 +111,4 @@ LANG=en_US.UTF-8 ./filters/test.sh %{_mandir}/man7/aerc-*.7.* %changelog -* Fri Aug 15 2025 Maxwell G - 0.20.1-1.1 -- Rebuild for golang-1.25.0 - %autochangelog From c550d46275d5555b5a51dfbe2da728b380d9de74 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 15 Aug 2025 15:59:48 -0500 Subject: [PATCH 40/43] Rebuild for golang-1.25.0 From 7433fc6280999422de764b67b5206f7cb2a115f1 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Thu, 28 Aug 2025 13:55:13 +0200 Subject: [PATCH 41/43] New upstream release 0.21.0 (fedora#2391452) --- .gitignore | 2 + aerc.spec | 5 +-- open-fix-opening-text-html-messages.patch | 38 ---------------- ...only-use-part-basename-for-temp-file.patch | 45 ------------------- sources | 4 +- 5 files changed, 5 insertions(+), 89 deletions(-) delete mode 100644 open-fix-opening-text-html-messages.patch delete mode 100644 open-only-use-part-basename-for-temp-file.patch diff --git a/.gitignore b/.gitignore index 70f398a..72db243 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ /aerc-0.20.0-vendor.tar.bz2 /aerc-0.20.1.tar.gz /aerc-0.20.1-vendor.tar.bz2 +/aerc-0.21.0.tar.gz +/aerc-0.21.0-vendor.tar.bz2 diff --git a/aerc.spec b/aerc.spec index d38ca6e..d3ceec8 100644 --- a/aerc.spec +++ b/aerc.spec @@ -7,7 +7,7 @@ # https://git.sr.ht/~rjarry/aerc %global goipath git.sr.ht/~rjarry/aerc -%global version0 0.20.1 +%global version0 0.21.0 %gometa -L -f @@ -29,9 +29,6 @@ Source0: %{gosource} Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml -Patch0: open-only-use-part-basename-for-temp-file.patch -Patch1: open-fix-opening-text-html-messages.patch - BuildRequires: desktop-file-utils # wrap and colorize filters are written in C BuildRequires: gcc diff --git a/open-fix-opening-text-html-messages.patch b/open-fix-opening-text-html-messages.patch deleted file mode 100644 index e810860..0000000 --- a/open-fix-opening-text-html-messages.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2bbe75fe0bc87ab4c1e16c5a18c6200224391629 Mon Sep 17 00:00:00 2001 -From: Nicole Patricia Mazzuca -Date: Fri, 9 May 2025 09:32:21 +0200 -Subject: [PATCH aerc] open: fix opening text/html messages - -This fixes a bug introduced in 93bec0de8ed5ab3d6b1f01026fe2ef20fa154329: -aerc started using `path.Base()`, which returns `"."` on an empty -path, but still checked for `""` two lines later. - -On macOS, the result is that aerc attempts to open the directory: - -``` -open /var/folders/vn/hs0zvdsx3vq6svvry8s1bnym0000gn/T/aerc-4229266673: is a directory -``` - -Signed-off-by: Nicole Patricia Mazzuca -Acked-by: Robin Jarry ---- - - commands/msgview/open.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/commands/msgview/open.go b/commands/msgview/open.go -index a6e43cb8da5f..7c770d4a90b7 100644 ---- a/commands/msgview/open.go -+++ b/commands/msgview/open.go -@@ -59,7 +59,7 @@ func (o Open) Execute(args []string) error { - } - filename := path.Base(part.FileName()) - var tmpFile *os.File -- if filename == "" { -+ if filename == "." { - extension := "" - if exts, _ := mime.ExtensionsByType(mimeType); len(exts) > 0 { - extension = exts[0] --- -2.49.0 - diff --git a/open-only-use-part-basename-for-temp-file.patch b/open-only-use-part-basename-for-temp-file.patch deleted file mode 100644 index 04333ef..0000000 --- a/open-only-use-part-basename-for-temp-file.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 93bec0de8ed5ab3d6b1f01026fe2ef20fa154329 Mon Sep 17 00:00:00 2001 -From: Robin Jarry -Date: Wed, 9 Apr 2025 10:49:24 +0200 -Subject: [PATCH aerc] open: only use part basename for temp file - -When an attachment part has a name such as "/tmp/55208186_AllDocs.pdf", -aerc creates a temp folder and tries to store the file by blindly -concatenating the path as follows: - - /tmp/aerc-3444057757/tmp/55208186_AllDocs.pdf - -And when writing to this path, it gets a "No such file or directory" -error because the intermediate "tmp" subfolder isn't created. - -Reported-by: Erik Colson -Signed-off-by: Robin Jarry ---- - - commands/msgview/open.go | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/commands/msgview/open.go b/commands/msgview/open.go -index 4293b7e4892c..a6e43cb8da5f 100644 ---- a/commands/msgview/open.go -+++ b/commands/msgview/open.go -@@ -5,6 +5,7 @@ import ( - "io" - "mime" - "os" -+ "path" - "path/filepath" - - "git.sr.ht/~rjarry/aerc/app" -@@ -56,7 +57,7 @@ func (o Open) Execute(args []string) error { - app.PushError(err.Error()) - return - } -- filename := part.FileName() -+ filename := path.Base(part.FileName()) - var tmpFile *os.File - if filename == "" { - extension := "" --- -2.49.0 - diff --git a/sources b/sources index eed1a8b..12ae86a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aerc-0.20.1.tar.gz) = 7221217b7f0e6f92b589864b2e214b3edad3a2f702ab1d6b83f11eba6bb443bf334e76dbb61a67a13a9673e5e5106428ea3ba0ade940dc7f2cf488076783f4a5 -SHA512 (aerc-0.20.1-vendor.tar.bz2) = 5c940f028f1701631dc9b293b462de1f5c260de781517e8b199a2e92da7d6532f76f675963459f917ff5535b90a4bb1084e9a19093690f9dcf7357d9a898f66a +SHA512 (aerc-0.21.0.tar.gz) = b58b3ba9fe36a22b5717d48d7b1caf37303003cb4f32138e79f9775a96dbc5d8b27700091dbfe56f31954be5881467a7c5d8c1895d9161eda19a0d7e5c4750aa +SHA512 (aerc-0.21.0-vendor.tar.bz2) = 5deb3e85cdeed9d0366e08ba851bbc4382dfafd3e2ecfb561cfc9b0afdd90183d72683a4c055d95a474144a2a5ba816c2946a1ade9acc85119d0e3242ef8af60 From 11af6f89f557f0f74afb65f67ffec30c414021b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 10 Oct 2025 12:35:36 +0200 Subject: [PATCH 42/43] rebuild From 45d4b5450f085409c6fce5bb3ab3fecacfcbbb2f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 03:29:48 +0000 Subject: [PATCH 43/43] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild