Feature #7036

Move custom software to our main Git repository

Added by intrigeri 2014-04-07 08:40:11 . Updated 2020-05-12 13:06:57 .

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
Due date:
% Done:

75%

Feature Branch:
Type of work:
Code
Starter:
0
Affected tool:
Deliverable for:

Description

See the blueprint.


Subtasks

Feature #16912: Move greeter source to main git repo Resolved anonym

0

Feature #16935: Move tailslib to main repo Resolved intrigeri

0

Feature #16936: Move WhisperBack source to our main Git repository Confirmed

0

Bug #17526: Move tails-persistence-setup to tails.git Resolved intrigeri

100


Related issues

Related to Tails - Feature #5506: Split Git Rejected 2013-09-11
Related to Tails - Feature #7087: Do not bundle Tor Launcher in the main Tails Git repository Resolved 2014-04-15
Related to Tails - Feature #9171: Refactor tails-custom-apt-sources and tails-diff-suite duplicated code Confirmed 2015-04-07
Related to Tails - Feature #7221: Write a script that deletes old merged Git branches Resolved
Related to Tails - Feature #15864: Make onboarding of new developers easier In Progress 2018-08-30
Related to Tails - Bug #15778: Make the Tails Installer upstream tarball DFSG-free Confirmed 2018-08-09
Related to Tails - Feature #16095: Curate the list of languages in Tails Greeter Resolved 2018-11-04
Related to Tails - Feature #6442: Run Cucumber and Test::Spec tests at tails-iuk Debian package build time Duplicate 2013-11-27
Related to Tails - Feature #10085: Port Tails Installer to Python 3 In Progress 2015-08-24
Related to Tails - Bug #14516: Lower technical requirements for new contributors Confirmed 2017-08-30
Has duplicate Tails - Feature #16678: Integrate Tails-specific Debian packages into the main git repo Duplicate
Blocks Tails - Feature #12111: APT snapshots: add arm64 architecture Confirmed 2017-01-03
Blocks Tails - Feature #6218: Run our custom programs test suite on interesting commits Confirmed 2013-08-07
Blocks Tails - Feature #6220: Automated Debian package build infrastructure Confirmed 2013-08-07
Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

History

#1 Updated by intrigeri 2014-04-07 08:44:11

#2 Updated by intrigeri 2014-05-26 02:43:37

  • related to Feature #7087: Do not bundle Tor Launcher in the main Tails Git repository added

#3 Updated by intrigeri 2014-07-20 15:46:27

  • Subject changed from Manage custom software as Git submodules to Manage custom software as Git submodules or similar
  • Type of work changed from Code to Research

#4 Updated by intrigeri 2014-08-02 17:04:30

  • Blueprint set to https://tails.boum.org/blueprint/Git_sub-repositories/

#5 Updated by intrigeri 2014-08-02 17:13:19

  • Description updated

#6 Updated by intrigeri 2014-08-14 05:15:42

  • related to Feature #6220: Automated Debian package build infrastructure added

#7 Updated by intrigeri 2015-04-07 15:15:17

  • related to Feature #9171: Refactor tails-custom-apt-sources and tails-diff-suite duplicated code added

#8 Updated by intrigeri 2015-05-04 07:54:16

  • related to Feature #7221: Write a script that deletes old merged Git branches added

#9 Updated by intrigeri 2019-04-07 08:47:49

A discussion with @segfault convinced me that at least some of the components that currently live in their own Git repo, and that we include as custom Debian packages in the images we build, should instead live in our main tails.git repo. For example, there’s very little value in having Tails Greeter in its own repo, while it does significantly increase friction and overhead when working on its codebase.

#10 Updated by intrigeri 2019-04-07 09:41:07

  • related to Feature #15864: Make onboarding of new developers easier added

#11 Updated by intrigeri 2019-04-28 08:04:08

  • has duplicate Feature #16678: Integrate Tails-specific Debian packages into the main git repo added

#12 Updated by intrigeri 2019-04-28 08:12:12

segfault wrote on Feature #16678:
> We maintain some Debian packages which are solely used in Tails and cannot reasonably used outside of Tails. IMO, maintaining these as Debian packages makes our lives unnecessarily harder, because we have to release, build, and upload a new Debian package every time we change something in these packages.
>
> We also share code between the main repo and some packages, which makes it hard to find usages/implementations.
>
> The two packages I currently have in mind are tails-greeter and tails-persistence-setup.
>
> I propose that we integrate them into the main git repo by copying the files that are installed by the package into config/chroot_local_includes.

Fully agreed in principle for these 2 repos. Potential difficulties:

  • tails-persistence-setup might require special care to keep its own test suite working
  • PO/POT files management: currently these are translated under their own Transifex resources; I don’t know if/how we can preserve existing translations across this migration

I think WhisperBack and Tails Installer would be good candidates for this first batch too.

Some other candidates (tails-iuk, tails-perl5lib) might be a bit less simple since IIRC RMs need to install the resulting packages on their system, or similar. Let’s do some easier ones first :)

Next step: try this for one repo and see how it goes wrt. POT/PO files.

#13 Updated by segfault 2019-07-21 18:00:50

  • Assignee set to segfault

#14 Updated by segfault 2019-07-21 18:02:59

  • Subject changed from Manage custom software as Git submodules or similar to Move custom software to main git repo

#15 Updated by segfault 2019-07-21 18:59:24

I would like to start with the greeter, and then move pythonlib to config/chroot_local_includes.

#16 Updated by intrigeri 2019-08-04 08:05:24

  • related to Bug #15778: Make the Tails Installer upstream tarball DFSG-free added

#17 Updated by sajolida 2019-08-11 21:07:36

  • related to Feature #16095: Curate the list of languages in Tails Greeter added

#18 Updated by intrigeri 2019-09-17 08:43:19

#19 Updated by intrigeri 2019-09-19 06:23:08

  • blocks Feature #6218: Run our custom programs test suite on interesting commits added

#20 Updated by intrigeri 2019-09-19 06:24:16

  • related to deleted (Feature #6220: Automated Debian package build infrastructure)

#21 Updated by intrigeri 2019-09-19 06:24:19

  • blocks Feature #6220: Automated Debian package build infrastructure added

#22 Updated by intrigeri 2019-10-14 12:35:09

  • Description updated
  • Status changed from Confirmed to In Progress
  • Type of work changed from Research to Code

#23 Updated by intrigeri 2019-10-14 13:26:37

intrigeri wrote:
> Some other candidates (tails-iuk, tails-perl5lib) might be a bit less simple since IIRC RMs need to install the resulting packages on their system, or similar.

I thought about this again while working in these 2 repositories yesterday and remembering how painful it is to validate such work in the context of a real Tails system, anticipating on how my work on Feature #15281 would be easier if we integrated these code bases in a different manner.

So I’ve looked into this problem a bit and our 3 Perl codebases (perl5lib, iuk, persistence) are in similar situations:

  • The main added complexity in the upstream and Debian build systems comes from the localization stuff, which we would simply get rid of if we moved these files to tails.git: we already have all the bits in place to manage Perl + Locale::gettext there. So we lose nothing on this front, yeah.
  • Regarding automated tests run by developers, reviewers, RMs, and/or some kind of CI, this is the most unclear part for me at the moment. It depends on when/where we want to run these tests.
    • Dist::Zilla generates some static analysis tests automatically: code & POD formatting. Perhaps we can drop a dist.ini file at the root of tails.git and configure/tweak things so that we don’t have to reinvent this wheel or to switch to a totally different system.
    • On top of the static code analysis mentioned above, 2 of these 3 codebases have quite extensive test suites (rspec and cucumber -style). We currently run them whenever we prepare new releases of these codebases. Some of the tests need to do privileged operations which might be tricky in container environments (thinking of GitLab CI). They might occasionally leave the system in a dirty state when something goes really wrong. This set of constraints looks suspiciously like the Tails test suite’s ones so dedicated tester VMs like we have on Jenkins could fit the bill. But ideally we want to run these tests on the same version of Debian as the one which the target Tails system is based on (we currently get part of that via pbuilder/sbuild, for the tests that can run in there); as it happens, currently our isotesters run Stretch but we target Buster; this has happened in the past and will happen again. This seems to call for a Vagrant-like system to run these test suites in a suitable environment.
    • For the first iteration, IMO we should only aim to provide means for developers, reviewers, and RMs to run these tests locally, sometimes with different versions of the dependencies than what ends up in Tails, just like they’ve been doing so far. Running this in CI can come later.
  • Regarding RMs and dependency tracking, there are two things:
    • In our release process we simply point the PERL5LIB environment variable to wherever the RM has cloned this repo, so if we move these files to tails.git, we can get make this a constant; great.
    • RMs run code that lives in the tails-iuk package, which currently depends on the tails-perl5lib package, so they get the dependencies they need via APT, because we currently maintain the list of these dependencies in debian/control. If we move perl5lib to tails.git, then we need a different way for RMs to know which dependencies they need to install. The option I’m thinking of at the moment is to list these dependencies in a new config/chroot_local-packageslists/tails-perl5lib.list file. Compared to the current debian/control and dist.ini dependency management:
      • We lose the ability to declare versioned dependencies, but I’m willing to take the risk.
      • We lose the ability to declare dependencies that are only needed to run the tests. I can think of various solutions already, depending on where/when we want to run the tests, so I’m not too worried about this.

While working on Feature #15281, if I get too annoyed by the current state of things, I might give a try to the cheapest possible way to do this migration, and we’ll see how it goes.

#24 Updated by segfault 2019-10-15 13:45:15

intrigeri wrote:
> On top of the static code analysis mentioned above, 2 of these 3 codebases have quite extensive test suites (rspec and cucumber -style). We currently run them whenever we prepare new releases of these codebases. Some of the tests need to do privileged operations which might be tricky in container environments (thinking of GitLab CI).

GitLab CI also supports VM executors. VirtualBox is supported natively [1], and using libvirt is possible via the custom executor [2] (but I never used the latter, so I don’t know how well that works).

[1] https://docs.gitlab.com/runner/executors/virtualbox.html
[2] https://docs.gitlab.com/runner/executors/custom_examples/libvirt.html

> While working on Feature #15281, if I get too annoyed by the current state of things, I might give a try to the cheapest possible way to do this migration, and we’ll see how it goes.

Cool!

#25 Updated by intrigeri 2019-10-19 16:26:37

  • related to Feature #6442: Run Cucumber and Test::Spec tests at tails-iuk Debian package build time added

#26 Updated by intrigeri 2019-11-14 08:28:12

#27 Updated by intrigeri 2019-12-22 21:04:56

  • Description updated

#28 Updated by intrigeri 2019-12-22 22:53:34

  • Description updated

#29 Updated by intrigeri 2019-12-25 10:23:17

  • Description updated

OK, so perl5lib and iuk are done via Feature #15281. I’m glad I found a way to get the benefits from the move (this greatly simplified the work I did on Feature #15281 and friends in the last few days), without losing the benefits of storing each of those codebases as a standard Perl source dist managed with Dist::Zilla. Wrt. Perl code, for me it’s the best of both worlds :) I did not look at persistence-setup yet; likely the same recipe will work, but there might be something special; we’ll see; chances are that I migrate it next time I have to work on this codebase.

#30 Updated by segfault 2020-01-05 18:42:52

  • Assignee deleted (segfault)

intrigeri wrote:
> OK, so perl5lib and iuk are done via Feature #15281. I’m glad I found a way to get the benefits from the move (this greatly simplified the work I did on Feature #15281 and friends in the last few days), without losing the benefits of storing each of those codebases as a standard Perl source dist managed with Dist::Zilla. Wrt. Perl code, for me it’s the best of both worlds :) I did not look at persistence-setup yet; likely the same recipe will work, but there might be something special; we’ll see; chances are that I migrate it next time I have to work on this codebase.

Awesome! I’m unassigning myself since I’m not the only one working on this :)

#31 Updated by intrigeri 2020-03-18 16:21:31

  • related to Bug #17526: Move tails-persistence-setup to tails.git added

#32 Updated by intrigeri 2020-03-26 09:48:11

  • Description updated

#33 Updated by intrigeri 2020-03-26 09:55:52

#34 Updated by intrigeri 2020-03-26 09:56:37

  • related to Bug #14516: Lower technical requirements for new contributors added

#35 Updated by intrigeri 2020-05-12 13:06:57

  • Subject changed from Move custom software to main git repo to Move custom software to our main Git repository