summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2023-03-12 00:25:08 +0100
committerCarl Smedstad2023-03-12 02:15:25 +0100
commit56c19c61cd92ca18f7c3a5b4e598fd7ce05357c1 (patch)
tree7c2a9f3badc244923d62120254b8a3ccecb668c6
parentca8dffbadffa0686222d8c1fff6b37130094c19b (diff)
downloadaur-56c19c61cd92ca18f7c3a5b4e598fd7ce05357c1.tar.gz
Take over maintenance and publish version 2023.03.06.00
Inspired by https://github.com/Xinkai/watchman-PKGBUILDs.
-rw-r--r--.SRCINFO51
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD107
-rw-r--r--autogen.patch11
-rw-r--r--python3.patch51
-rw-r--r--watchman.conf1
-rw-r--r--watchman.install11
-rw-r--r--watchman.json1
-rw-r--r--watchman.service13
-rw-r--r--watchman.socket11
-rw-r--r--watchman.tmpfiles1
11 files changed, 142 insertions, 126 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dffe16ee96ac..673d5cfb3ceb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,39 @@
pkgbase = watchman
- pkgdesc = An inotify-based file watching and job triggering command line utility
- pkgver = 4.9.0
- pkgrel = 6
- url = https://facebook.github.io/watchman/
- arch = i686
+ pkgdesc = Watches files and records, or triggers actions, when they change
+ pkgver = 2023.03.06.00
+ pkgrel = 1
+ url = https://github.com/facebook/watchman
arch = x86_64
- license = Apache
- depends = pcre
- depends = systemd
+ license = MIT
+ makedepends = boost
+ makedepends = cmake
+ makedepends = edencommon
+ makedepends = gmock
+ makedepends = rust
+ depends = boost-libs
+ depends = double-conversion
+ depends = fmt
+ depends = google-glog
+ depends = libaio
+ depends = libdwarf
+ depends = libsodium
+ depends = libunwind
+ depends = liburing
+ depends = pcre2
depends = python
- source = watchman-4.9.0.tar.gz::https://github.com/facebook/watchman/archive/v4.9.0.tar.gz
- source = watchman.tmpfiles
- source = python3.patch
- source = autogen.patch
- sha256sums = 1f6402dc70b1d056fffc3748f2fdcecff730d8843bb6936de395b3443ce05322
- sha256sums = 2b061865e10578a0477b9c7991a00594bc839c846b98896e93c75743dbf6a379
- sha256sums = 8aa32e37aef329e0873425d25e370d25b7aa0731f104a645737f1111f64a5a9e
- sha256sums = 1a86a52a434c034b4478af88f2789a1791e826f9ca4f1e8b1c421923b2dc2447
+ depends = snappy
+ backup = etc/watchman.json
+ source = watchman-2023.03.06.00.tar.gz::https://github.com/facebook/watchman/archive/refs/tags/v2023.03.06.00.tar.gz
+ source = https://src.fedoraproject.org/rpms/watchman/raw/a446ccc61c73d74053792656c3832f93bf0fe262/f/watchman-destdir.patch
+ source = watchman.conf
+ source = watchman.json
+ source = watchman.service
+ source = watchman.socket
+ sha256sums = 5e9fcb2d8293e89d66ef0585a20bd20d786bb79abba61ebced260d5f4168d223
+ sha256sums = d40feab6aa7dc6522c648660e88642fdf721ee1f9d80c23f6891a6381067a38b
+ sha256sums = 3ebc93cb91ec9b9603969e222fd3ffd9baa4a1d07a7b3bd7aabf956ec2e177c8
+ sha256sums = ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356
+ sha256sums = 5b4b032b68d87d648e268c5c08b4d56993d5c1a661e3925b39f54bdef2dfbc42
+ sha256sums = 853457ad70492fec9d7d020b9e067e2aec2ca419c0a5cddd5d93c5fab354c87a
pkgname = watchman
-
diff --git a/.gitignore b/.gitignore
index 087121a3f372..ad5a160e0b45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,10 @@
*
-
+!.gitignore
!PKGBUILD
!.SRCINFO
-!watchman.tmpfiles
+!watchman.conf
!watchman.install
-!.gitignore
-!*.patch \ No newline at end of file
+!watchman.json.default
+!watchman.service
+!watchman.socket
+!watchman.tmpfiles
diff --git a/PKGBUILD b/PKGBUILD
index 77e0f7d8f32c..d571beb1a450 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,95 @@
-# Maintainer: Xuanrui Qi <me@xuanruiqi.com>
+# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
+# Contributor: Xuanrui Qi <me@xuanruiqi.com>
# Contributor: Jean Lucas <jean@4ray.co>
# Contributor: José Luis Lafuente <jl@lafuente.me>
# Contributor: Michael Louis Thaler <michael.louis.thaler@gmail.com>
pkgname=watchman
-pkgver=4.9.0
-pkgrel=6
-pkgdesc="An inotify-based file watching and job triggering command line utility"
-url="https://facebook.github.io/watchman/"
-arch=('i686' 'x86_64')
-license=('Apache')
-depends=('pcre' 'systemd' 'python')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/facebook/watchman/archive/v${pkgver}.tar.gz"
- "${pkgname}.tmpfiles" "python3.patch" "autogen.patch")
-sha256sums=('1f6402dc70b1d056fffc3748f2fdcecff730d8843bb6936de395b3443ce05322'
- '2b061865e10578a0477b9c7991a00594bc839c846b98896e93c75743dbf6a379'
- '8aa32e37aef329e0873425d25e370d25b7aa0731f104a645737f1111f64a5a9e'
- '1a86a52a434c034b4478af88f2789a1791e826f9ca4f1e8b1c421923b2dc2447')
+pkgver=2023.03.06.00
+pkgrel=1
+pkgdesc="Watches files and records, or triggers actions, when they change"
+url="https://github.com/facebook/watchman"
+arch=(x86_64)
+license=(MIT)
+makedepends=(
+ boost
+ cmake
+ edencommon
+ gmock
+ rust
+)
+depends=(
+ boost-libs
+ double-conversion
+ fmt
+ google-glog
+ libaio
+ libdwarf
+ libsodium
+ libunwind
+ liburing
+ pcre2
+ python
+ snappy
+)
+backup=(etc/watchman.json)
+
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
+ "https://src.fedoraproject.org/rpms/watchman/raw/a446ccc61c73d74053792656c3832f93bf0fe262/f/watchman-destdir.patch"
+ "watchman.conf"
+ "watchman.json"
+ "watchman.service"
+ "watchman.socket"
+)
+sha256sums=(
+ '5e9fcb2d8293e89d66ef0585a20bd20d786bb79abba61ebced260d5f4168d223'
+ 'd40feab6aa7dc6522c648660e88642fdf721ee1f9d80c23f6891a6381067a38b'
+ '3ebc93cb91ec9b9603969e222fd3ffd9baa4a1d07a7b3bd7aabf956ec2e177c8'
+ 'ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356'
+ '5b4b032b68d87d648e268c5c08b4d56993d5c1a661e3925b39f54bdef2dfbc42'
+ '853457ad70492fec9d7d020b9e067e2aec2ca419c0a5cddd5d93c5fab354c87a'
+)
+
+_archive="$pkgname-$pkgver"
prepare() {
- cd ${pkgname}-${pkgver}
- patch -Np1 -i "${srcdir}"/autogen.patch
- autoupdate
- ./autogen.sh
+ cd "$_archive"
- patch -Np1 -i "${srcdir}"/python3.patch
+ patch --forward --strip=1 --ignore-whitespace --fuzz=3 --input="$srcdir/watchman-destdir.patch"
}
build() {
- cd ${pkgname}-${pkgver}
- ./configure --prefix=/usr --disable-statedir --enable-lenient
- make
+ cd "$_archive"
+
+ cmake -S . -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev \
+ -DCMAKE_LIBRARY_ARCHITECTURE=x86_64_v3 \
+ -DWATCHMAN_STATE_DIR=/var/run/watchman \
+ -DUSE_SYS_PYTHON=ON \
+ -DWATCHMAN_VERSION_OVERRIDE="$pkgver" \
+ -DENABLE_EDEN_SUPPORT=OFF
+ cmake --build build
}
check() {
- cd ${pkgname}-${pkgver}
- # TODO: fix segfault in test
- #make check
+ cd "$_archive"
+
+ ctest --test-dir build --output-on-failure \
+ -E "(test_full_capability_set|test_fstype)"
}
package() {
- cd ${pkgname}-${pkgver}
- # Docs available online only; see https://github.com/facebook/watchman/issues/30
- make DESTDIR="${pkgdir}" install
+ cd "$_archive"
- install -Dm 644 "${srcdir}"/${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
-}
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -Dm644 "$srcdir/watchman.conf" "$pkgdir/usr/lib/tmpfiles.d/watchman.conf"
+ install -Dm644 "$srcdir/watchman.json" "$pkgdir/etc/watchman.json"
+ install -Dm644 "$srcdir/watchman.service" "$pkgdir/usr/lib/systemd/user/watchman.service"
+ install -Dm644 "$srcdir/watchman.socket" "$pkgdir/usr/lib/systemd/user/watchman.socket"
-# vim:set ts=2 sw=2 et:
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/autogen.patch b/autogen.patch
deleted file mode 100644
index 602683f45c18..000000000000
--- a/autogen.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- watchman-4.9.0/autogen.sh.old 2021-01-31 05:39:03.639533048 +0900
-+++ watchman-4.9.0/autogen.sh 2021-01-31 05:39:36.825677454 +0900
-@@ -21,7 +21,7 @@
- # should be the case provided pkg-config is installed AND the above commands
- # have been run to prep the source tree with local set-up.
- CHECK_PKG_CONFIG_M4='m4_ifdef([PKG_CHECK_MODULES], [errprint([ok])])'
--if [ "x$(autoconf <(echo "$CHECK_PKG_CONFIG_M4") 2>&1)" != "xok" ] ; then
-+if [ "x$(autoconf -Wnone <(echo "$CHECK_PKG_CONFIG_M4") 2>&1)" != "xok" ] ; then
- echo 'pkg-config appears to be missing (not available to autoconf tools)'
- echo 'please install the pkg-config package for your system.'
- exit 1
diff --git a/python3.patch b/python3.patch
deleted file mode 100644
index 3a80cd44897e..000000000000
--- a/python3.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -aur watchman-4.9.0.old/python/bin/watchman-make watchman-4.9.0/python/bin/watchman-make
---- watchman-4.9.0.old/python/bin/watchman-make 2020-04-03 20:33:59.893048471 +0200
-+++ watchman-4.9.0/python/bin/watchman-make 2020-04-03 20:36:21.800479512 +0200
-@@ -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
-diff -aur watchman-4.9.0.old/python/bin/watchman-wait watchman-4.9.0/python/bin/watchman-wait
---- watchman-4.9.0.old/python/bin/watchman-wait 2020-04-03 20:33:59.893048471 +0200
-+++ watchman-4.9.0/python/bin/watchman-wait 2020-04-03 20:36:46.413945264 +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/watchman.conf b/watchman.conf
new file mode 100644
index 000000000000..1bbd2865d176
--- /dev/null
+++ b/watchman.conf
@@ -0,0 +1 @@
+d /run/watchman 1777 root root
diff --git a/watchman.install b/watchman.install
deleted file mode 100644
index 1bde732dde25..000000000000
--- a/watchman.install
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-post_install() {
- systemd-tmpfiles --create watchman.conf
-}
-
-post_upgrade() {
- systemd-tmpfiles --create watchman.conf
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/watchman.json b/watchman.json
new file mode 100644
index 000000000000..0967ef424bce
--- /dev/null
+++ b/watchman.json
@@ -0,0 +1 @@
+{}
diff --git a/watchman.service b/watchman.service
new file mode 100644
index 000000000000..e65b5f5584a4
--- /dev/null
+++ b/watchman.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=File watching service
+Documentation=https://github.com/facebook/watchman
+Requires=watchman.socket
+
+[Service]
+ExecStart=/usr/bin/watchman --foreground --inetd --logfile=-
+StandardInput=socket
+StandardOutput=journal
+StandardError=inherit
+
+[Install]
+WantedBy=default.target
diff --git a/watchman.socket b/watchman.socket
new file mode 100644
index 000000000000..58bef383920d
--- /dev/null
+++ b/watchman.socket
@@ -0,0 +1,11 @@
+[Unit]
+Description=File watching service socket
+Documentation=https://github.com/facebook/watchman
+
+[Socket]
+ListenStream=/run/watchman/%u-state/sock
+SocketMode=0600
+DirectoryMode=0700
+
+[Install]
+WantedBy=sockets.target
diff --git a/watchman.tmpfiles b/watchman.tmpfiles
deleted file mode 100644
index 3cd974f4a3e6..000000000000
--- a/watchman.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-d /run/watchman 0777 root root