forked from artix/artools
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
6721a997bd | |||
6da82fb56b | |||
07ad0ef44a | |||
6e5e89f164 | |||
6494c1f787 | |||
5d7abf194a | |||
12fb8aa279 |
8
Makefile
8
Makefile
@@ -1,4 +1,4 @@
|
||||
VERSION=0.20
|
||||
VERSION=0.21
|
||||
|
||||
CHROOT_VERSION=0.10
|
||||
|
||||
@@ -59,7 +59,8 @@ LN_COMMITPKG = \
|
||||
multilib-testingpkg \
|
||||
multilib-stagingpkg \
|
||||
kde-unstablepkg \
|
||||
gnome-unstablepkg
|
||||
gnome-unstablepkg \
|
||||
rebuildpkg
|
||||
|
||||
LN_BUILDPKG = \
|
||||
buildpkg-system \
|
||||
@@ -95,7 +96,8 @@ PKG_LIBS = \
|
||||
PKG_UTIL = lib/util-pkg.sh
|
||||
|
||||
PKG_DATA = \
|
||||
data/pacman/makepkg.conf
|
||||
data/pacman/makepkg.conf \
|
||||
data/valid-names.conf
|
||||
|
||||
PATCHES = \
|
||||
$(wildcard data/patches/*.patch)
|
||||
|
@@ -92,6 +92,7 @@ while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
r) runlist=true ;;
|
||||
c) create=true ;;
|
||||
u) update=true ;;
|
||||
h|?) usage 0 ;;
|
||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||
esac
|
||||
|
@@ -24,8 +24,8 @@ prepare_commit(){
|
||||
|
||||
for r in $(ls repos); do
|
||||
mkdir "$CARCH/${r%-*}"
|
||||
cp repos/${r}/* $CARCH/${r%-*}/
|
||||
git add $CARCH/${r%-*}
|
||||
cp repos/"${r}"/* "$CARCH/${r%-*}/"
|
||||
git add "$CARCH/${r%-*}"
|
||||
done
|
||||
|
||||
git rm -r repos
|
||||
@@ -40,6 +40,16 @@ prepare_commit(){
|
||||
fi
|
||||
}
|
||||
|
||||
check_rebuild(){
|
||||
if [[ -d "$CARCH"/rebuild ]] && [[ "${REPO_DEST}" == 'staging' ]]; then
|
||||
git rm -r "$CARCH"/rebuild
|
||||
git commit -m "switch from rebuild to staging"
|
||||
elif [[ -d "$CARCH"/staging ]] && [[ "${REPO_DEST}" == 'rebuild' ]]; then
|
||||
git rm -r "$CARCH"/staging
|
||||
git commit -m "switch from staging to rebuild"
|
||||
fi
|
||||
}
|
||||
|
||||
check_team(){
|
||||
if [[ "${REPO_SRC}" == "core" && "${REPO_DEST}" == "extra" ]] || \
|
||||
[[ "${REPO_SRC}" == "extra" && "${REPO_DEST}" == "core" ]] || \
|
||||
@@ -88,7 +98,10 @@ commit_pkg() {
|
||||
repo_commit_pkg() {
|
||||
if [[ "${REPO_SRC}" == 'trunk' ]];then
|
||||
action='add'
|
||||
|
||||
prepare_commit
|
||||
check_rebuild
|
||||
|
||||
cp trunk/* "$CARCH/${REPO_DEST}"/
|
||||
else
|
||||
action='move'
|
||||
@@ -141,10 +154,15 @@ run(){
|
||||
}
|
||||
|
||||
is_valid_repo(){
|
||||
case "${REPO_SRC}" in
|
||||
core|extra|community|multilib|testing|community-testing|multilib-testing|staging|community-staging|multilib-staging|gnome-unstable|kde-unstable|trunk) return 0 ;;
|
||||
. "${DATADIR}"/valid-names.conf
|
||||
local _valid=trunk
|
||||
for repo in ${valid_names[@]}; do
|
||||
_valid=${repo:-}${repo:+|}$_valid
|
||||
done
|
||||
eval "case ${REPO_SRC} in
|
||||
${_valid}) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
esac"
|
||||
}
|
||||
|
||||
load_makepkg_config
|
||||
|
@@ -27,17 +27,18 @@ get_import_path(){
|
||||
|
||||
compare_m(){
|
||||
local result=$(vercmp "$artixver" "$archver")
|
||||
if [[ $artixrepo == *testing* ]] || [[ $artixrepo == *staging* ]]; then
|
||||
if [[ "${a}" == "${b}" ]]; then
|
||||
msg_row "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
else
|
||||
msg_row_notify "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
if [[ -n "$archrepo" ]]; then
|
||||
printf "%s\n" "${a}:${b}:$pkg" >> ${TREE_DIR_ARTIX}/pkg_moves.list
|
||||
case ${artixrepo} in
|
||||
*testing*|*staging*|*rebuild)
|
||||
if [[ "${a}" == "${b}" ]] || [[ "${a}" == 'staging' && "${b}" == 'rebuild' ]]; then
|
||||
msg_row "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
else
|
||||
msg_row_notify "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
if [[ -n "$archrepo" ]]; then
|
||||
printf "%s\n" "${a}:${b}:$pkg" >> ${TREE_DIR_ARTIX}/pkg_moves.list
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
compare_u(){
|
||||
@@ -65,7 +66,7 @@ pre_compare(){
|
||||
local artixrepo=$(find_repo "$pkgpath")
|
||||
local pkgbuild=$pkgpath/$artixrepo/PKGBUILD
|
||||
|
||||
if [[ -f $pkgbuild ]];then
|
||||
if [[ -f $pkgbuild ]]; then
|
||||
. $pkgbuild 2>/dev/null
|
||||
local artixver=$(get_full_version)
|
||||
|
||||
@@ -78,7 +79,7 @@ pre_compare(){
|
||||
|
||||
[[ "$node" != "$CARCH" ]] && b=${b%-*}
|
||||
|
||||
if [[ -f "$pkgbuild" ]];then
|
||||
if [[ -f "$pkgbuild" ]]; then
|
||||
. $pkgbuild 2>/dev/null
|
||||
local archver=$(get_full_version)
|
||||
fi
|
||||
@@ -106,7 +107,7 @@ compare_move(){
|
||||
|
||||
tree_loop(){
|
||||
local func="$1"
|
||||
for tree in ${ARTIX_TREE[@]};do
|
||||
for tree in ${ARTIX_TREE[@]}; do
|
||||
local pkgs=$(find ${TREE_DIR_ARTIX}/$tree -name trunk)
|
||||
for package in ${pkgs[@]}; do
|
||||
"$func" "$package"
|
||||
@@ -191,7 +192,7 @@ check_db(){
|
||||
local artixver=$(get_full_version)
|
||||
for name in ${pkgname[@]};do
|
||||
|
||||
if ! is_db_entry "$name-$artixver" "$repo";then
|
||||
if ! is_db_entry "$name-$artixver" "$repo"; then
|
||||
msg_row "${tableU}" "$repo" "$name" "$artixver" "false"
|
||||
fi
|
||||
|
||||
|
40
data/valid-names.conf
Normal file
40
data/valid-names.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
valid_names=(
|
||||
core
|
||||
extra
|
||||
community
|
||||
multilib
|
||||
testing
|
||||
community-testing
|
||||
multilib-testing
|
||||
staging
|
||||
community-staging
|
||||
multilib-staging
|
||||
rebuild
|
||||
gnome-unstable
|
||||
kde-unstable
|
||||
)
|
||||
|
||||
stable=(
|
||||
${valid_names[0]}
|
||||
${valid_names[1]}
|
||||
${valid_names[2]}
|
||||
${valid_names[3]}
|
||||
)
|
||||
|
||||
gremlins=(
|
||||
${valid_names[4]}
|
||||
${valid_names[5]}
|
||||
${valid_names[6]}
|
||||
)
|
||||
|
||||
goblins=(
|
||||
${valid_names[7]}
|
||||
${valid_names[8]}
|
||||
${valid_names[9]}
|
||||
${valid_names[10]}
|
||||
)
|
||||
|
||||
unstable=(
|
||||
${valid_names[11]}
|
||||
${valid_names[12]}
|
||||
)
|
@@ -34,16 +34,15 @@ add_svc_runit(){
|
||||
}
|
||||
|
||||
add_svc_s6(){
|
||||
local mnt="$1" names="$2" valid="" rlvl="${3:-default}"
|
||||
local mnt="$1" names="$2" rlvl="${3:-default}"
|
||||
for svc in $names; do
|
||||
error=false
|
||||
chroot $mnt s6-rc-db -c /etc/s6/rc/compiled type $svc &> /dev/null || error=true
|
||||
if [ $? == 0 ] && [[ $error == false ]]; then
|
||||
msg2 "Setting %s ..." "$svc"
|
||||
valid=${valid:-}${valid:+' '}${svc}
|
||||
chroot $mnt s6-rc-bundle-update -c /etc/s6/rc/compiled add $rlvl $svc
|
||||
fi
|
||||
done
|
||||
chroot $mnt s6-rc-bundle -c /etc/s6/rc/compiled add $rlvl $valid
|
||||
|
||||
# rebuild s6-linux-init binaries
|
||||
chroot $mnt rm -r /etc/s6/current
|
||||
|
@@ -25,11 +25,13 @@ get_compliant_name(){
|
||||
|
||||
set_arch_repos(){
|
||||
local x="$1" y="$2" z="$3"
|
||||
ARCH_REPOS=(core extra community multilib)
|
||||
. "${DATADIR}"/valid-names.conf
|
||||
|
||||
$x && ARCH_REPOS+=(testing community-testing multilib-testing)
|
||||
$y && ARCH_REPOS+=(staging community-staging multilib-staging)
|
||||
$z && ARCH_REPOS+=(gnome-unstable kde-unstable)
|
||||
ARCH_REPOS=(${stable[@]})
|
||||
|
||||
$x && ARCH_REPOS+=(${gremlins[@]})
|
||||
$y && ARCH_REPOS+=(${goblins[@]})
|
||||
$z && ARCH_REPOS+=(${unstable[@]})
|
||||
}
|
||||
|
||||
find_repo(){
|
||||
|
Reference in New Issue
Block a user