Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] gitea: fix INSTALL script
Date: Sat, 01 Feb 2020 01:27:59 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18705@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

There is a new pull request by sineemore against master on the void-packages repository

https://github.com/sineemore/void-packages gitea-fix-install
https://github.com/void-linux/void-packages/pull/18705

gitea: fix INSTALL script
With current INSTALL sed process reveals generated secret key; it can be viewed by monitoring /proc or by using extrace.
Also sed pattern <SECRET_KEY> fails, since there no such substring in provided sample configuration.

A patch file from https://github.com/void-linux/void-packages/pull/18705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gitea-fix-install-18705.patch --]
[-- Type: text/x-diff, Size: 1627 bytes --]

From f61e95f94c21ed4d80f5ea3e84a83881bc59ef62 Mon Sep 17 00:00:00 2001
From: sineemore <sineemore@disroot.org>
Date: Sat, 1 Feb 2020 03:25:26 +0300
Subject: [PATCH] gitea: fix INSTALL script

With current INSTALL sed process reveals generated secret key; it can be viewed by monitoring /proc or by using extrace.
Also sed pattern <SECRET_KEY> fails, since there no such substring in provided sample configuration.
---
 srcpkgs/gitea/INSTALL  | 6 ++++--
 srcpkgs/gitea/template | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/gitea/INSTALL b/srcpkgs/gitea/INSTALL
index 92e2f390e76..e646bfbd646 100644
--- a/srcpkgs/gitea/INSTALL
+++ b/srcpkgs/gitea/INSTALL
@@ -5,8 +5,10 @@ case "$ACTION" in
 		else
 			# This sets the secret key which would otherwise be
 			# distributed as a static packaged value
-			secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)"
-			sed -i "s!<SECRET_KEY>!$secret!" etc/gitea.conf
+			cp etc/gitea.conf etc/gitea.conf.TMP
+			secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)" \
+			awk '/^SECRET_KEY =/ { print "SECRET_KEY = " ENVIRON["secret"]; next } //' < etc/gitea.conf.TMP > etc.gitea.conf
+			rm etc/gitea.conf.TMP
 		fi
 		chown _gitea:_gitea etc/gitea.conf
 		;;
diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template
index 8b52483458d..a04c001f28f 100644
--- a/srcpkgs/gitea/template
+++ b/srcpkgs/gitea/template
@@ -1,7 +1,7 @@
 # Template file for 'gitea'
 pkgname=gitea
 version=1.10.1
-revision=1
+revision=2
 build_style=go
 go_import_path=code.gitea.io/gitea
 # This could be done with build options, but these are built in with the

             reply	other threads:[~2020-02-01  0:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-01  0:27 voidlinux-github [this message]
2020-02-02 19:09 ` voidlinux-github
2020-02-23 23:41 ` Piraty
2020-02-24 15:25 ` sineemore
2020-02-24 15:32 ` sineemore
2020-04-19 14:43 ` sgn
2020-04-19 22:12 ` sineemore
2020-04-19 22:13 ` sineemore
2020-04-19 22:15 ` sineemore
2020-04-19 22:16 ` sineemore
2020-04-19 22:21 ` [PR PATCH] [Updated] " sineemore
2020-04-19 22:25 ` sineemore
2020-04-19 22:30 ` sineemore
2020-04-20  0:06 ` [PR PATCH] [Merged]: " the-maldridge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18705@inbox.vuxu.org \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).