Bug 227028 - www/gitea remove bash dependency
Summary: www/gitea remove bash dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2018-03-28 11:36 UTC by Ivan
Modified: 2018-05-05 08:26 UTC (History)
1 user (show)

See Also:
stb: maintainer-feedback+

Remove dependency on bash and adjust default config (756 bytes, text/plain)
2018-04-05 15:37 UTC, stb
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2018-03-28 11:36:31 UTC
I think we should remove bash dependency as gitea allows to set SCRIPT_TYPE = sh as gogs does.
Comment 1 stb 2018-03-28 11:48:02 UTC
When I created the port initially, Gitea didn't work correctly without bash installed. I don't recall what the problem was specifically.

Can you test running Gitea without bash being installed, and report what functionality would be affected, and what config changes you ended up making?
Comment 2 Ivan 2018-03-28 12:53:11 UTC
I'm running gitea without bash, but I use it only slightly (https commits, repository viewer).
I've searched source code, shell is used only in hooks, for linux and docker packaging. 

SCRIPT_TYPE is used in hook generation routine, defaults are very simple and works under sh perfectly.

From my point of view, we can drop bash or make it optional (enabled but default?).
Comment 3 stb 2018-04-05 15:37:46 UTC
Created attachment 192247 [details]
Remove dependency on bash and adjust default config

Remove the dependency on shells/bash and adjust the default config to use /bin/sh.

Gitea appears to use shell scripts for some repository operations, and these scripts appear to be pure Bourne shell.

If bash is installed, it can still be used by changing the SCRIPT_TYPE variable, or commenting out (the default is 'bash').
Comment 4 Tobias Kortkamp freebsd_committer 2018-04-05 19:54:12 UTC
(In reply to stb from comment #3)
I think this deserves an UPDATING entry too, since it has the potential to break
things for some if the bash run dependency is suddenly gone.
Comment 5 stb 2018-05-04 21:01:39 UTC
(In reply to Tobias Kortkamp from comment #4)
Should I add an UPDATING entry to my patch? Or just a paragraph the committer should add to UPDATING?

Here's a suggested text for UPDATING:

  AFFECTS: users of www/gitea
  AUTHOR: stb@lassitu.de

  The www/gitea port no longer requires shell/bash.  If you want to stop using bash and deinstall the package, make sure to set the configuration in etc/gitea/conf/app.ini, section [repository], SCRIPT_TYPE to "sh".  See app.ini.sample for an example.
Comment 6 commit-hook freebsd_committer 2018-05-05 08:24:05 UTC
A commit references this bug:

Author: krion
Date: Sat May  5 08:23:08 UTC 2018
New revision: 469092
URL: https://svnweb.freebsd.org/changeset/ports/469092

  Update to version 1.4.1

  * remove superfluous bash dependency in favor /bin/sh

  PR:		227976 [1], 227028 [2]
  Submitted by:	maintainer [1], Ivan <bsd@abinet.ru> [2]
  Approved by:	maintainer [2]

Comment 7 commit-hook freebsd_committer 2018-05-05 08:26:09 UTC
A commit references this bug:

Author: krion
Date: Sat May  5 08:25:25 UTC 2018
New revision: 469094
URL: https://svnweb.freebsd.org/changeset/ports/469094

  Reflect changes in www/gitea in r469092

  PR:		227028
  Submitted by:	stb@lassitu.de