Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Rework of the whole folder architecture #26

Merged
merged 6 commits into from Aug 6, 2022

Conversation

Miouyouyou
Copy link
Member

@Miouyouyou Miouyouyou commented Jul 22, 2022

In order to package the modules correctly, a package-manager specific
directory architecture has been put in place.

I'll write the documentation by the end of the day.

Still, the whole idea to have something like that, inside the module
directory :

  • armbian`
    • DEPS : Global installation dependencies
    • DEPS.build : Dependencies only required to build the actual
      module project
    • BUILD.sh : The script run at the module root directory to
      build the whole module.
    • POSTINST.sh : Global Post-installation script
    • all-archs/
    • cli/
    • DEPS : Cli specific dependencies
    • module/ : Module files copied on the harddrive...
    • gui/
    • POSTINST.sh : GUI specific Post-installation script
    • DEPS : GUI specific dependencies
    • module/ : Module files copied on the harddrive...
    • armv7/ : ARMv7 specific modules
    • aarch64 : ARMv8 64 bits specific modules
    • aarch64.rockchip : ARMv8 64 bits specific modules for Rockchip

The packager only needs to install :

  • armbian/DESC* to /usr/share/armbian/configurator/modules/${module_name}
  • armbian/${most_specific_architecture}/cli/module to /usr/share/armbian/configurator/modules/${module_name}/cli
  • If they exist :
    • armbian/${most_specific_architecture}/tui/module to /usr/share/armbian/configurator/modules/${module_name}/tui
    • armbian/${most_specific_architecture}/gui/module to /usr/share/armbian/configurator/modules/${module_name}/gui

The packaging script is not ready at the moment, though...

Notes :

First, note that the architectures directories are not required
per-se. You can go with only "all-archs". Only create an "armv7"
directory if it makes sense for you to have a Armv7 specific
module.
This is generally the case if the module needs to be built for
a specific architecture.

Second, while the files (DEPS, POSTINST.sh, ...) are concatenated,
each architecture is independent, and the packaging script WILL NOT
OVERLAY ARCHITECTURES DIRECTORIES.
Meaning that identical module files need to copied over and over, in each
individual architecture directory.

Signed-off-by: Myy Miouyouyou myy@miouyouyou.fr

There's still a lot of things I'll have to figure out here.

Currently, the whole directory is mixed bag of everything,
with packaging, execution, different modes being mixed
together into one folder.

I'm trying to separate packaging from execution, while
also separating different architectures.

Then I'll have to script the packaging nicely and test
the whole thing once installed.

The final idea is that, you'll need to have some kind
of "build" phase for any module, where you put the
files in the right folders.
I'll try to keep the number of folders as low as possible,
but still, the build phase seems unavoidable, in order to have
a clean source directory.

For simple modules, that will just mean that you'll basically code
inside the build directories, just like it's being done now.
For complex modules, that will mean the addition of a build phase in
your Makefile, CMakeFiles, meson, gradle, whatever... in order to
generate all the folders for different architectures.

Then the packaging system will just package each folder as
module M for architecture A.
This allow people using compiled languages to provide proper
executables for each architecture, obviously.
This also makes things normal and simpler in terms of sources
management.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
A lot of things changed.

Now the only files necessary are :

* module_name / DESC
* module_name / cli / module

For additional modes, you can add :

* module_name / gui / module
* module_name / tui / module

And that should do the trick.

All the 'armbian' things are being moved to the packaging directory
architecture, which will come with the next update.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
The configuraiton now works by default.
Such progress...

It also provides a nginx installation, so that the user
can just go on its port 80 and check for the nice
message.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
@Miouyouyou Miouyouyou changed the title docker: haproxy: Fixed the configuration Rework of the whole folder architecture Aug 6, 2022
@Miouyouyou Miouyouyou added the breaking change Change will impact existing code or configs that aren't adjusted label Aug 6, 2022
@Miouyouyou
Copy link
Member Author

The new patches introduce BREAKING CHANGES. If you could test the whole thing before merging, this would help.

@Miouyouyou
Copy link
Member Author

Also note that I won't be there until the start of September. I'll push the documentation of the new architecture today.
But I won't have any script ready for the packaging.

@igorpecovnik igorpecovnik merged commit de73623 into armbian:main Aug 6, 2022
In order to package the modules correctly, a package-manager specific
directory architecture has been put in place.

The whole idea to have something like that, inside the module
directory :

* armbian
  * DEPS : Global installation dependencies
  * DEPS.build : Dependencies only required to build the actual
    module project
  * BUILD.sh : The script run at the module root directory to
    build the whole module.
  * POSTINST.sh : Global Post-installation script
  * all-archs/
   * cli/
    * DEPS : Cli specific dependencies
    * module/ : Module files copied on the harddrive...
   * gui/
    * POSTINST.sh : GUI specific Post-installation script
    * DEPS : GUI specific dependencies
    * module/ : Module files copied on the harddrive...
  * armv7/ : ARMv7 specific modules
  * aarch64 : ARMv8 64 bits specific modules
  * aarch64.rockchip : ARMv8 64 bits specific modules for Rockchip

First, note that the architectures directories are not required
per-se. You can go with only "all-archs". Only create an "armv7"
directory if it makes sense for you to have a Armv7 specific
module.
This is generally the case if the module needs to be built for
a specific architecture.

Second, while the files (DEPS, POSTINST.sh, ...) are concatenated,
each architecture is independant, and the packaging script WILL NOT
OVERLAY THEM.
Meaning that the module files need to copied over and over, in each
invidiual architecture directory.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
In order to package the modules correctly, a package-manager specific
directory architecture has been put in place.

The whole idea to have something like that, inside the module
directory :

* armbian
  * DEPS : Global installation dependencies
  * DEPS.build : Dependencies only required to build the actual
    module project
  * BUILD.sh : The script run at the module root directory to
    build the whole module.
  * POSTINST.sh : Global Post-installation script
  * all-archs/
   * cli/
    * DEPS : Cli specific dependencies
    * module/ : Module files copied on the harddrive...
   * gui/
    * POSTINST.sh : GUI specific Post-installation script
    * DEPS : GUI specific dependencies
    * module/ : Module files copied on the harddrive...
  * armv7/ : ARMv7 specific modules
  * aarch64 : ARMv8 64 bits specific modules
  * aarch64.rockchip : ARMv8 64 bits specific modules for Rockchip

First, note that the architectures directories are not required
per-se. You can go with only "all-archs". Only create an "armv7"
directory if it makes sense for you to have a Armv7 specific
module.
This is generally the case if the module needs to be built for
a specific architecture.

Second, while the files (DEPS, POSTINST.sh, ...) are concatenated,
each architecture is independant, and the packaging script WILL NOT
OVERLAY THEM.
Meaning that the module files need to copied over and over, in each
invidiual architecture directory.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Change will impact existing code or configs that aren't adjusted
Development

Successfully merging this pull request may close these issues.

None yet

2 participants