fix: rename matter-base packages

This commit is contained in:
ngn 2024-08-12 03:07:34 +03:00
parent ff3245979e
commit 1a2593959e
3 changed files with 27 additions and 25 deletions

View File

@ -2,14 +2,14 @@
This script is used for building release archives.
### Usage
Note that you will need to install and configure
[`matt`](https://git.matterlinux.xyz/matterlinux/matt) before using
Note that you will need to install and configure
[`matt`](https://git.matterlinux.xyz/matterlinux/matt) before using
`matter-base`.
To use the `matter-base` script, specify a temporary target
directory, it will be cleaned after the build. The final archive
will be named after the directory. For example:
```
matter-setup matterlinux_24.00
matter-base matterlinux_24.00
```
This will create an arhcive named `matterlinux_24.00.tar.gz`

View File

@ -44,7 +44,7 @@ if [ $# -eq 0 ]; then
fi
name="${1}"
target="$(realpath "${1}")"
target="$(realpath "${1}")"
if [ -d "${target}" ]; then
error "A directory with the specified archive name exists"
@ -67,7 +67,7 @@ pushd "${target}" > /dev/null
ln -sf usr/lib lib
ln -sf usr/lib lib64
ln -sf usr/bin bin
ln -sf usr/sbin sbin
@ -109,7 +109,7 @@ nogroup:x:65534:
EOF
cat > etc/hosts << EOF
127.0.0.1 localhost
127.0.0.1 localhost
::1 localhost
EOF
popd > /dev/null
@ -120,14 +120,16 @@ check_ret "matt command failed"
info "Installing base system packages"
matt install --root "${target}" --yes \
acl attr coreutils binutils \
bash e2fsprogs udev file release \
findutils gawk grep gzip iana-etc \
inetutils intltool iproute kmod less \
openssl sed shadow tar tcl mandb \
man-pages tzdata util-linux which \
matt gettext iproute procps psmisc \
mandb kbd dbus vim nano libxml2
acl attr coreutils binutils \
bash e2fsprogs file release \
findutils gawk grep gzip \
iana-etc inetutils intltool \
kmod less openssl sed shadow \
tar tcl man-pages tzdata \
util-linux which matt \
gettext procps-ng psmisc kbd \
dbus vim nano libxml2 \
iproute2 man-db
check_ret "matt command failed"
success "Installed the base system"
@ -172,14 +174,14 @@ EOF
cat > "${target}/etc/shells" << "EOF"
/bin/sh
/bin/bash
/bin/bash
EOF
cp "${target}/etc/skel/."* "${target}/root"
info "Installing certs"
wget --show-progress -q https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt -O "${target}/certdata.txt"
matter-chroot "${target}" make-ca > /dev/null
matter-chroot "${target}" make-ca > /dev/null
check_ret "Failed to run make-ca, install certs manually"
rm -f "${target}/certdata.txt"

View File

@ -72,10 +72,10 @@ if [ $# -ne 2 ]; then
error "Please specify a release archive and a config directory"
exit 1
fi
archive="$(realpath "${1}")"
if [ ! -f "${archive}" ]; then
if [ ! -f "${archive}" ]; then
error "Archive file not found"
exit 1
fi
@ -158,22 +158,22 @@ for p2 in "${PKGS2[@]}"; do
done
info "Adding public keys"
matter-chroot "${tmpdir}" gpg --receive-keys $keys_str
matter-chroot "${tmpdir}" gpg --receive-keys $keys_str
check_retc "Failed to add public keys"
if [ ! -z "${PKGS1}" ]; then
info "Installing extra packages (1)"
matter-chroot "${tmpdir}" matt sync
check_retc "Sync failed"
matter-chroot "${tmpdir}" matt install --yes $pkgs1_str
matter-chroot "${tmpdir}" matt install --yes $pkgs1_str
check_retc "Install failed"
fi
info "Running build script"
echo "source /iso.sh && build" > "${tmpdir}/stager.sh"
matter-chroot "${tmpdir}" chmod +x /stager.sh
matter-chroot "${tmpdir}" /stager.sh
echo "source /iso.sh && build" > "${tmpdir}/stager.sh"
matter-chroot "${tmpdir}" chmod +x /stager.sh
matter-chroot "${tmpdir}" /stager.sh
check_ret "Build script failed"
rm "${tmpdir}/stager.sh"
@ -187,7 +187,7 @@ popd > /dev/null
if [ ! -z "${PKGS2}" ]; then
info "Installing extra packages (2)"
matter-chroot "${tmpdir}" MP_YES=1 matt install --yes $pkgs2_str
matter-chroot "${tmpdir}" matt install --yes $pkgs2_str
check_ret "Install failed"
fi