Merge pull request #4215 from termux/new-sockets-dir

Use $PREFIX/var/tmp instead of $TMPDIR for sockets
This commit is contained in:
Henrik Grimler 2019-08-25 20:06:47 +02:00 committed by GitHub
commit c695a6b45c
7 changed files with 32 additions and 10 deletions

View File

@ -2,12 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/emacs/
TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=26.2
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=151ce69dbe5b809d4492ffae4a4b153b2778459de6deb26f35691e1281a9c58e
TERMUX_PKG_DEPENDS="ncurses, gnutls, libxml2"
TERMUX_PKG_BREAKS="emacs-dev"
TERMUX_PKG_REPLACES="emacs-dev"
TERMUX_PKG_CONFFILES="var/service/emacsd/run var/service/emacsd/log/run"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-autodepend
--with-gif=no
@ -83,6 +84,17 @@ termux_step_post_configure() {
termux_step_post_make_install() {
cp $TERMUX_PKG_BUILDER_DIR/site-init.el $TERMUX_PREFIX/share/emacs/${TERMUX_PKG_VERSION}/lisp/emacs-lisp/
# Setup emacs --daemon service script
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p emacsd/log
echo "#!$TERMUX_PREFIX/bin/sh" > emacsd/run
echo 'exec emacs --fg-daemon 2>&1' >> emacsd/run
chmod +x emacsd/run
touch emacsd/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger emacsd/log/run
}
termux_step_create_debscripts() {

View File

@ -6,7 +6,7 @@ diff -u -r ../emacs-25.0.92/lisp/server.el ./lisp/server.el
(defvar server-socket-dir
(and (featurep 'make-network-process '(:family local))
- (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid)))
+ (format "%s/emacs%d" (or (getenv "TMPDIR") "@TERMUX_PREFIX@/tmp") (user-uid)))
+ (format "%s/emacs%d" "@TERMUX_PREFIX@/var/run" (user-uid)))
"The directory in which to place the server socket.
If local sockets are not supported, this is nil.")

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.musicpd.org
TERMUX_PKG_DESCRIPTION="Music player daemon"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.21.13
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=0c71ff34aa4def30cd931977cbfe3deb6ec815a726b8c5343f1b8e5707136ebf
TERMUX_PKG_DEPENDS="libc++, libcurl, libid3tag, libopus, libpulseaudio, libmpdclient, openal-soft, libvorbis, libsqlite, ffmpeg, libmp3lame, libbz2, libogg, libnfs, zlib"

View File

@ -69,7 +69,7 @@ diff -u -r ../MPD-0.21.3/doc/mpdconf.example ./doc/mpdconf.example
#
# And for Unix Socket
-#bind_to_address "~/.mpd/socket"
+bind_to_address "@TERMUX_PREFIX@/tmp/mpd.socket"
+bind_to_address "@TERMUX_PREFIX@/var/run/mpd.socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
-# to.
@ -191,7 +191,7 @@ diff -u -r ../MPD-0.21.3/doc/mpdconf.example ./doc/mpdconf.example
+audio_output {
+ type "fifo"
+ name "ncmpcpp visualizer"
+ path "~/../usr/tmp/mpd.fifo"
+ path "@TERMUX_PREFIX@/var/run/mpd.fifo"
+ format "44100:16:2"
+ enabled "no"
+}

View File

@ -1,7 +1,6 @@
diff -u -r ../MPD-0.21.3/src/fs/io/FileOutputStream.hxx ./src/fs/io/FileOutputStream.hxx
--- ../MPD-0.21.3/src/fs/io/FileOutputStream.hxx 2018-11-16 12:27:58.000000000 +0000
+++ ./src/fs/io/FileOutputStream.hxx 2018-12-31 01:08:58.577798371 +0000
@@ -46,7 +46,7 @@
--- ../FileOutputStream.hxx.orig 2019-08-24 20:56:41.969642005 +0200
+++ ./src/fs/io/FileOutputStream.hxx 2019-08-12 21:47:53.854420002 +0200
@@ -45,7 +45,7 @@
#include <windows.h>
#endif

View File

@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="BSD"
# Link against libandroid-support for wcwidth(), see https://github.com/termux/termux-packages/issues/224
TERMUX_PKG_DEPENDS="ncurses, libevent, libandroid-support, libandroid-glob"
TERMUX_PKG_VERSION=2.9a
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/tmux/tmux/releases/download/${TERMUX_PKG_VERSION}/tmux-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-static"

View File

@ -0,0 +1,11 @@
--- ../tmux.c.orig 2019-08-24 20:23:15.576000965 +0200
+++ ./tmux.c 2019-08-24 22:11:56.316981911 +0200
@@ -121,7 +121,7 @@
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
xasprintf(&base, "%s/tmux-%ld", s, (long)uid);
else
- xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid);
+ xasprintf(&base, "%s/tmux-%ld", "@TERMUX_PREFIX@/var/run", (long)uid);
if (realpath(base, resolved) == NULL &&
strlcpy(resolved, base, sizeof resolved) >= sizeof resolved) {
errno = ERANGE;