From 465572501756298f2310b166239c87ecd6c7dbf4 Mon Sep 17 00:00:00 2001 From: AleksArt <69528329+AleksArt000@users.noreply.github.com> Date: Sat, 4 May 2024 22:06:50 +0200 Subject: [PATCH 01/13] Create File --- File | 1 + 1 file changed, 1 insertion(+) create mode 100644 File diff --git a/File b/File new file mode 100644 index 0000000..608d3ac --- /dev/null +++ b/File @@ -0,0 +1 @@ +Stupid file to see if updating works From 22fb9a9d3be77e1f1c3abfa0b36bc1ca5b59fb20 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Sun, 5 May 2024 00:14:15 +0200 Subject: [PATCH 02/13] rustc --- extra/src/rustc.ecmp | 90 +++++++++++++++++++++++++++++++++++++++ testing/old/rustc.ecmp | 95 ------------------------------------------ 2 files changed, 90 insertions(+), 95 deletions(-) create mode 100644 extra/src/rustc.ecmp delete mode 100644 testing/old/rustc.ecmp diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp new file mode 100644 index 0000000..1f38632 --- /dev/null +++ b/extra/src/rustc.ecmp @@ -0,0 +1,90 @@ +[info] +name = rustc +type = src +version = 1.77.0-src +url = https://static.rust-lang.org/dist/$NAME-$VERSION.tar.xz +sha256 = 66126989782cbf77fa3aff121bbb108429f2d46fe19328c3de231553de711b90 + +[dependencies] +cmake +curl + +[optional] +libssh2 +llvm +sqlite +gdb +git +libgit2 + +[description] +This package is the rust programming language compiler + +[download] +curl -L $URL --output $NAME-$VERSION.tar.xz +tar xf $NAME-$VERSION.tar.xz + +[install] +mkdir -pv $BUILD_ROOT/opt/rustc-1.77.0 && +ln -svfn rustc-1.77.0 $BUILD_ROOT/opt/rustc + +# A suitable config.toml file which will configure the build. +cat << EOF > config.toml + +change-id = 102579 + +?[llvm] +targets = "X86" +link-shared = true + +?[build] +docs = false +extended = true +locked-deps = true +tools = ["cargo", "clippy", "rustdoc", "rustfmt"] +vendor = true + +?[install] +prefix = "$BUILD_ROOT/opt/rustc-1.77.0" +docdir = "$BUILD_ROOT/share/doc/rustc-1.77.0" + +?[rust] +channel = "stable" +description = "for BLFS r12.1-659" +lto = "thin" +codegen-units = 1 + +EOF + +sed -i 's/?//g' config.toml + +# Compile rust +{ [ ! -e /usr/include/libssh2.h ] || + export LIBSSH2_SYS_USE_PKG_CONFIG=1; } && +{ [ ! -e /usr/include/sqlite3.h ] || + export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && +python3 x.py build + +python3 x.py install rustc std && +python3 x.py install --stage=1 cargo clippy rustfmt + +rm -fv $BUILD_ROOT/opt/rustc-1.77.0/share/doc/rustc-1.77.0/*.old && +install DESTDIR=$BUILD_ROOT -vm644 README.md \ + /opt/rustc-1.77.0/share/doc/rustc-1.77.0 && + +install DESTDIR=$BUILD_ROOT -vdm755 /usr/share/zsh/site-functions && +ln -sfv /opt/rustc/share/zsh/site-functions/_cargo \ + /usr/share/zsh/site-functions + +mkdir $BUILD_ROOT/etc/ +mkdir $BUILD_ROOT/etc/profile.d/ + +cat > $BUILD_ROOT/etc/profile.d/rustc.sh << "EOF" +# Begin /etc/profile.d/rustc.sh + +PATH="$PATH:/opt/rustc/bin" + +# End /etc/profile.d/rustc.sh +EOF + +source $BUILD_ROOT/etc/profile.d/rustc.sh \ No newline at end of file diff --git a/testing/old/rustc.ecmp b/testing/old/rustc.ecmp deleted file mode 100644 index 438412a..0000000 --- a/testing/old/rustc.ecmp +++ /dev/null @@ -1,95 +0,0 @@ -[info] -name = rustc -type = src -version = 1.67.1 -url = https://static.rust-lang.org/dist/rustc-1.67.1-src.tar.xz - -[dependencies] -cmake -curl -llvm - -[description] -This package is the rust programming language compiler - -[install] -wget $URL -tar -xf rustc-1.67.1-src.tar.xz -cd rustc-1.67.1-src -mkdir -pv /opt/rustc-1.67.1 && -ln -svfn rustc-1.67.1 /opt/rustc -cat << EOF > config.toml -# see config.toml.example for more possible options -# See the 8.4 book for an old example using shipped LLVM -# e.g. if not installing clang, or using a version before 13.0 - -# tell x.py to not keep printing an annoying warning -changelog-seen = 2 - -[llvm] -# by default, rust will build for a myriad of architectures -targets = "X86" - -# When using system llvm prefer shared libraries -link-shared = true - -[build] -# omit docs to save time and space (default is to build them) -docs = false - -# install extended tools: cargo, clippy, etc -extended = true - -# Do not query new versions of dependencies online. -locked-deps = true - -# Specify which extended tools (those from the default install). -tools = ["cargo", "clippy", "rustfmt"] - -# Use the source code shipped in the tarball for the dependencies. -# The combination of this and the "locked-deps" entry avoids downloading -# many crates from Internet, and makes the Rustc build more stable. -vendor = true - -[install] -prefix = "/opt/rustc-1.67.1" -docdir = "share/doc/rustc-1.67.1" - -[rust] -channel = "stable" -description = "for BLFS 11.3" - -# BLFS used to not install the FileCheck executable from llvm, -# so disabled codegen tests. The assembly tests rely on FileCheck -# and cannot easily be disabled, so those will anyway fail if -# FileCheck has not been installed. -#codegen-tests = false - -[target.x86_64-unknown-linux-gnu] -# NB the output of llvm-config (i.e. help options) may be -# dumped to the screen when config.toml is parsed. -llvm-config = "/usr/bin/llvm-config" - -[target.i686-unknown-linux-gnu] -# NB the output of llvm-config (i.e. help options) may be -# dumped to the screen when config.toml is parsed. -llvm-config = "/usr/bin/llvm-config" - - -EOF -{ [ ! -e /usr/include/libssh2.h ] || - export LIBSSH2_SYS_USE_PKG_CONFIG=1; } && -python3 ./x.py build -python3 ./x.py install -cat > /etc/profile.d/rustc.sh << "EOF" -# Begin /etc/profile.d/rustc.sh - -pathprepend /opt/rustc/bin PATH - -# Include /opt/rustc/man in the MANPATH variable to access manual pages -pathappend /opt/rustc/share/man MANPATH - -# End /etc/profile.d/rustc.sh -EOF -source /etc/profile.d/rustc.sh - From 00a01835b24f6f2d6bfc856b25238e8725eff7e4 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Sun, 5 May 2024 01:01:13 +0200 Subject: [PATCH 03/13] changed description --- extra/src/rustc.ecmp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index 1f38632..f2fa33c 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -26,7 +26,7 @@ tar xf $NAME-$VERSION.tar.xz [install] mkdir -pv $BUILD_ROOT/opt/rustc-1.77.0 && -ln -svfn rustc-1.77.0 $BUILD_ROOT/opt/rustc +ln -svfn $BUILD_ROOT/opt/rustc-1.77.0 $BUILD_ROOT/opt/rustc # A suitable config.toml file which will configure the build. cat << EOF > config.toml @@ -50,7 +50,7 @@ docdir = "$BUILD_ROOT/share/doc/rustc-1.77.0" ?[rust] channel = "stable" -description = "for BLFS r12.1-659" +description = "for Soviet" lto = "thin" codegen-units = 1 From 79d7b773376a7b1d046296db7fcbbe654b444b65 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Sun, 5 May 2024 01:38:07 +0200 Subject: [PATCH 04/13] Some wonky stuff with dir symlinks --- extra/src/rustc.ecmp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index f2fa33c..4ddad29 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -25,8 +25,7 @@ curl -L $URL --output $NAME-$VERSION.tar.xz tar xf $NAME-$VERSION.tar.xz [install] -mkdir -pv $BUILD_ROOT/opt/rustc-1.77.0 && -ln -svfn $BUILD_ROOT/opt/rustc-1.77.0 $BUILD_ROOT/opt/rustc +mkdir -pv $BUILD_ROOT/opt/rustc # A suitable config.toml file which will configure the build. cat << EOF > config.toml @@ -45,8 +44,9 @@ tools = ["cargo", "clippy", "rustdoc", "rustfmt"] vendor = true ?[install] -prefix = "$BUILD_ROOT/opt/rustc-1.77.0" -docdir = "$BUILD_ROOT/share/doc/rustc-1.77.0" +# There are some wonky stuff with links to directories +prefix = "$BUILD_ROOT/opt/rustc" +docdir = "$BUILD_ROOT/share/doc/rustc" ?[rust] channel = "stable" @@ -68,9 +68,9 @@ python3 x.py build python3 x.py install rustc std && python3 x.py install --stage=1 cargo clippy rustfmt -rm -fv $BUILD_ROOT/opt/rustc-1.77.0/share/doc/rustc-1.77.0/*.old && +rm -fv $BUILD_ROOT/opt/rustc/share/doc/rustc/*.old && install DESTDIR=$BUILD_ROOT -vm644 README.md \ - /opt/rustc-1.77.0/share/doc/rustc-1.77.0 && + /opt/rustc/share/doc/rustc && install DESTDIR=$BUILD_ROOT -vdm755 /usr/share/zsh/site-functions && ln -sfv /opt/rustc/share/zsh/site-functions/_cargo \ @@ -87,4 +87,5 @@ PATH="$PATH:/opt/rustc/bin" # End /etc/profile.d/rustc.sh EOF +# Does not work, will probably have to ask the user to systemctl --user daemon-reload or smth source $BUILD_ROOT/etc/profile.d/rustc.sh \ No newline at end of file From 73ca329416c9379fbd762005302bba7d742161b2 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Sun, 5 May 2024 02:18:04 +0200 Subject: [PATCH 05/13] removed File --- File | 1 - 1 file changed, 1 deletion(-) delete mode 100644 File diff --git a/File b/File deleted file mode 100644 index 608d3ac..0000000 --- a/File +++ /dev/null @@ -1 +0,0 @@ -Stupid file to see if updating works From 4458620c04ff42ce8c6cbdd1f88a92d1b6be8287 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 19 Jun 2024 14:44:08 +0200 Subject: [PATCH 06/13] updated rustc --- extra/src/rustc.ecmp | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index 4ddad29..e4b0b04 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -6,8 +6,8 @@ url = https://static.rust-lang.org/dist/$NAME-$VERSION.tar.xz sha256 = 66126989782cbf77fa3aff121bbb108429f2d46fe19328c3de231553de711b90 [dependencies] -cmake -curl +cmake +curl [optional] libssh2 @@ -25,7 +25,6 @@ curl -L $URL --output $NAME-$VERSION.tar.xz tar xf $NAME-$VERSION.tar.xz [install] -mkdir -pv $BUILD_ROOT/opt/rustc # A suitable config.toml file which will configure the build. cat << EOF > config.toml @@ -44,9 +43,8 @@ tools = ["cargo", "clippy", "rustdoc", "rustfmt"] vendor = true ?[install] -# There are some wonky stuff with links to directories -prefix = "$BUILD_ROOT/opt/rustc" -docdir = "$BUILD_ROOT/share/doc/rustc" +prefix = "$BUILD_ROOT/usr" +docdir = "$BUILD_ROOT/usr/share/doc/rustc" ?[rust] channel = "stable" @@ -63,29 +61,20 @@ sed -i 's/?//g' config.toml export LIBSSH2_SYS_USE_PKG_CONFIG=1; } && { [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && -python3 x.py build - -python3 x.py install rustc std && -python3 x.py install --stage=1 cargo clippy rustfmt - -rm -fv $BUILD_ROOT/opt/rustc/share/doc/rustc/*.old && -install DESTDIR=$BUILD_ROOT -vm644 README.md \ - /opt/rustc/share/doc/rustc && -install DESTDIR=$BUILD_ROOT -vdm755 /usr/share/zsh/site-functions && -ln -sfv /opt/rustc/share/zsh/site-functions/_cargo \ - /usr/share/zsh/site-functions +sudo su -mkdir $BUILD_ROOT/etc/ -mkdir $BUILD_ROOT/etc/profile.d/ +python3 x.py build -cat > $BUILD_ROOT/etc/profile.d/rustc.sh << "EOF" -# Begin /etc/profile.d/rustc.sh +python3 x.py install rustc std && +python3 x.py install --stage=1 cargo clippy -PATH="$PATH:/opt/rustc/bin" +exit -# End /etc/profile.d/rustc.sh -EOF +rm -fv $BUILD_ROOT/usr/share/doc/rustc/*.old && +install DESTDIR=$BUILD_ROOT -vm644 README.md \ + $BUILD_ROOT/usr/share/doc/rustc && -# Does not work, will probably have to ask the user to systemctl --user daemon-reload or smth -source $BUILD_ROOT/etc/profile.d/rustc.sh \ No newline at end of file +install DESTDIR=$BUILD_ROOT -vdm755 $BUILD_ROOT/usr/share/zsh/site-functions && +ln -sfv $BUILD_ROOT/usr/share/zsh/site-functions/_cargo \ + $BUILD_ROOT/usr/share/zsh/site-functions \ No newline at end of file From 9403c05dd01ca648013d1a68c7f147e964ca30de Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 19 Jun 2024 15:00:38 +0200 Subject: [PATCH 07/13] should work now --- extra/src/rustc.ecmp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index e4b0b04..845d89c 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -62,14 +62,11 @@ sed -i 's/?//g' config.toml { [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && -sudo su - python3 x.py build -python3 x.py install rustc std && -python3 x.py install --stage=1 cargo clippy - -exit +# This seems to fail in chroot, but should work fine on a system +sudo python3 x.py install rustc std && +sudo python3 x.py install --stage=1 cargo clippy rm -fv $BUILD_ROOT/usr/share/doc/rustc/*.old && install DESTDIR=$BUILD_ROOT -vm644 README.md \ From f578cfd44e950de46e461353732ae7ebc07d7939 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 19 Jun 2024 16:17:32 +0200 Subject: [PATCH 08/13] removed stuff --- extra/src/rustc.ecmp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index 845d89c..98e940a 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -62,16 +62,9 @@ sed -i 's/?//g' config.toml { [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && -python3 x.py build - # This seems to fail in chroot, but should work fine on a system -sudo python3 x.py install rustc std && -sudo python3 x.py install --stage=1 cargo clippy -rm -fv $BUILD_ROOT/usr/share/doc/rustc/*.old && -install DESTDIR=$BUILD_ROOT -vm644 README.md \ - $BUILD_ROOT/usr/share/doc/rustc && +sudo python3 x.py build -install DESTDIR=$BUILD_ROOT -vdm755 $BUILD_ROOT/usr/share/zsh/site-functions && -ln -sfv $BUILD_ROOT/usr/share/zsh/site-functions/_cargo \ - $BUILD_ROOT/usr/share/zsh/site-functions \ No newline at end of file +sudo python3 x.py install rustc std && +sudo python3 x.py install --stage=1 cargo clippy rustfmt \ No newline at end of file From c4cbeb446350cb7aa6c2224e9ba8c6696796d28f Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 19 Jun 2024 16:51:30 +0200 Subject: [PATCH 09/13] it's broken --- extra/src/rustc.ecmp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp index 98e940a..2d1e4fa 100644 --- a/extra/src/rustc.ecmp +++ b/extra/src/rustc.ecmp @@ -62,9 +62,7 @@ sed -i 's/?//g' config.toml { [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && -# This seems to fail in chroot, but should work fine on a system +python3 x.py build -sudo python3 x.py build - -sudo python3 x.py install rustc std && -sudo python3 x.py install --stage=1 cargo clippy rustfmt \ No newline at end of file +python3 x.py install rustc std && +python3 x.py install --stage=1 cargo clippy rustfmt \ No newline at end of file From 694b7b02a44b2ae19954576eb31c92bd26ce679d Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 19 Jun 2024 18:00:03 +0200 Subject: [PATCH 10/13] Rust --- extra/src/rustc.ecmp | 68 ------------------------------------------- extra/src/rustup.ecmp | 20 +++++++++++++ 2 files changed, 20 insertions(+), 68 deletions(-) delete mode 100644 extra/src/rustc.ecmp create mode 100644 extra/src/rustup.ecmp diff --git a/extra/src/rustc.ecmp b/extra/src/rustc.ecmp deleted file mode 100644 index 2d1e4fa..0000000 --- a/extra/src/rustc.ecmp +++ /dev/null @@ -1,68 +0,0 @@ -[info] -name = rustc -type = src -version = 1.77.0-src -url = https://static.rust-lang.org/dist/$NAME-$VERSION.tar.xz -sha256 = 66126989782cbf77fa3aff121bbb108429f2d46fe19328c3de231553de711b90 - -[dependencies] -cmake -curl - -[optional] -libssh2 -llvm -sqlite -gdb -git -libgit2 - -[description] -This package is the rust programming language compiler - -[download] -curl -L $URL --output $NAME-$VERSION.tar.xz -tar xf $NAME-$VERSION.tar.xz - -[install] - -# A suitable config.toml file which will configure the build. -cat << EOF > config.toml - -change-id = 102579 - -?[llvm] -targets = "X86" -link-shared = true - -?[build] -docs = false -extended = true -locked-deps = true -tools = ["cargo", "clippy", "rustdoc", "rustfmt"] -vendor = true - -?[install] -prefix = "$BUILD_ROOT/usr" -docdir = "$BUILD_ROOT/usr/share/doc/rustc" - -?[rust] -channel = "stable" -description = "for Soviet" -lto = "thin" -codegen-units = 1 - -EOF - -sed -i 's/?//g' config.toml - -# Compile rust -{ [ ! -e /usr/include/libssh2.h ] || - export LIBSSH2_SYS_USE_PKG_CONFIG=1; } && -{ [ ! -e /usr/include/sqlite3.h ] || - export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } && - -python3 x.py build - -python3 x.py install rustc std && -python3 x.py install --stage=1 cargo clippy rustfmt \ No newline at end of file diff --git a/extra/src/rustup.ecmp b/extra/src/rustup.ecmp new file mode 100644 index 0000000..18906aa --- /dev/null +++ b/extra/src/rustup.ecmp @@ -0,0 +1,20 @@ +[info] +name = rustup +type = src +version = 1.27.1 +url = https://static.rust-lang.org/rustup/rustup-init.sh +sha256 = 32a680a84cf76014915b3f8aa44e3e40731f3af92cd45eb0fcc6264fd257c428 + +[description] +rustup installs The Rust Programming Language from the official release channels + +[download] +curl -L $URL --output $NAME.sh +mkdir $NAME-$VERSION && cd $NAME-$VERSION + +[install] +mv ../$NAME.sh ./$NAME.sh +DIR=$HOME/.rustup/toolchains/*/ +HOME=$BUILD_ROOT$HOME +sh $NAME.sh -y +mv $BUILD_ROOT/$DIR $BUILD_ROOT/usr/ From acc8bcc047cc099e169be3afa0b92869917457f6 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Sun, 21 Jul 2024 01:18:01 +0200 Subject: [PATCH 11/13] updated example file --- example.ecmp | 85 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 21 deletions(-) diff --git a/example.ecmp b/example.ecmp index bb3149a..66f677a 100644 --- a/example.ecmp +++ b/example.ecmp @@ -1,54 +1,97 @@ # basic information about the package + [info] name = example version = 1.0.0 - # If your are trying to make a package for a binary change this from "src" to "bin" an place it in the /bin dir + + # If your are trying to make a package for a binary change this from "src" to "bin" an place it in the /bin dir + type = src + + # If you intend to make a bundle, that is: + # A package that has no file of it's own, and only used to group dependencies and execute scripts + # use the "con" type + license = Example -# Here you put the url to the archive or binary file + + # Here you put the url to the project + url = example.com -# checksum of the archive or binary file can be obtained by downloading the file and running sha256sum "file" -sha256 = sha256sum -# package description , it can be on multiple lines and we support makdown +# package description + [description] -Example +Example package + +# Here you type any dependencies this program needes -# Here you type any dependencies this program needes on runtime [dependencies] -example-1 +example-dependency-1 # Here you type any optional dependencies this program might need + [optional] -example-2 +example-dependency-2 + +# Use this to ask the user something [inputs] -# Use this to ask the user something, be aware that the input -# might be Y or N, since those can be passed by default form cccp -# so you should have sensible defaults in case that happens + # be aware that the input might be Y or N since those + # can be passed by default form cccp so you should + # have sensible defaults in case that happens this is a question, users input will be stored in $INPUT_n this is a second question, users input will be stored in $INPUT_1 this is a third question, users input will be stored in $INPUT_2 -# A Script to download and extract the archive +# These are the files that need to be downloaded + +[files] + + # They are downloaded in the following format: name url sha256 + +IMG_9524.png https://example.com/IMG_9524.png d181ac62565005...(sha256) +$NAME-$VERSION.tar.gz https://example.com/$NAME-$VERSION.tar.gz d181ac62565005...(sha256) + +# A Script to extract the archive + [download] -curl -L $URL --output $NAME-$VERSION.tar.gz + + # The result should be a folder $NAME-$VERSION with the source + tar -xzf $NAME-$VERSION.tar.gz # this is basically a bash script to install the package + [install] -# A package should be installed in the $BUILD_ROOT directory -# And make provided with $MAKE_FLAGS -# That is usually achived by having: -make $MAKE_FLAGS + + # A package should be installed in the $BUILD_ROOT directory + # And make provided with $MAKE_FLAGS + # That is usually achived by having: + +make make DESTDIR=$BUILD_ROOT install -# Notice that there is no need to use sudo as cccp -# is required to be ran as super user + + # Notice that there is no need to use sudo as + # packages are first installed to a temp dir + # and then moved to their location as root # this is a bash script that is run after the installation + [special] + + # If you want to run a command as root to do post-install work + # do it here + echo "This is SPECIAL" -# Also it should be noted that there are variables that are set before executing any of the scripts and basically every parameter in the info section is passed as a variable to every script like: for name there is $NAME variable containg the name, $VERSION for the version, $URL for the url and so on. +# Also it should be noted that there are variables that are set before executing any of the scripts: +# +# $NAME +# $VERSION +# $TYPE +# $URL +# $LICENSE +# +# Which correspond to the package info in order to make updating easier. \ No newline at end of file From 0e5fe71d20c3b5283f6575bd77fae10bb6cb5125 Mon Sep 17 00:00:00 2001 From: pkd Date: Sun, 21 Jul 2024 15:32:17 +0200 Subject: [PATCH 12/13] Adding test.ecmp in order to run LISPM tests. THE PACKAGE IS NOT MEANT TO BE USED; --- base/src/test.ecmp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 base/src/test.ecmp diff --git a/base/src/test.ecmp b/base/src/test.ecmp new file mode 100644 index 0000000..a2c72f3 --- /dev/null +++ b/base/src/test.ecmp @@ -0,0 +1,14 @@ +[info] +name = test +version = 1.0.0 +license = MIT +url = x.com + +[download] +mkdir $NAME-$VERSION +curl $URL > $NAME-$VERSION/download.txt + +[install] +echo "INSTALLING $NAME-$VERSION" > install.txt +cp -r * $BUILD_ROOT + From a54071692df956ffcff3159bdae8d658fb0f2e67 Mon Sep 17 00:00:00 2001 From: AleksArt000 Date: Wed, 24 Jul 2024 00:49:40 +0200 Subject: [PATCH 13/13] updated the example --- example.ecmp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/example.ecmp b/example.ecmp index 66f677a..3b307b0 100644 --- a/example.ecmp +++ b/example.ecmp @@ -18,6 +18,23 @@ license = Example url = example.com + # The environment variable is like an additional config file that gets parsed along side the default one + # Useful if you are working on a complex project, and want to have a common set of variables + +environment = example_environment + +# Package exports + +[exports] + +// These is how you create an environment +// This file will be written to the default config dir as the name of the package + +MY_EXAMPLE_PREFIX=/usr/example/ + +// Notice the different style of comments, in order to not conflict with the comments of the package, and still be visible when the file is written +// In order to access $MY_EXAMPLE_PREFIX in other packages, you would have to put ```environment = example``` in them. + # package description [description] @@ -51,8 +68,8 @@ this is a third question, users input will be stored in $INPUT_2 # They are downloaded in the following format: name url sha256 -IMG_9524.png https://example.com/IMG_9524.png d181ac62565005...(sha256) -$NAME-$VERSION.tar.gz https://example.com/$NAME-$VERSION.tar.gz d181ac62565005...(sha256) +IMG_9524.png https://example.com/IMG_9524.png d181ac6256...(sha256) +$NAME-$VERSION.tar.gz https://example.com/$NAME-$VERSION.tar.gz bc968e5286...(sha256) # A Script to extract the archive