user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [ssoma PATCH 0/2] add warnings about lack of v2 support
@ 2018-12-19  9:50 Eric Wong
  2018-12-19  9:50 ` [ssoma PATCH 1/2] extractor: warn about v2 repositories Eric Wong
  2018-12-19  9:50 ` [ssoma PATCH 2/2] README: add warnings about the lack of v2 support Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2018-12-19  9:50 UTC (permalink / raw)
  To: meta

Eric Wong (2):
  extractor: warn about v2 repositories
  README: add warnings about the lack of v2 support

 Documentation/ssoma_repository.pod |  4 ++++
 README                             | 15 ++++++++-------
 lib/Ssoma/Extractor.pm             | 18 +++++++++++++++++-
 3 files changed, 29 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ssoma PATCH 1/2] extractor: warn about v2 repositories
  2018-12-19  9:50 [ssoma PATCH 0/2] add warnings about lack of v2 support Eric Wong
@ 2018-12-19  9:50 ` Eric Wong
  2018-12-19  9:50 ` [ssoma PATCH 2/2] README: add warnings about the lack of v2 support Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2018-12-19  9:50 UTC (permalink / raw)
  To: meta; +Cc: Yaron Scheffer

ssoma was a misguided effort and won't be updated to support v2,
but at least spit out a warning about v2 repos.

Reported-by: Yaron Scheffer <yscheffer@protonmail.com>
---
 lib/Ssoma/Extractor.pm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lib/Ssoma/Extractor.pm b/lib/Ssoma/Extractor.pm
index baf9adb..5c10eec 100644
--- a/lib/Ssoma/Extractor.pm
+++ b/lib/Ssoma/Extractor.pm
@@ -28,6 +28,17 @@ sub _flist {
 	\@rv
 }
 
+sub warn_v2 {
+	my ($self) = @_;
+	if (system('git cat-file blob HEAD:m >/dev/null 2>&1') == 0 ||
+	    system('git cat-file blob HEAD:d >/dev/null 2>&1') == 0) {
+		warn <<"";
+$self->{git}->{git_dir} looks like a public-inbox v2 repo.
+ssoma is deprecated and does not support v2 repositories
+
+	}
+}
+
 sub _extract {
 	my ($self, $target, $since) = @_;
 	my $git = $self->{git};
@@ -82,11 +93,16 @@ sub _extract {
 		# tricking us into extracting the same message twice;
 		# MDA will keep the original in sufficiently-identical messages
 		my $cmd = "git diff-tree -r --name-only -M100% --diff-filter=A";
-		$new = _flist("$cmd $last $tip");
+		$new = [];
+		if ($last ne $tip) {
+			$new = _flist("$cmd $last $tip");
+			warn_v2($self) unless scalar(@$new);
+		}
 	} else {
 		# new maildir or mbox (to us), import everything in the
 		# current tree
 		$new = _flist("git ls-tree -r --name-only $tip");
+		warn_v2($self) unless scalar(@$new);
 	}
 
 	my $i = 0;
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [ssoma PATCH 2/2] README: add warnings about the lack of v2 support
  2018-12-19  9:50 [ssoma PATCH 0/2] add warnings about lack of v2 support Eric Wong
  2018-12-19  9:50 ` [ssoma PATCH 1/2] extractor: warn about v2 repositories Eric Wong
@ 2018-12-19  9:50 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2018-12-19  9:50 UTC (permalink / raw)
  To: meta

Repositories and everything else will continue to exist; but
don't encourage people to use specialized tools when generic
ones such as NNTP will do.
---
 Documentation/ssoma_repository.pod |  4 ++++
 README                             | 15 ++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/Documentation/ssoma_repository.pod b/Documentation/ssoma_repository.pod
index 912f309..6929c83 100644
--- a/Documentation/ssoma_repository.pod
+++ b/Documentation/ssoma_repository.pod
@@ -6,6 +6,10 @@ ssoma_repository - repository and tree description for ssoma
 
 =head1 DESCRIPTION
 
+WARNING: this does NOT describe the scalable v2 format used
+by public-inbox.  Use of ssoma is not recommended for new
+installations due to scalability problems.
+
 ssoma uses a git repository to store each email as a git blob.
 The tree filename of the blob is based on the SHA1 hexdigest of
 the first Message-ID header.  A commit is made for each message
diff --git a/README b/README
index d2be773..de12f93 100644
--- a/README
+++ b/README
@@ -1,15 +1,13 @@
 ssoma - some sort of mail archiver
 ----------------------------------
+
+WARNING: ssoma will not be updated for public-inbox v2 repositories.
+Nowadays, public-inbox has NNTP support which makes ssoma redundant.
+
 ssoma is a git-based mail archiver and transport.  Email is injected via
 ssoma-mda(1) (MDA: mail delivery agent) on a server and may be shared
 (via git) and extracted to mbox, Maildir, or IMAP via ssoma(1).  ssoma
-exists primarily as the mechanism (not policy) for public-inbox but may
-easily be used for other projects.
-
-Readers of public-inbox instances may install ssoma to extract messages
-into their favorite mail client for reading.
-
-See http://public-inbox.org/ for more information on how ssoma is used.
+existed primarily as the mechanism (not policy) for public-inbox v1.
 
 Features
 --------
@@ -77,6 +75,9 @@ document describes it:
 
     http://ssoma.public-inbox.org/ssoma_repository.txt
 
+Again, note that this DOES NOT cover the public-inbox v2 repository
+format.
+
 Copyright
 ---------
 Copyright 2013-2016 all contributors <meta@public-inbox.org>
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-19  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19  9:50 [ssoma PATCH 0/2] add warnings about lack of v2 support Eric Wong
2018-12-19  9:50 ` [ssoma PATCH 1/2] extractor: warn about v2 repositories Eric Wong
2018-12-19  9:50 ` [ssoma PATCH 2/2] README: add warnings about the lack of v2 support Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).