FreeBSD Bugzilla – Attachment 188814 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]
patch file
gogs-0.11.34_1.patch (text/plain), 8.94 KB, created by
Dmitri Goutnik
on 2017-12-13 22:37:05 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Dmitri Goutnik
Created:
2017-12-13 22:37:05 UTC
Size:
8.94 KB
patch
obsolete
>Index: GIDs >=================================================================== >--- GIDs (revision 456223) >+++ GIDs (working copy) >@@ -150,7 +150,6 @@ > gini:*:206: > _mixminion:*:207: > _dnsdist:*:208: >-gogs:*:209: > shoutcast:*:210: > git:*:211: > hg:*:212: >Index: UIDs >=================================================================== >--- UIDs (revision 456223) >+++ UIDs (working copy) >@@ -155,7 +155,6 @@ > gini:*:206:206::0:0:& streaming server:/var/log/gini:/usr/sbin/nologin > _mixminion:*:207:207::0:0:Mixminion server:/nonexistent:/usr/sbin/nologin > _dnsdist:*:208:208::0:0:dnsdist user:/nonexistent:/usr/sbin/nologin >-gogs:*:209:209::0:0:gogs user:/var/db/gogs/home:/bin/sh > shoutcast:*:210:210::0:0:Shoutcast sandbox:/nonexistent:/bin/sh > git:*:211:211::0:0:gitosis user:/usr/local/git:/bin/sh > hg:*:212:212::0:0:mercurial-server user:/usr/local/hg:/bin/sh >Index: UPDATING >=================================================================== >--- UPDATING (revision 456223) >+++ UPDATING (working copy) >@@ -5,6 +5,20 @@ > You should get into the habit of checking this file for changes each time > you update your ports collection, before attempting any port upgrades. > >+20171212: >+ AFFECTS: users of devel/gogs >+ AUTHOR: dg@syrec.org >+ >+ Gogs user has been changed to "git" and configuration files are now >+ located in /usr/local/etc/gogs. Users should update ownership of the >+ existing Gogs directories with >+ >+ # chown -R git:git /var/db/gogs >+ # chown -R git:git /var/log/gogs >+ >+ and either move or merge the contents of /var/db/gogs/home/.ssh with >+ /usr/local/git/.ssh. After migration, /var/db/gogs/home can be removed. >+ > 20171205: > AFFECTS: users of dns/powerdns > AUTHOR: krion@FreeBSD.org >Index: devel/gogs/Makefile >=================================================================== >--- devel/gogs/Makefile (revision 456223) >+++ devel/gogs/Makefile (working copy) >@@ -3,6 +3,7 @@ > PORTNAME= gogs > DISTVERSIONPREFIX= v > DISTVERSION= 0.11.34 >+PORTREVISION= 1 > CATEGORIES= devel www > > MAINTAINER= dg@syrec.org >@@ -20,8 +21,8 @@ > > OPTIONS_DEFINE= DOCS > >-USERS= gogs >-GROUPS= gogs >+USERS= git >+GROUPS= git > > GOGS_DBDIR?= /var/db/gogs > GOGS_LOGDIR?= /var/log/gogs >@@ -31,8 +32,7 @@ > gogs-service \ > gogs-rm-data \ > pkg-message >-SUB_LIST= PREFIX=${PREFIX} \ >- PORTNAME=${PORTNAME} \ >+SUB_LIST= PORTNAME=${PORTNAME} \ > PORTNAME_FANCY=${PORTNAME_FANCY} \ > GOGS_USER=${USERS} \ > GOGS_DBDIR=${GOGS_DBDIR} \ >@@ -45,9 +45,12 @@ > PORTDOCS= README.md > > post-patch: >- @${REINPLACE_CMD} -i '' \ >+ @${REINPLACE_CMD} \ >+ -e '/^# \!\!\!/d' \ >+ -e 's|^RUN_USER = git$$|RUN_USER = ${USERS}|' \ >+ -e 's|^RUN_MODE = dev$$|RUN_MODE = prod|' \ > -e 's|^ROOT =$$|ROOT = ${GOGS_DBDIR}/repositories|' \ >- -e 's|^RUN_USER = git$$|RUN_USER = ${USERS}|' \ >+ -e 's|^ROOT_PATH =$$|ROOT_PATH = ${GOGS_LOGDIR}|' \ > -e 's|^DB_TYPE = mysql$$|DB_TYPE = sqlite3|' \ > ${WRKSRC}/conf/app.ini > >@@ -62,10 +65,11 @@ > ${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}${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}${GOGS_DBDIR}/data ${STAGEDIR}${GOGS_DBDIR}/repositories ${STAGEDIR}${GOGS_DBDIR}/home >+ @${MKDIR} ${STAGEDIR}${ETCDIR}/conf >+ @${MKDIR} ${STAGEDIR}${ETCDIR}/https >+ ${INSTALL_DATA} ${WRKSRC}/conf/app.ini ${STAGEDIR}${ETCDIR}/conf/app.ini.sample >+ @${RLN} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/custom >+ @${MKDIR} ${STAGEDIR}${GOGS_DBDIR}/data ${STAGEDIR}${GOGS_DBDIR}/repositories > @${LN} -sf ${GOGS_DBDIR}/data ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/data > @${MKDIR} ${STAGEDIR}${GOGS_LOGDIR} > @${LN} -sf ${GOGS_LOGDIR} ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/log >Index: devel/gogs/files/gogs-rm-data.in >=================================================================== >--- devel/gogs/files/gogs-rm-data.in (revision 456223) >+++ devel/gogs/files/gogs-rm-data.in (working copy) >@@ -17,5 +17,4 @@ > esac > done > >-rm -rf %%GOGS_DBDIR%%/*/* %%GOGS_DBDIR%%/*/.ssh \ >- %%GOGS_LOGDIR%%/* /var/log/gogs.log >+rm -rf %%GOGS_DBDIR%%/*/* %%GOGS_LOGDIR%%/* /var/log/gogs.log >Index: devel/gogs/files/gogs-service.in >=================================================================== >--- devel/gogs/files/gogs-service.in (revision 456223) >+++ devel/gogs/files/gogs-service.in (working copy) >@@ -24,6 +24,7 @@ > load_rc_config ${name} > > : ${%%PORTNAME%%_enable="NO"} >+: ${%%PORTNAME%%_config="%%ETCDIR%%/conf/app.ini"} > > is_process_running() { > local pidfile=$1 >@@ -43,11 +44,11 @@ > return 1 > fi > export USER=%%GOGS_USER%% >- export HOME=$(getent passwd %%GOGS_USER%% | cut -d: -f6) >+ export HOME=$(echo ~%%GOGS_USER%%) > 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 >Index: devel/gogs/files/gogs.in >=================================================================== >--- devel/gogs/files/gogs.in (revision 456223) >+++ devel/gogs/files/gogs.in (working copy) >@@ -2,5 +2,5 @@ > > cd %%PREFIX%%/libexec/%%PORTNAME%% && > USER=%%GOGS_USER%% \ >-HOME=$(getent passwd %%GOGS_USER%% | cut -d: -f6) \ >-su -m %%GOGS_USER%% -c './%%PORTNAME%% web' >+HOME=$(echo ~%%GOGS_USER%%) \ >+su -m %%GOGS_USER%% -c './%%PORTNAME%% web --config %%ETCDIR%%/conf/app.ini' >Index: devel/gogs/files/patch-templates_install.tmpl >=================================================================== >--- devel/gogs/files/patch-templates_install.tmpl (revision 456223) >+++ devel/gogs/files/patch-templates_install.tmpl (working copy) >@@ -1,4 +1,4 @@ >---- templates/install.tmpl.orig 2017-11-17 23:20:54 UTC >+--- templates/install.tmpl.orig 2017-11-22 19:46:14 UTC > +++ templates/install.tmpl > @@ -8,12 +8,9 @@ > <div class="ui attached segment"> >@@ -37,3 +37,12 @@ > <label for="run_user">{{.i18n.Tr "install.run_user"}}</label> > <input id="run_user" name="run_user" value="{{.run_user}}" required> > <span class="help">{{.i18n.Tr "install.run_user_helper"}}</span> >+@@ -115,7 +112,7 @@ >+ <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gogs.io" required> >+ <span class="help">{{.i18n.Tr "install.app_url_helper"}}</span> >+ </div> >+- <div class="inline required field"> >++ <div class="disabled inline required field"> >+ <label for="log_root_path">{{.i18n.Tr "install.log_root_path"}}</label> >+ <input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required> >+ <span class="help">{{.i18n.Tr "install.log_root_path_helper"}}</span> >Index: devel/gogs/files/pkg-message.in >=================================================================== >--- devel/gogs/files/pkg-message.in (revision 456223) >+++ devel/gogs/files/pkg-message.in (working copy) >@@ -13,7 +13,7 @@ > 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%%/conf/app.ini. > You can only edit it when %%PORTNAME%% isn't running. > > %%PORTNAME_FANCY%% needs an SSH daemon, so make sure sure you execute: >Index: devel/gogs/pkg-plist >=================================================================== >--- devel/gogs/pkg-plist (revision 456223) >+++ devel/gogs/pkg-plist (working copy) >@@ -1,6 +1,8 @@ > bin/gogs > bin/gogs-rm-data >-@(%%GOGS_USER%%,%%GOGS_GROUP%%,640) libexec/gogs/custom/conf/app.ini >+@dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%ETCDIR%%/conf >+@dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%ETCDIR%%/https >+@sample(%%GOGS_USER%%,%%GOGS_GROUP%%,640) %%ETCDIR%%/conf/app.ini.sample > etc/rc.d/gogs > libexec/gogs/conf/app.ini > libexec/gogs/conf/gitignore/Actionscript >@@ -232,6 +234,7 @@ > libexec/gogs/conf/locale/TRANSLATORS > libexec/gogs/conf/README.md > libexec/gogs/conf/readme/Default >+libexec/gogs/custom > libexec/gogs/data > libexec/gogs/gogs > libexec/gogs/log >@@ -1719,10 +1722,7 @@ > 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) 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 > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%GOGS_DBDIR%% > @dir(%%GOGS_USER%%,%%GOGS_GROUP%%,750) %%GOGS_LOGDIR%%
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
Flags:
dmgk
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 224113
:
188551
|
188581
|
188587
|
188588
|
188590
| 188814