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

[Feature request]: Create a symlink to currently building module dir (FLATPAK_BUILDER_BUILDDIR) #488

Open
2 tasks done
tinywrkb opened this issue Aug 26, 2022 · 1 comment

Comments

@tinywrkb
Copy link

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Suggestion

The current building module dir, /run/build/ModuleName is unique and different for each module.
While FLATPAK_BUILDER_BUILDDIR environment variable is available in the building instance, it can't be used in the env property.
I suggest adding the symlink /run/build/.current that will point to /run/build/ModuleName.

This will help avoid having to set per-module environment variables, like these used for building Node.js modules, Golang, etc. Instead, it would be possible to set these variables globally or using a YAML alias, making the Flatpak manifest shorter, more concise, and require less maintenance.

@tinywrkb
Copy link
Author

tinywrkb commented Aug 26, 2022

p.s. my current solution is to use eval.

x-golang-offline-build-options: &golang-offline-build-options
  env:
    GO111MODULE: off
    GOVARS: GOBIN=${FLATPAK_DEST}/bin GOPATH=${FLATPAK_BUILDER_BUILDDIR}
x-golang-online-build-options: &golang-online-build-options
  build-args:
    - --share=network
  env:
    GO111MODULE: off
    GOVARS: GOBIN=${FLATPAK_DEST}/bin GOPATH=${FLATPAK_BUILDER_BUILDDIR}
...
  - name: modname
    build-options: *golang-offline-build-options
   #build-options: *golang-online-build-options
    buildsystem: simple
    build-commands:
     #- eval ${GOVARS} go get; exit 1 # ONLINE-BUILD
      - eval ${GOVARS} go install # OFFLINE-BUILD
    sources:
      - type: archive
...
      - modname-go-sources.json # OFFLINE-BUILD, flatpak-go-get-generator.py -o modname-go-sources.json ./
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants