On Sun, Apr 01, 2018 at 12:50:23PM +0200, Björn Ketelaars wrote:
> Diff below brings borgbackup to 1.1.5, which is a bug fix release.
> Changelog can be found at
> https://github.com/borgbackup/borg/blob/1.1.5/docs/changes.rst#version-115-2018-04-01
> 
> make test runs successfully. Tested on three machines (amd64) making
> remote, and local backups. Restore works as expected.
I looked into SEPARATE_BUILD for borgbackup as it seemed relatively
easy for this port and builds might take a while on slow machines, so
here's an updated yet incomplete diff (tests missing):

* All BDEPs can be dropped (verified by uninstalling and building):
  - net/py-msgpack is RDEP only
  - devel/py-setuptools_scm is TDEP only (or useless, see tests update)
  - textproc/py-sphinx_guzzle_theme is not needed at all
* All manual pages are shipped under docs/man/ already
  - no need to build borg.1
  - install all available manuals
* Set SEPARATE_BUILD with corresponding MAKE_ENV
  - WRKSRC stays untouched after build except for the setup*.py's
    __pycache__ directories

The build system now properly picks up WRKBUILD and also builds the
C extensions automatically during our native build target. Since
borg.1 is there already (see above), drop post-build completely.

The only "small" problem I now have is pytest complaining about
mismatching __file__ attributes, see test.log attached. Feedback is
appreciated here, some further massaging might do the trick.

Thoughts?

PS: I don't mean to block your update, please go ahead after another
OK (or two).

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/borgbackup/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile    5 Jan 2018 12:33:08 -0000       1.19
+++ Makefile    1 Apr 2018 19:37:49 -0000
@@ -2,9 +2,8 @@
 
 COMMENT =              deduplicating backup program
 
-MODPY_EGG_VERSION =    1.1.4
+MODPY_EGG_VERSION =    1.1.5
 DISTNAME =             borgbackup-${MODPY_EGG_VERSION}
-REVISION =             0
 
 CATEGORIES =           sysutils
 
@@ -24,27 +23,23 @@ LIB_DEPENDS +=              ${MODPY_LIB_DEPENDS} \
                        archivers/lz4 \
                        archivers/zstd \
                        security/libb2
-BUILD_DEPENDS +=       ${RUN_DEPENDS} \
-                       devel/py-setuptools_scm${MODPY_FLAVOR} \
-                       textproc/py-sphinx_guzzle_theme${MODPY_FLAVOR}
 RUN_DEPENDS +=         net/py-msgpack${MODPY_FLAVOR}
 TEST_DEPENDS +=                ${RUN_DEPENDS} \
                        devel/py-test${MODPY_FLAVOR} \
                        devel/py-test-benchmark${MODPY_FLAVOR} \
                        devel/py-test-xdist${MODPY_FLAVOR}
 
-post-build:
-       ${MODPY_CMD} build_ext --inplace
-       cd ${WRKSRC}/docs; env PYTHONPATH=${WRKSRC} \
-               make man SPHINXBUILD=sphinx-build${MODPY_BIN_SUFFIX}
+MAKE_ENV =             PYTHONPATH=${WRKBUILD}
+
+SEPARATE_BUILD =       Yes
 
 post-install:
-       ${INSTALL_MAN} ${WRKSRC}/docs/_build/man/borg.1 
${PREFIX}/man/man1/borg.1
+       ${INSTALL_MAN} ${WRKSRC}/docs/man/*.1 ${PREFIX}/man/man1/
 
 do-test: fake
-       cd ${WRKSRC}; \
-               PATH=${WRKINST}/usr/local/bin:${PATH} \
-               PYTHONPATH=${WRKSRC}/src \
-               ${MODPY_BIN} -m pytest --ignore lib*
+       cd ${WRKSRC} && \
+               PATH=${WRKINST}/usr/local/bin:${PORTPATH} \
+               PYTHONPATH=${WRKBUILD} \
+               py.test${MODPY_BIN_SUFFIX} --basetemp=${WRKBUILD}/test
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/borgbackup/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo    30 Dec 2017 21:38:48 -0000      1.13
+++ distinfo    1 Apr 2018 19:37:49 -0000
@@ -1,2 +1,2 @@
-SHA256 (borgbackup-1.1.4.tar.gz) = IqSlOECIYYDofeVjY1bynkkSCTZYYQB8MdfxgiDHLLI=
-SIZE (borgbackup-1.1.4.tar.gz) = 3390046
+SHA256 (borgbackup-1.1.5.tar.gz) = Q1bmxxKHHziePLHWOC40HqY1+eXGXeHNj80QPQ+2bT0=
+SIZE (borgbackup-1.1.5.tar.gz) = 3392774
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/borgbackup/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST   3 Dec 2017 19:11:09 -0000       1.8
+++ pkg/PLIST   1 Apr 2018 19:37:49 -0000
@@ -140,4 +140,36 @@ lib/python${MODPY_VERSION}/site-packages
 
lib/python${MODPY_VERSION}/site-packages/borgbackup-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/not-zip-safe
 
lib/python${MODPY_VERSION}/site-packages/borgbackup-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt
 
lib/python${MODPY_VERSION}/site-packages/borgbackup-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
+@man man/man1/borg-benchmark-crud.1
+@man man/man1/borg-benchmark.1
+@man man/man1/borg-break-lock.1
+@man man/man1/borg-change-passphrase.1
+@man man/man1/borg-check.1
+@man man/man1/borg-common.1
+@man man/man1/borg-compression.1
+@man man/man1/borg-config.1
+@man man/man1/borg-create.1
+@man man/man1/borg-delete.1
+@man man/man1/borg-diff.1
+@man man/man1/borg-export-tar.1
+@man man/man1/borg-extract.1
+@man man/man1/borg-info.1
+@man man/man1/borg-init.1
+@man man/man1/borg-key-change-passphrase.1
+@man man/man1/borg-key-export.1
+@man man/man1/borg-key-import.1
+@man man/man1/borg-key-migrate-to-repokey.1
+@man man/man1/borg-key.1
+@man man/man1/borg-list.1
+@man man/man1/borg-mount.1
+@man man/man1/borg-patterns.1
+@man man/man1/borg-placeholders.1
+@man man/man1/borg-prune.1
+@man man/man1/borg-recreate.1
+@man man/man1/borg-rename.1
+@man man/man1/borg-serve.1
+@man man/man1/borg-umount.1
+@man man/man1/borg-upgrade.1
+@man man/man1/borg-with-lock.1
 @man man/man1/borg.1
+@man man/man1/borgfs.1

Attachment: test.log.gz
Description: Binary data

Reply via email to