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

Conversation

bmwiedemann
Copy link
Member

@bmwiedemann bmwiedemann commented Aug 5, 2024

This helps slow down introduction of new issues into Factory.

See https://reproducible-builds.org/ for why this is good.

This needs added prjconf in a central place:

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

%if %_repository == "rb_j1"
VMinstall: reproducible-faketools-j1
BuildFlags: nochecks
%endif

BuildFlags: nodisturl
Release: 1.1

Macros:
%distribution reproducible
:Macros

The nochecks part is optional.

@DimStar77
Copy link
Contributor

%if %_repository == "rb_j1" tends to not work across project boundaries, a <path> element makes prjconf from the parent being included (good) - but it resets %_repository the the repository name of the <path> element, thus not having the effect you expect here.

This needs to be replicated to all staging projects (incl. the dynamically setup adi projects)

e.g. osc buildconfig openSUSE:Factory:Staging:M standard | grep "%_repository"

@DimStar77
Copy link
Contributor

how are the results from rb_future1y and rb_j1 compared to be rebuildable? They merely seem to test that 'they build in the future and with -j1, but there seems to be no test so far to ensure they 'are the same' ?

@bmwiedemann
Copy link
Member Author

I pushed an extra commit to add prjconf in the script.

osclib/stagingapi.py Outdated Show resolved Hide resolved
This helps slow down introduction of new issues into Factory.

See https://reproducible-builds.org/ for why this is good.
to build bit-identical rpms in extra repos
to test easily for reproducible builds
in a to-be-created bot.
<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.

@@ -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 ?

@DimStar77
Copy link
Contributor

As discussed this morning, the reproducible state should be used for informational purpose (to start with) and not be blocking. Later on we can probably let the bot accept on confirmed or ask a human for confirmation when not confirmed.

To not block when any of the reproducible builds fail (e.g timebomb in > 1 year) we discussed moving the reproducible builds out of the 'staging dashboard observed areas;

e.g openSUSE:Factory:Staging:adi:65:reproducible (redoing what adi:65 does)

This meta and prjconf snippets worked in my experiments:

prj meta:

<project name="openSUSE:Factory:Staging:adi:65:reproducible">
  <title/>
  <description/>
  <link project="openSUSE:Factory:Staging:adi:65"/>
  <url>/staging_workflows/openSUSE:Factory/staging_projects/openSUSE:Factory:Staging:adi:65</url>
  <person userid="dimstar" role="maintainer"/>
  <group groupid="factory-staging" role="maintainer"/>
  <publish>
    <disable/>
  </publish>
  <debuginfo>
    <enable/>
  </debuginfo>
  <repository name="rb_j1" linkedbuild="all">
    <path project="openSUSE:Factory:Staging" repository="standard"/>
    <path project="openSUSE:Factory" repository="standard"/>
    <arch>x86_64</arch>
  </repository>
  <repository name="rb_future1y" linkedbuild="all">
    <path project="openSUSE:Factory:Staging" repository="standard"/>
    <path project="openSUSE:Factory" repository="standard"/>
    <arch>x86_64</arch>
  </repository>
</project>

prjconf

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

%if "%_repository" == "rb_j1"
Required: reproducible-faketools-j1
BuildFlags: nochecks
%endif

BuildFlags: nodisturl
Release: 1.1

Macros:
%distribution reproducible

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.

3 participants