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

View File

@ -44,7 +44,7 @@ if [ $# -eq 0 ]; then
fi fi
name="${1}" name="${1}"
target="$(realpath "${1}")" target="$(realpath "${1}")"
if [ -d "${target}" ]; then if [ -d "${target}" ]; then
error "A directory with the specified archive name exists" 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 lib
ln -sf usr/lib lib64 ln -sf usr/lib lib64
ln -sf usr/bin bin ln -sf usr/bin bin
ln -sf usr/sbin sbin ln -sf usr/sbin sbin
@ -109,7 +109,7 @@ nogroup:x:65534:
EOF EOF
cat > etc/hosts << EOF cat > etc/hosts << EOF
127.0.0.1 localhost 127.0.0.1 localhost
::1 localhost ::1 localhost
EOF EOF
popd > /dev/null popd > /dev/null
@ -120,14 +120,16 @@ check_ret "matt command failed"
info "Installing base system packages" info "Installing base system packages"
matt install --root "${target}" --yes \ matt install --root "${target}" --yes \
acl attr coreutils binutils \ acl attr coreutils binutils \
bash e2fsprogs udev file release \ bash e2fsprogs file release \
findutils gawk grep gzip iana-etc \ findutils gawk grep gzip \
inetutils intltool iproute kmod less \ iana-etc inetutils intltool \
openssl sed shadow tar tcl mandb \ kmod less openssl sed shadow \
man-pages tzdata util-linux which \ tar tcl man-pages tzdata \
matt gettext iproute procps psmisc \ util-linux which matt \
mandb kbd dbus vim nano libxml2 gettext procps-ng psmisc kbd \
dbus vim nano libxml2 \
iproute2 man-db
check_ret "matt command failed" check_ret "matt command failed"
success "Installed the base system" success "Installed the base system"
@ -172,14 +174,14 @@ EOF
cat > "${target}/etc/shells" << "EOF" cat > "${target}/etc/shells" << "EOF"
/bin/sh /bin/sh
/bin/bash /bin/bash
EOF EOF
cp "${target}/etc/skel/."* "${target}/root" cp "${target}/etc/skel/."* "${target}/root"
info "Installing certs" 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" 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" check_ret "Failed to run make-ca, install certs manually"
rm -f "${target}/certdata.txt" 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" error "Please specify a release archive and a config directory"
exit 1 exit 1
fi fi
archive="$(realpath "${1}")" archive="$(realpath "${1}")"
if [ ! -f "${archive}" ]; then if [ ! -f "${archive}" ]; then
error "Archive file not found" error "Archive file not found"
exit 1 exit 1
fi fi
@ -158,22 +158,22 @@ for p2 in "${PKGS2[@]}"; do
done done
info "Adding public keys" 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" check_retc "Failed to add public keys"
if [ ! -z "${PKGS1}" ]; then if [ ! -z "${PKGS1}" ]; then
info "Installing extra packages (1)" info "Installing extra packages (1)"
matter-chroot "${tmpdir}" matt sync matter-chroot "${tmpdir}" matt sync
check_retc "Sync failed" check_retc "Sync failed"
matter-chroot "${tmpdir}" matt install --yes $pkgs1_str matter-chroot "${tmpdir}" matt install --yes $pkgs1_str
check_retc "Install failed" check_retc "Install failed"
fi fi
info "Running build script" info "Running build script"
echo "source /iso.sh && build" > "${tmpdir}/stager.sh" echo "source /iso.sh && build" > "${tmpdir}/stager.sh"
matter-chroot "${tmpdir}" chmod +x /stager.sh matter-chroot "${tmpdir}" chmod +x /stager.sh
matter-chroot "${tmpdir}" /stager.sh matter-chroot "${tmpdir}" /stager.sh
check_ret "Build script failed" check_ret "Build script failed"
rm "${tmpdir}/stager.sh" rm "${tmpdir}/stager.sh"
@ -187,7 +187,7 @@ popd > /dev/null
if [ ! -z "${PKGS2}" ]; then if [ ! -z "${PKGS2}" ]; then
info "Installing extra packages (2)" 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" check_ret "Install failed"
fi fi