dependencies: move into single package.

Having an {arch,debian,fedora35,ubuntu2004,void} GNU Boot package
looked strange. Having a dependencies package instead makes more
sense.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-11-27 14:38:21 +01:00 committed by Adrien 'neox' Bourmault
parent 857afa42a8
commit fe28bc3c82
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
9 changed files with 79 additions and 13 deletions

1
build
View File

@ -35,6 +35,7 @@ tasks="\
clean \
dependencies \
descriptors \
install \
module \
payload \
release \

View File

@ -36,10 +36,17 @@ deleteblobs="true"
rm -f "build_error"
list_modify_paths() {
find resources/packages \
-mindepth 2 -maxdepth 2 \
-type f \
-name "download" \
-printf "%P\n"
}
list_packages() {
ls -d resources/packages/*/download | \
sed 's#/download$##' | \
sed 's#^resources/packages/##'
list_modify_paths | \
sed 's#/.*##'
}
help() {

View File

@ -0,0 +1,60 @@
#!/bin/sh
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# 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/>.
. "$(dirname $0)"/../../scripts/misc/sysexits.sh
true=0
false=1
progname="resources/packages/dependencies/install"
usage()
{
progname="$1"
printf "Usage:\n"
printf "\t%s --help\n" \ "${progname}"
printf "\t%s # Install dependencies for GNU Boot\n" \ "${progname}"
}
is_base_distro()
{
grep "ID=${distro}" /etc/os-release > /dev/null && return ${true}
grep "ID_LIKE=${distro}" /etc/os-release > /dev/null && return ${true}
return ${false}
}
if [ $# -eq 1 ] && [ "$1" == "--help" ] ; then
usage "${progname}"
exit 0
else
usage "${progname}"
exit ${EX_USAGE}
fi
if is_base_distro "arch" ; then
"$(dirname $0)"/../dependencies/arch $@
elif is_base_distro "debian" ; then
"$(dirname $0)"/../dependencies/debian $@
elif is_base_distro "fedora" ; then
"$(dirname $0)"/../dependencies/fedora35 $@
elif is_base_distro "pureos" ; then # PureOS doesn't have ID_LIKE
"$(dirname $0)"/../dependencies/debian $@
elif is_base_distro "ubuntu" ; then
"$(dirname $0)"/../dependencies/ubuntu2004 $@
elif is_base_distro "void" ; then
"$(dirname $0)"/../dependencies/void $@
fi

View File

@ -233,7 +233,7 @@ install flashrom. Do this after downloading the
[lbmk Git repository](https://git.sr.ht/~libreboot/lbmk):
cd lbmk
sudo ./build dependencies ubuntu2004
sudo ./build install dependencies
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
script is also applicable to newer ubuntu versions
@ -241,15 +241,14 @@ script is also applicable to newer ubuntu versions
./download flashrom
./build module flashrom
If the `ubuntu2004` script complains about missing dependencies, just modify
the script and remove those dependencies. The script is located
at `resources/packages/ubuntu2004/dependencies` and it is written for
Ubuntu 20.04, but it should work fine in other GNU+Linux distributions that use
the `apt-get` package manager.
If the script complains about missing dependencies, just modify the
resources/dependencies/ubuntu2004 script and remove those dependencies.
The script is written for Ubuntu 20.04, but it should work fine in other
GNU/Linux distributions that use the `apt-get` package manager.
A `flashrom/` directory will be present, with a `flashrom` executable inside
of it. If you got an error about missing package when running the dependencies
command above, tweak `resources/packages/ubuntu2004/dependencies`. That
command above, tweak `resources/dependencies/ubuntu2004`. That
script downloads and installs build dependencies in apt-get and it is intended
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
on the Raspberry Pi.
@ -265,9 +264,8 @@ argument in flashrom. This mitigates stability issues.
If you downloaded the flashrom source code directly, you can go into the
directory and simply type `make`. In the Libreboot build system, build
dependencies are documented in script located
at `resources/packages/*/dependencies` which you can install
using the `apt-get` software.
dependencies are documented in scripts located in `resources/dependencies/`
which you can install using the `apt-get` software.
How to use flashrom
===================