For some reason the banner had hardcoded Arial font. Drop so that we
inherit our global Ubuntu font set on the <body>.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
query.py and web.py were moved from the project root and http/ into the
elixir/ package directory, but the find_program() calls in
TestEnvironment.pm were not updated to follow.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
subprocess.run() has been available since Python 3.5 (EOL 2017).
The hasattr() guard and check_output() fallback are dead code.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
\d and \w in non-raw strings are invalid escape sequences that
generate SyntaxWarning in Python 3.12+ and will become SyntaxError in
a future version. Use rb'...' / r'...' to silence the warning and
future-proof the patterns.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
IndexResource and IncompleteURLRedirectResource handlers opened a
BerkeleyDB query handle but never called query.close(), leaking file
descriptors on every redirect request.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
cur.get() returns None when no key >= the prefix exists (empty DB or
prefix past the last key). Unpacking None raised TypeError. Guard
against it by checking the result before unpacking.
Also, "while i <= 10" collected up to 11 results; changed to "i < 10"
to return at most 10 as intended.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
We used the ADD_ISSUE_LINK constant variable URL from two places. At
one, we forgot appending `?body=`. Add it by calling into the same
function that builds the URL once. Drop the constant URL now that it is
consumed from a single place.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
The loop variable "path" shadowed the function parameter of the same
name.
After populating the cache, line 103 compared the last iterated path
against the cache instead of the requested path, causing file_exists()
to incorrectly return True on the first call for any given version.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
We were missing query.get_latest_tag(rc=) argument. Add it. Don't make
it a default, each caller must decide explicitely if they want RCs or
not.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
When rc=True the reversed() iterator is non-subscriptable, breaking the
sorted_tags[-1] fallback path; wrap it in list() to make it indexable.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
glibc has a file named `=__ify` at root or in scripts/ inbetween
tags glibc-1.09 and glibc-2.1.91.
We have no specific reason to refuse equal signs so add it to the
regex. Tested locally on URL: /glibc/glibc-1.09/source/=__ify
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
We support URLs like "/linux/latest/source" that redirect to the latest
tagged version. But this excludes release candidates. Add a "latest-rc"
that takes RCs into account.
Requested by Luca.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
FD.io's Vector Packet Processor (VPP) is a fast, scalable layer 2-4
multi-platform network stack. It runs in Linux Userspace on multiple
architectures including x86, ARM, and Power architectures.
Signed-off-by: Nicolas PLANEL <nplanel@cisco.com>
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
VPP will need this.
Signed-off-by: Nicolas PLANEL <nplanel@cisco.com>
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
"Identifier not used" is weird, replace it by "unknown identifier" and
give the search identifier name in the header.
Also improve the autocomplete comment. Make it human-friendly and
explain why people got autocompleted to a symbol that does not exist.
Also, only show it if the symbol actually exists. That way we only
tell "maybe autocomplete lead you here" only in cases where
autocomplete can actually lead you here.
To test this feature:
- search for any random symbol, you'll see "Unknown identifier '...'"
- search for a symbol that exists in another version as the selected
one. For example __NR_epoll_pwait2 appeared in musl v1.2.5. You'll
see the same header message plus a comment about how the symbol
exists in another version.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
If we press enter without any search value, we get directed to
/$PROJECT/$VERSION/A/ident/ which is a "400 Bad Request".
As the search input is selected by default, this is any enter press
where the focus hasn't changed.
`required` documentation:
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/required
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
OpenSBI uses `.mk` files. The tokenizer does not get ran on files
without a family (sad). Adding this means we index references
inside .mk files, eg:
# opensbi/lib/utils/i2c/objects.mk
libsbiutils-objs-$(CONFIG_I2C) += i2c/i2c.o
Also, refactor the getFileFamily():
- All usage of name/ext do a .lower() on them, move it to the top.
- Use `x == "A"` checks rather than `x in ["A"]`.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
We had an hardcoded mobile banner that was nice looking but couldn't
deal with all the content for the various banners we want to display.
Also, it was a separate element to the desktop one. Unify them as a
single element that adapts (as it should) to desktop or mobile
viewports.