forked from mirrored-repos/manjaro-tools
Merge branch 'devel' of github.com:manjaro/manjaro-tools into devel
This commit is contained in:
commit
4db901c1fe
13 changed files with 97 additions and 132 deletions
3
Makefile
3
Makefile
|
@ -1,4 +1,4 @@
|
|||
Version=0.9.13
|
||||
Version=0.9.15
|
||||
|
||||
PREFIX = /usr/local
|
||||
SYSCONFDIR = /etc
|
||||
|
@ -47,6 +47,7 @@ SHARED = \
|
|||
|
||||
SHARED_PKG = \
|
||||
conf/makepkg-i686.conf \
|
||||
conf/base-devel-udev \
|
||||
conf/makepkg-x86_64.conf
|
||||
|
||||
SHARED_ISO = \
|
||||
|
|
16
README.md
16
README.md
|
@ -1,7 +1,7 @@
|
|||
manjaro-tools
|
||||
=============
|
||||
|
||||
Manjaro-tools-0.9.10
|
||||
Manjaro-tools-0.9.14
|
||||
|
||||
User manual
|
||||
|
||||
|
@ -44,7 +44,7 @@ Specifying args will override manjaro-tools.conf settings.
|
|||
# default arch: auto detect
|
||||
# arch=$(uname -m)
|
||||
|
||||
# cache dir where buildpkg or buildiso cache packages
|
||||
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
||||
# cache_dir=/var/cache/manjaro-tools
|
||||
|
||||
# build dir where buildpkg or buildiso chroots are created
|
||||
|
@ -71,14 +71,6 @@ Specifying args will override manjaro-tools.conf settings.
|
|||
# default pkg buildset; name without .set extension
|
||||
# buildset_pkg=default
|
||||
|
||||
# Next settings are only useful if you compile packages against eudev
|
||||
|
||||
# default packages to trigger blacklist
|
||||
# blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')
|
||||
|
||||
# default blacklisted packages to remove from chroot
|
||||
# blacklist=('libsystemd')
|
||||
|
||||
################ buildiso ################
|
||||
|
||||
# default iso buildset; name without .set extension
|
||||
|
@ -141,6 +133,7 @@ Usage: buildpkg [options] [--] [makepkg args]
|
|||
-w Clean up cache and sources
|
||||
-n Install and run namcap check
|
||||
-s Sign packages
|
||||
-u udev base-devel group (no systemd)
|
||||
-q Query settings and pretend build
|
||||
-h This help
|
||||
~~~
|
||||
|
@ -175,6 +168,9 @@ The arch can also be set in manjaro-tools.conf, but under normal conditions, it
|
|||
######* -n
|
||||
* Installs the built package in the chroot and runs a namcap check
|
||||
|
||||
######* -u
|
||||
* Create udev build root (for eudev builds)
|
||||
|
||||
###3. buildiso
|
||||
|
||||
buildiso is used to build manjaro-iso-profiles. It is run insde the profiles folder.
|
||||
|
|
|
@ -67,6 +67,8 @@ display_settings(){
|
|||
msg2 "wipe_clean: ${wipe_clean}"
|
||||
msg2 "namcap: ${namcap}"
|
||||
msg2 "sign: ${sign}"
|
||||
msg2 "udev_root: ${udev_root}"
|
||||
msg2 "mkchroot_args: ${mkchroot_args[*]}"
|
||||
msg2 "makepkg_args: ${makepkg_args[*]}"
|
||||
|
||||
msg "PATHS:"
|
||||
|
@ -75,10 +77,6 @@ display_settings(){
|
|||
msg2 "cache_dir_pkg: ${cache_dir_pkg}"
|
||||
msg2 "build_mirror: ${build_mirror}/${branch}"
|
||||
|
||||
msg "BLACKLIST:"
|
||||
msg2 "blacklist_trigger: ${blacklist_trigger[*]}"
|
||||
msg2 "blacklist: ${blacklist[*]}"
|
||||
|
||||
if ${clean_first};then
|
||||
msg "PKG:"
|
||||
msg2 "base_packages: ${base_packages[*]}"
|
||||
|
@ -96,8 +94,6 @@ load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
|||
load_vars "$USER_HOME/.makepkg.conf"
|
||||
load_vars /etc/makepkg.conf
|
||||
|
||||
pacman_conf_arch='default'
|
||||
base_packages=('base-devel')
|
||||
install_pkgs=()
|
||||
|
||||
clean_first=false
|
||||
|
@ -106,6 +102,7 @@ namcap=false
|
|||
pretend=false
|
||||
is_buildset=false
|
||||
sign=false
|
||||
udev_root=false
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options] [--] [makepkg args]"
|
||||
|
@ -119,6 +116,7 @@ usage() {
|
|||
echo ' -w Clean up cache and sources'
|
||||
echo ' -n Install and run namcap check'
|
||||
echo ' -s Sign packages'
|
||||
echo ' -u Udev base-devel group (no systemd)'
|
||||
echo ' -q Query settings and pretend build'
|
||||
echo ' -h This help'
|
||||
echo ''
|
||||
|
@ -128,7 +126,7 @@ usage() {
|
|||
|
||||
orig_argv=("$@")
|
||||
|
||||
opts='p:a:b:r:i:cwnsqh'
|
||||
opts='p:a:b:r:i:cwnsuqh'
|
||||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
|
@ -141,6 +139,7 @@ while getopts "${opts}" arg; do
|
|||
w) wipe_clean=true ;;
|
||||
n) namcap=true; mkchrootpkg_args+=(-n) ;;
|
||||
s) sign=true ;;
|
||||
u) udev_root=true ;;
|
||||
q) pretend=true ;;
|
||||
h|?) usage 0 ;;
|
||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||
|
@ -148,13 +147,13 @@ while getopts "${opts}" arg; do
|
|||
done
|
||||
|
||||
if [[ "${arch}" == 'multilib' ]]; then
|
||||
pacman_conf_arch='multilib'
|
||||
base_packages+=('multilib-devel')
|
||||
pacman_conf_arch=${arch}
|
||||
work_dir=${chroots_pkg}/${branch}/${arch}
|
||||
cache_dir_pkg=${cache_dir}/pkg/${branch}/${arch}
|
||||
arch='x86_64'
|
||||
is_multilib=true
|
||||
else
|
||||
pacman_conf_arch='default'
|
||||
work_dir=${chroots_pkg}/${branch}/${arch}
|
||||
cache_dir_pkg=${cache_dir}/pkg/${branch}/${arch}
|
||||
is_multilib=false
|
||||
|
@ -164,8 +163,7 @@ pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
|
|||
makepkg_conf="${PKGDATADIR}/makepkg-${arch}.conf"
|
||||
mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf"
|
||||
|
||||
chroot_run_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}")
|
||||
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -L)
|
||||
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}")
|
||||
|
||||
mkchrootpkg_args+=(-r ${work_dir})
|
||||
|
||||
|
@ -181,6 +179,8 @@ eval_buildset "${buildset_pkg}" "${sets_dir_pkg}"
|
|||
|
||||
check_requirements
|
||||
|
||||
init_base_devel
|
||||
|
||||
${pretend} && display_settings && exit
|
||||
|
||||
${wipe_clean} && clean_up
|
||||
|
|
|
@ -24,4 +24,6 @@ sudo
|
|||
texinfo
|
||||
util-linux
|
||||
which
|
||||
lib32-flex
|
||||
>multilib gcc-multilib
|
||||
>multilib lib32-fakeroot
|
||||
>multilib lib32-libltdl
|
|
@ -1,56 +0,0 @@
|
|||
bash
|
||||
bzip2
|
||||
coreutils
|
||||
cryptsetup
|
||||
device-mapper
|
||||
dhcpcd
|
||||
diffutils
|
||||
eudev-systemdcompat
|
||||
e2fsprogs
|
||||
file
|
||||
filesystem
|
||||
findutils
|
||||
gawk
|
||||
gcc-libs
|
||||
gettext
|
||||
glibc
|
||||
grep
|
||||
gzip
|
||||
inetutils
|
||||
iproute2
|
||||
iputils
|
||||
jfsutils
|
||||
less
|
||||
licenses
|
||||
logrotate
|
||||
lvm2
|
||||
man-db
|
||||
man-pages
|
||||
manjaro-hotfixes
|
||||
manjaro-system
|
||||
mdadm
|
||||
mhwd
|
||||
mhwd-db
|
||||
nano
|
||||
openrc-core
|
||||
pacman
|
||||
pciutils
|
||||
pcmciautils
|
||||
perl
|
||||
procps-ng
|
||||
psmisc
|
||||
reiserfsprogs
|
||||
s-nail
|
||||
sed
|
||||
shadow
|
||||
sysfsutils
|
||||
tar
|
||||
texinfo
|
||||
usbutils
|
||||
util-linux
|
||||
vi
|
||||
which
|
||||
xfsprogs
|
||||
tcp_wrappers
|
||||
lib32-tcp_wrappers
|
||||
|
|
@ -38,8 +38,8 @@ CHOST="i686-pc-linux-gnu"
|
|||
# -march (or -mcpu) builds exclusively for an architecture
|
||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||
CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
||||
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fstack-check"
|
||||
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fstack-check"
|
||||
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
|
||||
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
|
||||
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
||||
|
@ -61,7 +61,7 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
|
|||
#-- check: Run the check() function if present in the PKGBUILD
|
||||
#-- sign: Generate PGP signature file
|
||||
#
|
||||
BUILDENV=(fakeroot !distcc color !ccache check !sign)
|
||||
BUILDENV=(!distcc color !ccache check !sign)
|
||||
#
|
||||
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
|
||||
#-- specify a space-delimited list of hosts running in the DistCC cluster.
|
||||
|
|
|
@ -19,7 +19,7 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %
|
|||
# /usr/bin/lftpget -c
|
||||
# /usr/bin/wget
|
||||
|
||||
#-- The the package required by makepkg to download VCS sources
|
||||
#-- The package required by makepkg to download VCS sources
|
||||
# Format: 'protocol::package'
|
||||
VCSCLIENTS=('bzr::bzr'
|
||||
'git::git'
|
||||
|
@ -37,8 +37,8 @@ CHOST="x86_64-unknown-linux-gnu"
|
|||
# -march (or -mcpu) builds exclusively for an architecture
|
||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||
CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fstack-check"
|
||||
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fstack-check"
|
||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
|
||||
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
|
||||
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
||||
|
@ -60,7 +60,7 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
|
|||
#-- check: Run the check() function if present in the PKGBUILD
|
||||
#-- sign: Generate PGP signature file
|
||||
#
|
||||
BUILDENV=(fakeroot !distcc color !ccache check !sign)
|
||||
BUILDENV=(!distcc color !ccache check !sign)
|
||||
#
|
||||
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
|
||||
#-- specify a space-delimited list of hosts running in the DistCC cluster.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# default arch: auto detect
|
||||
# arch=$(uname -m)
|
||||
|
||||
# cache dir where buildpkg or buildiso cache packages
|
||||
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
||||
# cache_dir=/var/cache/manjaro-tools
|
||||
|
||||
# build dir where buildpkg or buildiso chroots are created
|
||||
|
@ -35,14 +35,6 @@
|
|||
# default pkg buildset; name without .set extension
|
||||
# buildset_pkg=default
|
||||
|
||||
# Next settings are only useful if you compile packages against eudev
|
||||
|
||||
# default packages to trigger blacklist
|
||||
# blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')
|
||||
|
||||
# default blacklisted packages to remove from chroot
|
||||
# blacklist=('libsystemd')
|
||||
|
||||
################ buildiso ################
|
||||
|
||||
# default iso buildset; name without .set extension
|
||||
|
|
|
@ -199,7 +199,7 @@ write_isolinux_cfg(){
|
|||
if [[ ${initsys} == 'systemd' ]]; then
|
||||
plymouth_settings=""
|
||||
else
|
||||
plymouth_settings="quiet"
|
||||
plymouth_settings=" quiet"
|
||||
fi
|
||||
fi
|
||||
if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then
|
||||
|
|
|
@ -184,9 +184,9 @@ detect_desktop_env(){
|
|||
default_desktop_executable="pantheon-session"
|
||||
default_desktop_file="pantheon"
|
||||
msg2 "Detected Pantheon desktop environment"
|
||||
elif [ -e "$1/usr/bin/budgie-session" ] && [ -e "$1/usr/share/xsessions/budgie-session.desktop" ]; then
|
||||
elif [ -e "$1/usr/bin/budgie-session" ] && [ -e "$1/usr/share/xsessions/budgie-desktop.desktop" ]; then
|
||||
default_desktop_executable="budgie-session"
|
||||
default_desktop_file="budgie-session"
|
||||
default_desktop_file="budgie-desktop"
|
||||
msg2 "Detected Budgie desktop environment"
|
||||
elif [ -e "$1/usr/bin/i3" ] && [ -e "$1/usr/share/xsessions/i3.desktop" ]; then
|
||||
default_desktop_executable="i3"
|
||||
|
@ -200,6 +200,10 @@ detect_desktop_env(){
|
|||
default_desktop_executable="startfluxbox"
|
||||
default_desktop_file="fluxbox"
|
||||
msg2 "Detected Fluxbox desktop environment"
|
||||
elif [ -e "$1/usr/bin/dde-desktop" ] && [ -e "$1/usr/share/xsessions/deepin.desktop" ]; then
|
||||
default_desktop_executable="dde-desktop"
|
||||
default_desktop_file="deepin"
|
||||
msg2 "Detected Deepin desktop environment"
|
||||
else
|
||||
default_desktop_executable="none"
|
||||
default_desktop_file="none"
|
||||
|
|
|
@ -13,11 +13,13 @@ import ${LIBDIR}/util-iso-image.sh
|
|||
import ${LIBDIR}/util-iso-boot.sh
|
||||
import ${LIBDIR}/util-iso-calamares.sh
|
||||
|
||||
if ${use_overlayfs};then
|
||||
import_util_iso_fs(){
|
||||
if ${use_overlayfs};then
|
||||
import ${LIBDIR}/util-iso-overlayfs.sh
|
||||
else
|
||||
else
|
||||
import ${LIBDIR}/util-iso-aufs.sh
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# $1: path
|
||||
# $2: exit code
|
||||
|
@ -139,7 +141,8 @@ squash_image_dir() {
|
|||
local highcomp="-b 256K -Xbcj x86"
|
||||
[[ "${iso_compression}" != "xz" ]] && highcomp=""
|
||||
msg2 "Creating SquashFS image. This may take some time..."
|
||||
if [[ "$(basename "$1")" == "mhwd-image" ]]; then
|
||||
local used_kernel=$(echo ${kernel} | cut -c 6)
|
||||
if [[ "$(basename "$1")" == "mhwd-image" && ${used_kernel} -ge "4" ]]; then
|
||||
mksquashfs "${1}" "${sq_img}" -noappend -comp lz4 || die "Exit ..."
|
||||
else
|
||||
mksquashfs "${1}" "${sq_img}" -noappend -comp ${iso_compression} ${highcomp} || die "Exit ..."
|
||||
|
@ -650,6 +653,7 @@ make_profile(){
|
|||
msg "Start building [$1]"
|
||||
cd $1
|
||||
load_profile "$1"
|
||||
import_util_iso_fs
|
||||
${clean_first} && chroot_clean "${work_dir}"
|
||||
if ${iso_only}; then
|
||||
[[ ! -d ${work_dir} ]] && die "Create images: buildiso -p ${buildset_iso} -i"
|
||||
|
|
|
@ -25,11 +25,47 @@ check_requirements(){
|
|||
fi
|
||||
}
|
||||
|
||||
load_group(){
|
||||
local _multi \
|
||||
_space="s| ||g" \
|
||||
_clean=':a;N;$!ba;s/\n/ /g' \
|
||||
_com_rm="s|#.*||g" \
|
||||
devel_packages='' \
|
||||
file=${PKGDATADIR}/base-devel-udev
|
||||
|
||||
msg3 "Loading Group [$file] ..."
|
||||
|
||||
if ${is_multilib}; then
|
||||
_multi="s|>multilib||g"
|
||||
else
|
||||
_multi="s|>multilib.*||g"
|
||||
fi
|
||||
|
||||
devel_packages=$(sed "$_com_rm" "$file" \
|
||||
| sed "$_space" \
|
||||
| sed "$_multi" \
|
||||
| sed "$_clean")
|
||||
|
||||
echo ${devel_packages}
|
||||
}
|
||||
|
||||
init_base_devel(){
|
||||
if ${udev_root};then
|
||||
base_packages=( "$(load_group)" )
|
||||
else
|
||||
if ${is_multilib};then
|
||||
base_packages=('base-devel' 'multilib-devel')
|
||||
else
|
||||
base_packages=('base-devel')
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
chroot_create(){
|
||||
msg "Creating chroot for [${branch}] (${arch})..."
|
||||
mkdir -p "${work_dir}"
|
||||
setarch "${arch}" mkchroot \
|
||||
${mkchroot_args[*]} \
|
||||
setarch "${arch}" \
|
||||
mkchroot ${mkchroot_args[*]} \
|
||||
"${work_dir}/root" \
|
||||
${base_packages[*]} || abort
|
||||
}
|
||||
|
@ -54,7 +90,7 @@ chroot_clean(){
|
|||
|
||||
chroot_update(){
|
||||
msg "Updating chroot for [${branch}] (${arch})..."
|
||||
chroot-run ${chroot_run_args[*]} \
|
||||
chroot-run ${mkchroot_args[*]} \
|
||||
"${work_dir}/${OWNER}" \
|
||||
pacman -Syu --noconfirm || abort
|
||||
|
||||
|
@ -70,13 +106,6 @@ clean_up(){
|
|||
fi
|
||||
}
|
||||
|
||||
blacklist_pkg(){
|
||||
msg "Removing ${blacklist[@]}..."
|
||||
for item in "${blacklist[@]}"; do
|
||||
chroot-run $1/root pacman -Rdd "$item" --noconfirm
|
||||
done
|
||||
}
|
||||
|
||||
prepare_cachedir(){
|
||||
prepare_dir "${cache_dir_pkg}"
|
||||
chown -R "${OWNER}:users" "${cache_dir_pkg}"
|
||||
|
@ -126,9 +155,6 @@ run_post_build(){
|
|||
make_pkg(){
|
||||
msg "Start building [$1]"
|
||||
cd $1
|
||||
for p in ${blacklist_trigger[@]}; do
|
||||
[[ $1 == $p ]] && blacklist_pkg "${work_dir}"
|
||||
done
|
||||
setarch "${arch}" \
|
||||
mkchrootpkg ${mkchrootpkg_args[*]} -- ${makepkg_args[*]} || eval "$2"
|
||||
run_post_build
|
||||
|
|
|
@ -337,10 +337,6 @@ init_buildpkg(){
|
|||
prepare_dir "${sets_dir_pkg}"
|
||||
|
||||
[[ -z ${buildset_pkg} ]] && buildset_pkg='default'
|
||||
|
||||
[[ -z ${blacklist_trigger[@]} ]] && blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')
|
||||
|
||||
[[ -z ${blacklist[@]} ]] && blacklist=('libsystemd')
|
||||
}
|
||||
|
||||
init_buildiso(){
|
||||
|
@ -465,7 +461,7 @@ load_profile_config(){
|
|||
fi
|
||||
|
||||
if [[ -z ${start_openrc[@]} ]];then
|
||||
start_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
|
||||
start_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
|
||||
fi
|
||||
|
||||
if [[ -z ${disable_openrc[@]} ]];then
|
||||
|
|
Loading…
Reference in a new issue