Closed Bug 1179289 Opened 11 years ago Closed 11 years ago

Source package should use consistent prefix directory

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: rail, Assigned: rail)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch SRC_TAR_EXTRA_ARGS.diff (obsolete) — Splinter Review
Sometimes it's useful to pass some extra arguments to tar called from source-package. For example in TC builds we use unified path to source checkout "src", but it's still useful have a different prefix in the source tarball. With the patch applied the call would look like this: make source-package SRC_TAR_EXTRA_ARGS=--transform='s,^src,mozilla-release,' or even fancier make source-package SRC_TAR_EXTRA_ARGS=--transform='s,^src,$(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION),'
Attachment #8628313 - Flags: review?(mshal)
Attached patch tar-prefix.diffSplinter Review
We talked in IRC with mshal about the previous patch and came to a conclusion to replace the existing logic. This is how it's called: 14:26:30 INFO - Calling ['make', 'source-package'] with output_timeout 2700 14:26:30 INFO - make[1]: Entering directory '/home/rail/work/mozilla/git/mozharness/build/src/obj-firefox/browser/installer' 14:26:30 INFO - Packaging source tarball... 14:26:30 INFO - mkdir -p ../../dist/ 14:26:30 INFO - (cd /home/rail/work/mozilla/git/mozharness/build/src && tar -c --owner=0 --group=0 --numeric-owner --mode=go-w --exclude='.hg*' --exclude='CVS' --exclude='.cvs*' --exclud e='.mozconfig*' --exclude='*.pyc' --exclude='/home/rail/work/mozilla/git/mozharness/build/src/Makefile' --exclude='/home/rail/work/mozilla/git/mozharness/build/src/dist' --exclude='obj-firefo x' --transform='s,^\.,firefox-42.0a1,' -f - ./ ) | xz -9e > ../../dist/firefox-42.0a1.source.tar.xz and if I unpack the tarball, it creates firefox-42.0a1 directory with the following layout: $ ls -1 accessible aclocal.m4 addon-sdk Android.mk AUTHORS b2g browser build caps chrome client.mk client.py CLOBBER config configure configure.in db docshell dom editor embedding extensions gfx GNUmakefile hal image intl ipc js layout LEGAL LICENSE mach Makefile.in media memory mfbt mobile modules moz.build mozglue mozilla-config.h.in netwerk nsprpub other-licenses parser probes python rdf README.txt security services startupcache storage testing toolkit tools uriloader view webapprt widget xpcom xpfe xulrunner Asking :glandium to review because he may be affected by this patch as a Debian maintainer.
Attachment #8628313 - Attachment is obsolete: true
Attachment #8628313 - Flags: review?(mshal)
Attachment #8628388 - Flags: review?(mh+mozilla)
Summary: Allow passing SRC_TAR_EXTRA_ARGS to source-package → Source package should use consistent prefix directory
Comment on attachment 8628388 [details] [diff] [review] tar-prefix.diff Review of attachment 8628388 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/installer/upload-files.mk @@ +787,5 @@ > ifdef MOZ_OBJDIR > SRC_TAR_EXCLUDE_PATHS += --exclude='$(MOZ_OBJDIR)' > endif > CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \ > + --mode=go-w $(SRC_TAR_EXCLUDE_PATHS) --transform='s,^\.,$(SRC_TAR_PREFIX),' -f I'm torn here. As much as I'd love this to be done, --transform is a GNU tar option that is not available in OSX's tar. Meh, let's do it. People who do want to create source tarballs on OSX with those rules can install GNU tar. That said, I'd feel better with the / in the pattern (s,^\./,$(SRC_TAR_PREFIX)/,)
Attachment #8628388 - Flags: review?(mh+mozilla) → review+
Attachment #8628388 - Flags: checkin+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: