svn commit: r474859 - in head/sysutils: . omnibackup omnibackup/files

Mathieu Arnold mat at FreeBSD.org
Wed Jul 18 13:54:41 UTC 2018


First off, everything is badly placed, for example, but not limited to,
OPTIONS where the DEPENDS should be.

On Wed, Jul 18, 2018 at 12:48:33PM +0000, Babak Farrokhi wrote:
> +RUN_DEPENDS+=	\

Why += ?

> +SUB_FILES=	pkg-message
> +SUB_LIST=	ROOT_HOME=/root

SUB_LIST is for variables, ROOT_HOME is pretty static, no need to use a
placeholder for it.

> +PLIST_FILES=	\
> +	bin/omnibackup \
> +	${ETCDIR}/config.json.sample

This should be using @sample.

> +.include <bsd.port.options.mk>
> +
> +.if ${PORT_OPTIONS:MDOCS}
> +PLIST_FILES+=	${DOCSDIR}/README.md
> +.endif

All this could be replaced by:

PORTDOCS=readme.md

> +.if ${PORT_OPTIONS:MOPENLDAP} \
> +	|| ${PORT_OPTIONS:MPGSQL} \
> +	|| ${PORT_OPTIONS:MMYSQL}
> +RUN_DEPENDS+=	sudo:security/sudo
> +.if ${PORT_OPTIONS:MOPENLDAP}
> +RUN_DEPENDS+=	slapcat:net/openldap24-server
> +.endif
> +.if ${PORT_OPTIONS:MPGSQL}
> +USES+=	pgsql
> +RUN_DEPENDS+=	pg_dump:databases/postgresql${PGSQL_VER_NODOT}-client
> +RUN_DEPENDS+=	pg_dumpall:databases/postgresql${PGSQL_VER_NODOT}-client

Those three lines all do the same thing, except that the last two are
awful.

> +.endif
> +.if ${PORT_OPTIONS:MMYSQL}
> +USES+=	mysql
> +RUN_DEPENDS+=	mysqldump:${_MYSQL_CLIENT}

Same here, only the first is required.

> Added: head/sysutils/omnibackup/files/pkg-message.in
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/sysutils/omnibackup/files/pkg-message.in	Wed Jul 18 12:48:33 2018	(r474859)
> @@ -0,0 +1,32 @@
> +###############################################################################
> +
> +In order to run OmniBackup, you will need to create and configure the main
> +configuration file, e.g.:
> +
> +$ cp -p %%LOCALBASE%%/etc/omnibackup/config.json.sample \
> +      %%LOCALBASE%%/etc/omnibackup/config.json

This should be PREFIX, not LOCALBASE.

> +or, create it in the root users' home directory:
> +
> +$ cp -p %%LOCALBASE%%/etc/omnibackup/config.json.sample \
> +      %%ROOT_HOME%%/.omnibackup/config.json

This should be PREFIX.

> +In order to take automatic backups every 24 hours at 01:00am UTC run this
> +command:
> +
> +$ crontab -e -u root
> +
> +Then add the following lines to the root users' crontab:
> +
> +# OmniBackup daily backups
> +00      01      *       *       *       %%LOCALBASE%%/bin/omnibackup

PREFIX.

> +To avoid data loss, make sure to consult the documentation at:
> +
> +* %%LOCALBASE%%/share/doc/omnibackup/README.md

PREFIX

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20180718/38d37fbb/attachment.sig>


More information about the svn-ports-all mailing list