Compare commits

...

16 Commits
0.12 ... 0.12.4

Author SHA1 Message Date
1ea7d2ca8b readme: update deps 2019-02-03 02:31:41 +01:00
3cd8632c61 deoloypkg: add support for debug packages 2019-02-03 01:55:20 +01:00
b425eac181 buildtree: minor msg adjusting 2019-02-03 01:54:55 +01:00
4b2d516258 pkglist: update kernel 2019-02-03 01:54:29 +01:00
defd0c7ad6 buildtree: add option to only sync arch trees 2019-01-31 17:42:54 +01:00
cf0cd1772e set default artix for git & clone 2019-01-31 17:40:36 +01:00
761ccf7644 pkg: fix lxqt case in get_artix_tree() 2019-01-31 17:27:14 +01:00
5684aab444 set msg_row(9 to white for chilean green terminals :p
add lxqt list
update artools.conf
2019-01-31 17:02:19 +01:00
df8d8fb4a0 buildtree: improve msg pull & clone & import 2019-01-29 22:43:27 +01:00
be5fa4af09 buildtree: fix new non arch pkg 2019-01-28 01:56:45 +01:00
f0b84c0442 split up mainrepos (#8) 2019-01-28 00:22:42 +01:00
f0262f3cbd Merge branch 'arch-patches' of artix/artools into master 2019-01-24 17:29:25 +01:00
1905aef7d7 devtools patches 2019-01-24 13:39:17 +01:00
0a80e2b4e1 signfile: don't print key in pipeline 2019-01-16 21:44:40 +01:00
4679c59de0 data: update artools.conf 2019-01-16 21:44:03 +01:00
f308217f62 base: set new arch git url 2019-01-16 21:29:50 +01:00
21 changed files with 412 additions and 247 deletions

View File

@@ -87,6 +87,9 @@ LN_DEPLOYPKG = \
PKG_LIBS = \
$(wildcard lib/pkg/*)
PKG_LISTS = \
$(wildcard data/pkglists/*.list)
PKG_UTIL = lib/util-pkg.sh
PKG_DATA = \
@@ -181,6 +184,9 @@ install_pkg:
install $(DIRMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)/patches
install $(FILEMODE) $(PATCHES) $(DESTDIR)$(DATADIR)/$(TOOLS)/patches
install $(DIRMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)/pkglists
install $(FILEMODE) $(PKG_LISTS) $(DESTDIR)$(DATADIR)/$(TOOLS)/pkglists
install_cpio:
+make CPIODIR=$(CPIODIR) DESTDIR=$(DESTDIR) -C initcpio install

View File

@@ -28,6 +28,7 @@ artools
- pkg:
* namcap
* git-subrepo
* jshon
- iso:
* dosfstools

View File

@@ -26,9 +26,10 @@ if [ ! -e "$1" ]; then
exit 1
fi
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
if [[ -n "${BUILDBOT_GPGP}" ]]; then
msg2 "Signing [%s]" "${file_to_sign##*/}"
gpg --batch --passphrase "${BUILDBOT_GPGP}" --detach-sign "$file_to_sign"
else
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
gpg --detach-sign --use-agent -u "${GPGKEY}" "$file_to_sign"
fi

View File

@@ -17,24 +17,24 @@
pull_tree_arch(){
cd ${TREE_DIR_ARCH}
for tree in ${tree_names[@]};do
for tree in ${TREE_NAMES_ARCH[@]};do
if [[ -d ${tree} ]];then
cd ${tree}
pull_tree "${tree}"
pull_tree "${tree}" "$(get_local_head)" "Arch"
cd ..
else
clone_tree "${HOST_TREE_ARCH}" "${tree}"
clone_tree "${HOST_TREE_ARCH}" "${tree}" "Arch"
fi
done
}
pull_tree_artix(){
cd ${TREE_DIR_ARTIX}
for tree in ${tree_names[@]};do
for tree in ${TREE_NAMES_ARTIX[@]};do
if [[ -d ${tree} ]];then
config_tree "${tree}"
cd ${tree}
pull_tree "${tree}"
pull_tree "${tree}" "$(get_local_head)"
cd ..
else
clone_tree "${HOST_TREE_ARTIX}" "${tree}"
@@ -59,7 +59,6 @@ show_deps(){
local archver=$(get_full_version $pkg)
msg "git tree: %s" "$git_tree_arch"
msg2 "repo: %s" "$repo"
[[ -n ${pkgbase} ]] && msg2 "pkgbase: %s" "${pkgbase}"
msg2 "pkgname: %s" "${pkgname[*]}"
@@ -83,22 +82,28 @@ from_arch(){
src=$package/repos/$repo
dest=${TREE_DIR_ARTIX}/$git_tree_arch/$pkg/trunk
local git_tree_artix=$(find_tree "${TREE_DIR_ARTIX}" "$pkg")
local tree_dir=$(get_artix_tree "$pkg" "$git_tree_artix" "$git_tree_arch")
dest=${TREE_DIR_ARTIX}/$tree_dir/$pkg/trunk
msg "tree: %s" "$tree_dir"
show_deps "$src" "$repo"
if [[ -d $dest ]];then
cd ${TREE_DIR_ARTIX}/$git_tree_arch
cd ${TREE_DIR_ARTIX}/$git_tree_artix
. $dest/PKGBUILD 2>/dev/null
local artixver=$(get_full_version $pkg)
msg2 "Artix Version: %s" "$artixver"
else
subrepo_new "$pkg" "$git_tree_arch"
subrepo_new "$pkg" "$tree_dir" "$git_tree_arch"
fi
info "Sync from archlinux (%s)" "$git_tree_arch"
msg "Sync (%s) from [%s] to [%s]" "$pkg" "$git_tree_arch" "$tree_dir"
sync_pkg "$src" "$dest"
patch_pkg "$pkg"
}
@@ -118,7 +123,7 @@ view_build(){
sync_repos(){
${sync_arch} && pull_tree_arch
pull_tree_artix
${sync_artix} && pull_tree_artix
}
load_user_info
@@ -129,6 +134,7 @@ load_vars /etc/makepkg.conf
sync=false
sync_arch=true
sync_artix=true
import=false
view=false
createnew=false
@@ -136,21 +142,21 @@ conf=false
PACKAGE=''
tree_names=(packages community)
TEAM=${tree_names[0]}
SUBORG=''
TEAM=${TREE_NAMES_ARTIX[0]}
GROUP=${TREE_NAMES_ARTIX[0]}
usage() {
echo "Usage: ${0##*/} [options]"
echo ' -p <pkg> Package name'
echo ' -t <team> Team name (only with -n)'
echo " [default: ${TEAM}]"
echo ' -o <org> Org of subrepo (only with -c)'
echo ' -g <group> Group name, the superrepo (only with -n)'
echo " [default: ${GROUP}]"
echo " -s Clone or pull repos"
echo " -z Don't clone or pull arch repos"
echo " -y Don't clone or pull artix repos"
echo ' -i Import a package from arch repos'
echo ' -n Make new remote subrepo and clone it'
echo ' -c Configure subrepo url'
echo ' -v View package depends'
echo ' -h This help'
echo ''
@@ -160,19 +166,19 @@ usage() {
orig_argv=("$0" "$@")
opts='p:t:o:csinzvh'
opts='p:t:g:sinzyvh'
while getopts "${opts}" arg; do
case "${arg}" in
p) PACKAGE="$OPTARG" ;;
t) TEAM="$OPTARG" ;;
o) SUBORG="$OPTARG" ;;
g) GROUP="$OPTARG" ;;
s) sync=true ;;
z) sync_arch=false ;;
y) sync_artix=false ;;
i) import=true ;;
n) createnew=true ;;
v) view=true ;;
c) conf=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@@ -189,6 +195,4 @@ ${view} && view_build "${PACKAGE}"
${import} && from_arch "${PACKAGE}"
${createnew} && subrepo_new "${PACKAGE}" "${TEAM}"
${conf} && subrepo_config "${PACKAGE}" "${SUBORG}"
${createnew} && subrepo_new "${PACKAGE}" "${GROUP}" "${TEAM}"

View File

@@ -15,17 +15,14 @@
. @libdir@/artools/util-base.sh
. @libdir@/artools/util-pkg.sh
is_valid_repo(){
local src="$1"
case $src in
core|extra|community|multilib|testing|staging|community-testing|community-staging|multilib-testing|multilib-staging|trunk) return 0 ;;
*) return 1 ;;
esac
}
commit_pkg(){
local git_tree=$(find_tree "${TREE_DIR_ARTIX}" "${PACKAGE}")
if [[ -n ${git_tree} ]];then
cd ${TREE_DIR_ARTIX}/${git_tree}
local head=$(get_local_head)
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
. trunk/PKGBUILD
@@ -33,8 +30,6 @@ commit_pkg(){
local ver=$(get_full_version "${PACKAGE}")
local commit_msg=""
local head=$(get_local_head)
if ${remove};then
local action='remove'
if [[ "${REPO_SRC}" == 'trunk' ]];then
@@ -59,6 +54,7 @@ commit_pkg(){
${push} && pull_tree "${git_tree}" "$head"
subrepo_pull "${PACKAGE}"
subrepo_push "${PACKAGE}"
subrepo_clean "${PACKAGE}"
@@ -73,14 +69,17 @@ commit_pkg(){
symlink_commit_pkg(){
local git_tree=$(find_tree "${TREE_DIR_ARTIX}" "${PACKAGE}")
if [[ -n ${git_tree} ]];then
cd ${TREE_DIR_ARTIX}/${git_tree}
local head=$(get_local_head)
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
. trunk/PKGBUILD
[[ $arch == 'any' ]] && CARCH=any
local ver=$(get_full_version "${PACKAGE}")
local head=$(get_local_head)
if [[ ${REPO_SRC} == 'trunk' ]];then
local action='add'
local dest="${REPO_DEST}-$CARCH"
@@ -112,6 +111,7 @@ symlink_commit_pkg(){
${push} && pull_tree "${git_tree}" "$head"
subrepo_pull "${PACKAGE}"
subrepo_push "${PACKAGE}"
subrepo_clean "${PACKAGE}"

View File

@@ -18,7 +18,7 @@
show_version_table(){
msg_table_header "%-20s %-20s %-25s %-30s %-30s" "Arch Repo" "Artix Repo" "Package" "Arch version" "Artix version"
for tree in ${tree_names[@]};do
for tree in ${TREE_NAMES_ARTIX[@]};do
local git=$(find ${TREE_DIR_ARTIX}/$tree/ -mindepth 1 -maxdepth 1 -type d)
@@ -99,8 +99,6 @@ upgrades=false
downgrades=false
move=false
tree_names=(packages community)
usage() {
echo "Usage: ${0##*/} [options]"
echo ' -u Show upgrade packages'

View File

@@ -21,7 +21,12 @@ update_repo(){
. PKGBUILD
for name in ${pkgname[@]};do
local pkgsearch=(${pkgname[@]})
if check_option "debug" "y"; then
pkgsearch+=("$pkgbase-debug")
fi
for name in ${pkgsearch[@]}; do
pkgarch=$(get_pkg_arch "$name")
ver=$(get_full_version "$name")
if pkgfile=$(find_cached_package "$name" "$ver" "$pkgarch");then

View File

@@ -23,7 +23,7 @@ process_sofile() {
# extract the major version: 1
soversion="${1##*\.so\.}"
if [[ "$soversion" = "$1" ]] && (($IGNORE_INTERNAL)); then
continue
return
fi
if ! in_array "${soname}=${soversion}-$2" ${soobjects[@]}; then
# libfoo.so=1-64

View File

@@ -237,18 +237,21 @@ download_sources() {
local copydir=$1
local makepkg_user=$2
local builddir
builddir="$(mktemp -d)"
chown "$makepkg_user:" "$builddir"
# local builddir
# builddir="$(mktemp -d)"
# chown "$makepkg_user:" "$builddir"
setup_workdir
chown "$makepkg_user:" "$WORKDIR"
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o ||
die "Could not download sources."
# Clean up garbage from verifysource
rm -rf "$builddir"
# rm -rf "$builddir"
}
# Usage: move_products $copydir $owner
@@ -336,7 +339,7 @@ main() {
[[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.'
makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}}
check_root SOURCE_DATE_EPOCH,GNUPGHOME
check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME
# Canonicalize chrootdir, getting rid of trailing /
chrootdir=$(readlink -e "$passeddir")

View File

@@ -17,7 +17,26 @@
# HOST_TREE_ARTIX='gitea@gitea.artixlinux.org:artix'
# HOST_TREE_ARCH=git://projects.archlinux.org/svntogit
# TREE_DIR_ARTIX=${WORKSPACE_DIR}/artixlinux
# TREE_NAMES_ARTIX=(
# packages
# community
# packages-kernel
# packages-openrc
# packages-runit
# packages-xorg
# packages-python
# packages-perl
# packages-qt5
# packages-ruby
# )
# HOST_TREE_ARCH=git://git.archlinux.org/svntogit
# TREE_DIR_ARCH=${WORKSPACE_DIR}/archlinux
# TREE_NAMES_ARCH=(packages community)
# default repos root
# REPOS_ROOT=${WORKSPACE_DIR}/repos

View File

@@ -0,0 +1,63 @@
accountsservice
cairo
colord
cppunit
dbus
dbus-glib
dbus-python
desktop-file-utils
fontconfig
geoclue2
glu
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
harfbuzz
hicolor-icon-theme
libatasmart
libbsd
libdrm
libevdev
libinput
libmbim
libnice
libqmi
libvdpau
libxcb
libxft
libxi
media-player-info
mesa
modemmanager
networkmanager
orc
p11-kit
polkit
poppler
poppler-data
pulseaudio
pyxdg
r
sdl
shared-mime-info
sound-theme-freedesktop
startup-notification
systemdcompat
telepathy-glib
ttf-dejavu
udisks2
upower
wayland
wayland-protocols
webrtc-audio-processing
xcb-proto
xcb-util
xcb-util-cursor
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil
xcb-util-wm
xdg-user-dirs
xdg-utils

63
data/pkglists/gnome.list Normal file
View File

@@ -0,0 +1,63 @@
adwaita-icon-theme
atk
at-spi2-atk
at-spi2-core
babl
cantarell-fonts
cogl
dconf
flatpak
gamin
gcab
gconf
gcr
gdk-pixbuf2
gegl02
git
glade
glib2
glib-networking
gnome-common
gnome-keyring
gobject-introspection
gsettings-desktop-schemas
gssdp
gtk2
gtk3
gtk-doc
gtksourceview3
gupnp
gupnp-igd
gvfs
json-glib
libcloudproviders
libcroco
libgee
libglade
libgnome-keyring
libgudev
libnotify
librsvg
libsecret
libsoup
libxml2
libxslt
meld
mobile-broadband-provider-info
modemmanager
networkmanager
network-manager-applet
orca
ostree
pango
pyatspi
pygobject
pygobject2
pygtk
rest
ttf-bitstream-vera
vala
vte
vte3
yelp-tools
yelp-xsl

4
data/pkglists/kde.list Normal file
View File

@@ -0,0 +1,4 @@
phonon-gstreamer
polkit-qt
extra-cmake-modules
phonon

17
data/pkglists/kernel.list Normal file
View File

@@ -0,0 +1,17 @@
linux
nvidia
nvidia-utils
acpi_call
bbswitch
broadcom-wl
tp_smapi
r8168
virtualbox-modules-artix
linux-lts
nvidia-lts
acpi_call-lts
bbswitch-lts
broadcom-wl-lts
tp_smapi-lts
r8168-lts
linux-firmware

31
data/pkglists/lxqt.list Normal file
View File

@@ -0,0 +1,31 @@
lxqt-about
lxqt-admin
lxqt-config
lxqt-globalkeys
lxqt-notificationd
lxqt-openssh-askpass
lxqt-panel
lxqt-policykit
lxqt-powermanagement
lxqt-qtplugin
lxqt-runner
lxqt-session
lxqt-sudo
lxqt-themes
lxqt-build-tools
compton-conf
lximage-qt
obconf-qt
openbox
pcmanfm-qt
qterminal
liblxqt
libqtxdg
lxmenu-data
libfm-qt
libfm
qtermwidget
libsysstat
libstatgrab
qps

37
data/pkglists/xorg.list Normal file
View File

@@ -0,0 +1,37 @@
libdmx
libfontenc
libice
libpciaccess
libsm
libx11
libxau
libxaw
libxcomposite
libxcursor
libxdamage
libxdmcp
libxext
libxfixes
libxfont2
libxi|libxft
libxinerama
libxkbfile
libxkbui
libxmu
libxpm
libxrandr
libxrender
libxres
libxshmfence
libxss
libxt
libxtst
libxv
libxvmc
libxxf86vm
pixman
xbitmaps
xkeyboard-config
xorgproto
xterm
xtrans

View File

@@ -64,8 +64,30 @@ slock() {
fi
}
_setup_workdir=false
setup_workdir() {
[[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX")
_setup_workdir=true
trap 'trap_abort' INT QUIT TERM HUP
trap 'trap_exit' EXIT
}
trap_abort() {
trap - EXIT INT QUIT TERM HUP
abort
}
trap_exit() {
local r=$?
trap - EXIT INT QUIT TERM HUP
cleanup $r
}
cleanup() {
exit ${1:-0}
if [[ -n ${WORKDIR:-} ]] && $_setup_workdir; then
rm -rf "$WORKDIR"
fi
exit "${1:-0}"
}
abort() {
@@ -95,10 +117,11 @@ msg_row_notify(){
msg_row(){
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
# printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
printf "${WHITE} ${mesg}${ALL_OFF}\n" "$@" >&2
}
msg_row_upgrade(){
local mesg=$1; shift
printf "${RED}${RED} ${mesg} ${ALL_OFF}\n" "$@" >&2
printf "${RED} ${mesg} ${ALL_OFF}\n" "$@" >&2
}

View File

@@ -74,11 +74,30 @@ init_artools_pkg(){
TREE_DIR_ARTIX=${TREE_DIR_ARTIX:-"${WORKSPACE_DIR}/artixlinux"}
[[ -z ${TREE_NAMES_ARTIX[@]} ]] && \
TREE_NAMES_ARTIX=(
packages
community
packages-kernel
packages-openrc
packages-runit
packages-xorg
packages-python
packages-perl
packages-qt5
packages-ruby
# packages-desktop
# packages-kde
# packages-gnome
)
HOST_TREE_ARTIX=${HOST_TREE_ARTIX:-"gitea@${GIT_DOMAIN}:artixlinux"}
TREE_DIR_ARCH=${TREE_DIR_ARCH:-"${WORKSPACE_DIR}/archlinux"}
HOST_TREE_ARCH=${HOST_TREE_ARCH:-'git://projects.archlinux.org/svntogit'}
TREE_NAMES_ARCH=(packages community)
HOST_TREE_ARCH=${HOST_TREE_ARCH:-'git://git.archlinux.org/svntogit'}
CHROOTS_PKG="${CHROOTS_DIR}/buildpkg"

View File

@@ -19,7 +19,7 @@ create_repo(){
msg2 "Create package repo [%s] in org (%s)" "${pkg}" "${org}"
curl -X POST "${GIT_URL}/api/v1/org/$org/repos?access_token=${GIT_TOKEN}" \
curl -s -X POST "${GIT_URL}/api/v1/org/$org/repos?access_token=${GIT_TOKEN}" \
-H "accept: application/json" \
-H "content-type: application/json" \
-d "$json"
@@ -33,192 +33,30 @@ delete_repo(){
msg2 "Delete package repo [%s] in org (%s)" "${pkg}" "${org}"
curl -X DELETE "${GIT_URL}/api/v1/repos/$org/$gitname?access_token=${GIT_TOKEN}" \
curl -s -X DELETE "${GIT_URL}/api/v1/repos/$org/$gitname?access_token=${GIT_TOKEN}" \
-H "accept: application/json"
}
load_team_id(){
local org="$1" tree="$2" id=0
local org="$1" team="$2" id=0
case $org in
packagesA)
case $tree in
packages) id=70 ;;
community) id=71 ;;
esac
;;
packagesB)
case $tree in
packages) id=72 ;;
community) id=73 ;;
esac
;;
packagesC)
case $tree in
packages) id=74 ;;
community) id=75 ;;
esac
;;
packagesD)
case $tree in
packages) id=76 ;;
community) id=77 ;;
esac
;;
packagesE)
case $tree in
packages) id=78 ;;
community) id=79 ;;
esac
;;
packagesF)
case $tree in
packages) id=80 ;;
community) id=81 ;;
esac
;;
packagesG)
case $tree in
packages) id=82 ;;
community) id=83 ;;
esac
;;
packagesH)
case $tree in
packages) id=84 ;;
community) id=85 ;;
esac
;;
packagesI)
case $tree in
packages) id=86 ;;
community) id=87 ;;
esac
;;
packagesJ)
case $tree in
packages) id=88 ;;
community) id=89 ;;
esac
;;
packagesK)
case $tree in
packages) id=90 ;;
community) id=91 ;;
esac
;;
packagesL)
case $tree in
packages) id=92 ;;
community) id=93 ;;
esac
;;
packagesM)
case $tree in
packages) id=94 ;;
community) id=95 ;;
esac
;;
packagesN)
case $tree in
packages) id=96 ;;
community) id=97 ;;
esac
;;
packagesO)
case $tree in
packages) id=98 ;;
community) id=99 ;;
esac
;;
packagesP)
case $tree in
packages) id=100 ;;
community) id=101 ;;
esac
;;
packagesQ)
case $tree in
packages) id=105 ;;
community) id=106 ;;
esac
;;
packagesR)
case $tree in
packages) id=107 ;;
community) id=108 ;;
esac
;;
packagesS)
case $tree in
packages) id=109 ;;
community) id=110 ;;
esac
;;
packagesT)
case $tree in
packages) id=111 ;;
community) id=112 ;;
esac
;;
packagesU)
case $tree in
packages) id=113 ;;
community) id=114 ;;
esac
;;
packagesV)
case $tree in
packages) id=115 ;;
community) id=116 ;;
esac
;;
packagesW)
case $tree in
packages) id=117 ;;
community) id=118 ;;
esac
;;
packagesX)
case $tree in
packages) id=119 ;;
community) id=120 ;;
esac
;;
packagesY)
case $tree in
packages) id=121 ;;
community) id=122 ;;
esac
;;
packagesZ)
case $tree in
packages) id=123 ;;
community) id=124 ;;
esac
;;
packagesPython)
case $tree in
packages) id=103 ;;
community) id=104 ;;
esac
;;
packagesPerl)
case $tree in
packages) id=102 ;;
community) id=125 ;;
esac
;;
local ids=($(curl -s -X GET "${GIT_URL}/api/v1/orgs/$org/teams?access_token=${GIT_TOKEN}" \
-H "accept: application/json" | jshon -a -e id))
case $team in
packages) id="${ids[2]}" ;;
community) id="${ids[1]}" ;;
esac
echo $id
}
add_repo_to_team(){
local pkg="$1" org="$2" tree="$3"
local id=$(load_team_id "$org" "$tree")
local pkg="$1" org="$2" team="$3"
local id=$(load_team_id "$org" "$team")
msg2 "Adding package repo [%s] to team (%s)" "$pkg" "$tree"
msg2 "Adding package repo [%s] to team (%s)" "$pkg" "$team"
curl -X PUT "${GIT_URL}/api/v1/teams/$id/repos/$org/$pkg?access_token=${GIT_TOKEN}" \
curl -s -X PUT "${GIT_URL}/api/v1/teams/$id/repos/$org/$pkg?access_token=${GIT_TOKEN}" \
-H "accept: application/json"
}

View File

@@ -23,7 +23,7 @@ get_remote_head(){
get_pkg_org(){
local pkg="$1" org= sub=
case ${pkg} in
# ruby-*) org=${pkg:0:6}; sub="${org:5}"; echo "packagesRuby" ;;
ruby-*) org=${pkg:0:6}; sub="${org:5}"; echo "packagesRuby" ;;
perl-*) org=${pkg:0:6}; sub="${org:5}"; echo "packagesPerl" ;;
python-*) org=${pkg:0:8}; sub="${org:7}"; echo "packagesPython" ;;
python2-*) org=${pkg:0:9}; sub="${org:8}"; echo "packagesPython" ;;
@@ -35,18 +35,10 @@ get_pkg_org(){
subrepo_push(){
local pkg="$1"
msg2 "Update (%s)" "$pkg"
msg2 "Push (%s)" "$pkg"
git subrepo push "$pkg"
}
subrepo_config(){
local pkg="$1" org="$2"
local gitname=$(get_compliant_name "$pkg")
local url=gitea@"${GIT_DOMAIN}":"$org"/"$gitname".git
msg2 "Update .gitrepo (%s) [%s]" "$pkg" "$url"
git subrepo config "$pkg" remote "$url"
}
subrepo_clean(){
local pkg="$1"
msg2 "Clean (%s)" "$pkg"
@@ -55,20 +47,21 @@ subrepo_clean(){
subrepo_pull(){
local pkg="$1"
msg2 "Pull (%s)" "$pkg"
git subrepo pull "$pkg"
}
subrepo_clone(){
local pkg="$1" org="$2"
local gitname=$(get_compliant_name "$pkg")
msg2 "Getting package repo [%s] from org (%s)" "$pkg" "$org/$gitname"
msg2 "Clone [%s] from (%s)" "$pkg" "$org/$gitname"
git subrepo clone gitea@"${GIT_DOMAIN}":"$org"/"$gitname".git "$pkg"
}
clone_tree(){
local timer=$(get_timer) url="$1" tree="$2"
local timer=$(get_timer) url="$1" tree="$2" os="${3:-$(get_osname)}"
msg "Cloning (%s) ..." "$tree"
msg "Cloning (%s) ..." "$tree" "$os"
git clone $url/$tree.git
show_elapsed_time "${FUNCNAME}" "${timer}"
@@ -86,11 +79,10 @@ has_changes(){
}
pull_tree(){
local tree="$1"
local local_head=${2:-$(get_local_head)}
local tree="$1" local_head="$2" os="${3:-$(get_osname)}"
local remote_head=$(get_remote_head)
msg "Checking (%s)" "${tree}"
msg "Checking %s (%s)" "${tree}" "$os"
if $(has_changes "${local_head}" "${remote_head}");then
git pull origin master
fi
@@ -151,10 +143,10 @@ config_tree(){
}
subrepo_new(){
local pkg="$1" team="$2"
local dest=${TREE_DIR_ARTIX}/$team/$pkg/trunk
local pkg="$1" tree="$2" team="${3:-$2}"
local dest=${TREE_DIR_ARTIX}/$tree/$pkg/trunk
cd ${TREE_DIR_ARTIX}/$team
cd ${TREE_DIR_ARTIX}/$tree
local org=$(get_pkg_org "$pkg")

View File

@@ -90,9 +90,42 @@ find_repo(){
echo $repo
}
get_cases(){
local pkglist="${DATADIR}/pkglists/$1.list"
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g"
local pkgs=($(sed "$_com_rm" "$pkglist" | sed "$_space" | sed "$_clean"))
local cases=
for p in ${pkgs[@]};do
cases=${p:+}${p:-|}${p}
done
echo $cases
}
get_artix_tree(){
local pkg="$1" artix_tree="${2:-$3}" tree
case $pkg in
$(get_cases kernel)) tree=packages-kernel ;;
python-*|python2-*) tree=packages-python ;;
perl-*) tree=packages-perl ;;
ruby-*) tree=packages-ruby ;;
xorg*|xf86*|$(get_cases xorg)) tree=packages-xorg ;;
*-openrc) tree=packages-openrc ;;
*-runit) tree=packages-runit ;;
qt5-*) tree=packages-qt5 ;;
lxqt*|$(get_cases lxqt)) tree=packages-lxqt ;;
# $(get_cases freedesktop)) tree=packages-desktop ;;
# $(get_cases kde)) tree=packages-kde ;;
# $(get_cases gnome)) tree=packages-gnome ;;
*) tree=$artix_tree
esac
echo $tree
}
get_import_path(){
local pkg="$1" import_path=
for tree in ${tree_names[@]};do
for tree in ${TREE_NAMES_ARCH[@]};do
[[ -d ${TREE_DIR_ARCH}/$tree/$pkg ]] && import_path=${TREE_DIR_ARCH}/$tree/$pkg
done
echo $import_path
@@ -108,6 +141,14 @@ pkgver_equal() {
fi
}
is_valid_repo(){
local src="$1"
case $src in
core|extra|community|multilib|testing|staging|community-testing|community-staging|multilib-testing|multilib-staging|trunk) return 0 ;;
*) return 1 ;;
esac
}
find_cached_package() {
local searchdirs=("$PKGDEST" "$PWD") results=()
local targetname=$1 targetver=$2 targetarch=$3