mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-18 17:25:24 +01:00
Add mes and mescc-tools-extra
mescc-tools-extra contains two important tools: - cp - chmod mes first builds itself from a mes 0.21 seed as used by guix, and then builds a mes 0.22 and then mes 0.22 using that created mes 0.22. It does /not/ use bootstrap.sh as we don't have a proper shell at this point, it has been manually adapted for kaem.
This commit is contained in:
parent
2706e07556
commit
649d7b68dc
1029 changed files with 120985 additions and 18 deletions
31
sysa/mes-0.22/lib/tests/posix/50-getenv.c
Normal file
31
sysa/mes-0.22/lib/tests/posix/50-getenv.c
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "mes/lib.h"
|
||||
#include "stdlib.h"
|
||||
|
||||
int
|
||||
main (int argc, char const *argv[])
|
||||
{
|
||||
eputs ("test:getenv\n");
|
||||
if (getenv ("PATH") == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
57
sysa/mes-0.22/lib/tests/posix/50-open-read.c
Normal file
57
sysa/mes-0.22/lib/tests/posix/50-open-read.c
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main (int argc, char const *argv[])
|
||||
{
|
||||
eputs ("test:getenv\n");
|
||||
char file_name[PATH_MAX];
|
||||
char *srcdir = getenv ("abs_top_srcdir");
|
||||
if (! srcdir) // for running by hand
|
||||
srcdir = ".";
|
||||
eputs ("srcdir=");
|
||||
eputs (srcdir);
|
||||
eputs ("\n");
|
||||
strcpy (file_name, srcdir);
|
||||
strcpy (file_name + strlen (srcdir), "/lib/tests/posix/data/open-read");
|
||||
eputs ("test open:");
|
||||
eputs (file_name);
|
||||
eputs ("\n");
|
||||
int filedes = open (file_name, O_RDONLY, 0);
|
||||
if (filedes <= 2)
|
||||
return 1;
|
||||
char buf[20];
|
||||
int n = read (filedes, buf, sizeof (buf));
|
||||
if (n != 5)
|
||||
return 2;
|
||||
if (strcmp (buf, "hello"))
|
||||
return 3;
|
||||
eputs ("test read: ");
|
||||
eputs (buf);
|
||||
eputs ("\n");
|
||||
return 0;
|
||||
}
|
||||
28
sysa/mes-0.22/lib/tests/posix/90-execlp.c
Normal file
28
sysa/mes-0.22/lib/tests/posix/90-execlp.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "unistd.h"
|
||||
|
||||
int
|
||||
main (int argc, char const *argv[])
|
||||
{
|
||||
execlp ("echo", "echo", "Hello", "World!", 0);
|
||||
return 0;
|
||||
}
|
||||
1
sysa/mes-0.22/lib/tests/posix/90-execlp.stdout
Normal file
1
sysa/mes-0.22/lib/tests/posix/90-execlp.stdout
Normal file
|
|
@ -0,0 +1 @@
|
|||
Hello World!
|
||||
41
sysa/mes-0.22/lib/tests/posix/90-unsetenv.c
Normal file
41
sysa/mes-0.22/lib/tests/posix/90-unsetenv.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
eputs ("setenv\n");
|
||||
setenv ("FOO", "BAR", 1);
|
||||
if (strcmp (getenv ("FOO"), "BAR"))
|
||||
return 1;
|
||||
eputs ("unsetenv\n");
|
||||
unsetenv ("FOO");
|
||||
if (getenv ("FOO"))
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
1
sysa/mes-0.22/lib/tests/posix/data/open-read
Normal file
1
sysa/mes-0.22/lib/tests/posix/data/open-read
Normal file
|
|
@ -0,0 +1 @@
|
|||
hello
|
||||
Loading…
Add table
Add a link
Reference in a new issue