commit 2b949cec1efe21f878c5615a41559ded8f82ada0
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Nov 15 12:06:18 2017 +0000
Update to 27.0.0.187
check_new_version.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
flash-plugin.spec.in | 5 ++++-
lpf-flash-plugin.spec | 5 ++++-
3 files changed, 61 insertions(+), 2 deletions(-)
---
diff --git a/check_new_version.py b/check_new_version.py
new file mode 100755
index 0000000..0934b65
--- /dev/null
+++ b/check_new_version.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python3
+
+""" Warning not complete """
+
+import requests
+import re
+import os
+import subprocess
+
+html =
requests.get('http://get.adobe.com/flashplayer/about/')
+#print (html.text)
+
+str_mx = re.compile('Linux.*?Firefox.*?NPAPI.*?<td>([\d.]+)<.td>',
re.S)
+res = str_mx.findall(html.text)
+new_version = res[-1]
+print ("deb32 = %s" % new_version)
+
+spec = open('flash-plugin.spec.in').read()
+str_mx3 = re.compile('Version:\s*([\d.]+)')
+res2 = str_mx3.findall(spec)
+old_version = res2[-1]
+print ("deb32 = %s" % old_version)
+
+def runme(cmd, env, cwd='.'):
+ """Simple function to run a command and return 0 for success, 1 for
+ failure. cmd is a list of the command and arguments, action is a
+ name for the action (for logging), pkg is the name of the package
+ being operated on, env is the environment dict, and cwd is where
+ the script should be executed from."""
+ try:
+ subprocess.check_call(cmd, env=env, cwd=cwd) #, stderr=None
+ except subprocess.CalledProcessError as e:
+ sys.stderr.write('%s failed: %s\n' % (cmd, e))
+ return 1
+ return 0
+
+if new_version != old_version:
+ enviro = os.environ
+ pkgcmd = ['rpmdev-bumpspec', '-n', new_version, '-c',
'Update to %s' % (new_version), 'flash-plugin.spec.in']
+ if runme(pkgcmd, enviro):
+ print('error running runme')
+ pkgcmd = ['rpmdev-bumpspec', '-n', new_version, '-c',
'Update to %s' % (new_version), 'lpf-flash-plugin.spec'] # 2>/dev/null
+ if runme(pkgcmd, enviro):
+ print('error running runme')
+
+ print('rfpkg clog && rfpkg commit -F clog && /bin/rm clog
&& git show')
+ print('rfpkg push && rfpkg build --nowait')
+ print('git checkout f27 && git merge master && git push
&& rfpkg build --nowait; git checkout master')
+ print('git checkout f26 && git merge master && git push
&& rfpkg build --nowait; git checkout master')
+ print('git checkout f25 && git merge master && git push
&& rfpkg build --nowait; git checkout master')
+
+else:
+ print("Already updated !")
diff --git a/flash-plugin.spec.in b/flash-plugin.spec.in
index 7c49014..2a025d9 100644
--- a/flash-plugin.spec.in
+++ b/flash-plugin.spec.in
@@ -2,7 +2,7 @@
%global __strip /bin/true
Name: flash-plugin
-Version: 27.0.0.183
+Version: 27.0.0.187
Release: 1%{?dist}
Epoch: 1
Summary: Adobe Flash Player
@@ -77,6 +77,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/*/apps/flash-player-properties.png
%changelog
+* Wed Nov 15 2017 Sérgio Basto <sergio(a)serjux.com> - 1:27.0.0.187-1
+- Update to 27.0.0.187
+
* Tue Nov 07 2017 Sérgio Basto <sergio(a)serjux.com> - 1:27.0.0.183-1
- Update to 27 in same way
diff --git a/lpf-flash-plugin.spec b/lpf-flash-plugin.spec
index da122b1..8209958 100644
--- a/lpf-flash-plugin.spec
+++ b/lpf-flash-plugin.spec
@@ -5,7 +5,7 @@
%define target_pkg %(t=%{name}; echo ${t#lpf-})
Name: lpf-flash-plugin
-Version: 27.0.0.183
+Version: 27.0.0.187
Release: 1%{?dist}
Epoch: 1
Summary: Adobe Flash Player package bootstrap
@@ -67,6 +67,9 @@ fi
%changelog
+* Wed Nov 15 2017 Sérgio Basto <sergio(a)serjux.com> - 1:27.0.0.187-1
+- Update to 27.0.0.187
+
* Tue Nov 07 2017 Sérgio Basto <sergio(a)serjux.com> - 1:27.0.0.183-1
- Update to 27 in same way