Closed Bug 1721247 Opened 3 years ago Closed 3 years ago

Improve vendoring directory logic in ./mach vendor

Categories

(Developer Infrastructure :: Mach Vendor & Updatebot, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Some projects - like dav1d use relative paths from a moz.build file to a source file. Others, like libjxl, use absolute paths.

Right now we're assuming relative paths and it does not work well. (It might very well be buggy also.) We should detect and improve our behavior.

Alternately, it seems like maybe sonly dav1d uses relative patchs and we could just mandate that Updatebot requires absolute paths?

That probably would not work with subdirectories though.

Assignee: nobody → tom
Status: NEW → ASSIGNED

libdav1d only has relative paths. Like ../../third_party/foo/bar.c
libjpeg-xl has absolute paths like /third_party/bar/foo.c

This handles the second case by not doing our relative path
correction logic if we don't need to.

It will find all of the types of ways a file is included in a
moz.build file* and iterate over them, trying the slightly
different logic. This is okay, because the failure scenario
for trying an incorrect mode is just that we don't get a match.

By trying all the modes we can increase our chances of finding a
match.

  • For SOURCES/UNIFIED_SOURCES there aren't actually any situations
    where we have mixed-modes in a moz.build file. But a future patch
    will add support for editing EXPORTS and they do have mixed-modes.

Depends on D120477

Pushed by tritter@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa796f5424d7
Improve/fix the local testing logic for mach vendor mozbuild rewriting r=jewilde
https://hg.mozilla.org/integration/autoland/rev/82a82d883319
Improve the mozbuild rewriting logic for different path types r=jewilde
https://hg.mozilla.org/integration/autoland/rev/c1b58d25f8fb
Ensure that only failure to add/remove exceptions are swallowed r=jewilde
https://hg.mozilla.org/integration/autoland/rev/6e47935d1eeb
Lift some repeated code into a function r=jewilde
Pushed by tritter@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c43f86bc26a5
Improve/fix the local testing logic for mach vendor mozbuild rewriting r=jewilde
https://hg.mozilla.org/integration/autoland/rev/1ab48a92618e
Improve the mozbuild rewriting logic for different path types r=jewilde
https://hg.mozilla.org/integration/autoland/rev/5e7de3069cff
Ensure that only failure to add/remove exceptions are swallowed r=jewilde
https://hg.mozilla.org/integration/autoland/rev/a4056a3ad63a
Lift some repeated code into a function r=jewilde
Pushed by tritter@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c88594abf844
Improve/fix the local testing logic for mach vendor mozbuild rewriting r=jewilde
https://hg.mozilla.org/integration/autoland/rev/5481aca42633
Improve the mozbuild rewriting logic for different path types r=jewilde
https://hg.mozilla.org/integration/autoland/rev/51e529c813de
Ensure that only failure to add/remove exceptions are swallowed r=jewilde
https://hg.mozilla.org/integration/autoland/rev/eaed700a3c05
Lift some repeated code into a function r=jewilde
Flags: needinfo?(tom)

Re-assigning bugs to the new Mach Vendor and Updatebot Component. Guid for this change: ade7b229-ec85-41f8-bafe-9d4451bfeed1

Group: core-security
Component: General → Mach Vendor & Updatebot
Product: Firefox Build System → Developer Infrastructure
Target Milestone: 93 Branch → ---

A mass updatebot change inadvertently added a security group to bugs. Removing it. Guid for this change: 09d63db4-11a1-4820-a398-d718f112f885

Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: