Bug #15625

Create ikiwiki-staging.setup for staging website

Added by Anonymous 2018-05-29 13:30:28 . Updated 2019-06-27 17:16:46 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Start date:
2019-01-05
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:
309

Description

This file should be added to our master branch. I will prepare this plus ask groente for review.


Subtasks

Bug #16302: Syslog and staging website Rejected

0

Bug #16309: ikiwiki tries to pull/push from git Resolved

0


Related issues

Related to Tails - Bug #15675: Weblate's git repo contains manual modifications which are not translations Resolved 2018-06-19
Related to Tails - Feature #16225: merge hefee/dev/translation-server Resolved 2018-12-14

History

#1 Updated by Anonymous 2018-05-29 13:30:39

  • Status changed from Confirmed to In Progress

#2 Updated by Anonymous 2018-05-29 13:43:20

  • Feature Branch set to 451f:tails/feature/15625+ikiwiki-staging

#3 Updated by Anonymous 2018-05-29 13:50:19

  • Assignee set to groente
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA

Created the two files in 3a7596cf47.

#4 Updated by Anonymous 2018-06-12 14:10:51

If you wonder why these two files should be in Git even though they are possibly used only on the translation platform:

- we want to allow people to use these files on their local clones

- these files will make it easier to add new languages to Weblate and it’s staging wiki.
- it will not make Weblate’s git repo diverge from upstream as it currently does by modifying, but (luckily) not committing these files.

#5 Updated by Anonymous 2018-06-19 10:47:41

Any progress on the reviewing front? :)

#6 Updated by groente 2018-06-27 12:18:59

  • Assignee deleted (groente)
  • QA Check changed from Ready for QA to Info Needed

hey, sorry for the long wait. i have two questions:

- if you want people to use these files on their local clones, shouldn’t there also be a —staging flag to the build-website script?

- won’t weblate’s git repo diverge from upstream anyway as it needs different url and destdir settings?

#7 Updated by Anonymous 2018-11-02 18:31:24

  • Assignee set to groente

groente wrote:
> hey, sorry for the long wait. i have two questions:
>
> - if you want people to use these files on their local clones, shouldn’t there also be a —staging flag to the build-website script?

I don’t know.. maybe.

> - won’t weblate’s git repo diverge from upstream anyway as it needs different url and destdir settings?

Yes it will but. We aim at merging stuff from Weblate back to main.git. Hence the currently diverging ikiwiki.setup on weblate.git needs to die. Instead, we need to have two clean ikiwiki.setup files, one used on main.git, one used by staging. weblate.git MUST not have a divering setup file. This is currently an aberration of manually fiddling with this :) Also see https://labs.riseup.net/code/issues/15675

Please tell me that staging’s puppet setup does not use this abberation :) If it does, we need to fix this, and I hope we can fix this using the files in this ticket here Bug #15625. Thanks!

#8 Updated by Anonymous 2018-11-02 18:45:58

I can currently not push to my repo and the branch is outdated. But it would be sufficient to

checkout -f my branch and merge with master.

#9 Updated by Anonymous 2018-11-02 18:47:40

  • related to Bug #15675: Weblate's git repo contains manual modifications which are not translations added

#10 Updated by hefee 2018-11-12 16:26:28

Without a solution for ikiwiki-staging.setup, the staging wiki is not published corectly. Currently the destdir is set to staging/ instead of the needed /var/www/staging/

I’ll fix this localy to have a propper build.

but we can control this by the cmdline interface of ikiwiki:

./build-website —set destdir=/var/www/staging

#11 Updated by hefee 2018-12-14 03:10:14

#12 Updated by hefee 2018-12-14 03:26:56

  • QA Check changed from Info Needed to Dev Needed
  • Feature Branch deleted (451f:tails/feature/15625+ikiwiki-staging)

With Feature #16225 the cronjob itself takes care about the correct values for the staging build within suggestions-cronjob.sh.
But using the ikiwiki.setup from tails repo is not the best idea. Let’s use the exact same setup, that is used for production:

  • install and use templates/website/ikiwiki.setup.erb
  • and with the overwrite of the parameters in suggestions-cronjob.sh it should run successfully.
    (or create a ikiwiki.setup with the extended language list and the correct destdir).

#13 Updated by groente 2019-01-04 15:46:29

  • Assignee changed from groente to hefee
  • QA Check changed from Dev Needed to Ready for QA

there’s now a puppet-generated ikiwiki.setup in /var/lib/weblate/config/ikiwiki.setup - can you check if that looks okay?

the languages are now commonly defined for both ikiwiki.setup and lang.json in puppet-tails:manifests/weblate/languages.pp

as for keeping this all out of the git repo, we still need to deal with the build-script that is inside the repo, i see two options:

1. put an adapted version of build-website in /var/lib/weblate/scripts
2. forget about the sanity check and have the cronjob call ikiwiki directly

I’m not sure how important the sanity check is, but option 2 would leave the whole setup quite a bit less hairy.

#14 Updated by groente 2019-01-04 20:20:57

adapted the suggestions-cronjob.sh script to run the sanity-check that was called from the build-website script and conditionally run ikiwiki, using the ikiwiki.setup file in /var/lib/weblate/config.

let me know if you catch any errors in the cron output.

#15 Updated by hefee 2019-01-11 16:17:15

  • Status changed from In Progress to Resolved
  • Assignee deleted (hefee)
  • QA Check changed from Ready for QA to Pass

looks fine.