Commit 7c228f53 authored by Sean Whitton's avatar Sean Whitton

drop all patches

parent ab5a7ed2
mairix (0.24-1) UNRELEASED; urgency=medium
* New upstream release.
* Drop all patches: either merged upstream, or bug fixed by a different
upstream changes.
-- Sean Whitton <spwhitton@spwhitton.name> Thu, 17 Aug 2017 16:28:30 -0700
mairix (0.23+git20131125-3) unstable; urgency=medium
* Enable all hardening.
......
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Wed, 23 Mar 2016 17:18:47 -0700
Subject: Option to follow symlinks to mboxes in rc file
Forwarded: https://github.com/rc0/mairix/pull/20
Add .mairixrc option "follow_mbox_symlinks" which allows the user to
restore the behaviour disabled by commit 74ebca5.
This is particularly useful for users of git-annex. It is possible to
work around mairix's symlink-skipping behaviour [1], but a simple
configuration file option to restore the old behaviour is much more
practical.
This patch does not change the default behaviour of mairix for users who
do not explicitly include "follow_mbox_symlinks" in their .mairixrc.
[1] https://joeyh.name/blog/entry/moving_my_email_archives_and_packages_to_git-annex/
---
mairix.c | 9 ++++++++-
mairix.h | 3 ++-
mairixrc.5 | 8 ++++++++
mbox.c | 7 ++++---
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/mairix.c b/mairix.c
index 09f255b..2ef6a62 100644
--- a/mairix.c
+++ b/mairix.c
@@ -51,6 +51,7 @@ static char *omit = NULL;
static char *database_path = NULL;
static enum folder_type output_folder_type = FT_MAILDIR;
static int skip_integrity_checks = 0;
+static int follow_mbox_symlinks = 0;
enum filetype {
M_NONE, M_FILE, M_DIR, M_OTHER
@@ -249,6 +250,7 @@ static void parse_rc_file(char *name)/*{{{*/
}
else if (!strncasecmp(p, "mh=", 3)) add_folders(&mh_folders, copy_value(p));
else if (!strncasecmp(p, "mbox=", 5)) add_folders(&mboxen, copy_value(p));
+ else if (!strncasecmp(p, "follow_mbox_symlinks", 20)) follow_mbox_symlinks = 1;
else if (!strncasecmp(p, "omit=", 5)) add_folders(&omit, copy_value(p));
else if (!strncasecmp(p, "mformat=", 8)) {
@@ -490,6 +492,7 @@ int main (int argc, char **argv)/*{{{*/
int do_integrity_checks = 1;
int do_forced_unlock = 0;
int do_fast_index = 0;
+ int do_mbox_symlinks = 0;
unsigned int forced_hash_key = CREATE_RANDOM_DATABASE_HASH;
@@ -617,6 +620,10 @@ int main (int argc, char **argv)/*{{{*/
do_integrity_checks = 0;
}
+ if (follow_mbox_symlinks) {
+ do_mbox_symlinks = 1;
+ }
+
if (!folder_base) {
fprintf(stderr, "No folder_base/MAIRIX_FOLDER_BASE set\n");
exit(2);
@@ -746,7 +753,7 @@ int main (int argc, char **argv)/*{{{*/
unlock_and_exit(2);
}
- build_mbox_lists(db, folder_base, mboxen, omit_globs);
+ build_mbox_lists(db, folder_base, mboxen, omit_globs, do_mbox_symlinks);
any_updates = update_database(db, msgs->paths, msgs->n, do_fast_index);
if (do_purge) {
diff --git a/mairix.h b/mairix.h
index 2480492..b05c1c6 100644
--- a/mairix.h
+++ b/mairix.h
@@ -357,7 +357,8 @@ int cull_dead_messages(struct database *db, int do_integrity_checks);
/* In mbox.c */
void build_mbox_lists(struct database *db, const char *folder_base,
- const char *mboxen_paths, struct globber_array *omit_globs);
+ const char *mboxen_paths, struct globber_array *omit_globs,
+ int do_mbox_symlinks);
int add_mbox_messages(struct database *db);
void compute_checksum(const char *data, size_t len, checksum_t *csum);
void cull_dead_mboxen(struct database *db);
diff --git a/mairixrc.5 b/mairixrc.5
index b25dead..9dc4ef5 100644
--- a/mairixrc.5
+++ b/mairixrc.5
@@ -358,6 +358,14 @@ relative to the location of the
.I mairixrc
file or anything like that.)
+.TP
+.BI follow_mbox_symlinks
+.br
+This takes no arguments. By default, mairix will skip symlinks to
+mboxes when indexing. If a line starting with
+.B follow_mbox_symlinks
+is present, mairix will follow them instead of skipping them.
+
.SS Expansions
The part of each line in '.mairixrc' following the equals sign can
diff --git a/mbox.c b/mbox.c
index ebbfa78..f8bed26 100644
--- a/mbox.c
+++ b/mbox.c
@@ -743,7 +743,8 @@ void glob_and_expand_paths(const char *folder_base,
/*}}}*/
void build_mbox_lists(struct database *db, const char *folder_base, /*{{{*/
- const char *mboxen_paths, struct globber_array *omit_globs)
+ const char *mboxen_paths, struct globber_array *omit_globs,
+ int do_mbox_symlinks)
{
char **raw_paths, **paths;
int n_raw_paths, i;
@@ -776,8 +777,8 @@ void build_mbox_lists(struct database *db, const char *folder_base, /*{{{*/
if (lstat(path, &sb) < 0) {
/* can't stat */
} else {
- if (S_ISLNK(sb.st_mode)) {
- /* Skip mbox if symlink */
+ if (S_ISLNK(sb.st_mode) && !do_mbox_symlinks) {
+ /* Skip mbox if symlink and no follow_mbox_symlinks in mairixrc */
if (verbose) {
printf("%s is a link - skipping\n", path);
}
Description: Partial fix for stack smashing bug.
As the author of the patch mentions, this may not be the only
place in mairix where a stack smash may occur, but this change does
correct a few static-sized buffers to be dynamically sized based on
inputs.
Bug: https://github.com/rc0/mairix/issues/10
Bug-Debian: http://bugs.debian.org/795937
Author: Daniel Silverstone <dsilvers@digital-scurf.org>
Last-Update: 2015-08-18
--- mairix-0.23+git20131125.orig/nvp.c
+++ mairix-0.23+git20131125/nvp.c
@@ -146,9 +146,9 @@ struct nvp *make_nvp(struct msg_src *src
unsigned int tok;
char *q;
unsigned char qq;
- char name[256];
- char minor[256];
- char value[256];
+ char name[strlen(s)+1];
+ char minor[strlen(s)+1];
+ char value[strlen(s)+1];
enum nvp_action last_action, current_action;
struct nvp *result;
size_t pfxlen;
Description: Fix syntax errors in manpages
Author: Sean Whitton <spwhitton@spwhitton.name>
Forwarded: https://github.com/rc0/mairix/pull/22
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/mairix.1
+++ b/mairix.1
@@ -597,9 +597,9 @@ for mutt, you could do
mkdir -p /home/richard/Mail/mfolder
touch /home/richard/Mail/mfolder/.mh_sequences
.Ex
-which seems to work. Alternatively, within mutt, you could set MBOX_TYPE to
-'mh' and save a message to '+mfolder' to have mutt set up the structure for you
-in advance.
+which seems to work. Alternatively, within mutt, you could set
+MBOX_TYPE to 'mh' and save a message to '+mfolder' to have mutt set up
+the structure for you in advance.
If you use Sylpheed, the best way seems to be to create the new folder from
within Sylpheed before letting mairix write into it.
--- a/mairixrc.5
+++ b/mairixrc.5
@@ -115,7 +115,7 @@ Each colon-separated entry may be a wild
under maildir (above) and mbox (below) for the syntax and
semantics of specifying wildcards.
-.b mairix
+.B mairix
recognizes the types of MH folders created by the following email applications:
.RS 7
.IP "*"
Description: Fix search of message id containing equal signs
Mairix incorrectly interprets the equal sign as a substring search
even when the following character is not compatible with such
a search.
.
All gmail Message-ID have an equal sign so this is major problem
when you want to lookup a specific Message-ID.
Bug: https://github.com/rc0/mairix/issues/10
Bug-Debian: http://bugs.debian.org/634948
Author: Raphaël Hertzog <hertzog@debian.org>
Last-Update: 2014-08-01
--- a/search.c
+++ b/search.c
@@ -981,11 +981,12 @@ static int do_search(struct read_db *db,
}
equal = strchr(word, '=');
- if (equal) {
+ if (equal && (equal[1] == '\0' || isdigit(equal[1]))) {
*equal = 0;
max_errors = atoi(equal + 1);
/* Extend this to do anchoring etc */
} else {
+ equal = NULL;
max_errors = 0; /* keep GCC quiet */
}
Description: removed reference to missing file
Removed reference to removed mairix.txt file from README file. Closes
#691339.
Author: Benjamin Mako Hill <mako@debian.org>
Bug-Debian: https://bugs.debian.org/691339
--- mairix-0.23+git20131125.orig/README
+++ mairix-0.23+git20131125/README
@@ -21,8 +21,6 @@ Sylpheed (which supports MH folders).
[(*) where the input or output folder is an mbox, a copy of the message is made
instead of symlinking.]
-See also the mairix.txt file.
-
*********************************************************************
Copyright (C) Richard P. Curnow 2002-2004
#fix-test-suite.patch
fix-search-with-equal-in-msgid.patch
fix-256-char-limit-on-filenames.patch
Option-to-follow-symlinks-to-mboxes-in-rc-file.patch
removed-reference-to-missing-file.patch
fix-manpage-syntax.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment