Browse Source

util-linux: Fixes, update 2.28 to 2.29.1

android-5
Fredrik Fornwall 8 years ago
parent
commit
ef395df35c
  1. 35
      disabled-packages/util-linux/build.sh
  2. 22
      disabled-packages/util-linux/sys-utils-ipcutils.c.patch
  3. 30
      disabled-packages/util-linux/text-utils-pg.c.patch

35
disabled-packages/util-linux/build.sh

@ -1,11 +1,30 @@
TERMUX_PKG_HOMEPAGE=https://en.wikipedia.org/wiki/Util-linux TERMUX_PKG_HOMEPAGE=https://en.wikipedia.org/wiki/Util-linux
TERMUX_PKG_DESCRIPTION="Miscellaneous system utilities" TERMUX_PKG_DESCRIPTION="Miscellaneous system utilities"
TERMUX_PKG_VERSION=2.28 TERMUX_PKG_VERSION=2.29.1
TERMUX_PKG_SRCURL=https://www.kernel.org/pub/linux/utils/util-linux/v${TERMUX_PKG_VERSION}/util-linux-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SRCURL=https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-${TERMUX_PKG_VERSION}.tar.xz
#TERMUX_PKG_DEPENDS="pcre, openssl, libuuid, libandroid-support" TERMUX_PKG_SHA256=0ce40600b934ec2fecfa6bfc4efe6982d051ba96c2832b05201347aec582f54f
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-last --disable-ipcrm --disable-ipcs" TERMUX_PKG_DEPENDS="ncurses, libutil"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-eject --disable-switch_root --disable-pivot_root" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-logger --disable-agetty --disable-kill" ac_cv_func_setns=yes
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-wall" ac_cv_func_unshare=yes
--disable-agetty
--disable-eject
--disable-ipcrm
--disable-ipcs
--disable-kill
--disable-last
--disable-libuuid
--disable-logger
--disable-pivot_root
--disable-switch_root
--disable-wall
"
# bin/column is currently bundled in the fish package:
TERMUX_PKG_RM_AFTER_INSTALL="bin/column share/man/man1/column.1"
CPPFLAGS+=" -DMAXNAMLEN=NAME_MAX" termux_step_pre_configure() {
if [ $TERMUX_ARCH_BITS = 64 ]; then
# prlimit() is only available in 64-bit bionic.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_prlimit=yes"
fi
}

22
disabled-packages/util-linux/sys-utils-ipcutils.c.patch

@ -1,11 +1,8 @@
diff -u -r ../util-linux-2.28/sys-utils/ipcutils.c ./sys-utils/ipcutils.c diff -u -r ../util-linux-2.29.1/sys-utils/ipcutils.c ./sys-utils/ipcutils.c
--- ../util-linux-2.28/sys-utils/ipcutils.c 2016-04-04 04:29:50.698566374 -0400 --- ../util-linux-2.29.1/sys-utils/ipcutils.c 2016-11-02 13:57:31.661167155 +0100
+++ ./sys-utils/ipcutils.c 2016-06-23 06:20:15.952794444 -0400 +++ ./sys-utils/ipcutils.c 2017-02-01 23:01:22.043207759 +0100
@@ -15,516 +15,63 @@ @@ -18,513 +18,56 @@
# define SHMMIN 1 /* min shared segment size in bytes */
#endif
-
int ipc_msg_get_limits(struct ipc_limits *lim) int ipc_msg_get_limits(struct ipc_limits *lim)
{ {
- if (path_exist(_PATH_PROC_IPC_MSGMNI) && - if (path_exist(_PATH_PROC_IPC_MSGMNI) &&
@ -129,7 +126,7 @@ diff -u -r ../util-linux-2.28/sys-utils/ipcutils.c ./sys-utils/ipcutils.c
- &p->shm_ctim, - &p->shm_ctim,
- &p->shm_rss, - &p->shm_rss,
- &p->shm_swp) < 14) - &p->shm_swp) < 14)
- continue; /* ivalid line, skipped */ - continue; /* invalid line, skipped */
- -
- if (id > -1) { - if (id > -1) {
- /* ID specified */ - /* ID specified */
@ -204,11 +201,10 @@ diff -u -r ../util-linux-2.28/sys-utils/ipcutils.c ./sys-utils/ipcutils.c
- free(shmds); - free(shmds);
- shmds = next; - shmds = next;
- } - }
+ return; -}
} -
-static void get_sem_elements(struct sem_data *p)
static void get_sem_elements(struct sem_data *p) -{
{
- size_t i; - size_t i;
- -
- if (!p || !p->sem_nsems || p->sem_perm.id < 0) - if (!p || !p->sem_nsems || p->sem_perm.id < 0)

30
disabled-packages/util-linux/text-utils-pg.c.patch

@ -1,30 +0,0 @@
diff -u -r ../util-linux-2.28/text-utils/pg.c ./text-utils/pg.c
--- ../util-linux-2.28/text-utils/pg.c 2016-03-07 09:30:07.447866602 -0500
+++ ./text-utils/pg.c 2016-06-22 06:41:16.800629484 -0400
@@ -46,7 +46,7 @@
#ifndef TIOCGWINSZ
# include <sys/ioctl.h>
#endif
-#include <sys/termios.h>
+#include <termios.h>
#include <fcntl.h>
#include <regex.h>
#include <stdio.h>
@@ -74,7 +74,7 @@
#include "closestream.h"
#include "strutils.h"
-#define READBUF LINE_MAX /* size of input buffer */
+#define READBUF _POSIX2_LINE_MAX /* size of input buffer */
#define CMDBUF 255 /* size of command buffer */
#define TABSIZE 8 /* spaces consumed by tab character */
@@ -608,7 +608,7 @@
char key;
int state = COUNT;
int escape = 0;
- char b[LINE_MAX], *p;
+ char b[_POSIX2_LINE_MAX], *p;
if (pageno != -1) {
if ((p = strstr(pstring, "%d")) == NULL) {
Loading…
Cancel
Save