Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#28466 closed defect (fixed)

rbm does not correctly apply git submodule URL changes

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

Description

rbm has an option to include git submodules when creating source tarballs for a build.

rbm is initializing and updating the submodules with git submodule update --init. However looking at the git-submodule manpage, it seems that the --init submodule option will only initialize submodules which have not been initialized yet. If a commit is changing a submodule URL, then this change will not be taken into account if the submodule has been initialized before.

To fix this, rbm should also run git submodule sync.

Child Tickets

Change History (3)

comment:1 Changed 12 months ago by boklm

Keywords: TorBrowserTeam201811R added
Status: newneeds_review

Branch test_bug_28466 can be used to reproduce the issue:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=test_bug_28466&id=0c944e04e45b4e45bece7c18d21857a64989ee1b

$ ./rbm/rbm tar bug_28466 --target tor-launcher
Cloning into 'bug_28466'...
remote: Counting objects: 7461, done.
remote: Compressing objects: 100% (1211/1211), done.
remote: Total 7461 (delta 764), reused 0 (delta 0)
Receiving objects: 100% (7461/7461), 3.51 MiB | 641.00 KiB/s, done.
Resolving deltas: 100% (4731/4731), done.
Checking connectivity... done.
Submodule 'rbm' (https://git.torproject.org/builders/rbm.git) registered for path 'rbm'
Cloning into 'rbm'...
remote: Counting objects: 2040, done.
remote: Total 2040 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2040/2040), 495.51 KiB | 455.00 KiB/s, done.
Resolving deltas: 100% (1174/1174), done.
Checking connectivity... done.
Submodule path 'rbm': checked out '5c89374df7957238a9565c0b938ee3f30f880438'
Created /home/user/work/tor/tor-browser-build/out/bug_28466/bug_28466-tor-launcher.tar.gz

$ ./rbm/rbm tar bug_28466 --target torbutton
Error: Error running git submodule update:
fatal: reference is not a tree: a41034ced7a6c0fe590320d9da61d15df1fef42f
Unable to checkout 'a41034ced7a6c0fe590320d9da61d15df1fef42f' in submodule path 't'

There is a commit fixing this issue in branch bug_28466:
https://gitweb.torproject.org/user/boklm/rbm.git/commit/?h=bug_28466&id=eb500fa9467fb4d7229c9ca87f202ef18603d023

comment:2 Changed 12 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Looks good! Applied to rbm's master branch (commit eb500fa9467fb4d7229c9ca87f202ef18603d023) and updated tor-browser-build's master subsequently (commit 3378261a8cce3a8e1d908c8b73ee448ec572bec4).

comment:3 Changed 12 months ago by gk

Cherry-picked for maint-8.0 as well (commit 316463d531d66b0d8d5978fcaaa06f5d3eed0de7).

Last edited 12 months ago by gk (previous) (diff)
Note: See TracTickets for help on using tickets.