summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/ksh_openbsd-20180115.local.patch63
-rw-r--r--patches/libbsd-0.9.1.local.patch320
-rw-r--r--vars/build.vars14
3 files changed, 2 insertions, 395 deletions
diff --git a/patches/ksh_openbsd-20180115.local.patch b/patches/ksh_openbsd-20180115.local.patch
deleted file mode 100644
index 63430646..00000000
--- a/patches/ksh_openbsd-20180115.local.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -ru ksh-openbsd-20180115.orig/history.c ksh-openbsd-20180115/history.c
---- ksh-openbsd-20180115.orig/history.c 2018-01-15 23:04:15.000000000 +0100
-+++ ksh-openbsd-20180115/history.c 2018-04-14 15:31:50.346308024 +0200
-@@ -28,6 +28,10 @@
- #include "vis.h"
- #include "sh.h"
-
-+#ifndef F_EXLCK
-+#define F_EXLCK 4
-+#endif
-+
- #define timespeccmp(tsp, usp, cmp) \
- (((tsp)->tv_sec == (usp)->tv_sec) ? \
- ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
-diff -ru ksh-openbsd-20180115.orig/Makefile ksh-openbsd-20180115/Makefile
---- ksh-openbsd-20180115.orig/Makefile 2018-01-15 23:04:15.000000000 +0100
-+++ ksh-openbsd-20180115/Makefile 2018-04-14 16:03:43.040414391 +0200
-@@ -22,12 +22,12 @@
- CDIAGFLAGS+= -Wshadow
- CDIAGFLAGS+= -Wdeclaration-after-statement
-
--CFLAGS += $(CDIAGFLAGS) `getconf LFS_CFLAGS` -DEMACS -DVI
-+CFLAGS += $(CDIAGFLAGS) `getconf LFS_CFLAGS` -D_GNU_SOURCE -DEMACS -DVI
- LDADD += -lbsd
-
- $(PROG): $(OBJS)
-- $(CC) -o $(PROG) $(CFLAGS) $(LDADD) \
-- $(OBJS)
-+ $(CC) -o $(PROG) $(CFLAGS) \
-+ $(OBJS) $(LDADD)
-
- all: $(PROG)
-
-@@ -37,7 +37,7 @@
-
- install:
- install -m755 -d $(BINDIR)
-- install -m755 --strip --no-target-directory ksh $(BINDIR)/pdksh
-+ install -m755 --no-target-directory ksh $(BINDIR)/pdksh
- install -m755 -d $(MANDIR)/man1
- install -m644 --no-target-directory ksh.1 $(MANDIR)/man1/pdksh.1
- install -m644 --no-target-directory sh.1 $(MANDIR)/man1/pdksh-sh.1
-diff -ru ksh-openbsd-20180115.orig/vis.c ksh-openbsd-20180115/vis.c
---- ksh-openbsd-20180115.orig/vis.c 2018-01-15 23:04:15.000000000 +0100
-+++ ksh-openbsd-20180115/vis.c 2018-04-14 15:38:41.605684906 +0200
-@@ -139,7 +139,7 @@
- *dst = '\0';
- return (dst);
- }
--DEF_WEAK(vis);
-+//DEF_WEAK(vis);
-
- /*
- * strvis, strnvis, strvisx - visually encode characters from src into dst
-@@ -165,7 +165,7 @@
- *dst = '\0';
- return (dst - start);
- }
--DEF_WEAK(strvis);
-+//DEF_WEAK(strvis);
-
- int
- strnvis(char *dst, const char *src, size_t siz, int flag)
diff --git a/patches/libbsd-0.9.1.local.patch b/patches/libbsd-0.9.1.local.patch
deleted file mode 100644
index 9de2d3fd..00000000
--- a/patches/libbsd-0.9.1.local.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-diff -Nru libbsd-0.9.1.orig/include/bsd/sys/cdefs.h libbsd-0.9.1/include/bsd/sys/cdefs.h
---- libbsd-0.9.1.orig/include/bsd/sys/cdefs.h 2018-05-22 15:56:14.000000000 +0200
-+++ libbsd-0.9.1/include/bsd/sys/cdefs.h 2018-05-30 15:27:07.067975364 +0200
-@@ -93,7 +93,7 @@
- #define LIBBSD_DEPRECATED(x)
- #endif
-
--#if LIBBSD_GCC_VERSION >= 0x0200
-+#if 0
- #define LIBBSD_REDIRECT(name, proto, alias) name proto __asm__(LIBBSD_ASMNAME(#alias))
- #endif
- #define LIBBSD_ASMNAME(cname) LIBBSD_ASMNAME_PREFIX(__USER_LABEL_PREFIX__, cname)
-diff -Nru libbsd-0.9.1.orig/include/bsd/vis.h libbsd-0.9.1/include/bsd/vis.h
---- libbsd-0.9.1.orig/include/bsd/vis.h 2018-05-22 16:07:42.000000000 +0200
-+++ libbsd-0.9.1/include/bsd/vis.h 2018-05-30 15:37:23.466013504 +0200
-@@ -113,14 +113,9 @@
-
- int strvis(char *, const char *, int);
- int stravis(char **, const char *, int);
--#ifdef LIBBSD_NETBSD_VIS
--/* NetBSD prototype. */
--int LIBBSD_REDIRECT(strnvis, (char *, size_t, const char *, int),
-- strnvis_netbsd);
--#else
--/* OpenBSD prototype (current default). */
--int strnvis(char *, const char *, size_t, int);
--#endif
-+
-+/* NetBSD prototype */
-+int strnvis(char *, size_t, const char *, int);
-
- int strsvis(char *, const char *, int, const char *);
- int strsnvis(char *, size_t, const char *, int, const char *);
-@@ -135,14 +130,9 @@
- int *);
-
- int strunvis(char *, const char *);
--#ifdef LIBBSD_NETBSD_VIS
--/* NetBSD prototype. */
--int LIBBSD_REDIRECT(strnunvis, (char *, size_t, const char *),
-- strnunvis_netbsd);
--#else
--/* OpenBSD prototype (current default). */
--ssize_t strnunvis(char *, const char *, size_t);
--#endif
-+
-+/* NetBSD prototype */
-+int strnunvis(char *, size_t, const char *);
-
- int strunvisx(char *, const char *, int);
- int strnunvisx(char *, size_t, const char *, int);
-diff -Nru libbsd-0.9.1.orig/src/flopen.c libbsd-0.9.1/src/flopen.c
---- libbsd-0.9.1.orig/src/flopen.c 2018-05-21 04:33:33.000000000 +0200
-+++ libbsd-0.9.1/src/flopen.c 2018-05-30 15:09:48.789934331 +0200
-@@ -32,6 +32,7 @@
- #include <sys/stat.h>
-
- #include <errno.h>
-+#include <fcntl.h>
- #include <stdarg.h>
- #include <unistd.h>
-
-diff -Nru libbsd-0.9.1.orig/src/getentropy.c libbsd-0.9.1/src/getentropy.c
---- libbsd-0.9.1.orig/src/getentropy.c 2018-05-21 04:48:37.000000000 +0200
-+++ libbsd-0.9.1/src/getentropy.c 2018-05-30 15:44:15.596626881 +0200
-@@ -26,6 +26,8 @@
-
- #if defined(__linux__)
- #include "getentropy_linux.c"
-+#elif defined(__midipix__)
-+#include "getentropy_midipix.c"
- #elif defined(__GNU__)
- #include "getentropy_hurd.c"
- #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-diff -Nru libbsd-0.9.1.orig/src/getentropy_midipix.c libbsd-0.9.1/src/getentropy_midipix.c
---- libbsd-0.9.1.orig/src/getentropy_midipix.c 1970-01-01 01:00:00.000000000 +0100
-+++ libbsd-0.9.1/src/getentropy_midipix.c 2018-05-30 15:43:30.744779217 +0200
-@@ -0,0 +1,153 @@
-+/* $OpenBSD: getentropy_linux.c,v 1.45 2018/03/13 22:53:28 bcook Exp $ */
-+
-+/*
-+ * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
-+ * Copyright (c) 2014 Bob Beck <beck@obtuse.com>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ * Emulation of getentropy(2) as documented at:
-+ * http://man.openbsd.org/getentropy.2
-+ */
-+
-+#define _POSIX_C_SOURCE 199309L
-+#define _GNU_SOURCE 1
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/ioctl.h>
-+#include <sys/resource.h>
-+#include <sys/syscall.h>
-+#include <sys/statvfs.h>
-+#include <sys/socket.h>
-+#include <sys/mount.h>
-+#include <sys/mman.h>
-+#include <sys/stat.h>
-+#include <sys/time.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <stdio.h>
-+#include <link.h>
-+#include <termios.h>
-+#include <fcntl.h>
-+#include <signal.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <time.h>
-+
-+#include "hash/sha512.h"
-+
-+#ifdef HAVE_GETAUXVAL
-+#include <sys/auxv.h>
-+#endif
-+#include <sys/vfs.h>
-+
-+int getentropy(void *buf, size_t len);
-+
-+static int gotdata(char *buf, size_t len);
-+
-+static int getentropy_urandom(void *buf, size_t len);
-+
-+int
-+getentropy(void *buf, size_t len)
-+{
-+ int ret = -1;
-+
-+ if (len > 256) {
-+ errno = EIO;
-+ return (-1);
-+ }
-+
-+ /*
-+ * Try to get entropy with /dev/urandom
-+ *
-+ * This can fail if the process is inside a chroot or if file
-+ * descriptors are exhausted.
-+ */
-+ ret = getentropy_urandom(buf, len);
-+ if (ret != -1)
-+ return (ret);
-+
-+ errno = EIO;
-+ return (ret);
-+}
-+
-+/*
-+ * Basic sanity checking; wish we could do better.
-+ */
-+static int
-+gotdata(char *buf, size_t len)
-+{
-+ char any_set = 0;
-+ size_t i;
-+
-+ for (i = 0; i < len; ++i)
-+ any_set |= buf[i];
-+ if (any_set == 0)
-+ return (-1);
-+ return (0);
-+}
-+
-+static int
-+getentropy_urandom(void *buf, size_t len)
-+{
-+ struct stat st;
-+ size_t i;
-+ int fd, cnt, flags;
-+ int save_errno = errno;
-+
-+start:
-+
-+ flags = O_RDONLY;
-+#ifdef O_NOFOLLOW
-+ flags |= O_NOFOLLOW;
-+#endif
-+#ifdef O_CLOEXEC
-+ flags |= O_CLOEXEC;
-+#endif
-+ fd = open("/dev/urandom", flags, 0);
-+ if (fd == -1) {
-+ if (errno == EINTR)
-+ goto start;
-+ goto nodevrandom;
-+ }
-+#ifndef O_CLOEXEC
-+ fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
-+#endif
-+
-+ /* Lightly verify that the device node looks sane */
-+ if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode)) {
-+ close(fd);
-+ goto nodevrandom;
-+ }
-+ for (i = 0; i < len; ) {
-+ size_t wanted = len - i;
-+ ssize_t ret = read(fd, (char *)buf + i, wanted);
-+
-+ if (ret == -1) {
-+ if (errno == EAGAIN || errno == EINTR)
-+ continue;
-+ close(fd);
-+ goto nodevrandom;
-+ }
-+ i += ret;
-+ }
-+ close(fd);
-+ if (gotdata(buf, len) == 0) {
-+ errno = save_errno;
-+ return (0); /* satisfied */
-+ }
-+nodevrandom:
-+ errno = EIO;
-+ return (-1);
-+}
-diff -Nru libbsd-0.9.1.orig/src/getpeereid.c libbsd-0.9.1/src/getpeereid.c
---- libbsd-0.9.1.orig/src/getpeereid.c 2017-06-06 04:06:45.000000000 +0200
-+++ libbsd-0.9.1/src/getpeereid.c 2018-05-30 15:10:23.777937764 +0200
-@@ -40,7 +40,7 @@
- getpeereid(int s, uid_t *euid, gid_t *egid)
- {
- /* XXX: This should be autodetected at build time instead. */
--#if defined(__linux__)
-+#if defined(__linux__) || defined(__midipix__)
- struct ucred cred;
- #elif defined(__OpenBSD__)
- struct sockpeercred cred;
-diff -Nru libbsd-0.9.1.orig/src/setproctitle.c libbsd-0.9.1/src/setproctitle.c
---- libbsd-0.9.1.orig/src/setproctitle.c 2018-04-21 23:30:22.000000000 +0200
-+++ libbsd-0.9.1/src/setproctitle.c 2018-05-30 15:13:25.245835004 +0200
-@@ -221,8 +221,13 @@
- #define SPT_MAXTITLE 255
- #endif
-
-+#ifdef __midipix__
-+void
-+setproctitle(const char *fmt, ...)
-+#else
- void
- setproctitle_impl(const char *fmt, ...)
-+#endif
- {
- /* Use buffer in case argv[0] is passed. */
- char buf[SPT_MAXTITLE + 1];
-@@ -280,6 +285,7 @@
- *++nul = '\0';
- }
- }
-+#ifndef __midipix__
- __asm__(".symver setproctitle_impl,setproctitle@@LIBBSD_0.5");
-
- /* The original function introduced in 0.2 was a stub, it only got implemented
-@@ -293,3 +299,4 @@
- __attribute__((alias("setproctitle_impl")));
- #endif
- __asm__(".symver setproctitle_stub,setproctitle@LIBBSD_0.2");
-+#endif /* !__midipix__ */
-diff -Nru libbsd-0.9.1.orig/src/unvis.c libbsd-0.9.1/src/unvis.c
---- libbsd-0.9.1.orig/src/unvis.c 2018-05-22 16:07:42.000000000 +0200
-+++ libbsd-0.9.1/src/unvis.c 2018-05-30 15:20:12.613101869 +0200
-@@ -560,6 +560,8 @@
- * OpenBSD, 2001: strnunvis(char *dst, const char *src, size_t dlen);
- * NetBSD: 2012, strnunvis(char *dst, size_t dlen, const char *src);
- */
-+#ifndef __midipix__ /* Temporary fix until upstream resolves this in a later version, */
-+ /* do not upstream */
- ssize_t
- strnunvis_openbsd(char *dst, const char *src, size_t dlen)
- {
-@@ -573,3 +575,9 @@
- return strnunvisx(dst, dlen, src, 0);
- }
- __asm__(".symver strnunvis_netbsd,strnunvis@LIBBSD_0.9.1");
-+#else
-+int strnunvis(char *dst, size_t dlen, const char *src)
-+{
-+ return strnunvisx(dst, dlen, src, 0);
-+}
-+#endif /* __midipix__ */
-diff -Nru libbsd-0.9.1.orig/src/vis.c libbsd-0.9.1/src/vis.c
---- libbsd-0.9.1.orig/src/vis.c 2018-05-22 16:07:42.000000000 +0200
-+++ libbsd-0.9.1/src/vis.c 2018-05-30 15:34:26.362596310 +0200
-@@ -718,6 +718,7 @@
- * OpenBSD, 2001: strnvis(char *dst, const char *src, size_t dlen, int flag);
- * NetBSD: 2012, strnvis(char *dst, size_t dlen, const char *src, int flag);
- */
-+#ifndef __midipix__ /* see src/unvis.c */
- int
- strnvis_openbsd(char *mbdst, const char *mbsrc, size_t dlen, int flags)
- {
-@@ -731,6 +732,13 @@
- return istrsenvisxl(&mbdst, &dlen, mbsrc, flags, "", NULL);
- }
- __asm__(".symver strnvis_netbsd,strnvis@LIBBSD_0.9.1");
-+#else
-+int
-+strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags)
-+{
-+ return istrsenvisxl(&mbdst, &dlen, mbsrc, flags, "", NULL);
-+}
-+#endif
-
- int
- stravis(char **mbdstp, const char *mbsrc, int flags)
diff --git a/vars/build.vars b/vars/build.vars
index 9862d177..3bb95644 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -705,7 +705,7 @@ NATIVE_PACKAGES_DEPS_PACKAGES="
libasr libatomic_ops bdwgc clzip expat libxml2 alsa_lib apr apr_util bzip2
libdmtx libressl libnettle libunistring gnutls lmdb libpcap libpng
libjpeg_turbo tiff giflib lcms2 openjpeg libffi gdbm geoip pcre
-gettext_tiny glib gzip musl_compat musl_fts libzip libbsd libpipeline
+gettext_tiny glib gzip musl_compat musl_fts libzip libpipeline
libtelnet libevent libfetch libogg libvorbis libflac libtheora libsasl2
libshine libsndfile libgpg_error libassuan libfirm libgcrypt libksba
libudns lua libxslt libtirpc npth popt file xz zstd rpm libsolv tdnf
@@ -848,9 +848,6 @@ NATIVE_PACKAGES_DEPS_PYTHON="${PREFIX}/bin/python2";
: ${PKG_LIBZIP_SHA256SUM:=b3de4d4bd49a01e0cab3507fc163f88e1651695b6b9cb25ad174dbe319d4a3b4};
: ${PKG_LIBZIP_VERSION:=1.5.2};
: ${PKG_LIBZIP_URL:=https://libzip.org/download/libzip-${PKG_LIBZIP_VERSION}.tar.xz};
-: ${PKG_LIBBSD_SHA256SUM:=56d835742327d69faccd16955a60b6dcf30684a8da518c4eca0ac713b9e0a7a4};
-: ${PKG_LIBBSD_VERSION:=0.9.1};
-: ${PKG_LIBBSD_URL:=https://libbsd.freedesktop.org/releases/libbsd-${PKG_LIBBSD_VERSION}.tar.xz};
: ${PKG_LIBPIPELINE_SHA256SUM:=da46d7b20163aadb9db2faae483f734e9096a7550c84b94029abeab62dd1b9ee};
: ${PKG_LIBPIPELINE_VERSION:=1.4.1};
: ${PKG_LIBPIPELINE_URL:=http://download.savannah.gnu.org/releases/libpipeline/libpipeline-${PKG_LIBPIPELINE_VERSION}.tar.gz};
@@ -1269,7 +1266,7 @@ NATIVE_PACKAGES_PYTHON="${PREFIX}/bin/python2";
# Packages list native_packages_cmdline
NATIVE_PACKAGES_CMDLINE_PACKAGES="
bash bc busybox calcurse coreutils dash datamash dos2unix ed figlet findutils
-gawk grep mksh ksh_openbsd moon_buggy mpg123 ninvaders rc sbase screen sed sloccount tar tcsh
+gawk grep mksh moon_buggy mpg123 ninvaders rc sbase screen sed sloccount tar tcsh
the_silver_searcher toilet tree terminally_tetris ubase which w3m zsh";
: ${PKG_BASH_SHA256SUM:=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb};
: ${PKG_BASH_VERSION:=4.4};
@@ -1332,13 +1329,6 @@ the_silver_searcher toilet tree terminally_tetris ubase which w3m zsh";
: ${PKG_MKSH_IN_TREE:=1};
: ${PKG_MKSH_INSTALL_FILES:="../mksh/mksh=bin/ /=share/doc/mksh/examples ../mksh/dot.mkshrc=share/doc/mksh/examples/ ../mksh/mksh.1=share/man/man1/"};
: ${PKG_MKSH_SUBDIR:=mksh};
-: ${PKG_KSH_OPENBSD_VERSION:=20180115};
-: ${PKG_KSH_OPENBSD_URL:=https://github.com/levaidaniel/ksh-openbsd/archive/${PKG_KSH_OPENBSD_VERSION}.tar.gz};
-: ${PKG_KSH_OPENBSD_CFLAGS_BUILD_EXTRA:="-D_GNU_SOURCE -DVI -I${PREFIX_NATIVE}/include"};
-: ${PKG_KSH_OPENBSD_MAKEFLAGS_INSTALL_EXTRA:="DESTDIR=${PREFIX_NATIVE} PREFIX="};
-: ${PKG_KSH_OPENBSD_ENV_VARS_EXTRA:="LDADD=-L${PREFIX_NATIVE}/lib"};
-: ${PKG_KSH_OPENBSD_SUBDIR:=ksh-openbsd-${PKG_KSH_OPENBSD_VERSION}};
-: ${PKG_KSH_OPENBSD_BUILD_DIR:=ksh-openbsd-${PKG_KSH_OPENBSD_VERSION}};
: ${PKG_MOON_BUGGY_SHA256SUM:=352dc16ccae4c66f1e87ab071e6a4ebeb94ff4e4f744ce1b12a769d02fe5d23f};
: ${PKG_MOON_BUGGY_VERSION:=1.0.51};
: ${PKG_MOON_BUGGY_URL:=https://m.seehuhn.de/programs/moon-buggy-${PKG_MOON_BUGGY_VERSION}.tar.gz};