From 18615f246d3723d5cf3dd7b8b170569f5e3c659b Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 10:05:23 -0400 Subject: [PATCH 01/23] actions: MacOS 12 is deprecated, move to 13 for x86_64 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32eaffc0..9c80d573 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: arch: aarch64 openssl_archs: linux-aarch64 staticx: yes - - os: macos-12 + - os: macos-13 jid: 6 goal: build arch: x86_64 From fe5bc5569d01f3089ad7987aa20ef88cfbf91be2 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 10:12:03 -0400 Subject: [PATCH 02/23] actions: kill cache for a rebuild on MacOS 13, also see if PyInstaller 6.10 will work now. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c80d573..f9ba8e7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: with: path: | cache.tar.xz - key: gam-${{ matrix.jid }}-20240916 + key: gam-${{ matrix.jid }}-20240918 - name: Untar Cache archive if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true' @@ -509,8 +509,8 @@ jobs: git clone https://github.com/pyinstaller/pyinstaller.git cd pyinstaller export latest_release=$(git tag --list | grep -v dev | grep -v rc | sort -Vr | head -n1) - # git checkout "${latest_release}" - git checkout "v6.9.0" + git checkout "${latest_release}" + # git checkout "v6.9.0" # remove pre-compiled bootloaders so we fail if bootloader compile fails rm -rvf PyInstaller/bootloader/*-*/* cd bootloader From abb49ed33622431d6aa786980059b197d21e1419 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 18 Sep 2024 07:14:53 -0700 Subject: [PATCH 03/23] Updated `gam delete ou` and `gam print admins` to handle the following error: ERROR: 503: serviceNotAvailable - The service is currently unavailable. --- src/GamUpdate.txt | 5 +++++ src/gam/__init__.py | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 2ebd2f8f..5521a752 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -8,6 +8,11 @@ where 7.00.02 MacOS builds usually took ~7 seconds to run "gam version", 7.00.03 MacOS builds are now signed by Jay's Apple Developer ID and notarized (scanned for malware) by Apple. This should resolve MacOS security warnings that need to be overridden when running GAM. +Updated `gam delete ou` and `gam print admins` to handle the following error: +``` +ERROR: 503: serviceNotAvailable - The service is currently unavailable. +``` + 7.00.02 Added option `showlastmodification` to `gam print|show filecounts` that adds diff --git a/src/gam/__init__.py b/src/gam/__init__.py index caa4f6b8..7474153d 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -16623,13 +16623,15 @@ def doPrintShowAdmins(): try: admins = callGAPIpages(cd.roleAssignments(), 'list', 'items', pageMessage=getPageMessage(), - throwReasons=[GAPI.INVALID, GAPI.USER_NOT_FOUND, GAPI.BAD_REQUEST, - GAPI.CUSTOMER_NOT_FOUND, GAPI.FORBIDDEN], + throwReasons=[GAPI.INVALID, GAPI.USER_NOT_FOUND, + GAPI.FORBIDDEN, GAPI.SERVICE_NOT_AVAILABLE, + GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND], + retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS, customer=GC.Values[GC.CUSTOMER_ID], fields=fields, **kwargs) except (GAPI.invalid, GAPI.userNotFound): entityUnknownWarning(Ent.ADMINISTRATOR, userKey) return - except GAPI.forbidden as e: + except (GAPI.forbidden, GAPI.serviceNotAvailable) as e: entityActionFailedExit([Ent.ADMINISTRATOR, userKey, Ent.ADMIN_ROLE, roleId], str(e)) except (GAPI.badRequest, GAPI.customerNotFound): accessErrorExit(cd) @@ -17334,14 +17336,17 @@ def _doDeleteOrgs(entityList): try: orgUnitPath = makeOrgUnitPathAbsolute(orgUnitPath) callGAPI(cd.orgunits(), 'delete', - throwReasons=[GAPI.CONDITION_NOT_MET, GAPI.INVALID_ORGUNIT, GAPI.ORGUNIT_NOT_FOUND, GAPI.BACKEND_ERROR, GAPI.BAD_REQUEST, GAPI.INVALID_CUSTOMER_ID, GAPI.LOGIN_REQUIRED], + throwReasons=[GAPI.CONDITION_NOT_MET, GAPI.INVALID_ORGUNIT, GAPI.ORGUNIT_NOT_FOUND, GAPI.BACKEND_ERROR, + GAPI.INVALID_CUSTOMER_ID, GAPI.SERVICE_NOT_AVAILABLE, + GAPI.BAD_REQUEST, GAPI.LOGIN_REQUIRED], + retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS, customerId=GC.Values[GC.CUSTOMER_ID], orgUnitPath=encodeOrgUnitPath(makeOrgUnitPathRelative(orgUnitPath))) entityActionPerformed([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], i, count) except GAPI.conditionNotMet: entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], Msg.HAS_CHILD_ORGS.format(Ent.Plural(Ent.ORGANIZATIONAL_UNIT)), i, count) except (GAPI.invalidOrgunit, GAPI.orgunitNotFound, GAPI.backendError): entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], Msg.DOES_NOT_EXIST, i, count) - except GAPI.invalidCustomerId as e: + except (GAPI.invalidCustomerId, GAPI.serviceNotAvailable) as e: ### Check for my_customer entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath, Ent.CUSTOMER_ID, GC.Values[GC.CUSTOMER_ID]], str(e), i, count) except (GAPI.badRequest, GAPI.loginRequired): From c4f15cbf3a87d7539ebd7ba03781749b4a75f086 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 11:24:00 -0400 Subject: [PATCH 04/23] actions: give up on PyInstaller 6.10 again. Urgh. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9ba8e7e..b8497a4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -509,8 +509,8 @@ jobs: git clone https://github.com/pyinstaller/pyinstaller.git cd pyinstaller export latest_release=$(git tag --list | grep -v dev | grep -v rc | sort -Vr | head -n1) - git checkout "${latest_release}" - # git checkout "v6.9.0" + # git checkout "${latest_release}" + git checkout "v6.9.0" # remove pre-compiled bootloaders so we fail if bootloader compile fails rm -rvf PyInstaller/bootloader/*-*/* cd bootloader From 640cb322d72976e7e74871a6a422ea4bff421469 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 11:41:36 -0400 Subject: [PATCH 05/23] [no ci] remove 3.8 from setup.cfg --- src/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup.cfg b/src/setup.cfg index d426edae..c9894fee 100644 --- a/src/setup.cfg +++ b/src/setup.cfg @@ -13,10 +13,10 @@ keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, classifiers = Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 License :: OSI Approved :: Apache License [options] From b1f88937839eb76981c503c4efeb7bde7fe39c81 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 18 Sep 2024 08:42:41 -0700 Subject: [PATCH 06/23] Use gam7 target directory on Linux/MacOS --- src/gam-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam-install.sh b/src/gam-install.sh index 06e522de..07c0b97c 100755 --- a/src/gam-install.sh +++ b/src/gam-install.sh @@ -21,7 +21,7 @@ EOF } target_dir="$HOME/bin" -target_gam="gam/gam" +target_gam="gam7/gam" gamarch=$(uname -m) gamos=$(uname -s) osversion="" From 52601edb35085133427c6f042619583f10df0d85 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 11:46:43 -0400 Subject: [PATCH 07/23] [no ci] remove 3.8 testing. Fixes #1702 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8497a4e..b7a082f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,7 @@ jobs: openssl_archs: VC-WIN64A - os: ubuntu-22.04 goal: test - python: "3.8" + python: "3.13" jid: 10 arch: x86_64 - os: ubuntu-22.04 From 2b8b2521d18a83af42b3db6d8c58b86b3b3ef732 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 12:57:42 -0400 Subject: [PATCH 08/23] actions: hack to make gam7 the folder for mac/linux packages --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7a082f6..f8d7a081 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -301,7 +301,8 @@ jobs: - name: Rename GNU link on Windows if: matrix.goal == 'build' && runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true' shell: bash - run: mv /usr/bin/link /usr/bin/gnulink + run: | + mv -v /usr/bin/link /usr/bin/gnulink - name: Make OpenSSL if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true' @@ -319,7 +320,7 @@ jobs: cd "${GITHUB_WORKSPACE}/src/openssl-${openssl_arch}" # install_sw saves us ages processing man pages :-) $MAKE install_sw - mv "${OPENSSL_INSTALL_PATH}" "${GITHUB_WORKSPACE}/bin/ssl-${openssl_arch}" + mv -v "${OPENSSL_INSTALL_PATH}" "${GITHUB_WORKSPACE}/bin/ssl-${openssl_arch}" done mkdir -vp "${OPENSSL_INSTALL_PATH}/lib" mkdir -vp "${OPENSSL_INSTALL_PATH}/bin" @@ -648,7 +649,9 @@ jobs: GAM_ARCHIVE="gam-${GAMVERSION}-linux-$(arch)-${libver}.tar.xz" fi echo "GAM Archive ${GAM_ARCHIVE}" - tar -C dist/ --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam + mv -v gam gam7 + tar -C dist/ --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 + mv -v gam7 gam - name: Windows package if: runner.os == 'Windows' && matrix.goal != 'test' From 281e79026082182a83419eb29b8dcce5de88244e Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 13:04:45 -0400 Subject: [PATCH 09/23] actions: fix gam/gam7 path --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8d7a081..23ab12eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -649,9 +649,9 @@ jobs: GAM_ARCHIVE="gam-${GAMVERSION}-linux-$(arch)-${libver}.tar.xz" fi echo "GAM Archive ${GAM_ARCHIVE}" - mv -v gam gam7 + mv -v dist/gam dist/gam7 tar -C dist/ --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 - mv -v gam7 gam + mv -v dist/gam7 dist/gam - name: Windows package if: runner.os == 'Windows' && matrix.goal != 'test' From 38375b171035205446d998c29aeb056859822dcc Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 18 Sep 2024 11:28:11 -0700 Subject: [PATCH 10/23] Revert setting target_gam --- src/gam-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam-install.sh b/src/gam-install.sh index 07c0b97c..06e522de 100755 --- a/src/gam-install.sh +++ b/src/gam-install.sh @@ -21,7 +21,7 @@ EOF } target_dir="$HOME/bin" -target_gam="gam7/gam" +target_gam="gam/gam" gamarch=$(uname -m) gamos=$(uname -s) osversion="" From 5267992e31326eb3036cea87a6bc94228cbdcdec Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 18 Sep 2024 11:33:37 -0700 Subject: [PATCH 11/23] Revert "Revert setting target_gam" This reverts commit 38375b171035205446d998c29aeb056859822dcc. --- src/gam-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam-install.sh b/src/gam-install.sh index 06e522de..07c0b97c 100755 --- a/src/gam-install.sh +++ b/src/gam-install.sh @@ -21,7 +21,7 @@ EOF } target_dir="$HOME/bin" -target_gam="gam/gam" +target_gam="gam7/gam" gamarch=$(uname -m) gamos=$(uname -s) osversion="" From 8165c7260664c9b4bfd2e7968b202dbfde6cc1a7 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 14:39:45 -0400 Subject: [PATCH 12/23] actions: gam7 in packages. --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23ab12eb..16ceddca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -540,19 +540,25 @@ jobs: # breaking our self-compiled version brew uninstall --ignore-dependencies openssl export PYINSTALLER_BUILD_ONEDIR=yes - export gampath=$($PYTHON -c "import os; print(os.path.realpath('${gampath}/gam'))") + export gampath=$($PYTHON -c "import os; print(os.path.realpath('${gampath}/gam7'))") elif [[ "${RUNNER_OS}" == "Windows" ]]; then # Work around issue where PyInstaller picks up python3.dll from other Python versions # https://github.com/pyinstaller/pyinstaller/issues/7102 export PATH="$(dirname ${PYTHON}):/usr/bin" export PYINSTALLER_BUILD_ONEDIR=no else - export gampath=$(realpath "${gampath}") + export PYINSTALLER_BUILD_ONEDIR=yes + export gampath=$(realpath "${gampath}/gam7") export PYINSTALLER_BUILD_ONEDIR=no fi export gam="${gampath}/gam" echo "gampath=${gampath}" >> $GITHUB_ENV "${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec + if [[ "$PYINSTALLER_BUILD_ONEDIR" == "yes" ]]; then + mv -v "${distpath}/gam" "${distpath}/gam7" + else + mv -v "$distpath" "${distpath}7" + fi echo "dist results:" ls -alRF "$distpath" echo "WARNINGS FROM build/gam/warn-gam.txt" From 19e386ed21a77c4bf257fdf6501f1bba0a61b96a Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 14:43:32 -0400 Subject: [PATCH 13/23] actions: fix non-onedir distpath --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16ceddca..afa2090d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -558,6 +558,7 @@ jobs: mv -v "${distpath}/gam" "${distpath}/gam7" else mv -v "$distpath" "${distpath}7" + export distpath="${distpath}7" fi echo "dist results:" ls -alRF "$distpath" From 4a0687cfe94c2d7af204dffbaac5755422ccd274 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 14:55:40 -0400 Subject: [PATCH 14/23] actions: actually enable one dir on Linux --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afa2090d..b1e98eaf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -549,7 +549,6 @@ jobs: else export PYINSTALLER_BUILD_ONEDIR=yes export gampath=$(realpath "${gampath}/gam7") - export PYINSTALLER_BUILD_ONEDIR=no fi export gam="${gampath}/gam" echo "gampath=${gampath}" >> $GITHUB_ENV From d84ff8d3925b0bf4d2340b1b1a67d94806c1a158 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 14:59:08 -0400 Subject: [PATCH 15/23] actions: fix mac/linux packaging. --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1e98eaf..536b155d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -655,9 +655,7 @@ jobs: GAM_ARCHIVE="gam-${GAMVERSION}-linux-$(arch)-${libver}.tar.xz" fi echo "GAM Archive ${GAM_ARCHIVE}" - mv -v dist/gam dist/gam7 - tar -C dist/ --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 - mv -v dist/gam7 dist/gam + tar -C dist/gam --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 - name: Windows package if: runner.os == 'Windows' && matrix.goal != 'test' From ac5098522bd7ea93ae4261f3e4de5cad31c64e86 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:04:37 -0400 Subject: [PATCH 16/23] actions: keep one file for staticx builds --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 536b155d..da0dc211 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -546,7 +546,7 @@ jobs: # https://github.com/pyinstaller/pyinstaller/issues/7102 export PATH="$(dirname ${PYTHON}):/usr/bin" export PYINSTALLER_BUILD_ONEDIR=no - else + elif [[ "${staticx}" != "yes" ]]; then export PYINSTALLER_BUILD_ONEDIR=yes export gampath=$(realpath "${gampath}/gam7") fi From 7606a40a58e5fd27b1f02b1b608f93222848f1bf Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:11:52 -0400 Subject: [PATCH 17/23] actions: reduce debug on PyInstaller, fix $gam --- .github/workflows/build.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da0dc211..a5ee24a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -561,22 +561,17 @@ jobs: fi echo "dist results:" ls -alRF "$distpath" - echo "WARNINGS FROM build/gam/warn-gam.txt" - cat build/gam/warn-gam.txt - echo "Analysis FROM build/gam/Analysis-00.toc" - cat build/gam/Analysis-00.toc - echo "EXE data FROM build/gam/EXE-00.toc" - cat build/gam/EXE-00.toc - if [ -x "$(command -v realpath)" ]; then - realpath=realpath - else - brew install coreutils - realpath=grealpath - fi - export gam=$(realpath "$gam") + #echo "WARNINGS FROM build/gam/warn-gam.txt" + #cat build/gam/warn-gam.txt + #echo "Analysis FROM build/gam/Analysis-00.toc" + #cat build/gam/Analysis-00.toc + #echo "EXE data FROM build/gam/EXE-00.toc" + #cat build/gam/EXE-00.toc if [[ "${RUNNER_OS}" == "Windows" ]]; then export gam=$(cygpath -w "$gam") echo "GAM on Windows at ${gam}" + else + export gam=$(realpath "$gam") fi echo "gam=${gam}" >> $GITHUB_ENV echo -e "GAM: ${gam}\nGAMPATH: ${gampath}" From f0b1b62e79afb3512b532c865cdcd868b18cfbf7 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:22:15 -0400 Subject: [PATCH 18/23] [no ci] comment out pyinstaller spec debug output for now --- src/gam.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gam.spec b/src/gam.spec index a548442f..d0eac6bd 100644 --- a/src/gam.spec +++ b/src/gam.spec @@ -37,12 +37,12 @@ a = Analysis( cipher=None, noarchive=False, ) -print(f"datas from analysis:\n{a.datas}") +#print(f"datas from analysis:\n{a.datas}") for d in a.datas: if 'pyconfig' in d[0]: a.datas.remove(d) break -print(f"datas after pyconfig cleanup:\n{a.datas}") +#print(f"datas after pyconfig cleanup:\n{a.datas}") pyz = PYZ(a.pure, a.zipped_data, cipher=None) From 0e0f49c54043b644e92d70ddf6bb56812515b6c1 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:22:46 -0400 Subject: [PATCH 19/23] actions: more attempts to fix staticx --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5ee24a8..f01555be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -558,6 +558,7 @@ jobs: else mv -v "$distpath" "${distpath}7" export distpath="${distpath}7" + export gampath="$distpath" fi echo "dist results:" ls -alRF "$distpath" From 42fd8cd1e87d42d1fa829830c3afc186c2b398f2 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:37:09 -0400 Subject: [PATCH 20/23] actions: fix $gam value on non-onedir --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f01555be..8d112369 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -550,8 +550,6 @@ jobs: export PYINSTALLER_BUILD_ONEDIR=yes export gampath=$(realpath "${gampath}/gam7") fi - export gam="${gampath}/gam" - echo "gampath=${gampath}" >> $GITHUB_ENV "${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec if [[ "$PYINSTALLER_BUILD_ONEDIR" == "yes" ]]; then mv -v "${distpath}/gam" "${distpath}/gam7" @@ -568,12 +566,14 @@ jobs: #cat build/gam/Analysis-00.toc #echo "EXE data FROM build/gam/EXE-00.toc" #cat build/gam/EXE-00.toc + export gam="${gampath}/gam" if [[ "${RUNNER_OS}" == "Windows" ]]; then export gam=$(cygpath -w "$gam") echo "GAM on Windows at ${gam}" else export gam=$(realpath "$gam") fi + echo "gampath=${gampath}" >> $GITHUB_ENV echo "gam=${gam}" >> $GITHUB_ENV echo -e "GAM: ${gam}\nGAMPATH: ${gampath}" From 89b854ea57c4e9a1676bc52a3ee07dcc2d527a3c Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:47:31 -0400 Subject: [PATCH 21/23] actions: try to simplify gam/gampath logic --- .github/workflows/build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d112369..06346ea9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -531,8 +531,7 @@ jobs: if: matrix.goal != 'test' run: | export distpath="./dist/gam" - export gampath="$distpath" - mkdir -p -v "${gampath}" + mkdir -p -v "${distpath}" if [[ "${RUNNER_OS}" == "macOS" ]]; then # Tell our gam.spec to use our code sign certificate export codesign_identity="Jay Lee" @@ -540,7 +539,6 @@ jobs: # breaking our self-compiled version brew uninstall --ignore-dependencies openssl export PYINSTALLER_BUILD_ONEDIR=yes - export gampath=$($PYTHON -c "import os; print(os.path.realpath('${gampath}/gam7'))") elif [[ "${RUNNER_OS}" == "Windows" ]]; then # Work around issue where PyInstaller picks up python3.dll from other Python versions # https://github.com/pyinstaller/pyinstaller/issues/7102 @@ -548,18 +546,18 @@ jobs: export PYINSTALLER_BUILD_ONEDIR=no elif [[ "${staticx}" != "yes" ]]; then export PYINSTALLER_BUILD_ONEDIR=yes - export gampath=$(realpath "${gampath}/gam7") fi "${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec if [[ "$PYINSTALLER_BUILD_ONEDIR" == "yes" ]]; then mv -v "${distpath}/gam" "${distpath}/gam7" + export gampath="${distpath}/gam7" else mv -v "$distpath" "${distpath}7" - export distpath="${distpath}7" - export gampath="$distpath" + export gampath="${distpath}7" fi - echo "dist results:" - ls -alRF "$distpath" + export gampath=$(realpath "$gampath") + echo "gampath ${gampath} results:" + ls -alRF "$gampath" #echo "WARNINGS FROM build/gam/warn-gam.txt" #cat build/gam/warn-gam.txt #echo "Analysis FROM build/gam/Analysis-00.toc" From c5da8963d4bd0cb39070cb919e068a8bc5f923fc Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:53:57 -0400 Subject: [PATCH 22/23] actions: fix packaging legacy staticx build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06346ea9..5b6ce776 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -649,7 +649,7 @@ jobs: GAM_ARCHIVE="gam-${GAMVERSION}-linux-$(arch)-${libver}.tar.xz" fi echo "GAM Archive ${GAM_ARCHIVE}" - tar -C dist/gam --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 + tar -C "${gampath}/.." --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7 - name: Windows package if: runner.os == 'Windows' && matrix.goal != 'test' From 08a6cbb27012b0709bf5b254e8dc0badb5b3ffe3 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 18 Sep 2024 15:56:49 -0400 Subject: [PATCH 23/23] actions: try fixing windows package --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b6ce776..0b3b0643 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -654,9 +654,9 @@ jobs: - name: Windows package if: runner.os == 'Windows' && matrix.goal != 'test' run: | - cd dist/ + cd "${gampath}/.." GAM_ARCHIVE="../gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.zip" - /c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam "-xr@${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" -bb3 + /c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam7 "-xr@${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" -bb3 cd .. /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/candle.exe -arch "${WIX_ARCH}" gam.wxs /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/WixUIExtension.dll gam.wixobj -o "gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.msi" || true;