Commit 218911b8 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

RISC-V support in slapos

See merge request nexedi/slapos!1578
parents 8f729a81 9227dd59
Pipeline #34737 passed with stage
in 0 seconds
[buildout]
extends = ../gnu-config/buildout.cfg
parts = attr
[attr]
......@@ -7,6 +7,7 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz
md5sum = 84f58dec00b60f2dc8fd1c9709291cc7
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
configure-options =
--enable-shared=yes
--enable-gettext=no
......
......@@ -3,6 +3,7 @@ extends =
../bison/buildout.cfg
../gettext/buildout.cfg
../gmp/buildout.cfg
../gnu-config/buildout.cfg
../m4/buildout.cfg
../texinfo/buildout.cfg
......@@ -25,6 +26,8 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
md5sum = 4125404e41e482ec68282a2e687f6c73
pre-configure =
cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
configure-options =
--with-gmp=${gmp:location}
--with-mpfr=${mpfr:location}
......@@ -37,6 +40,8 @@ recipe = slapos.recipe.cmmi
shared = true
url = ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
md5sum = 11436d6b205e516635b666090b94ab32
pre-configure =
cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
configure-options =
--with-gmp-prefix=${gmp:location}
--disable-static
......@@ -46,8 +51,8 @@ environment =
[binutils]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.bz2
md5sum = fe10027c8de77b643ae72bd6de3f7996
url = https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz
md5sum = a075178a9646551379bfb64040487715
configure-options =
--disable-bootstrap
--with-mpc=${mpc:location}
......
......@@ -11,4 +11,4 @@ configure-command = true
make-options =
PREFIX=@@LOCATION@@
CFLAGS="-fpic -fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64"
post-make-hook = ${:_profile_base_location_}/bzip2-hooks.py#785148a77f1a8456d914aa02ddf9d410:post_make_hook
post-make-hook = ${:_profile_base_location_}/bzip2-hooks.py#a02da93bc8ff337a1d590f265e220528:post_make_hook
......@@ -13,6 +13,7 @@ def post_make_hook(options, buildout):
os.unlink(f)
shutil.copyfile(os.path.join(os.curdir, original), os.path.join(destination,
original))
os.chmod(os.path.join(destination, original), 0o555)
for link in link_list:
os.symlink(original, os.path.join(destination,
......
......@@ -16,6 +16,7 @@ configure-options =
--disable-libcap
--without-selinux
--prefix=@@LOCATION@@
--with-openssl=no
environment =
PATH=${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
......
......@@ -8,12 +8,13 @@ parts = dcron-output
[dcron]
recipe = slapos.recipe.cmmi
shared = false
url = http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz
md5sum = 078833f3281f96944fc30392b1888326
url = https://github.com/ptchinster/dcron/archive/refs/tags/v4.6.zip
md5sum = d5bd12863547daf499187bc9b4e863a8
configure-command = true
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/noroot-no-globals.patch#623379916f48bd8292a28057c8bd30f7
${:_profile_base_location_}/noroot-no-globals.patch#cd8d0f6d1d2ee133d6341d1515832c0d
${:_profile_base_location_}/support_old_gcc.patch#4dc8c81b1d94474c3c15e0db7b5b60de
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
......
--- dcron-4.5/chuser.c
+++ dcron-4.5/chuser.c
@@ -14,6 +14,7 @@
diff --git a/chuser.c b/chuser.c
index 0d79dbc..ccc3acc 100644
--- a/chuser.c
+++ b/chuser.c
@@ -11,6 +11,7 @@
Prototype int ChangeUser(const char *user, char *dochdir);
+#if 0
int
ChangeUser(const char *user, char *dochdir)
{
+#if 0
struct passwd *pas;
/*
@@ -57,5 +58,8 @@
@@ -57,5 +58,7 @@ ChangeUser(const char *user, char *dochdir)
}
}
return(pas->pw_uid);
+#else
+ return getpwnam(user);
+#endif
}
+#endif
--- dcron-4.5/crontab.c
+++ dcron-4.5/crontab.c
@@ -88,7 +88,7 @@
diff --git a/crontab.c b/crontab.c
index b29e0d2..06df70f 100644
--- a/crontab.c
+++ b/crontab.c
@@ -88,7 +88,7 @@ main(int ac, char **av)
break;
case 'c':
/* getopt guarantees optarg != 0 here */
......@@ -27,8 +30,8 @@
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -316,9 +316,6 @@
printlogf(0, "-c option: superuser only\n");
@@ -318,9 +318,6 @@ GetReplaceStream(const char *user, const char *file)
close(filedes[0]);
......@@ -38,7 +41,7 @@
fd = open(file, O_RDONLY);
if (fd < 0) {
printlogf(0, "unable to open %s: %s", file, strerror(errno));
@@ -344,8 +341,6 @@
@@ -346,8 +343,6 @@ EditFile(const char *user, const char *file)
const char *ptr;
char visual[SMALL_BUFFER];
......@@ -47,9 +50,11 @@
if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) >= sizeof(visual))
if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) >= sizeof(visual))
ptr = PATH_VI;
--- dcron-4.5/job.c
+++ dcron-4.5/job.c
@@ -62,14 +62,6 @@
diff --git a/job.c b/job.c
index b5e02de..79650c2 100644
--- a/job.c
+++ b/job.c
@@ -63,14 +63,6 @@ RunJob(CronFile *file, CronLine *line)
* Change running state to the user in question
*/
......@@ -64,7 +69,7 @@
/* from this point we are unpriviledged */
if (DebugOpt)
@@ -295,14 +287,6 @@
@@ -296,14 +288,6 @@ EndJob(CronFile *file, CronLine *line, int exit_status)
* by the mailing and we already verified the mail file.
*/
......@@ -79,9 +84,11 @@
/* from this point we are unpriviledged */
/*
--- dcron-4.5/Makefile
+++ dcron-4.5/Makefile
@@ -3,7 +3,6 @@
diff --git a/Makefile b/Makefile
index 547febc..13829e6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@ VERSION = 4.5
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
PREFIX = /usr/local
......@@ -89,7 +96,7 @@
SCRONTABS = /etc/cron.d
CRONTABS = /var/spool/cron/crontabs
CRONSTAMPS = /var/spool/cron/cronstamps
@@ -20,10 +19,10 @@
@@ -20,10 +19,10 @@ MANDIR = $(PREFIX)/share/man
SHELL = /bin/sh
......@@ -101,9 +108,9 @@
+INSTALL_DATA = $(INSTALL) -D -m0644
+INSTALL_DIR = $(INSTALL) -d -m0755
CFLAGS ?= -O2
CFLAGS += -Wall -Wstrict-prototypes -Wno-missing-field-initializers
SRCS = main.c subs.c database.c job.c concat.c chuser.c
@@ -45,7 +44,6 @@
CFLAGS += -Wall -Wextra -Wstrict-prototypes -Wno-missing-field-initializers -Wfloat-equal -fstack-protector-all -Wformat-security -Wformat=2 -fPIE
CFLAGS += -Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,-z,relro -Wl,-z,now -Wl,-z,nodlopen -Wl,-z,-pie
@@ -47,7 +46,6 @@ all: $(PROTOS) crond crontab ;
echo "SBINDIR = $(SBINDIR)" >> config
echo "BINDIR = $(BINDIR)" >> config
echo "MANDIR = $(MANDIR)" >> config
......@@ -111,7 +118,7 @@
echo "SCRONTABS = $(SCRONTABS)" >> config
echo "CRONTABS = $(CRONTABS)" >> config
echo "CRONSTAMPS = $(CRONSTAMPS)" >> config
@@ -63,13 +61,10 @@
@@ -65,13 +63,10 @@ crontab: $(TABOBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
install:
......
diff --git a/main.c b/main.c
diff --git a/main.c b/main.c
index dcf3f23..3eb6332 100644
--- a/main.c
+++ b/main.c
@@ -130,7 +130,7 @@ main(int ac, char **av)
case 'd':
DebugOpt = 1;
LogLevel = LOG_DEBUG;
- [[fallthrough]]; //fall through to include f too
+ __attribute__((fallthrough)); //fall through to include f too
case 'f':
ForegroundOpt = 1;
break;
......@@ -103,6 +103,8 @@ configure-options =
recipe = slapos.recipe.cmmi
url = https://ffmpeg.org/releases/ffmpeg-4.1.4.tar.bz2
md5sum = 611d171e4aee749b85e04d17e2aee71d
patches = https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/effadce6c756247ea8bae32dc13bb3e6f464f0eb#adf42203d59a3c98a863216113946661
patch-options = -p1
location = @@LOCATION@@
pkg_config_depends = ${libxcb:location}/lib/pkgconfig:${libxcb:pkg_config_depends}:${libtheora:location}/lib/pkgconfig:${libtheora:pkg_config_depends}:${libvpx:location}/lib/pkgconfig:${libx264:location}/lib/pkgconfig:${opencore-amr:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
configure-options =
......@@ -128,4 +130,4 @@ environment =
PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${bzip2:location}/include -I${libogg:location}/include -I${libtheora:location}/include -I${opencore-amr:location}/include -I${lame:location}/include
LDFLAGS=-Wl,-rpath=${:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${libxcb:location}/lib -L${libogg:location}/lib -L${libvorbis:location}/lib -Wl,-rpath=${libvorbis:location}/lib -L${libtheora:location}/lib -Wl,-rpath=${libtheora:location}/lib -L${libvpx:location}/lib -Wl,-rpath=${libvpx:location}/lib -L${libx264:location}/lib -Wl,-rpath=${libx264:location}/lib -L${lame:location}/lib -Wl,-rpath=${lame:location}/lib -L${opencore-amr:location}/lib -Wl,-rpath=${opencore-amr:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${pkgconfig:location}/bin:${yasm:location}/bin:%(PATH)s
PATH=${patch:location}/bin:${pkgconfig:location}/bin:${yasm:location}/bin:%(PATH)s
......@@ -7,6 +7,7 @@ extends =
../bzip2/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../zstd/buildout.cfg
[file]
recipe = slapos.recipe.cmmi
......@@ -19,6 +20,7 @@ configure-options =
--enable-zlib
--enable-bzlib
--enable-xzlib
--enable-zstdlib
environment =
CPPFLAGS=-I${bzip2:location}/include -I${xz-utils:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${xz-utils:location}/lib -Wl,-rpath=${xz-utils:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
CPPFLAGS=-I${bzip2:location}/include -I${xz-utils:location}/include -I${zlib:location}/include -I${zstd:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${xz-utils:location}/lib -Wl,-rpath=${xz-utils:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${zstd:location}/lib -Wl,-rpath=${zstd:location}/lib
......@@ -15,7 +15,7 @@ parts =
[gcc-common]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/gcc/gcc-${:version}/gcc-${:version}.tar.xz
url = https://ftp.gnu.org/gnu/gcc/gcc-${:version}/gcc-${:version}.tar.xz
pre-configure =
set %(location)s/bin
mkdir -p $1
......@@ -76,3 +76,8 @@ patches =
<= gcc-common
version = 10.5.0
md5sum = c7d1958570fbd1cd859b015774b9987a
[gcc-12.3]
<= gcc-common
version = 12.3.0
md5sum = 58a863b2a50e4d42eacc20fec419bc3b
[buildout]
extends = ../gnu-config/buildout.cfg
parts = icu4c
[icu4c]
......@@ -7,6 +8,7 @@ shared = true
location = @@LOCATION@@
url = https://github.com/unicode-org/icu/releases/download/release-58-2/icu4c-58_2-src.tgz
md5sum = fac212b32b7ec7ab007a12dff1f3aea1
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess source/
configure-command = source/configure
configure-options =
--prefix=${:location}
......
......@@ -7,11 +7,11 @@ parts =
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/jemalloc/jemalloc/releases/download/${:version}/jemalloc-${:version}.tar.bz2
version = 3.6.0
md5sum = e76665b63a8fddf4c9f26d2fa67afdf2
version = 5.3.0
md5sum = 09a8328574dab22a7df848eae6dbbf53
configure-options =
--disable-static
--enable-readline
--disable-initial-exec-tls
environment =
CPPFLAGS=-I${readline:location}/include -I${ncurses:location}/include
LDFLAGS=-L@@LOCATION@@ -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib
......@@ -49,6 +49,7 @@ eggs =
openpyxl
sympy
xlrd
lxml-html-clean
# additional eggs for jupyterlab
jupyterlab
jupyterlab-launcher
......
......@@ -3,6 +3,7 @@
[buildout]
extends =
../gnu-config/buildout.cfg
../jbigkit/buildout.cfg
../libjpeg/buildout.cfg
../libtiff/buildout.cfg
......@@ -16,6 +17,7 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://downloads.sourceforge.net/project/lcms/lcms/2.8/lcms2-2.8.tar.gz
md5sum = 87a5913f1a52464190bb655ad230539c
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
configure-options =
--disable-static
environment =
......
......@@ -23,10 +23,10 @@ make-options =
environment =
PATH=${gperf:location}/bin:%(PATH)s
# if lib64 exists, then create a symlink from lib to lib64
# if lib doesn't exist, then create a symlink 'lib' pointing to lib64
post-install =
cd ${:location}
[ -d lib64 ] && ln -s lib64 lib
[ -d lib ] || ln -s lib64 lib
[libcap]
<= libcap2
[buildout]
extends =
../libjpeg/buildout.cfg
../gnu-config/buildout.cfg
../jbigkit/buildout.cfg
../libjpeg/buildout.cfg
../patch/buildout.cfg
../zlib/buildout.cfg
......@@ -13,6 +14,7 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://download.osgeo.org/libtiff/tiff-4.2.0.tar.gz
md5sum = 2bbf6db1ddc4a59c89d6986b368fc063
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess config/
configure-options =
--disable-static
--without-x
......
......@@ -31,6 +31,6 @@ depends = ${python-prctl:egg}
[nxdtest-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/nxdtest.git
revision = 56e52da6
revision = 19c7022c
location = ${buildout:parts-directory}/nxdtest
git-executable = ${git:location}/bin/git
......@@ -12,9 +12,13 @@ md5sum = 4452288e6a0eefb2ab11d36010a1eebb
configure-options =
--disable-static
--enable-unicode-properties
--enable-jit
patch-options = -p1
patches =
https://sources.debian.org/data/main/p/pcre3/2:8.39-12/debian/patches/patch-from-mariadb-to-fix-stack-frame-si#c33964123a4648bbb86466b4f3476bb4
environment =
PATH=${patch:location}/bin:%(PATH)s
[pcre:not linux or platform.machine() != 'riscv64']
configure-options +=
--enable-jit
......@@ -10,7 +10,7 @@ extends =
parts = postgresql
[postgresql]
<= postgresql10
<= postgresql12
[postgresql-common]
recipe = slapos.recipe.cmmi
......@@ -44,3 +44,9 @@ environment =
<= postgresql-common
url = http://ftp.postgresql.org/pub/source/v10.11/postgresql-10.11.tar.bz2
md5sum = 01c83ee159bf2a690e75e69e49fe2a1d
[postgresql12]
<= postgresql-common
url = https://ftp.postgresql.org/pub/source/v12.9/postgresql-12.9.tar.bz2
md5sum = 980f11ed6b61a5fb64fbd9dffdccc8be
[buildout]
extends = ../gnu-config/buildout.cfg
parts=
unixodbc
[unixodbc]
recipe = slapos.recipe.cmmi
shared = true
url = http://www.unixodbc.org/unixODBC-2.3.5.tar.gz
md5sum = abf14cf943f1f8c5e63a24cb26d54fd9
url = https://www.unixodbc.org/unixODBC-2.3.12.tar.gz
md5sum = d62167d85bcb459c200c0e4b5a63ee48
pre-configure = cp -f ${gnu-config:location}/config.sub ${gnu-config:location}/config.guess .
post-install = ln -s @@LOCATION@@/lib/libodbcinst.so @@LOCATION@@/lib/libodbcinst.so.1
......@@ -63,7 +63,6 @@ class UserInfoTest(unittest.TestCase):
'testnode': '/bin/testnode',
'working-directory': 'srv/testnode',
'wrapper': 'bin/erp5testnode-service',
'zip-binary': '/bin/zip',
}
# values for test
......
......@@ -18,4 +18,4 @@ md5sum = 06b0acece285ecbc0e746fa267a374b6
[template-default]
filename = instance-default.cfg.jinja.in
md5sum = bf95d5f4ac107ad27a0c980633ad20be
md5sum = 947778203e4b2c175a25d01a2c36647c
......@@ -65,7 +65,6 @@ keep-log-days = {{ slapparameter_dict['keep-log-days'] }}
git-binary = ${git:location}/bin/git
slapos-binary = ${buildout:bin-directory}/slapos
testnode = ${buildout:bin-directory}/testnode
zip-binary = ${zip:location}/bin/zip
httpd-pid-file = $${basedirectory:run}/httpd.pid
httpd-lock-file = $${basedirectory:run}/httpd.lock
httpd-conf-file = $${rootdirectory:etc}/httpd.conf
......
......@@ -5,7 +5,6 @@ extends =
../../stack/haproxy/default-backend.cfg
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/zip/buildout.cfg
../../component/bash/buildout.cfg
../../component/coreutils/buildout.cfg
../../component/shellinabox/buildout.cfg
......@@ -18,7 +17,6 @@ parts =
slapos-cookbook
template
eggs
zip
git
apache
......
......@@ -185,7 +185,7 @@ distro = 1.7.0
dnspython = 1.16.0
entrypoints = 0.3
enum34 = 1.1.10
erp5.util = 0.4.75
erp5.util = 0.4.76
et-xmlfile = 1.0.1
exceptiongroup = 1.1.3:whl
fastjsonschema = 2.18.1
......@@ -229,7 +229,8 @@ jupyterlab-pygments = 0.1.2
lock-file = 2.0
lockfile = 0.12.2:whl
lsprotocol = 2023.0.0b1:whl
lxml = 4.9.1
lxml = 5.2.1
lxml-html-clean = 0.1.1
manuel = 1.11.2
MarkupSafe = 2.1.3
matplotlib = 2.1.2
......@@ -392,6 +393,7 @@ importlib-metadata = 1.7.0:whl
itsdangerous = 0.24
Jinja2 = 2.11.3
jsonschema = 3.0.2:whl
lxml = 4.9.1
MarkupSafe = 1.0
msgpack = 0.6.2
packaging = 16.8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment