0

Move Linux RPM and DEB packaging files to public repo

This will make things more maintainable, not requiring separate DEPS rolls etc.

BUG=246404
R=mmoss@google.com, thestig@chromium.org

Review URL: https://codereview.chromium.org/16226025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204340 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
phajdan.jr@chromium.org
2013-06-05 21:12:37 +00:00
parent 39e446866d
commit b5cb4e77ea
36 changed files with 3494 additions and 28 deletions

2
.gitignore vendored

@ -78,7 +78,7 @@ v8.log
/chrome/chrome_version_resources.xml
/chrome/common/extensions/api/api.xml
/chrome/Hammer
/chrome/installer/linux
/chrome/installer/linux/internal
/chrome/installer/mac/internal
/chrome/installer/mac/third_party/xz/xz
/chrome/installer/mini_installer.xml

@ -507,37 +507,37 @@
'version' : '<!(python <(version_py_path) -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
'revision' : '<!(python ../build/util/lastchange.py --revision-only)',
'packaging_files_common': [
'installer/linux/internal/common/apt.include',
'installer/linux/internal/common/default-app.template',
'installer/linux/internal/common/default-app-block.template',
'installer/linux/internal/common/desktop.template',
'installer/linux/internal/common/google-chrome/google-chrome.info',
'installer/linux/internal/common/installer.include',
'installer/linux/internal/common/postinst.include',
'installer/linux/internal/common/prerm.include',
'installer/linux/internal/common/repo.cron',
'installer/linux/internal/common/rpm.include',
'installer/linux/internal/common/rpmrepo.cron',
'installer/linux/internal/common/symlinks.include',
'installer/linux/internal/common/updater',
'installer/linux/internal/common/variables.include',
'installer/linux/internal/common/wrapper',
'installer/linux/common/apt.include',
'installer/linux/common/default-app.template',
'installer/linux/common/default-app-block.template',
'installer/linux/common/desktop.template',
'installer/linux/common/google-chrome/google-chrome.info',
'installer/linux/common/installer.include',
'installer/linux/common/postinst.include',
'installer/linux/common/prerm.include',
'installer/linux/common/repo.cron',
'installer/linux/common/rpm.include',
'installer/linux/common/rpmrepo.cron',
'installer/linux/common/symlinks.include',
'installer/linux/common/updater',
'installer/linux/common/variables.include',
'installer/linux/common/wrapper',
],
'packaging_files_deb': [
'installer/linux/internal/debian/build.sh',
'installer/linux/internal/debian/changelog.template',
'installer/linux/internal/debian/control.template',
'installer/linux/internal/debian/debian.menu',
'installer/linux/internal/debian/expected_deps',
'installer/linux/internal/debian/postinst',
'installer/linux/internal/debian/postrm',
'installer/linux/internal/debian/prerm',
'installer/linux/debian/build.sh',
'installer/linux/debian/changelog.template',
'installer/linux/debian/control.template',
'installer/linux/debian/debian.menu',
'installer/linux/debian/expected_deps',
'installer/linux/debian/postinst',
'installer/linux/debian/postrm',
'installer/linux/debian/prerm',
],
'packaging_files_rpm': [
'installer/linux/internal/rpm/build.sh',
'installer/linux/internal/rpm/chrome.spec.template',
'installer/linux/internal/rpm/expected_deps_i386',
'installer/linux/internal/rpm/expected_deps_x86_64',
'installer/linux/rpm/build.sh',
'installer/linux/rpm/chrome.spec.template',
'installer/linux/rpm/expected_deps_i386',
'installer/linux/rpm/expected_deps_x86_64',
],
'packaging_files_binaries': [
# TODO(mmoss) Any convenient way to get all the relevant build

@ -0,0 +1,4 @@
set noparent
mmoss@chromium.org
phajdan.jr@chromium.org
thestig@chromium.org

@ -0,0 +1,12 @@
{
'WATCHLIST_DEFINITIONS': {
'linux_installer_tools': {
'filepath': '(common|debian|rpm)/',
},
},
'WATCHLISTS': {
'linux_installer_tools': [
'mmoss@chromium.org',
],
},
}

@ -0,0 +1,200 @@
@@include@@variables.include
APT_GET="`which apt-get 2> /dev/null`"
APT_CONFIG="`which apt-config 2> /dev/null`"
SOURCES_PREAMBLE="### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.\n"
# Parse apt configuration and return requested variable value.
apt_config_val() {
APTVAR="$1"
if [ -x "$APT_CONFIG" ]; then
"$APT_CONFIG" dump | sed -e "/^$APTVAR /"'!d' -e "s/^$APTVAR \"\(.*\)\".*/\1/"
fi
}
# Install the repository signing key (see also:
# http://www.google.com/linuxrepositories/aboutkey.html)
install_key() {
APT_KEY="`which apt-key 2> /dev/null`"
if [ -x "$APT_KEY" ]; then
"$APT_KEY" add - >/dev/null 2>&1 <<KEYDATA
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
b0V0SqiTCkWADZyLT5wll8sWuQ5ylTf3z1ENoHf+G3um3/wk/+xmEHvj9HCTBEXP
78X0A/0Tqlhc2RBnEf+AqxWvM8sk8LzJI/XGjwBvKfXe+l3rnSR2kEAvGzj5Sg0X
4XmfTg4Jl8BNjWyvm2Wmjfet41LPmYJKsux3g0b8yzQxeOA4pQKKAU3Z4+rgzGmf
HdwCG5MNT2A5XxD/eDd+L4fRx0HbFkIQoAi1J3YWQSiTk15fw7RMR29vZ2xlLCBJ
bmMuIExpbnV4IFBhY2thZ2UgU2lnbmluZyBLZXkgPGxpbnV4LXBhY2thZ2VzLWtl
eW1hc3RlckBnb29nbGUuY29tPohjBBMRAgAjAhsDBgsJCAcDAgQVAggDBBYCAwEC
HgECF4AFAkYVdn8CGQEACgkQoECDD3+sWZHKSgCfdq3HtNYJLv+XZleb6HN4zOcF
AJEAniSFbuv8V5FSHxeRimHx25671az+uQINBEXwb0sQCACuA8HT2nr+FM5y/kzI
A51ZcC46KFtIDgjQJ31Q3OrkYP8LbxOpKMRIzvOZrsjOlFmDVqitiVc7qj3lYp6U
rgNVaFv6Qu4bo2/ctjNHDDBdv6nufmusJUWq/9TwieepM/cwnXd+HMxu1XBKRVk9
XyAZ9SvfcW4EtxVgysI+XlptKFa5JCqFM3qJllVohMmr7lMwO8+sxTWTXqxsptJo
pZeKz+UBEEqPyw7CUIVYGC9ENEtIMFvAvPqnhj1GS96REMpry+5s9WKuLEaclWpd
K3krttbDlY1NaeQUCRvBYZ8iAG9YSLHUHMTuI2oea07Rh4dtIAqPwAX8xn36JAYG
2vgLAAMFB/wKqaycjWAZwIe98Yt0qHsdkpmIbarD9fGiA6kfkK/UxjL/k7tmS4Vm
CljrrDZkPSQ/19mpdRcGXtb0NI9+nyM5trweTvtPw+HPkDiJlTaiCcx+izg79Fj9
KcofuNb3lPdXZb9tzf5oDnmm/B+4vkeTuEZJ//IFty8cmvCpzvY+DAz1Vo9rA+Zn
cpWY1n6z6oSS9AsyT/IFlWWBZZ17SpMHu+h4Bxy62+AbPHKGSujEGQhWq8ZRoJAT
G0KSObnmZ7FwFWu1e9XFoUCt0bSjiJWTIyaObMrWu/LvJ3e9I87HseSJStfw6fki
5og9qFEkMrIrBCp3QGuQWBq/rTdMuwNFiEkEGBECAAkFAkXwb0sCGwwACgkQoECD
D3+sWZF/WACfeNAu1/1hwZtUo1bR+MWiCjpvHtwAnA1R3IHqFLQ2X3xJ40XPuAyY
/FJG
=Quqp
-----END PGP PUBLIC KEY BLOCK-----
KEYDATA
fi
}
# Set variables for the locations of the apt sources lists.
find_apt_sources() {
APTDIR=$(apt_config_val Dir)
APTETC=$(apt_config_val 'Dir::Etc')
APT_SOURCES="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourcelist')"
APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')"
}
# Update the Google repository if it's not set correctly.
# Note: this doesn't necessarily enable the repository, it just makes sure the
# correct settings are available in the sources list.
# Returns:
# 0 - no update necessary
# 2 - error
update_bad_sources() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
find_apt_sources
SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
# Don't do anything if the file isn't there, since that probably means the
# user disabled it.
if [ ! -r "$SOURCELIST" ]; then
return 0
fi
# Basic check for active configurations (non-blank, non-comment lines).
ACTIVECONFIGS=$(grep -v "^[[:space:]]*\(#.*\)\?$" "$SOURCELIST" 2>/dev/null)
# Check if the correct repository configuration is in there.
REPOMATCH=$(grep "^[[:space:]#]*\b$REPOCONFIG\b" "$SOURCELIST" \
2>/dev/null)
# Check if the correct repository is disabled.
MATCH_DISABLED=$(echo "$REPOMATCH" | grep "^[[:space:]]*#" 2>/dev/null)
# Now figure out if we need to fix things.
BADCONFIG=1
if [ "$REPOMATCH" ]; then
# If it's there and active, that's ideal, so nothing to do.
if [ ! "$MATCH_DISABLED" ]; then
BADCONFIG=0
else
# If it's not active, but neither is anything else, that's fine too.
if [ ! "$ACTIVECONFIGS" ]; then
BADCONFIG=0
fi
fi
fi
if [ $BADCONFIG -eq 0 ]; then
return 0
fi
# At this point, either the correct configuration is completely missing, or
# the wrong configuration is active. In that case, just abandon the mess and
# recreate the file with the correct configuration. If there were no active
# configurations before, create the new configuration disabled.
DISABLE=""
if [ ! "$ACTIVECONFIGS" ]; then
DISABLE="#"
fi
printf "$SOURCES_PREAMBLE" > "$SOURCELIST"
printf "$DISABLE$REPOCONFIG\n" >> "$SOURCELIST"
if [ $? -eq 0 ]; then
return 0
fi
return 2
}
# Add the Google repository to the apt sources.
# Returns:
# 0 - sources list was created
# 2 - error
create_sources_lists() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
find_apt_sources
SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
if [ -d "$APT_SOURCESDIR" ]; then
printf "$SOURCES_PREAMBLE" > "$SOURCELIST"
printf "$REPOCONFIG\n" >> "$SOURCELIST"
if [ $? -eq 0 ]; then
return 0
fi
fi
return 2
}
# Remove our custom sources list file.
# Returns:
# 0 - successfully removed, or not configured
# !0 - failed to remove
clean_sources_lists() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
find_apt_sources
rm -f "$APT_SOURCESDIR/@@PACKAGE@@.list" \
"$APT_SOURCESDIR/@@PACKAGE@@-@@CHANNEL@@.list"
}
# Detect if the repo config was disabled by distro upgrade and enable if
# necessary.
handle_distro_upgrade() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
find_apt_sources
SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
if [ -r "$SOURCELIST" ]; then
REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIG[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
if [ $? -eq 0 ]; then
sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \
"$SOURCELIST"
LOGGER=$(which logger 2> /dev/null)
if [ "$LOGGER" ]; then
"$LOGGER" -t "$0" "Reverted repository modification: $REPOLINE."
fi
fi
fi
}
DEFAULT_ARCH="@@ARCHITECTURE@@"
get_lib_dir() {
if [ "$DEFAULT_ARCH" = "i386" ]; then
LIBDIR=lib/i386-linux-gnu
elif [ "$DEFAULT_ARCH" = "amd64" ]; then
LIBDIR=lib/x86_64-linux-gnu
else
echo Unknown CPU Architecture: "$DEFAULT_ARCH"
exit 1
fi
}

@ -0,0 +1,30 @@
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file provides common configuration information for building
# chromium-browser packages for various platforms.
# Base name of the package.
PACKAGE="chromium-browser"
# Filename of the main executable (for generating launcher scripts, etc.)
PROGNAME=chrome
# Base directory for package installation.
INSTALLDIR=/opt/chromium.org/chromium
# Display string for desktop menu/icon.
MENUNAME="Chromium Web Browser"
# Brief package description.
SHORTDESC="The web browser from Chromium.org"
# Detailed package description.
FULLDESC="Chromium is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier."
# Package maintainer information.
# TODO(mmoss) Setup a mailbox for this address
MAINTNAME="Chromium Linux Team"
MAINTMAIL="chromium-linux-packager@chromium.org"
PRODUCTURL="http://www.chromium.org/"

@ -0,0 +1,10 @@
<web-browser>
<name>@@MENUNAME@@</name>
<executable>@@INSTALLDIR@@/@@PACKAGE@@</executable>
<command>@@INSTALLDIR@@/@@PACKAGE@@ %s</command>
<icon-name>@@PACKAGE@@</icon-name>
<run-in-terminal>false</run-in-terminal>
<netscape-remote>true</netscape-remote>
<tab-command>@@INSTALLDIR@@/@@PACKAGE@@ %s</tab-command>
<win-command>@@INSTALLDIR@@/@@PACKAGE@@ --new-window %s</win-command>
</web-browser>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
<!-- This file should be put in /usr/share/gnome-control-center/default-apps,
or, if that directory does not exist, its web-browser tag patched into
/usr/share/gnome-control-center/gnome-default-applications.xml -->
<default-apps>
<web-browsers>
<web-browser>
<name>@@MENUNAME@@</name>
<executable>@@INSTALLDIR@@/@@PACKAGE@@</executable>
<command>@@INSTALLDIR@@/@@PACKAGE@@ %s</command>
<icon-name>@@PACKAGE@@</icon-name>
<run-in-terminal>false</run-in-terminal>
<netscape-remote>true</netscape-remote>
<tab-command>@@INSTALLDIR@@/@@PACKAGE@@ %s</tab-command>
<win-command>@@INSTALLDIR@@/@@PACKAGE@@ --new-window %s</win-command>
</web-browser>
</web-browsers>
</default-apps>

@ -0,0 +1,222 @@
[Desktop Entry]
Version=1.0
Name=@@MENUNAME@@
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブブラウザ
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador da Internet
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[fil]=Web Browser
GenericName[hr]=Web preglednik
GenericName[id]=Browser Web
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[sk]=WWW prehliadač
GenericName[sr]=Интернет прегледник
GenericName[te]=మహాతల అన్వేషి
GenericName[vi]=Bộ duyệt Web
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
Comment[ca]=Accedeix a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_GB]=Access the Internet
Comment[es]=Accede a Internet.
Comment[et]=Pääs Internetti
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה אל האינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristup Internetu
Comment[hu]=Internetelérés
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=인터넷 연결
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[nb]=Gå til Internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesaţi Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Gå ut på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=@@INSTALLDIR@@/@@PACKAGE@@ %U
Terminal=false
Icon=@@PACKAGE@@
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
[NewWindow Shortcut Group]
Name=New Window
Name[am]=አዲስ መስኮት
Name[ar]=نافذة جديدة
Name[bg]=Нов прозорец
Name[bn]=নতুন উইন্ডো
Name[ca]=Finestra nova
Name[cs]=Nové okno
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[el]=Νέο Παράθυρο
Name[en_GB]=New Window
Name[es]=Nueva ventana
Name[et]=Uus aken
Name[fa]=پنجره جدید
Name[fi]=Uusi ikkuna
Name[fil]=New Window
Name[fr]=Nouvelle fenêtre
Name[gu]=નવી વિંડો
Name[hi]=नई विंडो
Name[hr]=Novi prozor
Name[hu]=Új ablak
Name[id]=Jendela Baru
Name[it]=Nuova finestra
Name[iw]=חלון חדש
Name[ja]=新規ウインドウ
Name[kn]=ಹೊಸ ವಿಂಡೊ
Name[ko]=새 창
Name[lt]=Naujas langas
Name[lv]=Jauns logs
Name[ml]=പുതിയ വിന്‍ഡോ
Name[mr]=नवीन विंडो
Name[nl]=Nieuw venster
Name[no]=Nytt vindu
Name[pl]=Nowe okno
Name[pt]=Nova janela
Name[pt_BR]=Nova janela
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[sw]=Dirisha Jipya
Name[ta]=புதிய சாளரம்
Name[te]=క్రొత్త విండో
Name[th]=หน้าต่างใหม่
Name[tr]=Yeni Pencere
Name[uk]=Нове вікно
Name[vi]=Cửa sổ Mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=@@INSTALLDIR@@/@@PACKAGE@@
TargetEnvironment=Unity
[NewIncognito Shortcut Group]
Name=New Incognito Window
Name[ar]=نافذة جديدة للتصفح المتخفي
Name[bg]=Нов прозорец „инкогнито“
Name[bn]=নতুন ছদ্মবেশী উইন্ডো
Name[ca]=Finestra d'incògnit nova
Name[cs]=Nové anonymní okno
Name[da]=Nyt inkognitovindue
Name[de]=Neues Inkognito-Fenster
Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
Name[en_GB]=New Incognito window
Name[es]=Nueva ventana de incógnito
Name[et]=Uus inkognito aken
Name[fa]=پنجره جدید حالت ناشناس
Name[fi]=Uusi incognito-ikkuna
Name[fil]=Bagong Incognito window
Name[fr]=Nouvelle fenêtre de navigation privée
Name[gu]=નવી છુપી વિંડો
Name[hi]=नई गुप्त विंडो
Name[hr]=Novi anoniman prozor
Name[hu]=Új Inkognitóablak
Name[id]=Jendela Penyamaran baru
Name[it]=Nuova finestra di navigazione in incognito
Name[iw]=חלון חדש לגלישה בסתר
Name[ja]=新しいシークレット ウィンドウ
Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
Name[ko]=새 시크릿 창
Name[lt]=Naujas inkognito langas
Name[lv]=Jauns inkognito režīma logs
Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
Name[mr]=नवीन गुप्त विंडो
Name[nl]=Nieuw incognitovenster
Name[no]=Nytt inkognitovindu
Name[pl]=Nowe okno incognito
Name[pt]=Nova janela de navegação anónima
Name[pt_BR]=Nova janela anônima
Name[ro]=Fereastră nouă incognito
Name[ru]=Новое окно в режиме инкогнито
Name[sk]=Nové okno inkognito
Name[sl]=Novo okno brez beleženja zgodovine
Name[sr]=Нови прозор за прегледање без архивирања
Name[sv]=Nytt inkognitofönster
Name[ta]=புதிய மறைநிலைச் சாளரம்
Name[te]=క్రొత్త అజ్ఞాత విండో
Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
Name[tr]=Yeni Gizli pencere
Name[uk]=Нове вікно в режимі анонімного перегляду
Name[vi]=Cửa sổ ẩn danh mới
Name[zh_CN]=新建隐身窗口
Name[zh_TW]=新增無痕式視窗
Exec=@@INSTALLDIR@@/@@PACKAGE@@ --incognito
TargetEnvironment=Unity

@ -0,0 +1,30 @@
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file provides common configuration information for building
# google-chrome packages for various platforms.
# Base name of the package.
PACKAGE="google-chrome"
# Filename of the main executable (for generating launcher scripts, etc.)
PROGNAME=chrome
# Base directory for package installation.
INSTALLDIR=/opt/google/chrome
# Display string for desktop menu/icon.
MENUNAME="Google Chrome"
# Brief package description.
SHORTDESC="The web browser from Google"
# Detailed package description.
FULLDESC="Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier."
# Package maintainer information.
# TODO(mmoss) Setup a mailbox for this address
MAINTNAME="Chrome Linux Team"
MAINTMAIL="chromium-dev@chromium.org"
PRODUCTURL="http://chrome.google.com/"

@ -0,0 +1,249 @@
# Recursively replace @@include@@ template variables with the referenced file,
# and write the resulting text to stdout.
process_template_includes() {
INCSTACK+="$1->"
# Includes are relative to the file that does the include.
INCDIR=$(dirname $1)
# Clear IFS so 'read' doesn't trim whitespace
local OLDIFS="$IFS"
IFS=''
while read -r LINE
do
INCLINE=$(sed -e '/^[[:space:]]*@@include@@/!d' <<<$LINE)
if [ -n "$INCLINE" ]; then
INCFILE=$(echo $INCLINE | sed -e "s#@@include@@\(.*\)#\1#")
# Simple filename match to detect cyclic includes.
CYCLE=$(sed -e "\#$INCFILE#"'!d' <<<$INCSTACK)
if [ "$CYCLE" ]; then
echo "ERROR: Possible cyclic include detected." 1>&2
echo "$INCSTACK$INCFILE" 1>&2
exit 1
fi
if [ ! -r "$INCDIR/$INCFILE" ]; then
echo "ERROR: Couldn't read include file: $INCDIR/$INCFILE" 1>&2
exit 1
fi
process_template_includes "$INCDIR/$INCFILE"
else
echo "$LINE"
fi
done < "$1"
IFS="$OLDIFS"
INCSTACK=${INCSTACK%"$1->"}
}
# Replace template variables (@@VARNAME@@) in the given template file. If a
# second argument is given, save the processed text to that filename, otherwise
# modify the template file in place.
process_template() (
# Don't worry if some of these substitution variables aren't set.
# Note that this function is run in a sub-shell so we don't leak this
# setting, since we still want unbound variables to be an error elsewhere.
set +u
local TMPLIN="$1"
if [ -z "$2" ]; then
local TMPLOUT="$TMPLIN"
else
local TMPLOUT="$2"
fi
# Process includes first so included text also gets substitutions.
TMPLINCL="$(process_template_includes "$TMPLIN")"
sed \
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
-e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \
-e "s#@@PROGNAME@@#${PROGNAME}#g" \
-e "s#@@CHANNEL@@#${CHANNEL}#g" \
-e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \
-e "s#@@VERSION@@#${VERSION}#g" \
-e "s#@@REVISION@@#${REVISION}#g" \
-e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \
-e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \
-e "s#@@BUILDDIR@@#${BUILDDIR}#g" \
-e "s#@@STAGEDIR@@#${STAGEDIR}#g" \
-e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \
-e "s#@@MENUNAME@@#${MENUNAME}#g" \
-e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
-e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \
-e "s#@@DEPENDS@@#${DEPENDS}#g" \
-e "s#@@PROVIDES@@#${PROVIDES}#g" \
-e "s#@@REPLACES@@#${REPLACES}#g" \
-e "s#@@CONFLICTS@@#${CONFLICTS}#g" \
-e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \
-e "s#@@MAINTNAME@@#${MAINTNAME}#g" \
-e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \
-e "s#@@REPOCONFIG@@#${REPOCONFIG}#g" \
-e "s#@@SHORTDESC@@#${SHORTDESC}#g" \
-e "s#@@FULLDESC@@#${FULLDESC}#g" \
-e "s#@@DEFAULT_FLAGS@@#${DEFAULT_FLAGS:-}#g" \
> "$TMPLOUT" <<< "$TMPLINCL"
)
# Setup the installation directory hierachy in the package staging area.
prep_staging_common() {
install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \
"${STAGEDIR}/usr/bin" \
"${STAGEDIR}/usr/share/applications" \
"${STAGEDIR}/usr/share/gnome-control-center/default-apps" \
"${STAGEDIR}/usr/share/man/man1"
}
get_version_info() {
# Default to a bogus low version, so if somebody creates and installs
# a package with no version info, it won't prevent upgrading when
# trying to install a properly versioned package (i.e. a proper
# package will always be "newer").
VERSION="0.0.0.0"
# Use epoch timestamp so packages with bogus versions still increment
# and will upgrade older bogus-versioned packages.
REVISION=$(date +"%s")
# Default to non-official build since official builds set this
# properly.
OFFICIAL_BUILD=0
VERSIONFILE="${BUILDDIR}/installer/version.txt"
if [ -f "${VERSIONFILE}" ]; then
source "${VERSIONFILE}"
VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
REVISION="${LASTCHANGE}"
fi
}
stage_install_common() {
echo "Staging common install files in '${STAGEDIR}'..."
# TODO(mmoss) This assumes we built the static binaries. To support shared
# builds, we probably want an install target in scons so it can give us all
# the right files. See also:
# http://code.google.com/p/chromium/issues/detail?id=4451
#
# app
# We need to add the debug link so gdb knows to look for the symbols.
DEBUGFILE="${BUILDDIR}/${PROGNAME}.debug"
STRIPPEDFILE="${BUILDDIR}/${PROGNAME}.stripped"
eu-strip -o "${STRIPPEDFILE}" -f "${DEBUGFILE}" "${BUILDDIR}/${PROGNAME}"
install -m 755 "${STRIPPEDFILE}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}"
rm "${DEBUGFILE}" "${STRIPPEDFILE}"
# resources
install -m 644 "${BUILDDIR}/${PROGNAME}.pak" "${STAGEDIR}/${INSTALLDIR}/"
install -m 644 "${BUILDDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/"
# TODO(mmoss): This has broken a couple times on adding new .pak files. Maybe
# we should flag all installer files in FILES.cfg and get them from there, so
# there's only one place people need to keep track of such things (and in
# only the public repository).
if [ -r "${BUILDDIR}/chrome_100_percent.pak" ]; then
install -m 644 "${BUILDDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
else
install -m 644 "${BUILDDIR}/theme_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
install -m 644 "${BUILDDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
fi
# sandbox
# Rename sandbox binary with hyphen instead of underscore because that's what
# the code looks for, but the build targets can't use hyphens (scons bug?)
install -m 4755 -s "${BUILDDIR}/${PROGNAME}_sandbox" \
"${STAGEDIR}/${INSTALLDIR}/${PROGNAME}-sandbox"
# l10n paks
cp -a "${BUILDDIR}/locales" "${STAGEDIR}/${INSTALLDIR}/"
find "${STAGEDIR}/${INSTALLDIR}/locales" -type f -exec chmod 644 '{}' \;
find "${STAGEDIR}/${INSTALLDIR}/locales" -type d -exec chmod 755 '{}' \;
# ffmpeg libs
install -m 644 -s "${BUILDDIR}/libffmpegsumo.so" "${STAGEDIR}/${INSTALLDIR}/"
# Widevine CDM.
if [ -f "${BUILDDIR}/libwidevinecdmadapter.so" ]; then
install -m 644 -s "${BUILDDIR}/libwidevinecdmadapter.so" "${STAGEDIR}/${INSTALLDIR}/"
install -m 644 "${BUILDDIR}/libwidevinecdm.so" "${STAGEDIR}/${INSTALLDIR}/"
fi
# Pepper Flash.
PEPPERFLASH_SRCDIR="${BUILDDIR}/PepperFlash"
PEPPERFLASH_DESTDIR="${STAGEDIR}/${INSTALLDIR}/PepperFlash"
install -m 755 -d "${PEPPERFLASH_DESTDIR}"
install -m 644 -s "${PEPPERFLASH_SRCDIR}/libpepflashplayer.so" \
"${PEPPERFLASH_DESTDIR}/"
install -m 644 "${PEPPERFLASH_SRCDIR}/manifest.json" \
"${PEPPERFLASH_DESTDIR}/"
# pdf plugin
if [ -f "${BUILDDIR}/libpdf.so" ]; then
install -m 644 -s "${BUILDDIR}/libpdf.so" "${STAGEDIR}/${INSTALLDIR}/"
fi
# peerconnection shared library
if [ -f "${BUILDDIR}/lib/libpeerconnection.so" ]; then
install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/lib/"
install -m 644 -s "${BUILDDIR}/lib/libpeerconnection.so" "${STAGEDIR}/${INSTALLDIR}/lib/"
fi
# nacl pepper plugin
if [ -f "${BUILDDIR}/libppGoogleNaClPluginChrome.so" ]; then
install -m 644 -s "${BUILDDIR}/libppGoogleNaClPluginChrome.so" "${STAGEDIR}/${INSTALLDIR}/"
fi
# nacl_helper and nacl_helper_bootstrap
# Don't use "-s" (strip) because this runs binutils "strip", which
# mangles the special ELF program headers of nacl_helper_bootstrap.
# Explicitly use eu-strip instead, because it doesn't have that problem.
for file in nacl_helper nacl_helper_bootstrap; do
buildfile="${BUILDDIR}/${file}"
if [ -f "${buildfile}" ]; then
strippedfile="${buildfile}.stripped"
debugfile="${buildfile}.debug"
eu-strip -o "${strippedfile}" -f "${debugfile}" "${buildfile}"
install -m 755 "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
fi
done
# Don't use "-s" (strip) because this would use the Linux toolchain to
# strip the NaCl binary, which has the potential to break it. It
# certainly resets the OSABI and ABIVERSION fields to non-NaCl values,
# although the NaCl IRT loader doesn't care about these fields. In any
# case, the IRT binaries are already stripped by NaCl's build process.
for filename in ${BUILDDIR}/nacl_irt_*.nexe; do
# Re-check the filename in case globbing matched nothing.
if [ -f "$filename" ]; then
install -m 644 "$filename" "${STAGEDIR}/${INSTALLDIR}/`basename "$filename"`"
fi
done
# default apps
if [ -d "${BUILDDIR}/default_apps" ]; then
cp -a "${BUILDDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/"
find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \;
find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \;
fi
# launcher script and symlink
process_template "${BUILDDIR}/installer/common/wrapper" \
"${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
pushd "${STAGEDIR}/usr/bin/"
ln -snf "${INSTALLDIR}/${PACKAGE}" "${PACKAGE}"
popd
# app icons
install -m 644 \
"${BUILDDIR}/installer/theme/product_logo_"*.png \
"${BUILDDIR}/installer/theme/product_logo_32.xpm" \
"${STAGEDIR}/${INSTALLDIR}/"
# desktop integration
install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/"
install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/"
process_template "${BUILDDIR}/installer/common/desktop.template" \
"${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop"
chmod 644 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop"
process_template "${BUILDDIR}/installer/common/default-app.template" \
"${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml"
chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml"
process_template "${BUILDDIR}/installer/common/default-app-block.template" \
"${STAGEDIR}${INSTALLDIR}/default-app-block"
chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block"
# documentation
install -m 755 "${BUILDDIR}/${PROGNAME}.1" \
"${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1"
}

@ -0,0 +1,49 @@
# Add icons to the system icons
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
if [ ! -x "$XDG_ICON_RESOURCE" ]; then
echo "Error: Could not find xdg-icon-resource" >&2
exit 1
fi
for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
size="${icon##*/product_logo_}"
"$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@"
done
# Add an entry to the system menu
XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
UPDATE_MENUS="`which update-menus 2> /dev/null`"
if [ ! -x "$XDG_DESKTOP_MENU" ]; then
echo "Error: Could not find xdg-desktop-menu" >&2
exit 1
fi
"$XDG_DESKTOP_MENU" install @@INSTALLDIR@@/@@PACKAGE@@.desktop
if [ -x "$UPDATE_MENUS" ]; then
update-menus
fi
# This function uses sed to insert the contents of one file into another file,
# after the first line matching a given regular expression. If there is no
# matching line, then the file is unchanged.
insert_after_first_match() {
# $1: file to update
# $2: regular expression
# $3: file to insert
sed -i -e "1,/$2/ {
/$2/ r $3
}" "$1"
}
# If /usr/share/gnome-control-center/gnome-default-applications.xml exists, it
# may need to be updated to add ourselves to the default applications list. If
# we find the file and it does not seem to contain our patch already (the patch
# is safe to leave even after uninstall), update it.
GNOME_DFL_APPS=/usr/share/gnome-control-center/gnome-default-applications.xml
if [ -f "$GNOME_DFL_APPS" ]; then
# Conditionally insert the contents of the file "default-app-block" after the
# first "<web-browsers>" line we find in gnome-default-applications.xml
fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \
"$GNOME_DFL_APPS" \
"^[ ]*<web-browsers>[ ]*$" \
"@@INSTALLDIR@@/default-app-block"
fi

@ -0,0 +1,23 @@
# Remove icons from the system icons
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
if [ ! -x "$XDG_ICON_RESOURCE" ]; then
echo "Error: Could not find xdg-icon-resource" >&2
exit 1
fi
for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
size="${icon##*/product_logo_}"
"$XDG_ICON_RESOURCE" uninstall --size "${size%.png}" "@@PACKAGE@@"
done
# Remove the entry from the system menu
XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
UPDATE_MENUS="`which update-menus 2> /dev/null`"
if [ ! -x "$XDG_DESKTOP_MENU" ]; then
echo "Error: Could not find xdg-desktop-menu" >&2
exit 1
fi
"$XDG_DESKTOP_MENU" uninstall @@INSTALLDIR@@/@@PACKAGE@@.desktop
if [ -x "$UPDATE_MENUS" ]; then
update-menus
fi

@ -0,0 +1,42 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This script is part of the @@PACKAGE@@ package.
#
# It creates the repository configuration file for package updates, and it
# monitors that config to see if it has been disabled by the overly aggressive
# distro upgrade process (e.g. intrepid -> jaunty). When this situation is
# detected, the respository will be re-enabled. If the respository is disabled
# for any other reason, this won't re-enable it.
#
# This functionality can be controlled by creating the $DEFAULTS_FILE and
# setting "repo_add_once" and/or "repo_reenable_on_distupgrade" to "true" or
# "false" as desired. An empty $DEFAULTS_FILE is the same as setting both values
# to "false".
@@include@@apt.include
## MAIN ##
DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
if [ -r "$DEFAULTS_FILE" ]; then
. "$DEFAULTS_FILE"
fi
if [ "$repo_add_once" = "true" ]; then
install_key
create_sources_lists
RES=$?
# Sources creation succeeded, so stop trying.
if [ $RES -ne 2 ]; then
sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' "$DEFAULTS_FILE"
fi
else
update_bad_sources
fi
if [ "$repo_reenable_on_distupgrade" = "true" ]; then
handle_distro_upgrade
fi

@ -0,0 +1,318 @@
@@include@@variables.include
# Install the repository signing key (see also:
# http://www.google.com/linuxrepositories/aboutkey.html)
install_rpm_key() {
# Check to see if key already exists.
rpm -q gpg-pubkey-7fac5991-4615767f > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
# Key already exists
return 0
fi
# This is to work around a bug in RPM 4.7.0. (see http://crbug.com/22312)
rpm -q gpg-pubkey-7fac5991-45f06f46 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
# Key already exists
return 0
fi
# RPM on Mandriva 2009 is dumb and does not understand "rpm --import -"
TMPKEY=$(mktemp /tmp/google.sig.XXXXXX)
if [ -n "$TMPKEY" ]; then
cat > "$TMPKEY" <<KEYDATA
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
b0V0SqiTCkWADZyLT5wll8sWuQ5ylTf3z1ENoHf+G3um3/wk/+xmEHvj9HCTBEXP
78X0A/0Tqlhc2RBnEf+AqxWvM8sk8LzJI/XGjwBvKfXe+l3rnSR2kEAvGzj5Sg0X
4XmfTg4Jl8BNjWyvm2Wmjfet41LPmYJKsux3g0b8yzQxeOA4pQKKAU3Z4+rgzGmf
HdwCG5MNT2A5XxD/eDd+L4fRx0HbFkIQoAi1J3YWQSiTk15fw7RMR29vZ2xlLCBJ
bmMuIExpbnV4IFBhY2thZ2UgU2lnbmluZyBLZXkgPGxpbnV4LXBhY2thZ2VzLWtl
eW1hc3RlckBnb29nbGUuY29tPohjBBMRAgAjAhsDBgsJCAcDAgQVAggDBBYCAwEC
HgECF4AFAkYVdn8CGQEACgkQoECDD3+sWZHKSgCfdq3HtNYJLv+XZleb6HN4zOcF
AJEAniSFbuv8V5FSHxeRimHx25671az+uQINBEXwb0sQCACuA8HT2nr+FM5y/kzI
A51ZcC46KFtIDgjQJ31Q3OrkYP8LbxOpKMRIzvOZrsjOlFmDVqitiVc7qj3lYp6U
rgNVaFv6Qu4bo2/ctjNHDDBdv6nufmusJUWq/9TwieepM/cwnXd+HMxu1XBKRVk9
XyAZ9SvfcW4EtxVgysI+XlptKFa5JCqFM3qJllVohMmr7lMwO8+sxTWTXqxsptJo
pZeKz+UBEEqPyw7CUIVYGC9ENEtIMFvAvPqnhj1GS96REMpry+5s9WKuLEaclWpd
K3krttbDlY1NaeQUCRvBYZ8iAG9YSLHUHMTuI2oea07Rh4dtIAqPwAX8xn36JAYG
2vgLAAMFB/wKqaycjWAZwIe98Yt0qHsdkpmIbarD9fGiA6kfkK/UxjL/k7tmS4Vm
CljrrDZkPSQ/19mpdRcGXtb0NI9+nyM5trweTvtPw+HPkDiJlTaiCcx+izg79Fj9
KcofuNb3lPdXZb9tzf5oDnmm/B+4vkeTuEZJ//IFty8cmvCpzvY+DAz1Vo9rA+Zn
cpWY1n6z6oSS9AsyT/IFlWWBZZ17SpMHu+h4Bxy62+AbPHKGSujEGQhWq8ZRoJAT
G0KSObnmZ7FwFWu1e9XFoUCt0bSjiJWTIyaObMrWu/LvJ3e9I87HseSJStfw6fki
5og9qFEkMrIrBCp3QGuQWBq/rTdMuwNFiEkEGBECAAkFAkXwb0sCGwwACgkQoECD
D3+sWZF/WACfeNAu1/1hwZtUo1bR+MWiCjpvHtwAnA1R3IHqFLQ2X3xJ40XPuAyY
/FJG
=Quqp
-----END PGP PUBLIC KEY BLOCK-----
KEYDATA
rpm --import "$TMPKEY"
rc=$?
rm -f "$TMPKEY"
if [ "$rc" -eq "0" ]; then
return 0
fi
fi
return 1
}
determine_rpm_package_manager() {
local RELEASE
LSB_RELEASE="$(which lsb_release 2> /dev/null)"
if [ -x "$LSB_RELEASE" ]; then
RELEASE=$(lsb_release -i 2> /dev/null | sed 's/:\t/:/' | cut -d ':' -f 2-)
case $RELEASE in
"Fedora")
PACKAGEMANAGER=yum
;;
"MandrivaLinux")
PACKAGEMANAGER=urpmi
;;
"SUSE LINUX")
PACKAGEMANAGER=yast
;;
esac
fi
if [ "$PACKAGEMANAGER" ]; then
return
fi
# Fallback methods that are probably unnecessary on modern systems.
if [ -f "/etc/lsb-release" ]; then
# file missing on Fedora, does not contain DISTRIB_ID on OpenSUSE.
eval $(sed -e '/DISTRIB_ID/!d' /etc/lsb-release)
case $DISTRIB_ID in
MandrivaLinux)
PACKAGEMANAGER=urpmi
;;
esac
fi
if [ "$PACKAGEMANAGER" ]; then
return
fi
if [ -f "/etc/fedora-release" ] || [ -f "/etc/redhat-release" ]; then
PACKAGEMANAGER=yum
elif [ -f "/etc/SuSE-release" ]; then
PACKAGEMANAGER=yast
elif [ -f "/etc/mandriva-release" ]; then
PACKAGEMANAGER=urpmi
fi
}
DEFAULT_ARCH="@@ARCHITECTURE@@"
YUM_REPO_FILE="/etc/yum.repos.d/@@PACKAGE@@.repo"
ZYPPER_REPO_FILE="/etc/zypp/repos.d/@@PACKAGE@@.repo"
URPMI_REPO_FILE="/etc/urpmi/urpmi.cfg"
install_yum() {
install_rpm_key
if [ ! "$REPOCONFIG" ]; then
return 0
fi
if [ -d "/etc/yum.repos.d" ]; then
cat > "$YUM_REPO_FILE" << REPOCONTENT
[@@PACKAGE@@]
name=@@PACKAGE@@
baseurl=$REPOCONFIG/$DEFAULT_ARCH
enabled=1
gpgcheck=1
REPOCONTENT
fi
}
# This is called by the cron job, rather than in the RPM postinstall.
# We cannot do this during the install when urpmi is running due to
# database locking. We also need to enable the repository, and we can
# only do that while we are online.
# see: https://qa.mandriva.com/show_bug.cgi?id=31893
configure_urpmi() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
urpmq --list-media | grep -q -s "^@@PACKAGE@@$"
if [ "$?" -eq "0" ]; then
# Repository already configured
return 0
fi
urpmi.addmedia --update \
"@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
}
install_urpmi() {
# urpmi not smart enough to pull media_info/pubkey from the repository?
install_rpm_key
# Defer urpmi.addmedia to configure_urpmi() in the cron job.
# See comment there.
#
# urpmi.addmedia --update \
# "@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
}
install_yast() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
# We defer adding the key to later. See comment in the cron job.
# Ideally, we would run: zypper addrepo -t YUM -f \
# "$REPOCONFIG/$DEFAULT_ARCH" "@@PACKAGE@@"
# but that does not work when zypper is running.
if [ -d "/etc/zypp/repos.d" ]; then
cat > "$ZYPPER_REPO_FILE" << REPOCONTENT
[@@PACKAGE@@]
name=@@PACKAGE@@
enabled=1
autorefresh=1
baseurl=$REPOCONFIG/$DEFAULT_ARCH
type=rpm-md
keeppackages=0
REPOCONTENT
fi
}
# Check if the automatic repository configuration is done, so we know when to
# stop trying.
verify_install() {
# It's probably enough to see that the repo configs have been created. If they
# aren't configured properly, update_bad_repo should catch that when it's run.
case $1 in
"yum")
[ -f "$YUM_REPO_FILE" ]
;;
"yast")
[ -f "$ZYPPER_REPO_FILE" ]
;;
"urpmi")
urpmq --list-url | grep -q -s "\b@@PACKAGE@@\b"
;;
esac
}
# Update the Google repository if it's not set correctly.
update_bad_repo() {
if [ ! "$REPOCONFIG" ]; then
return 0
fi
determine_rpm_package_manager
case $PACKAGEMANAGER in
"yum")
update_repo_file "$YUM_REPO_FILE"
;;
"yast")
update_repo_file "$ZYPPER_REPO_FILE"
;;
"urpmi")
update_urpmi_cfg
;;
esac
}
update_repo_file() {
REPO_FILE="$1"
# Don't do anything if the file isn't there, since that probably means the
# user disabled it.
if [ ! -r "$REPO_FILE" ]; then
return 0
fi
# Check if the correct repository configuration is in there.
REPOMATCH=$(grep "^baseurl=$REPOCONFIG/$DEFAULT_ARCH" "$REPO_FILE" \
2>/dev/null)
# If it's there, nothing to do
if [ "$REPOMATCH" ]; then
return 0
fi
# Check if it's there but disabled by commenting out (as opposed to using the
# 'enabled' setting).
MATCH_DISABLED=$(grep "^[[:space:]]*#.*baseurl=$REPOCONFIG/$DEFAULT_ARCH" \
"$REPO_FILE" 2>/dev/null)
if [ "$MATCH_DISABLED" ]; then
# It's OK for it to be disabled, as long as nothing bogus is enabled in its
# place.
ACTIVECONFIGS=$(grep "^baseurl=.*" "$REPO_FILE" 2>/dev/null)
if [ ! "$ACTIVECONFIGS" ]; then
return 0
fi
fi
# If we get here, the correct repository wasn't found, or something else is
# active, so fix it. This assumes there is a 'baseurl' setting, but if not,
# then that's just another way of disabling, so we won't try to add it.
sed -i -e "s,^baseurl=.*,baseurl=$REPOCONFIG/$DEFAULT_ARCH," "$REPO_FILE"
}
update_urpmi_cfg() {
REPOCFG=$(urpmq --list-url | grep "\b@@PACKAGE@@\b")
if [ ! "$REPOCFG" ]; then
# Don't do anything if the repo isn't there, since that probably means the
# user deleted it.
return 0
fi
# See if it's the right repo URL
REPOMATCH=$(echo "$REPOCFG" | grep "\b$REPOCONFIG/$DEFAULT_ARCH\b")
# If so, nothing to do
if [ "$REPOMATCH" ]; then
return 0
fi
# Looks like it's the wrong URL, so recreate it.
urpmi.removemedia "@@PACKAGE@@" && \
urpmi.addmedia --update "@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
}
# We only remove the repository configuration during a purge. Since RPM has
# no equivalent to dpkg --purge, the code below is actually never used. We
# keep it only for reference purposes, should we ever need it.
#
#remove_yum() {
# rm -f "$YUM_REPO_FILE"
#}
#
#remove_urpmi() {
# # Ideally, we would run: urpmi.removemedia "@@PACKAGE@@"
# # but that does not work when urpmi is running.
# # Sentinel comment text does not work either because urpmi.update removes
# # all comments. So we just delete the entry that matches what we originally
# # inserted. If such an entry was added manually, that's tough luck.
# if [ -f "$URPMI_REPO_FILE" ]; then
# sed -i '\_^@@PACKAGE@@ $REPOCONFIG/$DEFAULT_ARCH {$_,/^}$/d' "$URPMI_REPO_FILE"
# fi
#}
#
#remove_yast() {
# # Ideally, we would run: zypper removerepo "@@PACKAGE@@"
# # but that does not work when zypper is running.
# rm -f /etc/zypp/repos.d/@@PACKAGE@@.repo
#}
DEFAULT_ARCH="@@ARCHITECTURE@@"
get_lib_dir() {
if [ "$DEFAULT_ARCH" = "i386" ]; then
LIBDIR=lib
elif [ "$DEFAULT_ARCH" = "x86_64" ]; then
LIBDIR=lib64
else
echo Unknown CPU Architecture: "$DEFAULT_ARCH"
exit 1
fi
}

@ -0,0 +1,65 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This script is part of the @@PACKAGE@@ package.
#
# It creates the repository configuration file for package updates, since
# we cannot do this during the @@PACKAGE@@ installation since the repository
# is locked.
#
# This functionality can be controlled by creating the $DEFAULTS_FILE and
# setting "repo_add_once" to "true" or "false" as desired. An empty
# $DEFAULTS_FILE is the same as setting the value to "false".
@@include@@rpm.include
## MAIN ##
DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
if [ -r "$DEFAULTS_FILE" ]; then
. "$DEFAULTS_FILE"
fi
if [ "$repo_add_once" = "true" ]; then
determine_rpm_package_manager
# The initial install happens in the post-install scripts, but there have been
# reports of configuration problems, so just verify that everything looks
# good, and if not, try to install again.
verify_install $PACKAGEMANAGER
if [ $? -ne 0 ]; then
install_${PACKAGEMANAGER}
fi
# Now do any extra configuration that couldn't be done by post-install.
case $PACKAGEMANAGER in
"urpmi")
# We need to configure urpmi after the install has finished.
# See configure_urpmi() for details.
configure_urpmi
;;
"yast")
# It looks as though yast/zypper has a lock on the RPM DB during
# postinstall, so we cannot add the signing key with install_rpm_key().
# Instead, we attempt to do this here. If the user attempt to update before
# the cron job imports the key, Yast will grab the key from our server and
# prompt the user to accept the key.
install_rpm_key
;;
esac
if [ $? -eq 0 ]; then
# Before we quit auto-configuration, check that everything looks sane, since
# part of this happened during package install and we don't have the return
# value of that process.
verify_install $PACKAGEMANAGER
if [ $? -eq 0 ]; then
sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' \
"$DEFAULTS_FILE"
fi
fi
else
update_bad_repo
fi

@ -0,0 +1,51 @@
NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \
libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d"
add_nss_symlinks() {
get_lib_dir
for f in $NSS_FILES
do
target=$(echo $f | sed 's/\.[01]d$//')
if [ -f "/$LIBDIR/$target" ]; then
ln -snf "/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
elif [ -f "/usr/$LIBDIR/$target" ]; then
ln -snf "/usr/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
else
echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target".
exit 1
fi
done
}
remove_nss_symlinks() {
for f in $NSS_FILES
do
rm -rf "@@INSTALLDIR@@/$f"
done
}
# Fedora 18 now has libudev.so.1. http://crbug.com/145160
# Same for Ubuntu 13.04. http://crbug.com/226002
LIBUDEV_0=libudev.so.0
LIBUDEV_1=libudev.so.1
add_udev_symlinks() {
get_lib_dir
if [ -f "/$LIBDIR/$LIBUDEV_0" -o -f "/usr/$LIBDIR/$LIBUDEV_0" -o -f "/lib/$LIBUDEV_0" ]; then
return 0
fi
if [ -f "/$LIBDIR/$LIBUDEV_1" ]; then
ln -snf "/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
elif [ -f "/usr/$LIBDIR/$LIBUDEV_1" ];
then
ln -snf "/usr/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
else
echo "$LIBUDEV_1" not found in "$LIBDIR" or "/usr/$LIBDIR".
exit 1
fi
}
remove_udev_symlinks() {
rm -rf "@@INSTALLDIR@@/$LIBUDEV_0"
}

@ -0,0 +1,26 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO
# - handle other distros (e.g. non-apt).
@@include@@apt.include
if [ -x "$APT_GET" ]; then
update_sources_lists
# If the repo was just added, force a cache update.
if [ $? -eq 1 ]; then
install_key
"$APT_GET" -qq update
fi
# TODO(mmoss) detect if apt cache is stale (> 1 day) and force update?
# Just try to install the packge. If it's already installed, apt-get won't do
# anything.
"$APT_GET" install -y -q @@PACKAGE@@
fi

@ -0,0 +1,5 @@
# System-wide package configuration.
DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
# sources.list setting for @@PACKAGE@@ updates.
REPOCONFIG="@@REPOCONFIG@@"

@ -0,0 +1,42 @@
#!/bin/bash
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="`readlink -f "$0"`"
HERE="`dirname "$CHROME_WRAPPER"`"
# We include some xdg utilities next to the binary, and we want to prefer them
# over the system versions when we know the system versions are very old. We
# detect whether the system xdg utilities are sufficiently new to be likely to
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
# so that the system xdg utilities (including any distro patches) will be used.
if ! which xdg-settings &> /dev/null; then
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
export PATH="$HERE:$PATH"
else
# Use system xdg utilities. But first create mimeapps.list if it doesn't
# exist; some systems have bugs in xdg-mime that make it fail without it.
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
mkdir -p "$xdg_app_dir"
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
fi
# Always use our versions of ffmpeg libs.
# This also makes RPMs find the compatibly-named library symlinks.
if [[ -n "$LD_LIBRARY_PATH" ]]; then
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
else
LD_LIBRARY_PATH="$HERE:$HERE/lib"
fi
export LD_LIBRARY_PATH
export CHROME_VERSION_EXTRA="@@CHANNEL@@"
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$@"

@ -0,0 +1,330 @@
#!/bin/bash
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(mmoss) This currently only works with official builds, since non-official
# builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
set -e
if [ "$VERBOSE" ]; then
set -x
fi
set -u
# Create the Debian changelog file needed by dpkg-gencontrol. This just adds a
# placeholder change, indicating it is the result of an automatic build.
# TODO(mmoss) Release packages should create something meaningful for a
# changelog, but simply grabbing the actual 'svn log' is way too verbose. Do we
# have any type of "significant/visible changes" log that we could use for this?
gen_changelog() {
rm -f "${DEB_CHANGELOG}"
process_template "${SCRIPTDIR}/changelog.template" "${DEB_CHANGELOG}"
debchange -a --nomultimaint -m --changelog "${DEB_CHANGELOG}" \
"Release Notes: ${RELEASENOTES}"
# Trunk packages need to install to a custom path and with custom filenames
# (e.g. not /usr/bin/google-chrome) so they don't conflict with release
# channel packages.
if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
local PACKAGE="${PACKAGE}-${CHANNEL}"
fi
GZLOG="${STAGEDIR}/usr/share/doc/${PACKAGE}/changelog.gz"
mkdir -p "$(dirname "${GZLOG}")"
gzip -9 -c "${DEB_CHANGELOG}" > "${GZLOG}"
chmod 644 "${GZLOG}"
}
# Create the Debian control file needed by dpkg-deb.
gen_control() {
dpkg-gencontrol -v"${VERSIONFULL}" -c"${DEB_CONTROL}" -l"${DEB_CHANGELOG}" \
-f"${DEB_FILES}" -p"${PACKAGE}-${CHANNEL}" -P"${STAGEDIR}" \
-O > "${STAGEDIR}/DEBIAN/control"
rm -f "${DEB_CONTROL}"
}
# Setup the installation directory hierachy in the package staging area.
prep_staging_debian() {
prep_staging_common
install -m 755 -d "${STAGEDIR}/DEBIAN" \
"${STAGEDIR}/etc/cron.daily" \
"${STAGEDIR}/usr/share/menu" \
"${STAGEDIR}/usr/share/doc/${PACKAGE}"
}
# Put the package contents in the staging area.
stage_install_debian() {
# Trunk packages need to install to a custom path and with custom filenames
# (e.g. not /usr/bin/google-chrome) so they don't conflict with release
# channel packages.
if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
local PACKAGE="${PACKAGE}-${CHANNEL}"
local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
# This would ideally be compiled into the app, but that's a bit too
# intrusive of a change for these limited use channels, so we'll just hack
# it into the wrapper script. The user can still override since it seems to
# work to specify --user-data-dir multiple times on the command line, with
# the last occurrence winning.
local DEFAULT_FLAGS="--user-data-dir=\"\${HOME}/.config/${PACKAGE}\""
local MENUNAME="${MENUNAME} (${CHANNEL})"
fi
prep_staging_debian
stage_install_common
echo "Staging Debian install files in '${STAGEDIR}'..."
install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/cron"
process_template "${BUILDDIR}/installer/common/repo.cron" \
"${STAGEDIR}/${INSTALLDIR}/cron/${PACKAGE}"
chmod 755 "${STAGEDIR}/${INSTALLDIR}/cron/${PACKAGE}"
pushd "${STAGEDIR}/etc/cron.daily/"
ln -snf "${INSTALLDIR}/cron/${PACKAGE}" "${PACKAGE}"
popd
process_template "${BUILDDIR}/installer/debian/debian.menu" \
"${STAGEDIR}/usr/share/menu/${PACKAGE}.menu"
chmod 644 "${STAGEDIR}/usr/share/menu/${PACKAGE}.menu"
process_template "${BUILDDIR}/installer/debian/postinst" \
"${STAGEDIR}/DEBIAN/postinst"
chmod 755 "${STAGEDIR}/DEBIAN/postinst"
process_template "${BUILDDIR}/installer/debian/prerm" \
"${STAGEDIR}/DEBIAN/prerm"
chmod 755 "${STAGEDIR}/DEBIAN/prerm"
process_template "${BUILDDIR}/installer/debian/postrm" \
"${STAGEDIR}/DEBIAN/postrm"
chmod 755 "${STAGEDIR}/DEBIAN/postrm"
}
# Actually generate the package file.
do_package() {
echo "Packaging ${ARCHITECTURE}..."
PREDEPENDS="$COMMON_PREDEPS"
DEPENDS="${COMMON_DEPS}"
# Trunk is a special package, mostly for development testing, so don't make
# it replace any installed release packages.
if [ "$CHANNEL" != "trunk" ] && [ "$CHANNEL" != "asan" ]; then
REPLACES="${PACKAGE}"
CONFLICTS="${PACKAGE}"
PROVIDES="${PACKAGE}, www-browser"
fi
gen_changelog
process_template "${SCRIPTDIR}/control.template" "${DEB_CONTROL}"
export DEB_HOST_ARCH="${ARCHITECTURE}"
if [ -f "${DEB_CONTROL}" ]; then
gen_control
fi
fakeroot dpkg-deb -Zlzma -b "${STAGEDIR}" .
}
# Remove temporary files and unwanted packaging output.
cleanup() {
echo "Cleaning..."
rm -rf "${STAGEDIR}"
rm -rf "${TMPFILEDIR}"
}
usage() {
echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir'] "
echo " [-b 'dir']"
echo "-c channel the package channel (trunk, asan, unstable, beta, stable)"
echo "-a arch package architecture (ia32 or x64)"
echo "-o dir package output directory [${OUTPUTDIR}]"
echo "-b dir build input directory [${BUILDDIR}]"
echo "-h this help message"
}
# Check that the channel name is one of the allowable ones.
verify_channel() {
case $CHANNEL in
stable )
CHANNEL=stable
RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Stable%20updates"
;;
unstable|dev|alpha )
CHANNEL=unstable
RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Dev%20updates"
;;
testing|beta )
CHANNEL=beta
RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Beta%20updates"
;;
trunk|asan )
# Setting this to empty will prevent it from updating any existing configs
# from release packages.
REPOCONFIG=""
RELEASENOTES="http://googlechromereleases.blogspot.com/"
;;
* )
echo
echo "ERROR: '$CHANNEL' is not a valid channel type."
echo
exit 1
;;
esac
}
process_opts() {
while getopts ":o:b:c:a:h" OPTNAME
do
case $OPTNAME in
o )
OUTPUTDIR=$(readlink -f "${OPTARG}")
mkdir -p "${OUTPUTDIR}"
;;
b )
BUILDDIR=$(readlink -f "${OPTARG}")
;;
c )
CHANNEL="$OPTARG"
;;
a )
TARGETARCH="$OPTARG"
;;
h )
usage
exit 0
;;
\: )
echo "'-$OPTARG' needs an argument."
usage
exit 1
;;
* )
echo "invalid command-line option: $OPTARG"
usage
exit 1
;;
esac
done
}
#=========
# MAIN
#=========
SCRIPTDIR=$(readlink -f "$(dirname "$0")")
OUTPUTDIR="${PWD}"
STAGEDIR=$(mktemp -d -t deb.build.XXXXXX) || exit 1
TMPFILEDIR=$(mktemp -d -t deb.tmp.XXXXXX) || exit 1
DEB_CHANGELOG="${TMPFILEDIR}/changelog"
DEB_FILES="${TMPFILEDIR}/files"
DEB_CONTROL="${TMPFILEDIR}/control"
CHANNEL="trunk"
# Default target architecture to same as build host.
if [ "$(uname -m)" = "x86_64" ]; then
TARGETARCH="x64"
else
TARGETARCH="ia32"
fi
# call cleanup() on exit
trap cleanup 0
process_opts "$@"
if [ ! "$BUILDDIR" ]; then
BUILDDIR=$(readlink -f "${SCRIPTDIR}/../../../../../out/Release")
fi
source ${BUILDDIR}/installer/common/installer.include
get_version_info
VERSIONFULL="${VERSION}-r${REVISION}"
if [ "$CHROMIUM_BUILD" = "_google_chrome" ]; then
source "${BUILDDIR}/installer/common/google-chrome.info"
else
source "${BUILDDIR}/installer/common/chromium-browser.info"
fi
eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
"${BUILDDIR}/installer/theme/BRANDING")
REPOCONFIG="deb http://dl.google.com/linux/${PACKAGE#google-}/deb/ stable main"
verify_channel
# Some Debian packaging tools want these set.
export DEBFULLNAME="${MAINTNAME}"
export DEBEMAIL="${MAINTMAIL}"
# We'd like to eliminate more of these deps by relying on the 'lsb' package, but
# that brings in tons of unnecessary stuff, like an mta and rpm. Until that full
# 'lsb' package is installed by default on DEB distros, we'll have to stick with
# the LSB sub-packages, to avoid pulling in all that stuff that's not installed
# by default.
# Need a dummy debian/control file for dpkg-shlibdeps.
DUMMY_STAGING_DIR="${TMPFILEDIR}/dummy_staging"
mkdir "$DUMMY_STAGING_DIR"
cd "$DUMMY_STAGING_DIR"
mkdir debian
touch debian/control
# Generate the dependencies,
# TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was
# resolving deps using some of our build output shlibs (i.e.
# out/Release/lib.target/libfreetype.so.6), and was then failing with:
# dpkg-shlibdeps: error: no dependency information found for ...
# It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps,
# but it seems that we don't currently, so this is the most expediant fix.
SAVE_LDLP=${LD_LIBRARY_PATH:-}
unset LD_LIBRARY_PATH
DPKG_SHLIB_DEPS=$(dpkg-shlibdeps -O "$BUILDDIR/chrome" 2> /dev/null | \
sed 's/^shlibs:Depends=//')
if [ -n "$SAVE_LDLP" ]; then
LD_LIBRARY_PATH=$SAVE_LDLP
fi
# Format it nicely and save it for comparison.
# The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness.
echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \
grep -v '^libc6 (>= 2.3.6-6~)$' > actual
# Compare the expected dependency list to the generate list.
BAD_DIFF=0
diff "$SCRIPTDIR/expected_deps" actual || BAD_DIFF=1
if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
echo
echo "ERROR: Shared library dependencies changed!"
echo "If this is intentional, please update:"
echo "chrome/installer/linux/debian/expected_deps"
echo
exit $BAD_DIFF
fi
rm -rf "$DUMMY_STAGING_DIR"
# Additional dependencies not in the dpkg-shlibdeps output.
ADDITION_DEPS="ca-certificates, libcurl3, \
lsb-base (>=3.2), xdg-utils (>= 1.0.2), wget"
# Fix-up libnspr dependency due to renaming in Ubuntu (the old package still
# exists, but it was moved to "universe" repository, which isn't installed by
# default).
DPKG_SHLIB_DEPS=$(sed \
's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.8.7-0ubuntu1), /g' \
<<< $DPKG_SHLIB_DEPS)
# Fix-up libudev dependency because Ubuntu 13.04 has libudev1 instead of
# libudev0.
DPKG_SHLIB_DEPS=$(sed 's/\(libudev0 ([^)]*)\), /\1 | libudev1 (>= 198), /g' \
<<< $DPKG_SHLIB_DEPS)
COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITION_DEPS}"
COMMON_PREDEPS="dpkg (>= 1.14.0)"
# Make everything happen in the OUTPUTDIR.
cd "${OUTPUTDIR}"
case "$TARGETARCH" in
ia32 )
export ARCHITECTURE="i386"
stage_install_debian
;;
x64 )
export ARCHITECTURE="amd64"
stage_install_debian
;;
* )
echo
echo "ERROR: Don't know how to build DEBs for '$TARGETARCH'."
echo
exit 1
;;
esac
do_package

@ -0,0 +1,5 @@
@@PACKAGE@@-@@CHANNEL@@ (@@VERSIONFULL@@) @@CHANNEL@@; urgency=low
* Build spec: http://src.chromium.org/viewvc/chrome/releases/@@VERSION@@/
-- @@MAINTNAME@@ <@@MAINTMAIL@@> Tue, 03 Feb 2009 14:54:35 -0800

@ -0,0 +1,16 @@
Source: @@PACKAGE@@-@@CHANNEL@@
Section: web
Priority: optional
Maintainer: @@MAINTNAME@@ <@@MAINTMAIL@@>
Build-Depends: dpkg-dev, devscripts, fakeroot, lzma
Standards-Version: 3.8.0
Package: @@PACKAGE@@-@@CHANNEL@@
Provides: @@PROVIDES@@
Replaces: @@REPLACES@@
Conflicts: @@CONFLICTS@@
Pre-Depends: @@PREDEPENDS@@
Depends: @@DEPENDS@@
Architecture: @@ARCHITECTURE@@
Description: @@SHORTDESC@@
@@FULLDESC@@

@ -0,0 +1,6 @@
?package(@@PACKAGE@@):needs="x11" \
section="Applications/Network/Web Browsing" \
hints="Web browsers" \
title="@@MENUNAME@@" \
icon="@@INSTALLDIR@@/product_logo_32.xpm" \
command="@@INSTALLDIR@@/@@PACKAGE@@"

@ -0,0 +1,26 @@
libasound2 (>> 1.0.22)
libatk1.0-0 (>= 1.29.3)
libc6 (>= 2.11)
libcairo2 (>= 1.6.0)
libcups2 (>= 1.4.0)
libdbus-1-3 (>= 1.2.14)
libexpat1 (>= 1.95.8)
libfontconfig1 (>= 2.8.0)
libfreetype6 (>= 2.3.9)
libgcc1 (>= 1:4.1.1)
libgconf2-4 (>= 2.27.0)
libgcrypt11 (>= 1.4.2)
libglib2.0-0 (>= 2.20.0)
libgtk2.0-0 (>= 2.18.0)
libnspr4-0d (>= 4.7.3-0ubuntu1~)
libnss3-1d (>= 3.12.6)
libpango1.0-0 (>= 1.22.0)
libstdc++6 (>= 4.4.0)
libudev0 (>= 147)
libx11-6 (>= 0)
libxcomposite1 (>= 1:0.3-1)
libxdamage1 (>= 1:1.1)
libxext6 (>= 0)
libxfixes3 (>= 1:4.0.1)
libxrender1
libxss1

@ -0,0 +1,64 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@include@@../common/postinst.include
# Add to the alternatives system
#
# On Ubuntu 12.04, we have the following priorities
# (which can be obtain be installing browsers and running
# update-alternatives --query x-www-browser):
#
# /usr/bin/epiphany-browser 85
# /usr/bin/firefox 40
# /usr/bin/konqueror 30
#
# While we would expect these values to be keyed off the most popular
# browser (Firefox), in practice, we treat Epiphany as the lower bound,
# resulting in the following scheme:
CHANNEL=@@CHANNEL@@
case $CHANNEL in
stable )
# Good enough to be the default.
PRIORITY=200
;;
beta )
# Almost good enough to be the default. (Firefox stable should arguably be
# higher than this, but since that's below the "Epiphany threshold", we're
# not setting our priority below it. Anyone want to poke Firefox to raise
# their priority?)
PRIORITY=150
;;
unstable )
# Unstable, give it the "lowest" priority.
PRIORITY=120
;;
* )
PRIORITY=0
;;
esac
update-alternatives --install /usr/bin/x-www-browser x-www-browser \
/usr/bin/@@PACKAGE@@ $PRIORITY
update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \
/usr/bin/@@PACKAGE@@ $PRIORITY
@@include@@../common/apt.include
@@include@@../common/symlinks.include
remove_udev_symlinks
add_udev_symlinks
## MAIN ##
if [ ! -e "$DEFAULTS_FILE" ]; then
echo 'repo_add_once="true"' > "$DEFAULTS_FILE"
echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE"
fi
# Run the cron job immediately to perform repository configuration.
nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 &

@ -0,0 +1,31 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
action="$1"
# Only do complete clean-up on purge.
if [ "$action" != "purge" ] ; then
exit 0
fi
@@include@@../common/apt.include
@@include@@../common/symlinks.include
remove_udev_symlinks
# Only remove the defaults file if it is not empty. An empty file was probably
# put there by the sysadmin to disable automatic repository configuration, as
# per the instructions on the package download page.
if [ -s "$DEFAULTS_FILE" ]; then
# Make sure the package defaults are removed before the repository config,
# otherwise it could result in the repository config being removed, but the
# package defaults remain and are set to not recreate the repository config.
# In that case, future installs won't recreate it and won't get auto-updated.
rm "$DEFAULTS_FILE" || exit 1
fi
# Remove any Google repository added by the package.
clean_sources_lists

@ -0,0 +1,21 @@
#!/bin/sh
#
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
action="$1"
if [ "$2" = "in-favour" ]; then
# Treat conflict remove as an upgrade.
action="upgrade"
fi
# Don't clean-up just for an upgrade.`
if [ "$action" = "upgrade" ] ; then
exit 0
fi
@@include@@../common/prerm.include
# Remove from the alternatives system
update-alternatives --remove x-www-browser /usr/bin/@@PACKAGE@@
update-alternatives --remove gnome-www-browser /usr/bin/@@PACKAGE@@

@ -0,0 +1,300 @@
#!/bin/bash
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(mmoss) This currently only works with official builds, since non-official
# builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
set -e
if [ "$VERBOSE" ]; then
set -x
fi
set -u
gen_spec() {
rm -f "${SPEC}"
# Trunk packages need to install to a custom path so they don't conflict with
# release channel packages.
local PACKAGE_FILENAME="${PACKAGE}"
if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
PACKAGE_FILENAME="${PACKAGE}-${CHANNEL}"
local MENUNAME="${MENUNAME} (${CHANNEL})"
fi
process_template "${SCRIPTDIR}/chrome.spec.template" "${SPEC}"
}
# Setup the installation directory hierachy in the package staging area.
prep_staging_rpm() {
prep_staging_common
install -m 755 -d "${STAGEDIR}/etc/cron.daily"
}
# Put the package contents in the staging area.
stage_install_rpm() {
# Trunk packages need to install to a custom path and with custom filenames
# (e.g. not /usr/bin/google-chrome) so they don't conflict with release
# channel packages.
if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
local PACKAGE="${PACKAGE}-${CHANNEL}"
local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
# This would ideally be compiled into the app, but that's a bit too
# intrusive of a change for these limited use channels, so we'll just hack
# it into the wrapper script. The user can still override since it seems to
# work to specify --user-data-dir multiple times on the command line, with
# the last occurrence winning.
local DEFAULT_FLAGS="--user-data-dir=\"\${HOME}/.config/${PACKAGE}\""
local MENUNAME="${MENUNAME} (${CHANNEL})"
fi
prep_staging_rpm
stage_install_common
echo "Staging RPM install files in '${STAGEDIR}'..."
process_template "${BUILDDIR}/installer/common/rpmrepo.cron" \
"${STAGEDIR}/etc/cron.daily/${PACKAGE}"
chmod 755 "${STAGEDIR}/etc/cron.daily/${PACKAGE}"
}
# Actually generate the package file.
do_package() {
echo "Packaging ${ARCHITECTURE}..."
PROVIDES="${PACKAGE}"
local REPS="$REPLACES"
REPLACES=""
for rep in $REPS; do
if [ -z "$REPLACES" ]; then
REPLACES="$PACKAGE-$rep"
else
REPLACES="$REPLACES $PACKAGE-$rep"
fi
done
# The symbols in libX11.so are not versioned, so when a newer version has new
# symbols like _XGetRequest, RPM's find-requires tool does not detect it, and
# there is no way to specify a libX11.so version number to prevent
# installation on affected distros like OpenSUSE 12.1 and Fedora 16.
# Thus there has to be distro-specific conflict here.
# TODO(thestig) Remove these in the future when other requirements prevent
# installation on affected distros.
ADDITIONAL_CONFLICTS="xorg-x11-libX11 < 7.6_1 libX11 < 1.4.99"
REPLACES="$REPLACES $ADDITIONAL_CONFLICTS"
# If we specify a dependecy of foo.so below, we would depend on both the
# 32 and 64-bit versions on a 64-bit machine. The current version of RPM
# we use is too old and doesn't provide %{_isa}, so we do this manually.
if [ "$ARCHITECTURE" = "x86_64" ] ; then
local EMPTY_VERSION="()"
local PKG_ARCH="(64bit)"
elif [ "$ARCHITECTURE" = "i386" ] ; then
local EMPTY_VERSION=""
local PKG_ARCH=""
fi
# Use find-requires script to make sure the dependencies are complete
# (especially libc and libstdc++ versions). Filter out udev to avoid
# libudev.so.0 vs. libudev.so.1 mismatches.
DETECTED_DEPENDS="$(echo "${BUILDDIR}/chrome" | /usr/lib/rpm/find-requires |
grep -v udev)"
# Compare the expected dependency list to the generated list.
BAD_DIFF=0
diff "$SCRIPTDIR/expected_deps_$ARCHITECTURE" \
<(echo "${DETECTED_DEPENDS}") || BAD_DIFF=1
if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
echo
echo "ERROR: Shared library dependencies changed!"
echo "If this is intentional, please update:"
echo "chrome/installer/linux/rpm/expected_deps_i686"
echo "chrome/installer/linux/rpm/expected_deps_x86_64"
echo
exit $BAD_DIFF
fi
# libgdk_pixbuf is added in LSB 3.2 and no longer explicitly required.
# libcairo, libpangocairo, libasound are in LSB 4. and no longer explicitly
# required.
# xdg-utils is still optional in LSB 4.0.
# nss (bundled) is optional in LSB 4.0.
#
# We want to depend on the system SSL certs so wget can upload crash reports
# securely, but there's no common capability between the distros. Bugs filed:
# https://qa.mandriva.com/show_bug.cgi?id=55714
# https://bugzilla.redhat.com/show_bug.cgi?id=538158
# https://bugzilla.novell.com/show_bug.cgi?id=556248
DEPENDS="lsb >= 4.0, \
libcurl.so.4${EMPTY_VERSION}${PKG_ARCH}, \
libnss3.so(NSS_3.12.3)${PKG_ARCH}, \
wget, \
xdg-utils, \
zlib, \
$(echo "${DETECTED_DEPENDS}" | tr '\n' ',')"
gen_spec
# Create temporary rpmbuild dirs.
RPMBUILD_DIR=$(mktemp -d -t rpmbuild.XXXXXX) || exit 1
mkdir -p "$RPMBUILD_DIR/BUILD"
mkdir -p "$RPMBUILD_DIR/RPMS"
# '__os_install_post ${nil}' disables a bunch of automatic post-processing
# (brp-compress, etc.), which by default appears to only be enabled on 32-bit,
# and which doesn't gain us anything since we already explicitly do all the
# compression, symbol stripping, etc. that we want.
fakeroot rpmbuild -bb --target="$ARCHITECTURE" --rmspec \
--define "_topdir $RPMBUILD_DIR" \
--define "_binary_payload w9.bzdio" \
--define "__os_install_post %{nil}" \
"${SPEC}"
PKGNAME="${PACKAGE}-${CHANNEL}-${VERSION}-${REVISION}"
mv "$RPMBUILD_DIR/RPMS/$ARCHITECTURE/${PKGNAME}.${ARCHITECTURE}.rpm" \
"${OUTPUTDIR}"
# Make sure the package is world-readable, otherwise it causes problems when
# copied to share drive.
chmod a+r "${OUTPUTDIR}/${PKGNAME}.$ARCHITECTURE.rpm"
rm -rf "$RPMBUILD_DIR"
}
# Remove temporary files and unwanted packaging output.
cleanup() {
rm -rf "${STAGEDIR}"
rm -rf "${TMPFILEDIR}"
}
usage() {
echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir']"
echo " [-b 'dir']"
echo "-c channel the package channel (trunk, asan, unstable, beta, stable)"
echo "-a arch package architecture (ia32 or x64)"
echo "-o dir package output directory [${OUTPUTDIR}]"
echo "-b dir build input directory [${BUILDDIR}]"
echo "-h this help message"
}
# Check that the channel name is one of the allowable ones.
verify_channel() {
case $CHANNEL in
stable )
CHANNEL=stable
REPLACES="unstable beta"
;;
unstable|dev|alpha )
CHANNEL=unstable
REPLACES="stable beta"
;;
testing|beta )
CHANNEL=beta
REPLACES="unstable stable"
;;
trunk|asan )
# This is a special package, mostly for development testing, so don't make
# it replace any installed release packages.
REPLACES="dummy"
# Setting this to empty will prevent it from updating any existing configs
# from release packages.
REPOCONFIG=""
;;
* )
echo
echo "ERROR: '$CHANNEL' is not a valid channel type."
echo
exit 1
;;
esac
}
process_opts() {
while getopts ":o:b:c:a:h" OPTNAME
do
case $OPTNAME in
o )
OUTPUTDIR=$(readlink -f "${OPTARG}")
mkdir -p "${OUTPUTDIR}"
;;
b )
BUILDDIR=$(readlink -f "${OPTARG}")
;;
c )
CHANNEL="$OPTARG"
verify_channel
;;
a )
TARGETARCH="$OPTARG"
;;
h )
usage
exit 0
;;
\: )
echo "'-$OPTARG' needs an argument."
usage
exit 1
;;
* )
echo "invalid command-line option: $OPTARG"
usage
exit 1
;;
esac
done
}
#=========
# MAIN
#=========
SCRIPTDIR=$(readlink -f "$(dirname "$0")")
OUTPUTDIR="${PWD}"
STAGEDIR=$(mktemp -d -t rpm.build.XXXXXX) || exit 1
TMPFILEDIR=$(mktemp -d -t rpm.tmp.XXXXXX) || exit 1
CHANNEL="trunk"
# Default target architecture to same as build host.
if [ "$(uname -m)" = "x86_64" ]; then
TARGETARCH="x64"
else
TARGETARCH="ia32"
fi
SPEC="${TMPFILEDIR}/chrome.spec"
# call cleanup() on exit
trap cleanup 0
process_opts "$@"
if [ ! "$BUILDDIR" ]; then
BUILDDIR=$(readlink -f "${SCRIPTDIR}/../../../../../out/Release")
fi
source ${BUILDDIR}/installer/common/installer.include
get_version_info
if [ "$CHROMIUM_BUILD" = "_google_chrome" ]; then
source "${BUILDDIR}/installer/common/google-chrome.info"
else
source "${BUILDDIR}/installer/common/chromium-browser.info"
fi
eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
"${BUILDDIR}/installer/theme/BRANDING")
REPOCONFIG="http://dl.google.com/linux/${PACKAGE#google-}/rpm/stable"
verify_channel
# Make everything happen in the OUTPUTDIR.
cd "${OUTPUTDIR}"
case "$TARGETARCH" in
ia32 )
export ARCHITECTURE="i386"
stage_install_rpm
;;
x64 )
export ARCHITECTURE="x86_64"
stage_install_rpm
;;
* )
echo
echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."
echo
exit 1
;;
esac
do_package

@ -0,0 +1,204 @@
#------------------------------------------------------------------------------
# chrome.spec
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Prologue information
#------------------------------------------------------------------------------
Summary : @@MENUNAME@@
License : Multiple, see @@PRODUCTURL@@
Name : @@PACKAGE@@-@@CHANNEL@@
Version : @@VERSION@@
Release : @@REVISION@@
Group : Applications/Internet
Vendor : @@COMPANY_FULLNAME@@
Url : @@PRODUCTURL@@
Packager : @@MAINTNAME@@ <@@MAINTMAIL@@>
Provides : @@PROVIDES@@ = %{version}
Requires : @@DEPENDS@@
Autoreqprov : No
Conflicts : @@REPLACES@@
BuildRoot : %{_tmppath}/%{name}-%{version}-root
# The prefix is pretty important; RPM uses this to figure out
# how to make a package relocatable
prefix : /opt
#------------------------------------------------------------------------------
# Description
#------------------------------------------------------------------------------
%Description
@@SHORTDESC@@
@@FULLDESC@@
#------------------------------------------------------------------------------
# Build rule - How to make the package
#------------------------------------------------------------------------------
%build
#------------------------------------------------------------------------------
# Installation rule - how to install it (note that it
# gets installed into a temp directory given by $RPM_BUILD_ROOT)
#------------------------------------------------------------------------------
%install
rm -rf "$RPM_BUILD_ROOT"
if [ -z "@@STAGEDIR@@" -o ! -d "@@STAGEDIR@@" ] ; then
echo "@@STAGEDIR@@ appears to be incorrectly set - aborting"
exit 1
fi
if [ -z "@@INSTALLDIR@@" -o ! -d "@@STAGEDIR@@/@@INSTALLDIR@@" ] ; then
echo "@@INSTALLDIR@@ appears to be incorrectly set - aborting"
exit 1
fi
install -m 755 -d \
"$RPM_BUILD_ROOT/etc" \
"$RPM_BUILD_ROOT/opt" \
"$RPM_BUILD_ROOT/usr"
# This is hard coded for now
cp -a "@@STAGEDIR@@/etc/" "$RPM_BUILD_ROOT/"
cp -a "@@STAGEDIR@@/opt/" "$RPM_BUILD_ROOT/"
cp -a "@@STAGEDIR@@/usr/" "$RPM_BUILD_ROOT/"
#------------------------------------------------------------------------------
# Rule to clean up a build
#------------------------------------------------------------------------------
%clean
rm -rf "$RPM_BUILD_ROOT"
#------------------------------------------------------------------------------
# Files listing.
#------------------------------------------------------------------------------
%files
%defattr(-,root,root)
#%doc README
# We cheat and just let RPM figure it out for us; everything we install
# should go under this prefix anyways.
@@INSTALLDIR@@
# Be explicit about the files we scatter throughout the system we don't
# accidentally "own" stuff that's not ours (crbug.com/123990).
/etc/cron.daily/@@PACKAGE_FILENAME@@
/usr/bin/@@PACKAGE_FILENAME@@
/usr/share/gnome-control-center/default-apps/@@PACKAGE_FILENAME@@.xml
%docdir /usr/share/man/man1
/usr/share/man/man1/@@PACKAGE_FILENAME@@.1
#------------------------------------------------------------------------------
# Pre install script
#------------------------------------------------------------------------------
%pre
exit 0
#------------------------------------------------------------------------------
# Post install script
#------------------------------------------------------------------------------
%post
@@include@@../common/postinst.include
@@include@@../common/rpm.include
@@include@@../common/symlinks.include
remove_nss_symlinks
add_nss_symlinks
remove_udev_symlinks
add_udev_symlinks
DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
if [ ! -e "$DEFAULTS_FILE" ]; then
echo 'repo_add_once="true"' > "$DEFAULTS_FILE"
fi
. "$DEFAULTS_FILE"
if [ "$repo_add_once" = "true" ]; then
determine_rpm_package_manager
case $PACKAGEMANAGER in
"yum")
install_yum
;;
"urpmi")
install_urpmi
;;
"yast")
install_yast
;;
esac
fi
# Some package managers have locks that prevent everything from being
# configured at install time, so wait a bit then kick the cron job to do
# whatever is left. Probably the db will be unlocked by then, but if not, the
# cron job will keep retrying.
# Do this with 'at' instead of a backgrounded shell because zypper waits on all
# sub-shells to finish before it finishes, which is exactly the opposite of
# what we want here. Also preemptively start atd because for some reason it's
# not always running, which kind of defeats the purpose of having 'at' as a
# required LSB command.
service atd start
echo "sh /etc/cron.daily/@@PACKAGE@@" | at now + 2 minute > /dev/null 2>&1
exit 0
#------------------------------------------------------------------------------
# Pre uninstallation script
#------------------------------------------------------------------------------
%preun
if [ "$1" -eq "0" ]; then
mode="uninstall"
elif [ "$1" -eq "1" ]; then
mode="upgrade"
fi
@@include@@../common/rpm.include
@@include@@../common/symlinks.include
# Only remove menu items and symlinks on uninstall. When upgrading,
# old_pkg's %preun runs after new_pkg's %post.
if [ "$mode" = "uninstall" ]; then
@@include@@../common/prerm.include
remove_nss_symlinks
remove_udev_symlinks
fi
# On Debian we only remove when we purge. However, RPM has no equivalent to
# dpkg --purge, so this is all disabled.
#
#determine_rpm_package_manager
#
#case $PACKAGEMANAGER in
#"yum")
# remove_yum
# ;;
#"urpmi")
# remove_urpmi
# ;;
#"yast")
# remove_yast
# ;;
#esac
exit 0
#------------------------------------------------------------------------------
# Post uninstallation script
#------------------------------------------------------------------------------
%postun
exit 0

@ -0,0 +1,71 @@
ld-linux.so.2
ld-linux.so.2(GLIBC_2.3)
libasound.so.2
libatk-1.0.so.0
libcairo.so.2
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.11)
libc.so.6(GLIBC_2.1.2)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.2.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libc.so.6(GLIBC_2.6)
libc.so.6(GLIBC_2.7)
libc.so.6(GLIBC_2.8)
libc.so.6(GLIBC_2.9)
libcups.so.2
libdbus-1.so.3
libdl.so.2
libdl.so.2(GLIBC_2.0)
libdl.so.2(GLIBC_2.1)
libexpat.so.1
libfontconfig.so.1
libfreetype.so.6
libgcc_s.so.1
libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GCC_3.4)
libgcc_s.so.1(GCC_4.0.0)
libgcc_s.so.1(GLIBC_2.0)
libgconf-2.so.4
libgcrypt.so.11
libgdk_pixbuf-2.0.so.0
libgdk-x11-2.0.so.0
libglib-2.0.so.0
libgobject-2.0.so.0
libgthread-2.0.so.0
libgtk-x11-2.0.so.0
libm.so.6
libm.so.6(GLIBC_2.0)
libm.so.6(GLIBC_2.1)
libnspr4.so
libnss3.so
libnssutil3.so
libpango-1.0.so.0
libpangocairo-1.0.so.0
libplc4.so
libpthread.so.0
libpthread.so.0(GLIBC_2.0)
libpthread.so.0(GLIBC_2.1)
libpthread.so.0(GLIBC_2.2)
libpthread.so.0(GLIBC_2.3.2)
libpthread.so.0(GLIBC_2.3.3)
librt.so.1
librt.so.1(GLIBC_2.2)
libsmime3.so
libstdc++.so.6
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.10)
libstdc++.so.6(GLIBCXX_3.4.11)
libstdc++.so.6(GLIBCXX_3.4.9)
libX11.so.6
libXcomposite.so.1
libXdamage.so.1
libXext.so.6
libXfixes.so.3
libXrender.so.1
libXss.so.1

@ -0,0 +1,61 @@
ld-linux-x86-64.so.2()(64bit)
ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
libasound.so.2()(64bit)
libatk-1.0.so.0()(64bit)
libcairo.so.2()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.6)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libc.so.6(GLIBC_2.9)(64bit)
libcups.so.2()(64bit)
libdbus-1.so.3()(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libexpat.so.1()(64bit)
libfontconfig.so.1()(64bit)
libfreetype.so.6()(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.4)(64bit)
libgcc_s.so.1(GCC_4.0.0)(64bit)
libgconf-2.so.4()(64bit)
libgcrypt.so.11()(64bit)
libgdk_pixbuf-2.0.so.0()(64bit)
libgdk-x11-2.0.so.0()(64bit)
libglib-2.0.so.0()(64bit)
libgobject-2.0.so.0()(64bit)
libgthread-2.0.so.0()(64bit)
libgtk-x11-2.0.so.0()(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libnspr4.so()(64bit)
libnss3.so()(64bit)
libnssutil3.so()(64bit)
libpango-1.0.so.0()(64bit)
libpangocairo-1.0.so.0()(64bit)
libplc4.so()(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
libpthread.so.0(GLIBC_2.3.3)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
libsmime3.so()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libX11.so.6()(64bit)
libXcomposite.so.1()(64bit)
libXdamage.so.1()(64bit)
libXext.so.6()(64bit)
libXfixes.so.3()(64bit)
libXrender.so.1()(64bit)
libXss.so.1()(64bit)

@ -0,0 +1,119 @@
#!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Script to install a Debian Wheezy sysroot for making official Google Chrome
# Linux builds.
# The sysroot is needed to make Chrome work for Debian Wheezy.
# This script can be run manually but is more often run as part of gclient
# hooks. When run from hooks this script should be a no-op on non-linux
# platforms.
# The sysroot image could be constructed from scratch based on the current
# state or Debian Wheezy but for consistency we currently use a pre-built root
# image. The image will normally need to be rebuilt every time chrome's build
# dependancies are changed.
import platform
import optparse
import os
import re
import shutil
import subprocess
import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
URL_PREFIX = 'https://commondatastorage.googleapis.com'
URL_PATH = 'chrome-linux-sysroot/toolchain'
REVISION = 36982
TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz'
TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot'
SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'
def main(args):
if options.arch not in ['amd64', 'i386']:
print 'Unknown architecture: %s' % options.arch
return 1
if options.linux_only:
# This argument is passed when run from the gclient hooks.
# In this case we return early on non-linux platforms.
if not sys.platform.startswith('linux'):
return 0
# Only install the sysroot for an Official Chrome Linux build.
defined = ['branding=Chrome', 'buildtype=Official']
undefined = ['chromeos=1']
gyp_defines = os.environ.get('GYP_DEFINES', '')
for option in defined:
if option not in gyp_defines:
return 0
for option in undefined:
if option in gyp_defines:
return 0
# Check for optional target_arch and only install for that architecture.
# If target_arch is not specified, then only install for the host
# architecture.
host_arch = ''
if 'target_arch=x64' in gyp_defines:
host_arch = 'amd64'
elif 'target_arch=ia32' in gyp_defines:
host_arch = 'i386'
else:
# Figure out host arch, like the host_arch variable in build/common.gypi.
machine_type = platform.machine()
if machine_type in ['amd64', 'x86_64']:
host_arch = 'amd64'
elif re.match('(i[3-6]86|i86pc)$', machine_type):
host_arch = 'i386'
if host_arch != options.arch:
return 0
# The sysroot directory should match the one specified in build/common.gypi.
# TODO(thestig) Consider putting this else where to avoid having to recreate
# it on every build.
linux_dir = os.path.dirname(SCRIPT_DIR)
if options.arch == 'amd64':
sysroot = os.path.join(linux_dir, SYSROOT_DIR_AMD64)
tarball_filename = TARBALL_AMD64
else:
sysroot = os.path.join(linux_dir, SYSROOT_DIR_I386)
tarball_filename = TARBALL_I386
url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, REVISION, tarball_filename)
stamp = os.path.join(sysroot, '.stamp')
if os.path.exists(stamp):
with open(stamp) as s:
if s.read() == url:
print 'Debian Wheezy %s root image already up-to-date: %s' % \
(options.arch, sysroot)
return 0
print 'Installing Debian Wheezy %s root image: %s' % (options.arch, sysroot)
if os.path.isdir(sysroot):
shutil.rmtree(sysroot)
os.mkdir(sysroot)
tarball = os.path.join(sysroot, tarball_filename)
subprocess.check_call(['curl', '-L', url, '-o', tarball])
subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
os.remove(tarball)
with open(stamp, 'w') as s:
s.write(url)
return 0
if __name__ == '__main__':
parser = optparse.OptionParser('usage: %prog [OPTIONS]')
parser.add_option('', '--linux-only', dest='linux_only', action='store_true',
default=False, help='Only install sysroot for official '
'Linux builds')
parser.add_option('', '--arch', dest='arch',
help='Sysroot architecture, i386 or amd64')
options, args = parser.parse_args()
sys.exit(main(options))

@ -0,0 +1,149 @@
main/a/alsa-lib/libasound2_1.0.25-4_amd64.deb
main/a/alsa-lib/libasound2-dev_1.0.25-4_amd64.deb
main/a/atk1.0/libatk1.0-0_2.4.0-2_amd64.deb
main/a/atk1.0/libatk1.0-dev_2.4.0-2_amd64.deb
main/a/avahi/libavahi-client3_0.6.31-2_amd64.deb
main/a/avahi/libavahi-common3_0.6.31-2_amd64.deb
main/b/bzip2/libbz2-1.0_1.0.6-4_amd64.deb
main/b/bzip2/libbz2-dev_1.0.6-4_amd64.deb
main/c/cairo/libcairo2_1.12.2-3_amd64.deb
main/c/cairo/libcairo2-dev_1.12.2-3_amd64.deb
main/c/cairo/libcairo-gobject2_1.12.2-3_amd64.deb
main/c/cairo/libcairo-script-interpreter2_1.12.2-3_amd64.deb
main/c/cups/libcups2_1.5.3-5_amd64.deb
main/c/cups/libcups2-dev_1.5.3-5_amd64.deb
main/d/dbus-glib/libdbus-glib-1-2_0.100.2-1_amd64.deb
main/d/dbus/libdbus-1-3_1.6.8-1_amd64.deb
main/d/dbus/libdbus-1-dev_1.6.8-1_amd64.deb
main/e/e2fsprogs/comerr-dev_2.1-1.42.5-1.1_amd64.deb
main/e/e2fsprogs/libcomerr2_1.42.5-1.1_amd64.deb
main/e/eglibc/libc6_2.13-38_amd64.deb
main/e/eglibc/libc6-dev_2.13-38_amd64.deb
main/e/elfutils/libelf1_0.152-1+wheezy1_amd64.deb
main/e/elfutils/libelf-dev_0.152-1+wheezy1_amd64.deb
main/e/expat/libexpat1_2.1.0-1_amd64.deb
main/e/expat/libexpat1-dev_2.1.0-1_amd64.deb
main/f/fontconfig/libfontconfig1_2.9.0-7.1_amd64.deb
main/f/fontconfig/libfontconfig1-dev_2.9.0-7.1_amd64.deb
main/f/freetype/libfreetype6_2.4.9-1.1_amd64.deb
main/f/freetype/libfreetype6-dev_2.4.9-1.1_amd64.deb
main/g/gcc-4.6/gcc-4.6_4.6.3-14_amd64.deb
main/g/gcc-4.6/libstdc++6-4.6-dev_4.6.3-14_amd64.deb
main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb
main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb
main/g/gcc-4.7/libgomp1_4.7.2-5_amd64.deb
main/g/gcc-4.7/libquadmath0_4.7.2-5_amd64.deb
main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb
main/g/gconf/libgconf-2-4_3.2.5-1+build1_amd64.deb
main/g/gconf/libgconf2-4_3.2.5-1+build1_amd64.deb
main/g/gconf/libgconf2-dev_3.2.5-1+build1_amd64.deb
main/g/gdk-pixbuf/libgdk-pixbuf2.0-0_2.26.1-1_amd64.deb
main/g/gdk-pixbuf/libgdk-pixbuf2.0-dev_2.26.1-1_amd64.deb
main/g/glib2.0/libglib2.0-0_2.33.12+really2.32.4-5_amd64.deb
main/g/glib2.0/libglib2.0-dev_2.33.12+really2.32.4-5_amd64.deb
main/g/gnutls26/libgnutls26_2.12.20-6_amd64.deb
main/g/gnutls26/libgnutls-dev_2.12.20-6_amd64.deb
main/g/gnutls26/libgnutls-openssl27_2.12.20-6_amd64.deb
main/g/gnutls26/libgnutlsxx27_2.12.20-6_amd64.deb
main/g/gtk+2.0/libgtk2.0-0_2.24.10-2_amd64.deb
main/g/gtk+2.0/libgtk2.0-dev_2.24.10-2_amd64.deb
main/k/keyutils/libkeyutils1_1.5.5-3_amd64.deb
main/k/krb5/krb5-multidev_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libgssapi-krb5-2_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libgssrpc4_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libk5crypto3_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkadm5clnt-mit8_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkadm5srv-mit8_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkdb5-6_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkrb5-3_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkrb5-dev_1.10.1+dfsg-5_amd64.deb
main/k/krb5/libkrb5support0_1.10.1+dfsg-5_amd64.deb
main/libf/libffi/libffi5_3.0.10-3_amd64.deb
main/libg/libgcrypt11/libgcrypt11_1.5.0-5_amd64.deb
main/libg/libgcrypt11/libgcrypt11-dev_1.5.0-5_amd64.deb
main/libg/libgnome-keyring/libgnome-keyring0_3.4.1-1_amd64.deb
main/libg/libgnome-keyring/libgnome-keyring-dev_3.4.1-1_amd64.deb
main/libg/libgpg-error/libgpg-error0_1.10-3.1_amd64.deb
main/libg/libgpg-error/libgpg-error-dev_1.10-3.1_amd64.deb
main/libn/libnss-db/libnss-db_2.2.3pre1-4_amd64.deb
main/libp/libp11/libp11-2_0.2.8-2_amd64.deb
main/libp/libpng/libpng12-0_1.2.49-1_amd64.deb
main/libp/libpng/libpng12-dev_1.2.49-1_amd64.deb
main/libs/libselinux/libselinux1_2.1.9-5_amd64.deb
main/libt/libtasn1-3/libtasn1-3_2.13-2_amd64.deb
main/libx/libx11/libx11-6_1.5.0-1_amd64.deb
main/libx/libx11/libx11-dev_1.5.0-1_amd64.deb
main/libx/libxau/libxau6_1.0.7-1_amd64.deb
main/libx/libxau/libxau-dev_1.0.7-1_amd64.deb
main/libx/libxcb/libxcb1_1.8.1-2_amd64.deb
main/libx/libxcb/libxcb1-dev_1.8.1-2_amd64.deb
main/libx/libxcb/libxcb-render0_1.8.1-2_amd64.deb
main/libx/libxcb/libxcb-render0-dev_1.8.1-2_amd64.deb
main/libx/libxcb/libxcb-shm0_1.8.1-2_amd64.deb
main/libx/libxcb/libxcb-shm0-dev_1.8.1-2_amd64.deb
main/libx/libxcomposite/libxcomposite1_0.4.3-2_amd64.deb
main/libx/libxcomposite/libxcomposite-dev_0.4.3-2_amd64.deb
main/libx/libxcursor/libxcursor1_1.1.13-1_amd64.deb
main/libx/libxcursor/libxcursor-dev_1.1.13-1_amd64.deb
main/libx/libxdamage/libxdamage1_1.1.3-2_amd64.deb
main/libx/libxdamage/libxdamage-dev_1.1.3-2_amd64.deb
main/libx/libxdmcp/libxdmcp6_1.1.1-1_amd64.deb
main/libx/libxext/libxext6_1.3.1-2_amd64.deb
main/libx/libxext/libxext-dev_1.3.1-2_amd64.deb
main/libx/libxfixes/libxfixes3_5.0-4_amd64.deb
main/libx/libxfixes/libxfixes-dev_5.0-4_amd64.deb
main/libx/libxi/libxi6_1.6.1-1_amd64.deb
main/libx/libxi/libxi-dev_1.6.1-1_amd64.deb
main/libx/libxinerama/libxinerama1_1.1.2-1_amd64.deb
main/libx/libxinerama/libxinerama-dev_1.1.2-1_amd64.deb
main/libx/libxrandr/libxrandr2_1.3.2-2_amd64.deb
main/libx/libxrandr/libxrandr-dev_1.3.2-2_amd64.deb
main/libx/libxrender/libxrender1_0.9.7-1_amd64.deb
main/libx/libxrender/libxrender-dev_0.9.7-1_amd64.deb
main/libx/libxss/libxss1_1.2.2-1_amd64.deb
main/libx/libxss/libxss-dev_1.2.2-1_amd64.deb
main/libx/libxt/libxt6_1.1.3-1_amd64.deb
main/libx/libxt/libxt-dev_1.1.3-1_amd64.deb
main/libx/libxtst/libxtst6_1.2.1-1_amd64.deb
main/libx/libxtst/libxtst-dev_1.2.1-1_amd64.deb
main/l/linux/linux-libc-dev_3.2.41-2_amd64.deb
main/n/nspr/libnspr4_4.9.2-1_amd64.deb
main/n/nspr/libnspr4-dev_4.9.2-1_amd64.deb
main/n/nss/libnss3_3.14.3-1_amd64.deb
main/n/nss/libnss3-dev_3.14.3-1_amd64.deb
main/o/openssl/libssl1.0.0_1.0.1e-2_amd64.deb
main/o/openssl/libssl-dev_1.0.1e-2_amd64.deb
main/o/orbit2/liborbit2_2.14.19-0.1_amd64.deb
main/p/p11-kit/libp11-kit0_0.12-3_amd64.deb
main/p/pam/libpam0g_1.1.3-7.1_amd64.deb
main/p/pam/libpam0g-dev_1.1.3-7.1_amd64.deb
main/p/pango1.0/libpango1.0-0_1.30.0-1_amd64.deb
main/p/pango1.0/libpango1.0-dev_1.30.0-1_amd64.deb
main/p/pciutils/libpci3_3.1.9-6_amd64.deb
main/p/pciutils/libpci-dev_3.1.9-6_amd64.deb
main/p/pcre3/libpcre3_8.30-5_amd64.deb
main/p/pcre3/libpcre3-dev_8.30-5_amd64.deb
main/p/pcre3/libpcrecpp0_8.30-5_amd64.deb
main/p/pixman/libpixman-1-0_0.26.0-4_amd64.deb
main/p/pixman/libpixman-1-dev_0.26.0-4_amd64.deb
main/p/pulseaudio/libpulse0_2.0-6.1_amd64.deb
main/p/pulseaudio/libpulse-dev_2.0-6.1_amd64.deb
main/p/pulseaudio/libpulse-mainloop-glib0_2.0-6.1_amd64.deb
main/s/speech-dispatcher/libspeechd2_0.7.1-6.2_amd64.deb
main/s/speech-dispatcher/libspeechd-dev_0.7.1-6.2_amd64.deb
main/s/speech-dispatcher/speech-dispatcher_0.7.1-6.2_amd64.deb
main/u/udev/libudev0_175-7.2_amd64.deb
main/u/udev/libudev-dev_175-7.2_amd64.deb
main/x/x11proto-composite/x11proto-composite-dev_0.4.2-2_all.deb
main/x/x11proto-core/x11proto-core-dev_7.0.23-1_all.deb
main/x/x11proto-damage/x11proto-damage-dev_1.2.1-2_all.deb
main/x/x11proto-fixes/x11proto-fixes-dev_5.0-2_all.deb
main/x/x11proto-input/x11proto-input-dev_2.2-1_all.deb
main/x/x11proto-kb/x11proto-kb-dev_1.0.6-2_all.deb
main/x/x11proto-randr/x11proto-randr-dev_1.3.2-2_all.deb
main/x/x11proto-record/x11proto-record-dev_1.14.2-1_all.deb
main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb
main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb
main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb
main/z/zlib/zlib1g_1.2.7.dfsg-13_amd64.deb
main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_amd64.deb

@ -0,0 +1,149 @@
main/a/alsa-lib/libasound2_1.0.25-4_i386.deb
main/a/alsa-lib/libasound2-dev_1.0.25-4_i386.deb
main/a/atk1.0/libatk1.0-0_2.4.0-2_i386.deb
main/a/atk1.0/libatk1.0-dev_2.4.0-2_i386.deb
main/a/avahi/libavahi-client3_0.6.31-2_i386.deb
main/a/avahi/libavahi-common3_0.6.31-2_i386.deb
main/b/bzip2/libbz2-1.0_1.0.6-4_i386.deb
main/b/bzip2/libbz2-dev_1.0.6-4_i386.deb
main/c/cairo/libcairo2_1.12.2-3_i386.deb
main/c/cairo/libcairo2-dev_1.12.2-3_i386.deb
main/c/cairo/libcairo-gobject2_1.12.2-3_i386.deb
main/c/cairo/libcairo-script-interpreter2_1.12.2-3_i386.deb
main/c/cups/libcups2_1.5.3-5_i386.deb
main/c/cups/libcups2-dev_1.5.3-5_i386.deb
main/d/dbus-glib/libdbus-glib-1-2_0.100.2-1_i386.deb
main/d/dbus/libdbus-1-3_1.6.8-1_i386.deb
main/d/dbus/libdbus-1-dev_1.6.8-1_i386.deb
main/e/e2fsprogs/comerr-dev_2.1-1.42.5-1.1_i386.deb
main/e/e2fsprogs/libcomerr2_1.42.5-1.1_i386.deb
main/e/eglibc/libc6_2.13-38_i386.deb
main/e/eglibc/libc6-dev_2.13-38_i386.deb
main/e/elfutils/libelf1_0.152-1+wheezy1_i386.deb
main/e/elfutils/libelf-dev_0.152-1+wheezy1_i386.deb
main/e/expat/libexpat1_2.1.0-1_i386.deb
main/e/expat/libexpat1-dev_2.1.0-1_i386.deb
main/f/fontconfig/libfontconfig1_2.9.0-7.1_i386.deb
main/f/fontconfig/libfontconfig1-dev_2.9.0-7.1_i386.deb
main/f/freetype/libfreetype6_2.4.9-1.1_i386.deb
main/f/freetype/libfreetype6-dev_2.4.9-1.1_i386.deb
main/g/gcc-4.6/gcc-4.6_4.6.3-14_i386.deb
main/g/gcc-4.6/libstdc++6-4.6-dev_4.6.3-14_i386.deb
main/g/gcc-4.7/libgcc1_4.7.2-5_i386.deb
main/g/gcc-4.7/libgcc1_4.7.2-5_i386.deb
main/g/gcc-4.7/libgomp1_4.7.2-5_i386.deb
main/g/gcc-4.7/libquadmath0_4.7.2-5_i386.deb
main/g/gcc-4.7/libstdc++6_4.7.2-5_i386.deb
main/g/gconf/libgconf-2-4_3.2.5-1+build1_i386.deb
main/g/gconf/libgconf2-4_3.2.5-1+build1_i386.deb
main/g/gconf/libgconf2-dev_3.2.5-1+build1_i386.deb
main/g/gdk-pixbuf/libgdk-pixbuf2.0-0_2.26.1-1_i386.deb
main/g/gdk-pixbuf/libgdk-pixbuf2.0-dev_2.26.1-1_i386.deb
main/g/glib2.0/libglib2.0-0_2.33.12+really2.32.4-5_i386.deb
main/g/glib2.0/libglib2.0-dev_2.33.12+really2.32.4-5_i386.deb
main/g/gnutls26/libgnutls26_2.12.20-6_i386.deb
main/g/gnutls26/libgnutls-dev_2.12.20-6_i386.deb
main/g/gnutls26/libgnutls-openssl27_2.12.20-6_i386.deb
main/g/gnutls26/libgnutlsxx27_2.12.20-6_i386.deb
main/g/gtk+2.0/libgtk2.0-0_2.24.10-2_i386.deb
main/g/gtk+2.0/libgtk2.0-dev_2.24.10-2_i386.deb
main/k/keyutils/libkeyutils1_1.5.5-3_i386.deb
main/k/krb5/krb5-multidev_1.10.1+dfsg-5_i386.deb
main/k/krb5/libgssapi-krb5-2_1.10.1+dfsg-5_i386.deb
main/k/krb5/libgssrpc4_1.10.1+dfsg-5_i386.deb
main/k/krb5/libk5crypto3_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkadm5clnt-mit8_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkadm5srv-mit8_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkdb5-6_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkrb5-3_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkrb5-dev_1.10.1+dfsg-5_i386.deb
main/k/krb5/libkrb5support0_1.10.1+dfsg-5_i386.deb
main/libf/libffi/libffi5_3.0.10-3_i386.deb
main/libg/libgcrypt11/libgcrypt11_1.5.0-5_i386.deb
main/libg/libgcrypt11/libgcrypt11-dev_1.5.0-5_i386.deb
main/libg/libgnome-keyring/libgnome-keyring0_3.4.1-1_i386.deb
main/libg/libgnome-keyring/libgnome-keyring-dev_3.4.1-1_i386.deb
main/libg/libgpg-error/libgpg-error0_1.10-3.1_i386.deb
main/libg/libgpg-error/libgpg-error-dev_1.10-3.1_i386.deb
main/libn/libnss-db/libnss-db_2.2.3pre1-4_i386.deb
main/libp/libp11/libp11-2_0.2.8-2_i386.deb
main/libp/libpng/libpng12-0_1.2.49-1_i386.deb
main/libp/libpng/libpng12-dev_1.2.49-1_i386.deb
main/libs/libselinux/libselinux1_2.1.9-5_i386.deb
main/libt/libtasn1-3/libtasn1-3_2.13-2_i386.deb
main/libx/libx11/libx11-6_1.5.0-1_i386.deb
main/libx/libx11/libx11-dev_1.5.0-1_i386.deb
main/libx/libxau/libxau6_1.0.7-1_i386.deb
main/libx/libxau/libxau-dev_1.0.7-1_i386.deb
main/libx/libxcb/libxcb1_1.8.1-2_i386.deb
main/libx/libxcb/libxcb1-dev_1.8.1-2_i386.deb
main/libx/libxcb/libxcb-render0_1.8.1-2_i386.deb
main/libx/libxcb/libxcb-render0-dev_1.8.1-2_i386.deb
main/libx/libxcb/libxcb-shm0_1.8.1-2_i386.deb
main/libx/libxcb/libxcb-shm0-dev_1.8.1-2_i386.deb
main/libx/libxcomposite/libxcomposite1_0.4.3-2_i386.deb
main/libx/libxcomposite/libxcomposite-dev_0.4.3-2_i386.deb
main/libx/libxcursor/libxcursor1_1.1.13-1_i386.deb
main/libx/libxcursor/libxcursor-dev_1.1.13-1_i386.deb
main/libx/libxdamage/libxdamage1_1.1.3-2_i386.deb
main/libx/libxdamage/libxdamage-dev_1.1.3-2_i386.deb
main/libx/libxdmcp/libxdmcp6_1.1.1-1_i386.deb
main/libx/libxext/libxext6_1.3.1-2_i386.deb
main/libx/libxext/libxext-dev_1.3.1-2_i386.deb
main/libx/libxfixes/libxfixes3_5.0-4_i386.deb
main/libx/libxfixes/libxfixes-dev_5.0-4_i386.deb
main/libx/libxi/libxi6_1.6.1-1_i386.deb
main/libx/libxi/libxi-dev_1.6.1-1_i386.deb
main/libx/libxinerama/libxinerama1_1.1.2-1_i386.deb
main/libx/libxinerama/libxinerama-dev_1.1.2-1_i386.deb
main/libx/libxrandr/libxrandr2_1.3.2-2_i386.deb
main/libx/libxrandr/libxrandr-dev_1.3.2-2_i386.deb
main/libx/libxrender/libxrender1_0.9.7-1_i386.deb
main/libx/libxrender/libxrender-dev_0.9.7-1_i386.deb
main/libx/libxss/libxss1_1.2.2-1_i386.deb
main/libx/libxss/libxss-dev_1.2.2-1_i386.deb
main/libx/libxt/libxt6_1.1.3-1_i386.deb
main/libx/libxt/libxt-dev_1.1.3-1_i386.deb
main/libx/libxtst/libxtst6_1.2.1-1_i386.deb
main/libx/libxtst/libxtst-dev_1.2.1-1_i386.deb
main/l/linux/linux-libc-dev_3.2.41-2_i386.deb
main/n/nspr/libnspr4_4.9.2-1_i386.deb
main/n/nspr/libnspr4-dev_4.9.2-1_i386.deb
main/n/nss/libnss3_3.14.3-1_i386.deb
main/n/nss/libnss3-dev_3.14.3-1_i386.deb
main/o/openssl/libssl1.0.0_1.0.1e-2_i386.deb
main/o/openssl/libssl-dev_1.0.1e-2_i386.deb
main/o/orbit2/liborbit2_2.14.19-0.1_i386.deb
main/p/p11-kit/libp11-kit0_0.12-3_i386.deb
main/p/pam/libpam0g_1.1.3-7.1_i386.deb
main/p/pam/libpam0g-dev_1.1.3-7.1_i386.deb
main/p/pango1.0/libpango1.0-0_1.30.0-1_i386.deb
main/p/pango1.0/libpango1.0-dev_1.30.0-1_i386.deb
main/p/pciutils/libpci3_3.1.9-6_i386.deb
main/p/pciutils/libpci-dev_3.1.9-6_i386.deb
main/p/pcre3/libpcre3_8.30-5_i386.deb
main/p/pcre3/libpcre3-dev_8.30-5_i386.deb
main/p/pcre3/libpcrecpp0_8.30-5_i386.deb
main/p/pixman/libpixman-1-0_0.26.0-4_i386.deb
main/p/pixman/libpixman-1-dev_0.26.0-4_i386.deb
main/p/pulseaudio/libpulse0_2.0-6.1_i386.deb
main/p/pulseaudio/libpulse-dev_2.0-6.1_i386.deb
main/p/pulseaudio/libpulse-mainloop-glib0_2.0-6.1_i386.deb
main/s/speech-dispatcher/libspeechd2_0.7.1-6.2_i386.deb
main/s/speech-dispatcher/libspeechd-dev_0.7.1-6.2_i386.deb
main/s/speech-dispatcher/speech-dispatcher_0.7.1-6.2_i386.deb
main/u/udev/libudev0_175-7.2_i386.deb
main/u/udev/libudev-dev_175-7.2_i386.deb
main/x/x11proto-composite/x11proto-composite-dev_0.4.2-2_all.deb
main/x/x11proto-core/x11proto-core-dev_7.0.23-1_all.deb
main/x/x11proto-damage/x11proto-damage-dev_1.2.1-2_all.deb
main/x/x11proto-fixes/x11proto-fixes-dev_5.0-2_all.deb
main/x/x11proto-input/x11proto-input-dev_2.2-1_all.deb
main/x/x11proto-kb/x11proto-kb-dev_1.0.6-2_all.deb
main/x/x11proto-randr/x11proto-randr-dev_1.3.2-2_all.deb
main/x/x11proto-record/x11proto-record-dev_1.14.2-1_all.deb
main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb
main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb
main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb
main/z/zlib/zlib1g_1.2.7.dfsg-13_i386.deb
main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_i386.deb

@ -0,0 +1,517 @@
#!/bin/sh
#
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
#@ This script builds a Debian Wheezy sysroot for building Google Chrome.
#@
#@ Generally this script is invoked as:
#@ sysroot-creator-debian.wheezy.sh <mode> <args>*
#@ Available modes are shown below.
#@
#@ List of modes:
######################################################################
# Config
######################################################################
set -o nounset
set -o errexit
readonly SCRIPT_DIR=$(dirname $0)
# This is where the staging sysroot is.
readonly INSTALL_ROOT_AMD64=$(pwd)/debian_wheezy_amd64_staging
readonly INSTALL_ROOT_I386=$(pwd)/debian_wheezy_i386_staging
readonly REQUIRED_TOOLS="wget"
######################################################################
# Package Config
######################################################################
# this is where we get all the debian packages from
readonly DEBIAN_REPO=http://http.us.debian.org/debian
readonly PACKAGE_LIST_AMD64="${DEBIAN_REPO}/dists/wheezy/main/binary-amd64/Packages.bz2"
readonly PACKAGE_LIST_I386="${DEBIAN_REPO}/dists/wheezy/main/binary-i386/Packages.bz2"
# TODO(thestig) Remove unused libbz2 packages in the next sysroot update.
# Sysroot packages: these are the packages needed to build chrome.
# NOTE: When DEBIAN_PACKAGES is modified, the packagelist files must be updated
# by running this script in GeneratePackageList mode.
readonly DEBIAN_PACKAGES="\
comerr-dev \
gcc-4.6 \
krb5-multidev \
libasound2 \
libasound2-dev \
libatk1.0-0 \
libatk1.0-dev \
libavahi-client3 \
libavahi-common3 \
libbz2-1.0 \
libbz2-dev \
libc6 \
libc6-dev \
libcairo2 \
libcairo2-dev \
libcairo-gobject2 \
libcairo-script-interpreter2 \
libcomerr2 \
libcups2 \
libcups2-dev \
libdbus-1-3 \
libdbus-1-dev \
libdbus-glib-1-2 \
libelf1 \
libelf-dev \
libexpat1 \
libexpat1-dev \
libffi5 \
libfontconfig1 \
libfontconfig1-dev \
libfreetype6 \
libfreetype6-dev \
libgcc1 \
libgcc1 \
libgconf-2-4 \
libgconf2-4 \
libgconf2-dev \
libgcrypt11 \
libgcrypt11-dev \
libgdk-pixbuf2.0-0 \
libgdk-pixbuf2.0-dev \
libglib2.0-0 \
libglib2.0-dev \
libgnome-keyring0 \
libgnome-keyring-dev \
libgnutls26 \
libgnutls-dev \
libgnutls-openssl27 \
libgnutlsxx27 \
libgomp1 \
libgpg-error0 \
libgpg-error-dev \
libgssapi-krb5-2 \
libgssrpc4 \
libgtk2.0-0 \
libgtk2.0-dev \
libk5crypto3 \
libkadm5clnt-mit8 \
libkadm5srv-mit8 \
libkdb5-6 \
libkeyutils1 \
libkrb5-3 \
libkrb5-dev \
libkrb5support0 \
libnspr4 \
libnspr4-dev \
libnss3 \
libnss3-dev \
libnss-db \
liborbit2 \
libp11-2 \
libp11-kit0 \
libpam0g \
libpam0g-dev \
libpango1.0-0 \
libpango1.0-dev \
libpci3 \
libpci-dev \
libpcre3 \
libpcre3-dev \
libpcrecpp0 \
libpixman-1-0 \
libpixman-1-dev \
libpng12-0 \
libpng12-dev \
libpulse0 \
libpulse-dev \
libpulse-mainloop-glib0 \
libquadmath0 \
libselinux1 \
libspeechd2 \
libspeechd-dev \
libssl1.0.0 \
libssl-dev \
libstdc++6 \
libstdc++6-4.6-dev \
libtasn1-3 \
libudev0 \
libudev-dev \
libx11-6 \
libx11-dev \
libxau6 \
libxau-dev \
libxcb1 \
libxcb1-dev \
libxcb-render0 \
libxcb-render0-dev \
libxcb-shm0 \
libxcb-shm0-dev \
libxcomposite1 \
libxcomposite-dev \
libxcursor1 \
libxcursor-dev \
libxdamage1 \
libxdamage-dev \
libxdmcp6 \
libxext6 \
libxext-dev \
libxfixes3 \
libxfixes-dev \
libxi6 \
libxi-dev \
libxinerama1 \
libxinerama-dev \
libxrandr2 \
libxrandr-dev \
libxrender1 \
libxrender-dev \
libxss1 \
libxss-dev \
libxt6 \
libxt-dev \
libxtst6 \
libxtst-dev \
linux-libc-dev \
speech-dispatcher \
x11proto-composite-dev \
x11proto-core-dev \
x11proto-damage-dev \
x11proto-fixes-dev \
x11proto-input-dev \
x11proto-kb-dev \
x11proto-randr-dev \
x11proto-record-dev \
x11proto-render-dev \
x11proto-scrnsaver-dev \
x11proto-xext-dev \
zlib1g \
zlib1g-dev"
readonly DEBIAN_DEP_LIST_AMD64="${SCRIPT_DIR}/packagelist.debian.wheezy.amd64"
readonly DEBIAN_DEP_LIST_I386="${SCRIPT_DIR}/packagelist.debian.wheezy.i386"
readonly DEBIAN_DEP_FILES_AMD64="$(cat ${DEBIAN_DEP_LIST_AMD64})"
readonly DEBIAN_DEP_FILES_I386="$(cat ${DEBIAN_DEP_LIST_I386})"
######################################################################
# Helper
######################################################################
Banner() {
echo "######################################################################"
echo $*
echo "######################################################################"
}
SubBanner() {
echo "......................................................................"
echo $*
echo "......................................................................"
}
Usage() {
egrep "^#@" "$0" | cut --bytes=3-
}
DownloadOrCopy() {
if [ -f "$2" ] ; then
echo "$2 already in place"
return
fi
HTTP=0
echo "$1" | grep -qs ^http:// && HTTP=1
if [ "$HTTP" = "1" ]; then
SubBanner "downloading from $1 -> $2"
wget "$1" -O "$2"
else
SubBanner "copying from $1"
cp "$1" "$2"
fi
}
SetEnvironmentVariables() {
ARCH=""
echo $1 | grep -qs Amd64$ && ARCH=AMD64
if [ -z "$ARCH" ]; then
echo $1 | grep -qs I386$ && ARCH=I386
fi
case "$ARCH" in
AMD64)
INSTALL_ROOT="$INSTALL_ROOT_AMD64";
;;
I386)
INSTALL_ROOT="$INSTALL_ROOT_I386";
;;
*)
echo "ERROR: Unexpected bad architecture."
exit 1
;;
esac
}
Cleanup() {
rm -rf "$TMP"
}
# some sanity checks to make sure this script is run from the right place
# with the right tools
SanityCheck() {
Banner "Sanity Checks"
if [ "$(basename $(pwd))" != "sysroot_scripts" ] ; then
echo -n "ERROR: run this script from "
echo "src/chrome/installer/linux/sysroot_scripts"
exit 1
fi
if ! mkdir -p "${INSTALL_ROOT}" ; then
echo "ERROR: ${INSTALL_ROOT} can't be created."
exit 1
fi
TMP=$(mktemp -q -t -d debian-wheezy-XXXXXX)
if [ -z "$TMP" ]; then
echo "ERROR: temp dir can't be created."
exit 1
fi
trap Cleanup 0
for tool in ${REQUIRED_TOOLS} ; do
if ! which ${tool} ; then
echo "Required binary $tool not found."
echo "Exiting."
exit 1
fi
done
}
ChangeDirectory() {
# Change directory to where this script is.
cd $(dirname "$0")
}
ClearInstallDir() {
Banner "clearing dirs in ${INSTALL_ROOT}"
rm -rf ${INSTALL_ROOT}/*
}
CreateTarBall() {
local tarball=$1
Banner "creating tar ball ${tarball}"
tar zcf ${tarball} -C ${INSTALL_ROOT} .
}
######################################################################
#
######################################################################
HacksAndPatchesAmd64() {
Banner "Misc Hacks & Patches"
# these are linker scripts with absolute pathnames in them
# which we rewrite here
lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \
${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so"
#SubBanner "Rewriting Linker Scripts"
sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts}
sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts}
# This is for chrome's ./build/linux/pkg-config-wrapper
# which overwrites PKG_CONFIG_PATH internally
SubBanner "Package Configs Symlink"
mkdir -p ${INSTALL_ROOT}/usr/share
ln -s ../lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
SubBanner "Adding an additional ld.conf include"
LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
echo /usr/lib/gcc/x86_64-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
echo /usr/lib >> "$LD_SO_HACK_CONF"
}
HacksAndPatchesI386() {
Banner "Misc Hacks & Patches"
# these are linker scripts with absolute pathnames in them
# which we rewrite here
lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \
${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so"
#SubBanner "Rewriting Linker Scripts"
sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts}
sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts}
# This is for chrome's ./build/linux/pkg-config-wrapper
# which overwrites PKG_CONFIG_PATH internally
SubBanner "Package Configs Symlink"
mkdir -p ${INSTALL_ROOT}/usr/share
ln -s ../lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
SubBanner "Adding an additional ld.conf include"
LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
echo /usr/lib >> "$LD_SO_HACK_CONF"
}
InstallIntoSysroot() {
Banner "Install Libs And Headers Into Jail"
mkdir -p ${TMP}/debian-packages
mkdir -p ${INSTALL_ROOT}
for file in $@ ; do
local package="${TMP}/debian-packages/${file##*/}"
Banner "installing ${file}"
DownloadOrCopy ${DEBIAN_REPO}/pool/${file} ${package}
SubBanner "extracting to ${INSTALL_ROOT}"
if [ ! -s "${package}" ] ; then
echo
echo "ERROR: bad package ${package}"
exit 1
fi
dpkg --fsys-tarfile ${package}\
| tar -xvf - --exclude=./usr/share -C ${INSTALL_ROOT}
done
}
CleanupJailSymlinks() {
Banner "jail symlink cleanup"
SAVEDPWD=$(pwd)
cd ${INSTALL_ROOT}
find lib lib64 usr/lib -type l -printf '%p %l\n' | while read link target; do
# skip links with non-absolute paths
echo "${target}" | grep -qs ^/ || continue
echo "${link}: ${target}"
case "${link}" in
usr/lib/gcc/x86_64-linux-gnu/4.*/* | usr/lib/gcc/i486-linux-gnu/4.*/*)
# Relativize the symlink.
ln -snfv "../../../../..${target}" "${link}"
;;
usr/lib/x86_64-linux-gnu/* | usr/lib/i386-linux-gnu/*)
# Relativize the symlink.
ln -snfv "../../..${target}" "${link}"
;;
usr/lib/*)
# Relativize the symlink.
ln -snfv "../..${target}" "${link}"
;;
lib64/* | lib/*)
# Relativize the symlink.
ln -snfv "..${target}" "${link}"
;;
esac
done
find lib lib64 usr/lib -type l -printf '%p %l\n' | while read link target; do
# Make sure we catch new bad links.
if [ ! -r "${link}" ]; then
echo "ERROR: FOUND BAD LINK ${link}"
ls -l ${link}
exit 1
fi
done
cd "$SAVEDPWD"
}
#@
#@ BuildSysrootAmd64 <tarball-name>
#@
#@ Build everything and package it
BuildSysrootAmd64() {
ClearInstallDir
InstallIntoSysroot ${DEBIAN_DEP_FILES_AMD64}
CleanupJailSymlinks
HacksAndPatchesAmd64
CreateTarBall $1
}
#@
#@ BuildSysrootI386 <tarball-name>
#@
#@ Build everything and package it
BuildSysrootI386() {
ClearInstallDir
InstallIntoSysroot ${DEBIAN_DEP_FILES_I386}
CleanupJailSymlinks
HacksAndPatchesI386
CreateTarBall $1
}
#
# GeneratePackageList
#
# Looks up package names in ${TMP}/Packages and write list of URLs
# to output file.
#
GeneratePackageList() {
local output_file=$1
echo "Updating: ${output_file}"
/bin/rm -f ${output_file}
shift
for pkg in $@ ; do
local pkg_full=$(grep -A 1 " ${pkg}\$" ${TMP}/Packages | egrep -o "pool/.*")
if [ -z "${pkg_full}" ]; then
echo "ERROR: missing package: $pkg"
exit 1
fi
echo $pkg_full | sed "s/^pool\///" >> $output_file
done
# sort -o does an in-place sort of this file
sort $output_file -o $output_file
}
#@
#@ UpdatePackageListsAmd64
#@
#@ Regenerate the package lists such that they contain an up-to-date
#@ list of URLs within the Debian archive. (For amd64)
UpdatePackageListsAmd64() {
local package_list="${TMP}/Packages.wheezy_amd64.bz2"
DownloadOrCopy ${PACKAGE_LIST_AMD64} ${package_list}
bzcat ${package_list} | egrep '^(Package:|Filename:)' > ${TMP}/Packages
GeneratePackageList ${DEBIAN_DEP_LIST_AMD64} "${DEBIAN_PACKAGES}"
}
#@
#@ UpdatePackageListsI386
#@
#@ Regenerate the package lists such that they contain an up-to-date
#@ list of URLs within the Debian archive. (For i386)
UpdatePackageListsI386() {
local package_list="${TMP}/Packages.wheezy_i386.bz2"
DownloadOrCopy ${PACKAGE_LIST_I386} ${package_list}
bzcat ${package_list} | egrep '^(Package:|Filename:)' > ${TMP}/Packages
GeneratePackageList ${DEBIAN_DEP_LIST_I386} "${DEBIAN_PACKAGES}"
}
if [ $# -eq 0 ] ; then
echo "ERROR: you must specify a mode on the commandline"
echo
Usage
exit 1
elif [ "$(type -t $1)" != "function" ]; then
echo "ERROR: unknown function '$1'." >&2
echo "For help, try:"
echo " $0 help"
exit 1
else
ChangeDirectory
SetEnvironmentVariables "$1"
SanityCheck
"$@"
fi