Opened 17 months ago

Closed 2 months ago

Last modified 8 weeks ago

#27265 closed defect (fixed)

In some cases, rbm will download files in the wrong project directory

Reported by: boklm Owned by: boklm
Priority: Medium Milestone:
Component: Applications/rbm Version:
Severity: Normal Keywords: boklm201811, TorBrowserTeam201911R
Cc: tbb-team Actual Points: .2
Parent ID: Points:
Reviewer: Sponsor:

Description

The patch for #27045 is causing an error when starting the build with an empty out/ directory:
https://trac.torproject.org/projects/tor/ticket/27045#comment:11

We can see in the logs that binutils is being downloaded in the out/firefox directory instead of out/binutils:

Saving to: '/media/ssd/Code/Tor/tor-browser-build/out/firefox/binutils-2.26.1.tar.bz2'

The reason is that we override output_dir when calling build_pkg in input_files:

            } elsif ($input_file->{project} && $t->('project')) {
                my $p = $t->('project');
                print "Building project $p - $name\n";
                my $run_save = $config->{run};
                $config->{run} = { target => $input_file->{target} };
                $config->{run}{target} //= $run_save->{target};
                build_pkg($p, {%$options, origin_project => $project, %$input_file,
                        output_dir => $proj_out_dir});
                $config->{run} = $run_save;
                print "Finished build of project $p - $name\n";
            } else {

The reason why we don't see this error in normal builds and only see it with #27045 is that in #27045 we are changing the tor-browser filename to remove c("var/build_id") from it, removing the need to download dependencies to compute the filename. In normal builds the binutils tarball is already downloaded (in the correct directory) when we start the firefox build, so we are not hitting this issue.

Child Tickets

Change History (22)

comment:1 Changed 17 months ago by boklm

Keywords: boklm201809 added; boklm201808 removed

boklm201808 -> boklm201809

comment:2 Changed 17 months ago by gk

Keywords: TorBrowserTeam201809 added; TorBrowserTeam201808 removed

Moving our tickets to September 2018

comment:3 Changed 15 months ago by boklm

I made a patch fixing this in branch bug_27265_v2:
https://gitweb.torproject.org/user/boklm/rbm.git/commit/?h=bug_27265_v2&id=081cc2ece715c2a91c35e1529d4ac4af4ffe3235

This patch also adds a feature allowing to define options that only apply to the current project but not the child projects. I still need to make a new revision of the patch documenting this feature and do more testing before setting this as needs_review.

comment:4 in reply to:  3 Changed 15 months ago by boklm

Keywords: boklm201811 TorBrowserTeam201811R added; boklm201809 TorBrowserTeam201809 removed
Status: newneeds_review

Replying to boklm:

This patch also adds a feature allowing to define options that only apply to the current project but not the child projects. I still need to make a new revision of the patch documenting this feature and do more testing before setting this as needs_review.

A new revision of this patch, adding documentation, is in branch bug_27265_v3:
https://gitweb.torproject.org/user/boklm/rbm.git/commit/?h=bug_27265_v3&id=146316fa98cae4fabdec7178ad79ba12cfdf82d9

Because this patch is changing how rbm is overriding the value of output_dir, this requires a small change in tor-browser-build, which is done in branch bug_27265:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_27265&id=1d007442bbab4a3e733d0ce4f880a3e2eb02bca6

I checked that this patch is fixing the build issue with #27045. I also checked that this version of rbm is producing an identical build of 8.5a4.

comment:5 Changed 14 months ago by gk

Keywords: TorBrowserTeam201812R added; TorBrowserTeam201811R removed

Move review tickets to Decemeber.

comment:6 Changed 13 months ago by gk

Keywords: TorBrowserTeam201901R added; TorBrowserTeam201812R removed

Moving review tickets to 2019.

comment:7 Changed 12 months ago by gk

Keywords: TorBrowserTeam201902R added; TorBrowserTeam201901R removed

Moving our review tickets to February.

comment:8 Changed 11 months ago by gk

Keywords: TorBrowserTeam201903R added; TorBrowserTeam201902R removed

February is gone.

comment:9 Changed 10 months ago by gk

Keywords: TorBrowserTeam201904R added; TorBrowserTeam201903R removed

Moving review tickets to April.

comment:10 Changed 9 months ago by gk

Keywords: TorBrowserTeam201905R added; TorBrowserTeam201904R removed

No April anymore, moving review tickets to May.

comment:11 Changed 8 months ago by gk

Keywords: TorBrowserTeam201906R added; TorBrowserTeam201905R removed

Moving reviews over to June.

comment:12 Changed 7 months ago by gk

Keywords: TorBrowserTeam201907R added; TorBrowserTeam201906R removed

No reviews in June 2019 anymore, moving them.

comment:13 Changed 6 months ago by gk

Keywords: TorBrowserTeam201908R added; TorBrowserTeam201907R removed

No July any longer.

comment:14 Changed 5 months ago by gk

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201908R removed

No August anymore.

comment:15 Changed 4 months ago by pili

Keywords: TorBrowserTeam201910R added; TorBrowserTeam201909R removed

We're now in October, moving September outstanding reviews to October

comment:16 Changed 3 months ago by pili

Keywords: TorBrowserTeam201911 added

Moving tickets to November 2019

comment:17 Changed 3 months ago by gk

Keywords: TorBrowserTeam201911R added; TorBrowserTeam201910R removed

There is no way to do reviews in October 2019 anymore.

comment:18 Changed 3 months ago by gk

Keywords: TorBrowserTeam201911 removed

No need for duplicate keyword.

comment:21 Changed 2 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

I had a hard time reviewing this but I think the changes are good. Merged to rbm's master (commit ef4df05a484c746f33e361eb8d82d5fb85009c14 and 03d53fcb0444fe9d752719bfbb62e3658d15d26d) and picked up the changes on tor-browser-build's master (commit a182f67a608ad65fbbde4238aff7ee7c2f01b162). I don't think we should backport this change.

comment:22 Changed 8 weeks ago by boklm

Actual Points: .2

Adding the points for the test from comment:20 (as the main patch for this ticket was done long ago).

Note: See TracTickets for help on using tickets.