After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797048 - cerbero: Implement --offline for package and build
cerbero: Implement --offline for package and build
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
unspecified
Other All
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-08-30 00:03 UTC by Nirbheek Chauhan
Modified: 2018-08-31 10:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cerbero: Implement --offline for package and build (10.64 KB, patch)
2018-08-30 00:03 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2018-08-30 00:03:17 UTC
This forces Cerbero to not attempt to update anything over the network, especially git repositories. Very useful for reproducible builds.

The remaining bit is implementing it for bootstrap, which is much more complicated.
Comment 1 Nirbheek Chauhan 2018-08-30 00:03:23 UTC
Created attachment 373503 [details] [review]
cerbero: Implement --offline for package and build

This forces Cerbero to not attempt to update anything over the network,
especially git repositories. Very useful for reproducible builds.

The remaining bit is implementing it for bootstrap, which is much more
complicated.
Comment 2 Nicolas Dufresne (ndufresne) 2018-08-30 02:36:42 UTC
I don't think it's related to reproducible builds. A reproducible build is just a build where all the versions has been fixated. It does not matter if you are online or offline. This should already be happening with the with the CI builds, since the only unfixed version should be the one of GStreamer repository, and we do fixate the versions there from the manifest when doing these builds. The bundle_source is also a much more powerful method to archive the build in a way that it can be reproduced, and also reproduced offline.

That being said, I'm fine if you want to add an offline mode, that prevents fetches, that seems generally useful, specially if you are editing the git repo and you don't want cerbero to mess them up.
Comment 3 Nirbheek Chauhan 2018-08-30 03:32:40 UTC
The workflow is:

./cerbero-uninstalled fetch gstreamer-1.0

[copy local_sources to wherever you want]

./cerbero-uninstalled package --offline gstreamer-1.0

(In reply to Nicolas Dufresne (ndufresne) from comment #2)
> I don't think it's related to reproducible builds. A reproducible build is
> just a build where all the versions has been fixated. It does not matter if
> you are online or offline. 

It's related to reproducible builds in practice because if you build cerbero master that's going to pull in latest git. Fetch will update the git repo when building even if the local_sources exist.

This also happens when building the stable branches like 1.14. The only time this doesn't happen is when you build a specific tag like 1.14.2.

bundle-source is fine, but the git repos will *still* be updated when you build, afaik. So this is the other part that's needed to make bundle-source work as expected.
Comment 4 Nirbheek Chauhan 2018-08-30 03:38:54 UTC
(In reply to Nirbheek Chauhan from comment #3)
> The workflow is:
> 
> ./cerbero-uninstalled fetch gstreamer-1.0
> 

*fetch-package
Comment 5 Nicolas Dufresne (ndufresne) 2018-08-30 17:57:17 UTC
Well, there is a bug in bundle-source, it should generate a manifest, while --offline is a nice workaround for this one, it's not a nice solution.
Comment 6 Olivier Crête 2018-08-30 18:11:37 UTC
For reproducible builds, shouldn't we add something to generate a manifest.. But I see that as orthogonal to having a --offline
Comment 7 Nirbheek Chauhan 2018-08-31 05:50:25 UTC
(In reply to Olivier Crête from comment #6)
> For reproducible builds, shouldn't we add something to generate a manifest..
> But I see that as orthogonal to having a --offline

I agree, we need a manifest and the ability to build a particular set of commits and tarball URLs.

--offline helps by removing all network access during the build. For instance, building on a buildbot without network access, or avoiding build failures because the git repository was temporarily unavailable, and we didn't even need to update because we already have the refs needed.

In any case, the manifest and bundle-source improvements are for another bug IMO, and it seems this feature is useful anyway.
Comment 8 Nirbheek Chauhan 2018-08-31 10:04:24 UTC
Thanks for the comments!

Attachment 373503 [details] pushed as d8c0f9b - cerbero: Implement --offline for package and build