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:
parent
857afa42a8
commit
fe28bc3c82
1
build
1
build
|
@ -35,6 +35,7 @@ tasks="\
|
||||||
clean \
|
clean \
|
||||||
dependencies \
|
dependencies \
|
||||||
descriptors \
|
descriptors \
|
||||||
|
install \
|
||||||
module \
|
module \
|
||||||
payload \
|
payload \
|
||||||
release \
|
release \
|
||||||
|
|
13
download
13
download
|
@ -36,10 +36,17 @@ deleteblobs="true"
|
||||||
|
|
||||||
rm -f "build_error"
|
rm -f "build_error"
|
||||||
|
|
||||||
|
list_modify_paths() {
|
||||||
|
find resources/packages \
|
||||||
|
-mindepth 2 -maxdepth 2 \
|
||||||
|
-type f \
|
||||||
|
-name "download" \
|
||||||
|
-printf "%P\n"
|
||||||
|
}
|
||||||
|
|
||||||
list_packages() {
|
list_packages() {
|
||||||
ls -d resources/packages/*/download | \
|
list_modify_paths | \
|
||||||
sed 's#/download$##' | \
|
sed 's#/.*##'
|
||||||
sed 's#^resources/packages/##'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
|
|
|
@ -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
|
|
@ -233,7 +233,7 @@ install flashrom. Do this after downloading the
|
||||||
[lbmk Git repository](https://git.sr.ht/~libreboot/lbmk):
|
[lbmk Git repository](https://git.sr.ht/~libreboot/lbmk):
|
||||||
|
|
||||||
cd lbmk
|
cd lbmk
|
||||||
sudo ./build dependencies ubuntu2004
|
sudo ./build install dependencies
|
||||||
|
|
||||||
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
|
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
|
||||||
script is also applicable to newer ubuntu versions
|
script is also applicable to newer ubuntu versions
|
||||||
|
@ -241,15 +241,14 @@ script is also applicable to newer ubuntu versions
|
||||||
./download flashrom
|
./download flashrom
|
||||||
./build module flashrom
|
./build module flashrom
|
||||||
|
|
||||||
If the `ubuntu2004` script complains about missing dependencies, just modify
|
If the script complains about missing dependencies, just modify the
|
||||||
the script and remove those dependencies. The script is located
|
resources/dependencies/ubuntu2004 script and remove those dependencies.
|
||||||
at `resources/packages/ubuntu2004/dependencies` and it is written for
|
The script is written for Ubuntu 20.04, but it should work fine in other
|
||||||
Ubuntu 20.04, but it should work fine in other GNU+Linux distributions that use
|
GNU/Linux distributions that use the `apt-get` package manager.
|
||||||
the `apt-get` package manager.
|
|
||||||
|
|
||||||
A `flashrom/` directory will be present, with a `flashrom` executable inside
|
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
|
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
|
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
|
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
|
||||||
on the Raspberry Pi.
|
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
|
If you downloaded the flashrom source code directly, you can go into the
|
||||||
directory and simply type `make`. In the Libreboot build system, build
|
directory and simply type `make`. In the Libreboot build system, build
|
||||||
dependencies are documented in script located
|
dependencies are documented in scripts located in `resources/dependencies/`
|
||||||
at `resources/packages/*/dependencies` which you can install
|
which you can install using the `apt-get` software.
|
||||||
using the `apt-get` software.
|
|
||||||
|
|
||||||
How to use flashrom
|
How to use flashrom
|
||||||
===================
|
===================
|
||||||
|
|
Loading…
Reference in New Issue