Open Bug 1981747 Opened 9 months ago Updated 3 months ago

Add `./mach app-services setup`

Categories

(Firefox Build System :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: bdk, Assigned: bdk)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxsync-])

Attachments

(1 file)

Once https://bugzilla.mozilla.org/show_bug.cgi?id=1980203 is merged, then we should be able to run cargo test -p to test our app-services crates. However, for many of our crates, we still need to figure out how to link to NSS.

Let's create a mach command that sets up the app-services environment, similar to verify-desktop-environment.sh. It should:

  • Run ./mach build to build NSS
  • Set the NSS_DIR variable to point to the the built NSS in the object directory

I don't think it needs to do anything else at this point, but we may want to extend it to do more in the future.

Implementing this is an alternative to https://bugzilla.mozilla.org/show_bug.cgi?id=1958000, if we can make Cargo do the linking then we don't need to do anything special with mach rusttests.

Summary: Allow Rust crates to link to libnss → Add mach command to setup the app-services environment
Summary: Add mach command to setup the app-services environment → Add `./mach setup-app-services`

Techincally we could land this and it would work, but it doesn't really
make sense until app-services is in the moz-central tree.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Attachment #9506044 - Attachment description: WIP: Bug 1981747 - Add `./mach setup-app-services`, r=glandium,markh → Bug 1981747 - Add `./mach app-services setup`, r=glandium,markh
Summary: Add `./mach setup-app-services` → Add `./mach app-services setup`

Something to consider is using the third_party/python/gyp in tree for predictability, since at least firefox is building nss using that version.

Would the idea to build NSS ourselves? I avoided that because I wanted to minimize the amount of code we needed to maintain, but maybe we should be building NSS. That would give us some more control.

oh sorry, I misread the initial context. I think using the desktop nss is reasonable, but my understanding is that it doesn't build the static nss parts (which is why I was looking at extending the build so it did).

Yes that's correct and not using the static NSS does have some drawbacks. For example the pkix parts aren't present which makes the rc_crypto tests fail. I think this the current code is good enough for now, but I have a fast-follow issue for improving this: https://bugzilla.mozilla.org/show_bug.cgi?id=1989633

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: