diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /dev-util/watchman | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-util/watchman')
-rw-r--r-- | dev-util/watchman/Manifest | 5 | ||||
-rw-r--r-- | dev-util/watchman/files/4.9.0-changes.patch | 80 | ||||
-rw-r--r-- | dev-util/watchman/files/4.9.0-python3.patch | 65 | ||||
-rw-r--r-- | dev-util/watchman/metadata.xml | 22 | ||||
-rw-r--r-- | dev-util/watchman/watchman-4.9.0.ebuild | 61 |
5 files changed, 233 insertions, 0 deletions
diff --git a/dev-util/watchman/Manifest b/dev-util/watchman/Manifest new file mode 100644 index 000000000000..51aee9552c77 --- /dev/null +++ b/dev-util/watchman/Manifest @@ -0,0 +1,5 @@ +AUX 4.9.0-changes.patch 2974 BLAKE2B 71163fce5ec3f62e174810f485a43fe0a329757004cd32050a949d6c809c156774b3b95ddd43b45bcb95e02eebc94f551de498d0bf856c90483205e907980d64 SHA512 6700d62de75063db08f23799b05ef867ae3f9b608f9b9774846cb98c2ad651ce22786496ccaa15ef2c4b923cc51adb13a4c2af0ead0f1672ce990ca7e8560329 +AUX 4.9.0-python3.patch 2402 BLAKE2B 9378a4613048891e6d4b461a9442ff7585dc9f137c03de417c62fad5edb78f138e417e35abe9283f33bcc7da884a2b2e885ebfcfa638c183c1521660af97c300 SHA512 68490ac9eaed522f81e51bc1a2bd98f93282f929587c8e865baa519faecc921192f9e751a5ef8099a5ab6e1e5523855ba4bf8aadb2656506e632cb97eff16839 +DIST watchman-4.9.0.tar.gz 3508045 BLAKE2B 413b779f02736442c371af1d9e18e5c84f05f9e9465c114dc4bdf79cbc1d823f1ad3167abef22818652a924ca2cb563c54d18f7599b987f579655d8a2b82162a SHA512 3c1222ba41383b26c2c427415e75abdb4bef5a95001438c3debe7cf3ca654944ecf08e432c5ad0aefa2a6554ae73ff0f6995e7f4ee61cdb2cde80f8378d3a704 +EBUILD watchman-4.9.0.ebuild 1162 BLAKE2B 1678ab89ab182df69bb0614612265cf8db30db118890524199ca0bb1b375c5dcc85172a43a55730e4255c017e77c3d1ba8689af2efaf5d47389e7d6ac7a969be SHA512 e87429fd22a2e932df408ec7e3582deb4ac14b948c330b3944a318b9fccf80aa84fd1994e41f3d5d8b596ff63de863d6d3fe2568ae40bac0d794c7ded6a2a1dc +MISC metadata.xml 672 BLAKE2B 96db77114305163124079f89946b3824baad223e6a3e64c820904d0c9f05addec99e746e22a76f22eff7d4e533788bdb0a39d7ddd566f012be4f8fd37b8a68c7 SHA512 3b0a92388bc934b430a7367760373d033975d47a3a96efec80eae5570acd10648f93e8ce85dff74d51f33a08faa53161bb7c90365575e01284211e3261382a78 diff --git a/dev-util/watchman/files/4.9.0-changes.patch b/dev-util/watchman/files/4.9.0-changes.patch new file mode 100644 index 000000000000..4625bc815539 --- /dev/null +++ b/dev-util/watchman/files/4.9.0-changes.patch @@ -0,0 +1,80 @@ +diff -ru old/python/bin/watchman-make new/python/bin/watchman-make +--- old/python/bin/watchman-make 2020-09-06 11:36:12.202435809 +0200 ++++ new/python/bin/watchman-make 2020-09-06 11:36:14.105482419 +0200 +@@ -55,7 +55,14 @@ + data = client.getSubscription(self.name) + if data is None: + return +- self.triggered = True ++ for item in data: ++ # We only want to trigger if files matched; ++ # updates without a files list are metadata ++ # such as state-enter/leave notices so we skip them ++ if 'files' in item: ++ self.triggered = True ++ if 'canceled' in item: ++ raise RuntimeError('Watch was cancelled') + + def execute(self): + if not self.triggered: +@@ -165,6 +172,11 @@ + parser.add_argument('-r', '--run', type=str, help=""" + The script that should be run when changes are detected + """) ++parser.add_argument('--connect-timeout', type=float, default=600, help=""" ++Initial watchman client connection timeout. It should be sufficiently large to ++prevent timeouts when watchman is busy (eg. performing a crawl). The default ++value is 600 seconds. ++""") + args = parser.parse_args() + + if args.target is None and args.run is None: +@@ -187,7 +199,7 @@ + sys.exit(1) + + targets = {} +-client = pywatchman.client(timeout=600) ++client = pywatchman.client(timeout=args.connect_timeout) + try: + client.capabilityCheck( + required=['cmd-watch-project', 'wildmatch']) +diff -ru old/python/bin/watchman-wait new/python/bin/watchman-wait +--- old/python/bin/watchman-wait 2020-09-06 11:36:12.202435809 +0200 ++++ new/python/bin/watchman-wait 2020-09-06 11:36:14.106482444 +0200 +@@ -76,6 +76,11 @@ + Exit if no events trigger within the specified timeout. If timeout is + zero (the default) then keep running indefinitely. + """) ++parser.add_argument('--connect-timeout', type=float, default=100, help=""" ++Initial watchman client connection timeout. It should be sufficiently large to ++prevent timeouts when watchman is busy (eg. performing a crawl). The default ++value is 100 seconds. ++""") + args = parser.parse_args() + + +@@ -141,7 +146,7 @@ + def formatField(self, fname, val): + if fname == 'name': + # Respect the --relative path printing option +- return os.path.relpath(val, args.relative) ++ return os.path.relpath(os.path.join(self.name, val), args.relative) + # otherwise just make sure it's a string so that we can join it + return str(val) + +@@ -173,12 +178,13 @@ + for path in args.path: + sub = Subscription(path) + ++# and start up the client + subscriptions ++client = pywatchman.client(timeout=args.connect_timeout) ++ + deadline = None + if args.timeout > 0: + deadline = time.time() + args.timeout + +-# and start up the client + subscriptions +-client = pywatchman.client() + try: + client.capabilityCheck( + required=['term-dirname', 'cmd-watch-project', 'wildmatch']) diff --git a/dev-util/watchman/files/4.9.0-python3.patch b/dev-util/watchman/files/4.9.0-python3.patch new file mode 100644 index 000000000000..5b416f24ae46 --- /dev/null +++ b/dev-util/watchman/files/4.9.0-python3.patch @@ -0,0 +1,65 @@ +diff -ru backup/old/python/bin/watchman-make old/python/bin/watchman-make +--- backup/old/python/bin/watchman-make 2020-09-06 11:33:34.449582111 +0200 ++++ old/python/bin/watchman-make 2020-09-06 11:33:43.473801969 +0200 +@@ -100,7 +100,7 @@ + targets = [] + setattr(namespace, self.dest, targets) + +- if isinstance(values, basestring): ++ if isinstance(values, (str, bytes)): + values = [values] + + if namespace.pattern is None or len(namespace.pattern) == 0: +@@ -209,7 +209,7 @@ + client.setTimeout(600) + + result = client.receive() +- for _, t in targets.iteritems(): ++ for _, t in targets.items(): + t.consumeEvents(client) + + # Now we wait for events to settle +@@ -218,7 +218,7 @@ + while not settled: + try: + result = client.receive() +- for _, t in targets.iteritems(): ++ for _, t in targets.items(): + t.consumeEvents(client) + except pywatchman.SocketTimeout as ex: + # Our short settle timeout hit, so we're now settled +@@ -226,7 +226,7 @@ + break + + # Now we can work on executing the targets +- for _, t in targets.iteritems(): ++ for _, t in targets.items(): + t.execute() + + # Print this at the bottom of the loop rather than the top +@@ -249,4 +249,3 @@ + except KeyboardInterrupt: + # suppress ugly stack trace when they Ctrl-C + break +- +diff -ru backup/old/python/bin/watchman-wait old/python/bin/watchman-wait +--- backup/old/python/bin/watchman-wait 2020-09-06 11:33:34.449582111 +0200 ++++ old/python/bin/watchman-wait 2020-09-06 11:33:43.473801969 +0200 +@@ -182,7 +182,7 @@ + try: + client.capabilityCheck( + required=['term-dirname', 'cmd-watch-project', 'wildmatch']) +- for _, sub in subscriptions.iteritems(): ++ for _, sub in subscriptions.items(): + sub.start(client) + + except pywatchman.CommandError as ex: +@@ -200,7 +200,7 @@ + # the client object will accumulate all subscription results + # over time, so we ask it to remove and return those values + # for each of the subscriptions +- for _, sub in subscriptions.iteritems(): ++ for _, sub in subscriptions.items(): + sub.emit(client) + + except pywatchman.SocketTimeout as ex: diff --git a/dev-util/watchman/metadata.xml b/dev-util/watchman/metadata.xml new file mode 100644 index 000000000000..0dc2b75aa0cb --- /dev/null +++ b/dev-util/watchman/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>monsieurp@gentoo.org</email> + <name>Patrice Clement</name> + </maintainer> + <maintainer type="person"> + <email>adrian@planetcoding.net</email> + <name>Adrian Moennich</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">facebook/watchman</remote-id> + </upstream> + <use> + <flag name="python">Install pywatchman bindings and the watchman-{wait,make} utils</flag> + </use> +</pkgmetadata> diff --git a/dev-util/watchman/watchman-4.9.0.ebuild b/dev-util/watchman/watchman-4.9.0.ebuild new file mode 100644 index 000000000000..ca3006fbc0c6 --- /dev/null +++ b/dev-util/watchman/watchman-4.9.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit autotools distutils-r1 + +COMMIT="8e0ba724d85de2c89f48161807e878667b9ed089" # v4.9.0 tag +DESCRIPTION="A file watching service" +HOMEPAGE="https://facebook.github.io/watchman/" +SRC_URI="https://github.com/facebook/watchman/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="pcre python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="pcre? ( dev-libs/libpcre ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PV}-python3.patch" + "${FILESDIR}/${PV}-changes.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + econf \ + --enable-lenient \ + --disable-statedir \ + --without-python \ + $(use_with pcre) +} + +src_compile() { + default + + if use python; then + pushd python >/dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +src_install() { + default + + if use python; then + pushd python >/dev/null || die + distutils-r1_src_install + popd >/dev/null || die + fi +} |