openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2019
- 1 participants
- 2151 discussions
Hello community,
here is the log from the commit of package kitty for openSUSE:Factory checked in at 2019-09-30 16:03:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kitty (Old)
and /work/SRC/openSUSE:Factory/.kitty.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitty"
Mon Sep 30 16:03:00 2019 rev:4 rq:734028 version:0.14.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/kitty/kitty.changes 2019-09-04 09:11:49.722967451 +0200
+++ /work/SRC/openSUSE:Factory/.kitty.new.2352/kitty.changes 2019-09-30 16:03:10.060614847 +0200
@@ -1,0 +2,23 @@
+Mon Sep 30 08:43:41 UTC 2019 - mvetter(a)suse.com
+
+- Update to 0.14.6:
+ * Fix a regression in the previous release that caused kitty to
+ not always respond to DPI changes (#1999)
+- Changes from 0.14.5:
+ * Implement a hack to (mostly) preserve tabs when cat-ting a
+ file with them and then copying the text or passing screen
+ contents to another program (#1829)
+ * When all visible windows have the same background color, use
+ that as the color for the global padding, instead of the
+ configured background color (#1957)
+ * When resetting the terminal, also reset parser state, this
+ allows easy recovery from incomplete escape codes (#1961)
+ * Allow mapping keys commonly found on European keyboards (#1928)
+ * Fix incorrect rendering of some symbols when followed by a
+ space while using the PowerLine font which does not have a
+ space glyph (#1225)
+ * Linux: Allow using fonts with spacing=90 in addition to
+ fonts with spacing=100 (#1968)
+ * Use selection foreground color for underlines as well (#1982)
+
+-------------------------------------------------------------------
Old:
----
kitty-0.14.4.tar.gz
New:
----
kitty-0.14.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kitty.spec ++++++
--- /var/tmp/diff_new_pack.IRC9PU/_old 2019-09-30 16:03:11.256611664 +0200
+++ /var/tmp/diff_new_pack.IRC9PU/_new 2019-09-30 16:03:11.264611643 +0200
@@ -17,7 +17,7 @@
Name: kitty
-Version: 0.14.4
+Version: 0.14.6
Release: 0
Summary: A GPU-based terminal emulator
License: GPL-3.0-only
++++++ kitty-0.14.4.tar.gz -> kitty-0.14.6.tar.gz ++++++
++++ 34955 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2019-09-30 16:02:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
and /work/SRC/openSUSE:Factory/.crmsh.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh"
Mon Sep 30 16:02:57 2019 rev:163 rq:734026 version:4.1.0+git.1569593219.e357a9b9
Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2019-09-23 12:37:54.665605088 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new.2352/crmsh.changes 2019-09-30 16:03:03.100633369 +0200
@@ -1,0 +2,14 @@
+Fri Sep 27 14:09:17 UTC 2019 - dakechi(a)suse.com
+
+- Update to version 4.1.0+git.1569593219.e357a9b9:
+ * Fix: ui_cluster: refactor function list_cluster_nodes and handle the None situation(bsc#1145520)
+
+-------------------------------------------------------------------
+Fri Sep 27 14:04:51 UTC 2019 - dakechi(a)suse.com
+
+- Update to version 4.1.0+git.1569593061.35f57072:
+ * High: cibconfig: Correctly sanitize the original CIB as patch base (bsc#1127716, bsc#1138405)
+ * Revert "high: cibconfig: Use correct CIB as patch base (bsc#1127716)"
+ * Partially revert "medium: cibconfig: Sanitize CIB for patching (bsc#1127716)"
+
+-------------------------------------------------------------------
Old:
----
crmsh-4.1.0+git.1567524903.fff07b88.tar.bz2
New:
----
crmsh-4.1.0+git.1569593219.e357a9b9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.PBahQc/_old 2019-09-30 16:03:04.628629303 +0200
+++ /var/tmp/diff_new_pack.PBahQc/_new 2019-09-30 16:03:04.628629303 +0200
@@ -36,7 +36,7 @@
Summary: High Availability cluster command-line interface
License: GPL-2.0-or-later
Group: %{pkg_group}
-Version: 4.1.0+git.1567524903.fff07b88
+Version: 4.1.0+git.1569593219.e357a9b9
Release: 0
Url: http://crmsh.github.io
Source0: %{name}-%{version}.tar.bz2
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.PBahQc/_old 2019-09-30 16:03:04.660629218 +0200
+++ /var/tmp/diff_new_pack.PBahQc/_new 2019-09-30 16:03:04.664629207 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/crmsh.git</param>
- <param name="changesrevision">f01ad01a93385b981987dad29a4c7ae019bfdd6b</param></service></servicedata>
\ No newline at end of file
+ <param name="changesrevision">e357a9b98c697d57d5ef33b489a1b59d02dea77a</param></service></servicedata>
\ No newline at end of file
++++++ crmsh-4.1.0+git.1567524903.fff07b88.tar.bz2 -> crmsh-4.1.0+git.1569593219.e357a9b9.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/cibconfig.py new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/cibconfig.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/cibconfig.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/cibconfig.py 2019-09-27 16:06:59.000000000 +0200
@@ -40,7 +40,7 @@
from .xmlutil import sanity_check_nvpairs, merge_nodes, op2list, mk_rsc_type, is_resource
from .xmlutil import stuff_comments, is_comment, is_constraint, read_cib, processing_sort_cli
from .xmlutil import find_operation, get_rsc_children_ids, is_primitive, referenced_resources
-from .xmlutil import cibdump2tmp, cibdump2elem, processing_sort, get_rsc_ref_ids, merge_tmpl_into_prim
+from .xmlutil import cibdump2elem, processing_sort, get_rsc_ref_ids, merge_tmpl_into_prim
from .xmlutil import remove_id_used_attributes, get_top_cib_nodes
from .xmlutil import merge_attributes, is_cib_element, sanity_check_meta
from .xmlutil import is_simpleconstraint, is_template, rmnode, is_defaults, is_live_cib
@@ -2680,7 +2680,8 @@
# now increase the epoch by 1
self.bump_epoch()
self._set_cib_attributes(self.cib_elem)
- tmpf = cibdump2tmp(filterfn=sanitize_cib_for_patching)
+ cib_s = xml_tostring(self.cib_orig, pretty_print=True)
+ tmpf = str2tmp(cib_s, suffix=".xml")
if not tmpf or not ensure_sudo_readable(tmpf):
return False
tmpfiles.add(tmpf)
@@ -2689,6 +2690,7 @@
# produce a diff:
# dump_new_conf | crm_diff -o self.cib_orig -n -
+ common_debug("Basis: %s" % (open(tmpf).read()))
common_debug("Input: %s" % (xml_tostring(self.cib_elem)))
rc, cib_diff = filter_string("%s -o %s -n -" %
(self._crm_diff_cmd, tmpf),
@@ -2795,9 +2797,10 @@
cib = cibtext2elem(cib)
if not self._import_cib(cib):
return False
- sanitize_cib(self.cib_elem)
if cibadmin_can_patch():
self.cib_orig = copy.deepcopy(self.cib_elem)
+ sanitize_cib_for_patching(self.cib_orig)
+ sanitize_cib(self.cib_elem)
show_unrecognized_elems(self.cib_elem)
self._populate()
return self.check_structure()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/scripts.py new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/scripts.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/scripts.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/scripts.py 2019-09-27 16:06:59.000000000 +0200
@@ -428,7 +428,7 @@
try:
import yaml
with open(scriptfile) as f:
- data = yaml.load(f)
+ data = yaml.load(f, Loader=yaml.SafeLoader)
if isinstance(data, list):
data = data[0]
except ImportError as e:
@@ -1035,7 +1035,7 @@
build_script_cache()
import io
import yaml
- data = yaml.load(io.StringIO(yml))
+ data = yaml.load(io.StringIO(yml), Loader=yaml.SafeLoader)
if isinstance(data, list):
data = data[0]
if 'parameters' in data:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/ui_cluster.py new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/ui_cluster.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/ui_cluster.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/ui_cluster.py 2019-09-27 16:06:59.000000000 +0200
@@ -631,7 +631,7 @@
context.fatal_error("Timed out waiting for cluster (rc = %s)" % (ret))
@command.skill_level('expert')
- def do_run(self, context, cmd, node=None):
+ def do_run(self, context, cmd, *nodes):
'''
Execute the given command on all nodes/specific node, report outcome
'''
@@ -644,10 +644,16 @@
if not _has_parallax:
context.fatal_error("python package parallax is needed for this command")
- hosts = utils.list_cluster_nodes()
- if node and node in hosts:
- hosts = [node]
+ if nodes:
+ hosts = list(nodes)
+ else:
+ hosts = utils.list_cluster_nodes()
+ if hosts is None:
+ context.fatal_error("failed to get node list from cluster")
+
opts = parallax.Options()
+ opts.ssh_options = ['StrictHostKeyChecking=no']
+ opts.askpass = utils.check_ssh_passwd_need(hosts)
for host, result in parallax.call(hosts, cmd, opts).items():
if isinstance(result, parallax.Error):
err_buf.error("[%s]: %s" % (host, result))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/utils.py new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/utils.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/utils.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/utils.py 2019-09-27 16:06:59.000000000 +0200
@@ -1760,13 +1760,23 @@
return None
try:
+ # when pacemaker running
rc, outp = stdout2list(['crm_node', '-l'], stderr_on=False, shell=False)
if rc == 0:
return [x for x in [getname(line.split()) for line in outp] if x and x != '(null)']
+ # when corosync running
+ ip_list = get_member_iplist()
+ if ip_list:
+ return ip_list
+
+ # static situation
+ cib_path = os.getenv('CIB_file', '/var/lib/pacemaker/cib/cib.xml')
+ if not os.path.isfile(cib_path):
+ return None
from . import xmlutil
node_list = []
- cib = xmlutil.cibdump2elem()
+ cib = xmlutil.file2cib_elem(cib_path)
if cib is None:
return None
for node in cib.xpath('/cib/configuration/nodes/node'):
@@ -2166,4 +2176,26 @@
return datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S')
+def get_member_iplist():
+ rc, out, err= get_stdout_stderr("corosync-cmapctl -b runtime.totem.pg.mrp.srp.members")
+ if rc != 0:
+ common_debug(err)
+ return None
+
+ ip_list = []
+ for line in out.split('\n'):
+ match = re.search(r'ip\((.*?)\)', line)
+ if match:
+ ip_list.append(match.group(1))
+ return ip_list
+
+
+def check_ssh_passwd_need(hosts):
+ ssh_options = "-o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15"
+ for host in hosts:
+ ssh_cmd = "ssh {} -T -o Batchmode=yes {} true".format(ssh_options, host)
+ rc, _, _ = get_stdout_stderr(ssh_cmd)
+ if rc != 0:
+ return True
+ return False
# vim:ts=4:sw=4:et:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/xmlutil.py new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/xmlutil.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/crmsh/xmlutil.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/crmsh/xmlutil.py 2019-09-27 16:06:59.000000000 +0200
@@ -87,17 +87,9 @@
return None
-def cibdump2tmp(filterfn=None):
+def cibdump2tmp():
try:
_, outp, _ = sudocall(cib_dump)
- if filterfn is not None:
- try:
- cib_elem = etree.fromstring(outp)
- except etree.ParseError as msg:
- common_err(msg)
- return None
- filterfn(cib_elem)
- outp = etree.tostring(cib_elem, pretty_print=True)
if outp is not None:
return str2tmp(outp)
except IOError as msg:
@@ -675,7 +667,6 @@
def sanitize_cib(doc):
-
xml_processnodes(doc, is_status_node, rmnodes)
# xml_processnodes(doc, true, printid)
# xml_processnodes(doc, is_emptynvpairs, rmnodes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/doc/crm.8.adoc new/crmsh-4.1.0+git.1569593219.e357a9b9/doc/crm.8.adoc
--- old/crmsh-4.1.0+git.1567524903.fff07b88/doc/crm.8.adoc 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/doc/crm.8.adoc 2019-09-27 16:06:59.000000000 +0200
@@ -1346,18 +1346,18 @@
==== `run`
This command takes a shell statement as argument, executes that
-statement on all nodes or a specific node in the cluster,
+statement on all nodes in the cluster or a specific node,
and reports the result.
Usage:
...............
-run <command> [node]
+run <command> [node ...]
...............
Example:
...............
run "cat /proc/uptime"
-run "ls" node2
+run "ls" node1 node2
...............
[[cmdhelp_cluster_start,Start cluster services]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/test/testcases/edit new/crmsh-4.1.0+git.1569593219.e357a9b9/test/testcases/edit
--- old/crmsh-4.1.0+git.1567524903.fff07b88/test/testcases/edit 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/test/testcases/edit 2019-09-27 16:06:59.000000000 +0200
@@ -62,6 +62,34 @@
tag t-d45: d4 d5
show type:order
show related:d4
+show
+commit
+_test
+verify
+primitive a0 ocf:heartbeat:Dummy
+primitive a1 ocf:heartbeat:Dummy
+primitive a2 ocf:heartbeat:Dummy
+primitive a3 ocf:heartbeat:Dummy
+primitive a4 ocf:heartbeat:Dummy
+primitive a5 ocf:heartbeat:Dummy
+primitive a6 ocf:heartbeat:Dummy
+primitive a7 ocf:heartbeat:Dummy
+primitive a8 ocf:heartbeat:Dummy
+primitive a9 ocf:heartbeat:Dummy
+primitive aErr ocf:heartbeat:Dummy
+group as a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aErr
+commit
+cd ..
+cd configure
+filter "sed '/as/s/a9//'"
+filter "sed '/as/s/a1/a1 a9/'"
+commit
+cd ..
+cd configure
+filter "sed '/abs/s/a9//'"
+filter "sed '/abs/s/a8/a8 a9/'"
+show
+commit
_test
verify
.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/test/testcases/edit.exp new/crmsh-4.1.0+git.1569593219.e357a9b9/test/testcases/edit.exp
--- old/crmsh-4.1.0+git.1567524903.fff07b88/test/testcases/edit.exp 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/test/testcases/edit.exp 2019-09-27 16:06:59.000000000 +0200
@@ -127,14 +127,135 @@
primitive d4 Dummy
tag t-d45 d4 d5
order o-d456 d4 d5 d6
-.INP: _test
-.INP: verify
+.INP: show
+node node1 \
+ attributes mem=16G
+primitive d1 Dummy
+primitive d2 Dummy
+primitive d3 Dummy
+primitive d4 Dummy
+primitive d5 Dummy
+primitive d6 Dummy
+primitive p1 Dummy \
+ op monitor interval=60m \
+ op monitor interval=120m \
+ op_params OCF_CHECK_LEVEL=10
+primitive p2 Dummy
+primitive p3 Dummy
+primitive st stonith:null \
+ params hostlist=node1 \
+ meta description="some description here" requires=nothing \
+ op monitor interval=60m
+group g1 p1 p2 d3
+group g2 d1 d2
+clone c1 g1
+tag t-d45 d4 d5
+location l1 p3 100: node1
+location loc-d1 d1 \
+ rule -inf: not_defined webserver or mem number:lte 0 \
+ rule -inf: not_defined a2 \
+ rule webserver: defined webserver
+order o-d456 d4 d5 d6
+order o1 inf: p3 c1
+property cib-bootstrap-options:
+rsc_defaults rsc_options: \
+ failure-timeout=10m
+op_defaults op-options: \
+ timeout=60s
+.INP: commit
.EXT crmd metadata
.EXT pengine metadata
.EXT cib metadata
+.INP: _test
+.INP: verify
+.INP: primitive a0 ocf:heartbeat:Dummy
+.INP: primitive a1 ocf:heartbeat:Dummy
+.INP: primitive a2 ocf:heartbeat:Dummy
+.INP: primitive a3 ocf:heartbeat:Dummy
+.INP: primitive a4 ocf:heartbeat:Dummy
+.INP: primitive a5 ocf:heartbeat:Dummy
+.INP: primitive a6 ocf:heartbeat:Dummy
+.INP: primitive a7 ocf:heartbeat:Dummy
+.INP: primitive a8 ocf:heartbeat:Dummy
+.INP: primitive a9 ocf:heartbeat:Dummy
+.INP: primitive aErr ocf:heartbeat:Dummy
+.INP: group as a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aErr
+.INP: commit
+.INP: cd ..
+.INP: cd configure
+.INP: filter "sed '/as/s/a9//'"
+.INP: filter "sed '/as/s/a1/a1 a9/'"
+.INP: commit
+.INP: cd ..
+.INP: cd configure
+.INP: filter "sed '/abs/s/a9//'"
+.INP: filter "sed '/abs/s/a8/a8 a9/'"
+.INP: show
+node node1 \
+ attributes mem=16G
+primitive a0 Dummy
+primitive a1 Dummy
+primitive a2 Dummy
+primitive a3 Dummy
+primitive a4 Dummy
+primitive a5 Dummy
+primitive a6 Dummy
+primitive a7 Dummy
+primitive a8 Dummy
+primitive a9 Dummy
+primitive aErr Dummy
+primitive d1 Dummy
+primitive d2 Dummy
+primitive d3 Dummy
+primitive d4 Dummy
+primitive d5 Dummy
+primitive d6 Dummy
+primitive p1 Dummy \
+ op monitor interval=60m \
+ op monitor interval=120m \
+ op_params OCF_CHECK_LEVEL=10
+primitive p2 Dummy
+primitive p3 Dummy
+primitive st stonith:null \
+ params hostlist=node1 \
+ meta description="some description here" requires=nothing \
+ op monitor interval=60m
+group as a0 a1 a9 a2 a3 a4 a5 a6 a7 a8 aErr
+group g1 p1 p2 d3
+group g2 d1 d2
+clone c1 g1
+tag t-d45 d4 d5
+location l1 p3 100: node1
+location loc-d1 d1 \
+ rule -inf: not_defined webserver or mem number:lte 0 \
+ rule -inf: not_defined a2 \
+ rule webserver: defined webserver
+order o-d456 d4 d5 d6
+order o1 inf: p3 c1
+property cib-bootstrap-options:
+rsc_defaults rsc_options: \
+ failure-timeout=10m
+op_defaults op-options: \
+ timeout=60s
+.INP: commit
+INFO: 89: apparently there is nothing to commit
+INFO: 89: try changing something first
+.INP: _test
+.INP: verify
.INP: show
node node1 \
attributes mem=16G
+primitive a0 Dummy
+primitive a1 Dummy
+primitive a2 Dummy
+primitive a3 Dummy
+primitive a4 Dummy
+primitive a5 Dummy
+primitive a6 Dummy
+primitive a7 Dummy
+primitive a8 Dummy
+primitive a9 Dummy
+primitive aErr Dummy
primitive d1 Dummy
primitive d2 Dummy
primitive d3 Dummy
@@ -151,6 +272,7 @@
params hostlist=node1 \
meta description="some description here" requires=nothing \
op monitor interval=60m
+group as a0 a1 a9 a2 a3 a4 a5 a6 a7 a8 aErr
group g1 p1 p2 d3
group g2 d1 d2
clone c1 g1
@@ -168,3 +290,5 @@
op_defaults op-options: \
timeout=60s
.INP: commit
+INFO: 93: apparently there is nothing to commit
+INFO: 93: try changing something first
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.1.0+git.1567524903.fff07b88/test/unittests/test_utils.py new/crmsh-4.1.0+git.1569593219.e357a9b9/test/unittests/test_utils.py
--- old/crmsh-4.1.0+git.1567524903.fff07b88/test/unittests/test_utils.py 2019-09-03 17:35:03.000000000 +0200
+++ new/crmsh-4.1.0+git.1569593219.e357a9b9/test/unittests/test_utils.py 2019-09-27 16:06:59.000000000 +0200
@@ -12,6 +12,70 @@
from crmsh import tmpfiles
+def test_check_ssh_passwd_need_True():
+ with mock.patch('crmsh.utils.get_stdout_stderr') as mock_get_stdout_stderr:
+ mock_get_stdout_stderr.side_effect = [(0, None, None), (1, None, None)]
+ assert utils.check_ssh_passwd_need(["node1", "node2"]) == True
+ mock_get_stdout_stderr.assert_has_calls([
+ mock.call('ssh -o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15 -T -o Batchmode=yes node1 true'),
+ mock.call('ssh -o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15 -T -o Batchmode=yes node2 true')
+ ])
+
+
+def test_check_ssh_passwd_need_Flase():
+ with mock.patch('crmsh.utils.get_stdout_stderr') as mock_get_stdout_stderr:
+ mock_get_stdout_stderr.side_effect = [(0, None, None), (0, None, None)]
+ assert utils.check_ssh_passwd_need(["node1", "node2"]) == False
+ mock_get_stdout_stderr.assert_has_calls([
+ mock.call('ssh -o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15 -T -o Batchmode=yes node1 true'),
+ mock.call('ssh -o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15 -T -o Batchmode=yes node2 true')
+ ])
+
+
+(a)mock.patch('crmsh.utils.common_debug')
+(a)mock.patch('crmsh.utils.get_stdout_stderr')
+def test_get_member_iplist_None(mock_get_stdout_stderr, mock_common_debug):
+ mock_get_stdout_stderr.return_value = (1, None, "Failed to initialize the cmap API. Error CS_ERR_LIBRARY")
+ assert utils.get_member_iplist() is None
+ mock_get_stdout_stderr.assert_called_once_with('corosync-cmapctl -b runtime.totem.pg.mrp.srp.members')
+ mock_common_debug.assert_called_once_with('Failed to initialize the cmap API. Error CS_ERR_LIBRARY')
+
+
+def test_get_member_iplist():
+ with mock.patch('crmsh.utils.get_stdout_stderr') as mock_get_stdout_stderr:
+ cmap_value = '''
+runtime.totem.pg.mrp.srp.members.336860211.config_version (u64) = 0
+runtime.totem.pg.mrp.srp.members.336860211.ip (str) = r(0) ip(20.20.20.51)
+runtime.totem.pg.mrp.srp.members.336860211.join_count (u32) = 1
+runtime.totem.pg.mrp.srp.members.336860211.status (str) = joined
+runtime.totem.pg.mrp.srp.members.336860212.config_version (u64) = 0
+runtime.totem.pg.mrp.srp.members.336860212.ip (str) = r(0) ip(20.20.20.52)
+runtime.totem.pg.mrp.srp.members.336860212.join_count (u32) = 1
+runtime.totem.pg.mrp.srp.members.336860212.status (str) = joined
+ '''
+ mock_get_stdout_stderr.return_value = (0, cmap_value, None)
+ assert utils.get_member_iplist() == ['20.20.20.51', '20.20.20.52']
+ mock_get_stdout_stderr.assert_called_once_with('corosync-cmapctl -b runtime.totem.pg.mrp.srp.members')
+
+
+def test_list_cluster_nodes_pacemaker_running():
+ with mock.patch('crmsh.utils.stdout2list') as mock_stdout2list:
+ crm_node_value= ["336860211 15sp1-1 member", "336860212 15sp1-2 member"]
+ mock_stdout2list.return_value = (0, crm_node_value)
+ assert utils.list_cluster_nodes() == ['15sp1-1', '15sp1-2']
+ mock_stdout2list.assert_called_once_with(['crm_node', '-l'], shell=False, stderr_on=False)
+
+
+(a)mock.patch('crmsh.utils.stdout2list')
+(a)mock.patch('crmsh.utils.get_member_iplist')
+def test_list_cluster_nodes_corosync_running(mock_get_member_iplist, mock_stdout2list):
+ mock_stdout2list.return_value = (1, None)
+ mock_get_member_iplist.return_value = ["node1", "node2"]
+ assert utils.list_cluster_nodes() == ["node1", "node2"]
+ mock_stdout2list.assert_called_once_with(['crm_node', '-l'], shell=False, stderr_on=False)
+ mock_get_member_iplist.assert_called_once_with()
+
+
def test_to_ascii():
assert utils.to_ascii(None) is None
assert utils.to_ascii('test') == 'test'
1
0
Hello community,
here is the log from the commit of package openSUSE-MicroOS for openSUSE:Factory checked in at 2019-09-30 16:02:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-MicroOS (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-MicroOS.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-MicroOS"
Mon Sep 30 16:02:54 2019 rev:5 rq:734023 version:16.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/openSUSE-MicroOS/openSUSE-MicroOS.changes 2019-09-23 12:37:10.365612377 +0200
+++ /work/SRC/openSUSE:Factory/.openSUSE-MicroOS.new.2352/openSUSE-MicroOS.changes 2019-09-30 16:02:55.264654223 +0200
@@ -1,0 +2,5 @@
+Mon Sep 30 07:51:30 UTC 2019 - Guillaume GARDET <guillaume.gardet(a)opensuse.org>
+
+- Add kernel-firmware for RPi
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openSUSE-MicroOS.kiwi ++++++
--- /var/tmp/diff_new_pack.PkGSKR/_old 2019-09-30 16:02:56.072652073 +0200
+++ /var/tmp/diff_new_pack.PkGSKR/_new 2019-09-30 16:02:56.072652073 +0200
@@ -461,6 +461,7 @@
<package name="dracut-kiwi-oem-repart"/>
<package name="kernel-default"/>
<package name="bcm43xx-firmware"/>
+ <package name="kernel-firmware"/><!-- Fix choice between kernel-firmware and kernel-firmware-all -->
<package name="wireless-tools"/>
<package name="wpa_supplicant"/>
</packages>
1
0
Hello community,
here is the log from the commit of package kiwi-templates-JeOS for openSUSE:Factory checked in at 2019-09-30 16:02:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiwi-templates-JeOS (Old)
and /work/SRC/openSUSE:Factory/.kiwi-templates-JeOS.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiwi-templates-JeOS"
Mon Sep 30 16:02:52 2019 rev:2 rq:734022 version:84.87
Changes:
--------
--- /work/SRC/openSUSE:Factory/kiwi-templates-JeOS/kiwi-templates-JeOS.changes 2019-09-26 20:43:13.834222416 +0200
+++ /work/SRC/openSUSE:Factory/.kiwi-templates-JeOS.new.2352/kiwi-templates-JeOS.changes 2019-09-30 16:02:53.848657991 +0200
@@ -1,0 +2,5 @@
+Mon Sep 30 07:56:11 UTC 2019 - Guillaume GARDET <guillaume.gardet(a)opensuse.org>
+
+- Add kernel-firmware for RPi
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ JeOS.kiwi ++++++
--- /var/tmp/diff_new_pack.5C5w7m/_old 2019-09-30 16:02:54.464656352 +0200
+++ /var/tmp/diff_new_pack.5C5w7m/_new 2019-09-30 16:02:54.464656352 +0200
@@ -357,6 +357,7 @@
<!-- For WiFi: -->
<package name="jeos-firstboot-rpiwifi"/>
<package name="bcm43xx-firmware"/>
+ <package name="kernel-firmware"/><!-- Fix choice between kernel-firmware and kernel-firmware-all -->
</packages>
<!-- TW does not have those release packages
++++++ kiwi-templates-JeOS.spec ++++++
--- /var/tmp/diff_new_pack.5C5w7m/_old 2019-09-30 16:02:54.512656224 +0200
+++ /var/tmp/diff_new_pack.5C5w7m/_new 2019-09-30 16:02:54.516656214 +0200
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
1
0
Hello community,
here is the log from the commit of package python-j2gen for openSUSE:Factory checked in at 2019-09-30 16:01:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-j2gen (Old)
and /work/SRC/openSUSE:Factory/.python-j2gen.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-j2gen"
Mon Sep 30 16:01:53 2019 rev:2 rq:734019 version:0.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-j2gen/python-j2gen.changes 2019-09-27 14:53:14.988015654 +0200
+++ /work/SRC/openSUSE:Factory/.python-j2gen.new.2352/python-j2gen.changes 2019-09-30 16:02:00.388800263 +0200
@@ -1,0 +2,12 @@
+Mon Sep 30 08:26:37 UTC 2019 - Thomas Bechtold <tbechtold(a)suse.com>
+
+- update to 0.1.0:
+* Error out when template variables are not defined
+
+-------------------------------------------------------------------
+Fri Sep 27 07:48:59 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Format with spec-cleaner
+- Do not pull in devel python module as it is not needed
+
+-------------------------------------------------------------------
Old:
----
j2gen-0.0.1.tar.gz
New:
----
j2gen-0.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-j2gen.spec ++++++
--- /var/tmp/diff_new_pack.I3OTEj/_old 2019-09-30 16:02:01.512797272 +0200
+++ /var/tmp/diff_new_pack.I3OTEj/_new 2019-09-30 16:02:01.548797176 +0200
@@ -19,17 +19,20 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-j2gen
-Version: 0.0.1
+Version: 0.1.0
Release: 0
Summary: Jinja2 template renderer with yaml input files
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://github.com/toabctl/j2gen
+URL: https://github.com/toabctl/j2gen
Source: https://files.pythonhosted.org/packages/source/j/j2gen/j2gen-%{version}.tar…
-BuildRequires: %{python_module devel}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-Jinja2
+Requires: python-PyYAML
+BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module PyYAML}
@@ -37,11 +40,6 @@
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module pytest}
# /SECTION
-BuildRequires: fdupes
-Requires: python-Jinja2
-Requires: python-PyYAML
-BuildArch: noarch
-
%python_subpackages
%description
@@ -56,6 +54,7 @@
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+
%check
%python_exec setup.py test
++++++ j2gen-0.0.1.tar.gz -> j2gen-0.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/ChangeLog new/j2gen-0.1.0/ChangeLog
--- old/j2gen-0.0.1/ChangeLog 2019-09-27 05:38:31.000000000 +0200
+++ new/j2gen-0.1.0/ChangeLog 2019-09-30 10:25:44.000000000 +0200
@@ -1,6 +1,11 @@
CHANGES
=======
+0.1.0
+-----
+
+* Error out when template variables are not defined
+
0.0.1
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/PKG-INFO new/j2gen-0.1.0/PKG-INFO
--- old/j2gen-0.0.1/PKG-INFO 2019-09-27 05:38:32.000000000 +0200
+++ new/j2gen-0.1.0/PKG-INFO 2019-09-30 10:25:44.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: j2gen
-Version: 0.0.1
+Version: 0.1.0
Summary: Jinja2 template renderer with yaml input files
Home-page: https://github.com/toabctl/j2gen
Author: Thomas Bechtold
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/j2gen/__init__.py new/j2gen-0.1.0/j2gen/__init__.py
--- old/j2gen-0.0.1/j2gen/__init__.py 2019-09-26 17:13:02.000000000 +0200
+++ new/j2gen-0.1.0/j2gen/__init__.py 2019-09-30 10:23:57.000000000 +0200
@@ -51,7 +51,9 @@
def _do_process_generate(args):
# open the template
with open(args.template, 'r') as tpl:
- template = jinja2.Template(tpl.read())
+ template = jinja2.Template(
+ tpl.read(),
+ undefined=jinja2.StrictUndefined)
# open the input file(s)
input_data = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/j2gen/tests/test_base.py new/j2gen-0.1.0/j2gen/tests/test_base.py
--- old/j2gen-0.0.1/j2gen/tests/test_base.py 2019-09-26 17:13:41.000000000 +0200
+++ new/j2gen-0.1.0/j2gen/tests/test_base.py 2019-09-30 10:23:57.000000000 +0200
@@ -20,6 +20,7 @@
from ddt import ddt, data, unpack
+import jinja2
import j2gen
@@ -93,6 +94,23 @@
for i in inputs:
i.close()
+ def test__do_process_generate_undefined_variable(self):
+ with tempfile.NamedTemporaryFile(mode='w') as tpl, \
+ tempfile.NamedTemporaryFile(mode='w') as input1:
+ # write template example
+ tpl.write('{{ unkown }}')
+ tpl.seek(0)
+ # write input
+ input1.write("""---
+ well_known: 1""")
+ input1.seek(0)
+ # do the work
+ ns = argparse.Namespace(output='-',
+ input=[input1.name],
+ template=tpl.name)
+ with self.assertRaises(jinja2.exceptions.UndefinedError):
+ j2gen._do_process_generate(ns)
+
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/j2gen.egg-info/PKG-INFO new/j2gen-0.1.0/j2gen.egg-info/PKG-INFO
--- old/j2gen-0.0.1/j2gen.egg-info/PKG-INFO 2019-09-27 05:38:31.000000000 +0200
+++ new/j2gen-0.1.0/j2gen.egg-info/PKG-INFO 2019-09-30 10:25:44.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: j2gen
-Version: 0.0.1
+Version: 0.1.0
Summary: Jinja2 template renderer with yaml input files
Home-page: https://github.com/toabctl/j2gen
Author: Thomas Bechtold
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/j2gen-0.0.1/j2gen.egg-info/pbr.json new/j2gen-0.1.0/j2gen.egg-info/pbr.json
--- old/j2gen-0.0.1/j2gen.egg-info/pbr.json 2019-09-27 05:38:31.000000000 +0200
+++ new/j2gen-0.1.0/j2gen.egg-info/pbr.json 2019-09-30 10:25:44.000000000 +0200
@@ -1 +1 @@
-{"git_version": "ec061bd", "is_release": true}
\ No newline at end of file
+{"git_version": "5613057", "is_release": true}
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package hawtjni-runtime for openSUSE:Factory checked in at 2019-09-30 16:01:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hawtjni-runtime (Old)
and /work/SRC/openSUSE:Factory/.hawtjni-runtime.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hawtjni-runtime"
Mon Sep 30 16:01:50 2019 rev:3 rq:734010 version:1.16
Changes:
--------
--- /work/SRC/openSUSE:Factory/hawtjni-runtime/hawtjni-runtime.changes 2019-04-11 12:19:24.688995675 +0200
+++ /work/SRC/openSUSE:Factory/.hawtjni-runtime.new.2352/hawtjni-runtime.changes 2019-09-30 16:01:59.628802286 +0200
@@ -1,0 +2,7 @@
+Mon Sep 30 07:45:12 UTC 2019 - Fridrich Strba <fstrba(a)suse.com>
+
+- Remove references to the parent pom from all artifacts and
+ don't distribute any parent artifact, since we don't build
+ this with maven, so the parent artifacts are pointless
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hawtjni-runtime.spec ++++++
--- /var/tmp/diff_new_pack.LmSUty/_old 2019-09-30 16:02:00.228800689 +0200
+++ /var/tmp/diff_new_pack.LmSUty/_new 2019-09-30 16:02:00.232800678 +0200
@@ -71,7 +71,12 @@
%pom_remove_plugin -r :maven-shade-plugin
%pom_remove_plugin -r :maven-eclipse-plugin
-%pom_remove_parent .
+for mod in runtime generator; do
+ %pom_remove_parent hawtjni-${mod}
+ %pom_xpath_inject pom:project "
+ <groupId>org.fusesource.hawtjni</groupId>
+ <version>%{version}</version>" hawtjni-${mod}
+done
%build
mkdir -p hawtjni-runtime/build/classes
@@ -100,10 +105,8 @@
# poms
install -dm 755 %{buildroot}%{_mavenpomdir}/hawtjni
-install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/hawtjni/hawtjni-project.pom
install -m 0644 hawtjni-runtime/pom.xml %{buildroot}%{_mavenpomdir}/hawtjni/hawtjni-runtime.pom
install -m 0644 hawtjni-generator/pom.xml %{buildroot}%{_mavenpomdir}/hawtjni/hawtjni-generator.pom
-%add_maven_depmap hawtjni/hawtjni-project.pom
%add_maven_depmap hawtjni/hawtjni-generator.pom hawtjni/hawtjni-generator.jar -f generator
%add_maven_depmap hawtjni/hawtjni-runtime.pom hawtjni/hawtjni-runtime.jar
1
0
Hello community,
here is the log from the commit of package edgar for openSUSE:Factory checked in at 2019-09-30 16:01:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/edgar (Old)
and /work/SRC/openSUSE:Factory/.edgar.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "edgar"
Mon Sep 30 16:01:43 2019 rev:13 rq:734004 version:1.32
Changes:
--------
--- /work/SRC/openSUSE:Factory/edgar/edgar.changes 2019-03-29 20:42:54.670677791 +0100
+++ /work/SRC/openSUSE:Factory/.edgar.new.2352/edgar.changes 2019-09-30 16:01:56.452810737 +0200
@@ -1,0 +2,8 @@
+Sat Sep 21 19:47:49 UTC 2019 - Martin Hauke <mardnh(a)gmx.de>
+
+- Update to version 1.32
+ * Updated Dutch translation
+ * Fixed an issue with wrong names being displayed in certain
+ dialogs
+
+-------------------------------------------------------------------
Old:
----
edgar-1.31.tar.gz
New:
----
edgar-1.32.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ edgar.spec ++++++
--- /var/tmp/diff_new_pack.GrckCU/_old 2019-09-30 16:01:59.336803062 +0200
+++ /var/tmp/diff_new_pack.GrckCU/_new 2019-09-30 16:01:59.340803052 +0200
@@ -17,7 +17,7 @@
Name: edgar
-Version: 1.31
+Version: 1.32
Release: 0
Summary: 2D platform game with a persistent world
License: GPL-2.0-or-later
++++++ edgar-1.31.tar.gz -> edgar-1.32.tar.gz ++++++
/work/SRC/openSUSE:Factory/edgar/edgar-1.31.tar.gz /work/SRC/openSUSE:Factory/.edgar.new.2352/edgar-1.32.tar.gz differ: char 13, line 1
1
0
Hello community,
here is the log from the commit of package ack for openSUSE:Factory checked in at 2019-09-30 16:01:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ack (Old)
and /work/SRC/openSUSE:Factory/.ack.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ack"
Mon Sep 30 16:01:41 2019 rev:27 rq:734003 version:3.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ack/ack.changes 2019-08-22 10:54:52.069679793 +0200
+++ /work/SRC/openSUSE:Factory/.ack.new.2352/ack.changes 2019-09-30 16:01:48.132832879 +0200
@@ -1,0 +2,9 @@
+Thu Sep 26 09:33:14 UTC 2019 - Andreas Stieger <andreas.stieger(a)gmx.de>
+
+- ack 3.1.1:
+ * Improve the speed up the -l, -L and -c options
+- includes changes from 3.1.0:
+ * Added the --range-start and --range-end options to allow
+ searching only ranges of
+
+-------------------------------------------------------------------
Old:
----
ack-v3.0.3.tar.gz
New:
----
ack-v3.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ack.spec ++++++
--- /var/tmp/diff_new_pack.G7RWSg/_old 2019-09-30 16:01:48.704831358 +0200
+++ /var/tmp/diff_new_pack.G7RWSg/_new 2019-09-30 16:01:48.704831358 +0200
@@ -24,7 +24,7 @@
%endif
%{!?perl_make_install: %global perl_make_install make DESTDIR=%{buildroot} install_vendor}
Name: ack
-Version: 3.0.3
+Version: 3.1.1
Release: 0
Summary: Grep-Like Text Finder
License: Artistic-2.0
@@ -35,7 +35,7 @@
Patch3: ack-add_spec.patch
BuildRequires: make
BuildRequires: perl >= 5.10.1
-BuildRequires: perl(File::Next) >= 1.10
+BuildRequires: perl(File::Next) >= 1.18
Requires: perl >= 5.10.1
Requires: perl-App-Ack = %{version}-%{release}
Requires: perl-base = %{perl_version}
@@ -55,7 +55,7 @@
Summary: Grep-Like Text Finder Perl Module
Group: Development/Libraries/Perl
Requires: perl-base = %{perl_version}
-Requires: perl(File::Next) >= 1.10
+Requires: perl(File::Next) >= 1.18
%description -n perl-App-Ack
App::Ack is a grep-like tool tailored to working with large trees of source
++++++ ack-v3.0.3.tar.gz -> ack-v3.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/Changes new/ack-v3.1.1/Changes
--- old/ack-v3.0.3/Changes 2019-08-21 06:42:25.000000000 +0200
+++ new/ack-v3.1.1/Changes 2019-09-01 05:58:05.000000000 +0200
@@ -1,6 +1,30 @@
History file for ack 3. https://beyondgrep.com/
+v3.1.1 Sat Aug 31 22:56:10 CDT 2019
+========================================
+[SPEEDUP]
+Improved the speed up the -l, -L and -c options by pre-scanning the file
+in bulk before doing line-by-line scan. (GH #221)
+
+[FIXES]
+On Windows, patterns with $ to mark the end of the line would not match.
+(GH #229)
+
+[DOCUMENTATION]
+Fixed docs that referred to --range-stop instead of --range-end. (GH #228)
+
+[INTERNALS]
+Now requires File::Next 1.18.
+
+
+v3.1.0 Thu Aug 22 22:43:15 CDT 2019
+========================================
+[FEATURES]
+Added the --range-start and --range-end options to allow searching only
+ranges of each file. (GH #165)
+
+
v3.0.3 Tue Aug 20 23:42:02 CDT 2019
========================================
[FIXES]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/MANIFEST new/ack-v3.1.1/MANIFEST
--- old/ack-v3.0.3/MANIFEST 2019-08-21 06:43:20.000000000 +0200
+++ new/ack-v3.1.1/MANIFEST 2019-09-01 06:01:46.000000000 +0200
@@ -129,6 +129,13 @@
t/etc/shebang.sh.xxx
t/home/.ackrc
+
+t/range/rangefile.pm
+t/range/america-the-beautiful.html
+t/range/anchors-aweigh.html
+t/range/johnny-rebeck.txt
+t/range/stars-and-stripes-forever.html
+
t/swamp/#emacs-workfile.pl#
t/swamp/0
t/swamp/CMakeLists.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/META.json new/ack-v3.1.1/META.json
--- old/ack-v3.0.3/META.json 2019-08-21 06:43:20.000000000 +0200
+++ new/ack-v3.1.1/META.json 2019-09-01 06:01:46.000000000 +0200
@@ -34,7 +34,7 @@
"requires" : {
"Cwd" : "3.00",
"File::Basename" : "1.00015",
- "File::Next" : "1.16",
+ "File::Next" : "1.18",
"File::Spec" : "3.00",
"File::Temp" : "0.19",
"Getopt::Long" : "2.39",
@@ -69,6 +69,6 @@
},
"x_MailingList" : "https://groups.google.com/group/ack-users"
},
- "version" : "v3.0.3",
+ "version" : "v3.1.1",
"x_serialization_backend" : "JSON::PP version 4.04"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/META.yml new/ack-v3.1.1/META.yml
--- old/ack-v3.0.3/META.yml 2019-08-21 06:43:20.000000000 +0200
+++ new/ack-v3.1.1/META.yml 2019-09-01 06:01:46.000000000 +0200
@@ -20,7 +20,7 @@
requires:
Cwd: '3.00'
File::Basename: '1.00015'
- File::Next: '1.16'
+ File::Next: '1.18'
File::Spec: '3.00'
File::Temp: '0.19'
Getopt::Long: '2.39'
@@ -43,5 +43,5 @@
homepage: https://beyondgrep.com/
license: https://www.perlfoundation.org/artistic-license-20.html
repository: git://github.com/beyondgrep/ack3.git
-version: v3.0.3
+version: v3.1.1
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/Makefile.PL new/ack-v3.1.1/Makefile.PL
--- old/ack-v3.0.3/Makefile.PL 2019-08-21 06:41:14.000000000 +0200
+++ new/ack-v3.1.1/Makefile.PL 2019-09-01 05:58:01.000000000 +0200
@@ -30,7 +30,7 @@
PREREQ_PM => {
'Cwd' => '3.00',
'File::Basename' => '1.00015',
- 'File::Next' => '1.16',
+ 'File::Next' => '1.18',
'File::Spec' => '3.00',
'File::Temp' => '0.19', # For newdir()
'Getopt::Long' => '2.39',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/ack new/ack-v3.1.1/ack
--- old/ack-v3.0.3/ack 2019-08-21 06:42:32.000000000 +0200
+++ new/ack-v3.1.1/ack 2019-09-01 05:58:05.000000000 +0200
@@ -4,7 +4,7 @@
use warnings;
use version;
-our $VERSION = version->declare( 'v3.0.3' ); # Check https://beyondgrep.com/ for updates
+our $VERSION = version->declare( 'v3.1.1' ); # Check https://beyondgrep.com/ for updates
use 5.010001;
@@ -43,6 +43,9 @@
our $opt_output;
our $opt_passthru;
our $opt_p;
+our $opt_range_start;
+our $opt_range_end;
+our $opt_range_invert;
our $opt_regex;
our $opt_show_filename;
our $opt_show_types;
@@ -52,8 +55,11 @@
# Flag if we need any context tracking.
our $is_tracking_context;
-# Special /m version of our $opt_regex.
-our $line_scan_regex;
+# The regex that we search for in each file.
+our $search_re;
+
+# Special /m version of our $search_re.
+our $scan_re;
our @special_vars_used_by_opt_output;
@@ -134,12 +140,23 @@
$opt_output = $opt->{output};
$opt_p = $opt->{p};
$opt_passthru = $opt->{passthru};
+ $opt_range_start = $opt->{range_start};
+ $opt_range_end = $opt->{range_end};
+ $opt_range_invert = $opt->{range_invert};
$opt_regex = $opt->{regex};
$opt_show_filename = $opt->{show_filename};
$opt_show_types = $opt->{show_types};
$opt_underline = $opt->{underline};
$opt_v = $opt->{v};
+
+ if ( $opt_range_start ) {
+ ($opt_range_start, undef) = build_regex( $opt_range_start, {} );
+ }
+ if ( $opt_range_end ) {
+ ($opt_range_end, undef) = build_regex( $opt_range_end, {} );
+ }
+
$App::Ack::report_bad_filenames = !$opt->{s};
$App::Ack::ors = $opt->{print0} ? "\0" : "\n";
@@ -182,18 +199,19 @@
my $files;
if ( $App::Ack::is_filter_mode && !$opt->{files_from} ) { # probably -x
$files = App::Ack::Files->from_stdin();
- $opt_regex = shift @ARGV if not defined $opt_regex;
- $opt_regex = build_regex( $opt_regex, $opt );
+ $opt_regex //= shift @ARGV;
+ ($search_re, $scan_re) = build_regex( $opt_regex, $opt );
}
else {
if ( $opt_f ) {
# No need to check for regex, since mutex options are handled elsewhere.
}
else {
- $opt_regex = shift @ARGV if not defined $opt_regex;
- $opt_regex = build_regex( $opt_regex, $opt );
+ $opt_regex //= shift @ARGV;
+ ($search_re, $scan_re) = build_regex( $opt_regex, $opt );
}
- if ( $opt_regex && $opt_regex =~ /\n/ ) {
+ # XXX What is this checking for?
+ if ( $search_re && $search_re =~ /\n/ ) {
App::Ack::exit_from_ack( 0 );
}
my @start;
@@ -238,25 +256,15 @@
}
# ack -f
- if ( $opt_f ) {
+ if ( $opt_f || $opt_g ) {
if ( $opt_show_types ) {
App::Ack::show_types( $file );
}
- else {
- App::Ack::say( $file->name );
- }
- ++$nmatches;
- last FILES if defined($opt_m) && $nmatches >= $opt_m;
- }
- # ack -g
- elsif ( $opt_g ) {
- if ( $opt_show_types ) {
- App::Ack::show_types( $file );
+ elsif ( $opt_g ) {
+ print_line_with_options( undef, $file->name, 0, $App::Ack::ors );
}
else {
- local $opt_show_filename = 0; # XXX Why is this local?
-
- print_line_with_options( '', $file->name, 0, $App::Ack::ors );
+ App::Ack::say( $file->name );
}
++$nmatches;
last FILES if defined($opt_m) && $nmatches >= $opt_m;
@@ -281,7 +289,7 @@
}
# ack -l, ack -L
elsif ( $opt_l || $opt_L ) {
- my $is_match = file_has_match( $file );
+ my $is_match = count_matches_in_file( $file, 1 );
if ( $opt_L ? !$is_match : $is_match ) {
App::Ack::say( $file->name );
@@ -300,30 +308,12 @@
# Slurp up an entire file up to 10M, see if there are any matches
# in it, and if so, let us know so we can iterate over it directly.
my $needs_line_scan = 1;
- if ( $opt_regex && !$opt_passthru && !$opt_v ) {
- if ( $file->open() && -f $file->{fh} ) {
- my $buffer;
- my $size = 10_000_000;
- my $rc = sysread( $file->{fh}, $buffer, $size );
- if ( !defined($rc) ) {
- if ( $App::Ack::report_bad_filenames ) {
- App::Ack::warn( $file->name . ": $!" );
- }
- $needs_line_scan = 0;
- }
- else {
- # If we read all 10M, then we need to scan the rest.
- if ( $rc == $size ) {
- $needs_line_scan = 1;
- }
- else {
- # Check for the pattern in what we got.
- $needs_line_scan = ($buffer =~ /$line_scan_regex/o);
- }
- if ( $needs_line_scan ) {
- $file->reset();
- }
- }
+ if ( !$opt_passthru && !$opt_v ) {
+ if ( $file->may_be_present( $scan_re ) ) {
+ $file->reset();
+ }
+ else {
+ $needs_line_scan = 0;
}
}
if ( $needs_line_scan ) {
@@ -333,7 +323,7 @@
last FILES;
}
}
- }
+ } # while file->next
if ( $opt_c && !$opt_show_filename ) {
App::Ack::print( $total_count, "\n" );
@@ -406,7 +396,7 @@
return sub {
if ( $opt_g ) {
- if ( $File::Next::name =~ /$opt_regex/o ) {
+ if ( $File::Next::name =~ /$search_re/o ) {
return 0 if $opt_v;
}
else {
@@ -560,19 +550,22 @@
$str = "(?i)$str";
}
+ my $scan_re = undef;
my $re = eval { qr/$str/ };
if ( $re ) {
- $line_scan_regex = eval { qr/$str/m };
+ if ( $str !~ /\$/ ) {
+ # No line_scan is possible if there's a $ in the regex.
+ $scan_re = eval { qr/$str/m };
+ }
}
- if ( !$re || !$line_scan_regex ) {
+ else {
my $err = $@;
chomp $err;
App::Ack::die( "Invalid regex '$str':\n $err" );
}
- return $re;
-
+ return ($re, $scan_re);
}
my $match_colno;
@@ -647,22 +640,32 @@
# Check for context before the main loop, so we don't pay for it if we don't need it.
if ( $is_tracking_context ) {
+ local $_ = undef;
+
$after_context_pending = 0;
+
+ my ($using_ranges, $in_range) = range_setup();
+
while ( <$fh> ) {
chomp;
- my $does_match;
$match_colno = undef;
- if ( $opt_v ) {
- $does_match = !/$opt_regex/o;
- }
- else {
- if ( $does_match = /$opt_regex/o ) {
- # @- = @LAST_MATCH_START
- # @+ = @LAST_MATCH_END
- $match_colno = $-[0] + 1;
+ $in_range = 1 if ( $using_ranges && !$in_range && $opt_range_start && /$opt_range_start/o );
+
+ my $does_match;
+ if ( $in_range ) {
+ if ( $opt_v ) {
+ $does_match = !/$search_re/o;
+ }
+ else {
+ if ( $does_match = /$search_re/o ) {
+ # @- = @LAST_MATCH_START
+ # @+ = @LAST_MATCH_END
+ $match_colno = $-[0] + 1;
+ }
}
}
+
if ( $does_match && $max_count ) {
if ( !$has_printed_for_this_file ) {
if ( $opt_break && $has_printed_something ) {
@@ -691,16 +694,23 @@
}
}
+ $in_range = 0 if ( $using_ranges && $in_range && $opt_range_end && /$opt_range_end/o );
+
last if ($max_count == 0) && ($after_context_pending == 0);
}
}
elsif ( $opt_passthru ) {
local $_ = undef;
+ my ($using_ranges, $in_range) = range_setup();
+
while ( <$fh> ) {
chomp;
+
+ $in_range = 1 if ( $using_ranges && !$in_range && $opt_range_start && /$opt_range_start/o );
+
$match_colno = undef;
- if ( $opt_v ? !/$opt_regex/o : /$opt_regex/o ) {
+ if ( $in_range && ($opt_v xor /$search_re/o) ) {
if ( !$opt_v ) {
$match_colno = $-[0] + 1;
}
@@ -721,9 +731,12 @@
if ( $opt_break && !$has_printed_for_this_file && $has_printed_something ) {
App::Ack::print_blank_line();
}
- print_line_with_options( $filename, $_, $., ':' );
+ print_line_with_options( $filename, $_, $., ':', 1 );
$has_printed_for_this_file = 1;
}
+
+ $in_range = 0 if ( $using_ranges && $in_range && $opt_range_end && /$opt_range_end/o );
+
last if $max_count == 0;
}
}
@@ -731,59 +744,79 @@
local $_ = undef;
$match_colno = undef;
+ my ($using_ranges, $in_range) = range_setup();
+
while ( <$fh> ) {
chomp;
- if ( !/$opt_regex/o ) {
- if ( !$has_printed_for_this_file ) {
- if ( $opt_break && $has_printed_something ) {
- App::Ack::print_blank_line();
- }
- if ( $opt_show_filename && $opt_heading ) {
- App::Ack::say( $display_filename );
+
+ $in_range = 1 if ( $using_ranges && !$in_range && $opt_range_start && /$opt_range_start/o );
+
+ if ( $in_range ) {
+ if ( !/$search_re/o ) {
+ if ( !$has_printed_for_this_file ) {
+ if ( $opt_break && $has_printed_something ) {
+ App::Ack::print_blank_line();
+ }
+ if ( $opt_show_filename && $opt_heading ) {
+ App::Ack::say( $display_filename );
+ }
}
+ print_line_with_context( $filename, $_, $. );
+ $has_printed_for_this_file = 1;
+ $nmatches++;
+ $max_count--;
}
- print_line_with_context( $filename, $_, $. );
- $has_printed_for_this_file = 1;
- $nmatches++;
- $max_count--;
}
+
+ $in_range = 0 if ( $using_ranges && $in_range && $opt_range_end && /$opt_range_end/o );
+
last if $max_count == 0;
}
}
- else {
+ else { # Normal search: No context, no -v, no --passthru
local $_ = undef;
my $last_match_lineno;
+ my ($using_ranges, $in_range) = range_setup();
+
while ( <$fh> ) {
chomp;
- $match_colno = undef;
- if ( /$opt_regex/o ) {
- $match_colno = $-[0] + 1;
- if ( !$has_printed_for_this_file ) {
- if ( $opt_break && $has_printed_something ) {
- App::Ack::print_blank_line();
- }
- if ( $opt_show_filename && $opt_heading ) {
- App::Ack::say( $display_filename );
- }
- }
- if ( $opt_p ) {
- if ( $last_match_lineno ) {
- if ( $. > $last_match_lineno + $opt_p ) {
+
+ $in_range = 1 if ( $using_ranges && !$in_range && $opt_range_start && /$opt_range_start/o );
+
+ if ( $in_range ) {
+ $match_colno = undef;
+ if ( /$search_re/o ) {
+ $match_colno = $-[0] + 1;
+ if ( !$has_printed_for_this_file ) {
+ if ( $opt_break && $has_printed_something ) {
App::Ack::print_blank_line();
}
+ if ( $opt_show_filename && $opt_heading ) {
+ App::Ack::say( $display_filename );
+ }
}
- elsif ( !$opt_break && $has_printed_something ) {
- App::Ack::print_blank_line();
+ if ( $opt_p ) {
+ if ( $last_match_lineno ) {
+ if ( $. > $last_match_lineno + $opt_p ) {
+ App::Ack::print_blank_line();
+ }
+ }
+ elsif ( !$opt_break && $has_printed_something ) {
+ App::Ack::print_blank_line();
+ }
}
+ s/[\r\n]+$//;
+ print_line_with_options( $filename, $_, $., ':' );
+ $has_printed_for_this_file = 1;
+ $nmatches++;
+ $max_count--;
+ $last_match_lineno = $.;
}
- s/[\r\n]+$//;
- print_line_with_options( $filename, $_, $., ':' );
- $has_printed_for_this_file = 1;
- $nmatches++;
- $max_count--;
- $last_match_lineno = $.;
}
+
+ $in_range = 0 if ( $using_ranges && $in_range && $opt_range_end && /$opt_range_end/o );
+
last if $max_count == 0;
}
}
@@ -793,33 +826,14 @@
sub print_line_with_options {
- my ( $filename, $line, $lineno, $separator ) = @_;
+ my ( $filename, $line, $lineno, $separator, $skip_coloring ) = @_;
$has_printed_something = 1;
$printed_lineno = $lineno;
my @line_parts;
- # Figure out how many spaces are used per line for the ANSI coloring.
- state $chars_used_by_coloring;
- if ( !defined($chars_used_by_coloring) ) {
- $chars_used_by_coloring = 0;
- if ( $opt_color ) {
- my $filename_uses = length( Term::ANSIColor::colored( 'x', $ENV{ACK_COLOR_FILENAME} ) ) - 1;
- my $lineno_uses = length( Term::ANSIColor::colored( 'x', $ENV{ACK_COLOR_LINENO} ) ) - 1;
- if ( $opt_heading ) {
- $chars_used_by_coloring = $lineno_uses;
- }
- else {
- $chars_used_by_coloring = $filename_uses + $lineno_uses;
- }
- if ( $opt_column ) {
- $chars_used_by_coloring += length( Term::ANSIColor::colored( 'x', $ENV{ACK_COLOR_LINENO} ) ) - 1;
- }
- }
- }
-
- if ( $opt_show_filename ) {
+ if ( $opt_show_filename && defined($filename) ) {
my $colno;
$colno = get_match_colno() if $opt_column;
if ( $opt_color ) {
@@ -829,16 +843,15 @@
}
if ( $opt_heading ) {
push @line_parts, $lineno;
- push @line_parts, $colno if $opt_column;
}
else {
push @line_parts, $filename, $lineno;
- push @line_parts, $colno if $opt_column;
}
+ push @line_parts, $colno if $opt_column;
}
if ( $opt_output ) {
- while ( $line =~ /$opt_regex/og ) {
+ while ( $line =~ /$search_re/og ) {
my $output = $opt_output;
if ( @special_vars_used_by_opt_output ) {
no strict;
@@ -859,11 +872,9 @@
my $underline = '';
# We have to do underlining before any highlighting because highlighting modifies string length.
- if ( $opt_underline ) {
- while ( $line =~ /$opt_regex/og ) {
- my $match_start = $-[0];
- next unless defined($match_start);
-
+ if ( $opt_underline && !$skip_coloring ) {
+ while ( $line =~ /$search_re/og ) {
+ my $match_start = $-[0] // next;
my $match_end = $+[0];
my $match_length = $match_end - $match_start;
last if $match_length <= 0;
@@ -874,28 +885,24 @@
$underline .= ('^' x $match_length);
}
}
- if ( $opt_color ) {
+ if ( $opt_color && !$skip_coloring ) {
my $highlighted = 0; # If highlighted, need to escape afterwards.
- while ( $line =~ /$opt_regex/og ) {
- my $match_start = $-[0];
- next unless defined($match_start);
-
+ while ( $line =~ /$search_re/og ) {
+ my $match_start = $-[0] // next;
my $match_end = $+[0];
my $match_length = $match_end - $match_start;
last if $match_length <= 0;
- if ( $opt_color ) {
- my $substring = substr( $line, $match_start, $match_length );
- my $substitution = Term::ANSIColor::colored( $substring, $ENV{ACK_COLOR_MATCH} );
+ my $substring = substr( $line, $match_start, $match_length );
+ my $substitution = Term::ANSIColor::colored( $substring, $ENV{ACK_COLOR_MATCH} );
- # Fourth argument replaces the string specified by the first three.
- substr( $line, $match_start, $match_length, $substitution );
+ # Fourth argument replaces the string specified by the first three.
+ substr( $line, $match_start, $match_length, $substitution );
- # Move the offset of where /g left off forward the number of spaces of highlighting.
- pos($line) = $match_end + (length( $substitution ) - length( $substring ));
- $highlighted = 1;
- }
+ # Move the offset of where /g left off forward the number of spaces of highlighting.
+ pos($line) = $match_end + (length( $substitution ) - length( $substring ));
+ $highlighted = 1;
}
# Reset formatting and delete everything to the end of the line.
$line .= "\e[0m\e[K" if $highlighted;
@@ -904,7 +911,20 @@
push @line_parts, $line;
App::Ack::say( join( $separator, @line_parts ) );
+ # Print the underline, if appropriate.
if ( $underline ne '' ) {
+ # Figure out how many spaces are used per line for the ANSI coloring.
+ state $chars_used_by_coloring;
+ if ( !defined($chars_used_by_coloring) ) {
+ $chars_used_by_coloring = 0;
+ if ( $opt_color ) {
+ my $len_fn = sub { length( Term::ANSIColor::colored( 'x', $ENV{$_[0]} ) ) - 1 };
+ $chars_used_by_coloring += $len_fn->('ACK_COLOR_FILENAME') unless $opt_heading;
+ $chars_used_by_coloring += $len_fn->('ACK_COLOR_LINENO');
+ $chars_used_by_coloring += $len_fn->('ACK_COLOR_COLNO') if $opt_column;
+ }
+ }
+
pop @line_parts; # Leave only the stuff on the left.
if ( @line_parts ) {
my $stuff_on_the_left = join( $separator, @line_parts );
@@ -965,44 +985,54 @@
return $match_colno;
}
-# Same as C<count_matches_in_file>, but exits as soon as there is a match.
-sub file_has_match {
- my ( $file ) = @_;
+sub count_matches_in_file {
+ my $file = shift;
+ my $bail = shift; # True if we're just checking for existence.
+
+ my $nmatches = 0;
+ my $do_scan = 1;
- my $has_match = 0;
- my $fh = $file->open();
- if ( !$fh ) {
+ if ( !$file->open() ) {
+ $do_scan = 0;
if ( $App::Ack::report_bad_filenames ) {
- App::Ack::warn( $file->name . ': ' . $! );
+ App::Ack::warn( $file->name . ": $!" );
}
}
else {
- while ( <$fh> ) {
- chomp;
- if (/$opt_regex/o xor $opt_v) {
- $has_match = 1;
- last;
+ if ( !$opt_v ) {
+ if ( !$file->may_be_present( $scan_re ) ) {
+ $do_scan = 0;
}
}
- $file->close;
}
- return $has_match;
-}
+ if ( $do_scan ) {
+ $file->reset();
-sub count_matches_in_file {
- my ( $file ) = @_;
+ my ($using_ranges, $in_range) = range_setup();
- my $nmatches = 0;
- my $fh = $file->open;
- if ( !$fh ) {
- if ( $App::Ack::report_bad_filenames ) {
- App::Ack::warn( $file->name . ': ' . $! );
+ my $fh = $file->{fh};
+ if ( $using_ranges ) {
+ while ( <$fh> ) {
+ chomp;
+ $in_range = 1 if ( !$in_range && $opt_range_start && /$opt_range_start/o );
+ if ( $in_range ) {
+ if ( /$search_re/o xor $opt_v ) {
+ ++$nmatches;
+ last if $bail;
+ }
+ }
+ $in_range = 0 if ( $in_range && $opt_range_end && /$opt_range_end/o );
+ }
}
- }
- else {
- while ( <$fh> ) {
- ++$nmatches if (/$opt_regex/o xor $opt_v);
+ else {
+ while ( <$fh> ) {
+ chomp;
+ if ( /$search_re/o xor $opt_v ) {
+ ++$nmatches;
+ last if $bail;
+ }
+ }
}
$file->close;
}
@@ -1011,6 +1041,14 @@
}
+sub range_setup {
+ my $using_ranges = $opt_range_start || $opt_range_end;
+ my $in_range = !$using_ranges || (!$opt_range_start && $opt_range_end);
+
+ return ($using_ranges, $in_range);
+}
+
+
=pod
=encoding UTF-8
@@ -1035,9 +1073,9 @@
PATTERN is a Perl regular expression. Perl regular expressions
are commonly found in other programming languages, but for the particulars
of their behavior, please consult
-L<https://perldoc.perl.org/perlreref.html|perlreref>. If you don't know
+L<perlreref|https://perldoc.perl.org/perlreref.html>. If you don't know
how to use regular expression but are interested in learning, you may
-consult L<https://perldoc.perl.org/perlretut.html|perlretut>. If you do not
+consult L<perlretut|https://perldoc.perl.org/perlretut.html>. If you do not
need or want ack to use regular expressions, please see the
C<-Q>/C<--literal> option.
@@ -1092,6 +1130,102 @@
For a complete list of directories that do not get searched, run
C<ack --dump>.
+=head1 MATCHING IN A RANGE OF LINES
+
+The C<--range-start> and C<--range-end> options let you specify ranges of
+lines to search within each file.
+
+Say you had the following file, called F<testfile>:
+
+ # This function calls print on "foo".
+ sub foo {
+ print 'foo';
+ }
+ my $print = 1;
+ sub bar {
+ print 'bar';
+ }
+ my $task = 'print';
+
+Calling C<ack print> will give us five matches:
+
+ $ ack print testfile
+ # This function calls print on "foo".
+ print 'foo';
+ my $print = 1;
+ print 'bar';
+ my $task = 'print';
+
+What if we only want to search for C<print> within the subroutines? We can
+specify ranges of lines that we want ack to search. The range starts with
+any line that matches the pattern C<^sub \w+>, and stops with any line that
+matches C<^}>.
+
+ $ ack --range-start='^sub \w+' --range-end='^}' print testfile
+ print 'foo';
+ print 'bar';
+
+Note that ack searched two ranges of lines. The listing below shows which
+lines were in a range and which were out of the range.
+
+ Out # This function calls print on "foo".
+ In sub foo {
+ In print 'foo';
+ In }
+ Out my $print = 1;
+ In sub bar {
+ In print 'bar';
+ In }
+ Out my $task = 'print';
+
+You don't have to specify both C<--range-start> and C<--range-end>. IF
+C<--range-start> is omitted, then the range runs from the first line in the
+file unitl the first line that matches C<--range-end>. Similarly, if
+C<--range-end> is omitted, the range runs from the first line matching
+C<--range-start> to the end of the file.
+
+For example, if you wanted to search all HTML files up until the first
+instance of the C<< <body> >>, you could do
+
+ ack foo --range-end='<body>'
+
+Or to search after Perl's `__DATA__` or `__END__` markers, you would do
+
+ ack pattern --range-end='^__(END|DATA)__'
+
+It's possible for a range to start and stop on the same line. For example
+
+ --range-start='<title>' --range-end='</title>'
+
+would match this line as both the start and end of the range, making a
+one-line range.
+
+ <title>Page title</title>
+
+Note that the patterns in C<--range-start> and C<--range-end> are not
+affected by options like C<-i>, C<-w> and C<-Q> that modify the behavior of
+the main pattern being matched.
+
+Again, ranges only affect where matches are looked for. Everything else in
+ack works the same way. Using C<-c> option with a range will give a count
+of all the matches that appear within those ranges. The C<-l> shows those
+files that have a match within a range, and the C<-L> option shows files
+that do not have a match within a range.
+
+The C<-v> option for negating a match works inside the range, too.
+To see lines that don't match "google" within the "<head>" section of
+your HTML files, you could do:
+
+ ack google -v --html --range-start='<head' --range-end='</head>'
+
+Specifying a range to search does not affect how matches are displayed.
+The context for a match will still be the same, and
+
+Using the context options work the same way, and will show context
+lines for matches even if the context lines fall outside the range.
+Similarly, C<--passthru> will show all lines in the file, but only show
+matches for lines within the range.
+
=head1 OPTIONS
=over 4
@@ -1474,6 +1608,11 @@
Recurse into sub-directories. This is the default and just here for
compatibility with grep. You can also use it for turning B<--no-recurse> off.
+=item B<--range-start=PATTERN>, B<--range-end=PATTERN>
+
+Specifies patterns that mark the start and end of a range. See
+L<MATCHING IN A RANGE OF LINES> for details.
+
=item B<-s>
Suppress error messages about nonexistent or unreadable files. This is taken
@@ -2114,6 +2253,7 @@
How appropriate to have I<ack>nowledgements!
Thanks to everyone who has contributed to ack in any way, including
+Salomon Smeke,
M. Scott Ford,
Anders Eriksson,
H.Merijn Brand,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/lib/App/Ack/ConfigLoader.pm new/ack-v3.1.1/lib/App/Ack/ConfigLoader.pm
--- old/ack-v3.0.3/lib/App/Ack/ConfigLoader.pm 2019-08-21 06:17:45.000000000 +0200
+++ new/ack-v3.1.1/lib/App/Ack/ConfigLoader.pm 2019-08-23 05:40:06.000000000 +0200
@@ -309,6 +309,9 @@
'P' => sub { $opt->{p} = 0 },
'Q|literal' => \$opt->{Q},
'r|R|recurse' => sub { $opt->{n} = 0 },
+ 'range-start=s' => \$opt->{range_start},
+ 'range-end=s' => \$opt->{range_end},
+ 'range-invert!' => \$opt->{range_invert},
's' => \$opt->{s},
'show-types' => \$opt->{show_types},
'S|smart-case!' => sub { my (undef,$value) = @_; $opt->{S} = $value; $opt->{i} = 0 if $value; },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/lib/App/Ack/File.pm new/ack-v3.1.1/lib/App/Ack/File.pm
--- old/ack-v3.0.3/lib/App/Ack/File.pm 2019-08-21 06:41:14.000000000 +0200
+++ new/ack-v3.1.1/lib/App/Ack/File.pm 2019-09-01 05:58:01.000000000 +0200
@@ -91,10 +91,45 @@
}
+sub may_be_present {
+ my $self = shift;
+ my $regex = shift;
+
+ # The $regex may be undef if it had a "$" in it, and is therefore unsuitable for this heuristic.
+
+ my $may_be_present = 1;
+ if ( $regex && $self->open() && -f $self->{fh} ) {
+ my $buffer;
+ my $size = 10_000_000;
+ my $rc = sysread( $self->{fh}, $buffer, $size );
+ if ( !defined($rc) ) {
+ if ( $App::Ack::report_bad_filenames ) {
+ App::Ack::warn( $self->name . ": $!" );
+ }
+ $may_be_present = 0;
+ }
+ else {
+ # If we read all 10M, then we need to scan the rest.
+ # If there are any carriage returns, our results are flaky, so scan the rest.
+ if ( ($rc == $size) || (index($buffer,"\r") >= 0) ) {
+ $may_be_present = 1;
+ }
+ else {
+ if ( $buffer !~ /$regex/o ) {
+ $may_be_present = 0;
+ }
+ }
+ }
+ }
+
+ return $may_be_present;
+}
+
+
=head2 $file->reset()
Resets the file back to the beginning. This is only called if
-C<needs_line_scan()> is true, but not always if C<needs_line_scan()>
+C<may_be_present()> is true, but not always if C<may_be_present()>
is true.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/lib/App/Ack.pm new/ack-v3.1.1/lib/App/Ack.pm
--- old/ack-v3.0.3/lib/App/Ack.pm 2019-08-21 06:42:43.000000000 +0200
+++ new/ack-v3.1.1/lib/App/Ack.pm 2019-09-01 05:58:05.000000000 +0200
@@ -17,7 +17,7 @@
our $COPYRIGHT;
BEGIN {
use version;
- $VERSION = version->declare( 'v3.0.3' ); # Check https://beyondgrep.com/ for updates
+ $VERSION = version->declare( 'v3.1.1' ); # Check https://beyondgrep.com/ for updates
$COPYRIGHT = 'Copyright 2005-2019 Andy Lester.';
}
our $STANDALONE = 0;
@@ -236,6 +236,8 @@
-v, --invert-match Invert match: select non-matching lines
-w, --word-regexp Force PATTERN to match only whole words
-Q, --literal Quote all metacharacters; PATTERN is literal
+ --range-start PATTERN Specify PATTERN as the start of a match range.
+ --range-end PATTERN Specify PATTERN as the end of a match range.
--match PATTERN Specify PATTERN explicitly. Typically omitted.
Search output:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/ack-passthru.t new/ack-v3.1.1/t/ack-passthru.t
--- old/ack-v3.0.3/t/ack-passthru.t 2019-08-21 06:41:14.000000000 +0200
+++ new/ack-v3.1.1/t/ack-passthru.t 2019-08-23 05:40:06.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use Test::More tests => 4;
+use Test::More tests => 5;
use lib 't';
use Util;
@@ -13,7 +13,10 @@
my @full_speech = <DATA>;
chomp @full_speech;
-subtest 'Normal' => sub {
+my @johnny_rebeck = read_file( 't/range/johnny-rebeck.txt' );
+chomp @johnny_rebeck;
+
+subtest 'Gettysburg without --passthru' => sub {
plan tests => 2;
my @expected = line_split( <<'HERE' );
@@ -30,7 +33,8 @@
lists_match( \@results, \@expected, 'Search for war' );
};
-subtest 'With --passthru' => sub {
+
+subtest 'Gettysburg with --passthru' => sub {
plan tests => 2;
my @expected = color_match( qr/war/, @full_speech );
@@ -43,6 +47,31 @@
};
+subtest '--passthru with/without ranges' => sub {
+ plan tests => 4;
+
+ my @args = qw( Rebeck --passthru --color t/range/johnny-rebeck.txt );
+ my @expected = color_match( qr/Rebeck/, @johnny_rebeck );
+
+ my @results = run_ack( @args );
+ lists_match( \@results, \@expected, q{Searching without a range} );
+
+ my @range_expected;
+ my $nmatches = 0;
+ for my $line ( @johnny_rebeck ) {
+ if ( $line =~ /Rebeck/ ) {
+ ++$nmatches;
+ if ( $nmatches == 2 || $nmatches == 3 ) {
+ ($line) = color_match( qr/Rebeck/, $line );
+ }
+ }
+ push( @range_expected, $line );
+ }
+ @results = run_ack( @args, '--range-start=CHORUS', '--range-end=VERSE' );
+ lists_match( \@results, \@range_expected, q{Searching with a range} );
+};
+
+
SKIP: {
skip 'Input options have not been implemented for Win32 yet', 2 if is_windows();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/config-loader.t new/ack-v3.1.1/t/config-loader.t
--- old/ack-v3.0.3/t/config-loader.t 2019-08-21 06:17:45.000000000 +0200
+++ new/ack-v3.1.1/t/config-loader.t 2019-08-23 05:40:06.000000000 +0200
@@ -13,35 +13,38 @@
delete @ENV{qw( PAGER ACK_PAGER ACK_PAGER_COLOR )};
my %defaults = (
- 'break' => undef,
- c => undef,
- color => undef,
- column => undef,
- f => undef,
- files_from => undef,
- filters => [ App::Ack::Filter::Default->new ],
- follow => undef,
- g => undef,
- h => undef,
- H => undef,
- heading => undef,
- l => undef,
- L => undef,
- m => undef,
- n => undef,
- output => undef,
- p => undef,
- pager => undef,
- passthru => undef,
- print0 => undef,
- Q => undef,
- regex => undef,
- s => undef,
- show_types => undef,
- sort_files => undef,
- underline => undef,
- v => undef,
- w => undef,
+ 'break' => undef,
+ c => undef,
+ color => undef,
+ column => undef,
+ f => undef,
+ files_from => undef,
+ filters => [ App::Ack::Filter::Default->new ],
+ follow => undef,
+ g => undef,
+ h => undef,
+ H => undef,
+ heading => undef,
+ l => undef,
+ L => undef,
+ m => undef,
+ n => undef,
+ output => undef,
+ p => undef,
+ pager => undef,
+ passthru => undef,
+ print0 => undef,
+ Q => undef,
+ range_start => undef,
+ range_end => undef,
+ range_invert => undef,
+ regex => undef,
+ s => undef,
+ show_types => undef,
+ sort_files => undef,
+ underline => undef,
+ v => undef,
+ w => undef,
);
test_loader(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/issue491.t new/ack-v3.1.1/t/issue491.t
--- old/ack-v3.0.3/t/issue491.t 2019-05-20 03:39:43.000000000 +0200
+++ new/ack-v3.1.1/t/issue491.t 2019-09-01 05:58:01.000000000 +0200
@@ -1,6 +1,25 @@
#!perl -T
-# https://github.com/beyondgrep/ack2/issues/491
+=pod
+
+This test checks for problems where line endings aren't handled correctly
+by our pre-scanning of the file.
+
+ # https://github.com/beyondgrep/ack2/issues/491
+ v2.14 with "-l" not emitting all matching files.
+
+ > echo ' ' >space-newline.txt
+ > echo $' \n' >space-newline-newline.txt
+ > ack ' $' space-newline*.txt
+ space-newline-newline.txt
+ 1:
+
+ space-newline.txt
+ 1:
+ > ack -l ' $' space-newline*.txt
+ space-newline.txt
+
+=cut
use strict;
use warnings;
@@ -16,22 +35,58 @@
my $wd = getcwd_clean();
safe_chdir( $dir->dirname );
-write_file('space-newline.txt', " \n");
-write_file('space-newline-newline.txt', " \n\n");
-
-my @results = run_ack('-l', ' $', 'space-newline.txt', 'space-newline-newline.txt');
-sets_match(\@results, [
- 'space-newline.txt',
- 'space-newline-newline.txt',
-], 'both files should be in -l output');
-
-@results = run_ack('-c', ' $', 'space-newline.txt', 'space-newline-newline.txt');
-
-sets_match(\@results, [
- 'space-newline.txt:1',
- 'space-newline-newline.txt:1',
-], 'both files should be in -c output with correct counts');
+my %matching_files = (
+ 'space-newline.txt' => " \n",
+ 'space-newline-space.txt' => " \n\t",
+ 'space-newline-newline.txt' => " \n\n",
+ 'space-newline-and-more.txt' => "this\n \nthat\n",
+ 'words-and-spaces.txt' => "this \nand that\n",
+);
+my %nonmatching_files = (
+ 'tabby.txt' => "\t\n",
+ 'also-tabby.txt' => " \t\n",
+);
+
+my %all_files = ( %matching_files, %nonmatching_files );
+while ( my ($file,$content) = each %all_files ) {
+ write_file( $file, $content );
+}
+my @all_files = keys %all_files;
+my @matching_files = keys %matching_files;
+my @nonmatching_files = keys %nonmatching_files;
+
+subtest 'Match normally' => sub {
+ plan tests => 2;
+
+ my @results = run_ack( ' $', @all_files );
+ my @files_matched = @results;
+ s/:.*// for @files_matched;
+ sets_match( \@files_matched, [ @matching_files ], 'Found all the matching files in results' );
+};
+
+subtest 'Match with -l' => sub {
+ plan tests => 2;
+
+ my @results = run_ack( '-l', ' $', @all_files );
+ sets_match( \@results, [ @matching_files ], 'Matching files should be in -l output' );
+};
+
+subtest 'Non-match with -L' => sub {
+ plan tests => 2;
+
+ my @results = run_ack( '-L', ' $', @all_files );
+ sets_match( \@results, [ @nonmatching_files ], 'Nonmatching files should be in -L output' );
+};
+
+subtest 'Count with -c' => sub {
+ plan tests => 2;
+
+ my @results = run_ack( '-c', ' $', @all_files );
+ sets_match( \@results, [
+ map { "$_:" . ( $matching_files{$_} ? 1 : 0 ) } @all_files
+ ], 'Matching files should be in -c output with correct counts' );
+};
safe_chdir( $wd ); # Get out of temp directory so it can be cleaned up.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/lowercase.t new/ack-v3.1.1/t/lowercase.t
--- old/ack-v3.0.3/t/lowercase.t 2019-08-21 06:41:14.000000000 +0200
+++ new/ack-v3.1.1/t/lowercase.t 2019-08-23 05:40:06.000000000 +0200
@@ -4,7 +4,7 @@
use strict;
use 5.010;
-use Test::More tests => 2;;
+use Test::More tests => 2;
use App::Ack;
@@ -107,11 +107,5 @@
sub _big_split {
my $str = shift;
- my @list = split( /\n/, $str );
-
- @list = grep /./, @list;
-
- @list = grep !/^#/, @list;
-
- return @list;
+ return grep { /./ && !/^#/ } split( /\n/, $str );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/range/america-the-beautiful.html new/ack-v3.1.1/t/range/america-the-beautiful.html
--- old/ack-v3.0.3/t/range/america-the-beautiful.html 1970-01-01 01:00:00.000000000 +0100
+++ new/ack-v3.1.1/t/range/america-the-beautiful.html 2019-08-23 05:40:06.000000000 +0200
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>America the Beautiful</title>
+ </head>
+ <body>
+ <h1>America the Beautiful</h1>
+
+ <div id="verse-1">
+ O beautiful for spacious skies,
+ For amber waves of grain,
+ For purple mountain majesties
+ Above the fruited plain!
+ America! America!
+ God shed His grace on thee
+ And crown thy good with brotherhood
+ From sea to shining sea!
+ </div>
+
+ <div id="verse-2">
+ O beautiful for pilgrim feet,
+ Whose stern, impassioned stress
+ A thoroughfare for freedom beat
+ Across the wilderness!
+ America! America!
+ God mend thine every flaw,
+ Confirm thy soul in self-control,
+ Thy liberty in law!
+ </div>
+
+ <div id="verse-3">
+ O beautiful for heroes proved
+ In liberating strife,
+ Who more than self their country loved
+ And mercy more than life!
+ America! America!
+ May God thy gold refine,
+ Till all success be nobleness,
+ And every gain divine!
+ </div>
+
+ <div id="verse-4">
+ O beautiful for patriot dream
+ That sees beyond the years
+ Thine alabaster cities gleam
+ Undimmed by human tears!
+ America! America!
+ God shed His grace on thee
+ And crown thy good with brotherhood
+ From sea to shining sea!
+ </div>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/range/anchors-aweigh.html new/ack-v3.1.1/t/range/anchors-aweigh.html
--- old/ack-v3.0.3/t/range/anchors-aweigh.html 1970-01-01 01:00:00.000000000 +0100
+++ new/ack-v3.1.1/t/range/anchors-aweigh.html 2019-08-23 05:40:06.000000000 +0200
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Anchors Aweigh</title>>
+ </head>
+ <body>
+ <h1>Anchors Aweigh</h1>
+
+ <div id="verse-1">
+ Stand Navy out to sea, fight our battle cry!
+ We'll never change our course so vicious foes steer shy-y-y-y!
+ Roll out the TNT, anchors aweigh!
+ Sail on to victory, and sink their bones to Davy Jones, hooray!
+ </div>
+
+ <div id="verse-2">
+ Anchors Aweigh, my boys, Anchors Aweigh!
+ Farewell to foreign Shores, we sail at break of day-ay-ay-ay;
+ Through our last night ashore, drink to the foam,
+ Until we meet once more, here's wishing you a happy voyage home!
+ </div>
+
+ <div id="verse-3">
+ Blue of the mighty deep, Gold of God's great sun;
+ Let these our colors be, Till All of time be done-n-n-ne;
+ On seven seas we learn, Navy's stern call:
+ Faith, courage, service true, With honor over, honor over all.
+ </div>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/range/johnny-rebeck.txt new/ack-v3.1.1/t/range/johnny-rebeck.txt
--- old/ack-v3.0.3/t/range/johnny-rebeck.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/ack-v3.1.1/t/range/johnny-rebeck.txt 2019-08-23 05:40:06.000000000 +0200
@@ -0,0 +1,29 @@
+VERSE
+There once was a little Dutchman
+His name was Johnny Rebeck
+He was a dealer in sauerkraut
+And sausages and speck
+He was the finest Dutchman
+The best you've ever seen
+'til one day he invented
+A great big sausage machine
+Bang!
+
+CHORUS
+Oh, Mr. Johnny Rebeck what makes you be so mean?
+I told you you'd be sorry for inventing that machine
+Now all the neighbors' cats and dogs will nevermore be seen
+They'll all be ground to sausages in Johnny Rebeck's machine.
+Bang!
+
+VERSE
+One night the darn thing busted
+The darn thing wouldn't go
+So Johnny Rebeck crawled inside
+To see what made it so
+That night his wife had a nightmare
+And walking in her sleep
+She turned the crank
+And gave it a yank
+Pooooor Johnny Rebeck was meat
+Bang!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/range/rangefile.pm new/ack-v3.1.1/t/range/rangefile.pm
--- old/ack-v3.0.3/t/range/rangefile.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/ack-v3.1.1/t/range/rangefile.pm 2019-08-23 05:40:06.000000000 +0200
@@ -0,0 +1,25 @@
+package RangeFile;
+
+# For testing the range function.
+
+use warnings;
+use strict;
+use 5.010;
+
+# This function calls print on "foo".
+sub foo {
+ print 'foo';
+ return 1;
+}
+
+my $print = 1;
+my $update = 5;
+
+sub bar {
+ print 'bar';
+ return 2;
+}
+my $task = 'print';
+$update = 12;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/t/range/stars-and-stripes-forever.html new/ack-v3.1.1/t/range/stars-and-stripes-forever.html
--- old/ack-v3.0.3/t/range/stars-and-stripes-forever.html 1970-01-01 01:00:00.000000000 +0100
+++ new/ack-v3.1.1/t/range/stars-and-stripes-forever.html 2019-08-23 05:40:06.000000000 +0200
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>The Stars and Stripes Forever</title>
+ </head>
+ <body>
+ <h1>The Stars and Stripes Forever</h1>
+
+ <h2>By John Philip Sousa</h2>
+
+ <div id="first-strain">
+ Let martial note in triumph float
+ And liberty extend its mighty hand
+ A flag appears 'mid thunderous cheers,
+ The banner of the Western land.
+ The emblem of the brave and true
+ Its folds protect no tyrant crew;
+ The red and white and starry blue
+ Is freedom's shield and hope.
+
+ Let eagle shriek from lofty peak
+ The never-ending watchword of our land;
+ Let summer breeze waft through the trees
+ The echo of the chorus grand.
+ Sing out for liberty and light,
+ Sing out for freedom and the right.
+ Sing out for Union and its might,
+ O patriotic sons.
+ </div>
+
+ <div id="second-strain">
+ Other nations may deem their flags the best
+ And cheer them with fervid elation
+ But the flag of the North and South and West
+ Is the flag of flags, the flag of Freedom's nation.
+ </div>
+
+ <div id="trio">
+ Hurrah for the flag of the free!
+ May it wave as our standard forever,
+ The gem of the land and the sea,
+ The banner of the right.
+ Let despots remember the day
+ When our fathers with mighty endeavor
+ Proclaimed as they marched to the fray
+ That by their might and by their right
+ It waves forever.
+ </div>
+
+ <div id="grandioso">
+ Hurrah for the flag of the free.
+ May it wave as our standard forever
+ The gem of the land and the sea,
+ The banner of the right.
+ Let despots remember the day
+ When our fathers with mighty endeavor
+ Proclaimed as they marched to the fray,
+ That by their might and by their right
+ It waves forever.
+ </div>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.3/xt/coding-standards.t new/ack-v3.1.1/xt/coding-standards.t
--- old/ack-v3.0.3/xt/coding-standards.t 2019-07-05 05:21:07.000000000 +0200
+++ new/ack-v3.1.1/xt/coding-standards.t 2019-08-23 05:40:06.000000000 +0200
@@ -24,7 +24,7 @@
push( @files, @these_files );
}
-@files = grep !/lowercase.t/, @files; # lowercase.t has hi-bit and it's OK.
+@files = grep { !/lowercase.t/ } @files; # lowercase.t has hi-bit and it's OK.
plan tests => scalar @files;
1
0
Hello community,
here is the log from the commit of package openblas for openSUSE:Factory checked in at 2019-09-30 16:01:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openblas (Old)
and /work/SRC/openSUSE:Factory/.openblas.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openblas"
Mon Sep 30 16:01:36 2019 rev:28 rq:734000 version:0.3.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/openblas/openblas.changes 2019-08-16 15:27:15.234012221 +0200
+++ /work/SRC/openSUSE:Factory/.openblas.new.2352/openblas.changes 2019-09-30 16:01:46.648836829 +0200
@@ -4 +4 @@
-- Update to version 0.3.7
+- Update to version 0.3.7 (jsc#SLE-8492)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Hello community,
here is the log from the commit of package perl-HTML-Scrubber for openSUSE:Factory checked in at 2019-09-30 16:01:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-HTML-Scrubber (Old)
and /work/SRC/openSUSE:Factory/.perl-HTML-Scrubber.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-HTML-Scrubber"
Mon Sep 30 16:01:33 2019 rev:17 rq:733998 version:0.19
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-HTML-Scrubber/perl-HTML-Scrubber.changes 2015-10-20 00:04:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-HTML-Scrubber.new.2352/perl-HTML-Scrubber.changes 2019-09-30 16:01:45.336840320 +0200
@@ -1,0 +2,26 @@
+Thu Sep 26 08:24:48 UTC 2019 - <timueller+perl(a)suse.de>
+
+- updated to 0.19
+ see /usr/share/doc/packages/perl-HTML-Scrubber/Changes
+
+ 0.19 2019-09-24 13:26:46+01:00 Europe/London
+ - Made List::Util import explicitly require version 1.33 (for 'any')
+
+ 0.18 2019-09-22 12:10:47+01:00 Europe/London
+ - Reduced standard build dependancies (removed author deps)
+
+ 0.17 2017-06-27 14:03:47+01:00 Europe/London
+
+ 0.16 2017-06-25 20:30:15+01:00 Europe/London (TRIAL RELEASE)
+ - Add missing testing prereqs (github pr#9 paultcochrane)
+ - Extend list of Perls in Travis config (github pr#10 paultcochrane)
+ - Avoid pod-spell test failure from ABSTRACT text (github pr#11 paultcochrane)
+ - Minor documentation fixes (github pr#12 paultcochrane)
+ - Purge trailing whitespace in Travis config (github pr#13 paultcochrane)
+ - Fix perlcritic issues (github pr#14 paultcochrane)
+ - Fix stale URLs (github pr#15 paultcochrane)
+ - Remove invalid end tags for empty elements (RT120384)
+ (github pr#16 paultcochrane)
+ - Rework Dist::Zilla config to be more portable
+
+-------------------------------------------------------------------
Old:
----
HTML-Scrubber-0.15.tar.gz
New:
----
HTML-Scrubber-0.19.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-HTML-Scrubber.spec ++++++
--- /var/tmp/diff_new_pack.x34aoz/_old 2019-09-30 16:01:46.440837382 +0200
+++ /var/tmp/diff_new_pack.x34aoz/_new 2019-09-30 16:01:46.440837382 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-HTML-Scrubber
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,19 +12,19 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-HTML-Scrubber
-Version: 0.15
+Version: 0.19
Release: 0
%define cpan_name HTML-Scrubber
-Summary: Perl extension for scrubbing/sanitizing html
-License: Artistic-1.0 or GPL-1.0+
+Summary: Perl extension for scrubbing/sanitizing HTML
+License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/HTML-Scrubber/
-Source0: http://www.cpan.org/authors/id/N/NI/NIGELM/%{cpan_name}-%{version}.tar.gz
+Url: https://metacpan.org/release/%{cpan_name}
+Source0: https://cpan.metacpan.org/authors/id/N/NI/NIGELM/%{cpan_name}-%{version}.ta…
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -32,14 +32,13 @@
BuildRequires: perl-macros
BuildRequires: perl(HTML::Entities)
BuildRequires: perl(HTML::Parser) >= 3.47
-BuildRequires: perl(Module::Build) >= 0.280000
-BuildRequires: perl(Test::CPAN::Meta)
-BuildRequires: perl(Test::EOL)
+BuildRequires: perl(List::Util) >= 1.33
+BuildRequires: perl(Test::Differences)
BuildRequires: perl(Test::Memory::Cycle)
-BuildRequires: perl(Test::More) >= 0.94
-BuildRequires: perl(Test::NoTabs)
+BuildRequires: perl(Test::More) >= 0.88
Requires: perl(HTML::Entities)
Requires: perl(HTML::Parser) >= 3.47
+Requires: perl(List::Util) >= 1.33
%{perl_requires}
%description
@@ -54,18 +53,20 @@
%setup -q -n %{cpan_name}-%{version}
%build
-%{__perl} Build.PL installdirs=vendor
-./Build build flags=%{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%check
-./Build test
+make test
%install
-./Build install destdir=%{buildroot} create_packlist=0
+%perl_make_install
+%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes LICENSE README
+%doc Changes README
+%license LICENSE
%changelog
++++++ HTML-Scrubber-0.15.tar.gz -> HTML-Scrubber-0.19.tar.gz ++++++
++++ 4544 lines of diff (skipped)
1
0