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

Add builddepends metadata field to recipes #85

Closed
matteodelabre opened this issue Sep 29, 2020 · 4 comments · Fixed by #274
Closed

Add builddepends metadata field to recipes #85

matteodelabre opened this issue Sep 29, 2020 · 4 comments · Fixed by #274
Assignees
Labels
tooling Set of scripts and configuration files for building the packages

Comments

@matteodelabre
Copy link
Member

(As proposed by @Eeems on Discord.)

Some recipes require specific packages that are not provided by the Toltec Docker images. Currently, these are calculator and plato. We should add a builddepends field, similar to Arch’s makedepends, which contain be a list of Debian packages required for the build() function.

@matteodelabre matteodelabre added the tooling Set of scripts and configuration files for building the packages label Sep 29, 2020
@matteodelabre matteodelabre changed the title Add builddepends metadata field to recipes Add builddepends metadata field to recipes Sep 29, 2020
This was referenced Jan 10, 2021
@Eeems
Copy link
Member

Eeems commented Jan 14, 2021

Preferably it would also cache the image with the builddeps installed after the first run so that subsequent builds don't need to reinstall them.

@matteodelabre
Copy link
Member Author

matteodelabre commented Jan 25, 2021

I’m starting to implement this. To make things simpler, I’ll omit the optdepends and checkdepends fields from Arch’s PKGBUILDs, which could still be implemented at a later time.

  • Specifying dependencies. The depends and makedepends fields will support entries of the form: type:name<=>version, where
    • type is one of apt (for installing dependencies from Debian, can only be specified in the makedepends field) or opkg (for installing dependencies from Entware or Toltec),
    • name is the package name to install,
    • <=> is an optional version comparator from <, <=, =, => or >,
    • version is an optional version constraint.
  • Building packages. Before invoking the prepare() and build() functions, the build script will make sure that all the required Debian, Entware and Toltec packages are installed in the Docker container’s $SYSROOT directory. If a required Toltec package is not yet available, the build of that package is triggered first.
  • Support for split packages. Only dependencies declared at the top-level of a split package recipe will be enforced before starting the build. A split recipe cannot declare a top-level makedepends on one of the packages it generates.

@matteodelabre
Copy link
Member Author

Also, regarding #170 (comment), I’m thinking that the prepare() function should be moved to run inside the Docker container. Thoughts?

@Eeems
Copy link
Member

Eeems commented Jan 25, 2021

Perhaps, this will allow us to have access to more tools out of the gate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Set of scripts and configuration files for building the packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants