mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-14 15:25:23 +01:00
Various fixes from rebase
This took a while so a bunch of stuff got broken in rebase.
This commit is contained in:
parent
b614b3021d
commit
25f37ba926
28 changed files with 196 additions and 90 deletions
25
sysc.py
25
sysc.py
|
|
@ -6,13 +6,13 @@
|
|||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import getpass
|
||||
|
||||
from lib.utils import mount, umount, create_disk, run, copytree
|
||||
from lib.sysgeneral import SysGeneral
|
||||
|
||||
# pylint: disable=consider-using-with
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
class SysC(SysGeneral):
|
||||
"""
|
||||
Class responsible for preparing sources for System C.
|
||||
|
|
@ -20,7 +20,6 @@ class SysC(SysGeneral):
|
|||
|
||||
dev_name = None
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
def __init__(self, arch, preserve_tmp, tmpdir, external_sources):
|
||||
self.git_dir = os.path.dirname(os.path.join(__file__))
|
||||
self.arch = arch
|
||||
|
|
@ -58,9 +57,9 @@ class SysC(SysGeneral):
|
|||
disk_path = os.path.join(self.tmp_dir, 'disk.img')
|
||||
if self.external_sources:
|
||||
self.dev_name = create_disk(disk_path, "msdos", "ext4", '8G')
|
||||
self.rootfs_dir = os.path.join(self.tmp_dir, 'mnt')
|
||||
rootfs_dir = os.path.join(self.tmp_dir, 'mnt')
|
||||
os.mkdir(rootfs_dir)
|
||||
mount(self.dev_name + "p1", self.rootfs_dir, 'ext4')
|
||||
mount(self.dev_name + "p1", rootfs_dir, 'ext4')
|
||||
else:
|
||||
self.dev_name = create_disk(disk_path, "none", "ext4", '8G')
|
||||
# Use chown to allow executing user to access it
|
||||
|
|
@ -72,9 +71,10 @@ class SysC(SysGeneral):
|
|||
|
||||
if self.external_sources:
|
||||
self.get_packages()
|
||||
copytree(self.cache_dir, os.path.join(rootfs_dir, "distfiles"))
|
||||
|
||||
# Unmount tmp/mnt if it was mounted
|
||||
if create_disk_image:
|
||||
if create_disk_image and self.external_sources:
|
||||
umount(rootfs_dir)
|
||||
|
||||
# pylint: disable=line-too-long,too-many-statements
|
||||
|
|
@ -137,8 +137,7 @@ class SysC(SysGeneral):
|
|||
|
||||
# dist 3.5-236
|
||||
# Debian's version is used because upstream is not to be found (dead?)
|
||||
self.get_file("http://deb.debian.org/debian/pool/main/d/dist/dist_3.5-236.orig.tar.gz",
|
||||
output="dist-3.5-236.tar.gz")
|
||||
self.get_file("http://deb.debian.org/debian/pool/main/d/dist/dist_3.5-236.orig.tar.gz")
|
||||
|
||||
# perl 5.32.1
|
||||
self.get_file(["https://www.cpan.org/src/5.0/perl-5.32.1.tar.xz",
|
||||
|
|
@ -151,16 +150,13 @@ class SysC(SysGeneral):
|
|||
self.get_file("https://artfiles.org/openssl.org/source/old/1.1.1/openssl-1.1.1l.tar.gz")
|
||||
|
||||
# curl 7.83.0
|
||||
self.get_file("https://master.dl.sourceforge.net/project/curl.mirror/curl-7_83_0/curl-7.83.0.tar.xz?viasf=1",
|
||||
output="curl-7.83.0.tar.xz")
|
||||
self.get_file("https://master.dl.sourceforge.net/project/curl.mirror/curl-7_83_0/curl-7.83.0.tar.xz?viasf=1")
|
||||
|
||||
# ca-certificates-3.78
|
||||
self.get_file("https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_78_RTM/src/nss-3.78.tar.gz",
|
||||
output="ca-certificates-3.78.tar.gz")
|
||||
self.get_file("https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_78_RTM/src/nss-3.78.tar.gz")
|
||||
|
||||
# xbps 0.59.1
|
||||
self.get_file("https://github.com/void-linux/xbps/archive/refs/tags/0.59.1.tar.gz",
|
||||
output="xbps-0.59.1.tar.gz")
|
||||
self.get_file("https://github.com/void-linux/xbps/archive/refs/tags/0.59.1.tar.gz")
|
||||
|
||||
# autoconf 2.71
|
||||
self.get_file("https://mirrors.kernel.org/gnu/autoconf/autoconf-2.71.tar.xz")
|
||||
|
|
@ -205,5 +201,4 @@ class SysC(SysGeneral):
|
|||
# guile 3.0.7
|
||||
self.get_file(["https://mirrors.kernel.org/gnu/guile/guile-3.0.7.tar.xz",
|
||||
"https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-901694b9.tar.gz",
|
||||
"https://github.com/schierlm/guile-psyntax-bootstrapping/archive/refs/tags/guile-3.0.7.tar.gz"],
|
||||
output=["guile-3.0.7.tar.xz", "gnulib-901694b9.tar.gz", "guile-psyntax-bootstrapping.tar.gz"])
|
||||
"https://github.com/schierlm/guile-psyntax-bootstrapping/archive/refs/tags/guile-3.0.7.tar.gz"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue