Compare commits

..

14 Commits
0.6.2 ... 0.6.3

Author SHA1 Message Date
artoo
13f63047a2 Merge pull request #34 from artix-linux/devel
Devel
2017-11-05 23:24:34 +01:00
udeved
7cc0c0c86a buildtree: default to system repo 2017-11-05 23:23:58 +01:00
udeved
327be3b735 update world and galaxy import lists 2017-11-05 23:20:34 +01:00
udeved
6e20fc6d07 update import lists 2017-11-05 08:08:59 +01:00
udeved
8436f0cafb update import list 2017-11-03 22:32:53 +01:00
udeved
1ded762a78 use makepkg library instead of local function copies 2017-11-03 18:41:21 +01:00
udeved
f3ac8b8679 mkchrootpkg: move init_variables() to be part of main() 2017-11-03 18:39:58 +01:00
udeved
622f426686 util-pkg-tree: use find to delete patches 2017-10-21 14:20:00 +02:00
udeved
07ee48ff72 buildtree: add patches repo subdir 2017-10-21 13:45:30 +02:00
udeved
1728682147 buildiso: use strong hash algo for sfs checksums 2017-10-21 13:45:01 +02:00
udeved
710d615cbb libs: rm global log_dir and tmp_dir 2017-10-15 18:57:05 +02:00
udeved
a305eac6ce deployiso: fix uplimit 2017-10-15 17:50:58 +02:00
udeved
b964b729cc util-pkg-tree: rm useless if 2017-10-14 10:29:17 +02:00
udeved
6d5b4d45dd buildtree: small fixes 2017-10-14 10:27:45 +02:00
12 changed files with 162 additions and 158 deletions

View File

@@ -25,8 +25,8 @@ display_settings(){
show_config
msg "REPOS:"
msg2 "repo_tree_arch: %s" "${repo_tree_arch[*]}"
msg2 "repo_tree_artix: %s" "${repo_tree_artix[*]}"
msg2 "repo_tree_arch: %s" "${repo_tree_arch[*]}"
msg "OPTIONS:"
msg2 "repository: %s" "${repository}"
@@ -41,7 +41,7 @@ display_settings(){
msg "PATHS:"
msg2 "tree_dir_artix: %s" "${tree_dir_artix}"
msg2 "tree_dir_arch: %s" "${tree_dir_arch}"
msg2 "patches_dir: %s" "${patches_dir}"
msg2 "patches_dir: %s" "${patches_dir}/${repository}"
}
load_user_info
@@ -54,9 +54,9 @@ artix=false
compare=false
import_arch=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() {
echo "Usage: ${0##*/} [options]"
@@ -95,7 +95,7 @@ shift $(($OPTIND - 1))
prepare_dir "${tree_dir_artix}"
prepare_dir "${tree_dir_arch}"
prepare_dir "${patches_dir}"
prepare_dir "${patches_dir}/${repository}"
${pretend} && display_settings && exit 1

View File

@@ -78,7 +78,7 @@ opts='p:l:uvtqh'
while getopts "${opts}" arg; do
case "${arg}" in
p) profile="$OPTARG" ;;
l) limit="$OPTARG" ;;
l) uplimit="$OPTARG" ;;
u) update=true; rsync_args+=(-u) ;;
t) torrent=true ;;
v) verbose=true; rsync_args+=(-v --stats) ;;

View File

@@ -19,29 +19,6 @@ import ${LIBDIR}/util-chroot.sh
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() {
echo "Usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]"
echo ' Run this script in a PKGBUILD dir to build a package inside a'
@@ -293,7 +270,26 @@ move_products() {
orig_argv=("$0" "$@")
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:'

View File

@@ -10,3 +10,11 @@ libsodium
zeromq
jansson
libnewt
libsass
sassc
libx86emu
hwinfo
yaml-cpp
libbson
libmongoc
cmocka

View File

@@ -179,6 +179,9 @@ python-packaging
python-pyparsing
python-setuptools
python-six
pyalpm
python-pyelftools
python-numpy
randrproto
recordproto
renderproto
@@ -229,3 +232,99 @@ poppler
bc
xdg-utils
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

View File

@@ -102,7 +102,7 @@ _mnt_dev() {
_verify_checksum() {
local _status
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=$?
cd "${OLDPWD}"
return ${_status}
@@ -160,7 +160,7 @@ artix_mount_handler() {
if [[ "${checksum}" == "y" ]]; then
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}.md5" ]]; then
if [[ -f "/run/artix/bootmnt/${artixbasedir}/${arch}/${fs}.sha512" ]]; then
msg -n ":: Self-test requested, please wait..."
if _verify_checksum "${fs}"; then
msg "done. Checksum is OK, continue booting."
@@ -170,7 +170,7 @@ artix_mount_handler() {
launch_interactive_shell
fi
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
fi
fi

View File

@@ -10,7 +10,7 @@
# GNU General Public License for more details.
get_preset(){
local p=${tmp_dir}/${kernel}.preset
local p=/tmp/${kernel}.preset
cp ${DATADIR}/linux.preset $p
sed -e "s|@kernel@|$kernel|g" \
-e "s|@arch@|${target_arch}|g"\

View File

@@ -86,9 +86,9 @@ error_function() {
# $1: function
run_log(){
local func="$1"
local func="$1" log_dir='/var/log/artools'
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"
tee "$logfile" < "$logpipe" &
local teepid=$!
@@ -262,9 +262,9 @@ make_sig () {
make_checksum(){
local idir="$1" file="$2"
msg2 "Creating md5sum ..."
msg2 "Creating sha512sum ..."
cd $idir
md5sum $file.sfs > $file.md5
sha512sum $file.sfs > $file.sha512
cd ${OLDPWD}
}
@@ -282,8 +282,8 @@ make_sfs() {
msg "Generating SquashFS image for %s" "${src}"
if [[ -f "${sfs}" ]]; then
local has_changed_dir=$(find ${src} -newer ${sfs})
msg2 "Possible changes for %s ..." "${src}" >> ${tmp_dir}/buildiso.debug
msg2 "%s" "${has_changed_dir}" >> ${tmp_dir}/buildiso.debug
msg2 "Possible changes for %s ..." "${src}" >> /tmp/buildiso.debug
msg2 "%s" "${has_changed_dir}" >> /tmp/buildiso.debug
if [[ -n "${has_changed_dir}" ]]; then
msg2 "SquashFS image %s is not up to date, rebuilding..." "${sfs}"
rm "${sfs}"

View File

@@ -8,61 +8,22 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
export LC_MESSAGES=C
# export LC_MESSAGES=C
export LANG=C
declare ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW=''
source /usr/share/makepkg/util.sh
if [[ -t 2 ]]; then
# prefer terminal safe colored and bold text when tput is supported
if tput setaf 0 &>/dev/null; then
ALL_OFF="$(tput sgr0)"
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
colorize
else
declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW=''
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() {
local mesg=$1; shift
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() {
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" "$@" >&2

View File

@@ -122,42 +122,23 @@ set_import_path(){
local repo="$1" pkg="$2"
case $repo in
system|world)
if [[ "$repo" == 'system' ]];then
arch_repo=core
arch_dir=packages
fi
if [[ "$repo" == 'world' ]];then
arch_repo=extra
arch_dir=packages
fi
arch_dir=packages
[[ "$repo" == 'system' ]] && arch_repo=core
[[ "$repo" == 'world' ]] && arch_repo=extra
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
src=$import_path/$arch_repo-x86_64
if [[ -d $import_path/testing-x86_64 ]];then
src=$import_path/testing-x86_64
fi
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
[[ -d $import_path/testing-x86_64 ]] && src=$import_path/testing-x86_64
[[ -d $import_path/$arch_repo-any ]] && src=$import_path/$arch_repo-any
[[ -d $import_path/testing-any ]] && src=$import_path/testing-any
;;
galaxy)
arch_repo=community
arch_dir=$arch_repo
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos/$arch_repo
src=$import_path-x86_64
if [[ -d $import_path-testing-x86_64 ]];then
src=$import_path-testing-x86_64
fi
if [[ -d $import_path-any ]];then
src=$import_path-any
fi
if [[ -d $import_path-testing-any ]];then
src=$import_path-testing-any
fi
[[ -d $import_path-testing-x86_64 ]] && src=$import_path-testing-x86_64
[[ -d $import_path-any ]] && src=$import_path-any
[[ -d $import_path-testing-any ]] && src=$import_path-testing-any
;;
lib32)
if [[ "$pkg" == 'llvm' ]];then
@@ -165,20 +146,17 @@ set_import_path(){
arch_dir=packages
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
src=$import_path/extra-x86_64
if [[ -d $import_path/testing-x86_64 ]];then
src=$import_path/testing-x86_64
fi
[[ -d $import_path/testing-x86_64 ]] && src=$import_path/testing-x86_64
else
arch_repo=multilib
arch_dir=community
import_path=${tree_dir_arch}/$arch_dir/$pkg/repos
src=$import_path/$arch_repo-x86_64
if [[ -d $import_path/$arch_repo-testing-x86_64 ]];then
src=$import_path/$arch_repo-testing-x86_64
fi
[[ -d $import_path/$arch_repo-testing-x86_64 ]] && src=$import_path/$arch_repo-testing-x86_64
fi
;;
esac
# info "src: %s" "$src"
}
show_version_table(){
@@ -202,10 +180,10 @@ show_version_table(){
fi
unset pkgver epoch pkgrel artixver archver package
done
rm ${patches_dir}/*.patch
find "${patches_dir}/$repo/" -name *.patch -delete
for upd in "${!UPDATES[@]}"; do
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
}
@@ -222,7 +200,6 @@ import_from_arch(){
source $src/PKGBUILD 2>/dev/null
local ver=$(get_full_version $pkg)
msg "Package: %s-%s" "$pkg" "$ver"
# msg2 "src: %s" "$src"
rsync "${rsync_args[@]}" $src/ ${tree_dir_artix}/$repo/$pkg/
patch_pkg "$pkg"
if ${push};then

View File

@@ -9,15 +9,6 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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
# $2: soarch
process_sofile() {
@@ -45,30 +36,6 @@ pkgver_equal() {
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() {
local searchdirs=("$PWD" "$PKGDEST") results=()
local targetname=$1 targetver=$2 targetarch=$3

View File

@@ -58,10 +58,6 @@ init_artools_base(){
[[ -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
prepare_dir "${workspace_dir}"