From 92790a96688344c9f6fd6dadbaad73c1f88804a0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 4 Apr 2022 12:10:43 +0100 Subject: fixed network manager --- .../cairo/fix-mask-usage-in-image-compositor.patch | 172 +++++++++++ extra/cairo/musl-stacksize.patch | 23 ++ ...pdf-font-subset-Generate-valid-font-names.patch | 58 ++++ extra/lua-lpeg/build-static-lib.patch | 29 ++ extra/lua-lpeg/test-fix-setlocale.patch | 20 ++ extra/lua-mpack/dont-install-busted.patch | 13 + extra/lua-mpack/skip-memleak-test.patch | 20 ++ extra/lua5-1/lua-5.1-make.patch | 71 +++++ extra/lua5-1/lua-5.1-module_paths.patch | 24 ++ extra/lua5-1/lua-5.1-readline.patch | 10 + extra/luajit/module-paths.patch | 25 ++ extra/modemmanager/modemmanager.initd | 11 + extra/modemmanager/modemmanager.rules | 296 +++++++++++++++++++ extra/openrc/rc.conf | 313 +++++++++++++++++++++ ...s-don-t-put-connect-errors-log-to-etc-ppp.patch | 77 +++++ extra/ppp/fix-paths.patch | 12 + extra/ppp/fix-pppd-magic.h.patch | 11 + extra/ppp/musl-fix-headers.patch | 24 ++ extra/ppp/pppd.initd | 13 + extra/xterm/posix-ptys.patch | 21 ++ repo/apps/vim.xibuild | 4 +- repo/apps/xterm.xibuild | 26 +- repo/devel/gdb.xibuild | 2 +- repo/devel/vala.xibuild | 23 ++ repo/python/python-gobject.xibuild | 23 ++ repo/skip/ppp.xibuild | 78 +++++ repo/system/cacerts.xibuild | 5 + repo/system/cairo.xibuild | 39 +++ repo/system/glib.xibuild | 2 +- repo/system/jansson.xibuild | 24 ++ repo/system/libluv.xibuild | 24 ++ repo/system/libmbim.xibuild | 22 ++ repo/system/libmpack.xibuild | 16 ++ repo/system/libqmi.xibuild | 26 ++ repo/system/libqrtr.xibuild | 19 ++ repo/system/libtermkey.xibuild | 16 ++ repo/system/libuv.xibuild | 15 +- repo/system/libvterm.xibuild | 17 ++ repo/system/mobile-broadband-provider-info.xibuild | 18 ++ repo/system/modemmanager.xibuild | 50 ++++ repo/system/msgpack-c.xibuild | 20 ++ repo/system/musl.xibuild | 1 + repo/system/networkmanager.xibuild | 42 +-- repo/system/openrc.xibuild | 3 + repo/system/pcre.xibuild | 2 +- repo/system/pcre2.xibuild | 2 +- repo/system/pcsc-lite.xibuild | 30 ++ repo/system/unibilium.xibuild | 20 ++ repo/util/graphviz.xibuild | 60 ++++ repo/util/wpa_supplicant.xibuild | 54 ++-- repo/xi/xipkg.xibuild | 2 +- 51 files changed, 1879 insertions(+), 49 deletions(-) create mode 100644 extra/cairo/fix-mask-usage-in-image-compositor.patch create mode 100644 extra/cairo/musl-stacksize.patch create mode 100644 extra/cairo/pdf-font-subset-Generate-valid-font-names.patch create mode 100644 extra/lua-lpeg/build-static-lib.patch create mode 100644 extra/lua-lpeg/test-fix-setlocale.patch create mode 100644 extra/lua-mpack/dont-install-busted.patch create mode 100644 extra/lua-mpack/skip-memleak-test.patch create mode 100644 extra/lua5-1/lua-5.1-make.patch create mode 100644 extra/lua5-1/lua-5.1-module_paths.patch create mode 100644 extra/lua5-1/lua-5.1-readline.patch create mode 100644 extra/luajit/module-paths.patch create mode 100644 extra/modemmanager/modemmanager.initd create mode 100644 extra/modemmanager/modemmanager.rules create mode 100644 extra/openrc/rc.conf create mode 100644 extra/ppp/0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch create mode 100644 extra/ppp/fix-paths.patch create mode 100644 extra/ppp/fix-pppd-magic.h.patch create mode 100644 extra/ppp/musl-fix-headers.patch create mode 100644 extra/ppp/pppd.initd create mode 100644 extra/xterm/posix-ptys.patch create mode 100644 repo/devel/vala.xibuild create mode 100644 repo/python/python-gobject.xibuild create mode 100644 repo/skip/ppp.xibuild create mode 100644 repo/system/cairo.xibuild create mode 100644 repo/system/jansson.xibuild create mode 100644 repo/system/libluv.xibuild create mode 100644 repo/system/libmbim.xibuild create mode 100644 repo/system/libmpack.xibuild create mode 100644 repo/system/libqmi.xibuild create mode 100644 repo/system/libqrtr.xibuild create mode 100644 repo/system/libtermkey.xibuild create mode 100644 repo/system/libvterm.xibuild create mode 100644 repo/system/mobile-broadband-provider-info.xibuild create mode 100644 repo/system/modemmanager.xibuild create mode 100644 repo/system/msgpack-c.xibuild create mode 100644 repo/system/pcsc-lite.xibuild create mode 100644 repo/system/unibilium.xibuild create mode 100644 repo/util/graphviz.xibuild diff --git a/extra/cairo/fix-mask-usage-in-image-compositor.patch b/extra/cairo/fix-mask-usage-in-image-compositor.patch new file mode 100644 index 0000000..8d5717f --- /dev/null +++ b/extra/cairo/fix-mask-usage-in-image-compositor.patch @@ -0,0 +1,172 @@ +From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001 +From: Heiko Lewin +Date: Tue, 15 Dec 2020 16:48:19 +0100 +Subject: [PATCH 1/3] Fix mask usage in image-compositor + +--- + src/cairo-image-compositor.c | 8 ++-- + test/Makefile.sources | 1 + + test/bug-image-compositor.c | 39 ++++++++++++++++++++ + test/reference/bug-image-compositor.ref.png | Bin 0 -> 185 bytes + 4 files changed, 44 insertions(+), 4 deletions(-) + create mode 100644 test/bug-image-compositor.c + create mode 100644 test/reference/bug-image-compositor.ref.png + +diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c +index 79ad69f68..4f8aaed99 100644 +--- a/src/cairo-image-compositor.c ++++ b/src/cairo-image-compositor.c +@@ -2610,14 +2610,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + unsigned num_spans) + { + cairo_image_span_renderer_t *r = abstract_renderer; +- uint8_t *m; ++ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask); + int x0; + + if (num_spans == 0) + return CAIRO_STATUS_SUCCESS; + + x0 = spans[0].x; +- m = r->_buf; ++ m = base; + do { + int len = spans[1].x - spans[0].x; + if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) { +@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + spans[0].x, y, + spans[1].x - spans[0].x, h); + +- m = r->_buf; ++ m = base; + x0 = spans[1].x; + } else if (spans[0].coverage == 0x0) { + if (spans[0].x != x0) { +@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + #endif + } + +- m = r->_buf; ++ m = base; + x0 = spans[1].x; + } else { + *m++ = spans[0].coverage; +diff --git a/test/bug-image-compositor.c b/test/bug-image-compositor.c +new file mode 100644 +index 000000000..fc4fd370b +--- /dev/null ++++ b/test/bug-image-compositor.c +@@ -0,0 +1,39 @@ ++#include "cairo-test.h" ++ ++static cairo_test_status_t ++draw (cairo_t *cr, int width, int height) ++{ ++ cairo_set_source_rgb (cr, 0., 0., 0.); ++ cairo_paint (cr); ++ ++ cairo_set_source_rgb (cr, 1., 1., 1.); ++ cairo_set_line_width (cr, 1.); ++ ++ cairo_pattern_t *p = cairo_pattern_create_linear (0, 0, width, height); ++ cairo_pattern_add_color_stop_rgb (p, 0, 0.99, 1, 1); ++ cairo_pattern_add_color_stop_rgb (p, 1, 1, 1, 1); ++ cairo_set_source (cr, p); ++ ++ cairo_move_to (cr, 0.5, -1); ++ for (int i = 0; i < width; i+=3) { ++ cairo_rel_line_to (cr, 2, 2); ++ cairo_rel_line_to (cr, 1, -2); ++ } ++ ++ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); ++ cairo_stroke (cr); ++ ++ cairo_pattern_destroy(p); ++ ++ return CAIRO_TEST_SUCCESS; ++} ++ ++ ++CAIRO_TEST (bug_image_compositor, ++ "Crash in image-compositor", ++ "stroke, stress", /* keywords */ ++ NULL, /* requirements */ ++ 10000, 1, ++ NULL, draw) ++ ++ + +From 8bc14a6bba3bc8a64ff0749c74d9b96305bf6429 Mon Sep 17 00:00:00 2001 +From: Heiko Lewin +Date: Tue, 15 Dec 2020 17:14:18 +0100 +Subject: [PATCH 2/3] Minor cleanups + +--- + test/bug-image-compositor.c | 33 ++++++++++++++++++++++++++++++--- + 1 file changed, 30 insertions(+), 3 deletions(-) + +diff --git a/test/bug-image-compositor.c b/test/bug-image-compositor.c +index fc4fd370b..304ea089c 100644 +--- a/test/bug-image-compositor.c ++++ b/test/bug-image-compositor.c +@@ -1,5 +1,34 @@ ++/* ++ * Copyright © 2020 Uli Schlachter, Heiko Lewin ++ * ++ * Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, copy, ++ * modify, merge, publish, distribute, sublicense, and/or sell copies ++ * of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ * Author: Uli Schlachter ++ * Author: Heiko Lewin ++ */ + #include "cairo-test.h" + ++ ++/* This test reproduces an overflow of a mask-buffer in cairo-image-compositor.c */ ++ + static cairo_test_status_t + draw (cairo_t *cr, int width, int height) + { +@@ -13,6 +42,7 @@ draw (cairo_t *cr, int width, int height) + cairo_pattern_add_color_stop_rgb (p, 0, 0.99, 1, 1); + cairo_pattern_add_color_stop_rgb (p, 1, 1, 1, 1); + cairo_set_source (cr, p); ++ cairo_pattern_destroy(p); + + cairo_move_to (cr, 0.5, -1); + for (int i = 0; i < width; i+=3) { +@@ -23,8 +53,6 @@ draw (cairo_t *cr, int width, int height) + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); + cairo_stroke (cr); + +- cairo_pattern_destroy(p); +- + return CAIRO_TEST_SUCCESS; + } + +@@ -36,4 +64,3 @@ CAIRO_TEST (bug_image_compositor, + 10000, 1, + NULL, draw) + +- +-- +GitLab + diff --git a/extra/cairo/musl-stacksize.patch b/extra/cairo/musl-stacksize.patch new file mode 100644 index 0000000..d10469e --- /dev/null +++ b/extra/cairo/musl-stacksize.patch @@ -0,0 +1,23 @@ +Reduce the footprint of stack frame usage by turning +some large(r) structures as `static __thread` instead. + +--- a/src/cairo-rectangular-scan-converter.c 2015-10-27 22:04:21.000000000 +0100 ++++ b/src/cairo-rectangular-scan-converter.c 2016-05-07 04:25:26.640851782 +0200 +@@ -489,7 +489,7 @@ + cairo_span_renderer_t *renderer, + rectangle_t **rectangles) + { +- sweep_line_t sweep_line; ++ static __thread sweep_line_t sweep_line; + rectangle_t *start, *stop; + cairo_status_t status; + +@@ -656,7 +656,7 @@ + cairo_span_renderer_t *renderer) + { + cairo_rectangular_scan_converter_t *self = converter; +- rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)]; ++ static __thread rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)]; + rectangle_t **rectangles; + struct _cairo_rectangular_scan_converter_chunk *chunk; + cairo_status_t status; diff --git a/extra/cairo/pdf-font-subset-Generate-valid-font-names.patch b/extra/cairo/pdf-font-subset-Generate-valid-font-names.patch new file mode 100644 index 0000000..d5cfe2f --- /dev/null +++ b/extra/cairo/pdf-font-subset-Generate-valid-font-names.patch @@ -0,0 +1,58 @@ +From a3b69a0215fdface0fd5730872a4b3242d979dca Mon Sep 17 00:00:00 2001 +From: Uli Schlachter +Date: Tue, 9 Feb 2021 16:54:35 +0100 +Subject: [PATCH] pdf font subset: Generate valid font names + +A hash value is encoded in base 26 with upper case letters for font +names. + +Commit ed984146 replaced "numerator = abs (hash);" with "numerator = +hash;" in this code, because hash has type uint32_t and the compiler +warned about taking the absolute value of an unsigned value. However, +abs() is actually defined to take an int argument. Thus, there was some +implicit cast. + +Since numerator has type long, i.e. is signed, it is now actually +possible to get an overflow in the implicit cast and then have a +negative number. The following code is not prepared for this and +produces non-letters when encoding the hash. + +This commit fixes that problem by not using ldiv() and instead using / +and % to directly compute the needed values. This gets rid of the need +to convert to type long. Since now everything works with uint32_t, there +is no more chance for negative numbers messing things up. + +Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/449 +Signed-off-by: Uli Schlachter +--- + src/cairo-pdf-surface.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c +index 6da460878..52c49b6d2 100644 +--- a/src/cairo-pdf-surface.c ++++ b/src/cairo-pdf-surface.c +@@ -5310,18 +5310,14 @@ _create_font_subset_tag (cairo_scaled_font_subset_t *font_subset, + { + uint32_t hash; + int i; +- long numerator; +- ldiv_t d; + + hash = _hash_data ((unsigned char *) font_name, strlen(font_name), 0); + hash = _hash_data ((unsigned char *) (font_subset->glyphs), + font_subset->num_glyphs * sizeof(unsigned long), hash); + +- numerator = hash; + for (i = 0; i < 6; i++) { +- d = ldiv (numerator, 26); +- numerator = d.quot; +- tag[i] = 'A' + d.rem; ++ tag[i] = 'A' + (hash % 26); ++ hash /= 26; + } + tag[i] = 0; + } +-- +GitLab + diff --git a/extra/lua-lpeg/build-static-lib.patch b/extra/lua-lpeg/build-static-lib.patch new file mode 100644 index 0000000..d8a8f8c --- /dev/null +++ b/extra/lua-lpeg/build-static-lib.patch @@ -0,0 +1,29 @@ +--- a/makefile ++++ b/makefile +@@ -24,12 +24,15 @@ + + CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC + CC = gcc ++AR = ar ++RANLIB = ranlib + + FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o + + # For Linux + linux: + $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC" ++ $(MAKE) lpeg.a + + # For Mac OS + macosx: +@@ -37,6 +40,10 @@ + + lpeg.so: $(FILES) + env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so ++ ++lpeg.a: $(FILES) ++ env $(AR) rc lpeg.a $(FILES) ++ env $(RANLIB) lpeg.a + + $(FILES): makefile + diff --git a/extra/lua-lpeg/test-fix-setlocale.patch b/extra/lua-lpeg/test-fix-setlocale.patch new file mode 100644 index 0000000..028c18c --- /dev/null +++ b/extra/lua-lpeg/test-fix-setlocale.patch @@ -0,0 +1,20 @@ +os.setlocale just calls setlocale() from libc and musl's implementation +behaves a bit differently in comparison with BSD libc or glibc. + +When particular locales for all categories are the same, e.g. "C", +`setlocale(LC_ALL, "")` returns just "C" on BSD libc (tested on macOS) +and glibc, but musl returns "C;C;C;C;C;C". When some locale is different, +e.g. LC_CTYPE, then on macOS you get "C/en_US.UTF-8/C/C/C/C", on glibc +"LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;...", on musl "en_US.UTF-8;C;C;C;C;C". + +--- a/test.lua ++++ b/test.lua +@@ -1428,7 +1428,7 @@ + + + -- testing pre-defined names +-assert(os.setlocale("C") == "C") ++assert(os.setlocale("C"):sub(1, 1) == "C") + + function eqlpeggsub (p1, p2) + local s1 = cs2str(re.compile(p1)) diff --git a/extra/lua-mpack/dont-install-busted.patch b/extra/lua-mpack/dont-install-busted.patch new file mode 100644 index 0000000..2acb260 --- /dev/null +++ b/extra/lua-mpack/dont-install-busted.patch @@ -0,0 +1,13 @@ +Fix Makefile to not try to download and install LuaRocks and busted; use +system-provided busted. +--- a/Makefile ++++ b/Makefile +@@ -61,7 +61,7 @@ + depsclean: + rm -rf $(DEPS_DIR) + +-test: $(BUSTED) $(MPACK) ++test: $(MPACK) + $(BUSTED) -o gtest test.lua + + valgrind: $(BUSTED) $(MPACK) diff --git a/extra/lua-mpack/skip-memleak-test.patch b/extra/lua-mpack/skip-memleak-test.patch new file mode 100644 index 0000000..f89b522 --- /dev/null +++ b/extra/lua-mpack/skip-memleak-test.patch @@ -0,0 +1,20 @@ +This test requires binary to be built in debug mode. +--- a/test.lua ++++ b/test.lua +@@ -276,16 +276,6 @@ + end) + end) + +- it('should not leak memory', function() +- -- get the path to the lua interpreter, taken from +- -- http://stackoverflow.com/a/18304231 +- local i_min = 0 +- while arg[ i_min ] do i_min = i_min - 1 end +- i_min = i_min + 1 +- local res = io.popen(arg[i_min]..' leak_test.lua'):read('*a') +- assert.are_same('ok\n', res) +- end) +- + describe('is_bin option', function() + it('controls if strings are serialized to BIN or STR', function() + local isbin = false diff --git a/extra/lua5-1/lua-5.1-make.patch b/extra/lua5-1/lua-5.1-make.patch new file mode 100644 index 0000000..2db6367 --- /dev/null +++ b/extra/lua5-1/lua-5.1-make.patch @@ -0,0 +1,71 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -126,3 +126,18 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + + # (end of Makefile) ++ ++# Use libtool for binary installs, etc. ++ ++export V ++export LIBTOOL = ../libtool --quiet --tag=CC ++# See libtool manual about how to set this ++ ++alpine_clean: ++ cd src; $(MAKE) $@ ++ ++alpine_install: ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN) ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB) +--- ./src/Makefile.orig ++++ ./src/Makefile +@@ -51,10 +51,10 @@ + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + clean: +@@ -178,5 +178,34 @@ + lzio.h + print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ + ltm.h lzio.h lmem.h lopcodes.h lundump.h ++ ++ ++export LIBTOOL = ../libtool --quiet --tag=CC ++export LIB_VERSION = 0:0:0 ++ ++# The following rules use libtool for compiling and linking in order to ++# provide shared library support. ++ ++LIB_NAME = liblua.la ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) ++ ++%.lo %.o: %.c ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< ++ ++$(LIB_NAME): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) ++ ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) ++ ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) ++ ++alpine_clean: ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac ++ ++alpine_all: $(LIB_NAME) $(LUA_T) $(LUAC_T) ++ + + # (end of Makefile) diff --git a/extra/lua5-1/lua-5.1-module_paths.patch b/extra/lua5-1/lua-5.1-module_paths.patch new file mode 100644 index 0000000..e67d09f --- /dev/null +++ b/extra/lua5-1/lua-5.1-module_paths.patch @@ -0,0 +1,24 @@ +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -95,13 +94,19 @@ + + #else + #define LUA_ROOT "/usr/local/" ++#define LUA_ROOT2 "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" ++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" ++#define LUA_LDIR3 LUA_ROOT2 "share/lua/common/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ +- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" ++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ ++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua;" \ ++ LUA_LDIR3"?.lua;" LUA_LDIR3"?/init.lua" + #define LUA_CPATH_DEFAULT \ +- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" ++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" + #endif + + diff --git a/extra/lua5-1/lua-5.1-readline.patch b/extra/lua5-1/lua-5.1-readline.patch new file mode 100644 index 0000000..f144861 --- /dev/null +++ b/extra/lua5-1/lua-5.1-readline.patch @@ -0,0 +1,10 @@ +--- lua-5.1.1.orig/src/luaconf.h 2006-04-10 20:27:23.000000000 +0200 ++++ lua-5.1.1/src/luaconf.h 2006-11-15 14:53:07.000000000 +0100 +@@ -36,7 +36,6 @@ + #if defined(LUA_USE_LINUX) + #define LUA_USE_POSIX + #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +-#define LUA_USE_READLINE /* needs some extra libraries */ + #endif + + #if defined(LUA_USE_MACOSX) diff --git a/extra/luajit/module-paths.patch b/extra/luajit/module-paths.patch new file mode 100644 index 0000000..46e8d12 --- /dev/null +++ b/extra/luajit/module-paths.patch @@ -0,0 +1,25 @@ +Add /usr/share/lua/common to LUA_PATH. We use this directory for Lua modules +that are compatible with Lua 5.1 and newer. + +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -42,8 +42,10 @@ + #ifdef LUA_ROOT + #define LUA_JROOT LUA_ROOT + #define LUA_RLDIR LUA_ROOT "/share" LUA_LUADIR ++#define LUA_RLDIR2 LUA_ROOT "/share/lua/common/" + #define LUA_RCDIR LUA_ROOT "/" LUA_MULTILIB LUA_LUADIR + #define LUA_RLPATH ";" LUA_RLDIR "?.lua;" LUA_RLDIR "?/init.lua" ++#define LUA_RLPATH2 ";" LUA_RLDIR2 "?.lua;" LUA_RLDIR2 "?/init.lua" + #define LUA_RCPATH ";" LUA_RCDIR "?.so" + #else + #define LUA_JROOT LUA_LROOT +@@ -58,7 +60,7 @@ + #define LUA_LCPATH1 ";" LUA_LCDIR "?.so" + #define LUA_LCPATH2 ";" LUA_LCDIR "loadall.so" + +-#define LUA_PATH_DEFAULT "./?.lua" LUA_JPATH LUA_LLPATH LUA_RLPATH ++#define LUA_PATH_DEFAULT "./?.lua" LUA_JPATH LUA_LLPATH LUA_RLPATH LUA_RLPATH2 + #define LUA_CPATH_DEFAULT "./?.so" LUA_LCPATH1 LUA_RCPATH LUA_LCPATH2 + #endif + diff --git a/extra/modemmanager/modemmanager.initd b/extra/modemmanager/modemmanager.initd new file mode 100644 index 0000000..29310b3 --- /dev/null +++ b/extra/modemmanager/modemmanager.initd @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +command=/usr/sbin/ModemManager +command_args="${modemmanager_opts}" + +description="ModemManager Daemon" + +depend() { + need dbus +} diff --git a/extra/modemmanager/modemmanager.rules b/extra/modemmanager/modemmanager.rules new file mode 100644 index 0000000..1eb7b19 --- /dev/null +++ b/extra/modemmanager/modemmanager.rules @@ -0,0 +1,296 @@ + + + +modemmanager.rules « modemmanager « community - aports - Alpine packages build scripts + + + + + + + + + +
+ + + + +
+aboutsummaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: 4c56fb7f9ef117068e03d8e6c01d2f51dad066bd (plain) (blame) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
// Let users in plugdev group modify ModemManager
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
+	action.id == "org.freedesktop.ModemManager1.Contacts" ||
+	action.id == "org.freedesktop.ModemManager1.Messaging" ||
+	action.id == "org.freedesktop.ModemManager1.Location") &&
+        subject.isInGroup("plugdev") && subject.active) {
+        return "yes";
+    }
+});
+
+// Let geoclue modify ModemManager for location gathering
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
+	action.id == "org.freedesktop.ModemManager1.Location") &&
+        subject.isInGroup("geoclue")) {
+        return "yes";
+    }
+});
+
+
+ +
+ + diff --git a/extra/openrc/rc.conf b/extra/openrc/rc.conf new file mode 100644 index 0000000..fdeb653 --- /dev/null +++ b/extra/openrc/rc.conf @@ -0,0 +1,313 @@ +# Global OpenRC configuration settings + +# Set to "YES" if you want the rc system to try and start services +# in parallel for a slight speed improvement. When running in parallel we +# prefix the service output with its name as the output will get +# jumbled up. +# WARNING: whilst we have improved parallel, it can still potentially lock +# the boot process. Don't file bugs about this unless you can supply +# patches that fix it without breaking other things! +rc_parallel="YES" + +# Set rc_interactive to "YES" and you'll be able to press the I key during +# boot so you can choose to start specific services. Set to "NO" to disable +# this feature. This feature is automatically disabled if rc_parallel is +# set to YES. +#rc_interactive="YES" + +# If we need to drop to a shell, you can specify it here. +# If not specified we use $SHELL, otherwise the one specified in /etc/passwd, +# otherwise /bin/sh +# Linux users could specify /sbin/sulogin +rc_shell=/bin/sh + +# Do we allow any started service in the runlevel to satisfy the dependency +# or do we want all of them regardless of state? For example, if net.eth0 +# and net.eth1 are in the default runlevel then with rc_depend_strict="NO" +# both will be started, but services that depend on 'net' will work if either +# one comes up. With rc_depend_strict="YES" we would require them both to +# come up. +#rc_depend_strict="YES" + +# rc_hotplug controls which services we allow to be hotplugged. +# A hotplugged service is one started by a dynamic dev manager when a matching +# hardware device is found. +# Hotplugged services appear in the "hotplugged" runlevel. +# If rc_hotplug is set to any value, we compare the name of this service +# to every pattern in the value, from left to right, and we allow the +# service to be hotplugged if it matches a pattern, or if it matches no +# patterns. Patterns can include shell wildcards. +# To disable services from being hotplugged, prefix patterns with "!". +#If rc_hotplug is not set or is empty, all hotplugging is disabled. +# Example - rc_hotplug="net.wlan !net.*" +# This allows net.wlan and any service not matching net.* to be hotplugged. +# Example - rc_hotplug="!net.*" +# This allows services that do not match "net.*" to be hotplugged. + +# rc_logger launches a logging daemon to log the entire rc process to +# /var/log/rc.log +# NOTE: Linux systems require the devfs service to be started before +# logging can take place and as such cannot log the sysinit runlevel. +#rc_logger="NO" + +# Through rc_log_path you can specify a custom log file. +# The default value is: /var/log/rc.log +#rc_log_path="/var/log/rc.log" + +# If you want verbose output for OpenRC, set this to yes. If you want +# verbose output for service foo only, set it to yes in /etc/conf.d/foo. +#rc_verbose=no + +# By default we filter the environment for our running scripts. To allow other +# variables through, add them here. Use a * to allow all variables through. +#rc_env_allow="VAR1 VAR2" + +# By default we assume that all daemons will start correctly. +# However, some do not - a classic example is that they fork and return 0 AND +# then child barfs on a configuration error. Or the daemon has a bug and the +# child crashes. You can set the number of milliseconds start-stop-daemon +# waits to check that the daemon is still running after starting here. +# The default is 0 - no checking. +#rc_start_wait=100 + +# rc_nostop is a list of services which will not stop when changing runlevels. +# This still allows the service itself to be stopped when called directly. +#rc_nostop="" + +# rc will attempt to start crashed services by default. +# However, it will not stop them by default as that could bring down other +# critical services. +#rc_crashed_stop=NO +#rc_crashed_start=YES + +# Set rc_nocolor to yes if you do not want colors displayed in OpenRC +# output. +#rc_nocolor=NO + +############################################################################## +# MISC CONFIGURATION VARIABLES +# There variables are shared between many init scripts + +# Set unicode to YES to turn on unicode support for keyboards and screens. +unicode="YES" + +# This is how long fuser should wait for a remote server to respond. The +# default is 60 seconds, but it can be adjusted here. +#rc_fuser_timeout=60 + +# Below is the default list of network fstypes. +# +# afs ceph cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs +# nfs nfs4 ocfs2 shfs smbfs +# +# If you would like to add to this list, you can do so by adding your +# own fstypes to the following variable. +#extra_net_fs_list="" + +############################################################################## +# SERVICE CONFIGURATION VARIABLES +# These variables are documented here, but should be configured in +# /etc/conf.d/foo for service foo and NOT enabled here unless you +# really want them to work on a global basis. +# If your service has characters in its name which are not legal in +# shell variable names and you configure the variables for it in this +# file, those characters should be replaced with underscores in the +# variable names as shown below. + +# Some daemons are started and stopped via start-stop-daemon. +# We can set some things on a per service basis, like the nicelevel. +#SSD_NICELEVEL="-19" +# Or the ionice level. The format is class[:data] , just like the +# --ionice start-stop-daemon parameter. +#SSD_IONICELEVEL="2:2" + +# Pass ulimit parameters +# If you are using bash in POSIX mode for your shell, note that the +# ulimit command uses a block size of 512 bytes for the -c and -f +# options +#rc_ulimit="-u 30" + +# It's possible to define extra dependencies for services like so +#rc_config="/etc/foo" +#rc_need="openvpn" +#rc_use="net.eth0" +#rc_after="clock" +#rc_before="local" +#rc_provide="!net" + +# You can also enable the above commands here for each service. Below is an +# example for service foo. +#rc_foo_config="/etc/foo" +#rc_foo_need="openvpn" +#rc_foo_after="clock" + +# Below is an example for service foo-bar. Note that the '-' is illegal +# in a shell variable name, so we convert it to an underscore. +# example for service foo-bar. +#rc_foo_bar_config="/etc/foo-bar" +#rc_foo_bar_need="openvpn" +#rc_foo_bar_after="clock" + +# You can also remove dependencies. +# This is mainly used for saying which services do NOT provide net. +#rc_net_tap0_provide="!net" + +# This is the subsystem type. +# It is used to match against keywords set by the keyword call in the +# depend function of service scripts. +# +# It should be set to the value representing the environment this file is +# PRESENTLY in, not the virtualization the environment is capable of. +# If it is commented out, automatic detection will be used. +# +# The list below shows all possible settings as well as the host +# operating systems where they can be used and autodetected. +# +# "" - nothing special +# "docker" - Docker container manager (Linux) +# "jail" - Jail (DragonflyBSD or FreeBSD) +# "lxc" - Linux Containers +# "openvz" - Linux OpenVZ +# "prefix" - Prefix +# "rkt" - CoreOS container management system (Linux) +# "subhurd" - Hurd subhurds (to be checked) +# "systemd-nspawn" - Container created by systemd-nspawn (Linux) +# "uml" - Usermode Linux +# "vserver" - Linux vserver +# "xen0" - Xen0 Domain (Linux and NetBSD) +# "xenU" - XenU Domain (Linux and NetBSD) +#rc_sys="" + +# if you use openrc-init, which is currently only available on Linux, +# this is the default runlevel to activate after "sysinit" and "boot" +# when booting. +#rc_default_runlevel="default" + +# on Linux and Hurd, this is the number of ttys allocated for logins +# It is used in the consolefont, keymaps, numlock and termencoding +# service scripts. +rc_tty_number=12 + +############################################################################## +# LINUX CGROUPS RESOURCE MANAGEMENT + +# This sets the mode used to mount cgroups. +# "hybrid" mounts cgroups version 2 on /sys/fs/cgroup/unified and +# cgroups version 1 on /sys/fs/cgroup. +# "legacy" mounts cgroups version 1 on /sys/fs/cgroup +# "unified" mounts cgroups version 2 on /sys/fs/cgroup +#rc_cgroup_mode="hybrid" + +# This is a list of controllers which should be enabled for cgroups version 2 +# when hybrid mode is being used. +# Controllers listed here will not be available for cgroups version 1. +#rc_cgroup_controllers="" + +# This variable contains the cgroups version 2 settings for your services. +# If this is set in this file, the settings will apply to all services. +# If you want different settings for each service, place the settings in +# /etc/conf.d/foo for service foo. +# The format is to specify the setting and value followed by a newline. +# Multiple settings and values can be specified. +# For example, you would use this to set the maximum memory and maximum +# number of pids for a service. +#rc_cgroup_settings=" +#memory.max 10485760 +#pids.max max +#" +# +# For more information about the adjustments that can be made with +# cgroups version 2, see Documentation/cgroups-v2.txt in the linux kernel +# source tree. +#rc_cgroup_settings="" + +# This switch controls whether or not cgroups version 1 controllers are +# individually mounted under +# /sys/fs/cgroup in hybrid or legacy mode. +#rc_controller_cgroups="YES" + +# The following setting turns on the memory.use_hierarchy setting in the +# root memory cgroup for cgroups v1. +# It must be set to yes in this file if you want this functionality. +#rc_cgroup_memory_use_hierarchy="NO" + +# The following settings allow you to set up values for the cgroups version 1 +# controllers for your services. +# They can be set in this file;, however, if you do this, the settings +# will apply to all of your services. +# If you want different settings for each service, place the settings in +# /etc/conf.d/foo for service foo. +# The format is to specify the names of the settings followed by their +# values. Each variable can hold multiple settings. +# For example, you would use this to set the cpu.shares setting in the +# cpu controller to 512 for your service. +# rc_cgroup_cpu=" +# cpu.shares 512 +# " +# +# For more information about the adjustments that can be made with +# cgroups version 1, see Documentation/cgroups-v1/* in the linux kernel +# source tree. + +# Set the blkio controller settings for this service. +#rc_cgroup_blkio="" + +# Set the cpu controller settings for this service. +#rc_cgroup_cpu="" + +# Add this service to the cpuacct controller (any value means yes). +#rc_cgroup_cpuacct="" + +# Set the cpuset controller settings for this service. +#rc_cgroup_cpuset="" + +# Set the devices controller settings for this service. +#rc_cgroup_devices="" + +# Set the hugetlb controller settings for this service. +#rc_cgroup_hugetlb="" + +# Set the memory controller settings for this service. +#rc_cgroup_memory="" + +# Set the net_cls controller settings for this service. +#rc_cgroup_net_cls="" + +# Set the net_prio controller settings for this service. +#rc_cgroup_net_prio="" + +# Set the pids controller settings for this service. +#rc_cgroup_pids="" + +# Set this to YES if you want all of the processes in a service's cgroup +# killed when the service is stopped or restarted. +# Be aware that setting this to yes means all of a service's +# child processes will be killed. Keep this in mind if you set this to +# yes here instead of for the individual services in +# /etc/conf.d/. +# To perform this cleanup manually for a stopped service, you can +# execute cgroup_cleanup with /etc/init.d/ cgroup_cleanup or +# rc-service cgroup_cleanup. +# The process followed in this cleanup is the following: +# 1. send stopsig (sigterm if it isn't set) to all processes left in the +# cgroup immediately followed by sigcont. +# 2. Send sighup to all processes in the cgroup if rc_send_sighup is +# yes. +# 3. delay for rc_timeout_stopsec seconds. +# 4. send sigkill to all processes in the cgroup unless disabled by +# setting rc_send_sigkill to no. +# rc_cgroup_cleanup="NO" + +# If this is yes, we will send sighup to the processes in the cgroup +# immediately after stopsig and sigcont. +#rc_send_sighup="NO" + +# This is the amount of time in seconds that we delay after sending sigcont +# and optionally sighup, before we optionally send sigkill to all +# processes in the # cgroup. +# The default is 90 seconds. +#rc_timeout_stopsec="90" + +# If this is set to no, we do not send sigkill to all processes in the +# cgroup. +#rc_send_sigkill="YES" diff --git a/extra/ppp/0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch b/extra/ppp/0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch new file mode 100644 index 0000000..a99cc1c --- /dev/null +++ b/extra/ppp/0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch @@ -0,0 +1,77 @@ +From b4ef433be936c90e356da7a590b032cdee219a3f Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Fri, 4 Apr 2014 19:06:05 +0200 +Subject: [PATCH 11/27] build-sys: don't put connect-errors log to /etc/ppp/ + +Resolves: #118837 +--- + chat/chat.8 | 2 +- + linux/Makefile.top | 8 +++++++- + pppd/pathnames.h | 4 ++-- + 3 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/chat/chat.8 b/chat/chat.8 +index 6d10836..78d6939 100644 +--- a/chat/chat.8 ++++ b/chat/chat.8 +@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the script to send strings to the user + at the terminal via standard error. If \fBchat\fR is being run by + pppd, and pppd is running as a daemon (detached from its controlling + terminal), standard error will normally be redirected to the file +-/etc/ppp/connect\-errors. ++/var/log/ppp/connect\-errors. + .LP + \fBSAY\fR strings must be enclosed in single or double quotes. If + carriage return and line feed are needed in the string to be output, +diff --git a/linux/Makefile.top b/linux/Makefile.top +index f63d45e..f42efd5 100644 +--- a/linux/Makefile.top ++++ b/linux/Makefile.top +@@ -5,6 +5,8 @@ BINDIR = $(DESTDIR)/sbin + INCDIR = $(DESTDIR)/include + MANDIR = $(DESTDIR)/share/man + ETCDIR = $(INSTROOT)@SYSCONF@/ppp ++RUNDIR = $(INSTROOT)/var/run/ppp ++LOGDIR = $(INSTROOT)/var/log/ppp + + # uid 0 = root + INSTALL= install +@@ -16,7 +18,7 @@ all: + cd pppstats; $(MAKE) $(MFLAGS) all + cd pppdump; $(MAKE) $(MFLAGS) all + +-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel ++install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-devel + + install-progs: + cd chat; $(MAKE) $(MFLAGS) install +@@ -44,6 +46,10 @@ $(MANDIR)/man8: + $(INSTALL) -d -m 755 $@ + $(ETCDIR): + $(INSTALL) -d -m 755 $@ ++$(RUNDIR): ++ $(INSTALL) -d -m 755 $@ ++$(LOGDIR): ++ $(INSTALL) -d -m 755 $@ + + clean: + rm -f `find . -name '*.[oas]' -print` +diff --git a/pppd/pathnames.h b/pppd/pathnames.h +index a427cb8..bef3160 100644 +--- a/pppd/pathnames.h ++++ b/pppd/pathnames.h +@@ -28,9 +28,9 @@ + #define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up" + #define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down" + #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." +-#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" ++#define _PATH_CONNERRS _ROOT_PATH "/var/log/ppp/connect-errors" + #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" +-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" ++#define _PATH_RESOLV _ROOT_PATH "/var/run/ppp/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" +-- +1.8.3.1 + diff --git a/extra/ppp/fix-paths.patch b/extra/ppp/fix-paths.patch new file mode 100644 index 0000000..6914258 --- /dev/null +++ b/extra/ppp/fix-paths.patch @@ -0,0 +1,12 @@ +--- a/pppd/plugins/radius/pathnames.h ++++ b/pppd/plugins/radius/pathnames.h +@@ -22,7 +22,7 @@ + + /* normally defined in the Makefile */ + #ifndef _PATH_ETC_RADIUSCLIENT_CONF +-#define _PATH_ETC_RADIUSCLIENT_CONF "/etc/radiusclient.conf" ++#define _PATH_ETC_RADIUSCLIENT_CONF "/etc/radiusclient/radiusclient.conf" + #endif + + #endif /* PATHNAMES_H */ + diff --git a/extra/ppp/fix-pppd-magic.h.patch b/extra/ppp/fix-pppd-magic.h.patch new file mode 100644 index 0000000..01a89d5 --- /dev/null +++ b/extra/ppp/fix-pppd-magic.h.patch @@ -0,0 +1,11 @@ +--- a/pppd/magic.h 2019-12-31 02:31:26.000000000 +0100 ++++ b/pppd/magic.h 2020-02-06 20:52:49.263657502 +0100 +@@ -42,6 +42,8 @@ + * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ + */ + ++#include ++ + void magic_init (void); /* Initialize the magic number generator */ + u_int32_t magic (void); /* Returns the next magic number */ + diff --git a/extra/ppp/musl-fix-headers.patch b/extra/ppp/musl-fix-headers.patch new file mode 100644 index 0000000..37ddbbb --- /dev/null +++ b/extra/ppp/musl-fix-headers.patch @@ -0,0 +1,24 @@ +diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c +index 6d71530..86d224e 100644 +--- a/pppd/sys-linux.c ++++ b/pppd/sys-linux.c +@@ -102,19 +102,11 @@ + #define MAX_ADDR_LEN 7 + #endif + +-#if !defined(__GLIBC__) || __GLIBC__ >= 2 + #include /* glibc 2 conflicts with linux/types.h */ + #include + #include + #include + #include +-#else +-#include +-#include +-#include +-#include +-#include +-#endif + #include + #include + diff --git a/extra/ppp/pppd.initd b/extra/ppp/pppd.initd new file mode 100644 index 0000000..30bd641 --- /dev/null +++ b/extra/ppp/pppd.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +name="pppd" +command="/usr/sbin/${SVCNAME}" +command_args="nodetach ${PPPD_OPTS}" +pidfile="/var/run/$SVCNAME.pid" +command_background=true + +start_pre() { + checkpath --directory /var/run/ppp + modprobe pptp +} + diff --git a/extra/xterm/posix-ptys.patch b/extra/xterm/posix-ptys.patch new file mode 100644 index 0000000..596699f --- /dev/null +++ b/extra/xterm/posix-ptys.patch @@ -0,0 +1,21 @@ +diff -upr xterm-323.orig/main.c xterm-323/main.c +--- xterm-323.orig/main.c 2016-03-09 15:30:51.191053881 +0100 ++++ xterm-323/main.c 2016-03-09 15:31:17.961635229 +0100 +@@ -2654,7 +2654,7 @@ get_pty(int *pty, char *from GCC_UNUSED) + close(opened_tty); + opened_tty = -1; + } +-#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT_PTY_ISATTY) ++#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) + if ((*pty = posix_openpt(O_RDWR)) >= 0) { + char *name = ptsname(*pty); + if (name != 0) { +@@ -3735,7 +3735,7 @@ spawnXTerm(XtermWidget xw) + /* + * now in child process + */ +-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) ++#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) + int pgrp = setsid(); /* variable may not be used... */ + #else + int pgrp = getpid(); diff --git a/repo/apps/vim.xibuild b/repo/apps/vim.xibuild index 3079058..d396eb2 100644 --- a/repo/apps/vim.xibuild +++ b/repo/apps/vim.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="make " DEPS="gpm acl musl libgcrypt pcre2 zlib" -PKG_VER=8.2.4257 +PKG_VER=8.2.4656 SOURCE=https://github.com/vim/vim/archive/refs/tags/v$PKG_VER.tar.gz DESC="Vi Improved" @@ -18,7 +18,7 @@ build () { package () { - make DESTDIR=$PKG_DEST install + make -j1 DESTDIR=$PKG_DEST install mkdir -p $PKG_DEST/etc cat > $PKG_DEST/etc/vimrc << "EOF" " Begin /etc/vimrc diff --git a/repo/apps/xterm.xibuild b/repo/apps/xterm.xibuild index 09b5b6b..a6d6a52 100644 --- a/repo/apps/xterm.xibuild +++ b/repo/apps/xterm.xibuild @@ -7,8 +7,12 @@ DESC="X Terminal Emulator" PKG_VER=370 SOURCE=https://invisible-mirror.net/archives/xterm/xterm-$PKG_VER.tgz +ADDITIONAL=" + posix-ptys.patch +" prepare () { + apply_pacthes sed -i '/v0/{n;s/new:/new:kb=^?:/}' termcap && printf '\tkbs=\\177,\n' >> terminfo && @@ -16,7 +20,27 @@ prepare () { } build () { - ./configure $XORG_CONFIG + ./configure $XORG_CONFIG \ + --with-tty-group=tty \ + --enable-ansi-color \ + --enable-88-color \ + --enable-256-color \ + --enable-broken-st \ + --enable-broken-osc \ + --enable-load-vt-fonts \ + --enable-i18n \ + --enable-wide-chars \ + --enable-doublechars \ + --enable-warnings \ + --enable-tcap-query \ + --enable-logging \ + --enable-dabbrev \ + --enable-freetype \ + --enable-luit \ + --enable-mini-luit \ + --enable-narrowproto \ + --enable-exec-xterm \ + --with-utempter make } diff --git a/repo/devel/gdb.xibuild b/repo/devel/gdb.xibuild index 055576e..31d9b7c 100644 --- a/repo/devel/gdb.xibuild +++ b/repo/devel/gdb.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make expat guile ncurses python xz texinfo" -DEPS="python-six doxygen gcc guile python rustc valgrind systemtap" +DEPS="python-six doxygen gcc guile rustc python valgrind systemtap" PKG_VER=11.2 SOURCE=https://ftp.gnu.org/gnu/gdb/gdb-$PKG_VER.tar.xz diff --git a/repo/devel/vala.xibuild b/repo/devel/vala.xibuild new file mode 100644 index 0000000..a457cca --- /dev/null +++ b/repo/devel/vala.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +MAKEDEPS="libxslt bash flex bison gobject-introspection graphviz" +DEPS="glib graphviz musl pkgconf" + +PKG_VER=0.54.7 +SOURCE=https://download.gnome.org/sources/vala/${PKG_VER%.*}/vala-$PKG_VER.tar.xz +DESC="Compiler for the GObject type system" + +prepare () { + sed -i "/constants\/member-access/d" \ + tests/Makefile.in +} + +build () { + ./configure \ + --prefix=/usr + make + +} +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/python/python-gobject.xibuild b/repo/python/python-gobject.xibuild new file mode 100644 index 0000000..348724a --- /dev/null +++ b/repo/python/python-gobject.xibuild @@ -0,0 +1,23 @@ +#!/bin/sh + +MAKEDEPS="python python-cairo libffi" +DEPS="python libffi cairo glib gobject-introspection musl" + +PKG_VER=3.42.0 +SOURCE=https://download.gnome.org/sources/pygobject/${PKG_VER%.*}/pygobject-$PKG_VER.tar.xz +DESC="Python bindings for the GObject library" + +build() { + mkdir build && + cd build + + meson \ + -Dpython=python3 \ + .. + + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/skip/ppp.xibuild b/repo/skip/ppp.xibuild new file mode 100644 index 0000000..b6db516 --- /dev/null +++ b/repo/skip/ppp.xibuild @@ -0,0 +1,78 @@ +#!/bin/sh + +MAKEDEPS="linux-headers libpcap" +DEPS="musl" + +PKG_VER=2.4.9 +SOURCE=https://github.com/paulusmack/ppp/archive/ppp-$PKG_VER.tar.gz + +ADDITIONAL=" +0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch +fix-paths.patch +fix-pppd-magic.h.patch +musl-fix-headers.patch +pppd.initd + +" + +DESC="A daemon which implements the PPP protocol for dial-up networking" + +prepare () { + apply_patches + # bug about missing sys/cdefs.h + find ./ -name "*.c" -o -name "*.h" | xargs sed -i "s/__BEGIN_DECLS/#ifdef __cplusplus\nextern \"C\" {\n#endif/g" + find ./ -name "*.c" -o -name "*.h" | xargs sed -i "s/__END_DECLS/#ifdef __cplusplus\n}\n#endif/g" + find ./ -name "*.c" -o -name "*.h" | xargs sed -i "s,#include ,,g" +} + +build () { + # fix CFLAGS + # -D_GNU_SOURCE is needed for IPv6 to work apparently + export CFLAGS="$CFLAGS -D_GNU_SOURCE" + sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux + sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux + sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux + sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux + sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux + # enable active filter + sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux + # enable ipv6 support + sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux + # Enable Microsoft proprietary Callback Control Protocol + sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux + sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux + sed -i "s:^#USE_CRYPT=y:USE_CRYPT=y:" pppd/Makefile.linux + ./configure \ + --prefix=/usr \ + --localstatedir=/var + make COPTS="$CFLAGS" + +} + +package () { + make INSTROOT=$PKG_DEST install + install -Dm644 include/net/ppp_defs.h \ + $PKG_DEST/usr/include/net/ppp_defs.h + install -D -m755 ip-up $PKG_DEST/etc/ppp/ip-up + install -D -m755 ip-down $PKG_DEST/etc/ppp/ip-down + install -D -m755 pppd.initd $PKG_DEST/etc/init.d/pppd + install -D -m644 etc.ppp/options $PKG_DEST/etc/ppp/options + install -D -m600 etc.ppp/pap-secrets $PKG_DEST/etc/ppp/pap-secrets + install -D -m600 etc.ppp/chap-secrets $PKG_DEST/etc/ppp/chap-secrets + + # busybox ifup/ifdown needs pon/poff + install -D -m644 scripts/pon.1 $PKG_DEST/usr/share/man/man1/pon.1 + install -D -m755 scripts/pon $PKG_DEST/usr/bin/pon + install -D -m755 scripts/poff $PKG_DEST/usr/bin/poff + + install -d $PKG_DEST/usr/share/doc/ppp + for i in scripts/*; do + case $i in + pon|poff|*.1) continue; + esac + if [ -f "$i" ]; then + cp $i $PKG_DEST/usr/share/doc/ppp/ + fi + done + install -d $PKG_DEST/etc/ppp/peers +} diff --git a/repo/system/cacerts.xibuild b/repo/system/cacerts.xibuild index 9c0198d..9fef8e1 100644 --- a/repo/system/cacerts.xibuild +++ b/repo/system/cacerts.xibuild @@ -22,4 +22,9 @@ package () { mkdir -p $PKG_DEST/etc/ssl/certs bash make-ca -g --force -D $PKG_DEST chmod -R 777 $PKG_DEST || echo "couldnt change permissions for $PKG_DEST" + + install -d $PKG_DEST/usr/bin + install -d $PKG_DEST/usr/libexec/make-ca + install -m755 make-ca $PKG_DEST/usr/bin/ + install -m700 copy-trust-modifications $PKG_DEST/usr/libexec/make-ca } diff --git a/repo/system/cairo.xibuild b/repo/system/cairo.xibuild new file mode 100644 index 0000000..4bc7041 --- /dev/null +++ b/repo/system/cairo.xibuild @@ -0,0 +1,39 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="musl libx11 freetype libpng libxcb libxext libxrender pixman zlib glib" + +PKG_VER=1.17.4 +SOURCE=https://cairographics.org/snapshots/cairo-$PKG_VER.tar.xz +DESC="A vector graphics library" + +ADDITIONAL=" +fix-mask-usage-in-image-compositor.patch +musl-stacksize.patch +pdf-font-subset-Generate-valid-font-names.patch +" + +build () { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-ft \ + --enable-gobject \ + --enable-pdf \ + --enable-png \ + --enable-ps \ + --enable-svg \ + --enable-tee \ + --enable-x \ + --enable-xcb \ + --enable-xcb-shm \ + --enable-xlib \ + --enable-xlib-xrender \ + --disable-xlib-xcb + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/system/glib.xibuild b/repo/system/glib.xibuild index 2dcffeb..3b7a4c4 100644 --- a/repo/system/glib.xibuild +++ b/repo/system/glib.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="meson ninja docbook-xsl docbook-dtd" -DEPS="pcre libffi zlib musl libxslt gdb " +DEPS="pcre libffi zlib musl libxslt gdbm" PKG_VER=2.70.3 SOURCE=https://download.gnome.org/sources/glib/$(echo $PKG_VER | cut -d. -f-2)/glib-$PKG_VER.tar.xz diff --git a/repo/system/jansson.xibuild b/repo/system/jansson.xibuild new file mode 100644 index 0000000..9f82843 --- /dev/null +++ b/repo/system/jansson.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=2.14 +SOURCE=https://github.com/akheron/jansson/releases/download/v$PKG_VER/jansson-$PKG_VER.tar.gz + +DESC="Library for encoding, decoding and manipulating JSON data" + +build () { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + make +} + +package () { + make DESTDIR=$PKG_DEST install +} + diff --git a/repo/system/libluv.xibuild b/repo/system/libluv.xibuild new file mode 100644 index 0000000..fabd348 --- /dev/null +++ b/repo/system/libluv.xibuild @@ -0,0 +1,24 @@ +#!/bin/sh + +MAKEDEPS="make luajit" +DEPS="musl libuv" + +PKG_VER=1.42.0-0 +SOURCE=https://github.com/luvit/luv/releases/download/$PKG_VER/luv-$PKG_VER.tar.gz +DESC="Bare libuv bindings for lua" + +build() { + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DWITH_SHARED_LIBUV=ON \ + -DLUA_BUILD_TYPE=System \ + -DBUILD_MODULE=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF + cmake --build build +} + +package() { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/repo/system/libmbim.xibuild b/repo/system/libmbim.xibuild new file mode 100644 index 0000000..8fe1d88 --- /dev/null +++ b/repo/system/libmbim.xibuild @@ -0,0 +1,22 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=1.26.2 +SOURCE=https://www.freedesktop.org/software/libmbim/libmbim-$PKG_VER.tar.xz +DESC="MBIM modem protocol helper library" + +build () { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-introspection=yes + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/system/libmpack.xibuild b/repo/system/libmpack.xibuild new file mode 100644 index 0000000..3685876 --- /dev/null +++ b/repo/system/libmpack.xibuild @@ -0,0 +1,16 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=1.0.5 +SOURCE=https://github.com/libmpack/libmpack/archive/$PKG_VER.tar.gz +DESC="Simple implementation of msgpack in C" + +build () { + make +} + +package () { + make DESTDIR=$PKG_DEST PREFIX=/usr install +} diff --git a/repo/system/libqmi.xibuild b/repo/system/libqmi.xibuild new file mode 100644 index 0000000..7439f1f --- /dev/null +++ b/repo/system/libqmi.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +MAKEDEPS="make gtk-doc glib libgudev " +DEPS="musl libqrtr libmbim " + +PKG_VER=1.30.4 +SOURCE=https://www.freedesktop.org/software/libqmi/libqmi-$PKG_VER.tar.xz +DESC="QMI modem protocol helper library" + +build () { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-mbim-qmux \ + --enable-qrtr \ + --enable-gtk-doc + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/system/libqrtr.xibuild b/repo/system/libqrtr.xibuild new file mode 100644 index 0000000..7c4de5a --- /dev/null +++ b/repo/system/libqrtr.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +MAKEDEPS="glib gobject-introspection gtk-doc linux-headers meson" +DEPS="musl glib" + +PKG_VER=1.2.2 +SOURCE=https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib/-/archive/$PKG_VER/libqrtr-glib-$PKG_VER.tar.gz +DESC="Qualcomm IPC Router protocol helper library" + +build () { + mkdir build && + cd build + meson --prefix=/usr .. + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/system/libtermkey.xibuild b/repo/system/libtermkey.xibuild new file mode 100644 index 0000000..b73a16e --- /dev/null +++ b/repo/system/libtermkey.xibuild @@ -0,0 +1,16 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=0.22 +SOURCE=http://www.leonerd.org.uk/code/libtermkey/libtermkey-$PKG_VER.tar.gz +DESC="Library for easy processing of keyboard entry from terminal-based programs" + +build () { + make PREFIX=/usr +} + +package () { + make PREFIX=/usr DESTDIR=$PKG_DEST install +} diff --git a/repo/system/libuv.xibuild b/repo/system/libuv.xibuild index b5e65b6..976b2b9 100644 --- a/repo/system/libuv.xibuild +++ b/repo/system/libuv.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="automake autoconf libtool make" +MAKEDEPS="make " DEPS="musl" PKG_VER=1.44.1 @@ -12,12 +12,15 @@ prepare () { } build () { - ./configure --prefix=/usr - make CFLAGS="$CFLAGS -D__USE_MISC" BUILDTYPE=Release + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make BUILDTYPE=Release + } package () { - make DESTDIR=$PKG_DEST install + make DESTDIR="$PKG_DEST" install } - - diff --git a/repo/system/libvterm.xibuild b/repo/system/libvterm.xibuild new file mode 100644 index 0000000..d212ccc --- /dev/null +++ b/repo/system/libvterm.xibuild @@ -0,0 +1,17 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=0.1.4 +SOURCE=http://www.leonerd.org.uk/code/libvterm/libvterm-$PKG_VER.tar.gz +DESC="Abstract library implementation of a VT220/xterm/ECMA-48 terminal emulator" + +build () { + make PREFIX=/usr +} + +package () { + make PREFIX=/usr DESTDIR="$PKG_DEST/" install + rm -f $PKG_DEST/usr/lib/*.a +} diff --git a/repo/system/mobile-broadband-provider-info.xibuild b/repo/system/mobile-broadband-provider-info.xibuild new file mode 100644 index 0000000..618feb3 --- /dev/null +++ b/repo/system/mobile-broadband-provider-info.xibuild @@ -0,0 +1,18 @@ +#!/bin/sh + +MAKEDEPS="autoconf automake libxml2 libxslt" +DEPS="pkgconf" + +PKG_VER=20201225 +SOURCE=https://download.gnome.org/sources/mobile-broadband-provider-info/$PKG_VER/mobile-broadband-provider-info-$PKG_VER.tar.xz +DESC="Mobile broadband settings for various service providers" + +build () { + ./configure --prefix=/usr --disable-static && + make +} + +package () { + make DESTDIR=$PKG_DEST install +} + diff --git a/repo/system/modemmanager.xibuild b/repo/system/modemmanager.xibuild new file mode 100644 index 0000000..b2d5c5d --- /dev/null +++ b/repo/system/modemmanager.xibuild @@ -0,0 +1,50 @@ +#!/bin/sh + +MAKEDEPS="gobject-introspection gtk-doc vala libgudev polkit libmbim libqmi linux-headers" +DEPS="dbus musl glib polkit" + +PKG_VER=1.18.6 +SOURCE=https://www.freedesktop.org/software/ModemManager/ModemManager-$PKG_VER.tar.xz + +ADDITIONAL=" +modemmanager.initd +modemmanager.rules +" + +DESC="ModemManager library" + +build () { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-polkit=permissive \ + --enable-plugin-qcom-soc \ + --enable-gtk-doc \ + --disable-static \ + --enable-vala=yes \ + --with-systemd-suspend-resume=yes + make + + + +} + +package () { + make DESTDIR="$PKG_DEST" install + rm -rf "$PKG_DEST"/usr/share/dbus-1/system-services #systemd-service + mkdir -p "$PKG_DEST/usr/share/polkit-1/rules.d" + install -m644 -D "modemmanager.rules" \ + "$PKG_DEST/usr/share/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules" + install -m755 -D "modemmanager.initd" \ + "$PKG_DEST/etc/init.d/modemmanager" + mkdir -p "$PKG_DEST/usr/share/doc/modemmanager" + cat > $PKG_DEST/usr/share/doc/modemmanager/README < wpa_supplicant/.config << "EOF" -CONFIG_BACKEND=file -CONFIG_CTRL_IFACE=y -CONFIG_DEBUG_FILE=y -CONFIG_DEBUG_SYSLOG=y -CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON -CONFIG_DRIVER_NL80211=y CONFIG_DRIVER_WEXT=y +CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL32=y CONFIG_DRIVER_WIRED=y -CONFIG_EAP_GTC=y -CONFIG_EAP_LEAP=y +CONFIG_IEEE8021X_EAPOL=y CONFIG_EAP_MD5=y CONFIG_EAP_MSCHAPV2=y -CONFIG_EAP_OTP=y -CONFIG_EAP_PEAP=y CONFIG_EAP_TLS=y +CONFIG_EAP_PEAP=y CONFIG_EAP_TTLS=y -CONFIG_IEEE8021X_EAPOL=y -CONFIG_IPV6=y -CONFIG_LIBNL32=y -CONFIG_PEERKEY=y +CONFIG_EAP_FAST=y +CONFIG_EAP_GTC=y +CONFIG_EAP_OTP=y +CONFIG_EAP_SIM=y +CONFIG_EAP_PSK=y +CONFIG_EAP_PWD=y +CONFIG_EAP_PAX=y +CONFIG_EAP_LEAP=y +CONFIG_EAP_AKA=y +CONFIG_EAP_AKA_PRIME=y +CONFIG_WPS=y CONFIG_PKCS12=y -CONFIG_READLINE=y CONFIG_SMARTCARD=y -CONFIG_WPS=y -CFLAGS += -I/usr/include/libnl3 -CONFIG_CTRL_IFACE_DBUS=y +CONFIG_PCSC=y +CONFIG_HT_OVERRIDES=y +CONFIG_VHT_OVERRIDES=y +CONFIG_IPV6=y +CONFIG_CTRL_IFACE=y +CONFIG_WPA_CLI_EDIT=y +CONFIG_SAE=y +CONFIG_BACKEND=file +CONFIG_IEEE80211W=y +CONFIG_TLS=openssl +CONFIG_TLSV11=y +CONFIG_TLSV12=y CONFIG_CTRL_IFACE_DBUS_NEW=y CONFIG_CTRL_IFACE_DBUS_INTRO=y +CONFIG_DELAYED_MIC_ERROR_REPORT=y +CONFIG_AP=y +CONFIG_P2P=y +CONFIG_AUTOSCAN_PERIODIC=y +CONFIG_IBSS_RSN=y +CONFIG_BGSCAN_SIMPLE=y + EOF } diff --git a/repo/xi/xipkg.xibuild b/repo/xi/xipkg.xibuild index 7c82593..06ad176 100644 --- a/repo/xi/xipkg.xibuild +++ b/repo/xi/xipkg.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="make" DEPS="openssl curl dash xiutils findutils diffutils sed xichroot grep base64" -PKG_VER=1.1.4 +PKG_VER=1.1.6 SOURCE=https://git.davidovski.xyz/xilinux/xipkg.git BRANCH="v$PKG_VER" -- cgit v1.2.1