Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • fabiao/cookbook
  • redox-os/cookbook
  • stratact/cookbook
  • carrot93/cookbook
  • microcolonel/cookbook
  • feliwir/cookbook
  • xTibor/cookbook
  • jD91mZM2/cookbook
  • mpajkowski/cookbook
  • rw_van/cookbook
  • athei/cookbook
  • kblobr/cookbook
  • VitalyAnkh/cookbook
  • sajattack/cookbook
  • sainath14/cookbook
  • ackxolotl/cookbook
  • AdminXVII/cookbook
  • coolreader18/cookbook
  • deepaksirone/cookbook
  • smckay/cookbook
  • 4lDO2/cookbook
  • tomasritter/cookbook
  • alfredoyang/cookbook
  • samuela/cookbook
  • andrewdavidmackenzie/cookbook
  • uuuvn/cookbook
  • josh_williams/cookbook
  • bjorn3/cookbook
  • ids1024/cookbook
  • Chocimier/cookbook
  • bpisch/cookbook
  • willnode/cookbook
  • grnmeira/cookbook
  • andrey.turkin/cookbook
  • cameronbraid/cookbook
  • kamirr/cookbook
  • freewilll/cookbook
  • kivimango/cookbook
  • rukai/cookbook
  • mattmadeofpasta/cookbook
  • jordan_mccallum/cookbook
  • dahc/cookbook
  • Forest0923/cookbook
  • LLeny/cookbook
  • doriancodes/cookbook
  • ashton/cookbook
  • gmacd/cookbook
  • mojo/cookbook
  • wt/cookbook
  • red15/cookbook
  • hasheddan/cookbook
  • dimymark/cookbook
  • andypython/cookbook
  • enygmator/cookbook
  • Ivan/cookbook
  • argslc/cookbook
  • adi-g15/cookbook
  • tfinnegan937/cookbook
  • raffaeleragni/cookbook
  • Lekkit/cookbook
  • bitstr0m/cookbook
  • josh/cookbook
  • zhaozhao/cookbook
  • blueskyson/cookbook
  • Xunjin/cookbook
  • StaringAtEditor/cookbook
  • monk_programmer/cookbook
  • DimitarGj/cookbook
  • njskalski/cookbook
69 results
Show changes
Commits on Source (1621)
Showing with 2720 additions and 1293 deletions
...@@ -9,3 +9,10 @@ rustflags = [] ...@@ -9,3 +9,10 @@ rustflags = []
[target.x86_64-unknown-redox] [target.x86_64-unknown-redox]
linker = "x86_64-unknown-redox-gcc" linker = "x86_64-unknown-redox-gcc"
rustflags = [] rustflags = []
[target.riscv64gc-unknown-redox]
linker = "riscv64-unknown-redox-gcc"
rustflags = []
[env]
CFLAGS_riscv64gc_unknown_redox="-march=rv64gc -mabi=lp64d"
build /build
repo /repo
source source
source.tmp source.tmp
source-new source-new
source.tar source.tar
source.tar.tmp source.tar.tmp
stage target
stage.tmp
stage.pkg
stage.pkgar
stage.sig
stage.tar
stage.tar.gz
stage.toml
sysroot
sysroot.tmp
xargo
#Added by cargo
/target
**/*.rs.bk
...@@ -6,7 +6,3 @@ ...@@ -6,7 +6,3 @@
path = pkgar path = pkgar
url = https://gitlab.redox-os.org/redox-os/pkgar.git url = https://gitlab.redox-os.org/redox-os/pkgar.git
branch = master branch = master
[submodule "pkgutils"]
path = pkgutils
url = https://gitlab.redox-os.org/redox-os/pkgutils.git
branch = master
This diff is collapsed.
...@@ -20,13 +20,14 @@ name = "cookbook" ...@@ -20,13 +20,14 @@ name = "cookbook"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
blake3 = "1" blake3 = "=1.5.3" # 1.5.4 is incompatible with blake3 0.3 dependency from pkgar
object = { version = "0.36", features = ["build_core"] }
pbr = "1.0.2" pbr = "1.0.2"
pkgar = "0.1.7" pkgar = { path = "pkgar/pkgar" }
pkgar-keys = "0.1.0" pkgar-core = { path = "pkgar/pkgar-core" }
redoxer = "0.2.25" pkgar-keys = { path = "pkgar/pkgar-keys" }
serde = { version = "1.0.110", features = ["derive"] } redoxer = "0.2"
sha2 = "0.10" serde = { version = "=1.0.197", features = ["derive"] }
termion = "1.5.5" termion = "4"
toml = "0.5.6" toml = "0.8"
walkdir = "2.3.1" walkdir = "2.3.1"
# cookbook # Cookbook
A collection of package recipes for Redox.
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) Package system of Redox.
This repository contains the system source code and packages inside the `recipes` folder.
- A recipe can be a software port or system package (they use `pkgar` or `tar.gz` formats).
**Read [this](https://doc.redox-os.org/book/porting-applications.html) page before porting programs to Redox**
In order for this repository to be useful, it must be set up with an environment In order for this repository to be useful, it must be set up with an environment
from the [Redox repository](https://gitlab.redox-os.org/redox-os/redox). from the [redox](https://gitlab.redox-os.org/redox-os/redox) repository.
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
- [Recipe Categories](#recipe-categories)
- [Search Recipes](#search-recipes)
- [Package Policy](#package-policy)
- [Cross-Compilation](#cross-compilation)
- [Library Linking](#library-linking)
- [ABI stability](#abi-stability)
- [Checksum](#checksum)
- [License](#license)
- [Testing Area](#testing-area)
- [Suggestions for TODOs](#suggestions-for-todos)
- [Repository Layout](#repository-layout)
- [TODO](#todo)
### Recipe Categories
The categories inside the `recipes` folder.
- `core` - System components
- `demos` - Programs with demos and examples
- `dev` - Programs used for development and programming languages, like compilers and dependency managers
- `doc` - Programs used for documentation
- `emulators` - Console emulators or compatibility layers
- `fonts` - Fonts and programs for fonts
- `games` - Any kind of game
- `graphics` - Programs used for graphics processing or production
- `gui` - Orbital
- `icons` - Icon packs
- `libs` - Software with functions for other softwares, like OpenSSL
- `math` - Programs used for calculations
- `net` - Networking tools
- `other` - Software that can't fit on other categories
- `shells` - Terminal interpreters and extensions
- `sound` - Software used for sound processing or production
- `tests` - Software used to test other softwares
- `tools` - Text editors, terminal tools and any other kind of tools
- `tui` - Programs with a [terminal user interface](https://en.wikipedia.org/wiki/Text-based_user_interface)
- `video` - Programs used for video playback, processing and production
- `web` - World Wide Web browsers and tools
- `wip` - Software that needs porting or incomplete recipes
### Search Recipes
Click in the button named "Find file" on the top of this repository to search for recipe names.
### Package Policy
Before sending your recipe to upstream (to become a public package), you must follow these rules:
#### Cross-Compilation
- All recipes must use our cross-compilers, a Cookbook [template](https://doc.redox-os.org/book/porting-applications.html#templates) does this automatically but it's not always possible, study the build system of your program or library to find these options or patch the configuration files.
- Don't hardcode the CPU architecture on the recipe script (this would break the multi-arch support).
#### Tarballs
- Don't use the auto-generated tarballs from GitHub, they aren't static and don't verify the archive integrity.
#### Library Linking
- Keep the static linking of libraries to reduce the launch time and improve security.
- If your package is bigger than 50MB, dynamic link big libraries until your package is equal or less than 50MB (to reduce the RAM usage).
#### ABI stability
- Respect the ABI separation of the libraries, for example, if `openssl1` is available and some program need `openssl3`, you will create a recipe for `openssl3` and not rename the `openssl1`, as it will break the dependent packages.
#### Checksum
- If your recipe download a tarball, you will need to create a BLAKE3 hash for it. You can learn how to do it [here](https://doc.redox-os.org/book/porting-applications.html#create-a-blake3-hash-for-your-recipe).
#### License
- Don't package programs or libraries lacking a license.
- Verify if the program has some license violation, in case of doubt ask us on the [chat](https://doc.redox-os.org/book/chat.html).
- Non-free programs and assets should go to a subcategory of the `nonfree` category and be approved per license.
### Testing Area
Work-in-progress software ports goes to the `wip` category, be aware of these items during your packaging process:
- A recipe is considered ready if it's mostly working inside of Redox.
- All WIP recipes must have a `#TODO` on the beginning of the `recipe.toml` and explain what is missing.
- BLAKE3 hashes for tarballs are optional (quick testing workflow)
- Try to keep the recipe with the latest stable version of the program (the porting process can take months).
- Once the recipe is ready, add the BLAKE3 hash if needed and move the folder to the appropriate category.
#### Suggestions for TODOs
These TODOs improve the packagers cooperation and understanding.
- `not compiled or tested` - It means that your recipe is fully configured and don't lack necessary dependencies.
- `missing script for x, see insert-the-link-for-build-instructions-here` - It means that your recipe is lacking the cross-compilation script for some build system, where `x` is the build system name. After `see` you will insert the link for the build instructions of the program or library, it will help other packagers to insert the script for you.
- `missing dependencies, see insert-the-link-for-required-dependencies-here` - It means that the `dependencies = []` section is incomplete.
- `probably wrong script, see insert-the-link-for-build-instructions-here` - It means that you don't know if your script will work.
- `probably wrong template, see insert-the-link-for-build-instructions-here` - It means that you don't know if the Cookbook template will work.
- `probably missing dependencies, see insert-the-link-for-required-dependencies-here` - It means that you don't know if the required dependencies are satisfied.
- `promote` - It means that the recipe is working and should be moved to the equivalent category at `cookbook/recipes`
Other TODOs are specific and won't be covered on this list.
### Repository Layout
- `.cargo` - Cargo configuration.
- `bin` - LLVM and pkg-config CPU targets.
- `recipes` - Package configuration files.
- `src` - Package system source code.
### TODO
- Convert old recipes to TOML, see [this](https://gitlab.redox-os.org/redox-os/cookbook/-/issues/174) tracking issue.
- Remove the scripts after full TOML conversion.
[target.aarch64-unknown-redox.dependencies.std]
features = ["panic_unwind"]
[target.x86_64-unknown-redox.dependencies.std]
features = ["panic_unwind"]
#features = ["panic_unwind", "backtrace"]
#[dependencies.test]
#stage = 1
#!/usr/bin/env bash #!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot" export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig" export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig" export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
exec pkg-config --static "$@" if [ -n "${COOKBOOK_PREFER_STATIC}" ]
then
exec pkg-config --static "$@"
else
exec pkg-config "$@"
fi
#!/usr/bin/env bash #!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot" export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig" export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig" export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
exec pkg-config --static "$@" if [ -n "${COOKBOOK_PREFER_STATIC}" ]
then
exec pkg-config --static "$@"
else
exec pkg-config "$@"
fi
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_PREFER_STATIC}" ]
then
exec pkg-config --static "$@"
else
exec pkg-config "$@"
fi
This diff is collapsed.
#!/usr/bin/env bash #!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot" export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig" export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig" export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
exec pkg-config --static "$@" if [ -n "${COOKBOOK_PREFER_STATIC}" ]
then
exec pkg-config --static "$@"
else
exec pkg-config "$@"
fi
...@@ -5,14 +5,12 @@ source config.sh ...@@ -5,14 +5,12 @@ source config.sh
if [ $# = 0 ] if [ $# = 0 ]
then then
recipes="$(ls -1 recipes)" recipes="$(target/release/list_recipes)"
else else
recipes="$@" recipes="$@"
fi fi
for recipe in $recipes for recipe_path in $recipes
do do
./cook.sh "$recipe" distclean ./cook.sh "$recipe_path" distclean
done done
rm -rf xargo
...@@ -8,12 +8,14 @@ then ...@@ -8,12 +8,14 @@ then
fi fi
ARCH="${TARGET%%-*}" ARCH="${TARGET%%-*}"
HOST="$TARGET" HOST="$TARGET"
if [ x"${HOST}" == x"riscv64gc-unknown-redox" ] ; then
HOST="riscv64-unknown-redox"
fi
# Automatic variables # Automatic variables
ROOT="$(cd `dirname "$0"` && pwd)" ROOT="$(cd `dirname "$0"` && pwd)"
REPO="$ROOT/repo/$TARGET" REPO="$ROOT/repo/$TARGET"
export PATH="${ROOT}/bin:$PATH" export PATH="${ROOT}/bin:$PATH"
export XARGO_HOME="${ROOT}/xargo"
export AR="${HOST}-gcc-ar" export AR="${HOST}-gcc-ar"
export AS="${HOST}-as" export AS="${HOST}-as"
...@@ -52,3 +54,17 @@ else ...@@ -52,3 +54,17 @@ else
FIND="find" FIND="find"
STAT="stat"; STAT="stat";
fi fi
export FIND
export STAT
if [ ! "$(uname -s)" = "Redox" ]
then
function docgen {
"$ROOT/docgen/target/release/docgen" "$@"
}
function pkgar {
"$ROOT/pkgar/target/release/pkgar" "$@"
}
fi
This diff is collapsed.
...@@ -5,18 +5,25 @@ source config.sh ...@@ -5,18 +5,25 @@ source config.sh
if [ $# = 0 ] if [ $# = 0 ]
then then
recipes="$(ls -1 recipes)" recipes="$(target/release/list_recipes)"
else else
recipes="$@" recipes="$@"
fi fi
for recipe in $recipes for recipe_path in $recipes
do do
if [ -e "recipes/$recipe/recipe.toml" ] if (echo "$recipe_path" | grep '.*/.*' >/dev/null); then
then recipe_name=$(basename "$recipe_path")
target/release/cook --fetch-only "$recipe" recipe_path="recipes/$recipe_path"
continue else
recipe_name="$recipe_path"
recipe_path=`target/release/find_recipe $recipe_name`
fi fi
./cook.sh "$recipe" fetch if [ -e "$recipe_path/recipe.toml" ]
then
target/release/cook --fetch-only "$recipe_name"
else
./cook.sh "$recipe_name" fetch
fi
done done
Subproject commit 65f43a3bf955fde946bf4f976f044e4ffadc8912 Subproject commit 0ccbc9914b1ec655e23d4babc5afed87e42e9a0f
Subproject commit 410b9b0761d9c933490e9ee2c0668eea9d9af181
[source]
tar = "https://github.com/lz4/lz4/releases/download/v1.10.0/lz4-1.10.0.tar.gz"
blake3 = "3e69fd475e7852e17594985528b5232afeba7d3d56cfebe2e89071768b2ab36a"
patches = ["redox.patch"]
[build]
template = "custom"
script = """
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# No configure provided
COOKBOOK_CONFIGURE="true"
COOKBOOK_CONFIGURE_FLAGS=""
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
cookbook_configure
"""
diff '--color=auto' -ruwN source/programs/util.h source-new/programs/util.h
--- source/programs/util.h 2024-07-21 13:29:49.000000000 -0400
+++ source-new/programs/util.h 2024-12-13 02:21:03.032769559 -0500
@@ -52,6 +52,9 @@
#include <time.h> /* time */
#include <limits.h> /* INT_MAX */
#include <errno.h>
+#if defined(_REDOX)
+# include <sys/time.h> /* utimes */
+#endif
@@ -239,12 +242,20 @@
timebuf.modtime = statbuf->st_mtime;
res += utime(filename, &timebuf); /* set access and modification times */
#else
+ #if defined(_REDOX)
+ struct timeval timebuf[2];
+ memset(timebuf, 0, sizeof(timebuf));
+ timebuf[0].tv_usec = UTIME_NOW;
+ timebuf[1].tv_sec = statbuf->st_mtime;
+ res += utimes(filename, timebuf);
+ #else
struct timespec timebuf[2];
memset(timebuf, 0, sizeof(timebuf));
timebuf[0].tv_nsec = UTIME_NOW;
timebuf[1].tv_sec = statbuf->st_mtime;
res += utimensat(AT_FDCWD, filename, timebuf, 0); /* set access and modification times */
#endif
+#endif
}
#if !defined(_WIN32)