From 4798b95b94c880e12db9c0da32ec0aaf952f00df Mon Sep 17 00:00:00 2001 From: Michael Altobelli Date: Mon, 25 Nov 2024 14:25:09 -0500 Subject: [PATCH] Merge in base version from OBS (#1) Added templates and update the CI to work with Github Actions via sudo and other prep --- .github/workflows/python-app.yml | 3 ++- download.sh | 2 ++ install_prereq_ubuntu.sh | 8 ++++---- templates/Distribution.template | 24 ++++++++++++++++++++++++ templates/PackageInfo.template | 9 +++++++++ 5 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 download.sh create mode 100644 templates/Distribution.template create mode 100644 templates/PackageInfo.template diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 25a29f5..7545ce5 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,7 +28,8 @@ jobs: bash install_prereq_ubuntu.sh - name: Package an app run: | - mkdir /out/ + sudo mkdir /out/ && sudo chmod 777 /out/ + bash download.sh python build_a_pkg.py - name: Test with pytest uses: actions/upload-artifact@v4.4.3 diff --git a/download.sh b/download.sh new file mode 100644 index 0000000..0c69901 --- /dev/null +++ b/download.sh @@ -0,0 +1,2 @@ +mkdir input +curl "https://cdn-fastly.obsproject.com/downloads/obs-studio-30.2.3-macos-intel.dmg" -o "input/obs-studio-30.2.3-macos-intel.dmg" \ No newline at end of file diff --git a/install_prereq_ubuntu.sh b/install_prereq_ubuntu.sh index 9059063..048f21c 100644 --- a/install_prereq_ubuntu.sh +++ b/install_prereq_ubuntu.sh @@ -1,10 +1,10 @@ #assumes ubuntu:24.04 -apt update -y && apt install -y python3 curl xz-utils git build-essential autoconf libxml2-dev libssl-dev zlib1g-dev -curl https://www.7-zip.org/a/7z2408-linux-x64.tar.xz -o 7z.tar.xz && tar -xf 7z.tar.xz 7zzs && cp 7zzs /usr/bin/7zzs && chmod +x /usr/bin/7zzs +sudo apt update -y && sudo apt install -y python3 curl xz-utils git build-essential autoconf libxml2-dev libssl-dev zlib1g-dev +curl https://www.7-zip.org/a/7z2408-linux-x64.tar.xz -o 7z.tar.xz && tar -xf 7z.tar.xz 7zzs && sudo cp 7zzs /usr/bin/7zzs && sudo chmod +x /usr/bin/7zzs git clone "https://github.com/maltob/bomutils.git" /tmp/bomutils git clone "https://github.com/mackyle/xar.git" /tmp/xar cd /tmp/bomutils/ -make && make install +make && sudo make install cd /tmp/xar/xar -sed -i 's/OpenSSL_add_all_ciphers/OPENSSL_init_crypto/g' configure.ac && ./autogen.sh && make && make install +sed -i 's/OpenSSL_add_all_ciphers/OPENSSL_init_crypto/g' configure.ac && ./autogen.sh && make && sudo cp src/xar /usr/bin/xar && sudo chmod +x /usr/bin/xar diff --git a/templates/Distribution.template b/templates/Distribution.template new file mode 100644 index 0000000..2053946 --- /dev/null +++ b/templates/Distribution.template @@ -0,0 +1,24 @@ + + + ${APP_NAME} + + + + + + + + + + + #base.pkg + \ No newline at end of file diff --git a/templates/PackageInfo.template b/templates/PackageInfo.template new file mode 100644 index 0000000..e54068f --- /dev/null +++ b/templates/PackageInfo.template @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file