Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copacabana 0.5 (stable) #7

Open
wants to merge 131 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
960ab5f
docs: Take note about new builds using LLVM.
takusuman Oct 18, 2023
6b2ba3c
docs: Removed GCC and some utilities that won't be used for now, adde…
takusuman Oct 18, 2023
e15a45b
chore: Switch to firasuke's original mussel repository since our firs…
takusuman Oct 18, 2023
609d030
chore: Use the copaclang branch from Alambiko.
takusuman Oct 20, 2023
877c9bd
feat: Added "TARGET_TUPLE" at machine.conf
takusuman Oct 20, 2023
7dd4d52
feat: Use new directories for both LLVM and GNU C tools.
takusuman Oct 24, 2023
f1922f4
chore: Rewrote rconfig()
takusuman Oct 24, 2023
226ac56
feat: Implemented aria2c support for downloading source code.
takusuman Nov 2, 2023
6da2c9e
chore: Explicity if one's using aria2c instead of download_sources.ksh
takusuman Nov 2, 2023
a217c10
feat: Moved aria2c support to download_sources.ksh as an alternative …
takusuman Nov 2, 2023
72f08f6
feat: Update sources one more time
takusuman Nov 2, 2023
f713fc3
feat: Fixes on cmd/download_sources.ksh's aria2c support.
takusuman Nov 3, 2023
5c0bf6d
feat: Pre-define SRCDIR from disk_managenment.ksh instead of hard-cod…
takusuman Nov 3, 2023
8ad87fe
feat: Borrow record function from [herbiec](https://github.com/takusu…
takusuman Nov 3, 2023
b543802
fix: aria2c parallelization support on cmd/download_sources.ksh
takusuman Nov 3, 2023
125888f
feat!: Deprecate execscript()
takusuman Nov 4, 2023
f4e01dc
feat: Added initial description headers for each task.
takusuman Nov 5, 2023
2f38e89
fix: Schily tar-specific configuration
takusuman Nov 8, 2023
b1c5f16
chore: Just export STAR_SECURE_LINKS
takusuman Nov 16, 2023
e0c6f85
feat: Implement logto() function, that will be useful for not filling…
takusuman Nov 16, 2023
2b8d7c4
feat!: Implemented dotini function for reading INI files.
takusuman Dec 13, 2023
da49acc
feat: Refactor record() and map().
takusuman Dec 13, 2023
febeeb7
feat: Implemented inicompat() function, which takes a INI file in a c…
takusuman Dec 15, 2023
aeb6a57
feat: Rewrote rconfig to support INI files.
takusuman Dec 16, 2023
b71dcba
fix dotini(): Use NAWK's ``gsub()`` for global pattern substitution.
takusuman Dec 22, 2023
4e6a299
fix dependency checks: Finally fixed Schily's tar --no-secure-links a…
takusuman Dec 22, 2023
fbdccb0
Load configuration completely from .ini files.
takusuman Dec 23, 2023
2521d36
feat: Rewrote populate_fhs.ksh as a POSIX shell script from scratch.
takusuman Dec 23, 2023
94bbd6d
cmd/populate_fhs.sh: Remove tracing.
takusuman Dec 24, 2023
fc11230
feat: "Implement" TRASH_PREFIX at trash
takusuman Dec 24, 2023
1fd283a
Merry Christmas!
takusuman Dec 25, 2023
dc62cd4
feat: Compatibility of __record() with GNU Bash.
takusuman Dec 30, 2023
35ad42b
feat!: Made record() not functional on Bash; recommend using map().
takusuman Dec 30, 2023
af4f7ac
chore: Use a boolean instead of comparing strings to know if record()…
takusuman Dec 30, 2023
7615001
feat!: Also require ed(1) at check_dependencies.ksh.
takusuman Jan 8, 2024
3a233a2
feat!: Also check for L.E.``mount``, since ``tasks/disk_nanagenment.k…
takusuman Jan 8, 2024
54f2d5e
fix: Check for aria2c instead of curl if it's enabled.
takusuman Jan 22, 2024
355c1dd
chore(cmd/populate_fhs.sh): More efficient string comparison.
takusuman Jan 22, 2024
1411e0e
chore(cmd/populate_fhs.sh): Formatting.
takusuman Jan 22, 2024
264226c
chore: Outsource printerr() for panic().
takusuman Jan 24, 2024
9260902
feat: Start implementing a way to "continue" a build.
takusuman Feb 8, 2024
e8840f8
docs: Bump Heirloom NG to 20240220-fix until it gets merged into mast…
takusuman Feb 27, 2024
bbf1085
chore: Fix built-in timeout() function for handling parameters with s…
takusuman Mar 25, 2024
39e8ecd
chore: Made realpath() aware of an installed readlink(1) implementation.
takusuman Mar 25, 2024
2144d9b
chore: Made nproc() aware that Heirloom's getconf(1) didn't support _…
takusuman Mar 25, 2024
b97ea56
fix: Shall not worry with globbing at realpath().
takusuman Mar 25, 2024
fdfb15c
fix: virtuadisk_path for the new realpath() implementation at posix-a…
Mar 27, 2024
3c355ef
fix: Removed rconfig() call for now at driver.ksh.
takusuman Mar 28, 2024
091465e
fix: Portabilize defined() and introduce KSH93_RELEASE macro.
takusuman Mar 28, 2024
5014e67
fix: Support for ksh93 1.0.0-beta present at Copacabana 0.4 (Develope…
takusuman Mar 28, 2024
2534751
fix: Only remove the last character from $disk_block if it's a number.
takusuman Mar 28, 2024
d14a0be
fix: ``break`` after no.
takusuman Mar 28, 2024
e7a8c05
fix: Do not call defined() in subshells because it causes an error in…
takusuman Mar 28, 2024
16fee2a
chore: Request file(1) command at check_dependencies.ksh.
takusuman Mar 28, 2024
b9fe815
fix: Try to bypass (currently) broken Heirloom ``tar`` on PATH.
takusuman Mar 29, 2024
2aa6bb3
chore: Shorten NAwk command.
takusuman Mar 29, 2024
542a699
feat: realpath()'d $d
takusuman Mar 29, 2024
a20dd3a
feat!: Start refactoring the build system.
takusuman Jul 28, 2024
37efd51
chore: Merge 542a69909114c6920ae049b538c3420f8182779a with the previo…
takusuman Jul 28, 2024
cd0db89
chore: Remove temporary copy of helpers.shi.
takusuman Jul 28, 2024
686231f
chore: Simple quotes
takusuman Jul 28, 2024
bcefab7
fix: Removed duplicated dot at _make().
takusuman Jul 28, 2024
921e69c
fix: Define OBJDIR
takusuman Jul 28, 2024
8c70a95
fix: INI parser.
takusuman Jul 31, 2024
345e2d8
feat: More refactoring.
takusuman Jul 31, 2024
53936f5
fix: Only match first '=' for confline[1] at rconfig.shi.
takusuman Aug 1, 2024
9b02f31
chore: Bullet-proofing against subshells at .INI files.
takusuman Aug 1, 2024
dbb8770
chore: Also on inicompat() at rconfig.shi.
takusuman Aug 1, 2024
766d465
chore!: Removed cmd/ and helpers/ subfolders and use just internal/.
takusuman Aug 1, 2024
3223602
docs: Package manager rebranding
takusuman Aug 2, 2024
1eacc01
chore: Short change at cmd/download_sources.ksh
takusuman Aug 21, 2024
0789b1b
Merge branch 'copaclang' of github.com:Projeto-Pindorama/copacabana i…
takusuman Aug 21, 2024
d55f6fa
chore: Another short change at cmd/download_sources.ksh
takusuman Aug 21, 2024
eb5b6c0
chore: Improve nawk command at cmd/download_sources.ksh
takusuman Aug 21, 2024
5906268
chore: shfmt'ed download_sources.ksh 3 years later
takusuman Aug 21, 2024
2648006
chore: shfmt'ed some internal code.
takusuman Aug 23, 2024
45daf43
fix: Initial quoting fix at rconfig.shi (INI parser).
takusuman Aug 23, 2024
d8dc494
fix: Definitive security patch for rconfig.shi
takusuman Aug 23, 2024
0e7756b
chore: Removed temporary test files.
takusuman Aug 23, 2024
6ab0fcd
chore: refactor sha256sum.ksh
takusuman Aug 25, 2024
a466733
chore: shfmt'ed checks/dependencies.ksh
takusuman Aug 25, 2024
ca3dd5a
fix: Return an error code if SHA256 hash doesn't match at cmd/sha256s…
takusuman Aug 26, 2024
9a0ecdd
chore: yes2bool function
takusuman Aug 26, 2024
e2daf4d
feat: Start from where it stopped at tasks/get_sources
takusuman Aug 26, 2024
3f55f23
feat: Implement method to keep track of tasks already ran at makier.ksh.
takusuman Aug 26, 2024
edbfafa
fix: unmount_and_detach as a task.
takusuman Aug 30, 2024
b96991a
feat!: Made task history file location customizable.
takusuman Aug 30, 2024
f945b8b
chore: Made aria2c verbose again and do 2 jobs per processor.
takusuman Aug 31, 2024
86a90b5
fix: clean $made file when starting over.
takusuman Aug 31, 2024
c8aedb2
fix: Deal with different $made file locations at _make()
takusuman Aug 31, 2024
af90a98
feat!: Use new log() function based on @xplshn's work.
takusuman Sep 2, 2024
e5af04e
fix: Terminal detection at check_for_colour_support() and better verb…
takusuman Sep 3, 2024
b99ee65
chore: Change log INFO to log WARN at tar check on checks/dependencies.
takusuman Sep 4, 2024
43e5a93
chore: Include log.shi before helpers.shi at build.ksh
takusuman Sep 6, 2024
6e823d4
chore: Do not format panic() error messages.
takusuman Sep 6, 2024
17e4a72
fix: log STD and log PANE
takusuman Sep 13, 2024
becb4b4
fix: log STD
takusuman Sep 13, 2024
d7229d8
feat: Writing part for building packages and sets
takusuman Sep 19, 2024
8015c0d
chore!: Remove debug echo and enter pkgs/ directory
takusuman Sep 19, 2024
b4e638a
feat!: FORGO_TASKS as a header.
takusuman Sep 19, 2024
5e97cd0
chore: Added _made to .gitignore
takusuman Sep 19, 2024
cad8251
chore: shfmt'ed cmd/populate_fhs.sh
takusuman Sep 21, 2024
504f966
fix: Call tasks/set_dirs.
takusuman Sep 21, 2024
de3da5f
chore: Do not use tracing at defined() anymore.
takusuman Sep 21, 2024
1fc1c3b
fix: $Destdir at $PKGDIR, "mkdir -p" the $Destdir before copying files.
takusuman Sep 21, 2024
6017512
fix: Create Destdir before running task
takusuman Oct 15, 2024
9e4318f
fix: dotini() sanitising for GNU sed implementation.
takusuman Oct 18, 2024
f981dc2
fix: x86_64-pc-linux-musl -> x86_64-linux-musl, UMOUNT_ON_EXIT -> tru…
takusuman Oct 18, 2024
cb3b5a9
chore: first toolchain almost complete
takusuman Oct 25, 2024
afe3462
fix: pass CFLAGS to CMake at cross/LLVM
takusuman Oct 26, 2024
1e3c5ae
fix: pass CFLAGS to CMake at cross/LLVM
takusuman Oct 26, 2024
00808af
chore: bump LLVM to 17.0.5
takusuman Nov 11, 2024
ed4b385
fix: Do not create '.N' files when downloading with aria2c.
takusuman Nov 11, 2024
1e25c13
chore: Short change
takusuman Dec 24, 2024
7bf24ae
fix: Use 'log WARN' instead of 'printerr'.
takusuman Dec 24, 2024
2e6e458
fix: Test if link exists before creating it.
takusuman Dec 24, 2024
4e6c88a
fix: Check if file exists at rconfig function.
takusuman Dec 29, 2024
0bb39f7
chore: Use temporary mussel fork that implements a --custom-vendor op…
takusuman Dec 29, 2024
8084dac
fix: mussel copaclang-temp is at our repo fork (Projeto-Pindorama/mus…
takusuman Dec 29, 2024
72b3e85
feat: Bump xz to 5.6.3, add libarchive 3.7.7.
takusuman Dec 31, 2024
86426f9
feat: Add check for GNU du.
takusuman Dec 31, 2024
b2be811
fix: Set $PATH for /llvmtools and /cgnutools at the build_set task.
takusuman Dec 31, 2024
ca61251
feat!: Refactor cmd/snapshot_stage.ksh; support "bad" directory names.
takusuman Dec 31, 2024
3c3df15
feat: Implement strsplit() at helpers.shi.
takusuman Dec 31, 2024
0061153
chore: Remove dotfiles/bashrc
takusuman Dec 31, 2024
4f11464
feat: Implement multiple architecture support.
takusuman Dec 31, 2024
c81b387
feat: Update packages/
takusuman Dec 31, 2024
6fd6bb9
chore: Moved back to firasuke's main repository for mussel.
takusuman Jan 1, 2025
eef2511
Update packages/
takusuman Jan 3, 2025
2dc5eba
Merry (late) Christmas!
takusuman Jan 3, 2025
33487d8
chore: Update packages
takusuman Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
*~
.*~
.*.swp

# Don't store build.ksh history
build-system/tasks/made.txt
_made
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "packages"]
path = packages
url = https://github.com/Projeto-Pindorama/alambiko.git
branch = copaclang
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
University of Illinois/NCSA Open Source License

Copyright (c) 2019-2023 Pindorama. All rights reserved.
Copyright (c) 2019-2025 Pindorama. All rights reserved.

Developed by: Pindorama
Caio Novais (caioyoshimura)
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# The Copacabana Linux(R) distribution
![Pindorama Copacabana Linux](https://raw.githubusercontent.com/Projeto-Pindorama/artworks/master/Pindorama%20Copacabana%20Banner/Pindorama%20Copacabana%20Banner.png)

![Pindorama Copacabana Linux](https://raw.githubusercontent.com/Projeto-Pindorama/artworks/master/Pindorama%20Copacabana%20Banner/Pindorama%20Copacabana%20Banner.png)

### *Now built with LLVM!*

Hell yeah.

|![Hell yeah](https://licensing.imageconscious.com/wp-content/uploads/sites/2/2021/01/H1753D-1.jpg) |
|:--:|
| Hell yeah |

## What is this repository about?

This repository contains most of the resources that you would need to build
Copacabana, in case a build consolidation made of small scripts that
automate the process.
This time, we're trying a build using LLVM and following a considerable part of
dslm4515's [Clang Musl Linux from Scratch](https://github.com/dslm4515/CMLFS.git)
guide for building the toolchain. We aim to both get Copacabana fully built wit
LLVM and to cooperate with CMLFS, sending patches when help needed and/or flaws
discovered in the process.
If it succeeds and presents a nice performance, this branch will be merged into
the main branch.

For more information about porting, translation, documentation etc, read
the website: http://copacabana.pindorama.dob.jp
Expand All @@ -25,7 +43,7 @@ Any other contributions are entirely accepted, for more information read the

- [Alambiko (Copacabana package repository)](https://github.com/Projeto-Pindorama/alambiko);
- [Heirloom New Generation](http://heirloom-ng.pindorama.dob.jp);
- [The Motoko Package Manager](https://github.com/Projeto-Pindorama/motoko) (**W.I.P**);
- [The Pacote Package Manager](https://github.com/Projeto-Pindorama/pacote) (**W.I.P**);
- [Mitzune](https://github.com/Projeto-Pindorama/mitzune);
- [L.E.`mount`](https://github.com/Projeto-Pindorama/lemount);
- [`isainfo`](https://github.com/Projeto-Pindorama/isainfo);
Expand Down
6 changes: 6 additions & 0 deletions build-system/fhs.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; Unless you know what you are doing, please, ignore this file
; and leave it untouched.
[File System Hierarchy]
DIRS="sbin bin boot dev etc lib lib64 opt proc run/ run/lock sys tmp"
USRDIRS="usr/ usr/sbin usr/bin usr/ccs usr/etc usr/include usr/lib usr/share/ usr/share/doc usr/share/man usr/share/misc usr/share/lib usr/skel usr/src usr/tmp"
VARDIRS="var/ var/adm var/cache var/lib/ var/lib/color var/lib/misc var/spool/ var/spool/mail"
143 changes: 0 additions & 143 deletions build-system/internals/cmd/driver.ksh

This file was deleted.

53 changes: 53 additions & 0 deletions build-system/internals/disks.shi
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# vim: set filetype=sh :
# Functions to deal with disks and filesystems.

# Copyright (c) 2023-2024 Pindorama
# Luiz Antônio Rangel
# SPDX-Licence-Identifier: NCSA

# May use this function later, no use for it for now.
function get_size_blocks {
typeset -a disk_size[2]
disk_block="$1"

# The minimum size for a block is 512KiB, not less.
# This identifier may sound a little bit erred.
readonly blocks_per_kib=512

disk_size=($(elevate fdisk -x "$disk_block" |
sed '1 s/Disk .*: \(.*\),.*,.*/\1/; 1q'))

size=${disk_size[0]}
sizeunit=${disk_size[1]}
unset disk_size

case $sizeunit in
'TiB') ((blocks = size * (blocks_per_kib * 4194304))) ;;
'GiB') ((blocks = size * (blocks_per_kib * 4096))) ;;
'MiB') ((blocks = size * (blocks_per_kib * 4))) ;;
'KiB') ((blocks = size / blocks_per_kib)) ;;
esac
unset size sizeunit

printf '%d' $blocks

return 0
}

# This checks for valid file systems on
# which Copacabana builds are made and
# tested.
function check_linuxfs {
fs=$1
err=0

case $fs in
btrfs | ext4) break ;;
default)
err=1
break
;;
esac

return $err
}
Loading