ivan-hc / ArchImage

Build AppImage packages for all distributions but including Arch Linux packages. Powered by JuNest.
GNU General Public License v3.0
112 stars 1 forks source link

Problem installing Junest #19

Closed Faugus closed 6 months ago

Faugus commented 6 months ago
[faugus@archlinux ARCHIMAGE]$ /home/faugus/ARCHIMAGE/faugus-launcher-junest.sh
mkdir: cannot create directory ‘faugus-launcher.AppDir’: File exists
fatal: destination path '/home/faugus/ARCHIMAGE/.local/share/junest' already exists and is not an empty directory.
junest-x86_64.tar 100%[============>] 220.95M  35.1MB/s    in 6.3s    
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 24: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 30: ./.junest/et
c/pacman.conf: No such file or directory
rm: cannot remove './.junest/etc/pacman.d/mirrorlist': No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 45: ./.junest/etc/pacman.d/mirrorlist: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 55: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 56: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 59: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 60: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/faugus-launcher-junest.sh: line 61: ./.local/share/junest/bin/junest: No such file or directory
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
ivan-hc commented 6 months ago

The issue here is that you have already performed a build previously:

fatal: destination path '/home/faugus/ARCHIMAGE/.local/share/junest' already exists and is not an empty directory.

being this an already existing environment, many files needed are already missing and deleted, for example

c/pacman.conf: No such file or directory

needed to made PacMan and YAY working

SOLUTION: create a new directory and run the script into it, or at least, remove all files and directories from /home/faugus/ARCHIMAGE except the script.

NOTE: set your file manager to show hidden files, since ".junest" and ".local" are hidden directories.

Faugus commented 6 months ago

@ivan-hc

[faugus@archlinux newfolder]$ /home/faugus/Desktop/newfolder/faugus-launcher-junest.sh
Cloning into '/home/faugus/Desktop/newfolder/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 2235 (delta 154), reused 138 (delta 133), pack-reused 2057
Receiving objects: 100% (2235/2235), 520.13 KiB | 4.60 MiB/s, done.
Resolving deltas: 100% (1205/1205), done.
junest-x86_64.tar 100%[============>] 220.95M  43.1MB/s    in 4.9s    
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 24: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 30: ./.junest/etc/pacman.conf: No such file or directory
rm: cannot remove './.junest/etc/pacman.d/mirrorlist': No such file or 
directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 45: ./.junest/etc/pacman.d/mirrorlist: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 55: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 56: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 59: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 60: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 61: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/Desktop/newfolder/faugus-launcher-junest.sh: line 62: ./.local/share/junest/bin/junest: No such file or directory
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
ivan-hc commented 6 months ago

Can you share the script here or copy/paste it?

Faugus commented 6 months ago

@ivan-hc

#!/bin/sh

# NAME OF THE APP BY REPLACING "SAMPLE"
APP=faugus-launcher
BIN="$APP" #CHANGE THIS IF THE NAME OF THE BINARY IS DIFFERENT FROM "$APP" (for example, the binary of "obs-studio" is "obs")
DEPENDENCES=""
#BASICSTUFF="binutils debugedit gzip"
COMPILERS="base-devel"

# CREATE THE APPDIR (DON'T TOUCH THIS)...
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod a+x appimagetool
mkdir $APP.AppDir

# ENTER THE APPDIR
cd $APP.AppDir

# SET APPDIR AS A TEMPORARY $HOME DIRECTORY, THIS WILL DO ALL WORK INTO THE APPDIR
HOME="$(dirname "$(readlink -f $0)")" 

# DOWNLOAD AND INSTALL JUNEST (DON'T TOUCH THIS)
git clone https://github.com/fsquillace/junest.git ~/.local/share/junest
wget -q --show-progress https://github.com/ivan-hc/junest/releases/download/continuous/junest-x86_64.tar.gz
./.local/share/junest/bin/junest setup -i junest-x86_64.tar.gz
rm -f junest-x86_64.tar.gz

# ENABLE MULTILIB (optional)
echo "
[multilib]
Include = /etc/pacman.d/mirrorlist" >> ./.junest/etc/pacman.conf

# ENABLE CHAOTIC-AUR
###./.local/share/junest/bin/junest -- sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
###./.local/share/junest/bin/junest -- sudo pacman-key --lsign-key 3056513887B78AEB
###./.local/share/junest/bin/junest -- sudo pacman-key --populate chaotic
###./.local/share/junest/bin/junest -- sudo pacman --noconfirm -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
###echo "
###[chaotic-aur]
###Include = /etc/pacman.d/chaotic-mirrorlist" >> ./.junest/etc/pacman.conf

# CUSTOM MIRRORLIST, THIS SHOULD SPEEDUP THE INSTALLATION OF THE PACKAGES IN PACMAN (COMMENT EVERYTHING TO USE THE DEFAULT MIRROR)
_custom_mirrorlist(){
    #COUNTRY=$(curl -i ipinfo.io | grep country | cut -c 15- | cut -c -2)
    rm -R ./.junest/etc/pacman.d/mirrorlist
    wget -q https://archlinux.org/mirrorlist/all/ -O - | awk NR==2 RS= | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES WORLDWIDE MIRRORS
    #wget -q https://archlinux.org/mirrorlist/?country="$(echo $COUNTRY)" -O - | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES MIRRORS OF YOUR COUNTY
}
_custom_mirrorlist

# BYPASS SIGNATURE CHECK LEVEL
sed -i 's/#SigLevel/SigLevel/g' ./.junest/etc/pacman.conf
sed -i 's/Required DatabaseOptional/Never/g' ./.junest/etc/pacman.conf

# UPDATE ARCH LINUX IN JUNEST
./.local/share/junest/bin/junest -- sudo pacman -Syy
./.local/share/junest/bin/junest -- sudo pacman --noconfirm -Syu

# INSTALL THE PROGRAM USING YAY
./.local/share/junest/bin/junest -- yay -Syy
./.local/share/junest/bin/junest -- gpg --keyserver keyserver.ubuntu.com --recv-key C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF # UNCOMMENT IF YOU USE THE AUR
./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$BASICSTUFF $COMPILERS")
./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$DEPENDENCES $APP")

# SET THE LOCALE (DON'T TOUCH THIS)
#sed "s/# /#>/g" ./.junest/etc/locale.gen | sed "s/#//g" | sed "s/>/#/g" >> ./locale.gen # UNCOMMENT TO ENABLE ALL THE LANGUAGES
#sed "s/#$(echo $LANG)/$(echo $LANG)/g" ./.junest/etc/locale.gen >> ./locale.gen # ENABLE ONLY YOUR LANGUAGE, COMMENT IF YOU NEED MORE THAN ONE
#rm ./.junest/etc/locale.gen
#mv ./locale.gen ./.junest/etc/locale.gen
rm ./.junest/etc/locale.conf
#echo "LANG=$LANG" >> ./.junest/etc/locale.conf
sed -i 's/LANG=${LANG:-C}/LANG=$LANG/g' ./.junest/etc/profile.d/locale.sh
#./.local/share/junest/bin/junest -- sudo pacman --noconfirm -S glibc gzip
#./.local/share/junest/bin/junest -- sudo locale-gen

# ...ADD THE ICON AND THE DESKTOP FILE AT THE ROOT OF THE APPDIR...
rm -R -f ./*.desktop
LAUNCHER=$(grep -iRl $BIN ./.junest/usr/share/applications/* | grep ".desktop" | head -1)
cp -r "$LAUNCHER" ./
ICON=$(cat $LAUNCHER | grep "Icon=" | cut -c 6-)
cp -r ./.junest/usr/share/icons/hicolor/22x22/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/24x24/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/32x32/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/48x48/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/64x64/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/128x128/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/192x192/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/256x256/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/512x512/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/scalable/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/pixmaps/*$ICON* ./ 2>/dev/null

# TEST IF THE DESKTOP FILE AND THE ICON ARE IN THE ROOT OF THE FUTURE APPIMAGE (./*AppDir/*)
if test -f ./*.desktop; then
    echo "The .desktop file is available in $APP.AppDir/"
else
    if test -f ./.junest/usr/bin/$BIN; then
        echo "No .desktop file available for $APP, creating a new one..."
        cat <<-HEREDOC >> "./$APP.desktop"
        [Desktop Entry]
        Version=1.0
        Type=Application
        Name=NAME
        Comment=
        Exec=BINARY
        Icon=tux
        Categories=Utility;
        Terminal=true
        StartupNotify=true
        HEREDOC
        sed -i "s#BINARY#$BIN#g" ./$APP.desktop
        sed -i "s#Name=NAME#Name=$(echo $APP | tr a-z A-Z)#g" ./$APP.desktop
        wget https://raw.githubusercontent.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/favicon.ico -O ./tux.png
    else
        echo "No binary in path... aborting all the processes."
        exit
    fi
fi

# ...AND FINALLY CREATE THE APPRUN, IE THE MAIN SCRIPT TO RUN THE APPIMAGE!
# EDIT THE FOLLOWING LINES IF YOU THINK SOME ENVIRONMENT VARIABLES ARE MISSING
rm -R -f ./AppRun
cat >> ./AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin
if test -d /media; then
    MNT_MEDIA=' --bind /media /media '
fi
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
BINDS=" $MNT_MEDIA $ETC_RESOLV "
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- $EXEC "$@"
EOF
chmod a+x ./AppRun

# REMOVE "READ-ONLY FILE SYSTEM" ERRORS
sed -i 's#${JUNEST_HOME}/usr/bin/junest_wrapper#${HOME}/.cache/junest_wrapper.old#g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/rm -f "${JUNEST_HOME}${bin_path}_wrappers/#rm -f "${JUNEST_HOME}${bin_path}_wrappers/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/ln/#ln/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's#--bind "$HOME" "$HOME"#--bind /opt /opt --bind /usr/lib/locale /usr/lib/locale --bind /usr/share/fonts /usr/share/fonts --bind /usr/share/themes /usr/share/themes --bind /mnt /mnt --bind /home /home --bind /run/user /run/user#g' .local/share/junest/lib/core/namespace.sh
sed -i 's/rm -f "$file"/test -f "$file"/g' ./.local/share/junest/lib/core/wrappers.sh

# EXIT THE APPDIR
cd ..

# EXTRACT PACKAGE CONTENT
mkdir base
tar fx $(find ./$APP.AppDir -name $APP-[0-9]*zst | head -1) -C ./base/
VERSION=$(cat ./base/.PKGINFO | grep pkgver | cut -c 10- | sed 's@.*:@@')
mkdir deps

ARGS=$(echo "$DEPENDENCES" | tr " " "\n")
for arg in $ARGS; do
    for var in $arg; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
    done
done

DEPS=$(cat ./base/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<")
for arg in $DEPS; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
    done
done

DEPS2=$(cat ./depdeps | uniq)
for arg in $DEPS2; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps2
    done
done

DEPS3=$(cat ./depdeps2 | uniq)
for arg in $DEPS3; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps3
    done
done

DEPS4=$(cat ./depdeps3 | uniq)
for arg in $DEPS4; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps4
    done
done

# REMOVE SOME BLOATWARES
echo Y | rm -R .f ./$APP.AppDir/.cache/yay/*
find ./$APP.AppDir/.junest/usr/share/doc/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL DOCUMENTATION NOT RELATED TO THE APP
find ./$APP.AppDir/.junest/usr/share/locale/*/*/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL ADDITIONAL LOCALE FILES
rm -R -f ./$APP.AppDir/.junest/etc/makepkg.conf
rm -R -f ./$APP.AppDir/.junest/etc/pacman.conf
rm -R -f ./$APP.AppDir/.junest/usr/include #FILES RELATED TO THE COMPILER
rm -R -f ./$APP.AppDir/.junest/usr/man #APPIMAGES ARE NOT MENT TO HAVE MAN COMMAND
rm -R -f ./$APP.AppDir/.junest/var/* #REMOVE ALL PACKAGES DOWNLOADED WITH THE PACKAGE MANAGER

# IN THE NEXT 4 STEPS WE WILL TRY TO LIGHTEN THE FINAL APPIMAGE PACKAGE
# WE WILL MOVE EXCESS CONTENT TO BACKUP FOLDERS (STEP 1)
# THE AFFECTED DIRECTORIES WILL BE /usr/bin (STEP 2), /usr/lib (STEP 3) AND /usr/share (STEP 4)

BINSAVED="SAVEBINSPLEASE" # Enter here keywords to find and save in /usr/bin
SHARESAVED="SAVESHAREPLEASE" # Enter here keywords or file/folder names to save in both /usr/share and /usr/lib
LIBSAVED="SAVELIBSPLEASE" # Enter here keywords or file/folder names to save in /usr/lib

# STEP 1, CREATE A BACKUP FOLDER WHERE TO SAVE THE FILES TO BE DISCARDED (USEFUL FOR TESTING PURPOSES)
mkdir -p ./junest-backups/usr/bin
mkdir -p ./junest-backups/usr/lib/dri
mkdir -p ./junest-backups/usr/share

# STEP 2, FUNCTION TO SAVE THE BINARIES IN /usr/bin THAT ARE NEEDED TO MADE JUNEST WORK, PLUS THE MAIN BINARY/BINARIES OF THE APP
# IF YOU NEED TO SAVE MORE BINARIES, LIST THEM IN THE "BINSAVED" VARIABLE. COMMENT THE LINE "_savebins" IF YOU ARE NOT SURE.
_savebins(){
    mkdir save
    mv ./$APP.AppDir/.junest/usr/bin/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/bin/bash ./save/
    mv ./$APP.AppDir/.junest/usr/bin/bwrap ./save/
    mv ./$APP.AppDir/.junest/usr/bin/env ./save/
    mv ./$APP.AppDir/.junest/usr/bin/sh ./save/
    mv ./$APP.AppDir/.junest/usr/bin/tr ./save/
    mv ./$APP.AppDir/.junest/usr/bin/tty ./save/
    for arg in $BINSAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/bin/*"$arg"* ./save/
        done
    done
    mv ./$APP.AppDir/.junest/usr/bin/* ./junest-backups/usr/bin/
    mv ./save/* ./$APP.AppDir/.junest/usr/bin/
    rmdir save
}
#_savebins 2> /dev/null

# STEP 3, MOVE UNNECESSARY LIBRARIES TO A BACKUP FOLDER (FOR TESTING PURPOSES)
mkdir save

_binlibs(){
    readelf -d ./$APP.AppDir/.junest/usr/bin/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    mv ./$APP.AppDir/.junest/usr/lib/ld-linux-x86-64.so* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/*$APP* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/libdw* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/libelf* ./save/
    for arg in $SHARESAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
        done
    done
    ARGS=$(tail -n +2 ./list | sort -u | uniq)
    for arg in $ARGS; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/$arg* ./save/
            find ./$APP.AppDir/.junest/usr/lib/ -name $arg -exec cp -r --parents -t save/ {} +
        done 
    done
    rm -R -f $(find ./save/ | sort | grep ".AppDir" | head -1)
    rm list
}

_include_swrast_dri(){
    mkdir ./save/dri
    mv ./$APP.AppDir/.junest/usr/lib/dri/swrast_dri.so ./save/dri/
}

_libkeywords(){
    for arg in $LIBSAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
        done
    done
}

_liblibs(){
    readelf -d ./save/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    ARGS=$(tail -n +2 ./list | sort -u | uniq)
    for arg in $ARGS; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/$arg* ./save/
            find ./$APP.AppDir/.junest/usr/lib/ -name $arg -exec cp -r --parents -t save/ {} +
        done 
    done
    rsync -av ./save/$APP.AppDir/.junest/usr/lib/* ./save/
    rm -R -f $(find ./save/ | sort | grep ".AppDir" | head -1)
    rm list
}

_mvlibs(){
    mv ./$APP.AppDir/.junest/usr/lib/* ./junest-backups/usr/lib/
    mv ./save/* ./$APP.AppDir/.junest/usr/lib/
}

#_binlibs 2> /dev/null

#_include_swrast_dri 2> /dev/null

#_libkeywords 2> /dev/null

#_liblibs 2> /dev/null
#_liblibs 2> /dev/null
#_liblibs 2> /dev/null
#_liblibs 2> /dev/null
#_liblibs 2> /dev/null

#_mvlibs 2> /dev/null

rmdir save

# STEP 4, SAVE ONLY SOME DIRECTORIES CONTAINED IN /usr/share
# IF YOU NEED TO SAVE MORE FOLDERS, LIST THEM IN THE "SHARESAVED" VARIABLE. COMMENT THE LINE "_saveshare" IF YOU ARE NOT SURE.
_saveshare(){
    mkdir save
    mv ./$APP.AppDir/.junest/usr/share/*$APP* ./save/
    mv ./$APP.AppDir/.junest/usr/share/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/share/fontconfig ./save/
    mv ./$APP.AppDir/.junest/usr/share/glib-* ./save/
    mv ./$APP.AppDir/.junest/usr/share/locale ./save/
    mv ./$APP.AppDir/.junest/usr/share/mime ./save/
    mv ./$APP.AppDir/.junest/usr/share/wayland ./save/
    mv ./$APP.AppDir/.junest/usr/share/X11 ./save/
    for arg in $SHARESAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/share/*"$arg"* ./save/
        done
    done
    mv ./$APP.AppDir/.junest/usr/share/* ./junest-backups/usr/share/
    mv ./save/* ./$APP.AppDir/.junest/usr/share/
    rmdir save
}
#_saveshare 2> /dev/null

# RSYNC THE CONTENT OF THE APP'S PACKAGE
rm -R -f ./base/.*
rsync -av ./base/* ./$APP.AppDir/.junest/

# RSYNC DEPENDENCES
rm -R -f ./deps/.*
rsync -av ./deps/* ./$APP.AppDir/.junest/

# ADDITIONAL REMOVALS
#mv ./$APP.AppDir/.junest/usr/lib/libLLVM-* ./junest-backups/usr/lib/ #INCLUDED IN THE COMPILATION PHASE, CAN SOMETIMES BE EXCLUDED FOR DAILY USE
rm -R -f ./$APP.AppDir/.junest/usr/lib/python*/__pycache__/* #IF PYTHON IS INSTALLED, REMOVING THIS DIRECTORY CAN SAVE SEVERAL MEGABYTES

# REMOVE THE INBUILT HOME
rm -R -f ./$APP.AppDir/.junest/home

# ENABLE MOUNTPOINTS
mkdir -p ./$APP.AppDir/.junest/home
mkdir -p ./$APP.AppDir/.junest/media
mkdir -p ./$APP.AppDir/.junest/usr/lib/locale
mkdir -p ./$APP.AppDir/.junest/usr/share/fonts
mkdir -p ./$APP.AppDir/.junest/usr/share/themes
mkdir -p ./$APP.AppDir/.junest/run/user

# CREATE THE APPIMAGE
ARCH=x86_64 ./appimagetool -n ./$APP.AppDir
mv ./*AppImage ./"$(cat ./$APP.AppDir/*.desktop | grep 'Name=' | head -1 | cut -c 6- | sed 's/ /-/g')"_"$VERSION"-archimage3.2-x86_64.AppImage
ivan-hc commented 6 months ago

OK, I've found the problem. This is an AUR package and you have not allowed the $BASICSTUFF environment variable, needed to install binutils, gzip and (now) debugedit.

In the meantime I've created the same script using default parameters and tried to compile the app by myself.

The only error I've found is about the icon. It is placed exactly in /usr/share/icons as faugus-launcher.png, not in subdirectories, so this would be the only manual change you should do.

I'll share my script here soon, you can compare yours with my "draft" at https://www.diffchecker.com/3Nn6ZRT3/ (yousr is on the left, mine is on the right).

Faugus commented 6 months ago

@ivan-hc

I copied your script, put it in a new folder, ran it, same error:

[faugus@archlinux test]$ /home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh
Cloning into '/home/faugus/ARCHIMAGE/test/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 2235 (delta 88), reused 79 (delta 73), pack-reused 2131
Receiving objects: 100% (2235/2235), 514.12 KiB | 4.36 MiB/s, done.
Resolving deltas: 100% (1201/1201), done.
junest-x86_64.tar 100%[============>] 220.95M  45.7MB/s    in 4.8s    
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 24: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 30: ./.junest/etc/pacman.conf: No such file or directory
rm: cannot remove './.junest/etc/pacman.d/mirrorlist': No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 45: ./.junest/etc/pacman.d/mirrorlist: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 55: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 56: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 59: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 60: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 61: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/test/faugus-launcher-junest.sh: line 62: ./.local/share/junest/bin/junest: No such file or directory
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
#!/bin/sh

# NAME OF THE APP BY REPLACING "SAMPLE"
APP=faugus-launcher
BIN="$APP" #CHANGE THIS IF THE NAME OF THE BINARY IS DIFFERENT FROM "$APP" (for example, the binary of "obs-studio" is "obs")
DEPENDENCES="ca-certificates "
BASICSTUFF="binutils debugedit gzip"
COMPILERS="base-devel"

# CREATE THE APPDIR (DON'T TOUCH THIS)...
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod a+x appimagetool
mkdir $APP.AppDir

# ENTER THE APPDIR
cd $APP.AppDir

# SET APPDIR AS A TEMPORARY $HOME DIRECTORY, THIS WILL DO ALL WORK INTO THE APPDIR
HOME="$(dirname "$(readlink -f $0)")" 

# DOWNLOAD AND INSTALL JUNEST (DON'T TOUCH THIS)
git clone https://github.com/fsquillace/junest.git ~/.local/share/junest
wget -q --show-progress https://github.com/ivan-hc/junest/releases/download/continuous/junest-x86_64.tar.gz
./.local/share/junest/bin/junest setup -i junest-x86_64.tar.gz
rm -f junest-x86_64.tar.gz

# ENABLE MULTILIB (optional)
echo "
[multilib]
Include = /etc/pacman.d/mirrorlist" >> ./.junest/etc/pacman.conf

# ENABLE CHAOTIC-AUR
###./.local/share/junest/bin/junest -- sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
###./.local/share/junest/bin/junest -- sudo pacman-key --lsign-key 3056513887B78AEB
###./.local/share/junest/bin/junest -- sudo pacman-key --populate chaotic
###./.local/share/junest/bin/junest -- sudo pacman --noconfirm -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
###echo "
###[chaotic-aur]
###Include = /etc/pacman.d/chaotic-mirrorlist" >> ./.junest/etc/pacman.conf

# CUSTOM MIRRORLIST, THIS SHOULD SPEEDUP THE INSTALLATION OF THE PACKAGES IN PACMAN (COMMENT EVERYTHING TO USE THE DEFAULT MIRROR)
_custom_mirrorlist(){
    #COUNTRY=$(curl -i ipinfo.io | grep country | cut -c 15- | cut -c -2)
    rm -R ./.junest/etc/pacman.d/mirrorlist
    wget -q https://archlinux.org/mirrorlist/all/ -O - | awk NR==2 RS= | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES WORLDWIDE MIRRORS
    #wget -q https://archlinux.org/mirrorlist/?country="$(echo $COUNTRY)" -O - | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES MIRRORS OF YOUR COUNTY
}
_custom_mirrorlist

# BYPASS SIGNATURE CHECK LEVEL
sed -i 's/#SigLevel/SigLevel/g' ./.junest/etc/pacman.conf
sed -i 's/Required DatabaseOptional/Never/g' ./.junest/etc/pacman.conf

# UPDATE ARCH LINUX IN JUNEST
./.local/share/junest/bin/junest -- sudo pacman -Syy
./.local/share/junest/bin/junest -- sudo pacman --noconfirm -Syu

# INSTALL THE PROGRAM USING YAY
./.local/share/junest/bin/junest -- yay -Syy
./.local/share/junest/bin/junest -- gpg --keyserver keyserver.ubuntu.com --recv-key C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF # UNCOMMENT IF YOU USE THE AUR
./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$BASICSTUFF $COMPILERS")
./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$DEPENDENCES $APP")

# SET THE LOCALE (DON'T TOUCH THIS)
#sed "s/# /#>/g" ./.junest/etc/locale.gen | sed "s/#//g" | sed "s/>/#/g" >> ./locale.gen # UNCOMMENT TO ENABLE ALL THE LANGUAGES
#sed "s/#$(echo $LANG)/$(echo $LANG)/g" ./.junest/etc/locale.gen >> ./locale.gen # ENABLE ONLY YOUR LANGUAGE, COMMENT IF YOU NEED MORE THAN ONE
#rm ./.junest/etc/locale.gen
#mv ./locale.gen ./.junest/etc/locale.gen
rm ./.junest/etc/locale.conf
#echo "LANG=$LANG" >> ./.junest/etc/locale.conf
sed -i 's/LANG=${LANG:-C}/LANG=$LANG/g' ./.junest/etc/profile.d/locale.sh
#./.local/share/junest/bin/junest -- sudo pacman --noconfirm -S glibc gzip
#./.local/share/junest/bin/junest -- sudo locale-gen

# ...ADD THE ICON AND THE DESKTOP FILE AT THE ROOT OF THE APPDIR...
rm -R -f ./*.desktop
LAUNCHER=$(grep -iRl $BIN ./.junest/usr/share/applications/* | grep ".desktop" | head -1)
cp -r "$LAUNCHER" ./
ICON=$(cat $LAUNCHER | grep "Icon=" | cut -c 6-)
cp -r ./.junest/usr/share/icons/hicolor/22x22/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/24x24/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/32x32/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/48x48/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/64x64/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/128x128/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/192x192/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/256x256/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/512x512/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/scalable/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/pixmaps/*$ICON* ./ 2>/dev/null

# TEST IF THE DESKTOP FILE AND THE ICON ARE IN THE ROOT OF THE FUTURE APPIMAGE (./*AppDir/*)
if test -f ./*.desktop; then
    echo "The .desktop file is available in $APP.AppDir/"
else
    if test -f ./.junest/usr/bin/$BIN; then
        echo "No .desktop file available for $APP, creating a new one..."
        cat <<-HEREDOC >> "./$APP.desktop"
        [Desktop Entry]
        Version=1.0
        Type=Application
        Name=NAME
        Comment=
        Exec=BINARY
        Icon=tux
        Categories=Utility;
        Terminal=true
        StartupNotify=true
        HEREDOC
        sed -i "s#BINARY#$BIN#g" ./$APP.desktop
        sed -i "s#Name=NAME#Name=$(echo $APP | tr a-z A-Z)#g" ./$APP.desktop
        wget https://raw.githubusercontent.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/favicon.ico -O ./tux.png
    else
        echo "No binary in path... aborting all the processes."
        exit
    fi
fi

# ...AND FINALLY CREATE THE APPRUN, IE THE MAIN SCRIPT TO RUN THE APPIMAGE!
# EDIT THE FOLLOWING LINES IF YOU THINK SOME ENVIRONMENT VARIABLES ARE MISSING
rm -R -f ./AppRun
cat >> ./AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin
if test -d /media; then
    MNT_MEDIA=' --bind /media /media '
fi
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
BINDS=" $MNT_MEDIA $ETC_RESOLV "
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- $EXEC "$@"
EOF
chmod a+x ./AppRun

# REMOVE "READ-ONLY FILE SYSTEM" ERRORS
sed -i 's#${JUNEST_HOME}/usr/bin/junest_wrapper#${HOME}/.cache/junest_wrapper.old#g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/rm -f "${JUNEST_HOME}${bin_path}_wrappers/#rm -f "${JUNEST_HOME}${bin_path}_wrappers/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/ln/#ln/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's#--bind "$HOME" "$HOME"#--bind /opt /opt --bind /usr/lib/locale /usr/lib/locale --bind /usr/share/fonts /usr/share/fonts --bind /usr/share/themes /usr/share/themes --bind /mnt /mnt --bind /home /home --bind /run/user /run/user#g' .local/share/junest/lib/core/namespace.sh
sed -i 's/rm -f "$file"/test -f "$file"/g' ./.local/share/junest/lib/core/wrappers.sh

# EXIT THE APPDIR
cd ..

# EXTRACT PACKAGE CONTENT
mkdir base
tar fx $(find ./$APP.AppDir -name $APP-[0-9]*zst | head -1) -C ./base/
VERSION=$(cat ./base/.PKGINFO | grep pkgver | cut -c 10- | sed 's@.*:@@')
mkdir deps

ARGS=$(echo "$DEPENDENCES" | tr " " "\n")
for arg in $ARGS; do
    for var in $arg; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
    done
done

DEPS=$(cat ./base/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<")
for arg in $DEPS; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
    done
done

DEPS2=$(cat ./depdeps | uniq)
for arg in $DEPS2; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps2
    done
done

DEPS3=$(cat ./depdeps2 | uniq)
for arg in $DEPS3; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps3
    done
done

DEPS4=$(cat ./depdeps3 | uniq)
for arg in $DEPS4; do
    for var in "$arg"; do
        tar fx $(find ./$APP.AppDir -name $arg-[0-9]*zst) -C ./deps/
        cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps4
    done
done

# REMOVE SOME BLOATWARES
echo Y | rm -R .f ./$APP.AppDir/.cache/yay/*
find ./$APP.AppDir/.junest/usr/share/doc/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL DOCUMENTATION NOT RELATED TO THE APP
find ./$APP.AppDir/.junest/usr/share/locale/*/*/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL ADDITIONAL LOCALE FILES
rm -R -f ./$APP.AppDir/.junest/etc/makepkg.conf
rm -R -f ./$APP.AppDir/.junest/etc/pacman.conf
rm -R -f ./$APP.AppDir/.junest/usr/include #FILES RELATED TO THE COMPILER
rm -R -f ./$APP.AppDir/.junest/usr/man #APPIMAGES ARE NOT MENT TO HAVE MAN COMMAND
rm -R -f ./$APP.AppDir/.junest/var/* #REMOVE ALL PACKAGES DOWNLOADED WITH THE PACKAGE MANAGER

# IN THE NEXT 4 STEPS WE WILL TRY TO LIGHTEN THE FINAL APPIMAGE PACKAGE
# WE WILL MOVE EXCESS CONTENT TO BACKUP FOLDERS (STEP 1)
# THE AFFECTED DIRECTORIES WILL BE /usr/bin (STEP 2), /usr/lib (STEP 3) AND /usr/share (STEP 4)

BINSAVED="certificates SAVEBINSPLEASE" # Enter here keywords to find and save in /usr/bin
SHARESAVED="certificates SAVESHAREPLEASE" # Enter here keywords or file/folder names to save in both /usr/share and /usr/lib
LIBSAVED="pk p11 alsa jack pipewire pulse SAVELIBSPLEASE" # Enter here keywords or file/folder names to save in /usr/lib

# STEP 1, CREATE A BACKUP FOLDER WHERE TO SAVE THE FILES TO BE DISCARDED (USEFUL FOR TESTING PURPOSES)
mkdir -p ./junest-backups/usr/bin
mkdir -p ./junest-backups/usr/lib/dri
mkdir -p ./junest-backups/usr/share

# STEP 2, FUNCTION TO SAVE THE BINARIES IN /usr/bin THAT ARE NEEDED TO MADE JUNEST WORK, PLUS THE MAIN BINARY/BINARIES OF THE APP
# IF YOU NEED TO SAVE MORE BINARIES, LIST THEM IN THE "BINSAVED" VARIABLE. COMMENT THE LINE "_savebins" IF YOU ARE NOT SURE.
_savebins(){
    mkdir save
    mv ./$APP.AppDir/.junest/usr/bin/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/bin/bash ./save/
    mv ./$APP.AppDir/.junest/usr/bin/bwrap ./save/
    mv ./$APP.AppDir/.junest/usr/bin/env ./save/
    mv ./$APP.AppDir/.junest/usr/bin/sh ./save/
    mv ./$APP.AppDir/.junest/usr/bin/tr ./save/
    mv ./$APP.AppDir/.junest/usr/bin/tty ./save/
    for arg in $BINSAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/bin/*"$arg"* ./save/
        done
    done
    mv ./$APP.AppDir/.junest/usr/bin/* ./junest-backups/usr/bin/
    mv ./save/* ./$APP.AppDir/.junest/usr/bin/
    rmdir save
}
_savebins 2> /dev/null

# STEP 3, MOVE UNNECESSARY LIBRARIES TO A BACKUP FOLDER (FOR TESTING PURPOSES)
mkdir save

_binlibs(){
    readelf -d ./$APP.AppDir/.junest/usr/bin/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    mv ./$APP.AppDir/.junest/usr/lib/ld-linux-x86-64.so* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/*$APP* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/libdw* ./save/
    mv ./$APP.AppDir/.junest/usr/lib/libelf* ./save/
    for arg in $SHARESAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
        done
    done
    ARGS=$(tail -n +2 ./list | sort -u | uniq)
    for arg in $ARGS; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/$arg* ./save/
            find ./$APP.AppDir/.junest/usr/lib/ -name $arg -exec cp -r --parents -t save/ {} +
        done 
    done
    rm -R -f $(find ./save/ | sort | grep ".AppDir" | head -1)
    rm list
}

_include_swrast_dri(){
    mkdir ./save/dri
    mv ./$APP.AppDir/.junest/usr/lib/dri/swrast_dri.so ./save/dri/
}

_libkeywords(){
    for arg in $LIBSAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
        done
    done
}

_liblibs(){
    readelf -d ./save/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./save/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./base/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    readelf -d ./deps/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
    ARGS=$(tail -n +2 ./list | sort -u | uniq)
    for arg in $ARGS; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/lib/$arg* ./save/
            find ./$APP.AppDir/.junest/usr/lib/ -name $arg -exec cp -r --parents -t save/ {} +
        done 
    done
    rsync -av ./save/$APP.AppDir/.junest/usr/lib/* ./save/
    rm -R -f $(find ./save/ | sort | grep ".AppDir" | head -1)
    rm list
}

_mvlibs(){
    mv ./$APP.AppDir/.junest/usr/lib/* ./junest-backups/usr/lib/
    mv ./save/* ./$APP.AppDir/.junest/usr/lib/
}

_binlibs 2> /dev/null

#_include_swrast_dri 2> /dev/null

_libkeywords 2> /dev/null

_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null

_mvlibs 2> /dev/null

rmdir save

# STEP 4, SAVE ONLY SOME DIRECTORIES CONTAINED IN /usr/share
# IF YOU NEED TO SAVE MORE FOLDERS, LIST THEM IN THE "SHARESAVED" VARIABLE. COMMENT THE LINE "_saveshare" IF YOU ARE NOT SURE.
_saveshare(){
    mkdir save
    mv ./$APP.AppDir/.junest/usr/share/*$APP* ./save/
    mv ./$APP.AppDir/.junest/usr/share/*$BIN* ./save/
    mv ./$APP.AppDir/.junest/usr/share/fontconfig ./save/
    mv ./$APP.AppDir/.junest/usr/share/glib-* ./save/
    mv ./$APP.AppDir/.junest/usr/share/locale ./save/
    mv ./$APP.AppDir/.junest/usr/share/mime ./save/
    mv ./$APP.AppDir/.junest/usr/share/wayland ./save/
    mv ./$APP.AppDir/.junest/usr/share/X11 ./save/
    for arg in $SHARESAVED; do
        for var in $arg; do
            mv ./$APP.AppDir/.junest/usr/share/*"$arg"* ./save/
        done
    done
    mv ./$APP.AppDir/.junest/usr/share/* ./junest-backups/usr/share/
    mv ./save/* ./$APP.AppDir/.junest/usr/share/
    rmdir save
}
_saveshare 2> /dev/null

# RSYNC THE CONTENT OF THE APP'S PACKAGE
rm -R -f ./base/.*
rsync -av ./base/* ./$APP.AppDir/.junest/

# RSYNC DEPENDENCES
rm -R -f ./deps/.*
rsync -av ./deps/* ./$APP.AppDir/.junest/

# ADDITIONAL REMOVALS
#mv ./$APP.AppDir/.junest/usr/lib/libLLVM-* ./junest-backups/usr/lib/ #INCLUDED IN THE COMPILATION PHASE, CAN SOMETIMES BE EXCLUDED FOR DAILY USE
rm -R -f ./$APP.AppDir/.junest/usr/lib/python*/__pycache__/* #IF PYTHON IS INSTALLED, REMOVING THIS DIRECTORY CAN SAVE SEVERAL MEGABYTES

# REMOVE THE INBUILT HOME
rm -R -f ./$APP.AppDir/.junest/home

# ENABLE MOUNTPOINTS
mkdir -p ./$APP.AppDir/.junest/home
mkdir -p ./$APP.AppDir/.junest/media
mkdir -p ./$APP.AppDir/.junest/usr/lib/locale
mkdir -p ./$APP.AppDir/.junest/usr/share/fonts
mkdir -p ./$APP.AppDir/.junest/usr/share/themes
mkdir -p ./$APP.AppDir/.junest/run/user

# CREATE THE APPIMAGE
ARCH=x86_64 ./appimagetool -n ./$APP.AppDir
mv ./*AppImage ./"$(cat ./$APP.AppDir/*.desktop | grep 'Name=' | head -1 | cut -c 6- | sed 's/ /-/g')"_"$VERSION"-archimage3.2-x86_64.AppImage
ivan-hc commented 6 months ago

This is a video about my workflow.

SPOILER: the AppImage is created but it miss a "gi" module, you can solve this by adding such module by listing the package that brings the related module in "$DEPENDENCES" (and maybe also "python")... or by including it in "$LIBSAVED" as a keyword (maybe just "gi"). You may invsticage about that by yourself.

https://github.com/ivan-hc/ArchImage/assets/88724353/aec182e9-b5ee-4bdf-b95f-c7562153dfe8

ivan-hc commented 6 months ago

I copied your script, put it in a new folder, ran it, same error

I think you miss some dependences on yous system, maybe imagemagic, tar or something... just read the commands executed in the script to be sure.

Faugus commented 6 months ago

@ivan-hc magemagick wasn't installed. I installed it but the same problem persists. Once the Junest download reaches 100%, I get the errors.

ivan-hc commented 6 months ago

Is "tar" installed? It seems that the downloaded archive is not extracted.

Faugus commented 6 months ago

Yes. [faugus@archlinux ~]$ tar --version tar (GNU tar) 1.35 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

ivan-hc commented 6 months ago

Its strange, I've also shared a video above. Have you seen it?

Faugus commented 6 months ago

Yes I saw it. =(

ivan-hc commented 6 months ago

Then, open a terminal and write one by one the commands listed in the script until you reach the error. This is the only thing you can do now.

Faugus commented 6 months ago

I did all the steps in the video. Same error.

[faugus@archlinux ARCHIMAGE]$ ./archimage-cli -v
3.2
[faugus@archlinux ARCHIMAGE]$ ./archimage-cli -b faugus-launcher

---------------------------------------------------------------------------

◆ NAME THE MAIN EXECUTABLE IN "$PATH", OR LEAVE BLANK IF IT IS THE SAME: 

---------------------------------------------------------------------------

◆ ADD (OPTIONAL) DEPENDENCES OR LEAVE BLANK: 

---------------------------------------------------------------------------

◆ Automatic library checking should be more than enough. However...
  DO YOU WANT TO INCLUDE ALL DEPENDENCES? THE PACKAGE MAY BE BLOATED (y,N) y

---------------------------------------------------------------------------

◆ Choose to finish using a standard configuration with the bare minimum or
  continue by customizing the script as much as possible (default).

  The standard configuration includes a package availability check in the
  Arch User Repository (if so, enable AUR and installs "binutils", "gzip"
  and "basedevel", all of them are only required to compile from and will
  not be included in the AppImage package), the AUR is enabled, installs
  "ca-certificates", includes keywords for the internet connections and 
  audio trying to enable them.
  The file "/usr/lib/dri/swrast_dri.so" will NOT be included if not needed.

  Choose "N" or leave blank instead to continue customization (RECOMMENDED).

  DO YOU WISH TO USE A STANDARD CONFIGURATION (y,N)? y

---------------------------------------------------------------------------

 THE SCRIPT IS READY, RUN IT TO CREATE AN APPIMAGE! 

 SUGGESTIONS:

 - from line titled 'REMOVE SOME BLOATWARES', add a list of items to be
   deleted to avoid an excess in the size of the final AppImage archive.

[faugus@archlinux ARCHIMAGE]$ 
[faugus@archlinux tmp]$ /home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh
Cloning into '/home/faugus/ARCHIMAGE/tmp/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 2235 (delta 88), reused 79 (delta 73), pack-reused 2131
Receiving objects: 100% (2235/2235), 514.12 KiB | 2.48 MiB/s, done.
Resolving deltas: 100% (1201/1201), done.
junest-x86_64.tar 100%[============>] 220.95M  48.1MB/s    in 4.9s    
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 24: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 30: ./.junest/etc/pacman.conf: No such file or directory
rm: cannot remove './.junest/etc/pacman.d/mirrorlist': No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 45: ./.junest/etc/pacman.d/mirrorlist: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 55: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 56: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 59: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 60: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 61: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/ARCHIMAGE/tmp/faugus-launcher-junest.sh: line 62: ./.local/share/junest/bin/junest: No such file or directory
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
ivan-hc commented 6 months ago

Have you read my previous comment?

:point_down: :point_down: :point_down:

Then, open a terminal and write one by one the commands listed in the script until you reach the error. This is the only thing you can do now.

:point_up: :point_up: :point_up:

EDIT: This means, open the file of the script with a text editor, copy/paste the lines of the script one by one (except the shebang) and execute the commands until you reach the error.

Faugus commented 6 months ago
[faugus@archlinux tmp2]$ APP=faugus-launcher
BIN="$APP" #CHANGE THIS IF THE NAME OF THE BINARY IS DIFFERENT FROM "$APP" (for example, the binary of "obs-studio" is "obs")
DEPENDENCES="ca-certificates "
BASICSTUFF="binutils debugedit gzip"
COMPILERS="base-devel"
[faugus@archlinux tmp2]$ wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
[faugus@archlinux tmp2]$ chmod a+x appimagetool
mkdir $APP.AppDir
[faugus@archlinux tmp2]$ cd $APP.AppDir
[faugus@archlinux faugus-launcher.AppDir]$ HOME="$(dirname "$(readlink -f $0)")" 
[faugus@archlinux faugus-launcher.AppDir]$ git clone https://github.com/fsquillace/junest.git ~/.local/share/junest
fatal: could not create leading directories of '/usr/bin/.local/share/junest': Permission denied
ivan-hc commented 6 months ago

Is git installed?

Also, have you got these dependences on your system? https://github.com/fsquillace/junest?tab=readme-ov-file#dependencies

Faugus commented 6 months ago

Yes. git bash and coreutils are installed.

ivan-hc commented 6 months ago

I don't know what happens... I suppose you're using Kali Linux or something, but in any case something is broken on your system.

Faugus commented 6 months ago

I'm using Arch Linux.

ivan-hc commented 6 months ago

The step

git clone https://github.com/fsquillace/junest.git ~/.local/share/junest

is part of the official guide of JuNest. If it wont work, you must see why you have no permissions in use git clone

Just do this experiment, repeat all the coomands but replace

git clone https://github.com/fsquillace/junest.git ~/.local/share/junest

with

git clone https://github.com/fsquillace/junest.git $HOME/.local/share/junest
Faugus commented 6 months ago

It worked with quotes

[faugus@archlinux faugus-launcher.AppDir]$ git clone https://github.com/fsquillace/junest.git "~/.local/share/junest"
Cloning into '~/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 2235 (delta 88), reused 79 (delta 73), pack-reused 2131
Receiving objects: 100% (2235/2235), 514.12 KiB | 2.21 MiB/s, done.
Resolving deltas: 100% (1201/1201), done.
Faugus commented 6 months ago

@ivan-hc I reinstalled my system and it still doesn't work. Arch Linux - KDE - Wayland

ivan-hc commented 6 months ago

Its normal that a fresh installation lack of what you had the previous time.

What does not work this time? Be more specific.

Faugus commented 6 months ago

The same problem.

[faugus@archlinux archimage]$ /home/faugus/archimage/faugus-launcher-junest.sh 
Cloning into '/home/faugus/archimage/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 2235 (delta 154), reused 138 (delta 133), pack-reused 2057
Receiving objects: 100% (2235/2235), 520.13 KiB | 10.61 MiB/s, done.
Resolving deltas: 100% (1205/1205), done.
junest-x86_64.tar.gz        100%[=========================================>] 222.03M  49.5MB/s    in 4.6s    
/home/faugus/archimage/faugus-launcher-junest.sh: line 27: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 31: ./.junest/etc/pacman.conf: No such file or directory
rm: cannot remove './.junest/etc/pacman.d/mirrorlist': No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 47: ./.junest/etc/pacman.d/mirrorlist: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
sed: can't read ./.junest/etc/pacman.conf: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 57: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 58: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 67: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 68: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 69: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 70: ./.local/share/junest/bin/junest: No such file or directory
/home/faugus/archimage/faugus-launcher-junest.sh: line 76: rsync: command not found
/home/faugus/archimage/faugus-launcher-junest.sh: line 77: rsync: command not found
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
ivan-hc commented 6 months ago

OK, its always the same point that is broken.

See if changing the line from

git clone https://github.com/fsquillace/junest.git "$HOME/.local/share/junest"

to

git clone https://github.com/fsquillace/junest.git "~/.local/share/junest"

changes something

PS: if previously it worked for you, it wanted work for me anymore... this is why I've done this change.

NOTE: I've done some changes to the script to let you reuse it without installing everything again.

Faugus commented 6 months ago

The script didn't work for me before. I said it worked git clone https://github.com/fsquillace/junest.git "~/.local/share/junest" instead of git clone https://github.com/fsquillace/junest.git ~/.local/share/junest

Faugus commented 6 months ago

image Look how it's installing with git clone https://github.com/fsquillace/junest.git "~/.local/share/junest"

With git clone https://github.com/fsquillace/junest.git "$HOME/.local/share/junest" I get permission denied.

ivan-hc commented 6 months ago

This is the first time that someone have this kind of issue, I've only added the step described in the JuNest repository, nothing more.

I'm looking for a compromise to make it work either way.

Try what I've said before:

git clone https://github.com/fsquillace/junest.git $HOME/.local/share/junest

without quotes

Faugus commented 6 months ago
[faugus@archlinux faugus-launcher.AppDir]$ git clone https://github.com/fsquillace/junest.git $HOME/.local/share/junest
fatal: could not create leading directories of '/usr/bin/.local/share/junest': Permission denied
ivan-hc commented 6 months ago

What if you try to install JuNest directly on your system? Let do a test.

https://github.com/fsquillace/junest?tab=readme-ov-file#installation

Just do

git clone https://github.com/fsquillace/junest.git ~/.local/share/junest

and see what happens.

Faugus commented 6 months ago

It clones.

[faugus@archlinux ~]$ git clone https://github.com/fsquillace/junest.git ~/.local/share/junest
Cloning into '/home/faugus/.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 2235 (delta 154), reused 138 (delta 133), pack-reused 2057
Receiving objects: 100% (2235/2235), 520.13 KiB | 4.64 MiB/s, done.
Resolving deltas: 100% (1205/1205), done.
[faugus@archlinux ~]$ 
ivan-hc commented 6 months ago

This is not normal, you know?

Faugus commented 6 months ago

I've know idea what could be. It's a fresh installation.

ivan-hc commented 6 months ago

Nope, if this wont work now and not before... there is something else.

ivan-hc commented 6 months ago

Try with

git clone https://github.com/fsquillace/junest.git ./.local/share/junest

use a dot instead

Faugus commented 6 months ago

Also works

[faugus@archlinux ~]$ git clone https://github.com/fsquillace/junest.git ./.local/share/junest
Cloning into './.local/share/junest'...
remote: Enumerating objects: 2235, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 2235 (delta 88), reused 79 (delta 73), pack-reused 2131
Receiving objects: 100% (2235/2235), 514.12 KiB | 12.24 MiB/s, done.
Resolving deltas: 100% (1201/1201), done.
ivan-hc commented 6 months ago

change the line into the script

From

git clone https://github.com/fsquillace/junest.git "$HOME/.local/share/junest"

to

git clone https://github.com/fsquillace/junest.git ./.local/share/junest

without quotes.

ivan-hc commented 6 months ago

Like this https://github.com/ivan-hc/ArchImage/commit/3b46d5984ccd5472c42cc4b727f8faae7d9ac1a9

Faugus commented 6 months ago

Now the script ran a lot more, but still didn't work. You're almost there.

  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: faugus-launcher 1.0-4 (Mon Mar 18 04:39:10 2024)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) faugus-launcher-1.0-4

Total Installed Size:  0.04 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                     [####################################] 100%
(1/1) checking package integrity                                   [####################################] 100%
(1/1) loading package files                                        [####################################] 100%
(1/1) checking for file conflicts                                  [####################################] 100%
(1/1) checking available disk space                                [####################################] 100%
:: Processing package changes...
(1/1) installing faugus-launcher                                   [####################################] 100%
/home/faugus/archimage/faugus-launcher-junest.sh: line 78: rsync: command not found
/home/faugus/archimage/faugus-launcher-junest.sh: line 79: rsync: command not found
/home/faugus/archimage/faugus-launcher-junest.sh: line 80: rsync: command not found
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
ivan-hc commented 6 months ago

The first error says

/home/faugus/archimage/faugus-launcher-junest.sh: line 78: rsync: command not found

this means that you must install rsync

https://archlinux.org/packages/extra/x86_64/rsync/

Faugus commented 6 months ago
==> Checking for packaging issues...
==> Creating package "faugus-launcher"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: faugus-launcher 1.0-4 (Mon Mar 18 04:42:59 2024)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) faugus-launcher-1.0-4

Total Installed Size:  0.04 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                     [####################################] 100%
(1/1) checking package integrity                                   [####################################] 100%
(1/1) loading package files                                        [####################################] 100%
(1/1) checking for file conflicts                                  [####################################] 100%
(1/1) checking available disk space                                [####################################] 100%
:: Processing package changes...
(1/1) installing faugus-launcher                                   [####################################] 100%
sending incremental file list
rsync: [sender] change_dir "/home/faugus/archimage/./faugus-launcher.AppDir/.junest" failed: No such file or directory (2)

sent 19 bytes  received 12 bytes  62.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2.7]
sending incremental file list
rsync: [sender] change_dir "/home/faugus/archimage/./faugus-launcher.AppDir/.cache" failed: No such file or directory (2)

sent 19 bytes  received 12 bytes  62.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2.7]
sending incremental file list
share/
share/junest/
share/junest/.gitignore
share/junest/.travis.yml
share/junest/CONTRIBUTING.md
share/junest/LICENSE
share/junest/README.md
share/junest/VERSION
share/junest/.git/
share/junest/.git/HEAD
share/junest/.git/config
share/junest/.git/description
share/junest/.git/index
share/junest/.git/packed-refs
share/junest/.git/branches/
share/junest/.git/hooks/
share/junest/.git/hooks/applypatch-msg.sample
share/junest/.git/hooks/commit-msg.sample
share/junest/.git/hooks/fsmonitor-watchman.sample
share/junest/.git/hooks/post-update.sample
share/junest/.git/hooks/pre-applypatch.sample
share/junest/.git/hooks/pre-commit.sample
share/junest/.git/hooks/pre-merge-commit.sample
share/junest/.git/hooks/pre-push.sample
share/junest/.git/hooks/pre-rebase.sample
share/junest/.git/hooks/pre-receive.sample
share/junest/.git/hooks/prepare-commit-msg.sample
share/junest/.git/hooks/push-to-checkout.sample
share/junest/.git/hooks/sendemail-validate.sample
share/junest/.git/hooks/update.sample
share/junest/.git/info/
share/junest/.git/info/exclude
share/junest/.git/logs/
share/junest/.git/logs/HEAD
share/junest/.git/logs/refs/
share/junest/.git/logs/refs/heads/
share/junest/.git/logs/refs/heads/master
share/junest/.git/logs/refs/remotes/
share/junest/.git/logs/refs/remotes/origin/
share/junest/.git/logs/refs/remotes/origin/HEAD
share/junest/.git/objects/
share/junest/.git/objects/info/
share/junest/.git/objects/pack/
share/junest/.git/objects/pack/pack-0a86983f68f36c57c73d310cb93bcc647ab6e7dd.idx
share/junest/.git/objects/pack/pack-0a86983f68f36c57c73d310cb93bcc647ab6e7dd.pack
share/junest/.git/objects/pack/pack-0a86983f68f36c57c73d310cb93bcc647ab6e7dd.rev
share/junest/.git/refs/
share/junest/.git/refs/heads/
share/junest/.git/refs/heads/master
share/junest/.git/refs/remotes/
share/junest/.git/refs/remotes/origin/
share/junest/.git/refs/remotes/origin/HEAD
share/junest/.git/refs/tags/
share/junest/.github/
share/junest/.github/FUNDING.yml
share/junest/bin/
share/junest/bin/junest
share/junest/bin/sudoj
share/junest/ci/
share/junest/ci/build_image.sh
share/junest/ci/deploy.sh
share/junest/ci/install-bash.sh
share/junest/lib/
share/junest/lib/checks/
share/junest/lib/checks/check.sh
share/junest/lib/checks/check_all.sh
share/junest/lib/core/
share/junest/lib/core/build.sh
share/junest/lib/core/chroot.sh
share/junest/lib/core/common.sh
share/junest/lib/core/namespace.sh
share/junest/lib/core/proot.sh
share/junest/lib/core/setup.sh
share/junest/lib/core/wrappers.sh
share/junest/lib/utils/
share/junest/lib/utils/utils.sh
share/junest/tests/
share/junest/tests/checkstyle/
share/junest/tests/checkstyle/checkstyle.sh
share/junest/tests/unit-tests/
share/junest/tests/unit-tests/test-chroot.sh
share/junest/tests/unit-tests/test-common.sh
share/junest/tests/unit-tests/test-junest.sh
share/junest/tests/unit-tests/test-namespace.sh
share/junest/tests/unit-tests/test-proot.sh
share/junest/tests/unit-tests/test-setup.sh
share/junest/tests/unit-tests/test-utils.sh
share/junest/tests/unit-tests/test-wrappers.sh
share/junest/tests/unit-tests/unit-tests.sh
share/junest/tests/utils/
share/junest/tests/utils/shunit2
share/junest/tests/utils/utils.sh

sent 850,734 bytes  received 1,342 bytes  1,704,152.00 bytes/sec
total size is 845,353  speedup is 0.99
rm: cannot remove './.junest/etc/locale.conf': No such file or directory
sed: can't read ./.junest/etc/profile.d/locale.sh: No such file or directory
grep: ./.junest/usr/share/applications/*: No such file or directory
cp: cannot stat '': No such file or directory
^C
[faugus@archlinux archimage]$ 
ivan-hc commented 6 months ago

You shoulr remove the content of the directory again, since there is no backup-related directory

ivan-hc commented 6 months ago

In real time

https://github.com/ivan-hc/ArchImage/assets/88724353/4035630d-f915-4107-b4cb-445dc8d9f5b1

Faugus commented 6 months ago

I'm removing everytime I'm running the script.

Faugus commented 6 months ago

https://github.com/ivan-hc/ArchImage/assets/112667550/9db3bfb5-653e-4b97-afe9-6c59f812c9d9

Looks like the video won't play for some reason. Here's my Google Drive link: https://drive.google.com/file/d/1XJAthmwUWf0gGRaFKGRVp_BZw6uXqEhZ/view?usp=sharing

ivan-hc commented 6 months ago

I've seen the error

rsync: [sender] change_dir "/home/faugus/archimage/./faugus-launcher.AppDir/.junest" failed: No such file or directory (2)

it seems to be common while using containers (since JuNest is a container), see https://www.google.com/search?q=%22rsync%3A+%5Bsender%5D+change_dir%22&client=firefox-b-d&sca_esv=94e5231ad7b8805c&sca_upv=1&ei=GMn3Zc61I9usi-gPiamH2As&ved=0ahUKEwjOoe3Bgv2EAxVb1gIHHYnUAbsQ4dUDCBA&uact=5&oq=%22rsync%3A+%5Bsender%5D+change_dir%22&gs_lp=Egxnd3Mtd2l6LXNlcnAiHCJyc3luYzogW3NlbmRlcl0gY2hhbmdlX2RpciIyBxAAGIAEGBMyBxAAGIAEGBMyBhAAGB4YEzIGEAAYHhgTMgYQABgeGBMyBhAAGB4YE0jQlglQmf0IWLGUCXADeAGQAQCYAZEBoAHhAaoBAzEuMbgBA8gBAPgBAZgCBaAC9QHCAgoQABhHGNYEGLADwgIIEAAYFhgeGBOYAwCIBgGQBgiSBwM0LjGgB-YK&sclient=gws-wiz-serp

Also, why you drag/drop the script in the terminal if your terminal is already opened in that directory? Just

./jour-script.sh

However, try to solve the issues when you read error messages like these. Also see some pages from the google search in the url above.

ivan-hc commented 6 months ago

Being I so curious... I've executed my script in the WRONG way, the same as you. That's WRONG!

You must NOT drag/drop the script!

From the video I can see that your file manager have the option to open a terminal into a directory.

If you does not had it, just use the cd command until that directory and then run the script like this

./faugus-launcher-junest.sh

this is the basics.

Faugus commented 6 months ago

It worked now. Thank you.