Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Aug 2, 2021
1 parent c72d9d2 commit c8efa44
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
## Nitrux ISO Tool

[![Build Status](https://travis-ci.org/Nitrux/nitrux-iso-tool.svg?branch=master)](https://travis-ci.org/Nitrux/nitrux-iso-tool)
[![Build Status](https://travis-ci.org/Nitrux/nitrux-iso-tool.svg?branch=legacy-minimal)](https://travis-ci.org/Nitrux/nitrux-iso-tool)

A script for generating Nitrux ISO files. The code is very readable, and so, self documented.

Expand Down
74 changes: 32 additions & 42 deletions bootstrap.sh
Expand Up @@ -15,10 +15,12 @@ appstream_refresh_force () { appstreamcli refresh --force; }
autoremove () { apt -yy autoremove $@; }
clean_all () { apt clean && apt autoclean; }
dist_upgrade () { apt -yy dist-upgrade $@; }
dpkg_install () { dpkg -i $@; }
download () { apt download $@; }
dpkg_force_install () { dpkg --force-all -i $@; }
dpkg_force_remove () { /usr/bin/dpkg --remove --no-triggers --force-remove-essential --force-bad-path $@; }
dpkg_install () { dpkg -i $@; }
fix_install () { apt -yy --fix-broken install $@; }
fix_install_no_recommends () { apt -yy --fix-broken install --no-install-recommends $@; }
hold () { apt-mark hold $@; }
install () { apt -yy install --no-install-recommends $@; }
install_downgrades () { apt -yy install --no-install-recommends --allow-downgrades $@; }
Expand All @@ -34,6 +36,7 @@ update_quiet () { apt -qq update; }
upgrade () { apt -yy upgrade $@; }
upgrade_downgrades () { apt -yy upgrade --allow-downgrades $@; }


puts "STARTING BOOTSTRAP."


Expand Down Expand Up @@ -83,31 +86,16 @@ update
dist_upgrade


# Upgrade dpkg to support zstd compressed packages

add_repo_keys \
3B4FE6ACC0B21F32 \
871920D1991BC93C > /dev/null

cp /configs/files/sources.list.impish /etc/apt/sources.list.d/ubuntu-impish-repo.list

update
# Upgrade dpkg to support zstd compressed packages.
#
# It's critical to update dpkg; We can not install otherwise newer Ubuntu packages.

UPGRADE_DPKG_ZSTD='
dpkg
'

only_upgrade $UPGRADE_DPKG_ZSTD

rm \
/etc/apt/sources.list.d/ubuntu-impish-repo.list

remove_keys \
3B4FE6ACC0B21F32 \
871920D1991BC93C > /dev/null

update


# Add bootloader.
#
Expand Down Expand Up @@ -315,23 +303,6 @@ install $MISC_UBUNTU_IMPISH_PKGS
rm \
/etc/apt/sources.list.d/ubuntu-impish-repo.list

cp /configs/files/sources.list.bionic /etc/apt/sources.list.d/ubuntu-bionic-repo.list

update

MISC_UBUNTU_BIONIC_PKGS='
'

install $MISC_UBUNTU_BIONIC_PKGS

rm \
/etc/apt/sources.list.d/ubuntu-bionic-repo.list

remove_keys \
3B4FE6ACC0B21F32 \
871920D1991BC93C > /dev/null

update


Expand Down Expand Up @@ -411,7 +382,7 @@ update
puts "ADDING NITRUX BASE."

NITRUX_BASE_PKGS='
base-files=11.2.8+nitrux-legacy
base-files=11.2.9+nitrux-legacy
nitrux-hardware-drivers-legacy-minimal
nitrux-minimal-legacy
nitrux-standard-legacy
Expand Down Expand Up @@ -527,19 +498,37 @@ update

# Add Calamares.
#
# A problem with libkpmcore 20.12.3 causes Calamares to fail to copy the squashfs to
# the target device; instead, it copies it to tmpfs. We stick to the version of Calamares from Debian.
# The package from KDE Neon is compiled against libkpmcore11 (21.04) and libboost-python1.71.0 from
# Ubuntu which provides the virtual package libboost-python1.71.0-py38. The package from Debian doesn't
# offer this virtual dependency.

puts "ADDING CALAMARES INSTALLER."

add_repo_keys \
55751E5D > /dev/null

cp /configs/files/sources.list.neon.user /etc/apt/sources.list.d/neon-user-repo.list

update


CALAMARES_PKGS='
calamares
calamares-settings-nitrux
calamares-qml-settings-nitrux
libboost-python1.71.0/trixie
squashfs-tools
'

install $CALAMARES_PKGS

rm \
/etc/apt/sources.list.d/neon-user-repo.list

remove_keys \
55751E5D > /dev/null

update


# Hold packages.
#
Expand Down Expand Up @@ -628,8 +617,8 @@ ln -sv /usr/share/xsessions/i3.desktop /usr/share/xsessions/plasma.desktop
rm \
/boot/{vmlinuz,initrd.img,vmlinuz.old,initrd.img.old} || true

ln -svf /boot/vmlinuz-5.13.0-051300-generic /vmlinuz
ln -svf /boot/initrd.img-5.13.0-051300-generic /initrd.img
ln -svf /boot/vmlinuz-5.13.7-051307-generic /vmlinuz
ln -svf /boot/initrd.img-5.13.7-051307-generic /initrd.img

dpkg_force_remove dash || true

Expand Down Expand Up @@ -687,3 +676,4 @@ cat \


puts "EXITING BOOTSTRAP."

6 changes: 3 additions & 3 deletions build.sh
Expand Up @@ -2,7 +2,7 @@

# Exit on errors.

set -e
set -xe


# Travis stuff.
Expand Down Expand Up @@ -57,7 +57,7 @@ tar xf base.tar.xz -C $build_dir

# Populate $build_dir.

wget -qO /bin/runch https://raw.githubusercontent.com/Nitrux/tools/master/runch
wget -qO /bin/runch https://raw.githubusercontent.com/Nitrux/tools/e698f0bcbd3d11468de3a7c604ade6e51979b92d/runch
chmod +x /bin/runch

< bootstrap.sh runch \
Expand Down Expand Up @@ -97,7 +97,7 @@ mksquashfs $build_dir $iso_dir/casper/filesystem.squashfs -comp zstd -no-progres

# Generate the ISO image.

wget -qO /bin/mkiso https://raw.githubusercontent.com/Nitrux/tools/master/mkiso
wget -qO /bin/mkiso https://raw.githubusercontent.com/Nitrux/tools/e698f0bcbd3d11468de3a7c604ade6e51979b92d/mkiso
chmod +x /bin/mkiso

git clone https://github.com/Nitrux/nitrux-grub-theme grub-theme
Expand Down

0 comments on commit c8efa44

Please sign in to comment.