Compare commits

..
1 Commits
Author SHA1 Message Date
Bananymous 54763a952c BuildSystem: Fix keymap in base sysroot 2026-07-07 13:38:15 +03:00
10 changed files with 24 additions and 69 deletions
Binary file not shown.
+1 -5
View File
@@ -1527,11 +1527,7 @@ namespace Kernel
uid_gid_t { m_credentials.euid(), m_credentials.egid() }; uid_gid_t { m_credentials.euid(), m_credentials.egid() };
}); });
auto [parent, file_name] = TRY(find_parent_file(fd, path, O_SEARCH)); auto [parent, file_name] = TRY(find_parent_file(fd, path, O_WRONLY));
if (!parent.inode->find_inode(file_name).is_error())
return BAN::Error::from_errno(EEXIST);
if (!parent.inode->can_access(m_credentials, O_WRONLY))
return BAN::Error::from_errno(EACCES);
TRY(parent.inode->create_directory(file_name, (mode & 0777) | Inode::Mode::IFDIR, uid, gid)); TRY(parent.inode->create_directory(file_name, (mode & 0777) | Inode::Mode::IFDIR, uid, gid));
return 0; return 0;
+2 -2
View File
@@ -10,8 +10,8 @@ CONFIGURE_OPTIONS=(
'--without-bash-malloc' '--without-bash-malloc'
'--with-curses' '--with-curses'
'bash_cv_unusable_rtsigs=no' 'bash_cv_unusable_rtsigs=no'
'bash_cv_struct_winsize_termios=yes' # configure checks for sys/termios.h? code uses termios.h correctly 'bash_cv_signal_vintage=posix'
'CFLAGS=-std=c17 -Wno-discarded-qualifiers' 'CFLAGS=-std=c17'
'CFLAGS_FOR_BUILD=-std=c17' 'CFLAGS_FOR_BUILD=-std=c17'
) )
@@ -0,0 +1,12 @@
diff -ruN bash-5.2.37/examples/loadables/Makefile.in bash-5.2.37-banan_os/examples/loadables/Makefile.in
--- bash-5.2.37/examples/loadables/Makefile.in 2022-08-19 23:33:30.000000000 +0300
+++ bash-5.2.37-banan_os/examples/loadables/Makefile.in 2025-01-26 02:43:36.121801845 +0200
@@ -104,7 +104,7 @@
ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \
tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \
uname sync push ln unlink realpath strftime mypid setpgid seq rm \
- accept csv dsv cut stat getconf
+ accept csv dsv stat
OTHERPROG = necho hello cat pushd asort
all: $(SHOBJ_STATUS)
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash ../install.sh
NAME='tar'
VERSION='1.35'
DOWNLOAD_URL="https://ftpmirror.gnu.org/gnu/tar/tar-$VERSION.tar.xz#4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16"
CONFIG_SUB=('build-aux/config.sub')
pre_configure() {
echo '#include_next <sys/types.h>' > gnu/sys_types.in.h
}
@@ -1,21 +0,0 @@
diff -ruN tar-1.35/gnu/getprogname.c tar-1.35-banan_os/gnu/getprogname.c
--- tar-1.35/gnu/getprogname.c 2023-06-17 09:47:53.000000000 +0300
+++ tar-1.35-banan_os/gnu/getprogname.c 2026-07-07 15:22:32.468592615 +0300
@@ -50,7 +50,7 @@
# include <sys/procfs.h>
#endif
-#if defined __SCO_VERSION__ || defined __sysv5__
+#if defined __SCO_VERSION__ || defined __sysv5__ || defined __banan_os__
# include <fcntl.h>
# include <string.h>
#endif
@@ -265,7 +265,7 @@
}
}
return NULL;
-# elif defined __SCO_VERSION__ || defined __sysv5__ /* SCO OpenServer6/UnixWare */
+# elif defined __SCO_VERSION__ || defined __sysv5__ || defined __banan_os__ /* SCO OpenServer6/UnixWare */
char buf[80];
int fd;
sprintf (buf, "/proc/%d/cmdline", getpid());
-1
View File
@@ -127,7 +127,6 @@ int vsnprintf(char* __restrict s, size_t n, const char* __restrict format, va_l
int vsprintf(char* __restrict s, const char* __restrict format, va_list ap); int vsprintf(char* __restrict s, const char* __restrict format, va_list ap);
int vsscanf(const char* __restrict s, const char* __restrict format, va_list arg); int vsscanf(const char* __restrict s, const char* __restrict format, va_list arg);
size_t __fpending(FILE* stream);
void __fseterr(FILE* stream); void __fseterr(FILE* stream);
__END_DECLS __END_DECLS
-6
View File
@@ -134,12 +134,6 @@ void clearerr(FILE* file)
file->error = false; file->error = false;
} }
size_t __fpending(FILE* file)
{
ScopeLock _(file);
return file->buffer_rd_size ? 0 : file->buffer_idx;
}
void __fseterr(FILE* file) void __fseterr(FILE* file)
{ {
ScopeLock _(file); ScopeLock _(file);
+9 -24
View File
@@ -8,7 +8,7 @@
static const char* s_argv0 { nullptr }; static const char* s_argv0 { nullptr };
static bool create_parents(const char* path, bool verbose) bool create_parents(const char* path, bool verbose)
{ {
char buffer[PATH_MAX]; char buffer[PATH_MAX];
for (size_t i = 0; path[i];) for (size_t i = 0; path[i];)
@@ -21,47 +21,32 @@ static bool create_parents(const char* path, bool verbose)
break; break;
buffer[i] = '\0'; buffer[i] = '\0';
struct stat st; if (mkdir(buffer, 0) == -1)
if (stat(path, &st) == 0)
{ {
if (S_ISDIR(st.st_mode)) if (errno == EEXIST)
continue; continue;
fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(EEXIST));
return false;
}
if (errno != ENOENT || mkdir(path, 0) == -1)
{
fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(errno)); fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(errno));
return false; return false;
} }
if (verbose)
printf("%s: created directory '%s'\n", s_argv0, path);
const mode_t filemask = umask(0); const mode_t filemask = umask(0);
umask(filemask); umask(filemask);
chmod(buffer, (S_IWUSR | S_IXUSR | ~filemask) & 0777); chmod(buffer, (S_IWUSR | S_IXUSR | ~filemask) & 0777);
if (verbose)
printf("%s: created directory '%s'\n", s_argv0, path);
} }
return true; return true;
} }
static bool create_directory(const char* path, mode_t mode, bool verbose, bool parents) bool create_directory(const char* path, mode_t mode, bool verbose, bool parents)
{ {
if (parents && !create_parents(path, verbose)) if (parents && !create_parents(path, verbose))
return false; return false;
struct stat st; if (mkdir(path, mode) == -1)
if (stat(path, &st) == 0)
{
if (parents && S_ISDIR(st.st_mode))
return true;
fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(EEXIST));
return false;
}
if (errno != ENOENT || mkdir(path, mode) == -1)
{ {
fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(errno)); fprintf(stderr, "%s: cannot create '%s': %s\n", s_argv0, path, strerror(errno));
return false; return false;