Bug 199061 - [NEW PORT] sysutils/watchman 3.0.0
Summary: [NEW PORT] sysutils/watchman 3.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-31 06:48 UTC by linpct
Modified: 2015-06-04 18:50 UTC (History)
2 users (show)

See Also:


Attachments
watchman.shar (1.86 KB, text/plain)
2015-03-31 06:48 UTC, linpct
no flags Details
watchman-3.1.patch (1.15 KB, text/plain)
2015-04-30 02:43 UTC, linpct
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description linpct 2015-03-31 06:48:15 UTC

    
Comment 1 linpct 2015-03-31 06:48:17 UTC
Created attachment 155048 [details]
watchman.shar
Comment 2 Vanilla I. Shu freebsd_committer freebsd_triage 2015-04-01 01:56:35 UTC
I got following errors.

--------------------------
===>    Verifying for libpcre.so in /usr/ports/devel/pcre
===>   Installing existing package /packages/All/pcre-8.35_2.txz
[amd64-10-1-custom] Installing pcre-8.35_2...
[amd64-10-1-custom] Extracting pcre-8.35_2... done
===>   Returning to build of watchman-3.0.0
===========================================================================
====>> Recording filesystem state for prebuild... done
=======================<phase: configure      >============================
===>   watchman-3.0.0 depends on executable: pkgconf - found
===>   watchman-3.0.0 depends on shared library: libpcre.so - found (/usr/local/lib/libpcre.so.1.2.3)
===>  Configuring for watchman-3.0.0
cd /wrkdirs/usr/ports/sysutils/watchman/work/watchman-3.0.0 && /bin/sh ./autogen.sh
./autogen.sh: aclocal: not found
./autogen.sh: autoheader: not found
./autogen.sh: automake: not found
./autogen.sh: autoconf: not found
*** Error code 127

Stop.
make: stopped in /usr/ports/sysutils/watchman
build of sysutils/watchman ended at Wed Apr  1 05:24:20 CST 2015
build time: 00:00:06
!!! build failure encountered !!!
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-04-13 10:47:51 UTC
It's a very sloppy work, it cannot be committed as is, before it can match FreeBSD quality standards.  I'll take care of it from now.
Comment 4 linpct 2015-04-13 10:55:20 UTC
I'm porting 3.1, please wait, thanks.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-04-13 11:07:10 UTC
A commit references this bug:

Author: danfe
Date: Mon Apr 13 11:06:29 UTC 2015
New revision: 383908
URL: https://svnweb.freebsd.org/changeset/ports/383908

Log:
  Add a port of watchman, file alteration monitor from Facebook.

  WWW: https://facebook.github.io/watchman/

  PR:	199061

Changes:
  head/sysutils/Makefile
  head/sysutils/watchman/
  head/sysutils/watchman/Makefile
  head/sysutils/watchman/distinfo
  head/sysutils/watchman/pkg-descr
Comment 6 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-04-13 11:09:31 UTC
Oops, sorry, just added it as ports r383908.  I've basically recreated the port from scratch, given the poor quality of the submission.

I suggest you create a patch against 3.0.0; it will help you to avoid many mistakes.

Not closing the PR while waiting for "update to 3.1" patch.
Comment 7 linpct 2015-04-14 00:45:11 UTC
Thanks for your example, I just change PORTVERSION to 3.1 and remove the root.c patch (had been fixed at 3.1):

Index: Makefile
===================================================================
--- Makefile    (revision 383965)
+++ Makefile    (working copy)
@@ -2,7 +2,7 @@
 # $FreeBSD$

 PORTNAME=      watchman
-PORTVERSION=   3.0.0
+PORTVERSION=   3.1
 CATEGORIES=    sysutils

 MAINTAINER=    linpct@gmail.com
@@ -31,6 +31,5 @@

 post-patch:
        @${REINPLACE_CMD} -e '/^docdir = /d' ${WRKSRC}/Makefile.am
-       @${REINPLACE_CMD} -e '/timestamp=/s,%ld,%d,' ${WRKSRC}/root.c

 .include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo    (revision 383965)
+++ distinfo    (working copy)
@@ -1,2 +1,2 @@
-SHA256 (facebook-watchman-3.0.0-v3.0.0_GH0.tar.gz) = 9481c801b848acaa2783e511faaeae8d276e624e2703bd53f4e33cc9d0c0f12f
-SIZE (facebook-watchman-3.0.0-v3.0.0_GH0.tar.gz) = 199034
+SHA256 (facebook-watchman-3.1-v3.1_GH0.tar.gz) = c463b5cd5d8ccfbe96bdbcdc5a3c04c91c8eae53e1ffa4846a7317a8f6b4f159
+SIZE (facebook-watchman-3.1-v3.1_GH0.tar.gz) = 210849
Comment 8 linpct 2015-04-14 00:48:36 UTC
But, how could I remove README.markdown from install, it seems useless.

And I use `genplist test`, it seems not so clean:

-------------------------

===>  Installing for watchman-3.1
===>   watchman-3.1 depends on shared library: libpcre.so - found (/usr/local/lib/libpcre.so)
===>   Registering installation for watchman-3.1
Installing watchman-3.1...
===>  Deinstalling for watchman
===>   Deinstalling watchman-3.1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	watchman-3.1

The operation will free 145 KiB.
[1/1] Deinstalling watchman-3.1...
[1/1] Deleting files for watchman-3.1: 100%
Deinstall failed to remove some files:
/tmp/watchman-3.1/var/run/watchman/.not-empty

-------------------------
Comment 9 Jan Beich freebsd_committer freebsd_triage 2015-04-19 15:55:24 UTC
Current version is busted on amd64. It's one more reason to keep the bug open.

  root.c:1095:5: error: format specifies type 'int' but the argument has type 'time_t' (aka 'long') [-Werror,-Wformat]
      now.tv_sec,
      ^~~~~~~~~~
  ./watchman.h:100:27: note: expanded from macro 'ignore_result'
  # define ignore_result(x) x
                            ^
  1 error generated.

8.4R amd64: https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20150413/230423.html
9.3R amd64: https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20150413/230235.html
10.1R amd64: https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20150413/230127.html
11.0C amd64: https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20150413/230317.html
Comment 10 linpct 2015-04-30 02:43:11 UTC
Created attachment 156126 [details]
watchman-3.1.patch
Comment 11 linpct 2015-04-30 02:44:45 UTC
I have a 'update to 3.1' patch, please check and commit, thanks.
Comment 12 Jan Beich freebsd_committer freebsd_triage 2015-05-08 14:10:06 UTC
Comment on attachment 156126 [details]
watchman-3.1.patch

Fails to build on 8.x and 9.x:

  cc1: warnings being treated as errors
  listener.c: In function 'w_start_listener':
  listener.c:800: warning: ISO C90 forbids mixed declarations and code
  Makefile:1806: recipe for target 'watchman-listener.o' failed

>+pre-build:
>+	@${REINPLACE_CMD} -e '/.not-empty/d' ${WRKSRC}/Makefile

Why modify preprocessed file if the port has USES=autoreconf? And the
following poudriere warning indicates the fix may not be enough.

  ====>> Error: Filesystem touched during stage (files must install to ${STAGEDIR}):
  extra: usr/local/var

Try moving /var out of under PREFIX and marking it with @dir.

>diff -ruN watchman.orig/distinfo watchman/distinfo
>--- watchman.orig/distinfo	2015-04-30 10:40:04.000000000 +0800
>+++ watchman/distinfo	2015-04-30 10:39:53.000000000 +0800
>@@ -1,2 +1,2 @@
>-SHA256 (facebook-watchman-3.0.0-v3.0.0_GH0.tar.gz) = 9481c801b848acaa2783e511faaeae8d276e624e2703bd53f4e33cc9d0c0f12f
>-SIZE (facebook-watchman-3.0.0-v3.0.0_GH0.tar.gz) = 199034
>+SHA256 (facebook-watchman-3.1-v3.1_GH0.tar.gz) = c463b5cd5d8ccfbe96bdbcdc5a3c04c91c8eae53e1ffa4846a7317a8f6b4f159
>+SIZE (facebook-watchman-3.1-v3.1_GH0.tar.gz) = 210849

Convert to GH_TAGNAME into DISTVERSIONPREFIX to avoid version being
specified twice.
Comment 13 Mark Linimon freebsd_committer freebsd_triage 2015-06-04 18:50:12 UTC
Apparently committed as 383908.