commit e57ae0b894b2c5c3a95691bd8ecefb4eb134e9d8
parent 8ede6a7d219a13e6a26bf587ee782a661a65c220
Author: ccx <ccx@te2000.cz>
Date: Sat, 13 Apr 2024 14:28:19 +0000
safe-link, update packages
Diffstat:
38 files changed, 662 insertions(+), 111 deletions(-)
diff --git a/files/s6-rc_fdholder_max.patch b/files/s6-rc_fdholder_max.patch
@@ -0,0 +1,13 @@
+diff --git a/src/s6-rc/s6-rc-fdholder-filler.c b/src/s6-rc/s6-rc-fdholder-filler.c
+index 85e003c..e56ae0e 100644
+--- a/src/s6-rc/s6-rc-fdholder-filler.c
++++ b/src/s6-rc/s6-rc-fdholder-filler.c
+@@ -15,7 +15,7 @@
+ #define USAGE "s6-rc-fdholder-filler [ -1 ] [ -t timeout ] < autofilled-filename"
+ #define dieusage() strerr_dieusage(100, USAGE)
+
+-#define N 4096
++#define N 65536
+
+ static inline unsigned int class (char c)
+ {
diff --git a/files/s6_ftrigr_max.patch b/files/s6_ftrigr_max.patch
@@ -0,0 +1,13 @@
+diff --git a/src/include/s6/ftrigr.h b/src/include/s6/ftrigr.h
+index b9360e9..0309dfe 100644
+--- a/src/include/s6/ftrigr.h
++++ b/src/include/s6/ftrigr.h
+@@ -24,7 +24,7 @@
+ #define FTRIGR_BANNER2 "ftrigr v1.0 (a)\n"
+ #define FTRIGR_BANNER2_LEN (sizeof FTRIGR_BANNER2 - 1)
+
+-#define FTRIGR_MAX 1000
++#define FTRIGR_MAX 4000
+
+
+ /* Internals of the ftrigr_t */
diff --git a/files/safelink.c b/files/safelink.c
@@ -0,0 +1,100 @@
+#include <errno.h> /* for errno */
+#include <fcntl.h> /* for mkdirat() openat() */
+#include <stdbool.h> /* for bool */
+
+#include <skalibs/strerr2.h>
+
+#define PROG "safelink"
+#define USAGE "safelink oldpath newpath"
+#define BUFLEN 260
+
+char* opendir_nofollow(char *pathname, int *fd, bool create_dirs)
+{
+ char next[BUFLEN];
+ int fd1, fd2;
+ const char *base; /* final part (basename) to return */
+ const char *s1 = pathname;
+ char *s2 = next;
+
+ if(pathname[0] == '/') {
+ fd1 = open("/", O_NOFOLLOW | O_DIRECTORY | O_RDONLY);
+ if(fd1 < 0) {
+ strerr_diefu1sys(111, "open() root");
+ }
+ s1++;
+ } else {
+ fd1 = open(".", O_NOFOLLOW | O_DIRECTORY | O_RDONLY);
+ if(fd1 < 0) {
+ strerr_diefu1sys(111, "open() CWD");
+ }
+ }
+ base = s1;
+ while (*s1) {
+ /* Copy character by character from pathname[] to next[]. */
+ *(s2++) = *(s1++);
+ if (s2 >= &next[BUFLEN]) {
+ strerr_dief1x(100, "filename exceeded buffer size");
+ }
+ if(*s1 == 0) {
+ /* end of string, return dir fd and final path component */
+ *fd = fd1;
+ return base;
+ }
+ if(*s1 == '/') {
+ if(*s1) { s1++; }
+ if(s2 == next) { continue; } /* skip empty filename or trailing slash */
+ *s2 = 0; /* null-terminate the string in next[] */
+ s2 = next; /* reset s2 pointer to the start of next[] for next dirname */
+
+ /* Try opening the directory in next[]. */
+ fd2 = openat(fd1, next, O_NOFOLLOW | O_DIRECTORY | O_RDONLY);
+ if(fd2 < 1) {
+ if(errno == ENOENT) {
+ if(!create_dirs) {
+ strerr_dief2x(111, "directory does not exist: ", next);
+ }
+ /* Create the missing directory. */
+ if(mkdirat(fd1, next, 0777) != 0) {
+ strerr_diefu2sys(111, "mkdirat(): ", next);
+ }
+ /* Open the newly created directory. */
+ fd2 = openat(fd1, next, O_NOFOLLOW | O_DIRECTORY | O_RDONLY);
+ if(fd2 < 1) {
+ strerr_diefu2sys(111, "openat(): ", next);
+ }
+ } else {
+ strerr_diefu2sys(111, "openat(): ", next);
+ }
+ }
+
+ /* Close the parent directory and replace reference to it with the newly opened one. */
+ close(fd1);
+ fd1 = fd2;
+ base = s1 + 1;
+ }
+ }
+}
+
+int main (int argc, char const *const *argv)
+{
+ if (argc != 2) {
+ strerr_dieusage(100, USAGE);
+ }
+ int old_fd, new_fd;
+ char *old_base, *new_base;
+ old_base = opendir_nofollow(argv[1], &old_fd, false);
+ if(old_base[0] == 0) {
+ strerr_dief2x(100, "malformed path: ", argv[1]);
+ }
+ new_base = opendir_nofollow(argv[2], &new_fd, true);
+ if(new_base[0] == 0) {
+ strerr_dief2x(100, "malformed path: ", argv[2]);
+ }
+ if(linkat(old_fd, old_base, new_fd, new_base, 0) != 0) {
+ strerr_diefu1sys(111, "linkat()");
+ }
+ return 0 ;
+}
+
+/* vim: sw=2 sts=2 et
+*/
diff --git a/files/spawn-pty.c b/files/spawn-pty.c
@@ -2,16 +2,15 @@
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
-#include <unistd.h> /* fork(), getpid() */
-#include <sys/wait.h>
-#include <sys/select.h>
-#include <assert.h>
+#include <unistd.h> /* fork(), getpid(), setsid(), tcsetpgrp() */
+#include <stdlib.h> /* grantpt(), unlockpt(), ptsname() */
#include <skalibs/exec.h>
#include <skalibs/djbunix.h>
#include <skalibs/strerr2.h>
-#define USAGE "spawn-pty term_name { master } prog..."
+#define PROG "spawn-pty"
+#define USAGE "spawn-pty term_name { pty-prog ... } ptmx-prog ..."
#define dieusage() strerr_dieusage(100, USAGE)
#define resetsig(S) if(signal(S, SIG_DFL) == SIG_ERR) { \
@@ -19,16 +18,32 @@
}
void exec_terminal(const char *term_env, const char **ptmx_argv, const char **pty_argv) {
- int ptmx_fd, pty_fd;
- if (openpty(&ptmx_fd, &pty_fd, NULL, NULL, NULL) != 0) {
- strerr_dief1sys(111, "openpty() failed");
+ int ptmx_fd;
+ const char *pts_name;
+
+ ptmx_fd = posix_openpt(O_RDWR | O_NOCTTY);
+ if (ptmx_fd < 0) {
+ strerr_dief1sys(111, "posix_openpt()");
+ }
+ if (grantpt(ptmx_fd) != 0) {
+ strerr_dief1sys(111, "grantpt()");
+ }
+ if (unlockpt(ptmx_fd) != 0) {
+ strerr_dief1sys(111, "unlockpt()");
}
+ pts_name = ptsname(ptmx_fd);
+ if (pts_name == NULL) {
+ strerr_dief1sys(111, "ptsname()");
+ }
+
int fork_pid = fork();
if(fork_pid < 0) {
strerr_dief1sys(111, "fork()");
}
if(fork_pid == 0) {
/* child */
+ int pty_fd;
+
resetsig(SIGHUP);
resetsig(SIGINT);
resetsig(SIGQUIT);
@@ -40,9 +55,23 @@ void exec_terminal(const char *term_env, const char **ptmx_argv, const char **pt
resetsig(SIGTSTP);
resetsig(SIGTTIN);
resetsig(SIGTTOU);
+
if(close(ptmx_fd) != 0) {
strerr_dief1sys(111, "close(ptmx_fd) in child");
}
+
+ if(setsid() < 0) { /* create new session */
+ strerr_dief1sys(111, "setsid");
+ }
+ /* open without O_NOCTTY so controlling terminal gets set */
+ pty_fd = open(pts_name, O_RDWR);
+ if (ptmx_fd < 0) {
+ strerr_dief1sys(111, "open(pty)");
+ }
+ if (tcsetpgrp(pty_fd, getpid()) < 0) { /* set controlling terminal */
+ strerr_dief1sys(111, "tcsetpgrp");
+ }
+
if(dup2(pty_fd, 0) < 0) {
strerr_dief1sys(111, "dup2(pty_fd, 0) in child");
}
@@ -61,9 +90,6 @@ void exec_terminal(const char *term_env, const char **ptmx_argv, const char **pt
xmexec_n(pty_argv, envstr, strlen(envstr), 1);
} else {
/* parent */
- if(close(pty_fd) != 0) {
- strerr_dief1sys(111, "close(pty_fd) in parent");
- }
if(dup2(ptmx_fd, 0) < 0) {
strerr_dief1sys(111, "dup2(ptmx_fd, 0) in parent");
}
@@ -71,36 +97,46 @@ void exec_terminal(const char *term_env, const char **ptmx_argv, const char **pt
strerr_dief1sys(111, "close(ptmx_fd) in parent");
}
// # parent
- // env = dict(os.environ)
- // env['PTY_FD'] = "0"
+ // env['PTMX_FD'] = "0"
// execve(terminal, env)
- xexec(ptmx_argv);
+ char envstr[9 + strlen(pts_name)];
+ memcpy(envstr, "PTS_NAME=", 9);
+ strcpy(&envstr[8], term_env);
+ xmexec_n(ptmx_argv, envstr, strlen(envstr), 1);
}
}
typedef const char * arg_t;
int main(const int argc, const char **argv) {
- arg_t ptmx_argv[argc];
+ if(argc < 2) {
+ dieusage();
+ }
+ arg_t pty_argv[argc];
const char *term_env = argv[1];
int n = 2;
- while(n < argc - 1) {
+ if(term_env[0] == ' ') {
+ dieusage();
+ }
+ if(argv[2][0] != ' ') {
+ strerr_dieusage(100, USAGE "\nerror: missing block");
+ }
+ for(int n = 2; n < argc - 1; n++) {
switch(argv[n][0]) {
case 0:
- ptmx_argv[n - 2] = 0;
- exec_terminal(term_env, ptmx_argv, &argv[n + 1]);
+ pty_argv[n - 2] = 0;
+ exec_terminal(term_env, &argv[n + 1], pty_argv);
return 111;
case ' ':
- ptmx_argv[n - 2] = &argv[n][1];
- n++;
+ pty_argv[n - 2] = &argv[n][1];
break;
default:
- strerr_dieusage(100, "spawn-pty: improperly terminated block");
+ strerr_dieusage(100, USAGE "\nerror: improperly terminated block");
return 100;
}
}
- strerr_dieusage(100, "spawn-pty: unterminated block");
- return 100;
+ strerr_dieusage(100, USAGE "\nerror: unterminated block");
}
-/* vim ft=c sts=2 sw=2 et */
+/* vim: ft=c sts=2 sw=2 et
+*/
diff --git a/packages/aat b/packages/aat
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:5ce6a6a1224101ce5b0dfec1544a98c94d233ae0:aat
: ${JOBS:=1}
diff --git a/packages/confz b/packages/confz
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:c6aef8098d37a1773439117a5674bfc8662ef62b:confz
: ${JOBS:=1}
diff --git a/packages/containers b/packages/containers
@@ -1,9 +1,9 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#@git:a43ba149e373c838e6e237ba95d103b42d4d0093:containers
+#@git:21f30832373acac1bb7207a81ca3b7ffa18f5e18:containers
: ${JOBS:=1}
prefix=/versions/$pthbs_package
diff --git a/packages/containers.environment b/packages/containers.environment
@@ -1,16 +1,16 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
#+s6-portable-utils.4c31c00a77c0b995e5d5fc4b802707b47e39e5b930a0ca22141802682d9ce592
#+s6-linux-utils.1061454b63433995a826b1dd134a1d9f36486f9dabb108325157e6541b6f50a7
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.ba1536b2219e1801ccf05cc164d1f0baaac1978389c24bc81a2d7ff248cb1d20
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+confz.208d2a701777a5703ca126f9fee4220610a9fb2b5241c5850d66a92bc0e682b2
+#+containers.f505d6ed0c843d085f79b90ed638dcb7473fe4602cfcba4f453c2a3f6eaa7421
#+xbps.9831b74b8d46bb8c240d6ba606b13d3a80d67804ddbce5e828bef08377d0f9b0
#+zstd.ab99ab40fa027a935e6012884c3988d7161dc0c6ff10c06566c0a92c694bca07
#+apk-tools.c9cdb867562a26201a1618e0b1bf2147e6cee6aff1a6901909ee911a4462327a
#+alpine-keys.c541ae09189f19994476df864795dd7c26486939981309be95de258ab1554fa1
#+getent.15c11d87a5194766f1ba7b78feac3b77792756cfb12a84c5f5d0f2c7c1cfd25d
-#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
+#+fileset.a274be52a358efbef7f42628a36ff98464608ab67d3bd4382323d60f9b854697
#+pidns_run.1b51b40570a993155e0dc1de2efb01d15f2852180272e763630b9500ea475846
\ No newline at end of file
diff --git a/packages/default.environment b/packages/default.environment
@@ -1,8 +1,8 @@
-#+system-config.6b00881bc47e9b51d527ee48fdf42706de04be62202c8bbd901a56bafa8272cd
-#+system-config-rc.aec407b2160901bd2b0104834cd2f5c74518430f2382ba9606c1c93f8396989c
-#+system-config-scripts.ac300ce9214b7e302ac630c3335cd537000ec030b409ee951e53c563d9f71891
-#+system-config-init.16c92d4d3234c0c4133ad094ecbd20037e0324bdff9f265be3ea5d9796aa949c
-#+system-config-zsh.1f09219345bc5468ae634bec90576c270cf60dc0b7c71ebaecb6d61d019072d9
+#+system-config.ff88046233b341bd0219fe24ea22512e2ec477abee044c27345dca1f3d1b8860
+#+system-config-rc.2ca809836808be21b6ba7198d0d363d416581eff967c4d97e119327ab08f7563
+#+system-config-scripts.67e57dfdf150bbd6e0b01d5ca3fa89f0547997a8adb2c12f7e4d67602acb161a
+#+system-config-init.527c957e0c16bca5ed21d47ca4b7048e7fe48aab6f336bbc120545b66c893233
+#+system-config-zsh.7500a7c1af8c349cd87493d5f6e2fe5c31148b42d11103154ecca654e6326ba5
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
@@ -12,23 +12,23 @@
#+bison.fed01ec0597b5f4443ca53edb88e09263e1edbec32cb3bdc2d7c8642c295ab64
#+rsync.b356835b04c5d49533ce9cd7660fd7d61f50d1c1d527b123f46e3eb2f25d3989
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
-#+s6-rc.b779b39c6ffc3d538714d5b2b767f13fd5a4987ecaf7a618e639101098aa4b86
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+s6-rc.8de8b5eb1d1b72185b4693b874cb5477b49997800e95ab5a3035fb957e588147
#+s6-portable-utils.4c31c00a77c0b995e5d5fc4b802707b47e39e5b930a0ca22141802682d9ce592
#+s6-linux-utils.1061454b63433995a826b1dd134a1d9f36486f9dabb108325157e6541b6f50a7
-#+s6-linux-init.19ec878452398fbf9de39f5dd23cd8545f703b10c73b53b6c9443db9d9274e71
+#+s6-linux-init.3c55d2440534aba76b2ed07fe4b33f82b8eb20372f5f0ebc9f539ebe6ebb8847
#+mdevd.784288d5ae7ddbed20396021e0a8be1518d386381d1141c5d3ec8b1796b6463b
#+s6-dns.0e04114b7f9f8118d544eb4f9e2f67dc31ae9d098d5bca7c82eec5711807b6d7
#+libressl.712d293b92e9b1beb4a8b5905c45ea20cab64e3ddd9796f9c2781577f04771ab
-#+s6-networking.2b546788c0342db01904ab3b4bb4161b8b0d3065e51f86299f5506001c54b61a
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
-#+aat.e073f6b23349ea7153987ad737fc80f909241ae4a0c0a22adc12392fcad71597
-#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.ba1536b2219e1801ccf05cc164d1f0baaac1978389c24bc81a2d7ff248cb1d20
-#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+logincaps.b0e776a021bae4381e976e264617f074ffb191eb510c378b9b2186bedaf4f97d
-#+snaprep.42b7b97b7530a211dd0f01680c9b15362aa2e7249bc27cea0deb0632f7535bb1
+#+s6-networking.09cc6b051d87cc67eaa6878833b4934be6b14735f3e5f855e4e63274609df811
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
+#+aat.bbab9c74688b933e314ebcfd721c558b60dfbff973a9be3735750d93504ba2ef
+#+confz.208d2a701777a5703ca126f9fee4220610a9fb2b5241c5850d66a92bc0e682b2
+#+containers.f505d6ed0c843d085f79b90ed638dcb7473fe4602cfcba4f453c2a3f6eaa7421
+#+fileset.a274be52a358efbef7f42628a36ff98464608ab67d3bd4382323d60f9b854697
+#+logincaps.bc2dddd37f74632c5dea6eb1300838321b4c29fa4177e6bc368eca8c1bd4bc06
+#+snaprep.4f1281cfb76562b94e47b6c021584d870be9c2900bd8d52db40848f58b5f7812
#+curl.b82f818e85570a561ca20ca417adba2f1c3214ef5c3e01626c0a4aa099b90f0c
#+git.1839db7305bbee32d184adc0ece64d40ab58132d3c7749b426c4d680659bd4eb
#+xbps.9831b74b8d46bb8c240d6ba606b13d3a80d67804ddbce5e828bef08377d0f9b0
@@ -39,4 +39,5 @@
#+libcap.3528f93ae9873fceae62855cb7c0fa521ac2c3cfabe71bf58ba01483136bf5fd
#+applyuidgid-caps.25f0135c22be3d3dcd34e06378e41b98cdc5201319131e99da81ae2af1af7767
#+nosuid.0e8db424c6fe3c4f9543a126159dc59afc81fc28df33e5287121d28f71c574b5
-#+spawn-pty.5f007fa455875e601548d11d4e65b875424342420c0c6edd53452e007bc60ec7-
\ No newline at end of file
+#+spawn-pty.e94a519d34a637d5fe414c4ee679553a3d88379220a91fd829a81d4a92e87535
+#+safelink.2d92de9b612ee28903b199a7635db564e24f5ee31a0008bfa0cb16972bd46284+
\ No newline at end of file
diff --git a/packages/fileset b/packages/fileset
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:1b161b09bc889d17ac0a4ccce2dc3e74b64e1433:fileset
: ${JOBS:=1}
diff --git a/packages/libbsd b/packages/libbsd
@@ -0,0 +1,115 @@
+#!/usr/bin/env pthbs-build
+#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
+#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
+#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
+#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
+#+m4.d61a4ef6e5ca207e24ed8bbbd9931e1e0ac2359ed5aae4e384b49d71401b4840
+#+libmd.42506246dfffec6acdfb5badab2e047fef95aa651a046a617df36883f526ebc5
+#@untar:-J:sha256:55fdfa2696fb4d55a592fa9ad14a9df897c7b0008ddb3b30c419914841f85f33:.
+
+build_env_static() {
+ export LD_LIBRARY_PATH="$pthbs_build_environment/library"
+ export CPATH="$pthbs_build_environment/include"
+ export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS"
+}
+autotools_config() {
+ prefix=/versions/$pthbs_package
+ ./configure -C \
+ --prefix="$prefix" \
+ --build="$(${CC:-gcc} -dumpmachine)" \
+ --bindir="$prefix/command" \
+ --sbindir="$prefix/command" \
+ --infodir="$prefix/info" \
+ --localedir="$prefix/locale" \
+ --mandir="$prefix/man" \
+ --libdir="$prefix/library" \
+ --docdir="$prefix/doc/libbsd" \
+ --datadir="$prefix/data" \
+ --datarootdir="$prefix/data" \
+ --localstatedir='/var/pthbs' \
+ "$@"
+
+}
+
+autotools() {
+ cd "$1"
+ shift
+ autotools_config "$@"
+ make -j${JOBS:-1} -l$((1+${JOBS:-1}))
+ make DESTDIR="$pthbs_destdir" install
+}
+
+autotools_static() {
+ build_env_static
+ autotools "$@" --enable-static --disable-shared
+}
+check_static() {
+ local exe || true
+ exe=$pthbs_destdir/'/versions'/$pthbs_package/$1
+ if ! test -f $exe; then
+ printf '%s\n' "Error: file '$1' doesn't exist!"
+ exit 1
+ fi
+ interp_info=$(readelf --string-dump=.interp "$exe") || exit $?
+ if test x '!=' "x$interp_info"; then
+ printf '%s\n' "Error: '$1' is a dynamic binary!"
+ exit 1
+ fi
+}
+
+autotools_static libbsd-0.11.8
+
+
+cd "$pthbs_destdir/versions/$pthbs_package"
+find -type d -o -print | awk -F/ '
+BEGIN {
+ x["./library/libbsd.a"]=1
+ x["./include/bsd/bsd.h"]=1
+}
+
+function r1(s) {
+ sub("^[.]/[^/]*", ".", s)
+ return s
+}
+function s1(repl, s) {
+ sub("^[.]/[^/]*", "./"repl, s)
+ return s
+}
+function link(src) {
+ x[$0]=0
+ printf "%s\t%s\n", $0, src
+ printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
+}
+$1!="."{exit 1}
+
+
+$2 == "command" { link($0); next }
+$2 == "bin" { link(s1("command", $0)); next }
+
+$2 == "library.so" { link($0); next }
+$2 == "library" { link($0); next }
+$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
+$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next }
+
+$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
+
+$2 == "man" { link($0); next }
+$2 == "info" { link($0); next }
+$2 == "doc" { link($0); next }
+$2 == "icons" { link($0); next }
+$2 == "terminfo" { link($0); next }
+$2 == "data" { link($0); next }
+$2 == "include" { link($0); next }
+
+{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
+
+END {
+ for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
+ for(fname in x) {
+ if(x[fname]) {
+ printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
+ exit 3
+ }
+ }
+}' >.install-links.new
+mv .install-links.new .install-links
diff --git a/packages/libmd b/packages/libmd
@@ -0,0 +1,115 @@
+#!/usr/bin/env pthbs-build
+#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
+#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
+#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
+#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
+#+m4.d61a4ef6e5ca207e24ed8bbbd9931e1e0ac2359ed5aae4e384b49d71401b4840
+#@untar:-J:sha256:1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332:.
+
+build_env_static() {
+ export LD_LIBRARY_PATH="$pthbs_build_environment/library"
+ export CPATH="$pthbs_build_environment/include"
+ export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS"
+}
+autotools_config() {
+ prefix=/versions/$pthbs_package
+ ./configure -C \
+ --prefix="$prefix" \
+ --build="$(${CC:-gcc} -dumpmachine)" \
+ --bindir="$prefix/command" \
+ --sbindir="$prefix/command" \
+ --infodir="$prefix/info" \
+ --localedir="$prefix/locale" \
+ --mandir="$prefix/man" \
+ --libdir="$prefix/library" \
+ --docdir="$prefix/doc/libmd" \
+ --datadir="$prefix/data" \
+ --datarootdir="$prefix/data" \
+ --localstatedir='/var/pthbs' \
+ "$@"
+
+}
+
+autotools() {
+ cd "$1"
+ shift
+ autotools_config "$@"
+ make -j${JOBS:-1} -l$((1+${JOBS:-1}))
+ make DESTDIR="$pthbs_destdir" install
+}
+
+autotools_static() {
+ build_env_static
+ autotools "$@" --enable-static --disable-shared
+}
+check_static() {
+ local exe || true
+ exe=$pthbs_destdir/'/versions'/$pthbs_package/$1
+ if ! test -f $exe; then
+ printf '%s\n' "Error: file '$1' doesn't exist!"
+ exit 1
+ fi
+ interp_info=$(readelf --string-dump=.interp "$exe") || exit $?
+ if test x '!=' "x$interp_info"; then
+ printf '%s\n' "Error: '$1' is a dynamic binary!"
+ exit 1
+ fi
+}
+
+autotools_static libmd-1.1.0
+
+
+cd "$pthbs_destdir/versions/$pthbs_package"
+find -type d -o -print | awk -F/ '
+BEGIN {
+ x["./library/libmd.a"]=1
+ x["./include/rmd160.h"]=1
+ x["./include/sha512.h"]=1
+}
+
+function r1(s) {
+ sub("^[.]/[^/]*", ".", s)
+ return s
+}
+function s1(repl, s) {
+ sub("^[.]/[^/]*", "./"repl, s)
+ return s
+}
+function link(src) {
+ x[$0]=0
+ printf "%s\t%s\n", $0, src
+ printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
+}
+$1!="."{exit 1}
+
+
+$2 == "command" { link($0); next }
+$2 == "bin" { link(s1("command", $0)); next }
+
+$2 == "library.so" { link($0); next }
+$2 == "library" { link($0); next }
+$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
+$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next }
+
+$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
+
+$2 == "man" { link($0); next }
+$2 == "info" { link($0); next }
+$2 == "doc" { link($0); next }
+$2 == "icons" { link($0); next }
+$2 == "terminfo" { link($0); next }
+$2 == "data" { link($0); next }
+$2 == "include" { link($0); next }
+
+{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
+
+END {
+ for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
+ for(fname in x) {
+ if(x[fname]) {
+ printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
+ exit 3
+ }
+ }
+}' >.install-links.new
+mv .install-links.new .install-links
diff --git a/packages/logincaps b/packages/logincaps
@@ -1,10 +1,10 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
-#@git:74a5987415c09fdac410eaeb26a8fd79be49906a:logincaps
+#@git:c7740ea2debf35723b5728ebbd78d2cab0296cdf:logincaps
: ${JOBS:=1}
prefix=/versions/$pthbs_package
diff --git a/packages/mdev-scripts b/packages/mdev-scripts
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:6f990f8e9d46667a1a128d49d822968830d36c99:mdev-scripts
def_prefix() {
diff --git a/packages/mdevd.environment b/packages/mdevd.environment
@@ -1,5 +1,5 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
-#+mdev-scripts.650e56bda7f6be74be2a29ac756ffef0dc765f2557640d6764908c8f5e98930e
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+mdev-scripts.e86280970355f094dc03cebef4497513dfddaecc6873b683b99e54172673c6f4
#+mdevd.784288d5ae7ddbed20396021e0a8be1518d386381d1141c5d3ec8b1796b6463b
\ No newline at end of file
diff --git a/packages/pthbs-banginstall b/packages/pthbs-banginstall
@@ -1,6 +1,6 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
#@sha256:1e021bddaf5c020ede9107656494715236a894557b99035365fc999605541b2d:pthbs-banginstall
installdir="$pthbs_destdir//versions/$pthbs_package"
diff --git a/packages/s6 b/packages/s6
@@ -7,12 +7,14 @@
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
#@git:3e7acf5c35999492e7feeaa59616510bf9cc51ac:s6
#@sha256:627d1273036dc35239ba9dd1da45132e3bfce1ab8171dd27dc7952cdf09b698e:s6_clone3_newpid.patch
+#@sha256:64488d8562a4e98a3b299f095bb2550cff6a3d743dc2b9c5aaeea03e5b83ec33:s6_ftrigr_max.patch
: ${JOBS:=1}
prefix=/versions/$pthbs_package
cd s6
patch -up 1 -i ../s6_clone3_newpid.patch
+patch -up 1 -i ../s6_ftrigr_max.patch
./configure \
--prefix="$prefix" \
--dynlibdir="${prefix}/library.so" \
diff --git a/packages/s6-linux-init b/packages/s6-linux-init
@@ -4,7 +4,7 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+skalibs.b3931b1ec501dfd4603e293b20d0db46cb7644cf99225e6175060852b34f365f
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
#@git:42a91a98b780759257862642c764c2102237fea6:s6-linux-init
: ${JOBS:=1}
diff --git a/packages/s6-networking b/packages/s6-networking
@@ -4,7 +4,7 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+skalibs.b3931b1ec501dfd4603e293b20d0db46cb7644cf99225e6175060852b34f365f
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
#+s6-dns.0e04114b7f9f8118d544eb4f9e2f67dc31ae9d098d5bca7c82eec5711807b6d7
#+libressl.712d293b92e9b1beb4a8b5905c45ea20cab64e3ddd9796f9c2781577f04771ab
#@git:68db8af7c26461d4477f482ecbc279729fa911e4:s6-networking
diff --git a/packages/s6-rc b/packages/s6-rc
@@ -4,12 +4,15 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+skalibs.b3931b1ec501dfd4603e293b20d0db46cb7644cf99225e6175060852b34f365f
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+patch.c2f2ffe5c9b78dce8f2a1adeca76c83dd548ffcabed790bfb6e886e9d27474bb
+#@sha256:e921297e3411e3b4eb53d1b25601d21b1843dc89cbb9a967e7bab2605c1426ad:s6-rc_fdholder_max.patch
#@git:b79282b3746ff67c3c0df8aa32814b3688b91d4f:s6-rc
: ${JOBS:=1}
prefix=/versions/$pthbs_package
cd 's6-rc'
+patch -up 1 -i ../s6-rc_fdholder_max.patch
./configure \
--prefix="$prefix" \
--dynlibdir="${prefix}/library.so" \
diff --git a/packages/safelink b/packages/safelink
@@ -0,0 +1,92 @@
+#!/usr/bin/env pthbs-build
+#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
+#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
+#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
+#+skalibs.b3931b1ec501dfd4603e293b20d0db46cb7644cf99225e6175060852b34f365f
+#@sha256:f82f6eb160d3c155ee393fd8b9ca04fc9c387a3c6776926c92de0b185e840062:safelink.c
+
+name=safelink
+check_static() {
+ local exe || true
+ exe=$pthbs_destdir/'/versions'/$pthbs_package/$1
+ if ! test -f $exe; then
+ printf '%s\n' "Error: file '$1' doesn't exist!"
+ exit 1
+ fi
+ interp_info=$(readelf --string-dump=.interp "$exe") || exit $?
+ if test x '!=' "x$interp_info"; then
+ printf '%s\n' "Error: '$1' is a dynamic binary!"
+ exit 1
+ fi
+}
+build_env_static() {
+ export LD_LIBRARY_PATH="$pthbs_build_environment/library"
+ export CPATH="$pthbs_build_environment/include"
+ export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS"
+}
+def_prefix() {
+ prefix=/versions/$pthbs_package
+}
+def_dest() {
+ dest=${pthbs_destdir%/}//versions/$pthbs_package
+}
+build_env_static
+def_prefix
+
+gcc -ggdb -D_GNU_SOURCE -static -o $name $name.c $LDFLAGS -lskarnet
+
+install -d "$pthbs_destdir/$prefix/command"
+install -m 755 $name "$pthbs_destdir/$prefix/command"
+check_static command/$name
+
+cd "$pthbs_destdir/versions/$pthbs_package"
+find -type d -o -print | awk -F/ '
+BEGIN {
+ x["./command/safelink"]=1}
+
+function r1(s) {
+ sub("^[.]/[^/]*", ".", s)
+ return s
+}
+function s1(repl, s) {
+ sub("^[.]/[^/]*", "./"repl, s)
+ return s
+}
+function link(src) {
+ x[$0]=0
+ printf "%s\t%s\n", $0, src
+ printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
+}
+$1!="."{exit 1}
+
+
+$2 == "command" { link($0); next }
+$2 == "bin" { link(s1("command", $0)); next }
+
+$2 == "library.so" { link($0); next }
+$2 == "library" { link($0); next }
+$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
+$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next }
+
+$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
+
+$2 == "man" { link($0); next }
+$2 == "info" { link($0); next }
+$2 == "doc" { link($0); next }
+$2 == "icons" { link($0); next }
+$2 == "terminfo" { link($0); next }
+$2 == "data" { link($0); next }
+$2 == "include" { link($0); next }
+
+{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
+
+END {
+ for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
+ for(fname in x) {
+ if(x[fname]) {
+ printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
+ exit 3
+ }
+ }
+}' >.install-links.new
+mv .install-links.new .install-links
diff --git a/packages/snaprep b/packages/snaprep
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:e9d8af262eb5e25536ea9778e3ed57aebb55488c:snaprep
: ${JOBS:=1}
diff --git a/packages/spawn-pty b/packages/spawn-pty
@@ -3,7 +3,7 @@
#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+skalibs.b3931b1ec501dfd4603e293b20d0db46cb7644cf99225e6175060852b34f365f
-#@sha256:c2bd8f5b6b4eb8bb5497b4c9dc17f29dfdb12a2222f20a0af6fd296791ae188c:spawn-pty.c
+#@sha256:a6779ebb826c5e48d1023f113d5f370fe9f90788a6c5bdd05234efdcb2850ea7:spawn-pty.c
name=spawn-pty
check_static() {
diff --git a/packages/system-config b/packages/system-config
@@ -2,19 +2,19 @@
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+diffutils.fd5fae528e3d092e2e30271e8e273cd7fdecce4642547308ca3356e654c3990b
#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
-#+aat.e073f6b23349ea7153987ad737fc80f909241ae4a0c0a22adc12392fcad71597
-#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
+#+aat.bbab9c74688b933e314ebcfd721c558b60dfbff973a9be3735750d93504ba2ef
+#+fileset.a274be52a358efbef7f42628a36ff98464608ab67d3bd4382323d60f9b854697
#+rsync.b356835b04c5d49533ce9cd7660fd7d61f50d1c1d527b123f46e3eb2f25d3989
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
#+kbd.4d0b59602cb299724eca17b59bddd6fbb1a72ad73b0103801da528856c31d461
#+mdevd.784288d5ae7ddbed20396021e0a8be1518d386381d1141c5d3ec8b1796b6463b
#+s6-linux-utils.1061454b63433995a826b1dd134a1d9f36486f9dabb108325157e6541b6f50a7
-#+s6-rc.b779b39c6ffc3d538714d5b2b767f13fd5a4987ecaf7a618e639101098aa4b86
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+system-config-scripts.ac300ce9214b7e302ac630c3335cd537000ec030b409ee951e53c563d9f71891
-#+logincaps.b0e776a021bae4381e976e264617f074ffb191eb510c378b9b2186bedaf4f97d
-#@git:4363567448b3ab6940f68178d6c2201e681333ca:system-config
+#+s6-rc.8de8b5eb1d1b72185b4693b874cb5477b49997800e95ab5a3035fb957e588147
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+system-config-scripts.67e57dfdf150bbd6e0b01d5ca3fa89f0547997a8adb2c12f7e4d67602acb161a
+#+logincaps.bc2dddd37f74632c5dea6eb1300838321b4c29fa4177e6bc368eca8c1bd4bc06
+#@git:4843829dc4242a50d22bb08b7f12764cb5f7c057:system-config
def_prefix() {
prefix=/versions/$pthbs_package
@@ -43,8 +43,8 @@ cd 'system-config'
printf '%s\n' >config/etc/motd \
"Welcome to $(cat ./config/hostname)!" \
- 'Current running configuration was generated from system-config:4363567448b3ab6940f68178d6c2201e681333ca' \
- 'Last change on 2024-03-22 01:14:03 +0000 by ccx'
+ 'Current running configuration was generated from system-config:4843829dc4242a50d22bb08b7f12764cb5f7c057' \
+ 'Last change on 2024-04-10 16:31:40 +0000 by ccx'
printf '%s\n' >config/etc/skel/loginexec \
"#!$(which execlineb) -S0" \
@@ -52,8 +52,8 @@ printf '%s\n' >config/etc/skel/loginexec \
chmod +x config/etc/skel/loginexec
env 'pthbs_path_system-config'="$prefix" \
- 'pthbs_path_containers=/versions/env.559d4b383bb53eeafe68c3ff519e5d3cc8e99de4f62c48dfa45778a637e6db90' \
- 'pthbs_path_mdevd=/versions/env.dce5c0ff43039f06c93975c7be7c6f2b1cf85f9eec6c01257957bba99c6a6635' \
+ 'pthbs_path_containers=/versions/env.9a280f8ef6882aca2e2a50ce9fbdcbb6d08f28971fd0afd6ce1be997e5243203' \
+ 'pthbs_path_mdevd=/versions/env.5a309bfe5a7cc001ff57983ce6ab94bac975e0f178880621a11c89e7efe5d135' \
make -j${JOBS:-1} -l$((1+${JOBS:-1})) all
sort -u build/execfile | while IFS= read exename; do
diff --git a/packages/system-config-init b/packages/system-config-init
@@ -1,13 +1,13 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
-#+s6-rc.b779b39c6ffc3d538714d5b2b767f13fd5a4987ecaf7a618e639101098aa4b86
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+s6-rc.8de8b5eb1d1b72185b4693b874cb5477b49997800e95ab5a3035fb957e588147
#+s6-portable-utils.4c31c00a77c0b995e5d5fc4b802707b47e39e5b930a0ca22141802682d9ce592
-#+s6-linux-init.19ec878452398fbf9de39f5dd23cd8545f703b10c73b53b6c9443db9d9274e71
+#+s6-linux-init.3c55d2440534aba76b2ed07fe4b33f82b8eb20372f5f0ebc9f539ebe6ebb8847
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+system-config-rc.aec407b2160901bd2b0104834cd2f5c74518430f2382ba9606c1c93f8396989c
+#+system-config-rc.2ca809836808be21b6ba7198d0d363d416581eff967c4d97e119327ab08f7563
-s6rcdb=/versions/system-config-rc.aec407b2160901bd2b0104834cd2f5c74518430f2382ba9606c1c93f8396989c/config/s6-rc-db
+s6rcdb=/versions/system-config-rc.2ca809836808be21b6ba7198d0d363d416581eff967c4d97e119327ab08f7563/config/s6-rc-db
prefix=/versions/$pthbs_package
pkgdir="$pthbs_destdir/$prefix"
diff --git a/packages/system-config-rc b/packages/system-config-rc
@@ -1,9 +1,9 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
-#+s6-rc.b779b39c6ffc3d538714d5b2b767f13fd5a4987ecaf7a618e639101098aa4b86
-#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+system-config.6b00881bc47e9b51d527ee48fdf42706de04be62202c8bbd901a56bafa8272cd
+#+s6-rc.8de8b5eb1d1b72185b4693b874cb5477b49997800e95ab5a3035fb957e588147
+#+fileset.a274be52a358efbef7f42628a36ff98464608ab67d3bd4382323d60f9b854697
+#+system-config.ff88046233b341bd0219fe24ea22512e2ec477abee044c27345dca1f3d1b8860
def_prefix() {
prefix=/versions/$pthbs_package
@@ -13,7 +13,7 @@ def_dest() {
}
def_dest
-src=/versions/system-config.6b00881bc47e9b51d527ee48fdf42706de04be62202c8bbd901a56bafa8272cd/config/s6-rc-source
+src=/versions/system-config.ff88046233b341bd0219fe24ea22512e2ec477abee044c27345dca1f3d1b8860/config/s6-rc-source
s6-rc-compile ./s6-rc-db "$src"
mkdir -p "$dest/config"
mv -v s6-rc-db "$dest/config/"
diff --git a/packages/system-config-scripts b/packages/system-config-scripts
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
#@git:dc793695cc0632a808af9d4415f3b0cf0f4dfba2:system-config-scripts
: ${JOBS:=1}
diff --git a/packages/system-config-zsh b/packages/system-config-zsh
@@ -1,7 +1,7 @@
#!/usr/bin/env pthbs-build
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#@git:f5a8b82b914ca696bbe41453827929bc772f3332:system-config-zsh
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#@git:1390434aaa6e044fc713547a232f20f2aa17f972:system-config-zsh
def_prefix() {
prefix=/versions/$pthbs_package
diff --git a/packages/userspace.environment b/packages/userspace.environment
@@ -7,23 +7,23 @@
#+bison.fed01ec0597b5f4443ca53edb88e09263e1edbec32cb3bdc2d7c8642c295ab64
#+rsync.b356835b04c5d49533ce9cd7660fd7d61f50d1c1d527b123f46e3eb2f25d3989
#+execline.c07cc6461a1750bbf91bc8da1bb6c44487b0c2d3e73512fb691f4b5a63160449
-#+s6.899fa291725e92bad1d55d8712da5f7057d49c386a61ab283fe9eed66f5eac31
-#+s6-rc.b779b39c6ffc3d538714d5b2b767f13fd5a4987ecaf7a618e639101098aa4b86
+#+s6.601377d341f6ee04ca2bdcdaad42df0e04456f07206dd56ba36556bd13956a22
+#+s6-rc.8de8b5eb1d1b72185b4693b874cb5477b49997800e95ab5a3035fb957e588147
#+s6-portable-utils.4c31c00a77c0b995e5d5fc4b802707b47e39e5b930a0ca22141802682d9ce592
#+s6-linux-utils.1061454b63433995a826b1dd134a1d9f36486f9dabb108325157e6541b6f50a7
-#+s6-linux-init.19ec878452398fbf9de39f5dd23cd8545f703b10c73b53b6c9443db9d9274e71
+#+s6-linux-init.3c55d2440534aba76b2ed07fe4b33f82b8eb20372f5f0ebc9f539ebe6ebb8847
#+mdevd.784288d5ae7ddbed20396021e0a8be1518d386381d1141c5d3ec8b1796b6463b
#+s6-dns.0e04114b7f9f8118d544eb4f9e2f67dc31ae9d098d5bca7c82eec5711807b6d7
#+libressl.712d293b92e9b1beb4a8b5905c45ea20cab64e3ddd9796f9c2781577f04771ab
-#+s6-networking.2b546788c0342db01904ab3b4bb4161b8b0d3065e51f86299f5506001c54b61a
-#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
-#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
-#+aat.e073f6b23349ea7153987ad737fc80f909241ae4a0c0a22adc12392fcad71597
-#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.ba1536b2219e1801ccf05cc164d1f0baaac1978389c24bc81a2d7ff248cb1d20
-#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+logincaps.b0e776a021bae4381e976e264617f074ffb191eb510c378b9b2186bedaf4f97d
-#+snaprep.42b7b97b7530a211dd0f01680c9b15362aa2e7249bc27cea0deb0632f7535bb1
+#+s6-networking.09cc6b051d87cc67eaa6878833b4934be6b14735f3e5f855e4e63274609df811
+#+zsh.2ff36a2aed3e11c13386bad0938fa166a6824f8b03b238a97b2922bca3678b2c
+#+pthbs-banginstall.0190099d7db974b8ac922bc571bb572989f6a7e1018400f466173a158a98224c
+#+aat.bbab9c74688b933e314ebcfd721c558b60dfbff973a9be3735750d93504ba2ef
+#+confz.208d2a701777a5703ca126f9fee4220610a9fb2b5241c5850d66a92bc0e682b2
+#+containers.f505d6ed0c843d085f79b90ed638dcb7473fe4602cfcba4f453c2a3f6eaa7421
+#+fileset.a274be52a358efbef7f42628a36ff98464608ab67d3bd4382323d60f9b854697
+#+logincaps.bc2dddd37f74632c5dea6eb1300838321b4c29fa4177e6bc368eca8c1bd4bc06
+#+snaprep.4f1281cfb76562b94e47b6c021584d870be9c2900bd8d52db40848f58b5f7812
#+curl.b82f818e85570a561ca20ca417adba2f1c3214ef5c3e01626c0a4aa099b90f0c
#+git.1839db7305bbee32d184adc0ece64d40ab58132d3c7749b426c4d680659bd4eb
#+xbps.9831b74b8d46bb8c240d6ba606b13d3a80d67804ddbce5e828bef08377d0f9b0
@@ -34,4 +34,5 @@
#+libcap.3528f93ae9873fceae62855cb7c0fa521ac2c3cfabe71bf58ba01483136bf5fd
#+applyuidgid-caps.25f0135c22be3d3dcd34e06378e41b98cdc5201319131e99da81ae2af1af7767
#+nosuid.0e8db424c6fe3c4f9543a126159dc59afc81fc28df33e5287121d28f71c574b5
-#+spawn-pty.5f007fa455875e601548d11d4e65b875424342420c0c6edd53452e007bc60ec7-
\ No newline at end of file
+#+spawn-pty.e94a519d34a637d5fe414c4ee679553a3d88379220a91fd829a81d4a92e87535
+#+safelink.2d92de9b612ee28903b199a7635db564e24f5ee31a0008bfa0cb16972bd46284+
\ No newline at end of file
diff --git a/packages/zsh b/packages/zsh
@@ -5,6 +5,7 @@
#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
#+m4.d61a4ef6e5ca207e24ed8bbbd9931e1e0ac2359ed5aae4e384b49d71401b4840
#+netbsd-curses.ff25fe788224b3d213f4fc5b1627e5c08f24ca35f1590f25465e2bd9fb47ceae
+#+libbsd.b10dae40b24e581364779dc07b7224f4af78d02daa708d413c85f87e72cb1ced
#@git:c73505cc47870bd09e8e204d98ac5976e0d4cb52:zsh_config
#@untar:-J:sha256:9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5:.
diff --git a/templates/pkg/libbsd b/templates/pkg/libbsd
@@ -0,0 +1,12 @@
+{% extends "autotools" %}
+{%- block extra_deps %}
+#+{{pkg_install_name("libmd")}}
+#@untar:-J:sha256:55fdfa2696fb4d55a592fa9ad14a9df897c7b0008ddb3b30c419914841f85f33:.
+{%- endblock %}
+{% block at_script %}
+autotools_static libbsd-0.11.8
+{% endblock %}
+{% block genlinks_begin %}
+ x["./library/libbsd.a"]=1
+ x["./include/bsd/bsd.h"]=1
+{% endblock %}
diff --git a/templates/pkg/libmd b/templates/pkg/libmd
@@ -0,0 +1,12 @@
+{% extends "autotools" %}
+{%- block extra_deps %}
+#@untar:-J:sha256:1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332:.
+{%- endblock %}
+{% block at_script %}
+autotools_static libmd-1.1.0
+{% endblock %}
+{% block genlinks_begin %}
+ x["./library/libmd.a"]=1
+ x["./include/rmd160.h"]=1
+ x["./include/sha512.h"]=1
+{% endblock %}
diff --git a/templates/pkg/s6 b/templates/pkg/s6
@@ -7,13 +7,15 @@
#+{{pkg_install_name("skalibs")}}
#+{{pkg_install_name("execline")}}
#@git:{{submodule.current.s6}}:s6
-#@sha256:627d1273036dc35239ba9dd1da45132e3bfce1ab8171dd27dc7952cdf09b698e:s6_clone3_newpid.patch
+#@sha256:{{files["s6_clone3_newpid.patch"]}}:s6_clone3_newpid.patch
+#@sha256:{{files["s6_ftrigr_max.patch"]}}:s6_ftrigr_max.patch
: ${JOBS:=1}
prefix={{versions}}/$pthbs_package
cd s6
patch -up 1 -i ../s6_clone3_newpid.patch
+patch -up 1 -i ../s6_ftrigr_max.patch
./configure \
--prefix="$prefix" \
--dynlibdir="${prefix}/library.so" \
diff --git a/templates/pkg/s6-rc b/templates/pkg/s6-rc
@@ -2,4 +2,9 @@
{%- block extra_deps %}
#+{{pkg_install_name("execline")}}
#+{{pkg_install_name("s6")}}
+#+{{pkg_install_name("patch")}}
+#@sha256:{{files["s6-rc_fdholder_max.patch"]}}:s6-rc_fdholder_max.patch
+{%- endblock %}
+{%- block pre_configure %}
+patch -up 1 -i ../s6-rc_fdholder_max.patch
{%- endblock %}
diff --git a/templates/pkg/safelink b/templates/pkg/safelink
@@ -0,0 +1,24 @@
+{% extends "genlinks" %}
+{%- block script %}
+#+{{pkg_install_name("musl-cross-make")}}
+#+{{pkg_install_name("gnu-make")}}
+#+{{pkg_install_name("busybox")}}
+#+{{pkg_install_name("skalibs")}}
+#@sha256:{{files["safelink.c"]}}:safelink.c
+
+name=safelink
+{% include "functions/check_static" %}
+{% include "functions/build_env_static" %}
+{% include "functions/vars" %}
+build_env_static
+def_prefix
+
+gcc -ggdb -D_GNU_SOURCE -static -o $name $name.c $LDFLAGS -lskarnet
+
+install -d "$pthbs_destdir/$prefix/command"
+install -m 755 $name "$pthbs_destdir/$prefix/command"
+check_static command/$name
+{% endblock %}
+{% block genlinks_begin %}
+ x["./command/safelink"]=1
+{%- endblock %}
diff --git a/templates/pkg/userspace.environment b/templates/pkg/userspace.environment
@@ -35,3 +35,4 @@
#+{{pkg_install_name("applyuidgid-caps")}}
#+{{pkg_install_name("nosuid")}}
#+{{pkg_install_name("spawn-pty")}}
+#+{{pkg_install_name("safelink")}}
diff --git a/templates/pkg/zsh b/templates/pkg/zsh
@@ -1,6 +1,7 @@
{% extends "autotools" %}
{%- block extra_deps %}
#+{{pkg_install_name("netbsd-curses")}}
+#+{{pkg_install_name("libbsd")}}
#@git:{{submodule.current["zsh_config"]}}:zsh_config
#@untar:-J:{{downloads["zsh-5.9.tar.xz"]}}:.
{%- endblock %}
diff --git a/templates/skaware b/templates/skaware
@@ -11,6 +11,8 @@
: ${JOBS:=1}
prefix={{versions}}/$pthbs_package
cd '{{name}}'
+{%- block pre_configure %}
+{%- endblock %}
./configure {% block extra_configure %}{% endblock %} \
--prefix="$prefix" \
--dynlibdir="${prefix}/library.so" \