From 5e5bbe07dc9fc18c71694f1cfa3839ce9dd06292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 30 Jul 2020 12:16:04 +0200 Subject: [PATCH 1/3] Restart gitea after upgrading it --- site-cookbooks/kosmos_gitea/recipes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/site-cookbooks/kosmos_gitea/recipes/default.rb b/site-cookbooks/kosmos_gitea/recipes/default.rb index e159833..dea96a4 100644 --- a/site-cookbooks/kosmos_gitea/recipes/default.rb +++ b/site-cookbooks/kosmos_gitea/recipes/default.rb @@ -112,6 +112,7 @@ remote_file gitea_binary_path do source node['kosmos_gitea']['binary_url'] checksum node['kosmos_gitea']['binary_checksum'] mode "0755" + notifies :restart, "service[gitea]", :delayed end execute "systemctl daemon-reload" do From 924f67d8a84bee048d1dc22070271f4c9094c62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 30 Jul 2020 12:16:31 +0200 Subject: [PATCH 2/3] Update Gitea to 1.12.3 Closes #189 --- site-cookbooks/kosmos_gitea/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-cookbooks/kosmos_gitea/attributes/default.rb b/site-cookbooks/kosmos_gitea/attributes/default.rb index 90251d8..3fa3473 100644 --- a/site-cookbooks/kosmos_gitea/attributes/default.rb +++ b/site-cookbooks/kosmos_gitea/attributes/default.rb @@ -1,6 +1,6 @@ -gitea_version = "1.11.5" +gitea_version = "1.12.3" node.default["kosmos_gitea"]["version"] = gitea_version node.default["kosmos_gitea"]["binary_url"] = "https://dl.gitea.io/gitea/#{gitea_version}/gitea-#{gitea_version}-linux-amd64" -node.default["kosmos_gitea"]["binary_checksum"] = "d8d43c13e71596c79b541e85e29defe065b4f70ac5155e6d0212bcfc669e1b9c" +node.default["kosmos_gitea"]["binary_checksum"] = "6bfda9a12dc248360d34954b087ca6319f7310c61dc32b34c5e0675fdd45e0f4" node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org" node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea" From 41fd1576ad862553567b372a2efb3650964fd525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 30 Jul 2020 12:33:09 +0200 Subject: [PATCH 3/3] Override the header template to remove the Roboto font Using the system font instead --- .../files/custom/templates/custom/header.tmpl | 3 +++ site-cookbooks/kosmos_gitea/recipes/default.rb | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl diff --git a/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl b/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl new file mode 100644 index 0000000..61f1c59 --- /dev/null +++ b/site-cookbooks/kosmos_gitea/files/custom/templates/custom/header.tmpl @@ -0,0 +1,3 @@ + diff --git a/site-cookbooks/kosmos_gitea/recipes/default.rb b/site-cookbooks/kosmos_gitea/recipes/default.rb index dea96a4..2cc43c5 100644 --- a/site-cookbooks/kosmos_gitea/recipes/default.rb +++ b/site-cookbooks/kosmos_gitea/recipes/default.rb @@ -56,7 +56,7 @@ directory working_directory do mode "0750" end -%w(custom custom/options custom/options/label).each do |path| +%w(custom custom/options custom/options/label custom/templates custom/templates/custom).each do |path| directory "#{working_directory}/#{path}" do owner "git" group "git" @@ -70,6 +70,16 @@ cookbook_file "#{working_directory}/custom/options/label/Kosmos" do owner "git" group "git" mode "0640" + notifies :restart, "service[gitea]", :delayed +end + +# Kosmos header template +cookbook_file "#{working_directory}/custom/templates/custom/header.tmpl" do + source "custom/templates/custom/header.tmpl" + owner "git" + group "git" + mode "0640" + notifies :restart, "service[gitea]", :delayed end directory config_directory do