Set better ownership and permissions in tar files we create, and remove old hack. b=254303 r=bryner a=asa

This commit is contained in:
dbaron%dbaron.org 2004-08-17 00:14:48 +00:00
Родитель b31f4063fe
Коммит d9a999adda
2 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -87,20 +87,22 @@ ifeq ($(OS_ARCH),BSD_OS)
TAR_CREATE_FLAGS = -cvLf
endif
CREATE_FINAL_TAR = tar -c --owner=0 --group=0 --numeric-owner --mode="go-w" -f
ifeq ($(MOZ_PKG_FORMAT),TAR)
PKG_SUFFIX = .tar
MAKE_PACKAGE = tar -cf - $(MOZ_PKG_APPNAME) > $(PACKAGE)
MAKE_SDK = tar -cf - $(SDK_PKG_APPNAME)-$(SDK_DIR) > $(SDK)
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) > $(PACKAGE)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(SDK_PKG_APPNAME)-$(SDK_DIR) > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),TGZ)
PKG_SUFFIX = .tar.gz
MAKE_PACKAGE = tar -cf - $(MOZ_PKG_APPNAME) | gzip -vf9 > $(PACKAGE)
MAKE_SDK = tar -cf - $(SDK_PKG_APPNAME)-$(SDK_DIR) | gzip -vf9 > $(SDK)
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) | gzip -vf9 > $(PACKAGE)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(SDK_PKG_APPNAME)-$(SDK_DIR) | gzip -vf9 > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),BZ2)
PKG_SUFFIX = .tar.bz2
MAKE_PACKAGE = tar -cf - $(MOZ_PKG_APPNAME) | bzip2 -vf > $(PACKAGE)
MAKE_SDK = tar -cf - $(SDK_PKG_APPNAME)-$(SDK_DIR) | bzip2 -vf > $(SDK)
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) | bzip2 -vf > $(PACKAGE)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(SDK_PKG_APPNAME)-$(SDK_DIR) | bzip2 -vf > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),ZIP)
PKG_SUFFIX = .zip

Просмотреть файл

@ -161,10 +161,6 @@ spew("Completed copying build files");
system("perl xptlink.pl -o unix -s $topobjdir/dist -d $STAGE -v");
spew("Completed xptlinking");
#// change the permissions in the staging area, stopgap for creating
#// group/world writeable files in /usr for standard installs
system("chmod og-w -R $STAGE");
#// call makeall.pl tunneling args (delivers .xpis to $topobjdir/installer/stage)
chdir("$topsrcdir/xpinstall/packager/unix");
system("perl makeall.pl $aVersion $aURLPath $STAGE $XPI");
@ -176,10 +172,11 @@ spew("Completed making .xpis");
#-------------------------------------------------------------------------
#// tar and gzip mozilla-installer, mozilla-installer-bin, README, license,
#// config.ini, installer.ini into stub
my $create_tar = 'tar -cv --owner=0 --group=0 --numeric-owner --mode="go-w" -f';
spew("Creating stub installer tarball...");
chdir("$RAW/..");
system("mv $RAW $ROOT/$SUBDIR");
system("tar cvf $STUB/$aStubName.tar ./$SUBDIR/mozilla-installer ./$SUBDIR/mozilla-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system($create_tar . "$STUB/$aStubName.tar ./$SUBDIR/mozilla-installer ./$SUBDIR/mozilla-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system("mv $ROOT/$SUBDIR $RAW");
system("gzip $STUB/$aStubName.tar");
spew("Completed creating stub installer tarball");
@ -188,7 +185,7 @@ spew("Completed creating stub installer tarball");
#// config.ini, installer.ini and .xpis into sea
spew("Creating blob (aka full or sea) installer tarball...");
system("mv $RAW $ROOT/$SUBDIR");
system("tar cvf $BLOB/$aBlobName.tar ./$SUBDIR/");
system($create_tar . "$BLOB/$aBlobName.tar ./$SUBDIR/");
system("mv $ROOT/$SUBDIR $RAW");
system("gzip $BLOB/$aBlobName.tar");
spew("Completed creating blob (aka full or sea) installer tarball");