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 extra builds to test for reproducible builds #3129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions osclib/stagingapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,17 @@ def create_adi_project(self, name, use_frozenlinks=False, src_prj=None):
<arch>x86_64</arch>
</repository>"""

reproducible_builds_repos = f"""
<repository name="rb_future1y">
Copy link
Member

Choose a reason for hiding this comment

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

what would be the most descriptive name? maybe standard_1yinfuture ?

<path project="{name}" repository="standard"/>
<arch>x86_64</arch>
</repository>
<repository name="rb_j1">
Copy link
Member

Choose a reason for hiding this comment

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

so that's testing with -j1 ? how much slowdown is that causing?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://rb.zq1.de/compare.factory/reproducible.json has duration values for -j1 and -j4 .
For most smaller packages, it does not make much of a difference, because non-build times make up for the majority of time.
For MozillaFirefox, it says

      "build_duration"  : 39489,
      "build_duration4" : 22782,

and for bash

      "build_duration"  : 363,
      "build_duration4" : 274,

However, nothing needs to block on this build to finish.

<path project="{name}" repository="standard"/>
<arch>x86_64</arch>
</repository>
"""

meta = f"""
<project name="{name}">
<title></title>
Expand All @@ -1441,6 +1452,7 @@ def create_adi_project(self, name, use_frozenlinks=False, src_prj=None):
<path project="{self.cstaging}" repository="standard"/>
<path project="{self.project}" repository="standard"/>
</repository>
{reproducible_builds_repos}
{images_repo}
{containerfile_repo}
</project>"""
Expand All @@ -1456,6 +1468,27 @@ def create_adi_project(self, name, use_frozenlinks=False, src_prj=None):
# put twice because on first put, the API adds useless maintainer
http_PUT(url, data=meta)

prjconf = textwrap.dedent("""
# prjconf for testing reproducible builds:
BuildFlags: nodisturl
Release: 1.1

%if %_repository == "rb_future1y"
Support: reproducible-faketools-futurepost
%endif

%if %_repository == "rb_j1"
Support: reproducible-faketools-j1
%endif

Macros:
%distribution reproducible
:Macros
# end of reproducible builds part
""")
url = make_meta_url('prjconf', name, self.apiurl)
http_PUT(url, data=prjconf)

self.register_new_staging_project(name)

if use_frozenlinks:
Expand Down
Loading