Skip to content

Commit

Permalink
Merge pull request #14 from RandomCoderOrg/v1.1-fixes
Browse files Browse the repository at this point in the history
V1.1 fixes
  • Loading branch information
SaicharanKandukuri authored Jan 15, 2022
2 parents 32d125e + 8345b7a commit dab42b4
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 148 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 5 additions & 1 deletion .github/workflows/build-udroid.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build-udroid
on: [push]
on:
push:
paths:
- '**.sh'
- '**.yml'
jobs:
BuildImpishRaw:
name: build impish
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# fs-cook
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook?ref=badge_shield)
A project written in bash to make linux tarball building process easier

[![RawBuildTest](https://github.com/RandomCoderOrg/fs-cook/actions/workflows/build-raw.yml/badge.svg)](https://github.com/RandomCoderOrg/fs-cook/actions/workflows/build-raw.yml)
| | badges |
|--|-- |
|build tests ( `impish`, `hirsute`, `jammy` ) | [![build-udroid](https://github.com/RandomCoderOrg/fs-cook/actions/workflows/build-udroid.yml/badge.svg)](https://github.com/RandomCoderOrg/fs-cook/actions/workflows/build-udroid.yml) |
| FOSS LICENSE | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook?ref=badge_shield)
|

[DEV] Linux tarball building
> ⚠️ warning this code is heavily experimental & work in progress!
>
> most of the feature/code may not work
## What this can do
- can build any latest ubuntu & debian varients
- supports cross architecture building ( requires `binfmt-support` enabled in kernel )
- make fetch, build, pack process easier

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FRandomCoderOrg%2Ffs-cook?ref=badge_large)
27 changes: 15 additions & 12 deletions build-impish-raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
# export variable SUITE to set debootstrap suite name (default: hirsute)

source plugins/envsetup
source plugins/colors

export OVERRIDER_COMPRESSION_TYPE
export SUITE
export ENABLE_EXIT
export ENABLE_USER_SETUP

frn="out/impish-raw"
OVERRIDER_COMPRESSION_TYPE="gzip"
SUITE="impish"
frn="out/${SUITE}-raw"
OVERRIDER_COMPRESSION_TYPE="gzip"
ENABLE_EXIT=true
ENABLE_USER_SETUP=false

Expand Down Expand Up @@ -60,13 +59,17 @@ EOF

}

do_build "${frn}-arm64" arm64
do_compress "${frn}-arm64"
do_build "${frn}-armhf" armhf
do_compress "${frn}-armhf"
do_build "${frn}-amd64" amd64
do_compress "${frn}-amd64"
do_build "${frn}-arm64" arm64
do_compress "${frn}-arm64"
do_build "${frn}-armhf" armhf
do_compress "${frn}-armhf"
do_build "${frn}-amd64" amd64
do_compress "${frn}-amd64"

do_unmount "${frn}-arm64"
do_unmount "${frn}-armhf"
do_unmount "${frn}-amd64"

shout "Build complete"
ls ${frn}*tar*

do_unmount "${frn}-arm64"
do_unmount "${frn}-armhf"
do_unmount "${frn}-amd64"
70 changes: 70 additions & 0 deletions build-jammy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
#shellcheck disable=SC1091

# this is an example file to BUILD raw file system
# export variable SUITE to set debootstrap suite name (default: hirsute)

source plugins/envsetup

export OVERRIDER_COMPRESSION_TYPE
export SUITE
export ENABLE_EXIT
export ENABLE_USER_SETUP

SUITE="jammy"
frn="out/$SUITE-raw"
OVERRIDER_COMPRESSION_TYPE="gzip"
ENABLE_EXIT=true
ENABLE_USER_SETUP=false

additional_setup() {
cat <<- EOF > $chroot_dir/etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb $MIRROR $SUITE main restricted
# deb-src $MIRROR $SUITE main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb $MIRROR $SUITE-updates main restricted
# deb-src $MIRROR $SUITE-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb $MIRROR $SUITE universe
# deb-src $MIRROR $SUITE universe
deb $MIRROR $SUITE-updates universe
# deb-src $MIRROR $SUITE-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb $MIRROR $SUITE multiverse
# deb-src $MIRROR $SUITE multiverse
deb $MIRROR $SUITE-updates multiverse
# deb-src $MIRROR $SUITE-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb $MIRROR $SUITE-backports main restricted universe multiverse
# deb-src $MIRROR $SUITE-backports main restricted universe multiverse
EOF

}

do_build "${frn}-arm64" arm64
do_compress "${frn}-arm64"
do_build "${frn}-armhf" armhf
do_compress "${frn}-armhf"
do_build "${frn}-amd64" amd64
do_compress "${frn}-amd64"

do_unmount "${frn}-arm64"
do_unmount "${frn}-armhf"
do_unmount "${frn}-amd64"

shout "Build complete..."
ls $frn*tar*

74 changes: 0 additions & 74 deletions build-kali-big.sh

This file was deleted.

47 changes: 0 additions & 47 deletions build-kali-raw.sh

This file was deleted.

24 changes: 12 additions & 12 deletions cook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
# export variable SUITE to set debootstrap suite name (default: hirsute)

source plugins/envsetup
source plugins/colors

export OVERRIDER_COMPRESSION_TYPE
export ENABLE_EXIT
export ENABLE_USER_SETUP
# export FS_USER
# export FS_PASS

frn="out/hirsute-raw"
OVERRIDER_COMPRESSION_TYPE="gzip"
Expand Down Expand Up @@ -59,13 +56,16 @@ deb $MIRROR $SUITE-backports main restricted universe multiverse
EOF
}

do_build "${frn}-arm64" arm64
do_compress "${frn}-arm64"
do_build "${frn}-armhf" armhf
do_compress "${frn}-armhf"
do_build "${frn}-amd64" amd64
do_compress "${frn}-amd64"
do_build "${frn}-arm64" arm64
do_compress "${frn}-arm64"
do_build "${frn}-armhf" armhf
do_compress "${frn}-armhf"
do_build "${frn}-amd64" amd64
do_compress "${frn}-amd64"

do_unmount "${frn}-arm64"
do_unmount "${frn}-armhf"
do_unmount "${frn}-amd64"
do_unmount "${frn}-arm64"
do_unmount "${frn}-armhf"
do_unmount "${frn}-amd64"

shout "Build Complete.."
ls ${frn}*tar*

0 comments on commit dab42b4

Please sign in to comment.