@@ -18,6 +18,8 @@ mkdir -p ~/.gnupg && echo -e "keyserver hkp://keys.gnupg.net\nkeyserver-options
|
||||
# reduce time required to install packages by disabling pacman's disk space checking
|
||||
sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf
|
||||
|
||||
pacman --noconfirm -Fy
|
||||
|
||||
# Detect
|
||||
list_commits || failure 'Could not detect added commits'
|
||||
list_packages || failure 'Could not detect changed files'
|
||||
@@ -28,13 +30,34 @@ define_build_order || failure 'Could not determine build order'
|
||||
# Build
|
||||
message 'Building packages' "${packages[@]}"
|
||||
execute 'Approving recipe quality' check_recipe_quality
|
||||
|
||||
message 'Building packages'
|
||||
for package in "${packages[@]}"; do
|
||||
echo "::group::[build] ${package}"
|
||||
execute 'Building binary' makepkg --noconfirm --noprogressbar --nocheck --syncdeps --rmdeps --cleanbuild
|
||||
execute 'Building source' makepkg --noconfirm --noprogressbar --allsource
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::[install] ${package}"
|
||||
grep -qFx "${package}" "$(dirname "$0")/ci-dont-install-list.txt" || execute 'Installing' yes:pacman --noprogressbar --upgrade '*.pkg.tar.*'
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::[diff] ${package}"
|
||||
cd "$package"
|
||||
for pkg in *.pkg.tar.*; do
|
||||
message "File listing diff for ${pkg}"
|
||||
pkgname="$(echo "$pkg" | rev | cut -d- -f4- | rev)"
|
||||
diff -Nur <(pacman -Fl "$pkgname" | sed -e 's|^[^ ]* |/|' | sort) <(pacman -Ql "$pkgname" | sed -e 's|^[^/]*||' | sort) || true
|
||||
done
|
||||
cd - > /dev/null
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::[dll check] ${package}"
|
||||
execute 'Checking dll depencencies' list_dll_deps ./pkg
|
||||
echo "::endgroup::"
|
||||
|
||||
mv "${package}"/*.pkg.tar.* artifacts
|
||||
mv "${package}"/*.src.tar.gz artifacts
|
||||
mv "${package}"/*.src.tar.* artifacts
|
||||
unset package
|
||||
done
|
||||
success 'All packages built successfully'
|
||||
|
||||
@@ -49,6 +49,23 @@ def normalize_path(path: str) -> str:
|
||||
return path.replace("\\", "/")
|
||||
|
||||
|
||||
def check_output_retry(*args, **kwargs):
|
||||
# XXX: git sometimes crashes when called concurrently,
|
||||
# so we retry a few times..
|
||||
run = 0
|
||||
max_ = 5
|
||||
while True:
|
||||
try:
|
||||
return subprocess.check_output(*args, **kwargs)
|
||||
except subprocess.CalledProcessError as e:
|
||||
if run <= max_ and e.returncode == 127:
|
||||
time.sleep(0.1 * run)
|
||||
run += 1
|
||||
continue
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
def get_cache_key(pkgbuild_path: str) -> str:
|
||||
pkgbuild_path = os.path.abspath(pkgbuild_path)
|
||||
git_cwd = os.path.dirname(pkgbuild_path)
|
||||
@@ -58,12 +75,12 @@ def get_cache_key(pkgbuild_path: str) -> str:
|
||||
with open(pkgbuild_path, "rb") as f:
|
||||
h.update(f.read())
|
||||
|
||||
fileinfo = subprocess.check_output(
|
||||
fileinfo = check_output_retry(
|
||||
["git", "ls-files", "-s", "--full-name", git_path],
|
||||
cwd=git_cwd).decode("utf-8").strip()
|
||||
h.update(normalize_path(fileinfo).encode("utf-8"))
|
||||
|
||||
repo = subprocess.check_output(
|
||||
repo = check_output_retry(
|
||||
["git", "ls-remote", "--get-url", "origin"],
|
||||
cwd=git_cwd).decode("utf-8").strip()
|
||||
repo = normalize_repo(repo)
|
||||
@@ -103,17 +120,17 @@ def get_srcinfo_for_pkgbuild(args: Tuple[str, str]) -> Optional[CacheTuple]:
|
||||
"--printsrcinfo", "-p", git_path],
|
||||
cwd=git_cwd).decode("utf-8")
|
||||
|
||||
repo = subprocess.check_output(
|
||||
repo = check_output_retry(
|
||||
["git", "ls-remote", "--get-url", "origin"],
|
||||
cwd=git_cwd).decode("utf-8").strip()
|
||||
repo = normalize_repo(repo)
|
||||
|
||||
relpath = subprocess.check_output(
|
||||
relpath = check_output_retry(
|
||||
["git", "ls-files", "--full-name", git_path],
|
||||
cwd=git_cwd).decode("utf-8").strip()
|
||||
relpath = normalize_path(os.path.dirname(relpath))
|
||||
|
||||
date = subprocess.check_output(
|
||||
date = check_output_retry(
|
||||
["git", "log", "-1", "--format=%aI", git_path],
|
||||
cwd=git_cwd).decode("utf-8").strip()
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
pkgbase=glib2
|
||||
pkgname=(glib2 glib2-devel glib2-docs)
|
||||
pkgver=2.66.4
|
||||
pkgrel=2
|
||||
pkgver=2.66.6
|
||||
pkgrel=1
|
||||
pkgdesc="Common C routines used by GTK+ and other libs"
|
||||
license=(LGPL2)
|
||||
url="https://www.gtk.org/"
|
||||
@@ -23,7 +23,7 @@ makedepends=('docbook-xsl'
|
||||
source=(https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
|
||||
2.38.2-gconvert-cygwin.patch
|
||||
2.64-gmodule-cygwin-rebased.patch)
|
||||
sha256sums=('97df8670e32f9fd4f7392b0980e661dd625012015d58350da1e58e343f4af984'
|
||||
sha256sums=('80fff9c63d2725834328071c42003c311f77f91caf2285195c587c62f5638329'
|
||||
'9054ae2ba34a12bcafa7659f9f21badbfa7aa6114657ed993818cd867ba698f4'
|
||||
'dc7a6691f1a19c1b5c6765446d39838331126b29cad45594c100c73da737710c')
|
||||
|
||||
@@ -61,7 +61,7 @@ build() {
|
||||
check() {
|
||||
cd "${srcdir}"/build
|
||||
|
||||
# meson test
|
||||
meson test
|
||||
}
|
||||
|
||||
package_glib2() {
|
||||
@@ -78,19 +78,12 @@ package_glib2() {
|
||||
done
|
||||
|
||||
cp -rf ${srcdir}/dest/usr/lib/gio ${pkgdir}/usr/lib/
|
||||
#cp -rf ${srcdir}/dest/usr/share/doc ${pkgdir}/usr/share/
|
||||
cp -rf ${srcdir}/dest/usr/share/gdb ${pkgdir}/usr/share/
|
||||
|
||||
mkdir -p ${pkgdir}/usr/share/{man,glib-2.0}
|
||||
cp -rf ${srcdir}/dest/usr/share/glib-2.0/gdb ${pkgdir}/usr/share/glib-2.0/
|
||||
cp -rf ${srcdir}/dest/usr/share/glib-2.0/schemas ${pkgdir}/usr/share/glib-2.0/
|
||||
cp -rf ${srcdir}/dest/usr/share/locale ${pkgdir}/usr/share/
|
||||
#mkdir -p ${pkgdir}/usr/share/man/man1
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gdbus.* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gio* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/glib-compile-schemas* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gobject* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gsettings.* ${pkgdir}/usr/share/man/man1/
|
||||
|
||||
cp -rf ${srcdir}/dest/usr/share/bash-completion ${pkgdir}/usr/share/
|
||||
|
||||
@@ -114,7 +107,6 @@ package_glib2-devel() {
|
||||
|
||||
cp -rf ${srcdir}/dest/usr/lib/pkgconfig ${pkgdir}/usr/lib/
|
||||
cp -f ${srcdir}/dest/usr/lib/*.a ${pkgdir}/usr/lib/
|
||||
#cp -rf ${srcdir}/dest/usr/lib/gio* ${pkgdir}/usr/lib/
|
||||
cp -rf ${srcdir}/dest/usr/lib/glib* ${pkgdir}/usr/lib/
|
||||
|
||||
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
|
||||
@@ -125,13 +117,6 @@ package_glib2-devel() {
|
||||
|
||||
python3 -m compileall -d "/usr/share/glib-2.0/codegen" "${pkgdir}/usr/share/glib-2.0/codegen"
|
||||
python3 -O -m compileall -d "/usr/share/glib-2.0/codegen" "${pkgdir}/usr/share/glib-2.0/codegen"
|
||||
|
||||
#mkdir -p ${pkgdir}/usr/share/man/man1
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gdbus-codegen* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/glib-* ${pkgdir}/usr/share/man/man1/
|
||||
#rm -f ${pkgdir}/usr/share/man/man1/glib-compile-schemas*
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gresource* ${pkgdir}/usr/share/man/man1/
|
||||
#cp -rf ${srcdir}/dest/usr/share/man/man1/gtester* ${pkgdir}/usr/share/man/man1/
|
||||
}
|
||||
|
||||
package_glib2-docs() {
|
||||
|
||||
Reference in New Issue
Block a user