redox-os issueshttps://gitlab.redox-os.org/groups/redox-os/-/issues2024-03-04T07:35:54Zhttps://gitlab.redox-os.org/redox-os/redoxfs/-/issues/46"canonicalize" duplicates functionality and misreads ":" character2024-03-04T07:35:54ZRon Williams"canonicalize" duplicates functionality and misreads ":" characterThe `canonicalize` function in `scheme.rs` duplicates part of the functionality in relibc's `canonicalize`. Similar functionality is also needed in `contain`, so we should probably either expose it in relibc or make it available e.g. in ...The `canonicalize` function in `scheme.rs` duplicates part of the functionality in relibc's `canonicalize`. Similar functionality is also needed in `contain`, so we should probably either expose it in relibc or make it available e.g. in libredox. It contains a bug that is common in those implementations, it assumes that everything before a ':' is a scheme. It should check that the scheme name is legal, e.g. does not contain '/'. It would also be a good place for implementing a rule as to whether ':' is allowed in filenames or not.https://gitlab.redox-os.org/redox-os/redoxfs/-/issues/45Filtering of ':' character in random code location2024-03-04T07:36:06ZRon WilliamsFiltering of ':' character in random code locationIn `transaction.rs`, function `create_node` and function `link_node`, the name of the file is checked for ':' and an error is returned if it is present.
This is not an appropriate place to enforce such a rule. If there is going to be a p...In `transaction.rs`, function `create_node` and function `link_node`, the name of the file is checked for ':' and an error is returned if it is present.
This is not an appropriate place to enforce such a rule. If there is going to be a policy of rejecting certain characters such as ':', it should be done at the earliest opportunity.
As well, there should be a function e.g. `validate_name`, that checks for illegal filenames, as it's easy to imagine other rules we might want to enforce, or that we might want to remove the "no ':'" rule.https://gitlab.redox-os.org/redox-os/relibc/-/issues/186is_traceme performance issue2023-12-23T10:29:53ZRon Williamsis_traceme performance issueis_traceme is being called very frequently, and each call calls `File::open`, creating a performance problem.
Someone should determine if this is correct behavior, it seems like there should be additional guards around this.is_traceme is being called very frequently, and each call calls `File::open`, creating a performance problem.
Someone should determine if this is correct behavior, it seems like there should be additional guards around this.https://gitlab.redox-os.org/redox-os/cookbook/-/issues/193Implement the "recipe library" file2024-01-06T00:40:58ZRon WilliamsImplement the "recipe library" fileAs an addition to the current build system, it is proposed to add "recipe library" files. The idea is to support recipe scripts inside of other `toml` files, like a library of recipes.
To reduce the size of the recipe library file, each...As an addition to the current build system, it is proposed to add "recipe library" files. The idea is to support recipe scripts inside of other `toml` files, like a library of recipes.
To reduce the size of the recipe library file, each recipe category or build system type could have its own recipe library file.
This would allow us to support many programs without having a multitude of recipe folders for developers that are not using them. It would also improve recipe maintenance and reorganization.
### Reasons to use recipe libraries
- Less prone to terminal typos
- Avoid conflicts after recipe renames (as the `recipe.toml` file is not inside the recipe folder, it can be easily removed or moved to its new name)
- More quick to access in the text editor
### Syntax
The fields of each recipe will follow the syntax of the `recipe.toml` file, so the existing serialization definitions can be used. Each major section will include a `[category-name]`, followed by `recipe-name = recipe`.
e.g. a file `wip.toml` would look something like:
```
[wip] # The category folder will be created with the specified name
exa = {
source = { git = "https://github.com/ogham/exa" },
build = { template = "cargo" }
}
opus = {
source = {
tar = "https://downloads.xiph.org/releases/opus/opus-1.4.tar.gz"
},
build = { template = "configure" }
}
...
```
If a recipe is named in the filesystem config, `cook` would first check for a recipe folder (to build recipes using the old format). If none existed, `cook` would scan a set of recipe library files to find the recipe.
### New Category Organization
This is how categories would look like with a recipe library implementation:
- `category-build-system.toml`
Example:
- `dev-cargo.toml` - Cargo-based recipes of the `dev` category.
- `dev-configure.toml` - GNU Autotools-based recipes of the `dev` category.
- `dev-custom.toml` - Recipes of the `dev` category with a custom script.https://gitlab.redox-os.org/redox-os/termion/-/issues/197`IntoRawMode` only works with stdout2024-01-06T10:33:09ZDenis Varlakov`IntoRawMode` only works with stdoutAlthough the `IntoRawMode` trait looks like it supports any `writer: impl Writer`, in fact it only works with stdout. The issue comes down to using `sys::unix::{get_terminal_attr, ..}` that have `libc::STDOUT_FILENO` hardcoded into them....Although the `IntoRawMode` trait looks like it supports any `writer: impl Writer`, in fact it only works with stdout. The issue comes down to using `sys::unix::{get_terminal_attr, ..}` that have `libc::STDOUT_FILENO` hardcoded into them.
A solution would be update `RawTerminal` and `IntoRawMode` so it would be implemented for all `impl Writer + AsRawFd`. The raw fd needs to be retrieved from the writer and given to subsequent functions. I.e. something like that:
```rust
pub trait IntoRawMode: Write + AsRawFd + Sized {
/// Switch to raw mode.
///
/// Raw mode means that stdin won't be printed (it will instead have to be written manually by
/// the program). Furthermore, the input isn't canonicalised or buffered (that is, you can
/// read from stdin one byte of a time). The output is neither modified in any way.
fn into_raw_mode(self) -> io::Result<RawTerminal<Self>>;
}
impl<W: Write + AsRawFd> IntoRawMode for W {
fn into_raw_mode(self) -> io::Result<RawTerminal<W>> {
let fd = self.as_raw_fd();
let mut ios = get_terminal_attr(fd)?;
let prev_ios = ios;
raw_terminal_attr(&mut ios);
set_terminal_attr(fd, &ios)?;
Ok(RawTerminal {
prev_ios: prev_ios,
output: self,
})
}
}
```
Unfortunately, that would require a major bump in library version as it changes API. As a workaround until `v3` it's possible to provide a second module `raw2` that would properly handle writers that are not stdout, for example.
Let me know if you're interested in contribution!https://gitlab.redox-os.org/redox-os/cookbook/-/issues/192Implement the recipe category selection on "make distclean" and "make clean"2024-01-13T08:14:52ZRibbonImplement the recipe category selection on "make distclean" and "make clean"Add a way to select one recipe category to cleanup instead of all sources and binaries of the build system, for example:
- `make distclean wip` - Only clean the `wip` folder at `cookbook/recipes`
This feature is important to allow a gr...Add a way to select one recipe category to cleanup instead of all sources and binaries of the build system, for example:
- `make distclean wip` - Only clean the `wip` folder at `cookbook/recipes`
This feature is important to allow a granular storage space saving mechanism.https://gitlab.redox-os.org/redox-os/redox/-/issues/1419Implement an out-of-memory killer daemon2023-12-02T16:44:20ZRibbonImplement an out-of-memory killer daemonOn Linux you have two types of OOM killers, kernel and user-space, as the kernel OOM killer can be slow to act, most Linux distributions tend to use an user-space OOM killer, in most cases the systemd-oom daemon.
Our OOM killer daemon c...On Linux you have two types of OOM killers, kernel and user-space, as the kernel OOM killer can be slow to act, most Linux distributions tend to use an user-space OOM killer, in most cases the systemd-oom daemon.
Our OOM killer daemon could be called `oomkd` or `oomd`.
### References
- [system-oom](https://www.man7.org/linux/man-pages/man8/systemd-oomd.8.html) - Used in most Linux distributions.
- [earlyoom](https://github.com/rfjakob/earlyoom) - Proposed for Fedora.
- [bustd](https://github.com/vrmiguel/bustd) - An user-space OOM killer written in Rust.https://gitlab.redox-os.org/redox-os/cookbook/-/issues/191Implement the meta-package2023-12-04T18:53:40ZRibbonImplement the meta-packageA meta-package is a zero-config recipe or package that build or install other recipes or packages, like Debian.
The source-based method require a new template to allow the lack of the `script =` field in the `custom` template, it can be...A meta-package is a zero-config recipe or package that build or install other recipes or packages, like Debian.
The source-based method require a new template to allow the lack of the `script =` field in the `custom` template, it can be called `meta`.
### Examples
- Source-based meta-package - Trigger the building of other recipes and don't build itself.
```toml
[build]
template = "meta"
dependencies = [
"recipe1",
"recipe2",
]
```
- Binary-based meta-package - A section for the meta-package will be added inside of the filesystem configuration with the packages included, the installer will download them from the CI server and install on the filesystem.
```toml
[meta.package-name]
recipe1 = "binary"
recipe2 = "binary"
```https://gitlab.redox-os.org/redox-os/cookbook/-/issues/190Implement the "zip" and "any" data types2023-12-04T18:46:16ZRibbonImplement the "zip" and "any" data typesCurrently the Cookbook support the `tar` and `git` data types in the `[source]` section.
### Proposal
- The `zip` data type will download and extract ZIP archives (could use the `unzip` tool), it's needed by some game data files.
- The...Currently the Cookbook support the `tar` and `git` data types in the `[source]` section.
### Proposal
- The `zip` data type will download and extract ZIP archives (could use the `unzip` tool), it's needed by some game data files.
- The `any` data type will download files of any type and put on the `source` directory, it's needed by programs written in bytecode-based languages like Java.
### Examples
- `any`
```toml
[source]
any = "your-file-link"
[build]
template = "custom"
script = """
insert your script here
"""
```
- `zip`
```toml
[source]
zip = "your-zip-link"
[build]
template = "custom"
script = """
insert your script here
"""
```https://gitlab.redox-os.org/redox-os/redox/-/issues/1418Multiseat support2024-01-12T12:57:21ZRibbonMultiseat supportA [multiseat](https://en.wikipedia.org/wiki/Multiseat_configuration) device is a computer with multiple ports for multiple peripherals linked to independent users of the operating system.
This issue will cover the implementation of this...A [multiseat](https://en.wikipedia.org/wiki/Multiseat_configuration) device is a computer with multiple ports for multiple peripherals linked to independent users of the operating system.
This issue will cover the implementation of this use case.
### Conditions
- Each user files, processes and devices must be isolated from other users.
- An user can't read the framebuffer of other user.
- An user can't use a wrong device.
### Proposal
(Needs more brainstorming)
- Each "seat" is a workspace for a monitor and HID devices connected to a USB hub.
- Each monitor will have a TTY with a login screen (start `orblogin` if available).
- Follow the USB hub ports position to avoid wrong device allocation.
- Use the TTY number of the monitor to assign devices.https://gitlab.redox-os.org/redox-os/kernel/-/issues/143kernel hang on ls command with pipe2023-12-13T18:39:56ZRon Williamskernel hang on ls command with pipe`ls -C /bin | less` seems to hang the kernel some times. It was seen twice in a row on Orbterm.`ls -C /bin | less` seems to hang the kernel some times. It was seen twice in a row on Orbterm.https://gitlab.redox-os.org/redox-os/redox/-/issues/1417Implement the "make prefix compiler" command2024-01-13T07:07:30ZRibbonImplement the "make prefix compiler" commandThe [proposal](https://gitlab.redox-os.org/redox-os/redox/-/issues/1389) to move the rustc source fetch to the `make prefix` command is redundant because it's called with `make all`, you would clone the rustc sources later.
My solution ...The [proposal](https://gitlab.redox-os.org/redox-os/redox/-/issues/1389) to move the rustc source fetch to the `make prefix` command is redundant because it's called with `make all`, you would clone the rustc sources later.
My solution is to add a specific command to fetch and build from sources (the CI server need this), see the current behavior:
- `bootstrap.sh` - rustc is a submodule, thus it clone the sources on each build system copy.
- `make prefix` - It download the toolchain binaries from the CI server and build relibc.
My proposed behavior:
- `make prefix compiler` - Active the `PREFIX_BINARY=0`, download the rustc/GCC sources and build the toolchain (`bootstrap.sh` don't fetch the rustc sources anymore).https://gitlab.redox-os.org/redox-os/kernel/-/issues/142Kernel as an user-space process2023-12-14T13:53:34ZRibbonKernel as an user-space processAllow the kernel to run in user-space to improve debugging, like [NetBSD](https://en.wikipedia.org/wiki/Rump_kernel) and [DragonFlyBSD](https://www.dragonflybsd.org/docs/handbook/vkernel/) does.Allow the kernel to run in user-space to improve debugging, like [NetBSD](https://en.wikipedia.org/wiki/Rump_kernel) and [DragonFlyBSD](https://www.dragonflybsd.org/docs/handbook/vkernel/) does.https://gitlab.redox-os.org/redox-os/kernel/-/issues/141Pipe events don't work when changing namespaces2023-12-13T18:39:56ZRon WilliamsPipe events don't work when changing namespacesIf you create a pipe, then call mkns and setrens, then register for events on the pipe, when the writer writes to the pipe, the scheme id used to look up the event queue will not match the scheme id in the file description.If you create a pipe, then call mkns and setrens, then register for events on the pipe, when the writer writes to the pipe, the scheme id used to look up the event queue will not match the scheme id in the file description.https://gitlab.redox-os.org/redox-os/userutils/-/issues/38Unexpected error when deleting user2023-11-26T11:16:39ZCuriouscurious@curious.hostUnexpected error when deleting userAs shown in the screenshot, `userdel -r` can't delete the homedir which is not empty, hence the user delete will fail.
And we can't create a user with same name of the deleted one, because the group is not deleted together.
![image.png...As shown in the screenshot, `userdel -r` can't delete the homedir which is not empty, hence the user delete will fail.
And we can't create a user with same name of the deleted one, because the group is not deleted together.
![image.png](/uploads/83629d44f367fc986b6fb4be49856791/image.png)https://gitlab.redox-os.org/redox-os/bootloader/-/issues/7UEFI bootloader not respecting spec when calling `ExitBootServices()`2023-11-18T01:54:50ZArthur BrainvilleUEFI bootloader not respecting spec when calling `ExitBootServices()`Hello, it is my first time here!
I am encountering the following issue trying to boot Redox in UEFI mode on some laptop: When calling `ExitBootServices` from the UEFI system map, this function *may* return an InvalidParameter error. Wh...Hello, it is my first time here!
I am encountering the following issue trying to boot Redox in UEFI mode on some laptop: When calling `ExitBootServices` from the UEFI system map, this function *may* return an InvalidParameter error. When this happens, currently, the Redox bootloader simply panics away.
However, this is not supposed to be a fatal error. See the relevant specification which is located here: https://uefi.org/specs/UEFI/2.9_A/07_Services_Boot_Services.html?highlight=exitbootservices#efi-boot-services-exitbootservices
As far as I can tell, what should happen when this error code is returned is reloading the memory map. (obtaining a new handle for it). And then calling that function again so the firmware actually relinquishes the memory allocated for boot time services.
I have only gotten the bad behavior on a laptop from 2012. Not sure how many dragons lie in the "early days of UEFI" in the consumer market... :rofl:
One interesting thing is I think allocating memory via the UEFI facilities actually invalidates the memory map. (I have not double-checked that against the specification, but there's [a random comment about it in some Linux code](https://github.com/torvalds/linux/blob/3ca112b71f35dd5d99fc4571a56b5fc6f0c15814/drivers/firmware/efi/libstub/efi-stub-helper.c#L407).
With the current design of the `MemoryMapIter`, its construction does create a Vec, call `GetMemoryMap`, then resize the vec, and then return the struct. Rust is still a bit new to me (coming from C++... But I am pretty sure truncating the Vec should reallocate an array of the exact size for the data and move it there?)
Also, I have not yet familiarized myself with where this `Vec` implementation actually comes from (I see we have a crate somewhere that is a global UEFI allocator? That a thread to pull on).
So far, I have played with the code a bit, and tried (in case of error) to implement the retry behavior, with no allocations between `GetMemoryMap` and `ExitBootServices` once the error occurs.
The problem is that then it hangs the bootloader on that specific machine inside the 2nd call to `ExitBootServices` So that was not very successful. :sweat_smile:
The next thing I may try is to attempt rewriting the memory map so it does not need to do the realoc in the first place... To see if that unstuck me.
In all cases, at the very least the error from that call should be handled gracefully (at least one retry, and not just expecting it away). I may try to propose that patch soon. So that call actually follows what is stated in the UEFI specification.https://gitlab.redox-os.org/redox-os/kernel/-/issues/140Add a system call to delete a namespace2024-03-18T09:58:09ZRon WilliamsAdd a system call to delete a namespaceThere does not seem to be a system call to remove a namespace after use. Contain creates namespaces and should delete them when when the user session completes.There does not seem to be a system call to remove a namespace after use. Contain creates namespaces and should delete them when when the user session completes.https://gitlab.redox-os.org/redox-os/ion/-/issues/1032unexplained attempt to open file2023-11-15T12:30:19ZRon Williamsunexplained attempt to open fileRunning `ls foo`, where foo does not exist, seems to result in an attempt to open a file named `ls foo`. I'm not sure if this is an attempt to execute or just an attempt to test the existence of the file `ls foo`. Either way, it doesn't ...Running `ls foo`, where foo does not exist, seems to result in an attempt to open a file named `ls foo`. I'm not sure if this is an attempt to execute or just an attempt to test the existence of the file `ls foo`. Either way, it doesn't seem like the right thing to do.https://gitlab.redox-os.org/redox-os/website/-/issues/195(Goal) Up-to-date translations2024-03-01T19:45:05ZRibbon(Goal) Up-to-date translationsThe official language of the website is English, the goal is to make all outdated translations in pair with the English pages, this issue will cover the progress.
Each translator will comment if the translation is in pair with English (...The official language of the website is English, the goal is to make all outdated translations in pair with the English pages, this issue will cover the progress.
Each translator will comment if the translation is in pair with English (up-to-date) and the language box will be marked.
- [x] Portuguese
- [ ] Mandarin
- [ ] Spanish
- [ ] Russian
- [ ] French
- [ ] German
- [ ] Italian
- [ ] Turkish
- [ ] Swedish
- [ ] Dutch
- [ ] Danish
- [ ] Norwegian
- [ ] Czech
- [ ] Esperanto
- [ ] Japanese
- [ ] Korean
- [ ] Hungarian
- [ ] Polish
- [ ] Ukrainian
- [ ] Arabichttps://gitlab.redox-os.org/redox-os/redox/-/issues/1416Add an option to ignore recipe errors2024-01-13T07:04:44ZRibbonAdd an option to ignore recipe errorsThis option will ignore a recipe error and build the next recipe of the Cookbook configuration (`make all` and `make rebuild` commands).
Currently the CI server only update the packages if all recipes compiled successfully, it's time co...This option will ignore a recipe error and build the next recipe of the Cookbook configuration (`make all` and `make rebuild` commands).
Currently the CI server only update the packages if all recipes compiled successfully, it's time consuming and could delay important updates on recipes.
This is equivalent to "delta updates" but for CI, only the successfully compiled programs will be updated on the package repository.
It could be implemented on the `.config` file and the Cookbook configuration.