From 9194f62f5afb9c02c816aabe5c813afaa343abc6 Mon Sep 17 00:00:00 2001 From: bill-auger <mr.j.spam.me@gmail.com> Date: Mon, 23 May 2022 13:06:19 -0400 Subject: [PATCH 1/7] [freedom-maker]: initial patches for v0.26 --- ...01-documentation_could-be-upstreamed.patch | 157 ++++++++ ...distro-fork-name_could-be-upstreamed.patch | 27 ++ .../0003-trisquelize-documentation.patch | 185 +++++++++ .../0004-trisquelize-distro-fork-name.patch | 13 + .../freedom-maker/0005-trisquelize-code.patch | 54 +++ .../0006-remove-nonfree-support.patch | 370 ++++++++++++++++++ helpers/make-freedom-maker | 33 ++ 7 files changed, 839 insertions(+) create mode 100644 helpers/DATA/freedom-maker/0001-documentation_could-be-upstreamed.patch create mode 100644 helpers/DATA/freedom-maker/0002-generalize-distro-fork-name_could-be-upstreamed.patch create mode 100644 helpers/DATA/freedom-maker/0003-trisquelize-documentation.patch create mode 100644 helpers/DATA/freedom-maker/0004-trisquelize-distro-fork-name.patch create mode 100644 helpers/DATA/freedom-maker/0005-trisquelize-code.patch create mode 100644 helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch create mode 100644 helpers/make-freedom-maker diff --git a/helpers/DATA/freedom-maker/0001-documentation_could-be-upstreamed.patch b/helpers/DATA/freedom-maker/0001-documentation_could-be-upstreamed.patch new file mode 100644 index 00000000..628a9d50 --- /dev/null +++ b/helpers/DATA/freedom-maker/0001-documentation_could-be-upstreamed.patch @@ -0,0 +1,157 @@ +diff --git a/README.md b/README.md +index b7931bb..3fb54f4 100644 +--- a/README.md ++++ b/README.md +@@ -26,28 +26,29 @@ tweaks, see the *Build Images* section below. + + Freedom-maker supports building for the following targets: + +- +-- *a20-olinuxino-lime*: A20 OLinuXino Lime's SD card +-- *a20-olinuxino-lime2*: A20 OLinuXino Lime2's SD card +-- *a20-olinuxino-micro*: A20 OLinuXino MICRO's SD card +-- *amd64*: Disk image for any machine with amd64 architecture +-- *banana-pro*: Banana Pro's SD card +-- *beaglebone*: BeagleBone Black's SD card +-- *cubieboard2*: Cubieboard2's SD card +-- *cubietruck*: Cubietruck's SD card +-- *i386*: Disk image for any machine with i386 architecture +-- *lamobo-r1*: Lamobo R1 aka BananaPi Router SD card +-- *pcduino3*: pcDuino3's SD card +-- *pine64-lts*: Pine64 LTS board's SD card +-- *pine64-plus*: Pine64+ board's SD card +-- *qemu-amd64*: 64-bit image for the Qemu virtualization tool +-- *qemu-i386*: 32-bit image for the Qemu virtualization tool +-- *raspberry2*: RasbperryPi 2's SD card +-- *raspberry3*: RasbperryPi 3's SD card +-- *raspberry3-b-plus*: RasbperryPi 3 Model B+'s SD card +-- *test*: build virtualbox i386 image and run diagnostics tests on it +-- *virtualbox-amd64*: 64-bit image for the VirtualBox virtualization tool +-- *virtualbox-i386*: 32-bit image for the VirtualBox virtualization tool ++| target | description | ++|-----------------------|-------------| ++| *a20-olinuxino-lime* | A20 OLinuXino Lime's SD card | ++| *a20-olinuxino-lime2* | A20 OLinuXino Lime2's SD card | ++| *a20-olinuxino-micro* | A20 OLinuXino MICRO's SD card | ++| *amd64* | Disk image for any machine with amd64 architecture | ++| *banana-pro* | Banana Pro's SD card | ++| *beaglebone* | BeagleBone Black's SD card | ++| *cubieboard2* | Cubieboard2's SD card | ++| *cubietruck* | Cubietruck's SD card | ++| *i386* | Disk image for any machine with i386 architecture | ++| *lamobo-r1* | Lamobo R1 aka BananaPi Router SD card | ++| *pcduino3* | pcDuino3's SD card | ++| *pine64-lts* | Pine64 LTS board's SD card | ++| *pine64-plus* | Pine64+ board's SD card | ++| *qemu-amd64* | 64-bit image for the Qemu virtualization tool | ++| *qemu-i386* | 32-bit image for the Qemu virtualization tool | ++| *raspberry2* | RasbperryPi 2's SD card | ++| *raspberry3* | RasbperryPi 3's SD card | ++| *raspberry3-b-plus* | RasbperryPi 3 Model B+'s SD card | ++| *test* | build virtualbox i386 image and run diagnostics tests on it | ++| *virtualbox-amd64* | 64-bit image for the VirtualBox virtualization tool | ++| *virtualbox-i386* | 32-bit image for the VirtualBox virtualization tool | + + ## Running Build + +@@ -69,10 +70,12 @@ Freedom-maker supports building for the following targets: + to run "parted". + + ``` +- $ sudo python3 -m freedommaker a20-olinuxino-lime2 ++ $ sudo python3 -m freedommaker <TARGET> + ``` ++ where: <TARGET> is one of the 'Supported Targets' above. ++ + Take a break from your computer - this takes some time. :) +- ++ + To see the full list of options read the help-page: + ``` + $ python3 -m freedommaker --help +@@ -91,25 +94,47 @@ for this task. Otherwise follow the steps: + + A. Unplug your card. + +- B. Run "lsblk -p" to show which storage devices are connected to your system. ++ B. Run `lsblk -p` to show which storage devices are connected to your system. ++ For example, if your computer has one internal SATA storage device ++ (the most common configuration), it will be identified as */dev/sda*; ++ and the result may look similar to this: ++ ++ $ lsblk -p ++ NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ++ /dev/sda 8:0 0 119.2G 0 disk ++ ├─/dev/sda1 8:1 0 2G 0 part /boot ++ ├─/dev/sda2 8:2 0 22.5G 0 part / ++ └─/dev/sda3 8:3 0 94.8G 0 part /home ++ ++ C. Plug in your SDcard and run `lsblk -p` again. Find the new device and note ++ the name. For example, if the SDcard is unformatted (empty), the result may ++ look similar to this: ++ ++ $ lsblk -p ++ NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ++ /dev/sda 8:0 0 119.2G 0 disk ++ ├─/dev/sda1 8:1 0 2G 0 part /boot ++ ├─/dev/sda2 8:2 0 22.5G 0 part / ++ └─/dev/sda3 8:3 0 94.8G 0 part /home ++ /dev/sdb 8:32 1 29.7G 0 disk ++ ++ Or, if the SDcard is already formatted, it may look more like this: + +- C. Plug your card in and run "lsblk -p" again. Find the new device and note +- the name. +- + $ lsblk -p +- NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +- /dev/sdg 8:0 1 14.9G 0 disk +- /dev/nvme0n1 259:0 0 477G 0 disk +- ├─/dev/nvme0n1p1 259:1 0 512M 0 part /boot/efi +- ├─/dev/nvme0n1p2 259:2 0 244M 0 part /boot +- └─/dev/nvme0n1p3 259:3 0 476.2G 0 part +- └─/dev/mapper/nvme0n1p3_crypt 253:0 0 476.2G 0 crypt +- ├─/dev/mapper/mjw--t470--vg-root 253:1 0 468.4G 0 lvm / +- └─/dev/mapper/mjw--t470--vg-swap_1 253:2 0 7.8G 0 lvm [SWAP] +- +- D. In the above case, the disk that is newly inserted is available +- as */dev/sdg*. You can also verify the size (16 GB in this example). +- Carefully note this and use it in the copying step below. ++ NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ++ /dev/sda 8:0 0 119.2G 0 disk ++ ├─/dev/sda1 8:1 0 2G 0 part /boot ++ ├─/dev/sda2 8:2 0 22.5G 0 part / ++ └─/dev/sda3 8:3 0 94.8G 0 part /home ++ /dev/sdb 8:32 1 29.7G 0 disk ++ ├─/dev/sdb1 8:33 1 100M 0 part ++ └─/dev/sdb2 8:36 1 29.6G 0 part ++ ++ D. In the above cases, the newly inserted SDcard is identified ++ as */dev/sdb*. To be more certain, you can compare the reported sizes ++ (approximately - the SDcard is 30 GB in this example - reported 29.7G). ++ Most importantly, */dev/sda*. is usually not the SDcard. ++ Carefully note this identifier and use it in the copying step below. + + 2. Copy the image to your card. Double check and make sure you don't + write to your computer's main storage (such as /dev/sda). Also +diff --git a/freedommaker/__main__.py b/freedommaker/__main__.py +index 9d29193..cb6a178 100644 +--- a/freedommaker/__main__.py ++++ b/freedommaker/__main__.py +@@ -20,7 +20,15 @@ + Module to provide ability to run this freedommaker package. + + Run the package as: +- python3 -m freedommaker ++ $ sudo python3 -m freedommaker <TARGET> ++where: ++ <TARGET> is one of: ++ $ grep -r 'machine = ' freedommaker/builders/ | cut -d '=' -f 2 ++eg: ++ $ sudo python3 -m freedommaker a20-olinuxino-lime2 ++ ++To see the full list of options read the help-page: ++ $ python3 -m freedommaker --help + """ + + from .application import Application diff --git a/helpers/DATA/freedom-maker/0002-generalize-distro-fork-name_could-be-upstreamed.patch b/helpers/DATA/freedom-maker/0002-generalize-distro-fork-name_could-be-upstreamed.patch new file mode 100644 index 00000000..e25b4c47 --- /dev/null +++ b/helpers/DATA/freedom-maker/0002-generalize-distro-fork-name_could-be-upstreamed.patch @@ -0,0 +1,27 @@ +diff --git a/freedommaker/builder.py b/freedommaker/builder.py +index 0f94d5c..8a13188 100644 +--- a/freedommaker/builder.py ++++ b/freedommaker/builder.py +@@ -23,6 +23,8 @@ import os + + from . import internal, library + ++DISTRO_BRAND = 'Debian' ++ + # initramfs-tools is a dependency for the kernel-image package. However, when + # kernel is not installed, as in case of Raspberry Pi image, explicit dependency + # is needed. +@@ -103,10 +105,11 @@ class ImageBuilder(object): # pylint: disable=too-many-instance-attributes + + def _get_image_base_name(self): + """Return the base file name of the final image.""" +- free_tag = 'free' if self.free else 'nonfree' ++ free_tag = 'libre' if self.free else 'nonfree' + +- return 'freedombox-{distribution}-{free_tag}_{build_stamp}_{machine}' \ ++ return '{distro}freedombox-{distribution}-{free_tag}_{build_stamp}_{machine}' \ + '-{architecture}'.format( ++ distro=DISTRO_BRAND.lower() + '-' if DISTRO_BRAND else '', + distribution=self.arguments.distribution, free_tag=free_tag, + build_stamp=self.arguments.build_stamp, machine=self.machine, + architecture=self.architecture) diff --git a/helpers/DATA/freedom-maker/0003-trisquelize-documentation.patch b/helpers/DATA/freedom-maker/0003-trisquelize-documentation.patch new file mode 100644 index 00000000..b4673f5c --- /dev/null +++ b/helpers/DATA/freedom-maker/0003-trisquelize-documentation.patch @@ -0,0 +1,185 @@ +diff --git a/README.md b/README.md +index 3fb54f4..8b01fbd 100644 +--- a/README.md ++++ b/README.md +@@ -1,7 +1,3 @@ +-[![pipeline status](https://salsa.debian.org/freedombox-team/freedom-maker/badges/master/pipeline.svg)](https://salsa.debian.org/freedombox-team/freedom-maker/commits/master) +-[![Debian Unstable](https://badges.debian.net/badges/debian/unstable/freedom-maker/version.svg)](https://packages.debian.org/unstable/freedom-maker) +-[![Debian Testing](https://badges.debian.net/badges/debian/testing/freedom-maker/version.svg)](https://packages.debian.org/testing/freedom-maker) +- + # Freedom-Maker: The FreedomBox image builder + + These scripts build FreedomBox-images for various supported hardware +@@ -13,9 +9,9 @@ during releases and for advanced users who intend to build their own + images. Regular users who wish to turn their devices into + FreedomBoxes should instead download the pre-built images. + +-Get a pre-built image via https://freedombox.org/download/. There ++Get a pre-built image via https://cdimage.trisquel.info/trisquel-images/. There + are images available for all supported target devices. You also find +-the setup instructions on the [Wiki](https://wiki.debian.org/FreedomBox/). ++the setup instructions on the [Wiki](https://trisquel.info/en/wiki/FreedomBox/). + + If you wish to create your own FreedomBox image, perhaps with some + tweaks, see the *Build Images* section below. +@@ -24,7 +20,7 @@ tweaks, see the *Build Images* section below. + + ## Supported Targets + +-Freedom-maker supports building for the following targets: ++Trisquel Freedom-maker supports building for the following targets: + + | target | description | + |-----------------------|-------------| +@@ -43,25 +39,18 @@ Freedom-maker supports building for the following targets: + | *pine64-plus* | Pine64+ board's SD card | + | *qemu-amd64* | 64-bit image for the Qemu virtualization tool | + | *qemu-i386* | 32-bit image for the Qemu virtualization tool | +-| *raspberry2* | RasbperryPi 2's SD card | +-| *raspberry3* | RasbperryPi 3's SD card | +-| *raspberry3-b-plus* | RasbperryPi 3 Model B+'s SD card | +-| *test* | build virtualbox i386 image and run diagnostics tests on it | +-| *virtualbox-amd64* | 64-bit image for the VirtualBox virtualization tool | +-| *virtualbox-i386* | 32-bit image for the VirtualBox virtualization tool | + + ## Running Build + +-1. Fetch the git source of freedom-maker: ++1. Fetch the 'freedom-maker' source code: + ``` +- $ git clone https://salsa.debian.org/freedombox-team/freedom-maker.git ++ $ apt source freedom-maker + ``` + + 2. Install the required dependencies: + ```shell + $ sudo apt install btrfs-progs debootstrap kpartx parted qemu-user-static sshpass +- $ cd freedom-maker +- $ sudo apt build-dep . ++ $ sudo apt build-dep freedom-maker + ``` + + 3. Build images: +@@ -70,6 +59,7 @@ Freedom-maker supports building for the following targets: + to run "parted". + + ``` ++ $ cd $(find -type d -name 'freedom-maker-*') + $ sudo python3 -m freedommaker <TARGET> + ``` + where: <TARGET> is one of the 'Supported Targets' above. +diff --git a/debian/freedom-maker.1 b/debian/freedom-maker.1 +index 60f3d86..820e84d 100644 +--- a/debian/freedom-maker.1 ++++ b/debian/freedom-maker.1 +@@ -51,17 +51,17 @@ Size of the image to build + .PP + \fB\-\-build\-mirror\fR + .RS 4 +-Debian mirror to use for building ++Trisquel mirror to use for building + .RE + .PP + \fB\-\-mirror\fR + .RS 4 +-Debian mirror to use in built image ++Trisquel mirror to use in built image + .RE + .PP + \fB\-\-distribution\fR + .RS 4 +-Debian release to use in built image ++Trisquel release to use in built image + .RE + .PP + \fB\-\-include\-source\fR +@@ -106,7 +106,7 @@ Force rebuild of images even when required image exists + .PP + \fBtargets\fR + .RS 4 +-Image targets to build\&. Choose one or more of freedommaker, dreamplug, raspberry, raspberry2, beaglebone, cubieboard2, cubietruck, a20\-olinuxino\-lime, a20\-olinuxino\-lime2, a20\-olinuxino\-micro, i386, amd64, virtualbox\-i386, virtualbox\-amd64, qemu\-i386, qemu\-amd64, pcDuino3 ++Image targets to build\&. Choose one or more of freedommaker, dreamplug, beaglebone, cubieboard2, cubietruck, a20\-olinuxino\-lime, a20\-olinuxino\-lime2, a20\-olinuxino\-micro, i386, amd64, qemu\-i386, qemu\-amd64, pcDuino3 + .RE + .SH "EXAMPLES" + .PP +@@ -130,9 +130,9 @@ Build a FreedomBox image for the BeagleBone Single Board Computer\&. + .RS 4 + .\} + .nf +-$ python3 \-m freedommaker dreamplug raspberry raspberry2 ++$ python3 \-m freedommaker dreamplug + beaglebone cubieboard2 cubietruck a20\-olinuxino\-lime a20\-olinuxino\-lime2 +- a20\-olinuxino\-micro i386 amd64 virtualbox\-i386 virtualbox\-amd64 ++ a20\-olinuxino\-micro i386 amd64 + qemu\-i386 qemu\-amd64 pcDuino3 + .fi + .if n \{\ +diff --git a/doc/freedom-maker.xml b/doc/freedom-maker.xml +index 74ce990..349a136 100644 +--- a/doc/freedom-maker.xml ++++ b/doc/freedom-maker.xml +@@ -94,7 +94,7 @@ + <term> <option>--build-mirror</option></term> + <listitem> + <para> +- Debian mirror to use for building ++ Trisquel mirror to use for building + </para> + </listitem> + </varlistentry> +@@ -102,7 +102,7 @@ + <term> <option>--mirror</option></term> + <listitem> + <para> +- Debian mirror to use in built image ++ Trisquel mirror to use in built image + </para> + </listitem> + </varlistentry> +@@ -110,7 +110,7 @@ + <term> <option>--distribution</option></term> + <listitem> + <para> +- Debian release to use in built image ++ Trisquel release to use in built image + </para> + </listitem> + </varlistentry> +diff --git a/freedommaker/application.py b/freedommaker/application.py +index dbe8ca0..0bebc35 100644 +--- a/freedommaker/application.py ++++ b/freedommaker/application.py +@@ -94,15 +94,15 @@ class Application(object): + parser.add_argument( + '--build-mirror', + default=BUILD_MIRROR, +- help='Debian mirror to use for building') ++ help='Trisquel mirror to use for building') + parser.add_argument( + '--mirror', + default=MIRROR, +- help='Debian mirror to use in built image') ++ help='Trisquel mirror to use in built image') + parser.add_argument( + '--distribution', + default=DISTRIBUTION, +- help='Debian release to use in built image') ++ help='Trisquel release to use in built image') + parser.add_argument( + '--package', + action='append', +diff --git a/freedommaker/internal.py b/freedommaker/internal.py +index acc22d8..49bd4a9 100644 +--- a/freedommaker/internal.py ++++ b/freedommaker/internal.py +@@ -275,9 +275,7 @@ class InternalBuilderBackend(): + + def _set_freedombox_disk_image_flag(self): + """Set a flag to indicate that this is a FreedomBox image. +- +- And that FreedomBox is not installed using a Debian package. +- ++ And not a standard Trisquel system with the FreedomBox packages installed. + """ + library.run_in_chroot( + self.state, ['mkdir', '-p', '-m', '755', '/var/lib/freedombox']) diff --git a/helpers/DATA/freedom-maker/0004-trisquelize-distro-fork-name.patch b/helpers/DATA/freedom-maker/0004-trisquelize-distro-fork-name.patch new file mode 100644 index 00000000..273a1af0 --- /dev/null +++ b/helpers/DATA/freedom-maker/0004-trisquelize-distro-fork-name.patch @@ -0,0 +1,13 @@ +diff --git a/freedommaker/builder.py b/freedommaker/builder.py +index 8a13188..343af14 100644 +--- a/freedommaker/builder.py ++++ b/freedommaker/builder.py +@@ -23,7 +23,7 @@ import os + + from . import internal, library + +-DISTRO_BRAND = 'Debian' ++DISTRO_BRAND = 'Trisquel' + + # initramfs-tools is a dependency for the kernel-image package. However, when + # kernel is not installed, as in case of Raspberry Pi image, explicit dependency diff --git a/helpers/DATA/freedom-maker/0005-trisquelize-code.patch b/helpers/DATA/freedom-maker/0005-trisquelize-code.patch new file mode 100644 index 00000000..41ff4723 --- /dev/null +++ b/helpers/DATA/freedom-maker/0005-trisquelize-code.patch @@ -0,0 +1,54 @@ +diff --git a/freedommaker/application.py b/freedommaker/application.py +index 0bebc35..1c012da 100644 +--- a/freedommaker/application.py ++++ b/freedommaker/application.py +@@ -30,9 +30,9 @@ import freedommaker + from .builder import ImageBuilder + + IMAGE_SIZE = '3800M' +-BUILD_MIRROR = 'http://deb.debian.org/debian' +-MIRROR = 'http://deb.debian.org/debian' +-DISTRIBUTION = 'unstable' ++BUILD_MIRROR = 'http://us.archive.trisquel.info/trisquel' ++MIRROR = 'http://us.archive.trisquel.info/trisquel' ++DISTRIBUTION = 'nabia' + BUILD_DIR = 'build' + LOG_LEVEL = 'debug' + HOSTNAME = 'freedombox' +diff --git a/freedommaker/library.py b/freedommaker/library.py +index 9805278..d724053 100644 +--- a/freedommaker/library.py ++++ b/freedommaker/library.py +@@ -484,14 +484,14 @@ deb-src {mirror} {distribution} {components} + updates_template = ''' + deb {mirror} {distribution}-updates {components} + deb-src {mirror} {distribution}-updates {components} +-''' +- old_security_template = ''' +-deb http://security.debian.org/debian-security/ {distribution}/updates {components} +-deb-src http://security.debian.org/debian-security/ {distribution}/updates {components} + ''' + security_template = ''' +-deb http://security.debian.org/debian-security/ {distribution}-security {components} +-deb-src http://security.debian.org/debian-security/ {distribution}-security {components} ++deb {mirror} {distribution}-security {components} ++deb-src {mirror} {distribution}-security {components} ++''' ++ backports_template = ''' ++#deb {mirror} {distribution}-backports {components} ++#deb-src {mirror} {distribution}-backports {components} + ''' + file_path = path_in_mount(state, 'etc/apt/sources.list') + with open(file_path, 'w') as file_handle: +@@ -500,8 +500,9 @@ deb-src http://security.debian.org/debian-security/ {distribution}-security {com + file_handle.write(updates_template.format(**values)) + if distribution in ('bullseye', 'testing'): + file_handle.write(security_template.format(**values)) +- else: # stable/buster +- file_handle.write(old_security_template.format(**values)) ++ elif distribution in ('nabia'): ++ file_handle.write(security_template.format(**values)) ++ file_handle.write(backports_template.format(**values)) + + run_in_chroot(state, ['apt-get', 'update']) + run_in_chroot(state, ['apt-get', 'clean']) diff --git a/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch b/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch new file mode 100644 index 00000000..30c20ab7 --- /dev/null +++ b/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch @@ -0,0 +1,370 @@ +diff --git a/freedommaker/builders/__init__.py b/freedommaker/builders/__init__.py +index 4df3c3f..05e2f4d 100644 +--- a/freedommaker/builders/__init__.py ++++ b/freedommaker/builders/__init__.py +@@ -35,10 +35,3 @@ from . import pine64_plus + from . import pine64_lts + from . import qemu_amd64 + from . import qemu_i386 +-from . import raspberry_pi_2 +-from . import raspberry_pi_3 +-from . import raspberry_pi_3_b_plus +-from . import raspberry_pi_with_uboot +-from . import vagrant +-from . import virtualbox_amd64 +-from . import virtualbox_i386 +diff --git a/freedommaker/builders/raspberry_pi_2.py b/freedommaker/builders/raspberry_pi_2.py +deleted file mode 100644 +index 5821a94..0000000 +--- a/freedommaker/builders/raspberry_pi_2.py ++++ /dev/null +@@ -1,31 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build Raspberry Pi 2 image. +-""" +- +-from .raspberry_pi_with_uboot import RaspberryPiWithUBoot +- +- +-class RaspberryPi2ImageBuilder(RaspberryPiWithUBoot): +- """Image builder for Raspberry Pi 2 target.""" +- architecture = 'armhf' +- machine = 'raspberry2' +- boot_offset = '64mib' +- kernel_flavor = 'armmp' +- flash_kernel_name = 'Raspberry Pi 2 Model B' +- uboot_variant = 'rpi_2' +diff --git a/freedommaker/builders/raspberry_pi_3.py b/freedommaker/builders/raspberry_pi_3.py +deleted file mode 100644 +index 0cfe209..0000000 +--- a/freedommaker/builders/raspberry_pi_3.py ++++ /dev/null +@@ -1,32 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build Raspberry Pi 3 image. +-""" +- +-from .raspberry_pi_with_uboot import RaspberryPiWithUBoot +- +- +-class RaspberryPi3ImageBuilder(RaspberryPiWithUBoot): +- """Image builder for Raspberry Pi 3 target.""" +- architecture = 'armhf' +- machine = 'raspberry3' +- free = False +- boot_offset = '64mib' +- kernel_flavor = 'armmp' +- flash_kernel_name = 'Raspberry Pi 3 Model B' +- uboot_variant = 'rpi_3_32b' +diff --git a/freedommaker/builders/raspberry_pi_3_b_plus.py b/freedommaker/builders/raspberry_pi_3_b_plus.py +deleted file mode 100644 +index 35c778d..0000000 +--- a/freedommaker/builders/raspberry_pi_3_b_plus.py ++++ /dev/null +@@ -1,27 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build Raspberry Pi 3 Model B+ image. +-""" +- +-from .raspberry_pi_3 import RaspberryPi3ImageBuilder +- +- +-class RaspberryPi3BPlusImageBuilder(RaspberryPi3ImageBuilder): +- """Image builder for Raspberry Pi 3 Model B+ target.""" +- machine = 'raspberry3-b-plus' +- flash_kernel_name = 'Raspberry Pi 3 Model B+' +diff --git a/freedommaker/builders/raspberry_pi_with_uboot.py b/freedommaker/builders/raspberry_pi_with_uboot.py +deleted file mode 100644 +index e983404..0000000 +--- a/freedommaker/builders/raspberry_pi_with_uboot.py ++++ /dev/null +@@ -1,62 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Base worker class to build Raspberry Pi 2 and 3 images. +-""" +- +-from .. import library +-from .arm import ARMImageBuilder +- +- +-class RaspberryPiWithUBoot(ARMImageBuilder): +- """Base image builder for Raspberry Pi 2 and 3 targets.""" +- free = False +- uboot_variant = None +- firmware_filesystem_type = 'vfat' +- firmware_size = '60mib' +- +- def install_boot_loader(self, state): +- """Install the boot loader onto the image.""" +- if not self.uboot_variant: +- raise NotImplementedError +- +- firmware_package = 'raspi-firmware' +- if self.arguments.distribution in ['buster', 'stable']: +- firmware_package = 'raspi3-firmware' +- +- script = ''' +-set -e +-set -x +-set -o pipefail +- +-apt-get install --no-install-recommends -y dpkg-dev +-cd /tmp +-apt-get source {firmware_package} +-cp {firmware_package}*/boot/* /boot/firmware +-rm -rf {firmware_package}* +-cd / +- +-# remove unneeded firmware files +-rm -f /boot/firmware/fixup_* +-rm -f /boot/firmware/start_* +- +-# u-boot setup +-apt-get install -y u-boot-rpi +-cp /usr/lib/u-boot/{uboot_variant}/u-boot.bin /boot/firmware/kernel.img +-cp /usr/lib/u-boot/{uboot_variant}/u-boot.bin /boot/firmware/kernel7.img +-'''.format(firmware_package=firmware_package, uboot_variant=self.uboot_variant) +- library.run_in_chroot(state, ['bash', '-c', script]) +diff --git a/freedommaker/builders/vagrant.py b/freedommaker/builders/vagrant.py +deleted file mode 100644 +index f1243dd..0000000 +--- a/freedommaker/builders/vagrant.py ++++ /dev/null +@@ -1,55 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build Vagrant images. +-""" +- +-import os +- +-from .. import library +-from .virtualbox_amd64 import VirtualBoxAmd64ImageBuilder +- +- +-class VagrantImageBuilder(VirtualBoxAmd64ImageBuilder): +- """Image builder for Vagrant package.""" +- vagrant_extension = '.box' +- +- @classmethod +- def get_target_name(cls): +- """Return the name of the target for an image builder.""" +- return 'vagrant' +- +- def build(self): +- """Run the image building process.""" +- vm_file = self._replace_extension(self.image_file, +- self.vm_image_extension) +- vagrant_file = self._replace_extension(self.image_file, +- self.vagrant_extension) +- +- self.make_image() +- self.create_vm_file(self.image_file, vm_file) +- os.remove(self.image_file) +- self.vagrant_package(vm_file, vagrant_file) +- +- @staticmethod +- def vagrant_package(vm_file, vagrant_file): +- """Create a vagrant package from VM file.""" +- library.run( +- ['bin/vagrant-package', '--output', vagrant_file, vm_file]) +- +- +- +diff --git a/freedommaker/builders/virtualbox.py b/freedommaker/builders/virtualbox.py +deleted file mode 100644 +index f5bac57..0000000 +--- a/freedommaker/builders/virtualbox.py ++++ /dev/null +@@ -1,46 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Base worker class to build VirtualBox images. +-""" +- +-import os +- +-from .. import library +-from .vm import VMImageBuilder +- +- +-class VirtualBoxImageBuilder(VMImageBuilder): +- """Base image builder for all VirtualBox targets.""" +- vm_image_extension = '.vdi' +- +- @classmethod +- def get_target_name(cls): +- """Return the name of the target for an image builder.""" +- if getattr(cls, 'architecture', None): +- return 'virtualbox-' + cls.architecture +- +- return None +- +- def create_vm_file(self, image_file, vm_file): +- """Create a VM file from image file.""" +- try: +- os.remove(vm_file) +- except FileNotFoundError: +- pass +- +- library.run(['VBoxManage', 'convertdd', image_file, vm_file]) +diff --git a/freedommaker/builders/virtualbox_amd64.py b/freedommaker/builders/virtualbox_amd64.py +deleted file mode 100644 +index 90609e0..0000000 +--- a/freedommaker/builders/virtualbox_amd64.py ++++ /dev/null +@@ -1,27 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build VirtualBox amd64 images. +-""" +- +-from .virtualbox import VirtualBoxImageBuilder +- +- +-class VirtualBoxAmd64ImageBuilder(VirtualBoxImageBuilder): +- """Image builder for all VirtualBox amd64 targets.""" +- architecture = 'amd64' +- kernel_flavor = 'amd64' +diff --git a/freedommaker/builders/virtualbox_i386.py b/freedommaker/builders/virtualbox_i386.py +deleted file mode 100644 +index a7846a7..0000000 +--- a/freedommaker/builders/virtualbox_i386.py ++++ /dev/null +@@ -1,27 +0,0 @@ +-# +-# This file is part of Freedom Maker. +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 3 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. +-# +-""" +-Worker class to build VirtualBox i386 images. +-""" +- +-from .virtualbox import VirtualBoxImageBuilder +- +- +-class VirtualBoxI386ImageBuilder(VirtualBoxImageBuilder): +- """Image builder for all VirtualBox i386 targets.""" +- architecture = 'i386' +- kernel_flavor = '686' diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker new file mode 100644 index 00000000..69133395 --- /dev/null +++ b/helpers/make-freedom-maker @@ -0,0 +1,33 @@ +#!/bin/sh + +# trisquel package helper for 'freedom-maker' +# +# Copyright (C) 2022 bill-auger <bill-auger@programmer.net> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + + +VERSION=1 + +. ./config + + +for patch in $(ls -v ../../../DATA/freedom-maker/*.patch) +do echo "applying $patch" ; patch -Np1 < $patch ; +done + + +changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators" + +compile -- GitLab From 061883f5529f2f63e617590652ba9f65c2d58749 Mon Sep 17 00:00:00 2001 From: Ark74 <ark@switnet.org> Date: Mon, 8 Aug 2022 04:23:15 -0500 Subject: [PATCH 2/7] freedom-maker: Add patch for library tests. --- .../0007-patch-test_library-nabia.patch | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 helpers/DATA/freedom-maker/0007-patch-test_library-nabia.patch diff --git a/helpers/DATA/freedom-maker/0007-patch-test_library-nabia.patch b/helpers/DATA/freedom-maker/0007-patch-test_library-nabia.patch new file mode 100644 index 00000000..422c4121 --- /dev/null +++ b/helpers/DATA/freedom-maker/0007-patch-test_library-nabia.patch @@ -0,0 +1,79 @@ +Make sure to replace stable (strech) for "nabia" to the corresponding CODENAME on further releases +Also unstable to the corresponding dev release, aramo for nabia. + +diff --git a/freedommaker/tests/test_library.py b/freedommaker/tests/test_library.py +index daf34c2..b58fc6d 100644 +--- a/freedommaker/tests/test_library.py ++++ b/freedommaker/tests/test_library.py +@@ -438,13 +438,13 @@ modify x x + @patch('freedommaker.library.run') + def test_qemu_debootstrap(self, run): + """Test debootstrapping using qemu.""" +- library.qemu_debootstrap(self.state, 'i386', 'stretch', 'minbase', +- ['main', 'contrib'], ['p1', 'p2'], +- 'http://deb.debian.org/debian') ++ library.qemu_debootstrap(self.state, 'amd64', 'nabia', 'minbase', ++ ['main'], ['p1', 'p2'], ++ 'http://archive.trisquel.org/trisquel') + run.assert_called_with([ +- 'qemu-debootstrap', '--arch=i386', '--variant=minbase', +- '--components=main,contrib', '--include=p1,p2', 'stretch', +- self.state['mount_point'], 'http://deb.debian.org/debian' ++ 'qemu-debootstrap', '--arch=amd64', '--variant=minbase', ++ '--components=main', '--include=p1,p2', 'nabia', ++ self.state['mount_point'], 'http://archive.trisquel.org/trisquel' + ]) + + self.assertEqual( +@@ -566,31 +566,37 @@ ff02::2 ip6-allrouters + sources_path = self.state['mount_point'] + '/etc/apt/sources.list' + + stable_content = ''' +-deb http://deb.debian.org/debian stretch main +-deb-src http://deb.debian.org/debian stretch main ++deb http://archive.trisquel.org/trisquel nabia main ++deb-src http://archive.trisquel.org/trisquel nabia main + +-deb http://deb.debian.org/debian stretch-updates main +-deb-src http://deb.debian.org/debian stretch-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/ stretch/updates main +-deb-src http://security.debian.org/debian-security/ stretch/updates main ++deb http://archive.trisquel.org/trisquel nabia-security main ++deb-src http://archive.trisquel.org/trisquel nabia-security main ++ ++#deb http://archive.trisquel.org/trisquel nabia-backports main ++#deb-src http://archive.trisquel.org/trisquel nabia-backports main + ''' + with self.assert_file_change(sources_path, None, stable_content): +- library.setup_apt(self.state, 'http://deb.debian.org/debian', +- 'stretch', ['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 + ''' +- 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): -- GitLab From e87e9a0e8ab0bd1815452e2168e2e2be1b0d3608 Mon Sep 17 00:00:00 2001 From: Ark74 <ark@switnet.org> Date: Mon, 8 Aug 2022 04:24:45 -0500 Subject: [PATCH 3/7] freedom-maker: tweak patch application. --- helpers/make-freedom-maker | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker index 69133395..0b7c2444 100644 --- a/helpers/make-freedom-maker +++ b/helpers/make-freedom-maker @@ -22,12 +22,12 @@ VERSION=1 . ./config - -for patch in $(ls -v ../../../DATA/freedom-maker/*.patch) -do echo "applying $patch" ; patch -Np1 < $patch ; +for patch in $(find $DATA/ -name *.patch) +do +echo "Applying $patch" +patch -Np1 < $patch done - changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators" compile -- GitLab From 273920f8ca2fd6880970657a614d8338d534fd9e Mon Sep 17 00:00:00 2001 From: Ark74 <ark@switnet.org> Date: Mon, 8 Aug 2022 05:33:07 -0500 Subject: [PATCH 4/7] freedom-maker: Set valid kernel and replace suggestion. --- helpers/make-freedom-maker | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker index 0b7c2444..9f615709 100644 --- a/helpers/make-freedom-maker +++ b/helpers/make-freedom-maker @@ -28,6 +28,10 @@ echo "Applying $patch" patch -Np1 < $patch done +#Set valid kernel and replace suggestion. +sed -i "s|'linux-image-' + self.builder.kernel_flavor|'linux-image-generic'|" freedommaker/internal.py +sed -i "s|virtualbox|debootstrap|" debian/control + changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators" compile -- GitLab From d4d353924034b9cda9c15ceb20f400fe22f676e6 Mon Sep 17 00:00:00 2001 From: bill-auger <mr.j.spam.me@gmail.com> Date: Sat, 20 Aug 2022 10:38:17 -0400 Subject: [PATCH 5/7] freedom-maker: specify generic kernels --- .../0008-specify-generic-kernels.patch | 79 +++++++++++++++++++ helpers/make-freedom-maker | 3 +- 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 helpers/DATA/freedom-maker/0008-specify-generic-kernels.patch diff --git a/helpers/DATA/freedom-maker/0008-specify-generic-kernels.patch b/helpers/DATA/freedom-maker/0008-specify-generic-kernels.patch new file mode 100644 index 00000000..d68f3126 --- /dev/null +++ b/helpers/DATA/freedom-maker/0008-specify-generic-kernels.patch @@ -0,0 +1,79 @@ +diff --git a/freedommaker/builders/a20.py b/freedommaker/builders/a20.py +index f543ae5..7f13c6d 100644 +--- a/freedommaker/builders/a20.py ++++ b/freedommaker/builders/a20.py +@@ -25,7 +25,7 @@ from .arm import ARMImageBuilder + class A20ImageBuilder(ARMImageBuilder): + """Base image builder for all Allwinner A20 board based targets.""" + architecture = 'armhf' +- kernel_flavor = 'armmp-lpae' ++ kernel_flavor = 'generic' + boot_offset = '1mib' + u_boot_path = None + +diff --git a/freedommaker/builders/a64.py b/freedommaker/builders/a64.py +index d0e59ec..00b1259 100644 +--- a/freedommaker/builders/a64.py ++++ b/freedommaker/builders/a64.py +@@ -27,7 +27,7 @@ from .arm import ARMImageBuilder + class A64ImageBuilder(ARMImageBuilder): + """Image builder for all Allwinner A64 board targets.""" + architecture = 'arm64' +- kernel_flavor = 'arm64' ++ kernel_flavor = 'generic' + boot_offset = '1mib' + u_boot_target = None + +diff --git a/freedommaker/builders/amd64.py b/freedommaker/builders/amd64.py +index 89c3862..cd15b36 100644 +--- a/freedommaker/builders/amd64.py ++++ b/freedommaker/builders/amd64.py +@@ -24,4 +24,4 @@ from .amd_intel import AMDIntelImageBuilder + class AMD64ImageBuilder(AMDIntelImageBuilder): + """Image builder for all amd64 targets.""" + architecture = 'amd64' +- kernel_flavor = 'amd64' ++ kernel_flavor = 'generic' +diff --git a/freedommaker/builders/beaglebone.py b/freedommaker/builders/beaglebone.py +index 99a2d40..aca4a78 100644 +--- a/freedommaker/builders/beaglebone.py ++++ b/freedommaker/builders/beaglebone.py +@@ -26,7 +26,7 @@ class BeagleBoneImageBuilder(ARMImageBuilder): + """Image builder for BeagleBone target.""" + architecture = 'armhf' + machine = 'beaglebone' +- kernel_flavor = 'armmp' ++ kernel_flavor = 'generic' + boot_offset = '2mib' + flash_kernel_name = 'TI AM335x BeagleBone Black' + flash_kernel_options = 'console=ttyO0' +diff --git a/freedommaker/builders/i386.py b/freedommaker/builders/i386.py +index df9d9a0..bf23c52 100644 +--- a/freedommaker/builders/i386.py ++++ b/freedommaker/builders/i386.py +@@ -24,4 +24,4 @@ from .amd_intel import AMDIntelImageBuilder + class I386ImageBuilder(AMDIntelImageBuilder): + """Image builder for all i386 targets.""" + architecture = 'i386' +- kernel_flavor = '686' ++ kernel_flavor = 'generic' +diff --git a/freedommaker/builders/qemu_amd64.py b/freedommaker/builders/qemu_amd64.py +index 761a369..120caae 100644 +--- a/freedommaker/builders/qemu_amd64.py ++++ b/freedommaker/builders/qemu_amd64.py +@@ -24,4 +24,4 @@ from .qemu import QemuImageBuilder + class QemuAmd64ImageBuilder(QemuImageBuilder): + """Image builder for all Qemu amd64 targets.""" + architecture = 'amd64' +- kernel_flavor = 'amd64' ++ kernel_flavor = 'generic' +diff --git a/freedommaker/builders/qemu_i386.py b/freedommaker/builders/qemu_i386.py +index 6b478b2..e8bca34 100644 +--- a/freedommaker/builders/qemu_i386.py ++++ b/freedommaker/builders/qemu_i386.py +@@ -24,4 +24,4 @@ from .qemu import QemuImageBuilder + class QemuI386ImageBuilder(QemuImageBuilder): + """Image builder for all Qemu i386 targets.""" + architecture = 'i386' +- kernel_flavor = '686' ++ kernel_flavor = 'generic' diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker index 9f615709..6a8f713f 100644 --- a/helpers/make-freedom-maker +++ b/helpers/make-freedom-maker @@ -28,8 +28,7 @@ echo "Applying $patch" patch -Np1 < $patch done -#Set valid kernel and replace suggestion. -sed -i "s|'linux-image-' + self.builder.kernel_flavor|'linux-image-generic'|" freedommaker/internal.py +#replace suggestion. sed -i "s|virtualbox|debootstrap|" debian/control changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators" -- GitLab From feea6553c709651e091d8aa70bf01aa57df4c695 Mon Sep 17 00:00:00 2001 From: bill-auger <mr.j.spam.me@gmail.com> Date: Sat, 20 Aug 2022 10:36:42 -0400 Subject: [PATCH 6/7] freedom-maker: remove non-free suggestion from packaging metadata --- .../freedom-maker/0006-remove-nonfree-support.patch | 13 +++++++++++++ helpers/make-freedom-maker | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch b/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch index 30c20ab7..a6c5082a 100644 --- a/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch +++ b/helpers/DATA/freedom-maker/0006-remove-nonfree-support.patch @@ -1,3 +1,16 @@ +diff --git a/debian/control b/debian/control +index 21f77ce..f13aafd 100644 +--- a/debian/control ++++ b/debian/control +@@ -41,7 +41,7 @@ Depends: + u-boot-tools, + xz-utils (>= 5.2.2), + Suggests: +- virtualbox ++ debootstrap + Description: FreedomBox image builder + FreedomBox is a personal cloud server which can be installed on single board + computers and Debian machines. diff --git a/freedommaker/builders/__init__.py b/freedommaker/builders/__init__.py index 4df3c3f..05e2f4d 100644 --- a/freedommaker/builders/__init__.py diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker index 6a8f713f..0b7c2444 100644 --- a/helpers/make-freedom-maker +++ b/helpers/make-freedom-maker @@ -28,9 +28,6 @@ echo "Applying $patch" patch -Np1 < $patch done -#replace suggestion. -sed -i "s|virtualbox|debootstrap|" debian/control - changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators" compile -- GitLab From 6a3c775418de0ad1735f3426c3f250bf65c5886c Mon Sep 17 00:00:00 2001 From: bill-auger <mr.j.spam.me@gmail.com> Date: Sat, 20 Aug 2022 10:45:48 -0400 Subject: [PATCH 7/7] freedom-maker: bugfix patch find command --- helpers/make-freedom-maker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/make-freedom-maker b/helpers/make-freedom-maker index 0b7c2444..d98ed9d8 100644 --- a/helpers/make-freedom-maker +++ b/helpers/make-freedom-maker @@ -22,7 +22,7 @@ VERSION=1 . ./config -for patch in $(find $DATA/ -name *.patch) +for patch in $(ls -v ${DATA}/*.patch) do echo "Applying $patch" patch -Np1 < $patch -- GitLab