svn commit: r531106 - in head: . net/irrd net/irrd/files
Muhammad Moinur Rahman
bofh at FreeBSD.org
Wed Apr 8 10:59:31 UTC 2020
Author: bofh
Date: Wed Apr 8 10:59:28 2020
New Revision: 531106
URL: https://svnweb.freebsd.org/changeset/ports/531106
Log:
net/irrd: Update version 2.3.10=>4.0.8
- Change LICENSE to BSD2CLAUSE from BSD4CLAUSE
- Utilizes UID and GID irrd for 252
- Take MAINTAINERSHIP
- Mentioned in UPDATING
- Both irrd-legacy and irrd can bes installed and run concurrently
Approved by: ume (private mail)
Added:
head/net/irrd/files/irrd4.in
- copied, changed from r531105, head/net/irrd/files/irrd.in
head/net/irrd/files/patch-setup.py (contents, props changed)
head/net/irrd/files/pkg-message.in (contents, props changed)
Deleted:
head/net/irrd/files/irrd.in
head/net/irrd/files/patch-config_file.c
head/net/irrd/files/patch-configure
head/net/irrd/files/patch-database.c
head/net/irrd/files/patch-lib_mrt_prefix.c
head/net/irrd/files/patch-uii_commands.c
Modified:
head/GIDs
head/UIDs
head/UPDATING
head/net/irrd/Makefile
head/net/irrd/distinfo
head/net/irrd/pkg-descr
Modified: head/GIDs
==============================================================================
--- head/GIDs Wed Apr 8 10:45:10 2020 (r531105)
+++ head/GIDs Wed Apr 8 10:59:28 2020 (r531106)
@@ -191,7 +191,7 @@ fcron:*:247:
signal-cli:*:248:
sonarqube:*:249:
sems:*:250:
-# free: 251
+irrd:*:251:
# free: 252
_adsuck:*:253:
imds:*:254:
Modified: head/UIDs
==============================================================================
--- head/UIDs Wed Apr 8 10:45:10 2020 (r531105)
+++ head/UIDs Wed Apr 8 10:59:28 2020 (r531106)
@@ -196,7 +196,7 @@ fcron:*:247:247::0:0:fcron pseudo-user:/nonexistent:/u
signal-cli:*:248:248::0:0:Signal CLI:/nonexistent:/usr/sbin/nologin
sonarqube:*:249:249::0:0:SonarQube Server:/nonexistent:/usr/sbin/nologin
sems:*:250:250::0:0:SIP Express Media Server:/nonexistent:/usr/sbin/nologin
-# free: 251
+irrd:*:251:251::0:0:irrd Daemon:/nonexistent:/usr/sbin/nologin
# free: 252
_adsuck:*:253:253::0:0:Adsuck ad blocking user:/nonexistent:/usr/sbin/nologin
imds:*:254:254::0:0:Instance Metadata Service filter:/nonexistent:/usr/sbin/nologin
Modified: head/UPDATING
==============================================================================
--- head/UPDATING Wed Apr 8 10:45:10 2020 (r531105)
+++ head/UPDATING Wed Apr 8 10:59:28 2020 (r531106)
@@ -5,6 +5,22 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20200408
+ AFFECTS: users of net/irrd
+ AUTHOR: bofh at FreeBSD.org
+
+ Legacy version of net/irrd has been moved to net/irrd-legacy.
+ net/irrd has been upgraded to 4.X branch. If someone wants to stick with
+ legacy version then pkg users have to do something like
+
+ # pkg set -o net/irrd:net/irrd-legacy
+
+ For portmaster users
+ # portmaster -o net/irrd-legacy net/irrd
+
+ Both of the version can be installed and used concurrently in case there is
+ a need for migration
+
20200403:
AFFECTS: users of x11-fonts/fontconfig
AUTHOR: desktop at FreeBSD.org
Modified: head/net/irrd/Makefile
==============================================================================
--- head/net/irrd/Makefile Wed Apr 8 10:45:10 2020 (r531105)
+++ head/net/irrd/Makefile Wed Apr 8 10:59:28 2020 (r531106)
@@ -1,76 +1,73 @@
-# Created by: TAKANO Yuji <takano at net-chef.net>
+# Created by: Muhammad Moinur Rahman <bofh at FreeBSD.org>
# $FreeBSD$
PORTNAME= irrd
-PORTVERSION= 2.3.10
+PORTVERSION= 4.0.8
DISTVERSIONPREFIX= v
-PORTREVISION= 3
-CATEGORIES= net
+CATEGORIES= net python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX= 4
-MAINTAINER= ume at FreeBSD.org
-COMMENT= Internet Routing Registry database server
+MAINTAINER= bofh at FreeBSD.org
+COMMENT= Internet Routing Registry database server v4
-LICENSE= BSD4CLAUSE
-LICENSE_FILE= ${WRKDIR}/${PORTNAME}-legacy-${PORTVERSION}/COPYRIGHT
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
-RUN_DEPENDS= wget:ftp/wget
+#python-gnupg==0.4.4 needs updating
+#twisted==19.2.1 needs updating
+BUILD_DEPENDS= \
+ ${PYTHON_PKGNAMEPREFIX}alembic>=1.0.10:databases/py-alembic@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}beautifultable>=0.7.0:devel/py-beautifultable@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}dotted>=0.1.8:devel/py-dotted@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ipy>=1.00:net-mgmt/py-ipy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ordered-set>=3.1.1:devel/py-ordered-set@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}passlib>=1.7.1:security/py-passlib@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.8.2:databases/py-psycopg2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}python-gnupg>=0.4.3:security/py-python-gnupg@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}service_identity>0:security/py-service_identity@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}twisted>=18.9.0:devel/py-twisted@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ujson>=1.35:devel/py-ujson@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}yaml>=5.1:devel/py-yaml@${PY_FLAVOR}
+TEST_DEPENDS= \
+ ${PYTHON_PKGNAMEPREFIX}coverage>=4.5.3:devel/py-coverage@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest>=4.4.1:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-cov>=2.6.1:devel/py-pytest-cov@${PY_FLAVOR}
-WRKSRC_SUBDIR= src
-
-IRRD_CONFDIR= ${PREFIX}/etc
-
-USES= shebangfix
-USE_RC_SUBR= irrd
+USES= pgsql python:3.6+
USE_GITHUB= yes
+USE_PYTHON= autoplist concurrent distutils
+USE_RC_SUBR= irrd4
+
GH_ACCOUNT= irrdnet
-GH_PROJECT= irrd-legacy
+GH_PROJECT= ${PORTNAME}
-GNU_CONFIGURE= yes
-CONFIGURE_ENV= YACC="${YACC}"
-MAKE_JOBS_UNSAFE= yes
-DESTDIRNAME= STAGEDIR
+USERS= ${PORTNAME}
+GROUPS= ${PORTNAME}
-OPTIONS_DEFINE= IPV6
-IPV6_CONFIGURE_ENABLE= ipv6
+OPTIONS_DEFINE= DOCS
+DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
-SHEBANG_FILES= programs/irrdcacher/irrdcacher \
- programs/irrdcacher/ripe2rpsl
+PLIST_FILES= "@sample etc/${PORTNAME}${PKGNAMESUFFIX}.yaml.sample"
+NO_ARCH= yes
-PLIST_FILES= etc/irrd.conf.sample \
- man/man8/irrd.8.gz \
- sbin/irr_notify \
- sbin/irr_rpsl_check \
- sbin/irr_rpsl_submit \
- sbin/irrd \
- sbin/irrdcacher \
- sbin/ripe2rpsl
+SUB_FILES= pkg-message
+SUB_LIST= PYTHON_CMD="${PYTHON_CMD}" \
+ PGSQL_DEFAULT=${PGSQL_DEFAULT} \
+ USERS=${USERS} \
+ GROUPS=${GROUPS}
-post-patch:
- ${REINPLACE_CMD} -e 's|/etc/irrd.conf|${IRRD_CONFDIR}/irrd.conf|g' \
- ${WRKSRC}/programs/IRRd/irrd.8 \
- ${WRKSRC}/programs/IRRd/main.c \
- ${WRKSRC}/programs/hdr_comm/read_conf.c \
- ${WRKSRC}/programs/irr_notify/main.c \
- ${WRKSRC}/programs/irr_rpsl_check/main.c \
- ${WRKSRC}/programs/irr_rpsl_submit/main.c \
- ${WRKSRC}/programs/irrdcacher/irrdcacher \
- ${WRKSRC}/programs/rps_dist/rpsdist.c
- ${REINPLACE_CMD} -e 's|\($$(DESTDIR)\)|$$(STAGEDIR)\1|g' \
- -e 's|\( -m 755 \)| -s\1|g' \
- -e 's| -o root -g bin||g' \
- ${WRKSRC}/programs/IRRd/Makefile \
- ${WRKSRC}/programs/irr_notify/Makefile \
- ${WRKSRC}/programs/irr_rpsl_check/Makefile \
- ${WRKSRC}/programs/irr_rpsl_submit/Makefile
+.include <bsd.port.pre.mk>
+.if ${PYTHON_REL} < 3700
+BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0.6:devel/py-dataclasses@${PY_FLAVOR}
+.endif
+
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/irrdcacher \
- ${STAGEDIR}${PREFIX}/sbin
- ${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/ripe2rpsl \
- ${STAGEDIR}${PREFIX}/sbin
- ${INSTALL_DATA} ${WRKSRC}/../samples/irrd.conf.sample \
- ${STAGEDIR}${IRRD_CONFDIR}
- ${INSTALL_DATA} ${WRKSRC}/programs/IRRd/irrd.8 \
- ${STAGEDIR}${PREFIX}/man/man8
+ ${INSTALL_DATA} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/conf/default_config.yaml \
+ ${STAGEDIR}${PREFIX}/etc/${PORTNAME}${PKGNAMESUFFIX}.yaml.sample
-.include <bsd.port.mk>
+do-test:
+ @(cd ${TEST_WRKSRC} && ${SETENV} pytest ${PORTNAME})
+
+.include <bsd.port.post.mk>
Modified: head/net/irrd/distinfo
==============================================================================
--- head/net/irrd/distinfo Wed Apr 8 10:45:10 2020 (r531105)
+++ head/net/irrd/distinfo Wed Apr 8 10:59:28 2020 (r531106)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1582065766
-SHA256 (irrdnet-irrd-legacy-v2.3.10_GH0.tar.gz) = acc1b6e5b219c617b1a614cfd586901183a184ee91a42c81473724161a63d65a
-SIZE (irrdnet-irrd-legacy-v2.3.10_GH0.tar.gz) = 769512
+TIMESTAMP = 1585613545
+SHA256 (irrdnet-irrd-v4.0.8_GH0.tar.gz) = dd51d10bfad54bd7272ec90380f29824ae70dc401645e6e3bac9554798f4104b
+SIZE (irrdnet-irrd-v4.0.8_GH0.tar.gz) = 257853
Copied and modified: head/net/irrd/files/irrd4.in (from r531105, head/net/irrd/files/irrd.in)
==============================================================================
--- head/net/irrd/files/irrd.in Wed Apr 8 10:45:10 2020 (r531105, copy source)
+++ head/net/irrd/files/irrd4.in Wed Apr 8 10:59:28 2020 (r531106)
@@ -13,16 +13,33 @@
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
-irrd_enable="${irrd_enable:-NO}" # Enable irrd
-#irrd_program="%%PREFIX%%/sbin/irrd" # Location of irrd
-irrd_flags="${irrd_flags:--u}" # Flags to irrd program
+# irrd4_enable (bool): Set to NO by default.
+# Set it to YES to enable irrd4
+# irrd4_uid (string): Set to irrd by default.
+# irrd4_gid (string): Set to irrd by default.
+# irrd4_logfile (path): Set to /var/log/irrd4.log by default.
+# irrd4_pidfile (path): Set to /var/run/irrd4.pid by default.
+# irrd4_config (path): Set to %%PREFIX%%/etc/irrd4.yaml by default.
. /etc/rc.subr
-name="irrd"
-rcvar=irrd_enable
-command="%%PREFIX%%/sbin/irrd"
-required_files="%%PREFIX%%/etc/irrd.conf"
+name="irrd4"
+rcvar=irrd4_enable
+command="%%PREFIX%%/bin/twistd"
load_rc_config $name
+
+irrd4_enable=${irrd4_enable-"NO"}
+irrd4_uid=${irrd4_uid-"%%USERS%%"}
+irrd4_gid=${irrd4_gid-"%%GROUPS%%"}
+irrd4_logfile=${irrd4_logfile-"/var/log/irrd4.log"}
+irrd4_pidfile=${irrd4_pidfile-"/var/run/irrd4.pid"}
+irrd4_config=${irrd4_config-"%%PREFIX%%/etc/irrd4.yaml"}
+
+required_files="${irrd4_config}"
+command_interpreter="%%PYTHON_CMD%%"
+pidfile=${irrd4_pidfile}
+
+command_args="--originalname -u ${irrd4_uid} -g ${irrd4_gid} --pidfile ${pidfile} -l ${irrd4_logfile} irrd -c ${irrd4_config}"
+
run_rc_command "$1"
Added: head/net/irrd/files/patch-setup.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/irrd/files/patch-setup.py Wed Apr 8 10:59:28 2020 (r531106)
@@ -0,0 +1,35 @@
+--- setup.py.orig 2019-11-12 12:54:56 UTC
++++ setup.py
+@@ -23,19 +23,19 @@ setuptools.setup(
+ # This list must be kept in sync with requirements.txt version-wise,
+ # but should not include packages used for testing, generating docs
+ # or packages.
+- 'python-gnupg==0.4.4',
+- 'passlib==1.7.1',
+- 'IPy==1.0.0',
+- 'dataclasses==0.6',
+- 'ordered-set==3.1.1',
+- 'dotted==0.1.8',
+- 'beautifultable==0.7.0',
+- 'PyYAML==5.1',
+- 'psycopg2-binary==2.8.2',
+- 'SQLAlchemy==1.3.3',
+- 'alembic==1.0.10',
+- 'ujson==1.35',
+- 'twisted==19.2.1',
++ 'python-gnupg>=0.4.3',
++ 'passlib>=1.7.1',
++ 'IPy>=1.0.0',
++ 'dataclasses==0.6; python_version<"3.7"',
++ 'ordered-set>=3.1.1',
++ 'dotted>=0.1.8',
++ 'beautifultable>=0.7.0',
++ 'PyYAML>=5.1',
++ 'psycopg2>=2.8.2',
++ 'SQLAlchemy>=1.2.19',
++ 'alembic>=1.0.10',
++ 'ujson>=1.35',
++ 'twisted>=18.9.0',
+ ],
+ entry_points={
+ 'console_scripts': [
Added: head/net/irrd/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/irrd/files/pkg-message.in Wed Apr 8 10:59:28 2020 (r531106)
@@ -0,0 +1,26 @@
+[
+{ type: install
+ message: <<EOM
+1. A working copy of postgresql-server and postgresql-contrib is required.
+
+2. For a fresh install the following should do:
+pkg install postgresql%%PGSQL_DEFAULT%%-server postgresql%%PGSQL_DEFAULT%%-contrib
+
+3. Change the related postgresql server configuration like the following:
+https://irrd.readthedocs.io/en/stable/admins/deployment.html#postgresql-configuration
+
+Follow the documentation to create a database
+
+4. Configure irrd accordingly following the documentation:
+https://irrd.readthedocs.io/en/stable/admins/configuration.html
+
+5. Enable irrd at startup with:
+sysrc irrd4_enable=YES
+
+6. Start the service:
+service irrd4 start
+
+7. First sync of whois database might take a long time depending on resources available
+EOM
+}
+]
Modified: head/net/irrd/pkg-descr
==============================================================================
--- head/net/irrd/pkg-descr Wed Apr 8 10:45:10 2020 (r531105)
+++ head/net/irrd/pkg-descr Wed Apr 8 10:59:28 2020 (r531106)
@@ -1,3 +1,3 @@
-Internet Routing Registry Daemon (IRRd).
+Internet Routing Registry Daemon (IRRd) v4.
WWW: http://www.irrd.net/
More information about the svn-ports-head
mailing list