freedom-maker: port freedom-maker to aramo

This commit is contained in:
Luis Guzmán 2022-10-01 20:45:19 +00:00
parent 6c91649405
commit 05a3f2aa37
9 changed files with 834 additions and 0 deletions

View file

@ -0,0 +1,76 @@
diff --git a/freedommaker/tests/test_library.py b/freedommaker/tests/test_library.py
index 2cc840a..6e63917 100644
--- a/freedommaker/tests/test_library.py
+++ b/freedommaker/tests/test_library.py
@@ -422,13 +422,13 @@ modify x x
@patch('freedommaker.library.run')
def test_debootstrap(self, run):
"""Test debootstrapping."""
- library.debootstrap(self.state, 'i386', 'stretch', 'minbase',
- ['main', 'contrib'], ['p1', 'p2'],
- 'http://deb.debian.org/debian')
+ library.debootstrap(self.state, 'amd64', 'nabia', 'minbase',
+ ['main'], ['p1', 'p2'],
+ 'http://archive.trisquel.org/trisquel')
run.assert_called_with([
- 'debootstrap', '--arch=i386', '--variant=minbase',
- '--components=main,contrib', '--include=p1,p2', 'stretch',
- self.state['mount_point'], 'http://deb.debian.org/debian'
+ 'debootstrap', '--arch=amd64', '--variant=minbase',
+ '--components=main', '--include=p1,p2', 'nabia',
+ self.state['mount_point'], 'http://archive.trisquel.org/trisquel'
])
self.assertEqual(self.state['cleanup'], [[
@@ -574,31 +574,37 @@ ff02::2 ip6-allrouters
sources_path = self.state['mount_point'] + '/etc/apt/sources.list'
stable_content = '''
-deb http://deb.debian.org/debian stable main
-deb-src http://deb.debian.org/debian stable main
+deb http://archive.trisquel.org/trisquel nabia main
+deb-src http://archive.trisquel.org/trisquel nabia main
-deb http://deb.debian.org/debian stable-updates main
-deb-src http://deb.debian.org/debian stable-updates main
+deb http://archive.trisquel.org/trisquel nabia-updates main
+deb-src http://archive.trisquel.org/trisquel nabia-updates main
-deb http://security.debian.org/debian-security/ stable-security main
-deb-src http://security.debian.org/debian-security/ stable-security main
+deb http://archive.trisquel.org/trisquel nabia-security main
+deb-src http://archive.trisquel.org/trisquel nabia-security main
'''
with self.assert_file_change(sources_path, None, stable_content):
- library.setup_apt(self.state, 'http://deb.debian.org/debian',
- 'stable', ['main'])
+ library.setup_apt(self.state, 'http://archive.trisquel.org/trisquel',
+ 'nabia', ['main'])
self.assertEqual(run.call_args_list, [
call(self.state, ['apt-get', 'update']),
call(self.state, ['apt-get', 'clean'])
])
- unstable_content = '''
-deb http://ftp.us.debian.org/debian unstable main contrib non-free
-deb-src http://ftp.us.debian.org/debian unstable main contrib non-free
+ aramo_content = '''
+deb http://archive.trisquel.org/trisquel aramo main
+deb-src http://archive.trisquel.org/trisquel aramo main
+
+deb http://archive.trisquel.org/trisquel aramo-updates main
+deb-src http://archive.trisquel.org/trisquel aramo-updates main
+
+deb http://archive.trisquel.org/trisquel aramo-security main
+deb-src http://archive.trisquel.org/trisquel aramo-security main
'''
- with self.assert_file_change(sources_path, None, unstable_content):
- library.setup_apt(self.state, 'http://ftp.us.debian.org/debian',
- 'unstable', ['main', 'contrib', 'non-free'])
+ with self.assert_file_change(sources_path, None, aramo_content):
+ library.setup_apt(self.state, 'http://archive.trisquel.org/trisquel',
+ 'aramo', ['main'])
@patch('freedommaker.library.run_in_chroot')
def test_setup_flash_kernel(self, run):