From 66df13223ac2fabc3fb1620e14ec6692d84c4930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Zavam?= Date: Wed, 11 Mar 2020 10:44:16 +0000 Subject: [PATCH] net-mgmt/semaphore: fix 'incomplete file list and wrong search path' PR: 241655 Reported by: marek % mky.waw.pl --- net-mgmt/semaphore/Makefile | 12 +++++------- .../semaphore/files/patch-db_migrations.go | 11 +++++++++++ net-mgmt/semaphore/pkg-plist | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 net-mgmt/semaphore/files/patch-db_migrations.go diff --git a/net-mgmt/semaphore/Makefile b/net-mgmt/semaphore/Makefile index 17c26195b8bd..fa7990ebd0db 100644 --- a/net-mgmt/semaphore/Makefile +++ b/net-mgmt/semaphore/Makefile @@ -2,6 +2,7 @@ PORTNAME= semaphore PORTVERSION= 2.5.1 +PORTREVISION= 1 DISTVERSIONPREFIX= v PORTREVISION= 1 CATEGORIES= net-mgmt @@ -9,8 +10,6 @@ CATEGORIES= net-mgmt MAINTAINER= egypcio@FreeBSD.org COMMENT= Open Source alternative to Ansible Tower -BROKEN= unfetchable - LICENSE= MIT LICENSE_FILE= ${GO_WRKSRC}/LICENSE @@ -67,15 +66,14 @@ GH_TUPLE= ansible-semaphore:semaphore-vendor:a44f7be:ansible/vendor/github.com/a go-mgo:mgo:3f83fa5:pkgin4/vendor/gopkg.in/mgo.v2 \ go-yaml:yaml:v2.2.1:pkgin5/vendor/gopkg.in/yaml.v2 -OPTIONS_DEFINE= MYSQL -MYSQL_USES= mysql - post-patch: ${REINPLACE_CMD} 's/%%PORTVERSION%%/${PORTVERSION}/g' \ ${WRKSRC}/util/config.go post-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/semaphore - ${CP} ${WRKSRC}/config.json ${STAGEDIR}${PREFIX}/etc/semaphore/semaphore_config.json.sample + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME} + ${CP} ${WRKSRC}/config.json ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/semaphore_config.json.sample + ${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME} + ${CP} ${WRKSRC}/db/migrations/*.sql ${STAGEDIR}${PREFIX}/share/${PORTNAME} .include diff --git a/net-mgmt/semaphore/files/patch-db_migrations.go b/net-mgmt/semaphore/files/patch-db_migrations.go new file mode 100644 index 000000000000..fd90ab0ff007 --- /dev/null +++ b/net-mgmt/semaphore/files/patch-db_migrations.go @@ -0,0 +1,11 @@ +--- db/migrations.go.orig 2020-02-10 17:37:11 UTC ++++ db/migrations.go +@@ -9,7 +9,7 @@ import ( + log "github.com/Sirupsen/logrus" + ) + +-var dbAssets = packr.NewBox("./migrations") ++var dbAssets = packr.NewBox("/usr/local/share/semaphore") + + // CheckExists queries the database to see if a migration table with this version id exists already + func (version *Version) CheckExists() (bool, error) { diff --git a/net-mgmt/semaphore/pkg-plist b/net-mgmt/semaphore/pkg-plist index 409a09a41986..5e3ad865f632 100644 --- a/net-mgmt/semaphore/pkg-plist +++ b/net-mgmt/semaphore/pkg-plist @@ -1,2 +1,21 @@ bin/semaphore @sample %%ETCDIR%%/semaphore_config.json.sample +%%DATADIR%%/v0.0.0.sql +%%DATADIR%%/v0.1.0.sql +%%DATADIR%%/v1.0.0.sql +%%DATADIR%%/v1.1.0.sql +%%DATADIR%%/v1.2.0.sql +%%DATADIR%%/v1.3.0.sql +%%DATADIR%%/v1.4.0.sql +%%DATADIR%%/v1.5.0.sql +%%DATADIR%%/v1.6.0.sql +%%DATADIR%%/v1.7.0.sql +%%DATADIR%%/v1.8.0.sql +%%DATADIR%%/v1.9.0.sql +%%DATADIR%%/v2.2.1.sql +%%DATADIR%%/v2.3.0.sql +%%DATADIR%%/v2.3.1.sql +%%DATADIR%%/v2.3.2.sql +%%DATADIR%%/v2.4.0.sql +%%DATADIR%%/v2.5.0.sql +