Opened 14 months ago

Last modified 13 days ago

#27265 needs_review defect

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, TorBrowserTeam201910R
Cc: tbb-team Actual Points:
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 (15)

comment:1 Changed 14 months ago by boklm

Keywords: boklm201809 added; boklm201808 removed

boklm201808 -> boklm201809

comment:2 Changed 13 months ago by gk

Keywords: TorBrowserTeam201809 added; TorBrowserTeam201808 removed

Moving our tickets to September 2018

comment:3 Changed 11 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 11 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 10 months ago by gk

Keywords: TorBrowserTeam201812R added; TorBrowserTeam201811R removed

Move review tickets to Decemeber.

comment:6 Changed 9 months ago by gk

Keywords: TorBrowserTeam201901R added; TorBrowserTeam201812R removed

Moving review tickets to 2019.

comment:7 Changed 8 months ago by gk

Keywords: TorBrowserTeam201902R added; TorBrowserTeam201901R removed

Moving our review tickets to February.

comment:8 Changed 7 months ago by gk

Keywords: TorBrowserTeam201903R added; TorBrowserTeam201902R removed

February is gone.

comment:9 Changed 7 months ago by gk

Keywords: TorBrowserTeam201904R added; TorBrowserTeam201903R removed

Moving review tickets to April.

comment:10 Changed 5 months ago by gk

Keywords: TorBrowserTeam201905R added; TorBrowserTeam201904R removed

No April anymore, moving review tickets to May.

comment:11 Changed 4 months ago by gk

Keywords: TorBrowserTeam201906R added; TorBrowserTeam201905R removed

Moving reviews over to June.

comment:12 Changed 3 months ago by gk

Keywords: TorBrowserTeam201907R added; TorBrowserTeam201906R removed

No reviews in June 2019 anymore, moving them.

comment:13 Changed 2 months ago by gk

Keywords: TorBrowserTeam201908R added; TorBrowserTeam201907R removed

No July any longer.

comment:14 Changed 6 weeks ago by gk

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201908R removed

No August anymore.

comment:15 Changed 13 days ago by pili

Keywords: TorBrowserTeam201910R added; TorBrowserTeam201909R removed

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

Note: See TracTickets for help on using tickets.