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

chore: magma debian package meta info is enhanced #14126

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

nstng
Copy link
Contributor

@nstng nstng commented Oct 11, 2022

Signed-off-by: Nils Semmelrock nils.semmelrock@tngtech.com

Summary

There is no easy way to determine if sctpd or magma debian packages were build with build type Debug or RelWithDebInfo as these options only influence build flags of the c/c++ services. Also: some meta info properties of the created debian packages are outdated or incomplete.

Change here:

  • description: use the original description, but suffix it with " - dev build" if the build type Debug was used
    • note: this was not changed yet for the bazel build! Bazel needs reproducible outputs, i.e., in this case two different targets need to be created. This will be analyzed separately. It might be more clean to change this after the debian package was created, i.e., outside of the bazel build.
  • homepage: "https://github.com/magma/magma/" (was not set before - fpm then uses a dummy value)
  • vendor: "magma" (was not set before)
    • note: not supported by the bazel build
  • license: "BSD-3-Clause" (was not set before)
    • note: not supported by the bazel build
  • maintainer: "The Magma Authors main@lists.magmacore.org" (was not set before)

Test Plan

Build sctpd and magma and check meta info via dpkg -I <package>. This can be done more easy by commenting out long running build steps in the make or bazel build.

make

output is shortened

vagrant@magma-dev:~/magma/lte/gateway/release$ ./build-magma.sh 

vagrant@magma-dev:~/magma/lte/gateway/release$ dpkg -I magma_1.8.0-1665737325-_amd64.deb 
 Package: magma
 Version: 1.8.0-1665737325-
 License: BSD-3-Clause
 Vendor: magma
 Maintainer: The Magma Authors <main@lists.magmacore.org>
 Homepage: https://github.com/magma/magma/
 Description: Magma Access Gateway

vagrant@magma-dev:~/magma/lte/gateway/release$ dpkg -I magma-sctpd_1.8.0-1665737325-_amd64.deb 
 Package: magma-sctpd
 Version: 1.8.0-1665737325-
 License: BSD-3-Clause
 Vendor: magma
 Maintainer: The Magma Authors <main@lists.magmacore.org>
 Homepage: https://github.com/magma/magma/
 Description: Magma SCTPD

vagrant@magma-dev:~/magma/lte/gateway/release$ ./build-magma.sh -t Debug

 Description: Magma Access Gateway - dev build

 Description: Magma SCTPD - dev build

bazel

output is shortened

vagrant@magma-dev:~/magma/lte/gateway/release$ bazel build //lte/gateway/release:magma_deb_pkg
vagrant@magma-dev:~/magma$ dpkg -I bazel-bin/lte/gateway/release/magma_1.8.0_amd64.deb 
 Package: magma
 Version: 1.8.0
 Maintainer: The Magma Authors <main@lists.magmacore.org>
 Description: Magma Access Gateway
 Homepage: https://github.com/magma/magma/

vagrant@magma-dev:~/magma/lte/gateway/release$ bazel build //lte/gateway/release:sctpd_deb_pkg
vagrant@magma-dev:~/magma$ dpkg -I bazel-bin/lte/gateway/release/sctpd_deb_pkg.deb     
 Package: magma-sctpd
 Version: 1.8.0
 Maintainer: The Magma Authors <main@lists.magmacore.org>
 Description: Magma SCTPD
 Homepage: https://github.com/magma/magma/

Additional Information

  • This change is backwards-breaking

Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines. label Oct 11, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: ci All updates on CI (Jenkins/CircleCi/Github Action) label Oct 11, 2022
@nstng nstng linked an issue Oct 11, 2022 that may be closed by this pull request
@github-actions
Copy link
Contributor

feg-workflow

    2 files  203 suites   39s ⏱️
374 tests 374 ✔️ 0 💤 0
388 runs  388 ✔️ 0 💤 0

Results for commit c72fc61.

@github-actions
Copy link
Contributor

dp-workflow

14 tests   14 ✔️  2m 11s ⏱️
  1 suites    0 💤
  1 files      0

Results for commit c72fc61.

@github-actions
Copy link
Contributor

agw-workflow

615 tests   611 ✔️  5m 7s ⏱️
    2 suites      4 💤
    2 files        0

Results for commit c72fc61.

@nstng nstng marked this pull request as ready for review October 14, 2022 09:08
@nstng nstng requested a review from a team October 14, 2022 09:08
@nstng nstng requested a review from a team as a code owner October 14, 2022 09:08
@nstng nstng added the DONOTLAND Please don't merge this label Oct 14, 2022
@nstng
Copy link
Contributor Author

nstng commented Oct 14, 2022

Set do not land label so that @lucasgonze (identified the issue that is handled here) has a chance to take a look.

@lucasgonze
Copy link
Contributor

lucasgonze commented Oct 14, 2022

Set do not land label so that @lucasgonze (identified the issue that is handled here) has a chance to take a look.

Thank you. I think this is a good solution because it is clear and unambiguous what a deployer should do. Leaving aside the Bazel issue, I believe this is what we would advise:

  1. Locate the package file. For example:

magma_1.8.0-1665737325-_amd64.deb

  1. List contents using dpkg -I

dpkg -I magma_1.8.0-1665737325-_amd64.deb

  1. Examine the Description: field.

Description: Magma Access Gateway

  1. If it contains "- dev build", it should not be deployed to production.

Description: Magma Access Gateway - dev build

@nstng nstng merged commit ba6e6e6 into magma:master Oct 17, 2022
@nstng nstng removed the DONOTLAND Please don't merge this label Oct 17, 2022
@lucasgonze
Copy link
Contributor

Next: let's figure out the Bazel part of this.

lucasgonze pushed a commit to lucasgonze/magma that referenced this pull request Feb 29, 2024
Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>

Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: dev label on AGW package
4 participants