Commit graph

340 commits

Author SHA1 Message Date
Andreas Kling f2fd8fc928 Everywhere: Remove LibGemini
This hasn't been maintained (or worked at all) for a long time,
and it's not a widely supported protocol, so let's drop it.
2024-06-04 09:19:39 +02:00
Andreas Kling e70d96e4e7 Everywhere: Remove a lot more things we don't need 2024-06-03 10:53:53 +02:00
Tim Ledbetter 5863ef852d Meta: Remove references to unused utilities 2024-06-03 10:53:53 +02:00
Romain Chardiny f5cacf25e1 Utilities: Add shred utility 2024-05-31 13:49:34 +01:00
Liav A 40a8b009db DynamicLoader: Add an option to list all ELF loaded dependencies
This actually allows us to re-introduce the ldd utility as a symlink to
our dynamic loader, so now ldd behaves exactly like on Linux - it will
load all dynamic dependencies for an ELF exectuable.

This has the advantage that running ldd on an ELF executable will
provide an exact preview of how the order in which the dynamic loader
loads the executable and its dependencies.
2024-05-14 15:42:42 -06:00
Liav A 56790098ea Utilities: Rename ldd => elfdeps
As a preparation to introducing ldd as a symlink to /usr/lib/Loader.so
we rename the ldd utility to be elfdeps, at its sole purpose is to list
ELF object dependencies, and not how the dynamic loader loads them.
2024-05-14 15:42:42 -06:00
Liav A 5b34b4af14 Utilities: Merge the gunzip utility with gzip
Now both /bin/zcat and /bin/gunzip are symlinks to /bin/gzip, and we
essentially running it in decompression mode through these symlinks.

This ensures we don't maintain 2 versions of code to decompress Gzipped
data anymore, and handle the use case of gzipped-streaming input only
once in the codebase.
2024-05-14 12:35:25 -06:00
Nico Weber 3a4e0c2804 LibGfx+Utilities: Add animation utility, make it write animated webps
The high-level design is that we have a static method on WebPWriter that
returns an AnimationWriter object. AnimationWriter has a virtual method
for writing individual frames. This allows streaming animations to disk,
without having to buffer up the entire animation in memory first.
The semantics of this function, add_frame(), are that data is flushed
to disk every time the function is called, so that no explicit `close()`
method is needed.

For some formats that store animation length at the start of the file,
including WebP, this means that this needs to write to a SeekableStream,
so that add_frame() can seek to the start and update the size when a
frame is written.

This design should work for GIF and APNG writing as well. We can move
AnimationWriter to a new header if we add writers for these.

Currently, `animation` can read any animated image format we can read
(apng, gif, webp) and convert it to an animated webp file.

The written animated webp file is not compressed whatsoever, so this
creates large output files at the moment.
2024-05-11 15:43:02 -04:00
Dan Klishch 7b88363490 Meta+Userland: Make LibELF a proper library on Serenity
Dynamically loaded LibC doesn't need LibELF definitions, so let's not
put them there.
2024-04-26 19:08:13 -06:00
Dan Klishch d8119c4b4a LibLocale: Statically link LibLocaleData into LibLocale 2024-04-21 13:34:04 -06:00
Shannon Booth e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00
implicitfield e91f60e0f5 CMake: Replace bespoke utility name mangling logic
Instead of manually removing the '.cpp' extension, we can simply ask
CMake to give us the file name without the last extension.
2024-02-26 13:26:47 -07:00
implicitfield 84252db976 Utilities: Add mkfs.fat
This adds a basic `mkfs.fat` utility, which can format FAT12, FAT16
and FAT32 partitions.

This does have a few limitations, namely in that FAT12 formatting is
limited to a set known floppy disk sizes, and we can only generate
512-byte sectors.
2024-02-24 15:54:52 -07:00
implicitfield f2503b2048 CMake: Allow the names of utilities to contain extensions
Previously, we would remove the "longest extension" from each file name
when parsing it as the name of a utility, which made it impossible for
the names of utilities to contain any extensions.
2024-02-24 15:54:52 -07:00
Ollrogge 37e595a96c Utilities: Add xxd utility 2024-02-18 23:56:37 +01:00
Nico Weber 5a47e71604 Utilities: Add test-jpeg-roundtrip
This creates a bitmap filled with a fixed color, then (in memory)
saves it as jpeg and loads it again, and repeats that until the
color of the bitmap no longer changes. It then reports how many
iterations that took, and what the final color was.

It does this for a couple of colors.

This is for quality assessment of the jpeg codec. Ideally, it should
converge quickly (in one iteration), and on a color not very far from
the original input color.
2024-01-14 11:35:40 +00:00
implicitfield 84b981ade7 Utilities: Add a drain utility 2023-12-08 22:05:43 +03:30
Gurkirat Singh 60640fe38d Utilities: Implement slugify using AK/Slugify 2023-10-30 10:39:59 +00:00
Lucas CHOLLET 5c7e5cc738 Ladybird: Decode images out of process
This patch brings a service to handle image decompression. With it comes
security enhancement due to the process boundary. Indeed, consequences
of a potential attack is reduced as only the decoder will crash without
perturbing the WebContent process.
It also allows us to display pages containing images that we claim to
support but still make us crash, like for not-finished-yet decoders.

As an example, we can now load https://jpegxl.info/jxl-art.html without
crashing the WebContent process.
2023-10-27 07:26:32 +02:00
Gurkirat Singh fb5353e7e2 Utilities: Remove redundant target_link_libraries 2023-10-05 15:19:19 +02:00
Tim Ledbetter cbda6e1ff4 realpath: Allow multiple path arguments to be given 2023-10-02 20:56:38 +02:00
Tim Ledbetter 71ddc33fbf find: Print hyperlinks when standard output is attached to a terminal 2023-09-07 11:52:09 -06:00
Tim Ledbetter 0a02c7a926 find: Add the -regex and -iregex options
These options match a given regular expression against the whole file
path. `-iregex` is identical to `-regex` except it is case-insensitive.
2023-08-28 11:51:14 +03:30
Poseydon42 333949894e Userland: Add glsl-compiler utility that prints parsed AST 2023-08-18 15:29:48 +02:00
Liav A 029160fd27 Utilities: Add zcat
This utility is actually a symlink to the gunzip utility.
The gunzip utility is modified to enable writing to stdout when running
through the zcat symlink, to emulate the same behavior on other OSes.

In addition to that, the gunzip utility is now required on a default
installation as it could be a vital utility under some conditions (for
example, downloading source code in a tar.gz file).
2023-08-13 10:16:03 +01:00
Liav A ccaa423372 Utilities: Add basic Package manager skeleton utility 2023-08-07 13:24:25 -06:00
Zaggy1024 66c9696687 LibGfx: Add initial ISO BMFF parsing and a utility to print file info
Currently, the `isobmff` utility will only print the media file type
info from the FileTypeBox (major brand and compatible brands), as well
as the names and sizes of top-level boxes.
2023-07-27 12:02:37 +01:00
Shannon Booth e838b6c8cc patch: Add the beginnings of a patch utility
This is still very bare bones, and there is _much_ more to still
handle. However, this implements enough functionality to parse a single
unified patch read from stdin, and apply it to a file.
2023-07-13 10:29:30 +01:00
Nico Weber c3f78d9561 pdf: Add function to render a page of a PDF to a bitmap
Use like so:

    Build/lagom/bin/pdf --render foo.png --page=50 path/to.pdf
2023-07-12 07:54:28 +01:00
Valtteri Koskivuori 2c6b156803 Userland: Teach the file utility about zip files
It now shows a short description with a file and directory counts, and
the total content size uncompressed.
2023-07-11 17:48:57 +01:00
Caoimhe f222028f79 zip: Use the helpers in ZipOutputStream for adding files 2023-07-08 13:14:50 +01:00
kleines Filmröllchen d7a2b5e65b markdown-check: Allow generating a manpage link graph
Using the cross-page links, we can generate a directed graph showing the
topology of which pages refer to other pages. This is not just for fun:
the links show how often a page is linked (since links are not
deduplicated on purpose), which pairs of pages only have links in one
direction (where a link in the other direction may be useful), which
groups of closely-interlinked pages exist, and which pages have few or
no links to other pages.

The EXTRA_MARKDOWN_CHECK_ARGS argument to the check-markdown script can
be used to inject the -g flag for generating the graph on all manpages.
2023-07-05 16:15:42 +01:00
Nico Weber efad31dac1 Utilities: Add a pdf utility
This utility will learn tricks such as extracting images from PDFs and
dumping tables from PDFs so that we can create code from specs.

It also allows testing LibPDF things in lagom, and allows testing
reading large amounts of PDFs using a shell script.
2023-07-04 06:50:15 +02:00
Cameron Youell d9ff37e1b1 Utilities: Make mktemp follow the spec directory path resolution
Previously an input like this:

mktemp -d /tmp/dirtest_-XXXXX

Would result in an error when it should have created a temp directory
2023-07-02 11:19:10 -06:00
Jelle Raaijmakers 56da2c5db6 aconv: Remove usage of ancient Core::DeprecatedFile
That'll teach me for merging without waiting for CI :^)
2023-06-22 21:53:00 +02:00
kleines Filmröllchen 57b3858fbc Utilities: Add aconv for converting between audio formats
The intention for this utility is to eventually become a general-purpose
multimedia conversion tool like ffmpeg (except probably not with as many
supported formats, stream mappings and filters). For now, we can not
write any video format so the added complexity is not necessary at the
moment.
2023-06-22 21:45:54 +02:00
kleines Filmröllchen 2e4bb2941d Utilities: Add pixelflut, a Pixelflut protocol client
For the meme and for GPN.
2023-06-20 00:22:03 +02:00
Ben Wiederhake f20d04726a LibFileSystem+Everything: Remove resolve_executable_from_environment 2023-06-06 23:46:36 +02:00
Andreas Kling ad6027433d headless-browser: Print a diff when a test failure occurs
This will make it a lot easier to understand what went wrong, especially
when the failure occurs on CI but not at home.

And of course, use LibDiff to generate the diff! :^)
2023-05-28 22:03:57 +02:00
Tim Schumacher 0f2b6345c6 test-fuzz: Add all the missing fuzzers 2023-05-23 06:11:33 +02:00
Tim Schumacher faa08ef1a1 test-fuzz: Don't include all fuzzers into the same .cpp file
Instead, use the approach from BuggieBox to compile in the .cpp files
separately.
2023-05-23 06:11:33 +02:00
Ben Wiederhake 6055eed5a5 xml: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake 9e755ccfef wasm: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake 8afd09b423 shot: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake 6e08f860f8 open: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake c2d26ec541 usermod: Prefer FileSystem over DeprecatedFile 2023-05-19 21:12:15 +02:00
Ben Wiederhake 6c9383ce89 install: Prefer FileSystem over DeprecatedFile 2023-05-19 21:12:15 +02:00
Ben Wiederhake 317cdc32ad readlink: Prefer FileSystem::readlink over DeprecatedFile 2023-05-15 06:50:43 +02:00
Fabian Dellwing 639aee037f Userland+Meta: Add new helper program for network settings
This little program allows us to take the NetworkSettings app away
from being an elevated GUI app.

It receives a JsonObject on STDIN and writes it to the global
Network configuration file.

If the write was successfull it will apply the changes.
2023-05-13 17:59:37 -06:00
Ben Wiederhake 77f021f5f1 pledge: Prefer FileSystem over DeprecatedFile 2023-05-13 17:06:42 +02:00