ydir...@free.fr wrote: > tags 833741 + patch > thanks > > Is there any reason not to apply that patch ?
Unfortunately that patch does not apply cleanly now and also has a few bugs in it such as accidentally coding in version 23.0.0.162 into the download. Plus it added a dependency upon the "jq" program. However the spirit of it was good and it inspired me to improve it. :-) I spent some time today rewriting the patch and testing it with the current 23.0.0.207 and then caught the update tonight to 24.0.0.186. Due to the various active chromium bugs right now I was only able to test these with chromium version 53. I can only assume that once the current chromium 55 is stable that it will work okay with it too. Attached is a more complete patch to pull from Adobe rather than Google. This is working for me. (Hint to others reading this: Apply with "patch -p1 < pepperflashplugin-nonfree.patch" in the top level package source directory.) Bob
diff -ru pepperflashplugin-nonfree-1.8.1+deb8u1/debian/changelog pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/changelog --- pepperflashplugin-nonfree-1.8.1+deb8u1/debian/changelog 2016-05-20 07:25:49.000000000 -0600 +++ pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/changelog 2016-12-13 02:31:35.970536968 -0700 @@ -1,3 +1,13 @@ +pepperflashplugin-nonfree (1.8.1+deb8u2~1) unstable; urgency=medium + + * Non-maintainer upload. + * Patched to use Adobe upstream rather than Google. + * Inspired by the patch provided in Bug#833741#15 by Kristian Klausen + but rewritten. Closes: #833741. + * Adds in 32-bit support. + + -- Bob Proulx <b...@proulx.com> Mon, 12 Dec 2016 15:41:55 -0700 + pepperflashplugin-nonfree (1.8.1+deb8u1) jessie; urgency=medium * Non-maintainer upload. diff -ru pepperflashplugin-nonfree-1.8.1+deb8u1/debian/control pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/control --- pepperflashplugin-nonfree-1.8.1+deb8u1/debian/control 2016-05-24 15:17:59.000000000 -0600 +++ pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/control 2016-12-13 01:10:19.124710115 -0700 @@ -8,11 +8,11 @@ Package: pepperflashplugin-nonfree Architecture: amd64 -Depends: debconf | debconf-2.0, wget, gnupg, libatk1.0-0, libcairo2, libfontconfig1, libfreetype6, libgcc1, libglib2.0-0, libgtk2.0-0 (>= 2.14), libnspr4, libnss3, libpango-1.0-0 | libpango1.0-0, libstdc++6, libx11-6, libxext6, libxt6, libcurl3-gnutls, binutils, ${misc:Depends}, ${shlibs:Depends} +Depends: debconf | debconf-2.0, wget, gnupg, libatk1.0-0, libcairo2, libfontconfig1, libfreetype6, libgcc1, libglib2.0-0, libgtk2.0-0 (>= 2.14), libnspr4, libnss3, libpango-1.0-0 | libpango1.0-0, libstdc++6, libx11-6, libxext6, libxt6, libcurl3-gnutls, binutils, ${misc:Depends} Pre-Depends: ca-certificates Suggests: chromium, ttf-mscorefonts-installer, ttf-dejavu, ttf-xfree86-nonfree, hal Conflicts: libflash-mozplugin, chromium (<< 37.0.2062.120-4) Description: Pepper Flash Player - browser plugin - This package will download Chrome from Google, and unpack it to make the + This package will download Chrome from Adobe, and unpack it to make the included Pepper Flash Player available for use with Chromium. The end user - license agreement is available at Google. + license agreement is available at Adobe. diff -ru pepperflashplugin-nonfree-1.8.1+deb8u1/debian/install pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/install --- pepperflashplugin-nonfree-1.8.1+deb8u1/debian/install 2014-10-22 00:13:17.000000000 -0600 +++ pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/install 2016-12-12 19:54:11.636246715 -0700 @@ -1,3 +1,2 @@ update-pepperflashplugin-nonfree usr/sbin/ -pubkey-google.txt usr/lib/pepperflashplugin-nonfree/ debian/etc/chromium.d/pepperflashplugin-nonfree etc/chromium.d/ Only in pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian: pepperflashplugin-nonfree Only in pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian: pepperflashplugin-nonfree.debhelper.log Only in pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian: pepperflashplugin-nonfree.substvars diff -ru pepperflashplugin-nonfree-1.8.1+deb8u1/debian/postinst pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/postinst --- pepperflashplugin-nonfree-1.8.1+deb8u1/debian/postinst 2013-07-09 11:55:07.000000000 -0600 +++ pepperflashplugin-nonfree-1.8.1+deb8u2~1/debian/postinst 2016-12-13 02:38:01.048755457 -0700 @@ -5,6 +5,9 @@ case "$1" in configure) update-pepperflashplugin-nonfree --install --fast || true + # Clean up the old Google debs as we are now using Adobe tar.gz files. + rm -rf /var/cache/pepperflashplugin-nonfree/*.deb + rm -rf /var/cache/pepperflashplugin-nonfree/latest-stable-verified.txt ;; abort-upgrade|abort-remove|abort-deconfigure) Only in pepperflashplugin-nonfree-1.8.1+deb8u1: pubkey-google.txt diff -ru pepperflashplugin-nonfree-1.8.1+deb8u1/update-pepperflashplugin-nonfree pepperflashplugin-nonfree-1.8.1+deb8u2~1/update-pepperflashplugin-nonfree --- pepperflashplugin-nonfree-1.8.1+deb8u1/update-pepperflashplugin-nonfree 2016-05-20 07:25:34.000000000 -0600 +++ pepperflashplugin-nonfree-1.8.1+deb8u2~1/update-pepperflashplugin-nonfree 2016-12-13 02:26:55.206001792 -0700 @@ -17,12 +17,6 @@ set -e -return_0() { - return 0 -} - -trap "return_0" 0 - die_hard() { echo "ERROR: $1" >&2 echo "More information might be available at:" >&2 @@ -30,7 +24,7 @@ exit 1 } -[ `id -u` = "0" ] || die_hard "must be root" +[ "$(id -u)" = "0" ] || die_hard "must be root" show_usage() { echo "Usage:" @@ -43,18 +37,16 @@ exit 1 } -getopt_temp=`getopt -o iusfvq --long install,uninstall,status,fast,verbose,quiet,beta,unstable,unverified \ - -n 'update-pepperflashplugin-nonfree' -- "$@"` || show_usage -eval set -- "$getopt_temp" || show_usage +getopt_temp=$(getopt -o iusfvq --long install,uninstall,status,fast,verbose,quiet \ + -n 'update-pepperflashplugin-nonfree' -- "$@") || show_usage +eval set -- "$getopt_temp" ACTION=none fast=no verbose=no quiet=no -variant=stable -verified=yes -while [ true ] +while [ $# -gt 0 ] do case "$1" in -i|--install) @@ -81,18 +73,6 @@ quiet=yes shift ;; - --beta) - variant=beta - shift - ;; - --unstable) - variant=unstable - shift - ;; - --unverified) - verified=no - shift - ;; --) shift break @@ -109,100 +89,34 @@ [ "$verbose" != "yes" ] || echo "options : $getopt_temp" -latestfile=latest-$variant-verified.txt -[ "$verified" != "no" ] || latestfile=latest-$variant.txt - -UNPACKDIR=`mktemp -d /tmp/pepperflashplugin-nonfree.XXXXXXXXXX` || die_hard "mktemp failed" -echo "$UNPACKDIR" | grep -q "^/tmp/pepperflashplugin-nonfree\." || die_hard "paranoia" -cd "$UNPACKDIR" || die_hard "cd failed" - -[ "$verbose" != "yes" ] || echo "temporary directory: $UNPACKDIR" - -do_cleanup() { - [ "$verbose" != "yes" ] || echo "cleaning up temporary directory $UNPACKDIR ..." - cd / - echo "$UNPACKDIR" | grep -q "^/tmp/pepperflashplugin-nonfree\." || die_hard "paranoia" - rm -rf "$UNPACKDIR" -} - -die_hard_with_a_cleanup() { - return_0 - do_cleanup - die_hard "$1" -} - -trap "die_hard_with_a_cleanup interrupted" INT +wgetquiet='-q' +wgetfast='-t 3 -T 15' +wgetprogress='-v --progress=dot:default' +[ "$quiet" != "no" ] || wgetquiet="" +[ "$fast" != "no" ] || wgetfast="" +wgetoptions="$wgetquiet $wgetfast $wgetprogress" + +arch="" +case $(dpkg --print-architecture) in + amd64) arch="x86_64" ;; + i?86) arch="i386" ;; + *) + die_hard "unsupported architectures" ;; +esac cachedir=/var/cache/pepperflashplugin-nonfree -wgetquiet=' -q ' -wgetfast='-t 3 -T 15 ' -wgetalways=' -nd -P . ' -wgetprogress=' -v --progress=dot:default ' - -if [ "$ACTION" = "--install" -o "$ACTION" = "--status" ] +upstream="" +installed="" +if [ "$ACTION" = "--install" ] || [ "$ACTION" = "--status" ] then - installed=`strings /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so 2> /dev/null | grep LNX | cut -d ' ' -f 2 | sed -e "s/,/./g"` - - [ ! -f $cachedir/$latestfile ] || [ `wc -l $cachedir/$latestfile | cut -f 1 -d ' '` -eq 2 ] || rm $cachedir/$latestfile - - if [ -f $cachedir/$latestfile ] + if [ -f /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so ] then - chromeversion=`head -n 1 $cachedir/$latestfile` - flashversion=`tail -n 1 $cachedir/$latestfile` - else - chromeversion=0 - flashversion=0 - fi - - mkdir -p var/lib/apt/lists var/cache/apt/archives etc/apt/apt.conf.d etc/apt/preferences.d - - cat > apt.conf <<-EOF - Dir "."; - Dir::Etc::trusted "pubring.gpg"; - Debug::NoLocking "true"; - EOF - - arch=`dpkg --print-architecture` - - cat > etc/apt/sources.list <<-EOF - deb [arch=$arch] http://dl.google.com/linux/chrome/deb/ stable main - EOF - - gpg --quiet --no-permission-warning --homedir "etc/apt" --import /usr/lib/pepperflashplugin-nonfree/pubkey-google.txt - - [ "$verbose" != "yes" ] || echo "doing apt-get update on google repository" - stdouterr=`APT_CONFIG=apt.conf apt-get --quiet --quiet update 2>&1` - [ "$stdouterr" = "" ] || die_hard_with_a_cleanup "failed to retrieve status information from google : $stdouterr" - - newchromeversion=`APT_CONFIG=apt.conf apt-cache show google-chrome-$variant | grep "^Version: " | sed -e "s,^Version: ,,"` - poolfile=`APT_CONFIG=apt.conf apt-cache show google-chrome-$variant | grep "^Filename: " | sed -e "s,^Filename: ,,"` - deburl="http://dl.google.com/linux/chrome/deb/$poolfile" - debfile=`echo $poolfile|sed -e "s,.*/,,"` - debsize=`APT_CONFIG=apt.conf apt-cache show google-chrome-$variant | grep "^Size: " | sed -e "s,^Size: ,,"` - debsha1=`APT_CONFIG=apt.conf apt-cache show google-chrome-$variant | grep "^SHA1: " | sed -e "s,^SHA1: ,,"` - debmd5=`APT_CONFIG=apt.conf apt-cache show google-chrome-$variant | grep "^MD5sum: " | sed -e "s,^MD5sum: ,,"` - - if [ "$chromeversion" = "$newchromeversion" ] - then - upstream=$flashversion - else - downloadurl="http://people.debian.org/~bartm/pepperflashplugin-nonfree/$latestfile" - wgetoptions="$wgetquiet $wgetalways" - [ "$fast" != "yes" ] || wgetoptions="$wgetoptions $wgetfast" - - [ "$verbose" != "yes" ] || echo "downloading $downloadurl" - HOME=/root wget $wgetoptions $downloadurl || die_hard_with_a_cleanup "wget failed to download $downloadurl" - - [ `wc -l $latestfile | cut -f 1 -d ' '` -eq 2 ] || die_hard_with_a_cleanup "cannot use contents of $downloadurl" - - mv $latestfile $cachedir - - chromeversion=`head -n 1 $cachedir/$latestfile` - flashversion=`tail -n 1 $cachedir/$latestfile` - - upstream=$flashversion + installed=$(strings /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so | awk '/LNX/{gsub(/,/,".");print$2}') fi + [ "$verbose" != "yes" ] || echo "getting version of upstream" + upstream=$(HOME=/root wget -q -O- "https://get.adobe.com/flashplayer/webservices/json/?platform_type=Linux&platform_arch=$arch&browser_dist=Chrome" | tr , '\n' | awk -F: '/"[Vv][Ee][Rr][Ss][Ii][Oo][Nn]":/{gsub(/ *",*/,"",$2);print$2;exit}') + [ "$upstream" != "" ] || die_hard "failed to determine upstream version" fi case "$ACTION" in @@ -210,64 +124,39 @@ --install) [ "$verbose" != "yes" ] || echo "selected action = $ACTION" - [ "$upstream" != "" ] || die_hard_with_a_cleanup "failed to determine upstream version" - - if [ "$installed" != "" -a "$upstream" != "" -a "$installed" = "$upstream" ] + if [ "$upstream" != "" ] && [ "$installed" != "" ] && [ "$upstream" = "$installed" ] then [ "$verbose" != "yes" ] || echo "upstream version $upstream is already installed" else - - if [ -f $cachedir/$debfile ] - then - cp -p $cachedir/$debfile . - fi - - if [ ! -f $debfile ] + cached="" + if [ -f /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so ] && [ -f /var/cache/pepperflashplugin-nonfree/manifest.json ] then - wgetoptions="$wgetalways $wgetprogress" - [ "$quiet" != "yes" ] || wgetoptions="$wgetquiet $wgetalways" - [ "$fast" != "yes" ] || wgetoptions="$wgetoptions $wgetfast" - wgetoptions="$wgetoptions -O $UNPACKDIR/$debfile" # to change wget message : Saving to ... - - HOME=/root wget $wgetoptions $deburl || die_hard_with_a_cleanup "wget failed to download $deburl" - - [ `stat --format=%s $debfile` = "$debsize" ] || die_hard_with_a_cleanup "rejecting $debfile : wrong size" - [ `sha1sum $debfile|sed -e "s, .*,,"` = "$debsha1" ] || die_hard_with_a_cleanup "rejecting $debfile : wrong sha1sum" - [ `md5sum $debfile|sed -e "s, .*,,"` = "$debmd5" ] || die_hard_with_a_cleanup "rejecting $debfile : wrong md5sum" + cached=$(strings /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so | awk '/LNX/{gsub(/,/,".");print$2}') fi - - dpkg-deb -x $debfile unpackchrome - - sofile=unpackchrome/opt/google/chrome/PepperFlash/libpepflashplayer.so - [ -e $sofile ] || sofile=unpackchrome/opt/google/chrome-unstable/PepperFlash/libpepflashplayer.so - [ -e $sofile ] || sofile=unpackchrome/opt/google/chrome-beta/PepperFlash/libpepflashplayer.so - [ -e $sofile ] || sofile=unpackchrome/opt/google/chrome/PepperFlash/libpepflashplayer.so - - mv -f $sofile /usr/lib/pepperflashplugin-nonfree - chown root:root /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so - chmod 644 /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so - - jsonfile=unpackchrome/opt/google/chrome/PepperFlash/manifest.json - [ -e $jsonfile ] || jsonfile=unpackchrome/opt/google/chrome-unstable/PepperFlash/manifest.json - [ -e $jsonfile ] || jsonfile=unpackchrome/opt/google/chrome-beta/PepperFlash/manifest.json - [ -e $jsonfile ] || jsonfile=unpackchrome/opt/google/chrome/PepperFlash/manifest.json - - if [ -e $jsonfile ] + if [ "$cached" != "" ] && [ "$cached" = "$upstream" ] then - mv -f $jsonfile /usr/lib/pepperflashplugin-nonfree - chown root:root /usr/lib/pepperflashplugin-nonfree/manifest.json - chmod 644 /usr/lib/pepperflashplugin-nonfree/manifest.json + [ "$verbose" != "yes" ] || echo "using /var/cache/pepperflashplugin-nonfree copies" + cp /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so /usr/lib/pepperflashplugin-nonfree/ + cp /var/cache/pepperflashplugin-nonfree/manifest.json /usr/lib/pepperflashplugin-nonfree/ + else + url="https://fpdownload.adobe.com/pub/flashplayer/pdc/$upstream/flash_player_ppapi_linux.$arch.tar.gz" + [ "$verbose" != "yes" ] || echo "downloading from $url" + mkdir -p /var/cache/pepperflashplugin-nonfree + HOME=/root wget $wgetoptions -O- "$url" | tar -xz -C /var/cache/pepperflashplugin-nonfree libpepflashplayer.so manifest.json + chown root:root /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so + chmod 644 /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so + chown root:root /var/cache/pepperflashplugin-nonfree/manifest.json + chmod 644 /var/cache/pepperflashplugin-nonfree/manifest.json + cached=$(strings /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so | awk '/LNX/{gsub(/,/,".");print$2}') + [ "$cached" = "$upstream" ] || die_hard "failed to download expected version $upstream, downloaded $cached" + cp /var/cache/pepperflashplugin-nonfree/libpepflashplayer.so /usr/lib/pepperflashplugin-nonfree/ + cp /var/cache/pepperflashplugin-nonfree/manifest.json /usr/lib/pepperflashplugin-nonfree/ fi - - mv $debfile $cachedir fi [ "$verbose" != "yes" ] || echo "end of action $ACTION" - - ls -1t /var/cache/pepperflashplugin-nonfree/*.deb|tail -n +3|xargs -r rm || true - ;; --uninstall) @@ -293,14 +182,12 @@ *) - do_cleanup show_usage ;; esac -do_cleanup - [ "$verbose" != "yes" ] || echo "end of update-pepperflashplugin-nonfree" +exit 0