Skip to content

Introduce devtools/dist-tarball.sh, centralize cmake version-files#861

Merged
pstorz merged 4 commits intobareos:masterfrom
arogge:dev/arogge/master/tarball-generator
Jul 2, 2021
Merged

Introduce devtools/dist-tarball.sh, centralize cmake version-files#861
pstorz merged 4 commits intobareos:masterfrom
arogge:dev/arogge/master/tarball-generator

Conversation

@arogge
Copy link
Member

@arogge arogge commented Jun 24, 2021

This PR adds a tool to generate a xz-compressed tarball from a clone of the bareos repository. For a given commit and version (may depend on git tags) the same exact tarball will be created every time.

The PR also centralizes the previously scattered (i.e. in core and webui) version handling into the toplevel cmake directory.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@arogge arogge added the nobuild label Jun 24, 2021
@arogge arogge requested a review from pstorz June 24, 2021 17:39
@arogge arogge marked this pull request as draft June 24, 2021 17:39
@arogge arogge removed the nobuild label Jun 24, 2021
@arogge arogge force-pushed the dev/arogge/master/tarball-generator branch from 9bb0738 to 3da8e91 Compare June 24, 2021 18:04
@pstorz pstorz self-assigned this Jul 1, 2021
@pstorz pstorz changed the title Add tarball-generator, merge version-handling into top directory Introduce devtools/dist-tarball.sh, merge cmake version handling into top directory Jul 2, 2021
@pstorz pstorz changed the title Introduce devtools/dist-tarball.sh, merge cmake version handling into top directory Introduce devtools/dist-tarball.sh, centralize cmake version-files Jul 2, 2021
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have these points:

  • bareos-check-sources --since-merge complains in 5 files baout copyright year and copyright missing
  • I am not sure if we want/need some documentation update?
  • I changed the title of the PR, hopefully to the better.
  • I found one trailing whitespace (as change suggestion)
  • I thing it makes sense to add at least one line to the CHANGELOG.md

(echo -ne 'cmake/BareosVersion.cmake\0'; "$git" ls-files -z) | \
"$sort" -u -z | \
"$tar" "${args[@]}" -cf - --files-from - | \
"$xz" -c -6 > "${archive_file}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$xz" -c -6 > "${archive_file}"
"$xz" -c -6 > "${archive_file}"

arogge added 4 commits July 2, 2021 14:22
Previously version-handling was done in webui and core subdirectories,
so we could build the subdirectories individually. As we don't support
building subdirectories anymore, the cmake code duplicated in webui and
core subdirectories is now merged into the toplevel cmake directory.
This patch adds a new devtool called dist-tarball.sh that creates a
reproducible xz-compressed tarball from a cloned git repository.
@arogge arogge force-pushed the dev/arogge/master/tarball-generator branch from 3da8e91 to 95e6e72 Compare July 2, 2021 12:38
@arogge arogge marked this pull request as ready for review July 2, 2021 12:40
@arogge arogge requested a review from pstorz July 2, 2021 12:40
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@pstorz pstorz merged commit f6455ad into bareos:master Jul 2, 2021
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

Successfully merging this pull request may close these issues.

2 participants