Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
13f63047a2 | ||
![]() |
7cc0c0c86a | ||
![]() |
327be3b735 | ||
![]() |
6e20fc6d07 | ||
![]() |
8436f0cafb | ||
![]() |
1ded762a78 | ||
![]() |
f3ac8b8679 | ||
![]() |
622f426686 | ||
![]() |
07ee48ff72 | ||
![]() |
1728682147 | ||
![]() |
710d615cbb | ||
![]() |
a305eac6ce | ||
![]() |
b964b729cc | ||
![]() |
6d5b4d45dd |
@@ -25,8 +25,8 @@ display_settings(){
|
|||||||
show_config
|
show_config
|
||||||
|
|
||||||
msg "REPOS:"
|
msg "REPOS:"
|
||||||
msg2 "repo_tree_arch: %s" "${repo_tree_arch[*]}"
|
|
||||||
msg2 "repo_tree_artix: %s" "${repo_tree_artix[*]}"
|
msg2 "repo_tree_artix: %s" "${repo_tree_artix[*]}"
|
||||||
|
msg2 "repo_tree_arch: %s" "${repo_tree_arch[*]}"
|
||||||
|
|
||||||
msg "OPTIONS:"
|
msg "OPTIONS:"
|
||||||
msg2 "repository: %s" "${repository}"
|
msg2 "repository: %s" "${repository}"
|
||||||
@@ -41,7 +41,7 @@ display_settings(){
|
|||||||
msg "PATHS:"
|
msg "PATHS:"
|
||||||
msg2 "tree_dir_artix: %s" "${tree_dir_artix}"
|
msg2 "tree_dir_artix: %s" "${tree_dir_artix}"
|
||||||
msg2 "tree_dir_arch: %s" "${tree_dir_arch}"
|
msg2 "tree_dir_arch: %s" "${tree_dir_arch}"
|
||||||
msg2 "patches_dir: %s" "${patches_dir}"
|
msg2 "patches_dir: %s" "${patches_dir}/${repository}"
|
||||||
}
|
}
|
||||||
|
|
||||||
load_user_info
|
load_user_info
|
||||||
@@ -54,9 +54,9 @@ artix=false
|
|||||||
compare=false
|
compare=false
|
||||||
import_arch=false
|
import_arch=false
|
||||||
gitpush=false
|
gitpush=false
|
||||||
repository=${PWD##*/}
|
repository='system' #${PWD##*/}
|
||||||
|
|
||||||
rsync_args=(-aWxv --progress --delete-before --no-R --no-implied-dirs)
|
rsync_args=(-aWxvci --progress --delete-before --no-R --no-implied-dirs)
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options]"
|
echo "Usage: ${0##*/} [options]"
|
||||||
@@ -95,7 +95,7 @@ shift $(($OPTIND - 1))
|
|||||||
|
|
||||||
prepare_dir "${tree_dir_artix}"
|
prepare_dir "${tree_dir_artix}"
|
||||||
prepare_dir "${tree_dir_arch}"
|
prepare_dir "${tree_dir_arch}"
|
||||||
prepare_dir "${patches_dir}"
|
prepare_dir "${patches_dir}/${repository}"
|
||||||
|
|
||||||
${pretend} && display_settings && exit 1
|
${pretend} && display_settings && exit 1
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ opts='p:l:uvtqh'
|
|||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
p) profile="$OPTARG" ;;
|
p) profile="$OPTARG" ;;
|
||||||
l) limit="$OPTARG" ;;
|
l) uplimit="$OPTARG" ;;
|
||||||
u) update=true; rsync_args+=(-u) ;;
|
u) update=true; rsync_args+=(-u) ;;
|
||||||
t) torrent=true ;;
|
t) torrent=true ;;
|
||||||
v) verbose=true; rsync_args+=(-v --stats) ;;
|
v) verbose=true; rsync_args+=(-v --stats) ;;
|
||||||
|
@@ -19,29 +19,6 @@ import ${LIBDIR}/util-chroot.sh
|
|||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
init_variables() {
|
|
||||||
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
|
|
||||||
makepkg_args=("${default_makepkg_args[@]}")
|
|
||||||
keepbuilddir=false
|
|
||||||
update_first=false
|
|
||||||
clean_first=false
|
|
||||||
run_namcap=false
|
|
||||||
temp_chroot=false
|
|
||||||
chrootdir=
|
|
||||||
passeddir=
|
|
||||||
makepkg_user=
|
|
||||||
declare -ga install_pkgs
|
|
||||||
declare -gi ret=0
|
|
||||||
|
|
||||||
bindmounts_ro=()
|
|
||||||
bindmounts_rw=()
|
|
||||||
|
|
||||||
copy=$USER
|
|
||||||
[[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
|
|
||||||
[[ -z "$copy" || $copy = root ]] && copy=copy
|
|
||||||
src_owner=${SUDO_USER:-$USER}
|
|
||||||
}
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]"
|
echo "Usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]"
|
||||||
echo ' Run this script in a PKGBUILD dir to build a package inside a'
|
echo ' Run this script in a PKGBUILD dir to build a package inside a'
|
||||||
@@ -293,7 +270,26 @@ move_products() {
|
|||||||
orig_argv=("$0" "$@")
|
orig_argv=("$0" "$@")
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
init_variables
|
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
|
||||||
|
makepkg_args=("${default_makepkg_args[@]}")
|
||||||
|
keepbuilddir=false
|
||||||
|
update_first=false
|
||||||
|
clean_first=false
|
||||||
|
run_namcap=false
|
||||||
|
temp_chroot=false
|
||||||
|
chrootdir=
|
||||||
|
passeddir=
|
||||||
|
makepkg_user=
|
||||||
|
declare -ga install_pkgs
|
||||||
|
declare -gi ret=0
|
||||||
|
|
||||||
|
bindmounts_ro=()
|
||||||
|
bindmounts_rw=()
|
||||||
|
|
||||||
|
copy=$USER
|
||||||
|
[[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
|
||||||
|
[[ -z "$copy" || $copy = root ]] && copy=copy
|
||||||
|
src_owner=${SUDO_USER:-$USER}
|
||||||
|
|
||||||
local opts='hcur:I:l:nTD:d:U:'
|
local opts='hcur:I:l:nTD:d:U:'
|
||||||
|
|
||||||
|
@@ -10,3 +10,11 @@ libsodium
|
|||||||
zeromq
|
zeromq
|
||||||
jansson
|
jansson
|
||||||
libnewt
|
libnewt
|
||||||
|
libsass
|
||||||
|
sassc
|
||||||
|
libx86emu
|
||||||
|
hwinfo
|
||||||
|
yaml-cpp
|
||||||
|
libbson
|
||||||
|
libmongoc
|
||||||
|
cmocka
|
||||||
|
@@ -179,6 +179,9 @@ python-packaging
|
|||||||
python-pyparsing
|
python-pyparsing
|
||||||
python-setuptools
|
python-setuptools
|
||||||
python-six
|
python-six
|
||||||
|
pyalpm
|
||||||
|
python-pyelftools
|
||||||
|
python-numpy
|
||||||
randrproto
|
randrproto
|
||||||
recordproto
|
recordproto
|
||||||
renderproto
|
renderproto
|
||||||
@@ -229,3 +232,99 @@ poppler
|
|||||||
bc
|
bc
|
||||||
xdg-utils
|
xdg-utils
|
||||||
xf86-input-libinput
|
xf86-input-libinput
|
||||||
|
assimp
|
||||||
|
cdparanoia
|
||||||
|
cifs-utils
|
||||||
|
ffmpeg
|
||||||
|
flac
|
||||||
|
gamin
|
||||||
|
gcab
|
||||||
|
giblib
|
||||||
|
gsm
|
||||||
|
gst-plugins-base
|
||||||
|
gstreamer
|
||||||
|
gtk2
|
||||||
|
hunspell
|
||||||
|
hyphen
|
||||||
|
imlib2
|
||||||
|
iniparser
|
||||||
|
iso-codes
|
||||||
|
jack
|
||||||
|
lame
|
||||||
|
ldb
|
||||||
|
libass
|
||||||
|
libavc1394
|
||||||
|
libbluray
|
||||||
|
libbsd
|
||||||
|
libevdev
|
||||||
|
libgee
|
||||||
|
libid3tag
|
||||||
|
libiec61883
|
||||||
|
libmng
|
||||||
|
libmodplug
|
||||||
|
libndp
|
||||||
|
libnotify
|
||||||
|
libogg
|
||||||
|
libraw1394
|
||||||
|
libsamplerate
|
||||||
|
libsigsegv
|
||||||
|
libsndfile
|
||||||
|
libsoup
|
||||||
|
libsoxr
|
||||||
|
libsrtp
|
||||||
|
libssh
|
||||||
|
libteam
|
||||||
|
libtheora
|
||||||
|
libva
|
||||||
|
libvdpau
|
||||||
|
libvisual
|
||||||
|
libvorbis
|
||||||
|
libvpx
|
||||||
|
libxss
|
||||||
|
libxv
|
||||||
|
libxvmc
|
||||||
|
libyaml
|
||||||
|
ocl-icd
|
||||||
|
openal
|
||||||
|
opencore-amr
|
||||||
|
openjpeg2
|
||||||
|
opus
|
||||||
|
orc
|
||||||
|
perl-file-which
|
||||||
|
potrace
|
||||||
|
protobuf
|
||||||
|
scrnsaverproto
|
||||||
|
sdl2
|
||||||
|
snappy
|
||||||
|
speex
|
||||||
|
t1lib
|
||||||
|
talloc
|
||||||
|
tdb
|
||||||
|
tevent
|
||||||
|
texlive-bin
|
||||||
|
texlive-core
|
||||||
|
texlive-latexextra
|
||||||
|
ttf-dejavu
|
||||||
|
usbmuxd
|
||||||
|
videoproto
|
||||||
|
vid.stab
|
||||||
|
webrtc-audio-processing
|
||||||
|
x265
|
||||||
|
xorg-xauth
|
||||||
|
xorg-xset
|
||||||
|
xvidcore
|
||||||
|
zita-alsa-pcmi
|
||||||
|
zita-resampler
|
||||||
|
zziplib
|
||||||
|
xmlto
|
||||||
|
namcap
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
gperf
|
||||||
|
gperftools
|
||||||
|
double-conversion
|
||||||
|
lapack
|
||||||
|
texlive-formatsextra
|
||||||
|
texlive-pictures
|
||||||
|
texlive-science
|
||||||
|
nasm
|
||||||
|
@@ -102,7 +102,7 @@ _mnt_dev() {
|
|||||||
_verify_checksum() {
|
_verify_checksum() {
|
||||||
local _status
|
local _status
|
||||||
cd "/run/artix/bootmnt/${artixbasedir}/${arch}"
|
cd "/run/artix/bootmnt/${artixbasedir}/${arch}"
|
||||||
md5sum -c $1.md5 > /tmp/checksum.log 2>&1
|
sha512sum -c $1.sha512 > /tmp/checksum.log 2>&1
|
||||||
_status=$?
|
_status=$?
|
||||||
cd "${OLDPWD}"
|
cd "${OLDPWD}"
|
||||||
return ${_status}
|
return ${_status}
|
||||||
@@ -160,7 +160,7 @@ artix_mount_handler() {
|
|||||||
if [[ "${checksum}" == "y" ]]; then
|
if [[ "${checksum}" == "y" ]]; then
|
||||||
for fs in rootfs desktopfs livefs;do
|
for fs in rootfs desktopfs livefs;do
|
||||||
if [[ -f "/run/artix/bootmnt/${artixbasedir}/${arch}/${fs}.sfs" ]]; then
|
if [[ -f "/run/artix/bootmnt/${artixbasedir}/${arch}/${fs}.sfs" ]]; then
|
||||||
if [[ -f "/run/artix/bootmnt/${artixbasedir}/${arch}/${fs}.md5" ]]; then
|
if [[ -f "/run/artix/bootmnt/${artixbasedir}/${arch}/${fs}.sha512" ]]; then
|
||||||
msg -n ":: Self-test requested, please wait..."
|
msg -n ":: Self-test requested, please wait..."
|
||||||
if _verify_checksum "${fs}"; then
|
if _verify_checksum "${fs}"; then
|
||||||
msg "done. Checksum is OK, continue booting."
|
msg "done. Checksum is OK, continue booting."
|
||||||
@@ -170,7 +170,7 @@ artix_mount_handler() {
|
|||||||
launch_interactive_shell
|
launch_interactive_shell
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "ERROR: checksum=y option specified but ${artixbasedir}/${arch}/${fs}.md5 not found"
|
echo "ERROR: checksum=y option specified but ${artixbasedir}/${arch}/${fs}.sha512 not found"
|
||||||
launch_interactive_shell
|
launch_interactive_shell
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
get_preset(){
|
get_preset(){
|
||||||
local p=${tmp_dir}/${kernel}.preset
|
local p=/tmp/${kernel}.preset
|
||||||
cp ${DATADIR}/linux.preset $p
|
cp ${DATADIR}/linux.preset $p
|
||||||
sed -e "s|@kernel@|$kernel|g" \
|
sed -e "s|@kernel@|$kernel|g" \
|
||||||
-e "s|@arch@|${target_arch}|g"\
|
-e "s|@arch@|${target_arch}|g"\
|
||||||
|
@@ -86,9 +86,9 @@ error_function() {
|
|||||||
|
|
||||||
# $1: function
|
# $1: function
|
||||||
run_log(){
|
run_log(){
|
||||||
local func="$1"
|
local func="$1" log_dir='/var/log/artools'
|
||||||
local logfile=${log_dir}/$(gen_iso_fn).$func.log
|
local logfile=${log_dir}/$(gen_iso_fn).$func.log
|
||||||
logpipe=$(mktemp -u "${tmp_dir}/$func.pipe.XXXXXXXX")
|
logpipe=$(mktemp -u "/tmp/$func.pipe.XXXXXXXX")
|
||||||
mkfifo "$logpipe"
|
mkfifo "$logpipe"
|
||||||
tee "$logfile" < "$logpipe" &
|
tee "$logfile" < "$logpipe" &
|
||||||
local teepid=$!
|
local teepid=$!
|
||||||
@@ -262,9 +262,9 @@ make_sig () {
|
|||||||
|
|
||||||
make_checksum(){
|
make_checksum(){
|
||||||
local idir="$1" file="$2"
|
local idir="$1" file="$2"
|
||||||
msg2 "Creating md5sum ..."
|
msg2 "Creating sha512sum ..."
|
||||||
cd $idir
|
cd $idir
|
||||||
md5sum $file.sfs > $file.md5
|
sha512sum $file.sfs > $file.sha512
|
||||||
cd ${OLDPWD}
|
cd ${OLDPWD}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,8 +282,8 @@ make_sfs() {
|
|||||||
msg "Generating SquashFS image for %s" "${src}"
|
msg "Generating SquashFS image for %s" "${src}"
|
||||||
if [[ -f "${sfs}" ]]; then
|
if [[ -f "${sfs}" ]]; then
|
||||||
local has_changed_dir=$(find ${src} -newer ${sfs})
|
local has_changed_dir=$(find ${src} -newer ${sfs})
|
||||||
msg2 "Possible changes for %s ..." "${src}" >> ${tmp_dir}/buildiso.debug
|
msg2 "Possible changes for %s ..." "${src}" >> /tmp/buildiso.debug
|
||||||
msg2 "%s" "${has_changed_dir}" >> ${tmp_dir}/buildiso.debug
|
msg2 "%s" "${has_changed_dir}" >> /tmp/buildiso.debug
|
||||||
if [[ -n "${has_changed_dir}" ]]; then
|
if [[ -n "${has_changed_dir}" ]]; then
|
||||||
msg2 "SquashFS image %s is not up to date, rebuilding..." "${sfs}"
|
msg2 "SquashFS image %s is not up to date, rebuilding..." "${sfs}"
|
||||||
rm "${sfs}"
|
rm "${sfs}"
|
||||||
|
@@ -8,61 +8,22 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
export LC_MESSAGES=C
|
# export LC_MESSAGES=C
|
||||||
export LANG=C
|
export LANG=C
|
||||||
|
|
||||||
declare ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW=''
|
source /usr/share/makepkg/util.sh
|
||||||
|
|
||||||
if [[ -t 2 ]]; then
|
if [[ -t 2 ]]; then
|
||||||
# prefer terminal safe colored and bold text when tput is supported
|
colorize
|
||||||
if tput setaf 0 &>/dev/null; then
|
else
|
||||||
ALL_OFF="$(tput sgr0)"
|
declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW=''
|
||||||
BOLD="$(tput bold)"
|
|
||||||
RED="${BOLD}$(tput setaf 1)"
|
|
||||||
GREEN="${BOLD}$(tput setaf 2)"
|
|
||||||
YELLOW="${BOLD}$(tput setaf 3)"
|
|
||||||
BLUE="${BOLD}$(tput setaf 4)"
|
|
||||||
else
|
|
||||||
ALL_OFF="\e[0m"
|
|
||||||
BOLD="\e[1m"
|
|
||||||
RED="${BOLD}\e[31m"
|
|
||||||
GREEN="${BOLD}\e[32m"
|
|
||||||
YELLOW="${BOLD}\e[33m"
|
|
||||||
BLUE="${BOLD}\e[34m"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
|
|
||||||
|
|
||||||
plain() {
|
|
||||||
local mesg=$1; shift
|
|
||||||
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
msg() {
|
|
||||||
local mesg=$1; shift
|
|
||||||
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
msg2() {
|
|
||||||
local mesg=$1; shift
|
|
||||||
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
info() {
|
info() {
|
||||||
local mesg=$1; shift
|
local mesg=$1; shift
|
||||||
printf "${YELLOW} -->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
printf "${YELLOW} -->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
warning() {
|
|
||||||
local mesg=$1; shift
|
|
||||||
printf "${YELLOW}==> WARNING:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
error() {
|
|
||||||
local mesg=$1; shift
|
|
||||||
printf "${RED}==> ERROR:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
stat_busy() {
|
stat_busy() {
|
||||||
local mesg=$1; shift
|
local mesg=$1; shift
|
||||||
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" "$@" >&2
|
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" "$@" >&2
|
||||||
|
@@ -122,42 +122,23 @@ set_import_path(){
|
|||||||
local repo="$1" pkg="$2"
|
local repo="$1" pkg="$2"
|
||||||
case $repo in
|
case $repo in
|
||||||
system|world)
|
system|world)
|
||||||
if [[ "$repo" == 'system' ]];then
|
arch_dir=packages
|
||||||
arch_repo=core
|
[[ "$repo" == 'system' ]] && arch_repo=core
|
||||||
arch_dir=packages
|
[[ "$repo" == 'world' ]] && arch_repo=extra
|
||||||
fi
|
|
||||||
if [[ "$repo" == 'world' ]];then
|
|
||||||
arch_repo=extra
|
|
||||||
arch_dir=packages
|
|
||||||
fi
|
|
||||||
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
||||||
|
|
||||||
src=$import_path/$arch_repo-x86_64
|
src=$import_path/$arch_repo-x86_64
|
||||||
if [[ -d $import_path/testing-x86_64 ]];then
|
[[ -d $import_path/testing-x86_64 ]] && src=$import_path/testing-x86_64
|
||||||
src=$import_path/testing-x86_64
|
[[ -d $import_path/$arch_repo-any ]] && src=$import_path/$arch_repo-any
|
||||||
fi
|
[[ -d $import_path/testing-any ]] && src=$import_path/testing-any
|
||||||
if [[ -d $import_path/$arch_repo-any ]];then
|
|
||||||
src=$import_path/$arch_repo-any
|
|
||||||
fi
|
|
||||||
if [[ -d $import_path/testing-any ]];then
|
|
||||||
src=$import_path/testing-any
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
galaxy)
|
galaxy)
|
||||||
arch_repo=community
|
arch_repo=community
|
||||||
arch_dir=$arch_repo
|
arch_dir=$arch_repo
|
||||||
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos/$arch_repo
|
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos/$arch_repo
|
||||||
|
|
||||||
src=$import_path-x86_64
|
src=$import_path-x86_64
|
||||||
if [[ -d $import_path-testing-x86_64 ]];then
|
[[ -d $import_path-testing-x86_64 ]] && src=$import_path-testing-x86_64
|
||||||
src=$import_path-testing-x86_64
|
[[ -d $import_path-any ]] && src=$import_path-any
|
||||||
fi
|
[[ -d $import_path-testing-any ]] && src=$import_path-testing-any
|
||||||
if [[ -d $import_path-any ]];then
|
|
||||||
src=$import_path-any
|
|
||||||
fi
|
|
||||||
if [[ -d $import_path-testing-any ]];then
|
|
||||||
src=$import_path-testing-any
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
lib32)
|
lib32)
|
||||||
if [[ "$pkg" == 'llvm' ]];then
|
if [[ "$pkg" == 'llvm' ]];then
|
||||||
@@ -165,20 +146,17 @@ set_import_path(){
|
|||||||
arch_dir=packages
|
arch_dir=packages
|
||||||
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
||||||
src=$import_path/extra-x86_64
|
src=$import_path/extra-x86_64
|
||||||
if [[ -d $import_path/testing-x86_64 ]];then
|
[[ -d $import_path/testing-x86_64 ]] && src=$import_path/testing-x86_64
|
||||||
src=$import_path/testing-x86_64
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
arch_repo=multilib
|
arch_repo=multilib
|
||||||
arch_dir=community
|
arch_dir=community
|
||||||
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
|
||||||
src=$import_path/$arch_repo-x86_64
|
src=$import_path/$arch_repo-x86_64
|
||||||
if [[ -d $import_path/$arch_repo-testing-x86_64 ]];then
|
[[ -d $import_path/$arch_repo-testing-x86_64 ]] && src=$import_path/$arch_repo-testing-x86_64
|
||||||
src=$import_path/$arch_repo-testing-x86_64
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
# info "src: %s" "$src"
|
||||||
}
|
}
|
||||||
|
|
||||||
show_version_table(){
|
show_version_table(){
|
||||||
@@ -202,10 +180,10 @@ show_version_table(){
|
|||||||
fi
|
fi
|
||||||
unset pkgver epoch pkgrel artixver archver package
|
unset pkgver epoch pkgrel artixver archver package
|
||||||
done
|
done
|
||||||
rm ${patches_dir}/*.patch
|
find "${patches_dir}/$repo/" -name *.patch -delete
|
||||||
for upd in "${!UPDATES[@]}"; do
|
for upd in "${!UPDATES[@]}"; do
|
||||||
msg "Writing %s update patch ..." "$upd"
|
msg "Writing %s update patch ..." "$upd"
|
||||||
diff -u ${UPDATES[$upd]} > ${patches_dir}/"$upd"-archlinux.patch
|
diff -u ${UPDATES[$upd]} > ${patches_dir}/$repo/"$upd"-archlinux.patch
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +200,6 @@ import_from_arch(){
|
|||||||
source $src/PKGBUILD 2>/dev/null
|
source $src/PKGBUILD 2>/dev/null
|
||||||
local ver=$(get_full_version $pkg)
|
local ver=$(get_full_version $pkg)
|
||||||
msg "Package: %s-%s" "$pkg" "$ver"
|
msg "Package: %s-%s" "$pkg" "$ver"
|
||||||
# msg2 "src: %s" "$src"
|
|
||||||
rsync "${rsync_args[@]}" $src/ ${tree_dir_artix}/$repo/$pkg/
|
rsync "${rsync_args[@]}" $src/ ${tree_dir_artix}/$repo/$pkg/
|
||||||
patch_pkg "$pkg"
|
patch_pkg "$pkg"
|
||||||
if ${push};then
|
if ${push};then
|
||||||
|
@@ -9,15 +9,6 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
in_array() {
|
|
||||||
local needle=$1; shift
|
|
||||||
local item
|
|
||||||
for item in "$@"; do
|
|
||||||
[[ $item = $needle ]] && return 0 # Found
|
|
||||||
done
|
|
||||||
return 1 # Not Found
|
|
||||||
}
|
|
||||||
|
|
||||||
# $1: sofile
|
# $1: sofile
|
||||||
# $2: soarch
|
# $2: soarch
|
||||||
process_sofile() {
|
process_sofile() {
|
||||||
@@ -45,30 +36,6 @@ pkgver_equal() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_full_version() {
|
|
||||||
# set defaults if they weren't specified in buildfile
|
|
||||||
pkgbase=${pkgbase:-${pkgname[0]}}
|
|
||||||
epoch=${epoch:-0}
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
if [[ $epoch ]] && (( ! $epoch )); then
|
|
||||||
echo $pkgver-$pkgrel
|
|
||||||
else
|
|
||||||
echo $epoch:$pkgver-$pkgrel
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
for i in pkgver pkgrel epoch; do
|
|
||||||
local indirect="${i}_override"
|
|
||||||
eval $(declare -f package_$1 | sed -n "s/\(^[[:space:]]*$i=\)/${i}_override=/p")
|
|
||||||
[[ -z ${!indirect} ]] && eval ${indirect}=\"${!i}\"
|
|
||||||
done
|
|
||||||
if (( ! $epoch_override )); then
|
|
||||||
echo $pkgver_override-$pkgrel_override
|
|
||||||
else
|
|
||||||
echo $epoch_override:$pkgver_override-$pkgrel_override
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
find_cached_package() {
|
find_cached_package() {
|
||||||
local searchdirs=("$PWD" "$PKGDEST") results=()
|
local searchdirs=("$PWD" "$PKGDEST") results=()
|
||||||
local targetname=$1 targetver=$2 targetarch=$3
|
local targetname=$1 targetver=$2 targetarch=$3
|
||||||
|
@@ -58,10 +58,6 @@ init_artools_base(){
|
|||||||
|
|
||||||
[[ -z ${chroots_dir} ]] && chroots_dir='/var/lib/artools'
|
[[ -z ${chroots_dir} ]] && chroots_dir='/var/lib/artools'
|
||||||
|
|
||||||
log_dir='/var/log/artools'
|
|
||||||
|
|
||||||
tmp_dir='/tmp'
|
|
||||||
|
|
||||||
[[ -z ${workspace_dir} ]] && workspace_dir=/home/${OWNER}/artools-workspace
|
[[ -z ${workspace_dir} ]] && workspace_dir=/home/${OWNER}/artools-workspace
|
||||||
|
|
||||||
prepare_dir "${workspace_dir}"
|
prepare_dir "${workspace_dir}"
|
||||||
|
Reference in New Issue
Block a user