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

feat(build-debian): Use docker to manually run build and prepare steps and add tests #28

Merged
merged 23 commits into from
Nov 13, 2024

Commits on Nov 12, 2024

  1. ci(go): generate: Use go mod edit to install properly versioned tools

    Parse the tools using jq so that we can easily get the tool path and
    version and install the one explicitly requested
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    2852f91 View commit details
    Browse the repository at this point in the history
  2. Revert "ci(go): generate: Use go mod edit to install properly version…

    …ed tools"
    
    This reverts commit f4c4e2b.
    didrocks authored and 3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    72d2374 View commit details
    Browse the repository at this point in the history
  3. Make debian version compliant

    Fix warnings related to:
    - Version number
    - File too long
    - No contributor name
    - Extra whitespace around name
    EduardGomezEscandell authored and 3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    b6025d3 View commit details
    Browse the repository at this point in the history
  4. workflows: Add workflow to test build-deb action

    We don't fully support source builts for non-native packages yet though,
    so ignore the error for now
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    8cf7a2d View commit details
    Browse the repository at this point in the history
  5. build-debian: Clarify what artifacts are for

    Artifacts could be exposed by various other composed jobs so make this
    clearer for binary packages too
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    be6482d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    615b454 View commit details
    Browse the repository at this point in the history
  7. build-debian: Use manual docker build for source package

    This allows us to have more control on the volumes we mount in
    docker and on the location of the source path.
    
    And permits us to properly mount the parent folder of the source
    that we need to access to read the .orig files for non-native
    packages.
    
    It comes as a little extra cost, but also it give us way more
    control on the builder instance.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    79874f4 View commit details
    Browse the repository at this point in the history
  8. build-debian: Expose the extra source build-deps as parameter

    In general when building sources we should not need anything else a part
    what is in build-depends, but for some packages we may need some extra
    packages such as ca-certificates or git.
    
    So, expose these values as extra-source-build-deps input.
    
    This option should actually be unset by default, but we don't yet not to
    break existing packages, but we should change it ASAP so that it depends
    on each repo needs.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    dc4a92e View commit details
    Browse the repository at this point in the history
  9. build-debian: Upload source package as artifact

    It may be useful for debugging purposes, so upload it once it's ready
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    c00a6bd View commit details
    Browse the repository at this point in the history
  10. build-debian: Use manual docker run to build the debian packages

    For some reason using jtdor/build-deb-action@v1 does not work well
    with some rust builds we have, so re-implement it using some manual
    labor. It's not really much work and it will allow us more control.
    
    Other than, working authd builds.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    8783687 View commit details
    Browse the repository at this point in the history
  11. build-debian: Build the package as user

    When building debian packages we should not have high privileges, so
    let's just use an unprivileged user to perform the binary build.
    
    It's not too needed for source builds, since those are not really
    doing tests or anything where having root privileges may lead to
    different behavior
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    7cf3c3c View commit details
    Browse the repository at this point in the history
  12. build-debian: Fully disable internet access during packages build

    Ensure that internet access is completely disabled for builder user
    when creating the binary package.
    
    This is something that we somewhat had implicitly for HTTPS only since
    ca-certificates were not installed.
    
    But let's ensure this in any case.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    e55e0e5 View commit details
    Browse the repository at this point in the history
  13. build-debian: Add DEB_BUILD_OPTIONS input

    It allows to perform special builds (such as nocheck ones), so expose
    it in case, for example, one may want to build without running tests.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    63e270e View commit details
    Browse the repository at this point in the history
  14. build-debian: Use docker container also to prepare the source package

    In this way we can use the proper distro version number
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    a28fcbf View commit details
    Browse the repository at this point in the history
  15. build-debian: Use more featured version number if in a git repo

    In case a git repository is setup, then use version number that
    includes the revision list and use actual author name
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    bd363d7 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f19243d View commit details
    Browse the repository at this point in the history
  17. build-debian: Show binaries contents and info after building

    It can provide some quick information about what's in the packages
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    39b462f View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2c964f1 View commit details
    Browse the repository at this point in the history
  19. build-debian: Ensure we show group message as first thing

    So that github groups things better
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    f3c75c6 View commit details
    Browse the repository at this point in the history
  20. Revert "build-debian: Add DEB_BUILD_OPTIONS input"

    This reverts commit 3f55310.
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    f17b5d9 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    3336955 View commit details
    Browse the repository at this point in the history
  22. debian-build: Use version number so that it can override last release

    Use a +git syntax and there we use incremental version values.
    
    Finally add the distro version as a minor factor, so that builds on the
    same code for different distros only rely on that
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    005736a View commit details
    Browse the repository at this point in the history
  23. build-debian: Install fakeroot by default

    Since we're building as user
    3v1n0 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    542f160 View commit details
    Browse the repository at this point in the history