FreeBSD Bugzilla – Attachment 188581 Details for
Bug 224113
devel/gogs: Switch to "git" user, move the configuration files to /usr/local/etc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
New location for app.ini
configs.diff (text/plain), 3.95 KB, created by
Felix Z.
on 2017-12-06 11:28:00 UTC
(
hide
)
Description:
New location for app.ini
Filename:
MIME Type:
Creator:
Felix Z.
Created:
2017-12-06 11:28:00 UTC
Size:
3.95 KB
patch
obsolete
>diff --git a/Makefile b/Makefile >index 7591244..9c34da8 100644 >--- a/Makefile >+++ b/Makefile >@@ -62,9 +62,14 @@ do-install: > ${INSTALL_SCRIPT} ${WRKDIR}/gogs-rm-data ${STAGEDIR}${PREFIX}/bin/ > ${INSTALL_SCRIPT} ${WRKDIR}/gogs-service ${STAGEDIR}${PREFIX}/etc/rc.d/gogs > @(cd ${WRKSRC} && ${COPYTREE_SHARE} "conf public templates" ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}) >+ >+ @${MKDIR} ${STAGEDIR}${ETCDIR} >+ @${INSTALL_DATA} ${WRKSRC}/conf/app.ini ${STAGEDIR}${ETCDIR}/app.ini.sample >+ > @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/custom/conf >- ${INSTALL_DATA} ${WRKSRC}/conf/app.ini ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/custom/conf/ >- @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/custom/https >+ @${MKDIR} ${STAGEDIR}${ETCDIR}/https >+ @${LN} -sf ${ETCDIR}/https ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/custom/https >+ > @${MKDIR} ${STAGEDIR}${GOGS_DBDIR}/data ${STAGEDIR}${GOGS_DBDIR}/repositories ${STAGEDIR}${GOGS_DBDIR}/home > @${LN} -sf ${GOGS_DBDIR}/data ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/data > @${MKDIR} ${STAGEDIR}${GOGS_LOGDIR} >@@ -72,4 +77,12 @@ do-install: > @${MKDIR} ${STAGEDIR}${DOCSDIR} > ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} > >+post-install: >+ ${SED} -I '' '/^# \!\!\!/d' ${STAGEDIR}${ETCDIR}/app.ini.sample >+ @if [ ! -f ${ETCDIR}/app.ini ]; then \ >+ ${CP} -p ${STAGEDIR}${ETCDIR}/app.ini.sample ${STAGEDIR}${ETCDIR}/app.ini ; \ >+ fi >+ @${LN} -sf ${ETCDIR}/app.ini ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/custom/conf/app.ini >+ >+ > .include <bsd.port.mk> >diff --git a/files/gogs-service.in b/files/gogs-service.in >index 9b9af0a..29330be 100644 >--- a/files/gogs-service.in >+++ b/files/gogs-service.in >@@ -24,6 +24,7 @@ stop_cmd="%%PORTNAME%%_stop" > load_rc_config ${name} > > : ${%%PORTNAME%%_enable="NO"} >+: ${%%PORTNAME%%_config="/usr/local/etc/gogs/app.ini"} > > is_process_running() { > local pidfile=$1 >@@ -47,7 +48,7 @@ stop_daemon() { > touch $logfile > chmod 640 $logfile > cd %%PREFIX%%/libexec/%%PORTNAME%% >- /usr/sbin/daemon -P $pidfile -u %%GOGS_USER%% %%PREFIX%%/libexec/%%PORTNAME%%/%%PORTNAME%% web >>$logfile 2>&1 >+ /usr/sbin/daemon -P $pidfile -u %%GOGS_USER%% %%PREFIX%%/libexec/%%PORTNAME%%/%%PORTNAME%% web --config ${%%PORTNAME%%_config} >>$logfile 2>&1 > if is_process_running $pidfile; then > echo "started %%PORTNAME%% (pid=$(cat $pidfile))" > else >diff --git a/files/pkg-message.in b/files/pkg-message.in >index 4a8c687..784f160 100644 >--- a/files/pkg-message.in >+++ b/files/pkg-message.in >@@ -13,7 +13,7 @@ You can also run %%PORTNAME%% manually with a command: > Connect to %%PORTNAME%% on the default port 3000: > http://localhost:3000 > >-Configuration file is %%PREFIX%%/libexec/%%PORTNAME%%/custom/conf/app.ini. >+Configuration file is %%ETCDIR%%/app.ini. > You can only edit it when %%PORTNAME%% isn't running. > > %%PORTNAME_FANCY%% needs an SSH daemon, so make sure sure you execute: >diff --git a/pkg-plist b/pkg-plist >index f10d059..04c8e58 100644 >--- a/pkg-plist >+++ b/pkg-plist >@@ -1,6 +1,12 @@ > bin/gogs > bin/gogs-rm-data >-@(%%GOGS_USER%%,%%GOGS_GROUP%%,640) libexec/gogs/custom/conf/app.ini >+@owner %%GOGS_USER%% >+@group %%GOGS_GROUP%% >+@sample %%ETCDIR%%/app.ini.sample %%ETCDIR%%/app.ini >+@owner >+@group >+libexec/gogs/custom/conf/app.ini >+libexec/gogs/custom/https > etc/rc.d/gogs > libexec/gogs/conf/app.ini > libexec/gogs/conf/gitignore/Actionscript >@@ -1719,8 +1725,9 @@ libexec/gogs/templates/user/settings/security.tmpl > libexec/gogs/templates/user/settings/sshkeys.tmpl > libexec/gogs/templates/user/settings/two_factor_enable.tmpl > libexec/gogs/templates/user/settings/two_factor_recovery_codes.tmpl >+@dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%ETCDIR%% >+@dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%ETCDIR%%/https > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) libexec/gogs/custom/conf >-@dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) libexec/gogs/custom/https > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%GOGS_DBDIR%%/data > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%GOGS_DBDIR%%/home > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%GOGS_DBDIR%%/repositories
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 224113
:
188551
| 188581 |
188587
|
188588
|
188590
|
188814