~chromium-team/chromium-browser/beta

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Chad Miller
  • Date: 2013-08-27 16:58:09 UTC
  • mfrom: (915.1.13 saucy-working)
  • Revision ID: chad.miller@canonical.com-20130827165809-up7594cwptx3v6mz
* New release 29.0.1547.57:  (LP: #1215361)
  - CVE-2013-2900: Incomplete path sanitization in file handling.
  - CVE-2013-2905: Information leak via overly broad permissions on shared
    memory files.
  - CVE-2013-2901: Integer overflow in ANGLE.
  - CVE-2013-2902: Use after free in XSLT.
  - CVE-2013-2903: Use after free in media element.
  - CVE-2013-2904: Use after free in document parsing.
  - CVE-2013-2887: Various fixes from internal audits, fuzzing and other
    initiatives (Chrome 29).
* debian/rules: Fix packaging-sanity test.
* debian/patches/search-credit.patch:  Update URLs.
* debian/patches/disable_dlog_and_dcheck_in_release_builds.patch,
  debian/patches/wehkit_rev_parser.patch,
    No longer necessary.  Deleted.
* debian/chromium-browser.sh.in: Include command-line parameters for
  registered plugins.
* Since we include remoting locales too, also split its locales info 
  into the -l10n package correctly.
* debian/rules: Disable arm_neon_optional. Impossible with sandbox, AND
  breaks build right now.
* debian/rules:
  - Make unused-file matches simpler, and install rule more descriptive.
  - get-orig-source has to make the directory for the orig contents. 
* debian/source/lintian-overrides:
  - Add old-fsf-address-in-copyright-file and image-file-in-usr-lib
  - Fix setuid-binary to be "source". Seems like it should be "binary". :(
* debian/checkout-orig-source.mk: Remove tests and add unofficialness
  marker file to orig tarball when we can't use upstream orig releases.
* debian/control: Set VCS URL to be accurate.
* debian/rules: Start rule to create patch that includes Launchpad
  translations.  Never change upstream orig tarball.  This will be a 
  release-time manual rule that updates a quilt patch.
* New release 28.0.1500.95:
  - CVE-2013-2881: Origin bypass in frame handling.
  - CVE-2013-2882: Type confusion in V8.
  - CVE-2013-2883: Use-after-free in MutationObserver.
  - CVE-2013-2884: Use-after-free in DOM.
  - CVE-2013-2885: Use-after-free in input handling.
  - CVE-2013-2886: Various fixes from internal audits, fuzzing and other
    initiatives.
* debian/rules:
  - Keepalive in tests rule, to keep builder machines from reaping.
  - Further exclude a few tests that interact with fakeroot,
    ReadOnlyFileUtilTest.
* debian/rules:
  - Disable logging calls in chromium binary to save several MB of executable
    size.
* debian/patches/linker-asneeded-bug.patch:
  - Add patch to work around linker bug.
* debian/keep-alive.sh:
  - Treat disappearing /proc as error, and quit. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
# Build the launchpad translations (already landed upstream)
82
82
GYP_DEFINES += use_third_party_translations=1
83
 
# Also merges the newer translations from launchpad
84
 
WANT_LP_TRANSLATIONS_IN_BUILD ?= 0
85
 
 
86
 
## Policy: 2012-10-30, cm,kv,cc, disabling merging of LP translations. "0"
87
 
MERGE_LP_TRANSLATIONS_IN_TARBALL = 0
88
 
## Rationale: Instead of merging other stuff before "orig" (!) tarball
89
 
## creation, let's export translation templates to Launchpad, and send them
90
 
## upstream to be included in the real orig source.  It's slower for circuit,
91
 
## but all users win, and is less buggy for us.
92
 
##
93
83
 
94
84
# Always add debug symbols, and strip them when we don't want them.
95
85
#GYP_DEFINES += release_extra_cflags="-g"
110
100
# enable features that we want.
111
101
GYP_DEFINES += enable_webrtc=1
112
102
 
 
103
# elimiate DCHECK and DLOG function calls, to save ~9MB off binary
 
104
GYP_DEFINES += logging_like_official_build=1
 
105
 
113
106
COMPONENT_SHARED_LIB_BUILD := 0
114
107
 
115
108
 
132
125
 endif
133
126
 ifeq (armhf,$(DEB_HOST_ARCH))
134
127
GYP_PARAMS += -DUSE_EABI_HARDFLOAT 
 
128
# ARN Neon optional flag is off because it causes build errors, AND testing
 
129
# /proc/cpuinfo contents can't work with a sandbox anyway.
135
130
GYP_DEFINES += \
136
 
        arm_neon_optional=1 \
 
131
        arm_neon_optional=0 \
137
132
        v8_use_arm_eabi_hardfloat=true \
138
133
        arm_fpu=vfpv3-d16 \
139
134
        arm_float_abi=hard \
366
361
 
367
362
debian/pre-build-stamp:
368
363
ifneq (,$(findstring Ubuntu,$(DEBIAN_DIST)))
369
 
 ifeq (1,$(WANT_LP_TRANSLATIONS_IN_BUILD))
370
 
        # Apply the translations patches generated by get-orig-sources
371
 
        @(set -e ; cd ./src ; if [ -d translations-patches ] ; then \
372
 
        for patch in translations-patches/*.patch ; do \
373
 
          echo "# Applying $$patch..." ; \
374
 
          patch -p 1 < $$patch ; done ; fi )
375
 
 endif
376
364
        sed -ri '/const PrepopulatedEngine google = \{/,/\}\;/ { s/sourceid=chrome\&/&client=ubuntu\&channel=cs\&/g; }' \
377
365
                src/chrome/browser/search_engines/template_url_prepopulate_data.cc
378
366
endif
439
427
        # disabled: SecurityTest exhausts memory to fail
440
428
        # disabled: PowerMonitorTest doesn't mock power enough, I think
441
429
        # disabled: FileUtilTest fails because of fakeroot interaction
442
 
        cd $(SRC_DIR); ./out/$(BUILD_TYPE)/base_unittests --gtest_filter=-SecurityTest.NewOverflow:PowerMonitorTest.\*:FileUtilTest.ChangeFilePermissionsAndRead:FileUtilTest.ChangeFilePermissionsAndWrite:FileUtilTest.ChangeDirectoryPermissionsAndEnumerate |tee $(TEMPFILE) |cat -n
 
430
        # disabled: ReadOnlyFileUtilTest.ContentsEqual fakeroot
 
431
        # disabled: ReadOnlyFileUtilTest.TextContentsEqual fakeroot
 
432
        $(KEEPALIVE) start &
 
433
        cd $(SRC_DIR); ./out/$(BUILD_TYPE)/base_unittests --gtest_filter=-SecurityTest.NewOverflow:PowerMonitorTest.\*:FileUtilTest.ChangeFilePermissionsAndRead:FileUtilTest.ChangeFilePermissionsAndWrite:FileUtilTest.ChangeDirectoryPermissionsAndEnumerate:ReadOnlyFileUtilTest.ContentsEqual:ReadOnlyFileUtilTest.TextContentsEqual: |tee $(TEMPFILE) |cat -n; $(KEEPALIVE) stop
443
434
        @echo If more than 15 tests fail, then we interpret that as too poor quality to continue.
444
435
        sed -e 1,/FAILED.\*tests,\ listed\ below/d $(TEMPFILE) |grep -c \\\[\ \ FAILED\ \ \\\] |xargs test 15 -gt
445
436
        @echo Unit tests are good enough.
478
469
common-install-prehook-impl::
479
470
ifeq (1,$(COMPONENT_SHARED_LIB_BUILD))
480
471
        # Set the directory for looking up component libraries.
481
 
        find debian/tmp*/usr/lib/chromium-browser/libs -type f -name \*.so                         -execdir chrpath --replace "\$$ORIGIN" {} \;
482
 
        find debian/tmp*/usr/lib/chromium-browser      -type f -name \*.so             -maxdepth 1 -execdir chrpath --replace "\$$ORIGIN/libs" {} \;
483
 
        find debian/tmp*/usr/lib/chromium-browser      -type f             -executable -maxdepth 1 -execdir chrpath --replace "\$$ORIGIN/libs" {} \;
 
472
        find debian/tmp*/usr/lib/chromium-browser/libs             -type f -name \*.so             -execdir chrpath --replace "\$$ORIGIN" {} \;
 
473
        find debian/tmp*/usr/lib/chromium-browser      -maxdepth 1 -type f -name \*.so             -execdir chrpath --replace "\$$ORIGIN/libs" {} \;
 
474
        find debian/tmp*/usr/lib/chromium-browser      -maxdepth 1 -type f             -executable -execdir chrpath --replace "\$$ORIGIN/libs" {} \;
484
475
endif
485
476
 
486
477
binary-install/$(DEBIAN_NAME)::
503
494
        cp -a debian/tmp/$(LIB_DIR)/nacl_irt_* debian/$(DEBIAN_NAME)/$(LIB_DIR)/
504
495
endif
505
496
        # Locales: only keep en-US in the main deb. This is the opposite of binary-install/$(DEBIAN_NAME)-l10n rule.
506
 
        find $(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/locales -type f -name \*.pak ! -name en-US.pak -delete
 
497
        find $(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/*locales -type f -name \*.pak ! -name en-US.pak -delete
507
498
 
 
499
# Tke l10n .install file is far too greedy, but we don't want to list every
 
500
# language there because we don't know them all.  Remove what's are in the main
 
501
# package.
508
502
binary-install/$(DEBIAN_NAME)-l10n::
509
 
        rm $(CURDIR)/debian/$(DEBIAN_NAME)-l10n/$(LIB_DIR)/locales/en-US.pak
 
503
        rm $(CURDIR)/debian/$(DEBIAN_NAME)-l10n/$(LIB_DIR)/*locales/en-US.pak
510
504
 
511
505
# Compare
512
506
PKG_DIRS = $(addprefix debian/,$(shell dh_listpackages))
552
546
## xdg-utils install dep
553
547
BUILT_UNUSED_MATCH += ^usr/lib/chromium-browser/xdg-\(mime\|settings\)$$
554
548
 
555
 
BUILT_UNUSED_INDEP_MATCH = ^usr/lib/chromium-browser/locales/.\*.pak$$
 
549
BUILT_UNUSED_INDEP_MATCH = ^usr/lib/chromium-browser/*locales/.\*.pak$$
556
550
 
557
551
PACKAGED_NOT_FROM_TREE_MATCH  = ^usr/share/applications/chromium-browser.desktop$$
558
552
PACKAGED_NOT_FROM_TREE_MATCH += ^usr/share/apport/package-hooks/chromium-browser.py$$
570
564
compare: SPACE = $(eval) $(eval)
571
565
compare:
572
566
        # Spanish translation is our canary for whether we have made a binary-indep
573
 
        # package or not.  It will always exist, and yet only be in the l10n package.
 
567
        # package or not.  It will always be "installed" to the tmp/, and yet only
 
568
        # be in the l10n package if we make binary-indep packages on this
 
569
        # architecture's builder.
574
570
        find debian -name es.pak
575
571
 
576
572
        # Look for duplicates, fail if we find any
596
592
          echo " => Found differences, please investigate. /tmp/built-$$$$ /tmp/packaged-$$$$" ; \
597
593
          exit 1; \
598
594
        fi ; \
599
 
        for expr in $(BUILT_UNUSED_MATCH); do if ! grep -E $$expr /tmp/unfiltered-built-$$$$ >/dev/null; then echo Warning: Unused built matcher: $$expr; fi; done; \
600
 
        for expr in $(PACKAGED_NOT_FROM_TREE_MATCH); do if ! grep -E $$expr /tmp/unfiltered-packaged-$$$$ >/dev/null; then echo Warning: Unused packaged matcher: $$expr; fi; done; \
601
 
        rm -f /tmp/*built-$$$$ /tmp/*packaged-$$$$ /tmp/refiltering$$$$
 
595
        for expr in $(BUILT_UNUSED_MATCH); do if ! grep -E $$expr /tmp/unfiltered-built-$$$$ >/dev/null; then echo "Warning: Unused built matcher: $$expr in /tmp/unfiltered-built-$$$$ "; fi; done; \
 
596
        for expr in $(PACKAGED_NOT_FROM_TREE_MATCH); do if ! grep -E $$expr /tmp/unfiltered-packaged-$$$$ >/dev/null; then echo "Warning: Unused packaged matcher: $$expr"; fi; done; \
 
597
 
 
598
 
 
599
        #rm -f /tmp/*built-$$$$ /tmp/*packaged-$$$$ /tmp/refiltering$$$$
602
600
 
603
601
###############################################################################################
604
602
# Translations
605
603
 
606
 
TRANSLATIONS_TOOLS_BRANCH  := lp:~chromium-team/chromium-browser/chromium-translations-tools.head
607
 
TRANSLATIONS_EXPORT_BRANCH := lp:~chromium-team/chromium-browser/chromium-translations-exports.head
608
 
GRIT_TEMPLATES := \
609
 
        chrome/app/chromium_strings.grd \
610
 
        chrome/app/generated_resources.grd \
611
 
        chrome/app/policy/policy_templates.grd \
612
 
        ui/base/strings/ui_strings.grd \
613
 
        webkit/glue/inspector_strings.grd \
614
 
        webkit/glue/webkit_strings.grd \
615
 
        $(NULL)
616
 
OTHER_GRIT_TEMPLATES := \
617
 
        ui/base/strings/app_locale_settings.grd \
618
 
        chrome/app/resources/locale_settings.grd \
619
 
        chrome/app/resources/locale_settings_linux.grd \
620
 
        $(NULL)
621
 
MAPPED_GRIT_TEMPLATES := \
622
 
        --map-template-names ui/base/strings/ui_strings.grd=ui/base/strings/app_strings.grd \
623
 
        $(NULL)
624
 
 
625
604
# New langs with enough coverage to land in official builds
626
605
# (leave empty to accept all new lang)
627
 
GRIT_WHITELISTED_LANGS ?= \
628
 
        ca@valencia \
629
 
        eu \
630
 
        gl \
631
 
        ug \
632
 
        $(NULL)
633
 
 
634
 
GRIT_CONVERTER_FLAGS := \
635
 
        --create-patches translations-patches \
636
 
        --import-gettext ../translations-export \
637
 
        --export-grit ../translations-grit \
638
 
        --build-gyp-file build/common.gypi \
639
 
        --other-grd-files $(shell echo $(OTHER_GRIT_TEMPLATES) | tr ' ' ',') \
640
 
        $(MAPPED_GRIT_TEMPLATES) \
641
 
        $(NULL)
642
 
        
 
606
patch-translations: T := $(shell mktemp -d -t chromium-launchpad-translations-XXXXXXX)
 
607
patch-translations: GRIT_WHITELISTED_LANGS ?= ca@valencia eu gl ug 
 
608
patch-translations: TRANSLATIONS_TOOLS_BRANCH  := http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-translations-tools.head
 
609
patch-translations: TRANSLATIONS_EXPORT_BRANCH := http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-translations-exports.head
 
610
patch-translations: GRIT_TEMPLATES := chrome/app/chromium_strings.grd chrome/app/generated_resources.grd chrome/app/policy/policy_templates.grd ui/base/strings/ui_strings.grd webkit/glue/inspector_strings.grd webkit/glue/webkit_strings.grd
 
611
patch-translations: OTHER_GRIT_TEMPLATES := ui/base/strings/app_locale_settings.grd chrome/app/resources/locale_settings.grd chrome/app/resources/locale_settings_linux.grd 
 
612
patch-translations: MAPPED_GRIT_TEMPLATES := --map-template-names ui/base/strings/ui_strings.grd=ui/base/strings/app_strings.grd 
 
613
patch-translations: GRIT_CONVERTER_FLAGS := --create-patches translations-patches --import-gettext ../translations-export --export-grit $(T)/translations-grit --build-gyp-file build/common.gypi --other-grd-files $(shell echo $(OTHER_GRIT_TEMPLATES) | tr ' ' ',') $(MAPPED_GRIT_TEMPLATES) 
643
614
ifeq (1,$(WANT_ONLY_WHITELISTED_NEW_LANGS))
644
 
GRIT_CONVERTER_FLAGS += --whitelisted-new-langs $(shell echo $(GRIT_WHITELISTED_LANGS) | tr ' ' ',')
 
615
patch-translations: GRIT_CONVERTER_FLAGS += --whitelisted-new-langs $(shell echo $(GRIT_WHITELISTED_LANGS) | tr ' ' ',')
645
616
endif
 
617
patch-translations: PATCH_FILE := launchpad_translations.patch
 
618
patch-translations:
 
619
        test -d $(T)/translations-tools || bzr export $(T)/translations-tools $(TRANSLATIONS_TOOLS_BRANCH)
 
620
        test -d $(T)/translations-export || bzr export $(T)/translations-export $(TRANSLATIONS_EXPORT_BRANCH)
 
621
        cd src; $(T)/translations-tools/chromium2pot.py $(GRIT_CONVERTER_FLAGS) $(GRIT_TEMPLATES) 
 
622
        ! test "$$(quilt diff)"  # if any changes outstanding, abort!
 
623
        -quilt delete "$(PATCH_FILE)"
 
624
        quilt new "$(PATCH_FILE)"
 
625
        set -eu; find translations-grit -type f |sed -e 's,^$(T)/translations-grit/,,' |while read updatedfile; do quilt add -P "$(PATCH_FILE)" src/"$$updatedfile"; cp $(T)/translations-grit/"$$updatedfile" src/"$$updatedfile"; done;
 
626
        { echo "Description: Contributed translations from Launchpad. "; echo; } |quilt header -r "$(PATCH_FILE)"
 
627
        quilt refresh -pab --no-timestamps "$(PATCH_FILE)"
 
628
        @echo "Patch needs committing."
 
629
 
646
630
 
647
631
###############################################################################################
648
632
# Retrieve/fabricate orig tarball.
654
638
gos: URL=https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$(ORIG_VERSION).tar.xz
655
639
gos: DEST_FILENAME=$(ORIG_PACKAGE)_$(ORIG_VERSION).orig.tar.xz
656
640
gos:
657
 
        wget --continue --progress=dot:mega --output-document=source.tar.xz $(URL) && tar xf source.tar.xz --exclude-backups --exclude-vcs --directory $(ORIG_PACKAGE)-$(ORIG_VERSION)/src --strip-components=1 && tar cJf $(DEST_FILENAME) $(ORIG_PACKAGE)-$(ORIG_VERSION) || debian/checkout-orig-source.mk
 
641
        mkdir -p $(ORIG_PACKAGE)-$(ORIG_VERSION)/src
 
642
        @set -x; wget --continue --progress=dot:mega --output-document=source.tar.xz $(URL) && tar xf source.tar.xz --exclude-backups --exclude-vcs --directory $(ORIG_PACKAGE)-$(ORIG_VERSION)/src --strip-components=1 && tar cJf $(DEST_FILENAME) $(ORIG_PACKAGE)-$(ORIG_VERSION) || debian/checkout-orig-source.mk
658
643
        @echo "# Done (created $(CURDIR)/$(DEST_FILENAME))"
659
644
 
660
 
 
661
 
#ifeq (1,$(MERGE_LP_TRANSLATIONS_IN_TARBALL))
662
 
#       bzr export $(TMP_DIR)/translations-tools $(TRANSLATIONS_TOOLS_BRANCH)
663
 
#       bzr export $(TMP_DIR)/translations-export $(TRANSLATIONS_EXPORT_BRANCH)
664
 
#       ( cd $(TMP_DIR)/src ; ../translations-tools/chromium2pot.py $(GRIT_CONVERTER_FLAGS) $(GRIT_TEMPLATES) )
665
 
#       # Patches created:
666
 
#       @( cd $(TMP_DIR)/src ; find translations-patches -type f | xargs --verbose -n 1 diffstat -p 1 )
667
 
#endif