From 6a68c5ddf1dc5f5bbbd65269e88c9d36b2d1ab0a Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Tue, 23 Apr 2019 15:57:28 -0700 Subject: [PATCH] Make stable brave-browser depend on brave-keyring Fixes brave/brave-browser#4205. --- ...rome-installer-linux-debian-build.sh.patch | 13 ++++++++++++- .../chrome-installer-linux-rpm-build.sh.patch | 19 ++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/patches/chrome-installer-linux-debian-build.sh.patch b/patches/chrome-installer-linux-debian-build.sh.patch index 049833937902..78526abbe177 100644 --- a/patches/chrome-installer-linux-debian-build.sh.patch +++ b/patches/chrome-installer-linux-debian-build.sh.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh -index 306b59c138b7cb5df21ad6e9d502bb7a46a104c6..b0f4d4287297fddf2bbaa3b5b6fc40706c8d1349 100755 +index 306b59c138b7cb5df21ad6e9d502bb7a46a104c6..a8ff37b5a7d31b442e3fe812a0d9d091d7eda66d 100755 --- a/chrome/installer/linux/debian/build.sh +++ b/chrome/installer/linux/debian/build.sh @@ -21,7 +21,7 @@ gen_changelog() { @@ -71,3 +71,14 @@ index 306b59c138b7cb5df21ad6e9d502bb7a46a104c6..b0f4d4287297fddf2bbaa3b5b6fc4070 verify_channel # Some Debian packaging tools want these set. +@@ -270,6 +285,10 @@ COMMON_DEPS=$(sed ':a;N;$!ba;s/\n/, /g' "${DEB_COMMON_DEPS}") + COMMON_PREDEPS="dpkg (>= 1.14.0)" + COMMON_RECOMMENDS="libu2f-udev" + ++# Ensure that our signing key is up-to-date (brave/brave-browser#4205). ++if [ "$CHANNEL" = "stable" ]; then ++ COMMON_DEPS="${COMMON_DEPS}, brave-keyring" ++fi + + # Make everything happen in the OUTPUTDIR. + cd "${OUTPUTDIR}" diff --git a/patches/chrome-installer-linux-rpm-build.sh.patch b/patches/chrome-installer-linux-rpm-build.sh.patch index 0ed44a13848a..316252a4d7cd 100644 --- a/patches/chrome-installer-linux-rpm-build.sh.patch +++ b/patches/chrome-installer-linux-rpm-build.sh.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/linux/rpm/build.sh b/chrome/installer/linux/rpm/build.sh -index 0bcd8689d45850ad539f99423fa211785db4f343..9a2d8eeb97e096db8b80aac7e26006888200e9f8 100755 +index 0bcd8689d45850ad539f99423fa211785db4f343..cec0813f491a570fb499e7de5adb9d13e950e7e4 100755 --- a/chrome/installer/linux/rpm/build.sh +++ b/chrome/installer/linux/rpm/build.sh @@ -15,8 +15,9 @@ gen_spec() { @@ -13,7 +13,20 @@ index 0bcd8689d45850ad539f99423fa211785db4f343..9a2d8eeb97e096db8b80aac7e2600688 local INSTALLDIR="${INSTALLDIR}-${CHANNEL}" local PACKAGE="${PACKAGE}-${CHANNEL}" local MENUNAME="${MENUNAME} (${CHANNEL})" -@@ -108,7 +109,10 @@ do_package() { +@@ -87,6 +88,12 @@ do_package() { + PROVIDES="${PACKAGE}" + RPM_COMMON_DEPS="${BUILDDIR}/rpm_common.deps" + DEPENDS=$(cat "${RPM_COMMON_DEPS}" | tr '\n' ',') ++ ++ # Ensure that our signing key is up-to-date (brave/brave-browser#4205). ++ if [ "$CHANNEL" = "stable" ]; then ++ DEPENDS="brave-keyring, ${DEPENDS}" ++ fi ++ + gen_spec + + # Create temporary rpmbuild dirs. +@@ -108,7 +115,10 @@ do_package() { --define "${COMPRESSION_OPT}" \ --define "__os_install_post %{nil}" \ "${SPEC}" @@ -25,7 +38,7 @@ index 0bcd8689d45850ad539f99423fa211785db4f343..9a2d8eeb97e096db8b80aac7e2600688 mv "$RPMBUILD_DIR/RPMS/$ARCHITECTURE/${PKGNAME}.${ARCHITECTURE}.rpm" \ "${OUTPUTDIR}" # Make sure the package is world-readable, otherwise it causes problems when -@@ -145,7 +149,10 @@ verify_channel() { +@@ -145,7 +155,10 @@ verify_channel() { CHANNEL=stable ;; unstable|dev|alpha )