mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Chroot build packages cleanup and bug fixing (#3266)
* Small fixes and removal of deprecated component * Fix to properly create armbian repo in chroot
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"gpgProvider": "internal",
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
|
||||
@@ -30,20 +30,16 @@ create_chroot()
|
||||
declare -A qemu_binary apt_mirror components
|
||||
qemu_binary['armhf']='qemu-arm-static'
|
||||
qemu_binary['arm64']='qemu-aarch64-static'
|
||||
apt_mirror['stretch']="$DEBIAN_MIRROR"
|
||||
apt_mirror['buster']="$DEBIAN_MIRROR"
|
||||
apt_mirror['bullseye']="$DEBIAN_MIRROR"
|
||||
apt_mirror['xenial']="$UBUNTU_MIRROR"
|
||||
apt_mirror['bionic']="$UBUNTU_MIRROR"
|
||||
apt_mirror['focal']="$UBUNTU_MIRROR"
|
||||
apt_mirror['hirsute']="$UBUNTU_MIRROR"
|
||||
apt_mirror['impish']="$UBUNTU_MIRROR"
|
||||
apt_mirror['jammy']="$UBUNTU_MIRROR"
|
||||
components['stretch']='main,contrib'
|
||||
components['buster']='main,contrib'
|
||||
components['bullseye']='main,contrib'
|
||||
components['sid']='main,contrib'
|
||||
components['xenial']='main,universe,multiverse'
|
||||
components['bionic']='main,universe,multiverse'
|
||||
components['focal']='main,universe,multiverse'
|
||||
components['hirsute']='main,universe,multiverse'
|
||||
@@ -58,12 +54,15 @@ create_chroot()
|
||||
else
|
||||
local mirror_addr="http://${apt_mirror[${release}]}"
|
||||
fi
|
||||
mkdir -p "${target_dir}"
|
||||
cd "${target_dir}"
|
||||
debootstrap --variant=buildd --components="${components[${release}]}" --arch="${arch}" $DEBOOTSTRAP_OPTION --foreign --include="${includes}" "${release}" "${target_dir}" "${mirror_addr}"
|
||||
[[ $? -ne 0 || ! -f "${target_dir}"/debootstrap/debootstrap ]] && exit_with_error "Create chroot first stage failed"
|
||||
cp /usr/bin/${qemu_binary[$arch]} "${target_dir}"/usr/bin/
|
||||
[[ ! -f "${target_dir}"/usr/share/keyrings/debian-archive-keyring.gpg ]] && \
|
||||
mkdir -p "${target_dir}"/usr/share/keyrings/ && \
|
||||
cp /usr/share/keyrings/debian-archive-keyring.gpg "${target_dir}"/usr/share/keyrings/
|
||||
|
||||
chroot "${target_dir}" /bin/bash -c "/debootstrap/debootstrap --second-stage"
|
||||
[[ $? -ne 0 || ! -f "${target_dir}"/bin/bash ]] && exit_with_error "Create chroot second stage failed"
|
||||
create_sources_list "$release" "${target_dir}"
|
||||
@@ -101,10 +100,8 @@ chroot_prepare_distccd()
|
||||
local arch=$2
|
||||
local dest=/tmp/distcc/${release}-${arch}
|
||||
declare -A gcc_version gcc_type
|
||||
gcc_version['stretch']='6.3'
|
||||
gcc_version['buster']='8.3'
|
||||
gcc_version['bullseye']='9.2'
|
||||
gcc_version['xenial']='5.4'
|
||||
gcc_version['bionic']='5.4'
|
||||
gcc_version['focal']='9.2'
|
||||
gcc_version['hirsute']='10.2'
|
||||
@@ -142,7 +139,7 @@ chroot_build_packages()
|
||||
target_arch="${ARCH}"
|
||||
else
|
||||
# only make packages for recent releases. There are no changes on older
|
||||
target_release="stretch bionic buster bullseye focal hirsute sid"
|
||||
target_release="bionic buster bullseye focal hirsute jammy sid"
|
||||
target_arch="armhf arm64"
|
||||
fi
|
||||
|
||||
@@ -228,7 +225,7 @@ chroot_build_packages()
|
||||
mv "${target_dir}"/root/*.deb "${plugin_target_dir}" 2>/dev/null
|
||||
done
|
||||
# cleanup for distcc
|
||||
kill "$(<"/var/run/distcc/${release}-${arch}.pid")"
|
||||
kill $(</var/run/distcc/${release}-${arch}.pid)
|
||||
done
|
||||
done
|
||||
if [[ ${#built_ok[@]} -gt 0 ]]; then
|
||||
|
||||
@@ -215,20 +215,20 @@ create_sources_list()
|
||||
|
||||
# stage: add armbian repository and install key
|
||||
if [[ $DOWNLOAD_MIRROR == "china" ]]; then
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/armbian $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${SDCARD}"/etc/apt/sources.list.d/armbian.list
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/armbian $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${basedir}"/etc/apt/sources.list.d/armbian.list
|
||||
elif [[ $DOWNLOAD_MIRROR == "bfsu" ]]; then
|
||||
echo "deb http://mirrors.bfsu.edu.cn/armbian $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${SDCARD}"/etc/apt/sources.list.d/armbian.list
|
||||
echo "deb http://mirrors.bfsu.edu.cn/armbian $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${basedir}"/etc/apt/sources.list.d/armbian.list
|
||||
else
|
||||
echo "deb http://"$([[ $BETA == yes ]] && echo "beta" || echo "apt" )".armbian.com $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${SDCARD}"/etc/apt/sources.list.d/armbian.list
|
||||
echo "deb http://"$([[ $BETA == yes ]] && echo "beta" || echo "apt" )".armbian.com $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${basedir}"/etc/apt/sources.list.d/armbian.list
|
||||
fi
|
||||
|
||||
# replace local package server if defined. Suitable for development
|
||||
[[ -n $LOCAL_MIRROR ]] && echo "deb http://$LOCAL_MIRROR $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${SDCARD}"/etc/apt/sources.list.d/armbian.list
|
||||
[[ -n $LOCAL_MIRROR ]] && echo "deb http://$LOCAL_MIRROR $RELEASE main ${RELEASE}-utils ${RELEASE}-desktop" > "${basedir}"/etc/apt/sources.list.d/armbian.list
|
||||
|
||||
display_alert "Adding Armbian repository and authentication key" "/etc/apt/sources.list.d/armbian.list" "info"
|
||||
cp "${SRC}"/config/armbian.key "${SDCARD}"
|
||||
chroot "${SDCARD}" /bin/bash -c "cat armbian.key | apt-key add - > /dev/null 2>&1"
|
||||
rm "${SDCARD}"/armbian.key
|
||||
cp "${SRC}"/config/armbian.key "${basedir}"
|
||||
chroot "${basedir}" /bin/bash -c "cat armbian.key | apt-key add - > /dev/null 2>&1"
|
||||
rm "${basedir}"/armbian.key
|
||||
}
|
||||
|
||||
|
||||
@@ -1209,7 +1209,7 @@ prepare_host()
|
||||
nfs-kernel-server btrfs-progs ncurses-term p7zip-full kmod dosfstools libc6-dev-armhf-cross imagemagick \
|
||||
curl patchutils liblz4-tool libpython2.7-dev linux-base swig aptly acl python3-dev python3-distutils \
|
||||
locales ncurses-base pixz dialog systemd-container udev libfdt-dev lib32stdc++6 libc6-i386 lib32ncurses5 lib32tinfo5 \
|
||||
bison libbison-dev flex libfl-dev cryptsetup gpg gnupg1 cpio aria2 pigz dirmngr python3-distutils jq"
|
||||
bison libbison-dev flex libfl-dev cryptsetup gpg gnupg1 cpio aria2 pigz dirmngr python3-distutils jq distcc"
|
||||
|
||||
# build aarch64
|
||||
else
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# mmc-utils
|
||||
local package_name="mmc-utils"
|
||||
local package_repo="https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git"
|
||||
local package_ref="branch:master"
|
||||
local package_install_target="mmc-utils"
|
||||
local package_component="${release}-utils"
|
||||
|
||||
package_checkbuild()
|
||||
{
|
||||
true
|
||||
}
|
||||
|
||||
package_checkinstall()
|
||||
{
|
||||
true
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
mmc-utils (0~gita3d3331-3) unstable; urgency=medium
|
||||
|
||||
* Update patches/fix_build_ppc64el.patch.
|
||||
Updated to the correct patch.
|
||||
|
||||
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Sat, 17 Sep 2016 17:46:33 +0900
|
||||
|
||||
mmc-utils (0~gita3d3331-2) unstable; urgency=medium
|
||||
|
||||
* Fix build on ppc64*, alpha and mipsel64. (Closes: #834787)
|
||||
|
||||
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Tue, 23 Aug 2016 03:23:23 +0900
|
||||
|
||||
mmc-utils (0~gita3d3331-1) unstable; urgency=low
|
||||
|
||||
* Initial release. (Closes: #833633)
|
||||
|
||||
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Fri, 05 Aug 2016 00:23:56 +0900
|
||||
@@ -1 +0,0 @@
|
||||
9
|
||||
@@ -1,40 +0,0 @@
|
||||
Source: mmc-utils
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Nobuhiro Iwamatsu <iwamatsu@debian.org>
|
||||
Build-Depends: debhelper (>= 7.0.50~)
|
||||
Standards-Version: 3.9.8
|
||||
Homepage: http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git
|
||||
Vcs-Git: git://anonscm.debian.org/collab-maint/mmc-utils.git
|
||||
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/mmc-utils.git;a=summary
|
||||
|
||||
Package: mmc-utils
|
||||
Architecture: linux-any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Userspace tools for MMC/SD devices
|
||||
mmc-utils is a tool that supports the MMC device development of linux kernel.
|
||||
.
|
||||
The mmc-utils tools can do the following:
|
||||
- Print and parse extcsd data.
|
||||
- Determine the eMMC writeprotect status.
|
||||
- Set the eMMC writeprotect status.
|
||||
- Set the eMMC data sector size to 4KB by disabling emulation.
|
||||
- Create general purpose partition.
|
||||
- Enable the enhanced user area.
|
||||
- Enable write reliability per partition.
|
||||
- Print the response to STATUS_SEND (CMD13).
|
||||
- Enable the boot partition.
|
||||
- Set Boot Bus Conditions.
|
||||
- Enable the eMMC BKOPS feature.
|
||||
- Permanently enable the eMMC H/W Reset feature.
|
||||
- Permanently disable the eMMC H/W Reset feature.
|
||||
- Send Sanitize command.
|
||||
- Program authentication key for the device.
|
||||
- Counter value for the rpmb device will be read to stdout.
|
||||
- Read from rpmb device to output.
|
||||
- Write to rpmb device from data file.
|
||||
- Enable the eMMC cache feature.
|
||||
- Disable the eMMC cache feature.
|
||||
- Print and parse CID data.
|
||||
- Print and parse CSD data.
|
||||
- Print and parse SCR data.
|
||||
@@ -1,77 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: mmc-utils
|
||||
Source: http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/
|
||||
|
||||
Files: *
|
||||
Copyright: 2016 SanDisk Corp
|
||||
License: GPL-2
|
||||
|
||||
Files: 3rdparty/*
|
||||
Copyright: 2005, 2007 Olivier Gay <olivier.gay@a3.epfl.ch>
|
||||
License: BSD-3-clause
|
||||
|
||||
Files: lsmmc.c
|
||||
Copyright: ST-Ericsson SA 2010-2011 Author: Sebastian Rasmussen
|
||||
License: BSD-3-clause(ST-Ericsson-SA)
|
||||
|
||||
Files: debian/*
|
||||
Copyright: i2016 Nobuhiro Iwamatsu <iwamatsu@debian.org>
|
||||
License: GPL-2
|
||||
|
||||
License: GPL-2
|
||||
The Debian packaging is licensed under the GPL, version 2.
|
||||
.
|
||||
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||
Public License, version 2, can be found in the file
|
||||
/usr/share/common-licenses/GPL-2.
|
||||
|
||||
License: BSD-3-clause(ST-Ericsson-SA)
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the ST-Ericsson SA nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: BSD-3-clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
@@ -1 +0,0 @@
|
||||
man/mmc.1
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- prefix=/usr
|
||||
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
rm -rf .mmc.o.d .mmc_cmds.o.d
|
||||
@@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
||||
Reference in New Issue
Block a user