Skip to content

Commit

Permalink
Merge branch 'dev' into dev-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayao0819 committed Aug 11, 2021
2 parents 55a8261 + b6793bd commit 5d21275
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SHARE_OPTION := --boot-splash --comp-type "xz" --user "alter" --password "alter"
ARCH_x86_64 := --arch x86_64
ARCH_i686 := --arch i686
FULLBUILD := -d -g -e --noconfirm
FULL_x86_64 := xfce cinnamon i3 plasma
FULL_x86_64 := xfce cinnamon i3 plasma gnome
FULL_i686 := xfce lxde
CURRENT_DIR := ${shell dirname $(dir $(abspath $(lastword $(MAKEFILE_LIST))))}/${shell basename $(dir $(abspath $(lastword $(MAKEFILE_LIST))))}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions modules/calamares/pkgbuild.any/01-ckbcomp/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pkgbase = ckbcomp
pkgdesc = Compile a XKB keyboard description to a keymap suitable for loadkeys or kbdcontrol
pkgver = 1.203
pkgver = 1.205
pkgrel = 1
url = http://anonscm.debian.org/cgit/d-i/console-setup.git/
arch = any
license = GPL2
depends = perl
source = http://ftp.de.debian.org/debian/pool/main/c/console-setup/console-setup_1.203.tar.xz
sha512sums = e73ade4a35c7d5e4986587067ab081da8b99acd1013ef2f9de63205f43a0777a917c0ce18e35f0fc95bfe22162ad56e0c92f1f9d657a27681a26d525441bcf2a
source = http://ftp.de.debian.org/debian/pool/main/c/console-setup/console-setup_1.205.tar.xz
sha512sums = SKIP

pkgname = ckbcomp
6 changes: 3 additions & 3 deletions modules/calamares/pkgbuild.any/01-ckbcomp/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# Contributer: Nissar Chababy <funilrys at outlook dot com>
# Contributer: Jeroen Bollen <jbinero at gmail dot comau>

pkgname=ckbcomp
pkgver=1.203
pkgname="ckbcomp"
pkgver="1.205"
pkgrel=1
pkgdesc="Compile a XKB keyboard description to a keymap suitable for loadkeys or kbdcontrol"
arch=(any)
url="http://anonscm.debian.org/cgit/d-i/console-setup.git/"
license=('GPL2')
depends=('perl')
source=("http://ftp.de.debian.org/debian/pool/main/c/console-setup/console-setup_${pkgver}.tar.xz")
sha512sums=('e73ade4a35c7d5e4986587067ab081da8b99acd1013ef2f9de63205f43a0777a917c0ce18e35f0fc95bfe22162ad56e0c92f1f9d657a27681a26d525441bcf2a')
sha512sums=('SKIP')

package() {
if [[ -d "${srcdir}/console-setup" ]]; then
Expand Down
72 changes: 53 additions & 19 deletions system/aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ set -e -u
aur_username="aurbuild"
pacman_debug=false
pacman_args=()
failedpkg=()
remove_list=()
yay_depends=("go")

trap 'exit 1' 1 2 3 15

Expand Down Expand Up @@ -81,31 +84,40 @@ fi

# Install yay
if ! pacman -Qq yay 1> /dev/null 2>&1; then
(
_oldpwd="$(pwd)"
pacman -Syy "${pacman_args[@]}"
pacman -S --asdeps --needed "${pacman_args[@]}" go
sudo -u "${aur_username}" git clone "https://aur.archlinux.org/yay.git" "/tmp/yay"
cd "/tmp/yay"
sudo -u "${aur_username}" makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm
for _pkg in $(sudo -u "${aur_username}" makepkg --packagelist); do
pacman "${pacman_args[@]}" -U "${_pkg}"
done
cd ..
remove "/tmp/yay"
cd "${_oldpwd}"
)
# Update database
_oldpwd="$(pwd)"
pacman -Syy "${pacman_args[@]}"

# Install depends
for _pkg in "${yay_depends[@]}"; do
if ! pacman -Qq "${_pkg}" | grep -q "${_pkg}"; then
pacman -S --asdeps --needed "${pacman_args[@]}" "${_pkg}"
remove_list+=("${_pkg}")
fi
done

# Build yay
sudo -u "${aur_username}" git clone "https://aur.archlinux.org/yay.git" "/tmp/yay"
cd "/tmp/yay"
sudo -u "${aur_username}" makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm

# Install yay
for _pkg in $(sudo -u "${aur_username}" makepkg --packagelist); do
pacman "${pacman_args[@]}" -U "${_pkg}"
done

# Remove debtis
cd ..
remove "/tmp/yay"
cd "${_oldpwd}"
fi

if ! type -p yay > /dev/null; then
echo "Failed to install yay"
exit 1
fi


# Build and install
chmod +s /usr/bin/sudo
for _pkg in "${@}"; do
installpkg(){
yes | sudo -u "${aur_username}" \
yay -Sy \
--mflags "-AcC" \
Expand All @@ -121,14 +133,36 @@ for _pkg in "${@}"; do
--mflags "--skippgpcheck" \
"${pacman_args[@]}" \
--cachedir "/var/cache/pacman/pkg/" \
"${_pkg}"
"${@}" || true
}


# Build and install
chmod +s /usr/bin/sudo
for _pkg in "${@}"; do
pacman -Qq "${_pkg}" > /dev/null 2>&1 && continue
installpkg "${_pkg}"

if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then
echo -e "\n[aur.sh] Failed to install ${_pkg}\n"
failedpkg+=("${_pkg}")
fi
done

# Reinstall failed package
for _pkg in "${failedpkg[@]}"; do
installpkg "${_pkg}"
if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then
echo -e "\n[aur.sh] Failed to install ${_pkg}\n"
exit 1
fi
done

# Remove packages
readarray -t -O "${#remove_list[@]}" remove_list < <(pacman -Qttdq)
(( "${#remove_list[@]}" != 0 )) && pacman -Rsnc "${remove_list[@]}" "${pacman_args[@]}"

# Clean up
yay -Sccc "${pacman_args[@]}"

# remove user and file
Expand Down
11 changes: 6 additions & 5 deletions system/pkgbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -e
build_username="pkgbuild"
pacman_debug=false
pacman_args=()
remove_list=()

_help() {
echo "usage ${0} [option]"
Expand Down Expand Up @@ -99,8 +100,8 @@ readarray -t pkgbuild_dirs < <(ls "${pkgbuild_dir}" 2> /dev/null)
if (( "${#pkgbuild_dirs[@]}" != 0 )); then
for _dir in "${pkgbuild_dirs[@]}"; do
cd "${_dir}"
readarray depends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; echo "${depends[@]}")
readarray makedepends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; echo "${makedepends[@]}")
readarray -t depends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${depends[@]}")
readarray -t makedepends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${makedepends[@]}")
if (( ${#depends[@]} + ${#makedepends[@]} != 0 )); then
for _pkg in "${depends[@]}" "${makedepends[@]}"; do
if pacman -Ssq "${_pkg}" | grep -x "${_pkg}" 1> /dev/null; then
Expand All @@ -116,9 +117,9 @@ if (( "${#pkgbuild_dirs[@]}" != 0 )); then
done
fi

if readarray deletepkg < <(pacman -Qtdq) && (( "${#deletepkg[@]}" != 0 )); then
pacman -Rsnc "${deletepkg[@]}" "${pacman_args[@]}"
fi

readarray -t -O "${#remove_list[@]}" remove_list < <(pacman -Qtdq)
(( "${#remove_list[@]}" != 0 )) && pacman -Rsnc "${remove_list[@]}" "${pacman_args[@]}"

pacman -Sccc "${pacman_args[@]}"

Expand Down
8 changes: 4 additions & 4 deletions tools/pkglist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ set +e

get_filelist(){
if [[ -d "${1}" ]]; then
find "${1}" -mindepth 1 -name "*.${arch}" -typr f -or -type l 2> /dev/null
find "${1}" -mindepth 1 -name "*.${arch}" -type f -or -type l 2> /dev/null
fi
}

Expand Down Expand Up @@ -190,8 +190,8 @@ fi

# memtest86 package list
if [[ "${memtest86}" = true ]]; then
#readarray -t -O "${#_loadfilelist[@]}" _loadfilelist <(ls ${channel_dir}/${pkgdir_name}.${arch}/memtest86/*.${arch} 2> /dev/null)
readarray -t -O "${#_loadfilelist[@]}" _loadfilelist <(get_filelist "${channel_dir}/${pkgdir_name}.${arch}/memtest86")
#readarray -t -O "${#_loadfilelist[@]}" _loadfilelist < <(ls ${channel_dir}/${pkgdir_name}.${arch}/memtest86/*.${arch} 2> /dev/null)
readarray -t -O "${#_loadfilelist[@]}" _loadfilelist < <(get_filelist "${channel_dir}/${pkgdir_name}.${arch}/memtest86")

for_module '_loadfilelist+=($(ls ${module_dir}/{}/${pkgdir_name}.${arch}/memtest86/*.${arch} 2> /dev/null))'
fi
Expand Down Expand Up @@ -229,7 +229,7 @@ fi

#-- パッケージリストをソートし重複を削除 --#
#_pkglist=($(printf "%s\n" "${_pkglist[@]}" | sort | uniq | tr "\n" " "))
readarray -t _pkglist < <(printf "%s\n" "${_pkglist[@]}" | sort | uniq | tr -d "\n")
readarray -t _pkglist < <(printf "%s\n" "${_pkglist[@]}" | sort | uniq | grep -v ^$)

#-- excludeに記述されたパッケージを除外 --#
for _pkg in "${_excludelist[@]}"; do
Expand Down
2 changes: 1 addition & 1 deletion tools/umount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ msg_common(){
[[ "${1}" = "-n" ]] && _msg_opts+=("-o" "-n") && shift 1
[[ "${nocolor}" = true ]] && _msg_opts+=("-n")
_msg_opts+=("${_type}" "${@}")
"${tools_dir}/msg.sh" "${_msg_opts[@]}"
"${tools_dir}/msg.sh" "${_msg_opts[@]}" &
}

# Show an INFO message
Expand Down

0 comments on commit 5d21275

Please sign in to comment.