Compare commits

...

24 Commits

Author SHA1 Message Date
bef2a0b3fa comparepkg: only check for repos, but set pkg path 2019-04-21 01:10:01 +02:00
8d6f12f5a9 comparepkg: check for repos dir in arch git tree 2019-04-20 22:40:45 +02:00
bf6fc3fcff pkg2yaml: init fullver if empty 2019-04-04 23:12:33 +02:00
11c73f1086 pkg2yaml: add fullver map 2019-04-03 15:51:14 +02:00
62e4795000 backport devtools patches:
* makechrootpkg: keep *DEST, MAKEFLAGS & PACKAGER
* chroot-run: get all mirrors from host
2019-03-26 16:37:51 +01:00
2f92ba003b buildiso: fix display_settings() 2019-03-19 14:10:26 +01:00
c19b80adbd buildtree: get proper pkgbuild group 2019-03-13 19:31:09 +01:00
1812296bc3 util: revert server home path 2019-02-22 00:17:14 +01:00
cfb3ced261 buildiso: adopt fs group name changes
deployiso: set new server home path
2019-02-21 23:39:33 +01:00
77c7d1db8e mkchrootpkg: fix update mode 2019-02-10 16:25:22 +01:00
eb9f03c5c1 sync makepkg.conf with latest version from pacman package 2019-02-09 21:42:12 +01:00
16d0c1759d pkg2yaml: revert to func call 2019-02-06 22:13:59 +01:00
922afb4e69 pkg: fix clone msg 2019-02-06 16:49:20 +01:00
d22017e1a1 deploypkg & pkg2yaml: fix debug pkg names 2019-02-06 16:39:22 +01:00
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
16 changed files with 132 additions and 50 deletions

View File

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

View File

@@ -71,9 +71,14 @@ else
cache_dirs=("$cache_dir") cache_dirs=("$cache_dir")
fi fi
pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
host_mirrors=($($pacconf_cmd --repo world Server 2> /dev/null | sed -r 's#(.*/)world/os/.*#\1$repo/os/$arch#'))
copy_hostconf () { copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$1/etc/pacman.d" cp -a /etc/pacman.d/gnupg "$1/etc/pacman.d"
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pacman_conf ]] && cp $pacman_conf "$1/etc/pacman.conf" [[ -n $pacman_conf ]] && cp $pacman_conf "$1/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf" [[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf"
@@ -104,6 +109,13 @@ chroot_extra_mount() {
for m in ${bindmounts_rw[@]}; do for m in ${bindmounts_rw[@]}; do
chroot_mount "${m%%:*}" "$1${m##*:}" -B chroot_mount "${m%%:*}" "$1${m##*:}" -B
done done
for host_mirror in "${host_mirrors[@]}"; do
if [[ $host_mirror == *file://* ]]; then
host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
chroot_mount "$host_mirror_path" "$1$host_mirror_path" -Br
fi
done
} }
umask 0022 umask 0022

View File

@@ -157,12 +157,12 @@ done
shift $(($OPTIND - 1)) shift $(($OPTIND - 1))
${pretend} && display_settings && exit 1
check_root check_root
prepare_traps prepare_traps
prepare_build prepare_build
${pretend} && display_settings && exit 1
build build

View File

@@ -20,10 +20,10 @@ pull_tree_arch(){
for tree in ${TREE_NAMES_ARCH[@]};do for tree in ${TREE_NAMES_ARCH[@]};do
if [[ -d ${tree} ]];then if [[ -d ${tree} ]];then
cd ${tree} cd ${tree}
pull_tree "${tree}" pull_tree "${tree}" "$(get_local_head)" "Arch"
cd .. cd ..
else else
clone_tree "${HOST_TREE_ARCH}" "${tree}" clone_tree "${HOST_TREE_ARCH}" "${tree}" "Arch"
fi fi
done done
} }
@@ -34,7 +34,7 @@ pull_tree_artix(){
if [[ -d ${tree} ]];then if [[ -d ${tree} ]];then
config_tree "${tree}" config_tree "${tree}"
cd ${tree} cd ${tree}
pull_tree "${tree}" pull_tree "${tree}" "$(get_local_head)"
cd .. cd ..
else else
clone_tree "${HOST_TREE_ARTIX}" "${tree}" clone_tree "${HOST_TREE_ARTIX}" "${tree}"
@@ -59,7 +59,7 @@ show_deps(){
local archver=$(get_full_version $pkg) local archver=$(get_full_version $pkg)
msg "repo: %s" "$repo" msg2 "repo: %s" "$repo"
[[ -n ${pkgbase} ]] && msg2 "pkgbase: %s" "${pkgbase}" [[ -n ${pkgbase} ]] && msg2 "pkgbase: %s" "${pkgbase}"
msg2 "pkgname: %s" "${pkgname[*]}" msg2 "pkgname: %s" "${pkgname[*]}"
[[ -n $pkgdesc ]] && msg2 "pkgdesc: %s" "${pkgdesc}" [[ -n $pkgdesc ]] && msg2 "pkgdesc: %s" "${pkgdesc}"
@@ -87,6 +87,7 @@ from_arch(){
dest=${TREE_DIR_ARTIX}/$tree_dir/$pkg/trunk dest=${TREE_DIR_ARTIX}/$tree_dir/$pkg/trunk
msg "tree: %s" "$tree_dir"
show_deps "$src" "$repo" show_deps "$src" "$repo"
if [[ -d $dest ]];then if [[ -d $dest ]];then
@@ -122,7 +123,7 @@ view_build(){
sync_repos(){ sync_repos(){
${sync_arch} && pull_tree_arch ${sync_arch} && pull_tree_arch
pull_tree_artix ${sync_artix} && pull_tree_artix
} }
load_user_info load_user_info
@@ -133,6 +134,7 @@ load_vars /etc/makepkg.conf
sync=false sync=false
sync_arch=true sync_arch=true
sync_artix=true
import=false import=false
view=false view=false
createnew=false createnew=false
@@ -140,20 +142,21 @@ conf=false
PACKAGE='' PACKAGE=''
TEAM=${TREE_NAMES[0]} TEAM=${TREE_NAMES_ARTIX[0]}
SUBORG='' GROUP=${TREE_NAMES_ARTIX[0]}
usage() { usage() {
echo "Usage: ${0##*/} [options]" echo "Usage: ${0##*/} [options]"
echo ' -p <pkg> Package name' echo ' -p <pkg> Package name'
echo ' -t <team> Team name (only with -n)' echo ' -t <team> Team name (only with -n)'
echo " [default: ${TEAM}]" 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 " -s Clone or pull repos"
echo " -z Don't clone or pull arch 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 ' -i Import a package from arch repos'
echo ' -n Make new remote subrepo and clone it' echo ' -n Make new remote subrepo and clone it'
echo ' -c Configure subrepo url'
echo ' -v View package depends' echo ' -v View package depends'
echo ' -h This help' echo ' -h This help'
echo '' echo ''
@@ -163,19 +166,19 @@ usage() {
orig_argv=("$0" "$@") orig_argv=("$0" "$@")
opts='p:t:o:csinzvh' opts='p:t:g:sinzyvh'
while getopts "${opts}" arg; do while getopts "${opts}" arg; do
case "${arg}" in case "${arg}" in
p) PACKAGE="$OPTARG" ;; p) PACKAGE="$OPTARG" ;;
t) TEAM="$OPTARG" ;; t) TEAM="$OPTARG" ;;
o) SUBORG="$OPTARG" ;; g) GROUP="$OPTARG" ;;
s) sync=true ;; s) sync=true ;;
z) sync_arch=false ;; z) sync_arch=false ;;
y) sync_artix=false ;;
i) import=true ;; i) import=true ;;
n) createnew=true ;; n) createnew=true ;;
v) view=true ;; v) view=true ;;
c) conf=true ;;
h|?) usage 0 ;; h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;; *) echo "invalid argument '${arg}'"; usage 1 ;;
esac esac
@@ -192,6 +195,4 @@ ${view} && view_build "${PACKAGE}"
${import} && from_arch "${PACKAGE}" ${import} && from_arch "${PACKAGE}"
${createnew} && subrepo_new "${PACKAGE}" "${TEAM}" ${createnew} && subrepo_new "${PACKAGE}" "${GROUP}" "${TEAM}"
${conf} && subrepo_config "${PACKAGE}" "${SUBORG}"

View File

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

View File

@@ -339,7 +339,7 @@ main() {
[[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.' [[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.'
makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}} makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}}
check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME check_root SOURCE_DATE_EPOCH,GNUPGHOME,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER
# Canonicalize chrootdir, getting rid of trailing / # Canonicalize chrootdir, getting rid of trailing /
chrootdir=$(readlink -e "$passeddir") chrootdir=$(readlink -e "$passeddir")
@@ -385,9 +385,11 @@ main() {
sync_chroot "$chrootdir/root" "$copydir" "$copy" sync_chroot "$chrootdir/root" "$copydir" "$copy"
fi fi
bindmounts_rw+=("${PWD}:/startdir" "${SRCDEST}:/srcdest")
$update_first && chroot-run \ $update_first && chroot-run \
-r "${bindmounts_ro[@]}" \ -r "${bindmounts_ro[*]}" \
-w "${bindmounts_rw[@]}" \ -w "${bindmounts_rw[*]}" \
"$copydir" \ "$copydir" \
pacman -Syu --noconfirm pacman -Syu --noconfirm
@@ -407,8 +409,6 @@ main() {
prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap" prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap"
bindmounts_rw+=("${PWD}:/startdir" "${SRCDEST}:/srcdest")
if chroot-run \ if chroot-run \
-r "${bindmounts_ro[*]}" \ -r "${bindmounts_ro[*]}" \
-w "${bindmounts_rw[*]}" \ -w "${bindmounts_rw[*]}" \

View File

@@ -79,15 +79,21 @@ write_details() {
} }
write_pkg_yaml(){ write_pkg_yaml(){
local pkgfile=$(print_all_package_names)
Yaml=$(write_yaml_header) Yaml=$(write_yaml_header)
Yaml+=$(write_empty_line) Yaml+=$(write_empty_line)
local full=$(get_full_version)
local ver=${full:-0}
pkgbase=${pkgbase:-${pkgname[0]}}
Yaml+=$(write_yaml_map 0 "pkgbase") Yaml+=$(write_yaml_map 0 "pkgbase")
Yaml+=$(write_yaml_map 2 "pkgname" "${pkgbase:-$pkgname}") Yaml+=$(write_yaml_map 2 "pkgname" "${pkgbase}")
${details} && write_details '' ${details} && write_details ''
Yaml+=$(write_yaml_map 2 "fullver" "${ver}")
Yaml+=$(write_empty_line) Yaml+=$(write_empty_line)
@@ -99,6 +105,8 @@ write_pkg_yaml(){
Yaml+=$(write_empty_line) Yaml+=$(write_empty_line)
local pkgfile=$(print_all_package_names)
Yaml+=$(write_yaml_map 0 "pkgfile") Yaml+=$(write_yaml_map 0 "pkgfile")
for f in ${pkgfile[@]};do for f in ${pkgfile[@]};do
Yaml+=$(write_yaml_seq 2 "${f##*/}") Yaml+=$(write_yaml_seq 2 "${f##*/}")
@@ -136,4 +144,6 @@ PACKAGE="$1"/PKGBUILD; shift
. "$PACKAGE" . "$PACKAGE"
. /etc/makepkg.conf
write_pkg_yaml write_pkg_yaml

View File

@@ -17,8 +17,27 @@
# HOST_TREE_ARTIX='gitea@gitea.artixlinux.org:artix' # HOST_TREE_ARTIX='gitea@gitea.artixlinux.org:artix'
# 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 # HOST_TREE_ARCH=git://git.archlinux.org/svntogit
# TREE_DIR_ARCH=${WORKSPACE_DIR}/archlinux
# TREE_NAMES_ARCH=(packages community)
# default repos root # default repos root
# REPOS_ROOT=${WORKSPACE_DIR}/repos # REPOS_ROOT=${WORKSPACE_DIR}/repos

View File

@@ -1,4 +1,6 @@
#!/hint/bash #!/hint/bash
# shellcheck disable=2034
# #
# /etc/makepkg.conf # /etc/makepkg.conf
# #
@@ -37,8 +39,8 @@ CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags #-- Compiler and Linker Flags
CPPFLAGS="-D_FORTIFY_SOURCE=2" CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#-- Make Flags: change this for DistCC/SMP systems #-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2" #MAKEFLAGS="-j2"
@@ -143,3 +145,5 @@ COMPRESSZ=(compress -c -f)
# #
PKGEXT='.pkg.tar.xz' PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz' SRCEXT='.src.tar.gz'
# vim: set ft=sh ts=2 sw=2 et:

View File

@@ -1,5 +1,6 @@
linux linux
nvidia nvidia
nvidia-utils
acpi_call acpi_call
bbswitch bbswitch
broadcom-wl broadcom-wl

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

View File

@@ -117,10 +117,11 @@ msg_row_notify(){
msg_row(){ msg_row(){
local mesg=$1; shift 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(){ msg_row_upgrade(){
local mesg=$1; shift local mesg=$1; shift
printf "${RED}${RED} ${mesg} ${ALL_OFF}\n" "$@" >&2 printf "${RED} ${mesg} ${ALL_OFF}\n" "$@" >&2
} }

View File

@@ -63,7 +63,7 @@ load_profile(){
PASSWORD=${PASSWORD:-'artix'} PASSWORD=${PASSWORD:-'artix'}
ADDGROUPS=${ADDGROUPS:-"video,power,cdrom,network,lp,scanner,wheel,users,log"} ADDGROUPS=${ADDGROUPS:-"video,power,optical,network,lp,scanner,wheel,users,log"}
if [[ -z ${SERVICES[@]} ]];then if [[ -z ${SERVICES[@]} ]];then
SERVICES=('acpid' 'bluetooth' 'cronie' 'cupsd' 'syslog-ng' 'NetworkManager') SERVICES=('acpid' 'bluetooth' 'cronie' 'cupsd' 'syslog-ng' 'NetworkManager')

View File

@@ -23,6 +23,8 @@ create_repo(){
-H "accept: application/json" \ -H "accept: application/json" \
-H "content-type: application/json" \ -H "content-type: application/json" \
-d "$json" -d "$json"
echo
} }
delete_repo(){ delete_repo(){

View File

@@ -39,14 +39,6 @@ subrepo_push(){
git subrepo push "$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(){ subrepo_clean(){
local pkg="$1" local pkg="$1"
msg2 "Clean (%s)" "$pkg" msg2 "Clean (%s)" "$pkg"
@@ -67,9 +59,9 @@ subrepo_clone(){
} }
clone_tree(){ 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 (%s) ..." "$tree" "$os"
git clone $url/$tree.git git clone $url/$tree.git
show_elapsed_time "${FUNCNAME}" "${timer}" show_elapsed_time "${FUNCNAME}" "${timer}"
@@ -87,11 +79,10 @@ has_changes(){
} }
pull_tree(){ pull_tree(){
local tree="$1" local tree="$1" local_head="$2" os="${3:-$(get_osname)}"
local local_head=${2:-$(get_local_head)}
local remote_head=$(get_remote_head) local remote_head=$(get_remote_head)
msg "Checking (%s)" "${tree}" msg "Checking %s (%s)" "${tree}" "$os"
if $(has_changes "${local_head}" "${remote_head}");then if $(has_changes "${local_head}" "${remote_head}");then
git pull origin master git pull origin master
fi fi

View File

@@ -98,14 +98,14 @@ get_cases(){
local cases= local cases=
for p in ${pkgs[@]};do for p in ${pkgs[@]};do
cases=${p:+}${p:-|}${p} cases=${cases:-}${cases:+|}${p}
done done
echo $cases echo $cases
} }
get_artix_tree(){ get_artix_tree(){
local pkg="$1" artix_tree="${2:-$3}" tree local pkg="$1" artix_tree="${2:-$3}" tree
case $pkg in eval "case $pkg in
$(get_cases kernel)) tree=packages-kernel ;; $(get_cases kernel)) tree=packages-kernel ;;
python-*|python2-*) tree=packages-python ;; python-*|python2-*) tree=packages-python ;;
perl-*) tree=packages-perl ;; perl-*) tree=packages-perl ;;
@@ -114,18 +114,21 @@ get_artix_tree(){
*-openrc) tree=packages-openrc ;; *-openrc) tree=packages-openrc ;;
*-runit) tree=packages-runit ;; *-runit) tree=packages-runit ;;
qt5-*) tree=packages-qt5 ;; qt5-*) tree=packages-qt5 ;;
lxqt*|$(get_cases lxqt)) tree=packages-lxqt ;;
*) tree=$artix_tree
esac"
echo $tree
# $(get_cases freedesktop)) tree=packages-desktop ;; # $(get_cases freedesktop)) tree=packages-desktop ;;
# $(get_cases kde)) tree=packages-kde ;; # $(get_cases kde)) tree=packages-kde ;;
# $(get_cases gnome)) tree=packages-gnome ;; # $(get_cases gnome)) tree=packages-gnome ;;
*) tree=$artix_tree
esac
echo $tree
} }
get_import_path(){ get_import_path(){
local pkg="$1" import_path= local pkg="$1" import_path=
for tree in ${TREE_NAMES_ARCH[@]};do for tree in ${TREE_NAMES_ARCH[@]};do
[[ -d ${TREE_DIR_ARCH}/$tree/$pkg ]] && import_path=${TREE_DIR_ARCH}/$tree/$pkg [[ -d ${TREE_DIR_ARCH}/$tree/$pkg/repos ]] && import_path=${TREE_DIR_ARCH}/$tree/$pkg
done done
echo $import_path echo $import_path
} }