Nemesis Build Script

Arch based Porteus community project

Moderator: M. Eerie

User avatar
M. Eerie
Moderator
Moderator
Posts: 746
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis/Porteux XFCE4

Nemesis Build Script

Post#1 by M. Eerie » 06 Jun 2026, 11:15

If I remember correctly, in a post the repository was published with the Build Scripts to recreate Nemesis. Would it be possible to update this information?
The only thing I've found is the example to build the Mate Desktop.

Thanks!
> Does not compute_ πŸ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4601
Joined: 20 Mar 2012, 03:42
Distribution: v5.1-alpha*-64bit
Location: australia
Contact:

Nemesis Build Script

Post#2 by ncmprhnsbl » 09 Jun 2026, 00:05

M. Eerie wrote: ↑
06 Jun 2026, 11:15
If I remember correctly, in a post the repository was published with the Build Scripts to recreate Nemesis.
memory incorrect :)
but.. to remedy that, here : https://codeberg.org/porteus/nemesis
most of it should be self explanatory
it's possible i've broken something in my 'tidying up'
the kernel build system is rough at the moment, be sure to read the mkkernal.sh script before attempting to use it.
feel free to query, either there or here.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
M. Eerie
Moderator
Moderator
Posts: 746
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis/Porteux XFCE4

Nemesis Build Script

Post#3 by M. Eerie » 09 Jun 2026, 11:04

Thanks!
ncmprhnsbl wrote: ↑
09 Jun 2026, 00:05
feel free to query, either there or here
I just joined Codeberg and hope to contribute whenever I can.

Please note that my username there doesn't match the one I use "heere". 😌
> Does not compute_ πŸ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

User avatar
M. Eerie
Moderator
Moderator
Posts: 746
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis/Porteux XFCE4

Nemesis Build Script

Post#4 by M. Eerie » 17 Jun 2026, 10:46

ncmprhnsbl wrote: ↑
09 Jun 2026, 00:05
feel free to query, either there or here.
I've found some bugs in the file: nxbs/TREE/001/usr/share/porteus/porteus-functions:

Code: Select all

-	pkg=$(find $pkgdir/$1*/desc 2>/dev/nul | head -n1 | awk -F/ '{print $6}')
+	pkg=$(find $pkgdir/$1*/desc 2>/dev/null | head -n1 | awk -F/ '{print $6}')

.
.
.

-is_aufs(){ [[ `df -l --no-sync --output=fstype $1 | tail -1` = "tmpfs" ]]; }
+is_tmpfs(){ [[ `df -l --no-sync --output=fstype $1 | tail -1` = "tmpfs" ]]; }

Then, I have some doubts about this in nxbs/scripts/build:

Code: Select all

-[ -e /localtime ] && unlink /localtime
+[ -e localtime ] && unlink localtime
Should that slash "/" be removed?



Also in nxbs/scripts/update-pkgs:

Code: Select all

		elif [ "$1" = 06_man ]; then
	update_base 05_man
I think It should be 06_man, then the file nxbs/docs/05_man.txt should be renamed to nxbs/docs/06_man.txt



On the other hand, I would suggest a more cmprhnsv :roll:, backward-compatible implementation of "helpers/pretty colors" in porteus-functions and
*bs/scripts/functions (emojis can be omitted if they're distracting).:

Code: Select all

# Pretty colors (reworked backward compatible, added functions)
txtbld=$'\e[1m'
txtul=$'\e[4m'  # underline
rst=$'\e[0m'

declare -A colors=( [31]=red [32]=green [33]=yellow [34]=blue [35]=magenta [36]=cyan [37]=white )

for i in "${!colors[@]}"; do
    printf -v "txt${colors[$i]}" '\e[%sm' "$i"
done

msg() {
    local style="$1"
    local prefix="$2"
    shift 2
    printf '%b%s%s%b\n' "$style" "$prefix" "$*" "$rst"
}

bold()    { msg "$txtbld"               ""    "$@"; }
red()     { msg "$txtred"               ""    "$@"; }
green()   { msg "$txtgreen"             ""    "$@"; }
cyan()    { msg "$txtcyan"              ""    "$@"; }

sayok()     { msg "$txtbld$txtgreen" "[OK] "    ; }
sayerror()  { msg "$txtbld$txtred"   "[ERROR] " ; }
sayupdate() { msg "$txtbld$txtred"   "[UPDATE] "; }

### Added some dialog functions
critical() { msg "$txtbld$txtul$txtred" "πŸ’₯ " "$@"; }
error()    { msg "$txtbld$txtred"       "❌ " "$@"; }
warn()     { msg "$txtbld$txtyellow"    "⚠️ " "$@"; }
notify()   { msg "$txtbld$txtyellow"    "πŸ’‘ " "$@"; }
success()  { msg "$txtbld$txtgreen"     "βœ… " "$@"; }
confirm()  { read -n 1 -rsp "$(printf '%b%s [y/*]: %b' "$txtcyan" "$1" "$rst")" && echo && [[ "${REPLY,,}" == y ]]; }

########################################################################
# download
.
.
.
Note: Although I created the "critical" function, I think there's another one called "fatal." It can be renamed if necessary.


EDIT: I forgot to mention that the sayok, sayerror, and sayupdate functions were using the "txtbold" style when the defined style is "txtbld"


I'll keep checking
> Does not compute_ πŸ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4601
Joined: 20 Mar 2012, 03:42
Distribution: v5.1-alpha*-64bit
Location: australia
Contact:

Nemesis Build Script

Post#5 by ncmprhnsbl » 18 Jun 2026, 03:03

M. Eerie wrote: ↑
17 Jun 2026, 10:46
I've found some bugs in the file: nxbs/TREE/001/usr/share/porteus/porteus-functions:
indeed, an ancient one it seems, even present in the slackware porteus .. i wonder if anything actually uses that (is_tmpfs) ... fixed now, thanks
M. Eerie wrote: ↑
17 Jun 2026, 10:46
Should that slash "/" be removed?
yep, but just some lines below that is "unlink localtime 2>/dev/null" and a couple of similar..
now changed them to [ -e ] && syntax (without the /) ... though i wonder if these are relevant at all ( i suppose the test would be to remove them and see if those links appear)
M. Eerie wrote: ↑
17 Jun 2026, 10:46
Also in nxbs/scripts/update-pkgs:
thanks, ..this is a work in progress, you may have noticed the list is empty at this stage, havn't yet figured what packages are necessary and the build function could be considered a stub..
M. Eerie wrote: ↑
17 Jun 2026, 10:46
On the other hand, I would suggest a more cmprhnsv :roll:, backward-compatible implementation of "helpers/pretty colors" in porteus-functions and
*bs/scripts/functions (emojis can be omitted if they're distracting).:
sounds good, have included in the build functions so far (minus emoticons) , thanks
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
M. Eerie
Moderator
Moderator
Posts: 746
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis/Porteux XFCE4

Nemesis Build Script

Post#6 by M. Eerie » 18 Jun 2026, 08:03

ncmprhnsbl wrote: ↑
18 Jun 2026, 03:03
have included in the build functions so far (minus emoticons)
Keep in mind that the intermediate msg() function expects at least two initial parameters, with "prefix" (the emojis) being the second one. I suggest replacing the emojis with text labels (consistent with sayok, sayupdate, etc.).

In that case, we can avoid some redundancy, although sayok and sayupdate are not currently in use.
For sayupdate/update, I'd lean toward using cyan, as it feels more informational and less "aggressive" than red.

In the case of "sayerror" vs. "error":

Code: Select all

sayerror()  { msg "$txtbld$txtred"    "[ERROR] " ; }
error()    { msg "$txtbld$txtred"         "[ERROR] "    "$@"; }
error() is fully compatible with sayerror(), but replacing it would require updating references across these files:
Alternatively, sayerror() could simply be changed to use the same implementation as error() for the sake of consistency.


Thus:

Code: Select all

.
.
.
#sayok() --> same as success()
sayupdate() { msg "$txtbld$txtcyan"   "[UPDATE] "   "$@"; }
sayerror()  { msg "$txtbld$txtred"    "[ERROR] "    "$@"; }

### Added some dialog functions
critical() { msg "$txtbld$txtul$txtred"   "[CRITICAL] " "$@"; }
warn()     { msg "$txtbld$txtyellow"      "[WARN] "     "$@"; }
notify()   { msg "$txtbld$txtcyan"        "[INFO] "     "$@"; }
success()  { msg "$txtbld$txtgreen"       "[OK] "       "$@"; }
confirm()  { read -n 1 -rsp "$(printf '%b%s [y/*]: %b' "$txtcyan" "$1" "$rst")" && echo && [[ "${REPLY,,}" == y ]]; }

########################################################################
# download
.
.
.
> Does not compute_ πŸ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

User avatar
M. Eerie
Moderator
Moderator
Posts: 746
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis/Porteux XFCE4

Nemesis Build Script

Post#7 by M. Eerie » 18 Jun 2026, 08:40

There's a minor bug in the last commit @ *bs/scripts/build:

Code: Select all

- #[ -d usr/src/slackbuilds ] && rm -rf usr/src/slackbuilds
- unlink localtime 2>/dev/null
- unlink sln 2>/dev/null
- unlink subfont.ttf 2>/dev/null
+ [ -e localtime ] && unlink localtime
+ [ -e sln ] && unlink sln
+ [ -e subfont ] && unlink subfont.ttf
Last line should be:

Code: Select all

+ [ -e subfont.ttf ] && unlink subfont.ttf


I'll wait for these changes so as not to interfere, and once everything is in place, I'll submit the next ones via PRs.

:fine:
> Does not compute_ πŸ––

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4601
Joined: 20 Mar 2012, 03:42
Distribution: v5.1-alpha*-64bit
Location: australia
Contact:

Nemesis Build Script

Post#8 by ncmprhnsbl » 19 Jun 2026, 00:03

M. Eerie wrote: ↑
18 Jun 2026, 08:40
There's a minor bug in the last commit @ *bs/scripts/build:
oops, thanks , fixed now
..todo: investigate whether these actions need to be there at all.
i'll check for PRs before any changes/commits on my end
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Post Reply