generated-sources tarball for android contains a path starting with '../'

RESOLVED FIXED in Firefox 67

Status

defect
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
mozilla67
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

The generated-sources.tar.gz artifact on android-armv7 builds includes this entry:
../android-ndk/sources/android/cpufeatures/cpu-features.c

Which means that tar returns an error code after untarring it:

tar: Removing leading `../' from member names
tar: ../android-ndk/sources/android/cpufeatures/cpu-features.c: Member name contains '..'
tar: Exiting with failure status due to previous errors

It seems like this bogus entry should either be stripped from the tarball, or it should be relocated to a better location. The stripping could happen in package_generated_sources.py pretty easily.

This bad entry and failure to untar the file causes a searchfox run failure when I try to include android stuff.

I'm doing a searchfox run now where I ignore the tar exit code, to see if dropping the file would cause any other problems later in the pipeline. That might help inform the correct course of action here.

Yeah just dropping the bad entry seems good enough for me.

I tried tracing the code a bit to see what was causing this entry to show up, and it looks like one of the SOURCES entries that includes this file then gets converted into GeneratedSources via code that I don't really understand. Changing this seems dangerous, so I unless somebody tells me otherwise it seems like just dropping the bad entry when building the tarball seems ok.

On Android we apparently try to include the cpufeatures.c file from the
NDK as part of the generated-sources tarball. While this works, it makes
tar drop the bogus entry for safety reasons when unpacking the archive.
It also makes tar return an error, which is undesirable for searchfox.
It's better to just skip the entry when building the tarball.

Comment 5

4 months ago
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31a79abb583d
Drop bogus entries from the generated-sources tarball. r=froydnj

Comment 6

4 months ago
bugherder
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.