Bug 12595 - Top level make dist does not package CTDB pre-built manpages
Summary: Top level make dist does not package CTDB pre-built manpages
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.6.0rc3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2017-02-21 11:37 UTC by Amitay Isaacs
Modified: 2017-03-02 08:05 UTC (History)
4 users (show)

See Also:

Patches for v4-6 (4.98 KB, patch)
2017-02-24 05:48 UTC, Amitay Isaacs
martins: review+
Extra proposed patch for 4.6 (786 bytes, patch)
2017-02-24 18:57 UTC, Martin Schwenke
no flags Details
Additional patches for v4-6 (1.95 KB, patch)
2017-02-27 02:32 UTC, Amitay Isaacs
martins: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Amitay Isaacs 2017-02-21 11:37:50 UTC

Comment 1 Amitay Isaacs 2017-02-24 05:48:11 UTC
Created attachment 12974 [details]
Patches for v4-6
Comment 2 Martin Schwenke 2017-02-24 06:04:52 UTC
Hi Karolin,

This is ready for 4.6.

Comment 3 Karolin Seeger 2017-02-24 08:33:54 UTC
(In reply to Martin Schwenke from comment #2)
Thanks a lot!

Pushed to autobuild-v4-6-test.
Comment 4 Karolin Seeger 2017-02-24 11:05:36 UTC
Running 'make dist' in v4-5-test builds the ctdb manpages,
the same command in v4-6-test does not. It still seems to be an issue.
Comment 5 Martin Schwenke 2017-02-24 11:24:04 UTC
Hi Karolin,

I don't see these patches in v4-6-test.  If I apply them and then do "make dist" then it 

martins@rover:~/samba/samba (v4-6-test)$ git am ~/Downloads/BZ12595-v4-6.patch
martins@rover:~/samba/samba (v4-6-test)$ git am ~/Downloads/BZ12595-v4-6.patch
Applying: ctdb-build: Split dist() target to generate manpages separately
Applying: ctdb-build: Add make target for generating manpages
Applying: build: Fix generation of CTDB manpages while creating tarball
martins@rover:~/samba/samba (v4-6-test)$ make dist
touch .tmplock
WAFLOCK=.tmplock WAF_MAKE=1 python ./buildtools/bin/waf dist
make[1]: Entering directory '/home/martins/samba/samba/ctdb'
WAF_MAKE=1 PATH=buildtools/bin:../buildtools/bin:$PATH waf manpages
Note: Writing ctdb.1
Note: Writing ctdbd.1
Note: Writing ltdbtool.1
Note: Writing ping_pong.1
Note: Writing ctdb_diagnostics.1
Note: Writing ctdbd_wrapper.1
Note: Writing onnode.1
Note: Writing ctdbd.conf.5
Note: Writing ctdb.7
Note: Writing ctdb-statistics.7
Note: Writing ctdb-tunables.7
Note: Writing ctdb-etcd.7
Note: Writing ctdb_mutex_ceph_rados_helper.7
'manpages' finished successfully (5.445s)
make[1]: Leaving directory '/home/martins/samba/samba/ctdb'
~/samba/samba/docs-xml ~/samba/samba
checking for xsltproc... xsltproc
checking for rm... rm

The manpages seem to be there.  For example:

martins@rover:~/samba/samba (v4-6-test)$ tar tvf samba-4.6.0rc4-GIT-34a2bba706c.tar.gz | grep 'ctdb/doc/ctdb\.7$'
-rw-rw-r-- root/root     29128 2017-02-24 22:19 samba-4.6.0rc4-GIT-34a2bba706c/ctdb/doc/ctdb.7
Comment 6 Martin Schwenke 2017-02-24 11:26:34 UTC
Sorry, incomplete comment there...  :-)

With the patches applied, "make dist" seems to build the CTDB manpages...
Comment 7 Karolin Seeger 2017-02-24 11:29:29 UTC
(In reply to Martin Schwenke from comment #6)

Autobuild is not finished.
I've applied the patches locally and ctdb manpages are not built.
Leaving the office right now. I can investigate later.
Maybe I am doing something wrong...
Comment 8 Martin Schwenke 2017-02-24 18:26:06 UTC
There's something weird going on.  When I pull your autobuild-v4-6-test branch to here, it builds manpages.  However, when I clone a fresh copy on sn-devel, I see this:

martins@sn-devel-144:~/tmp/samba-autobuild-v4-6-test$ make dist
touch .tmplock
WAFLOCK=.tmplock WAF_MAKE=1 python ./buildtools/bin/waf dist
make[1]: Entering directory `/home/martins/tmp/samba-autobuild-v4-6-test/ctdb'
WAF_MAKE=1 PATH=buildtools/bin:../buildtools/bin:$PATH waf manpages
Traceback (most recent call last):
  File "../buildtools/bin/waf", line 76, in <module>
    Scripting.prepare(t, cwd, VERSION, wafdir)
  File "/home/martins/tmp/samba-autobuild-v4-6-test/third_party/waf/wafadmin/Scripting.py", line 145, in prepare
    prepare_impl(t, cwd, ver, wafdir)
  File "/home/martins/tmp/samba-autobuild-v4-6-test/third_party/waf/wafadmin/Scripting.py", line 135, in prepare_impl
  File "/home/martins/tmp/samba-autobuild-v4-6-test/wscript", line 350, in main
  File "./buildtools/wafsamba/samba_wildcard.py", line 99, in wildcard_main
  File "/home/martins/tmp/samba-autobuild-v4-6-test/wscript", line 345, in wildcard_cmd
  File "./buildtools/wafsamba/samba_wildcard.py", line 18, in run_named_build_task
    bld = fake_build_environment(info=False)
  File "./buildtools/wafsamba/samba_wildcard.py", line 141, in fake_build_environment
    bld.load_dirs(proj[SRCDIR], proj[BLDDIR])
  File "/home/martins/tmp/samba-autobuild-v4-6-test/third_party/waf/wafadmin/Build.py", line 416, in load_dirs
  File "/usr/lib/python2.7/posixpath.py", line 61, in isabs
    return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
make[1]: *** [manpages] Error 1
make[1]: Leaving directory `/home/martins/tmp/samba-autobuild-v4-6-test/ctdb'
Comment 9 Martin Schwenke 2017-02-24 18:35:41 UTC
It seems to work if you've done "make dist" in the ctdb subdirectory.

Trying to understand why...
Comment 10 Martin Schwenke 2017-02-24 18:47:16 UTC
If I do "touch ctdb/.tmplock" before top-level "make dist" then it works.  Still trying to understand it...
Comment 11 Martin Schwenke 2017-02-24 18:57:20 UTC
Created attachment 12976 [details]
Extra proposed patch for 4.6

Hi Karolin,

Does the attached extra patch fix the problem?

I'm not sure if this is correct because I don't understand the WAFLOCK subtlety, but it seems to work for me.

If it is correct and it works then we should get it pushed to master and cherry-pick it back into v4-6-test.
Comment 12 Martin Schwenke 2017-02-24 19:00:39 UTC
Reassigning to "us", since we definitely still seem to have a problem...
Comment 13 Martin Schwenke 2017-02-25 07:21:01 UTC
There's also another patch coming to fix CTDB's standalone RPM build.  Hopefully we'll have the required patches into master on Monday for cherry-picking...
Comment 14 Amitay Isaacs 2017-02-27 02:32:24 UTC
Created attachment 12977 [details]
Additional patches for v4-6
Comment 15 Martin Schwenke 2017-02-27 03:57:38 UTC
Hi Karolin,

This should, once again, be ready for 4.6.  :-)

Comment 16 Karolin Seeger 2017-02-28 09:05:07 UTC
(In reply to Martin Schwenke from comment #15)
The additional patches fix the issue!
Thanks *a lot*! :-)
Comment 17 Karolin Seeger 2017-02-28 11:31:59 UTC
(In reply to Martin Schwenke from comment #15)
Pushed to autobuild-v4-6-test.
Comment 18 Karolin Seeger 2017-03-02 08:05:26 UTC
(In reply to Karolin Seeger from comment #17)
Pushed to v4-6-test.
Closing out bug report.