build/lib
Miouyouyou 4b9e62fce0
Desktop/CLI build system : Moving arch/families/boards specificities to config/optional (#2648)
* Dockerfile: Fix uuidgen not found during build

By adding uuid-runtime to the list of packages to install.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* Refactor: Starting to remove duplicated code for list cleanup

That way we can use ONE function that actually works for
cleaning lists.
This list cleanup function lets people format their packages
lists like they want (spaces, tabs, carriage returns), making
them easier to maintain.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* Refactor: A bit more cleanup

Now, the code should start to be "readable" in configuration.sh,
while providing the abilities to setup packages files with tabs,
spaces, carriages returns and anything that can be recognized as
a "space" character.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* configuration: coherent board subdirs paths for CLI and Deboostrap

So now we have :
* debootstrap
* debootstrap/custom/boards/${BOARD}
* debootstrap/config_${CONFIG_SELECTED}
* debootstrap/config_${CONFIG_SELECTED}/custom/boards/${BOARD}

* main
* main/custom/boards/${BOARD}
* main/config_${SELECTED_CONFIGURATION}
* main/config_${SELECTED_CONFIGURATION}/custom/boards/${BOARD}

Which is coherent with how board specific subdirs work with
Desktop environments and appgroups.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* configuration: Fixed Debootstrap packages concat and PACKAGE_LIST_RM

The aggregation of Debootstrap packages list should not glue packages
names together now.

Also the PACKAGE_LIST_RM content will be added to the packages.remove
files content, instead of being overwritten by them.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* new_builder: Sourcing files from config/optional

This is still quite untested, since each test take roughly an hour
to execute. I'm currently retesting the addition of APT sources,
since the functions used have been modified.
Still, so far, it seems to works.

Anyway, the system has been modified to avoid, at much as possible,
the duplication of build related files, and put everything related
to specific boards inside a directory located at config/optional,
instead of putting this as a custom/boards subdirectory inside
desktop environments and appgroups.

So now, the base directories used to source build files are :

	${SRC}/config
	${SRC}/config/optional/_any_board/_configs
	${SRC}/config/optional/architectures/${ARCH}/_config
	${SRC}/config/optional/families/${LINUXFAMILY}/_config
	${SRC}/config/optional/boards/${BOARD}/_config

New subfolders have been added, to reduce the duplication :

* desktop/_all_distributions, cli/_all_distributions
  Sourced for all distributions, which should make it easier to
  put build files that are directly linked to any distribution
  (wallpapers packages, for example)
* desktop/${RELEASE}/environments/_all_environments,
  desktop/_all_distributions/environments/_all_environments
  When building for desktop, this is sourced for any desktop
  environment used.

With these additions, if you're building a desktop image, with
XFCE "base" as your default desktop environment, the system
will look for 'packages' files in these different paths :

config/desktop/_all_distributions/environments/_all_environments/packages
config/desktop/_all_distributions/environments/xfce/packages
config/desktop/_all_distributions/environments/xfce/config_base/packages
config/desktop/focal/environments/_all_environments/packages
config/desktop/focal/environments/xfce/packages
config/desktop/focal/environments/xfce/config_base/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/_all_environments/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/xfce/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/_any_board/_configs/desktop/focal/environments/_all_environments/packages
config/optional/_any_board/_configs/desktop/focal/environments/xfce/packages
config/optional/_any_board/_configs/desktop/focal/environments/xfce/config_base/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/_all_environments/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/xfce/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/xfce/config_base/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/_all_environments/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/xfce/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/xfce/config_base/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/_all_environments/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/xfce/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/xfce/config_base/packages

That said, currently the configuration files that were put inside
custom/boards subdirectories are still not transferred to the new
directories.
This will be done in the next commit.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* new_builder: Moved custom/boards scripts to their new places

The paths... are getting longer actually, which isn't a good thing.
But I wanted to keep the same directory structure "config/desktop"
and "config/cli" structure inside the arch, families and boards
specific directories.

Anyway, the scripts are now factorized in single specific locations,
which reduce the amount of copy-paste and errors appearing here and
there.

That said, this remains to be actually tested, since I don't have
a Pinebook Pro.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>

* new_builder: Tested and approved... on Nano PC T4 only

I don't have a Pinebook anyway, so yeah.

Still, this works and this should allow maintainers to
put all the files related to a specific board builds,
in various specific folders, located in config/optional .

Note that you can actually put any file in the various
config/optional/{architectures,families,boards} subdirectories.
The subdirectory _config is named like this to avoid any
name conflict with other directories you might add.
So, for example, inside config/optional/boards/nanopct4,
you can add a subdirectory named 'desktop_skels' and
copy you various desktop default configurations from this
subdirectory.
I still leave the layout of these subdirectories up to
the various maintainers. The only subdirectory that is
actually sampled by the build scripts is "_config".

Additional package for appgroups, that are dependent of the
selected desktop environment, are now sampled from :

* desktop/_all_distributions/environments/${DESKTOP_ENVIRONMENT}/appgroups
* desktop/${RELEASE}/environments/${DESKTOP_ENVIRONMENT}/appgroups

This makes it easier to understand what packages will be
installed when selecting a desktop environment, instead of
having to check each individual appgroup subdirectory.
So everything related to a specific desktop environment stays
in its folder.

This change leads to 'custom' subdirectories being entirely useless,
which means that you should remove them now.

Anyway, I'm sure there are still parts I haven't checked,
so feel free to play with this and give it a try.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
2021-02-22 23:27:24 +01:00
..
build-all-ng.sh Merge branch 'master' into desktop 2021-01-30 00:33:06 +01:00
chroot-buildpackages.sh Add Debian SID as CSC target, tested with desktop build 2020-12-03 10:04:53 +01:00
compilation-prepare.sh Bump DEV kernels to 5.11.y (#2636) 2021-02-17 01:36:25 +01:00
compilation.sh Merge branch 'master' into desktop 2021-01-20 12:26:15 +01:00
configuration.sh Desktop/CLI build system : Moving arch/families/boards specificities to config/optional (#2648) 2021-02-22 23:27:24 +01:00
debootstrap.sh Merge branch 'master' into desktop 2021-02-22 21:36:42 +00:00
desktop.sh Desktop/CLI build system : Moving arch/families/boards specificities to config/optional (#2648) 2021-02-22 23:27:24 +01:00
distributions.sh Merge branch 'master' into desktop 2021-01-23 09:16:32 +01:00
fel-load.sh Shellcheck fixes (#2034) 2020-06-18 10:06:21 -04:00
general.sh Minor grammar fix, remove deprecated Bionic hint 2021-02-22 13:57:41 +01:00
image-helpers.sh Merge branch 'master' into desktop 2021-01-25 13:25:06 +01:00
main.sh Merge branch 'master' into desktop 2021-02-18 21:05:59 +01:00
makeboarddeb.sh Merge branch 'master' into desktop 2021-02-03 22:09:22 +01:00