Date | Commit message (Collapse) |
|
cgit (and most other CGI executables) is not typically installed
for use via $PATH, so we'll need to support absolute paths to
run it.
|
|
Reads to git-http-backend(1) could fail or EOF prematurely,
so we must be ready for that case.
Furthermore, cgit (and possibly other CGI) uses LF instead
of CRLF, so support those programs, too.
|
|
This will be useful for other CGI wrappers we make.
This also fixes a bug with some PSGI servers which did not
present a real IO::Handle in the psgi.input env field.
|
|
We can save admins the trouble of declaring [coderepo "..."]
sections in the public-inbox config by parsing the cgitrc
directly.
Macro expansion (e.g. $HTTP_HOST) expansion is not supported,
yet; but may be in the future.
|
|
We'll be spawning cgit and git-diff, which can take gigantic
amounts of CPU time and/or heap given the right (ermm... wrong)
input. Limit the damage that large/expensive diffs can cause.
|
|
No need to scan the entire string, but prefer to match git
behavior. This might be faster if/when Perl can create
substrings efficiently using CoW.
Fix a 80-column violation while we're at it.
|
|
Eventually, we'll have special displays for various git objects
(commit, tree, tag). But for now, we'll just use git-show
to spew whatever comes from git.
|
|
This will be useful for extracting titles/subjects from
commit objects when displaying commits.
|
|
This will be useful for reproducibility when mirroring
coderepos and generating diffs.
|
|
Not entirely sure what is causing this, but it appears to
be causing infinite loops when attempting to display certain
blobs.
Fortunately, the fair scheduling of public-inbox-httpd prevented
this from becoming a real problem aside from increasing CPU
usage.
|
|
There's no reason for us to have git-config(1) warn users when a
config file is entirely missing.
|
|
Newly-cloned epochs need to be in alternates file of
all.git for the web and NNTP interfaces to work. So
allow invocations of "public-inbox-index" to idempotently
ensure the epoch is visible from the all.git repo.
|
|
We'll be using this sub to fill $GIT_DIR/objects/info/alternates
if somebody uses clone --mirror, too
|
|
All of our internal epoch rollover calculations are done using
the estimated unpacked (and uncompressed) size of the repo. The
importer instance needs to check that unpacked size before
selecting an epoch when an epoch already has packed data.
This bug did not impact the initial mass imports since we only
initialize the Import instance once-per-epoch and did not need
to take existing epochs into account.
Tested manually with -mda on a local clone of LKML
Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
CSS specified by the BOFH must never take precedence over
what a user sets in userContent.css.
|
|
The sample userContent.css needs a higher priority than what
the BOFH specifies. In other words, user preference must
ALWAYS take precedence.
Reported-by: Dmitry Alexandrov <321942@gmail.com>
cf. https://public-inbox.org/meta/87mumn4kx8.fsf@gmail.com/
|
|
We were relying on Danga::Socket using the "bytes" pragma,
previously. Nowadays, the "bytes" pragma is not recommended in
general, but bytes::length remains acceptable for getting the
byte-size of a scalar.
|
|
Fixes: 285b9b4d7de53b0d ("examples/newswww.psgi: demonstrate standalone NewsWWW usage")
|
|
WwwStream started depending on the WWW::style method
for configurable CSS, so mock ::style so the benchmark
runs properly.
Fixes: f026dbdd392c9dd5 ('www: admin-configurable CSS via "publicinbox.css"')
|
|
No point in making noise about something that isn't used.
|
|
Plack::Builder allows "mounting" on with hostnames as well as
path names to enable virtual hosting. This example demonstrates
how port 80/443 for "news.example.com" can redirect browser
requests when somebody attempts to use a "nntp://" URL and
the software assumes "http://"
|
|
Unused since commit b8c41362f2a5c8fcc6b1846a79c72bfa77565297
("nntp: simplify the long_response API")
|
|
Don't bother assigning to $_[1]; just let Danga::Socket
do its thing since $_[1] should be out-of-scope soon.
|
|
Users on Perl 5.14+ are common, so we can try the bundled Socket
(not "Socket6") module before attempting Socket6 for IPv6.
|
|
We need to keep Unix-socket-only httpd instances working
without Socket6. This fixes t/httpd-unix.t with Socket6
uninstalled.
|
|
* origin/help-color:
wwwtext: inline sample CSS and use highlight
hlmod: support "```$LANG" blocks in text
hlmod: do_hl* performs src_escape immediately
hlmod: make into a singleton
hlmod: hoist out do_hl_lang sub
viewvcs: cleanup utf8 handling
|
|
This can help admins diagnose problems with SolverGit, since
qspawn logs the failed "git apply" command-line in stderr.
(or it can waste admins' time because sometimes there's crap
mail clients which mangle patches)
|
|
The git-users mailing list is on Google Groups with obfuscated
addresses and censored archives. We should allow users to
import them soon, as obfuscated/censored archives are better
than not having archives at all when Google decides to shut down
yet-another-service.
There's also some mangling that (most) instances of Mailman do
(e.g. cgit), but being able to follow such groups over NNTP
and use our search functionality is still useful and better
than what typical Mailman installations provide.
|
|
For user documentation regarding CSS; showing users the sample
CSS with comments is probably more helpful than having
standalone documentation on CSS classes.
|
|
This is compatible with Markdown; but we still keep the WYSIWYG
nature of plain-text with this. This is only intended for use
with our documentation. Enabling any type of Markdown support
for emails can lead to incompatibilities or interopability
problems with alternative implementations.
|
|
We want to be able to take advantage of this in other modules
|
|
It turns out there's no point in having multiple instances of
this or having to worry about destruction or destruction
ordering.
This will make it easier to reuse the one instance we have
across different modules.
|
|
We'll want to use to support highlighting syntax used by
Markdown and possibly other markup languages (while retaining
the raw plain-text layout and formatting).
|
|
Favor in-place utf8::decode since it's a bit faster without
method dispatch overhead; and don't care about validity just
yet.
HlMod->do_hl itself should return "utf8" strings, since other
parts of our code can use it, so it's not the job of ViewVCS to
post-process HlMod output.
|
|
I'd like to move https://public-inbox.org/git/ to v2; but
cronjobs using "git fetch" to following should not break.
|
|
Leaving out parentheses caused transitions to state="del" or
state="add" to be misidentified.
cf. https://public-inbox.org/meta/20190204105454.GG10587@szeder.dev/
Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
|
|
This is the fallback for the normal WWW endpoint.
Adding this to the top-level seems to be alright, since lynx and
w3m both understand nntp://<HOSTNAME>/<Message-ID> anyways.
If newsgroup and inbox names conflict, then consider it the
fault of the original sender.
Since NewsWWW is intended to support buggy linkifiers in mail clients,
they can interpret nntp:// URLs as http://<HOSTNAME>/<Message-ID>
Inbox ordering from the config file is preserved since
commit cfa8ff7c256e20f3240aed5f98d155c019788e3b
("config: each_inbox iteration preserves config order"),
so admins can rely on that to configure how scanning
works.
Requested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
cf. https://public-inbox.org/meta/20190107190719.GE9442@pure.paranoia.local/
nntp://news.public-inbox.org/20190107190719.GE9442@pure.paranoia.local
|
|
This is best-effort, but works well-enough in practice for
projects which use shell-friendly filenames as well as the
long path names for some Linux kernel selftests.
|
|
For URLs we generate, we need to escape '&' in query parameters
for correctness.
|
|
Only to be pedantic...
|
|
Sometimes users will write "http://example.com" without the
trailing slash, which every browser and tool I've tested seems
to understand.
|
|
Perl "split" can capture and group in the regexp itself,
so rely on that to shorten our code.
Comparing the /T/ HTML output of a thread from hell (on LKML with
1356 messages) reveals no difference in the rendered result.
Only the HTML source differs in newline placement before/after
the closing </span>
This allows a minor speedup on my X32 Thinkpad @ 1.6GHz with
the aforementioned LKML thread from hell:
before: 3.67s
after: 3.55s
|
|
We use absolute URLs in the Atom feeds (to ease
syndication/mirroring), so hunk headers need to point to the
solver URLs.
|
|
diffstat <-> ^diff anchors work within the same attachment or
message while in HTML views which display multiple messages.
|
|
This can be helpful for reviewing larger patches which span
across several files on the permalink (/$MESSAGE_ID/) HTML
page.
More work will be needed to get this working for the /T/ and /t/
pages which show multiple emails, as the filename-based anchors
will conflict at the moment.
|
|
We'll use HTML attributes + anchor links to link to filenames
in coming commits.
|
|
* origin/purge:
implement public-inbox-purge tool
v2writable: read epoch on purge
v2writable: cleanup processes when done
v2writable: purge ignores non-existent git epoch directories
v2writable: ->purge returns undef on no-op
import: purge: reap fast-export process
hoist out resolve_repo_dir from -index
|
|
|
|
I hate it, but it's necessary to support some mirrors.
|
|
I've relied on this feature to keep the VPS behind
https://public-inbox.org/git/ from OOM-ing since 2016,
so document it to ensure others can make use of low-end
servers like I do.
More limiters may become configurable for viewvcs and
solver functionality (or we continue using the default
one).
|