diff --git a/.github/workflows/building-deb.yml b/.github/workflows/building-deb.yml index 79045c3..9d63796 100755 --- a/.github/workflows/building-deb.yml +++ b/.github/workflows/building-deb.yml @@ -251,7 +251,7 @@ jobs: *.deb generate_release_notes: true - loong64: + loong64-debian-port: runs-on: ubuntu-24.04 steps: - name: Clone Repository To Get Script @@ -311,6 +311,55 @@ jobs: *.deb generate_release_notes: true + loong64-loongnix: + runs-on: ubuntu-24.04 + steps: + - name: Clone Repository To Get Script + run: | + #apt update + #apt install sudo git -y + git clone $REPOSITORY --depth=1 + mv $(basename $REPOSITORY)/* . -v + mv $(basename $REPOSITORY)/.* . -v | true + + - name: Configure Base System + run: | + bash .github/workflows/configure-building-enviroment-base-system.sh loong64 loongnix $REPOSITORY https://github.com/$GITHUB_REPOSITORY https://pkg.loongnix.cn/loongnix/25 + + - name: Building ${{ GITHUB.repository }} + run: | + env gitPath=$(basename $GITHUB_REPOSITORY) bash .github/workflows/run-command-in-chroot.sh env GO111MODULE=off dpkg-buildpackage -b + cp $BOTTLEPATH/*.deb . -rv + + - name: Remove Debug Package + run: | + cd $BOTTLEPATH + echo -e "ls -1 | grep dbgsym | grep .deb | grep -v dtk | grep -v qt | grep -v dock | grep -v gxtk\nexit 0" | sudo tee remove-deb.sh + removeDeb=$(bash remove-deb.sh) + sudo rm -rf $removeDeb + + - name: Pack tar + run: | + cd $BOTTLEPATH + sudo tar -cvf ../deb-$(date +%s).tar *.deb + + - name: Push + env: + UPASSWD: ${{ secrets.PASSWD }} + UUSERS: ${{ secrets.USERS }} + UHOST: ${{ secrets.HOST }} + UPATH: ${{ secrets.UPATH }} + UPROGRAM: ${{ secrets.UPROGRAM }} + UPORT: ${{ secrets.UPORT }} + run: | + sudo apt update + sudo apt install sshpass -y + mkdir -p ~/.ssh/ + ssh-keyscan -p $UPORT -H $UHOST >> ~/.ssh/known_hosts + tarName=$(ls | grep .tar | head -n 1) + sshpass -p "$UPASSWD" rsync -e "ssh -p $UPORT" $tarName $UUSERS@$UHOST:$UPATH + sshpass -p "$UPASSWD" ssh $UUSERS@$UHOST -p $UPORT $UPROGRAM maolong $UPATH/$tarName > /dev/null + riscv64: runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/configure-building-enviroment-base-system.sh b/.github/workflows/configure-building-enviroment-base-system.sh index 910af18..d74622b 100755 --- a/.github/workflows/configure-building-enviroment-base-system.sh +++ b/.github/workflows/configure-building-enviroment-base-system.sh @@ -15,6 +15,9 @@ function useDebianPort() { sudo apt install debian-ports-archive-keyring -y sudo cp /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg -v } +function useLoongnix() { + sudo cp .github/workflows/loongnix /usr/share/debootstrap/scripts/ -v +} sudo apt update sudo apt install debootstrap binfmt-support qemu-user qemu-user-static git -y @@ -23,15 +26,17 @@ bottlePath=./system-bottle if [[ $2 == "beige" ]]; then getd23debootstrap else - if [[ $1 == "loong64" ]]; then + if [[ $1 == "loong64" ]] && [[ $2 != "loongnix" ]]; then useDebianPort + else + useLoongnix fi fi -sudo debootstrap --include=git,gcc,make,debian-ports-archive-keyring,debian-archive-keyring,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5 +sudo debootstrap --no-check-gpg --include=git,gcc,make,debian-ports-archive-keyring,debian-archive-keyring,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5 #if [[ $? != 0 ]]; then # sudo debootstrap --foreign --include=git,gcc,make,debian-ports-archive-keyring,debian-archive-keyring,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5 #fi -if [[ $? != 0 ]] && [[ $1 == loong64 ]]; then +if [[ $? != 0 ]] && [[ $1 == loong64 ]] && [[ $2 != "loongnix" ]]; then sudo apt install squashfs-tools git -y wget https://github.com/GXDE-OS/GXDE/releases/download/resources/debian-base-loong64.squashfs sudo unsquashfs debian-base-loong64.squashfs diff --git a/.github/workflows/loongnix b/.github/workflows/loongnix new file mode 100644 index 0000000..b27bffe --- /dev/null +++ b/.github/workflows/loongnix @@ -0,0 +1,17 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot minbase +keyring /usr/share/keyrings/debian-archive-keyring.gpg +default_mirror https://pkg.loongnix.cn/loongnix/25 + +# include common settings +if [ -e "$DEBOOTSTRAP_DIR/scripts/debian-common" ]; then + . "$DEBOOTSTRAP_DIR/scripts/debian-common" +elif [ -e /debootstrap/debian-common ]; then + . /debootstrap/debian-common +elif [ -e "$DEBOOTSTRAP_DIR/debian-common" ]; then + . "$DEBOOTSTRAP_DIR/debian-common" +else + error 1 NOCOMMON "File not found: debian-common" +fi