aboutsummaryrefslogtreecommitdiff
path: root/misc/yubioath-desktop
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-20 15:34:38 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-07-27 08:16:19 +0700
commitabfda5efc8b34cd50d66e6454a06b4223307a754 (patch)
tree1c9de60a8c1c5752ae16d90df9830ec5a0379f59 /misc/yubioath-desktop
parent27dc338dd1f7b47848ce9fc0ede19c50a345659b (diff)
misc/yubioath-desktop: Do not write to $CWD.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/yubioath-desktop')
-rw-r--r--misc/yubioath-desktop/yubioath-desktop.SlackBuild26
1 files changed, 16 insertions, 10 deletions
diff --git a/misc/yubioath-desktop/yubioath-desktop.SlackBuild b/misc/yubioath-desktop/yubioath-desktop.SlackBuild
index 0ab3dc8cf04e3..361eb27ab6be0 100644
--- a/misc/yubioath-desktop/yubioath-desktop.SlackBuild
+++ b/misc/yubioath-desktop/yubioath-desktop.SlackBuild
@@ -22,6 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20240720 bkw: Modified by SlackBuilds.org:
+# Do not write to $CWD. Not only was there a chmod +x, but mounting
+# the file loopback without "-o ro" was updating its timestamp.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=yubioath-desktop
@@ -68,28 +72,30 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-# Make the Appimage executable
-chmod 755 $CWD/$PRGNAM-$VERSION-linux.AppImage
+mkdir -p $PRGNAM-$VERSION/mnt
+cd $PRGNAM-$VERSION
+cp $CWD/$PRGNAM-$VERSION-linux.AppImage .
+chmod +x $PRGNAM-$VERSION-linux.AppImage
# Get appimage mount offset
-MOUNT_OFFSET=$( $CWD/$PRGNAM-$VERSION-linux.AppImage --appimage-offset )
+MOUNT_OFFSET=$( ./$PRGNAM-$VERSION-linux.AppImage --appimage-offset )
# Mount the appimage so we can extract the .desktop and icon files.
-mkdir $PRGNAM-$VERSION
-mount -o loop -o offset=$MOUNT_OFFSET $CWD/$PRGNAM-$VERSION-linux.AppImage $TMP/$PRGNAM-$VERSION
+mount -o ro,loop -o offset=$MOUNT_OFFSET $CWD/$PRGNAM-$VERSION-linux.AppImage $TMP/$PRGNAM-$VERSION/mnt
# Add .desktop and icon to KDE/XFCE-menus
mkdir -p $PKG/usr/share/applications/ $PKG/usr/share/pixmaps/
-cp $PRGNAM-$VERSION/com.yubico.yubioath.desktop ${PKG}/usr/share/applications/${PRGNAM}.desktop
-cp $PRGNAM-$VERSION/com.yubico.yubioath.svg ${PKG}/usr/share/pixmaps/com.yubico.yubioath.svg
+cp mnt/com.yubico.yubioath.desktop ${PKG}/usr/share/applications/${PRGNAM}.desktop
+cp mnt/com.yubico.yubioath.svg ${PKG}/usr/share/pixmaps/com.yubico.yubioath.svg
# Unmount appimage
-umount $TMP/$PRGNAM-$VERSION
-rmdir $TMP/$PRGNAM-$VERSION
+umount mnt
+cd $TMP
+rm -rf $TMP/$PRGNAM-$VERSION
# Copy appimage to package-location
mkdir -p $PKG/usr/bin/
-cp $CWD/$PRGNAM-$VERSION-linux.AppImage $PKG/usr/bin/$PRGNAM
+install -m0755 -oroot -groot $CWD/$PRGNAM-$VERSION-linux.AppImage $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc