package rosa import ( "slices" "strconv" "strings" "hakurei.app/internal/pkg" ) // skipGNUTests generates a string for skipping specific tests by number in a // GNU test suite. This is nontrivial because the test suite does not support // excluding tests in any way, so ranges for all but the skipped tests have to // be specified instead. // // For example, to skip test 764, ranges around the skipped test must be // specified: // // 1-763 765- // // Tests are numbered starting from 1. The resulting string is unquoted. func skipGNUTests(tests ...int) string { tests = slices.Clone(tests) slices.Sort(tests) var buf strings.Builder if tests[0] != 1 { buf.WriteString("1-") } for i, n := range tests { if n != 1 && (i == 0 || tests[i-1] != n-1) { buf.WriteString(strconv.Itoa(n - 1)) buf.WriteString(" ") } if i == len(tests)-1 || tests[i+1] != n+1 { buf.WriteString(strconv.Itoa(n + 1)) buf.WriteString("-") } } return buf.String() } func (t Toolchain) newBison() (pkg.Artifact, string) { const ( version = "3.8.2" checksum = "BhRM6K7URj1LNOkIDCFDctSErLS-Xo5d9ba9seg10o6ACrgC1uNhED7CQPgIY29Y" ) return t.NewPackage("bison", version, newTar( "https://ftpmirror.gnu.org/gnu/bison/bison-"+version+".tar.gz", checksum, pkg.TarGzip, ), nil, &MakeHelper{ Check: []string{ "TESTSUITEFLAGS=" + jobsFlagE + "' " + skipGNUTests( // clang miscompiles (SIGILL) 764, ) + "'", "check", }, }, M4, Diffutils, Sed, ), version } func init() { native.MustRegister(&Artifact{ f: Toolchain.newBison, Name: "bison", Description: "a general-purpose parser generator", Website: "https://www.gnu.org/software/bison/", ID: 193, }) } func (t Toolchain) newGnuTLS() (pkg.Artifact, string) { const ( version = "3.8.12" checksum = "VPdP-nRydQQRJcnma-YA7CJYA_kzTJ2rb3QFeP6D27emSyInJ8sQ-Wzn518I38dl" ) var configureExtra []KV switch t.arch { case "arm64": configureExtra = []KV{ {"disable-hardware-acceleration"}, } } return t.NewPackage("gnutls", version, t.newTagRemote( "https://gitlab.com/gnutls/gnutls.git", version, checksum, ), &PackageAttr{ Patches: []KV{ {"bootstrap-remove-gtk-doc", `diff --git a/bootstrap.conf b/bootstrap.conf index 1c3cc61e6..32bae9387 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -50,7 +50,6 @@ bison 2.4 gettext 0.17 git 1.4.4 gperf - -gtkdocize - perl 5.5 wget - " diff --git a/configure.ac b/configure.ac index 5057536e5..731558a15 100644 --- a/configure.ac +++ b/configure.ac @@ -403,11 +403,6 @@ if test "$enable_fuzzer_target" != "no";then AC_DEFINE([FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], 1, [Enable fuzzer target -not for production]) fi -dnl -dnl check for gtk-doc -dnl -GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) - AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.19]) m4_ifdef([AM_GNU_GET][TEXT_REQUIRE_VERSION],[ diff --git a/doc/Makefile.am b/doc/Makefile.am index fb1390d70..52f0ad9af 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -33,9 +33,6 @@ IMAGES = \ pkcs11-vision.png SUBDIRS = examples scripts credentials latex -if ENABLE_GTK_DOC -SUBDIRS += reference -endif -include $(top_srcdir)/doc/doc.mk diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index f10c8ed3c..b711b58ec 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -82,13 +82,4 @@ include $(top_srcdir)/gtk-doc.make # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += version.xml.in -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks -if ENABLE_GTK_DOC -TESTS_ENVIRONMENT = \ - DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ - SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -#TESTS = $(GTKDOC_CHECK) -endif - -include $(top_srcdir)/git.mk `}, {"alpine-tests-certtool", `I think this tests is simply wrong. When a PIN is given, the program should run in batch mode. So the question for "Enter password" should _not_ be present. DO NOT REMOVE UNLESS VERIFIED IT'S NOT ACTUALLY NECESSARY ANYMORE. --- a/tests/cert-tests/certtool.sh 2019-02-07 07:33:45.960887338 +0000 +++ b/tests/cert-tests/certtool.sh 2019-02-07 07:36:14.550955051 +0000 @@ -49,7 +49,7 @@ #check whether password is being honoured #some CI runners need GNUTLS_PIN (GNUTLS_PIN=${PASS}) - ${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <${TMPFILE2} 2>&1 </dev/null 2>&1 - if test $? != 0;then + if test $? != 1; then cat ${TMPFILE2} echo "No password was asked" exit 1 `}, {"test-kernel-version-ksh", `diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh index 1b78b8cf1..350156a86 100644 --- a/tests/scripts/common.sh +++ b/tests/scripts/common.sh @@ -279,10 +279,6 @@ kernel_version_check() { kernel_major=$(echo $kernel_version | cut -d. -f1 2>/dev/null) kernel_minor=$(echo $kernel_version | cut -d. -f2 2>/dev/null) - if ! [[ "$kernel_major" =~ ^[0-9]+$ ]] || ! [[ "$kernel_minor" =~ ^[0-9]+$ ]]; then - return 1 - fi - if [ "$kernel_major" -lt "$required_major" ]; then return 1 fi `}, }, }, &MakeHelper{ Generate: "./bootstrap --skip-po --no-git --gnulib-srcdir=gnulib", Configure: append([]KV{ {"disable-doc"}, {"disable-openssl-compatibility"}, {"with-default-trust-store-file", "/system/etc/ssl/certs/ca-bundle.crt"}, {"with-default-trust-store-pkcs11", "pkcs11:"}, {"with-zlib", "link"}, {"with-zstd", "link"}, }, configureExtra...), }, Gzip, Automake, Libtool, Bison, Gettext, Gperf, PkgConfig, Python, Texinfo, Diffutils, NSSCACert, Libev, Zlib, Zstd, P11Kit, nettle3, Libunistring, ), version } func init() { native.MustRegister(&Artifact{ f: Toolchain.newGnuTLS, Name: "gnutls", Description: "a secure communications library implementing the SSL, TLS and DTLS protocols", Website: "https://gnutls.org", Dependencies: P{ Zlib, Zstd, P11Kit, nettle3, Libunistring, }, ID: 1221, }) } func (t Toolchain) newBinutils() (pkg.Artifact, string) { const ( version = "2.46.0" checksum = "4kK1_EXQipxSqqyvwD4LbiMLFKCUApjq6PeG4XJP4dzxYGqDeqXfh8zLuTyOuOVR" ) return t.NewPackage("binutils", version, newTar( "https://ftpmirror.gnu.org/gnu/binutils/binutils-"+version+".tar.bz2", checksum, pkg.TarBzip2, ), nil, (*MakeHelper)(nil), Bash, ), version } func init() { native.MustRegister(&Artifact{ f: Toolchain.newBinutils, Name: "binutils", Description: "a collection of binary tools", Website: "https://www.gnu.org/software/binutils/", ID: 7981, }) } func (t Toolchain) newGCC() (pkg.Artifact, string) { const ( version = "16.1.0" checksum = "4ASoWbxaA2FW7PAB0zzHDPC5XnNhyaAyjtDPpGzceSLeYnEIXsNYZR3PA_Zu5P0K" ) var configureExtra []KV switch t.arch { case "amd64", "arm64": configureExtra = append(configureExtra, KV{"with-multilib-list", "''"}) } return t.NewPackage("gcc", version, newTar( "https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/"+ "gcc-"+version+"/gcc-"+version+".tar.gz", checksum, pkg.TarGzip, ), &PackageAttr{ Patches: []KV{ {"musl-off64_t-loff_t", `diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c index 180f5c31d74..44d7ea73f7d 100644 --- a/libgo/sysinfo.c +++ b/libgo/sysinfo.c @@ -365,11 +365,7 @@ enum { typedef loff_t libgo_loff_t_type; #endif -#if defined(HAVE_OFF64_T) -typedef off64_t libgo_off_t_type; -#else typedef off_t libgo_off_t_type; -#endif // The following section introduces explicit references to types and // constants of interest to support bootstrapping libgo using a `}, {"musl-legacy-lfs", `diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go index 82e0dcfd074..16151ecad1b 100644 --- a/libgo/go/internal/syscall/unix/at_largefile.go +++ b/libgo/go/internal/syscall/unix/at_largefile.go @@ -10,5 +10,5 @@ import ( "syscall" ) -//extern fstatat64 +//extern fstatat func fstatat(int32, *byte, *syscall.Stat_t, int32) int32 diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go index 1fc5ee0771f..0c6dffe1a75 100644 --- a/libgo/go/os/dir_largefile.go +++ b/libgo/go/os/dir_largefile.go @@ -11,5 +11,5 @@ package os import "syscall" -//extern readdir64 +//extern readdir func libc_readdir(*syscall.DIR) *syscall.Dirent diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go index 5c1ec483c75..5a1245ed44b 100644 --- a/libgo/go/syscall/libcall_glibc.go +++ b/libgo/go/syscall/libcall_glibc.go @@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) { } //sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error) -//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t +//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { if race.Enabled { diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go index 03ca7261b59..ad21fd0b3ac 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go @@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) { //adjtimex(buf *Timex) _C_int //sys Fstatfs(fd int, buf *Statfs_t) (err error) -//fstatfs64(fd _C_int, buf *Statfs_t) _C_int +//fstatfs(fd _C_int, buf *Statfs_t) _C_int func Gettid() (tid int) { r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0) @@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i } //sys Statfs(path string, buf *Statfs_t) (err error) -//statfs64(path *byte, buf *Statfs_t) _C_int +//statfs(path *byte, buf *Statfs_t) _C_int //sysnb Sysinfo(info *Sysinfo_t) (err error) //sysinfo(info *Sysinfo_t) _C_int diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go index f90055bb29a..334212f0af1 100644 --- a/libgo/go/syscall/libcall_posix_largefile.go +++ b/libgo/go/syscall/libcall_posix_largefile.go @@ -10,40 +10,40 @@ package syscall //sys Creat(path string, mode uint32) (fd int, err error) -//creat64(path *byte, mode Mode_t) _C_int +//creat(path *byte, mode Mode_t) _C_int //sys Fstat(fd int, stat *Stat_t) (err error) -//fstat64(fd _C_int, stat *Stat_t) _C_int +//fstat(fd _C_int, stat *Stat_t) _C_int //sys Ftruncate(fd int, length int64) (err error) -//ftruncate64(fd _C_int, length Offset_t) _C_int +//ftruncate(fd _C_int, length Offset_t) _C_int //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) -//getrlimit64(resource _C_int, rlim *Rlimit) _C_int +//getrlimit(resource _C_int, rlim *Rlimit) _C_int //sys Lstat(path string, stat *Stat_t) (err error) -//lstat64(path *byte, stat *Stat_t) _C_int +//lstat(path *byte, stat *Stat_t) _C_int //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte +//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte //sys Open(path string, mode int, perm uint32) (fd int, err error) -//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int +//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int //sys Pread(fd int, p []byte, offset int64) (n int, err error) -//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t +//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) -//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t +//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t //sys Seek(fd int, offset int64, whence int) (off int64, err error) -//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t +//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) -//setrlimit64(resource int, rlim *Rlimit) _C_int +//setrlimit(resource int, rlim *Rlimit) _C_int //sys Stat(path string, stat *Stat_t) (err error) -//stat64(path *byte, stat *Stat_t) _C_int +//stat(path *byte, stat *Stat_t) _C_int //sys Truncate(path string, length int64) (err error) -//truncate64(path *byte, length Offset_t) _C_int +//truncate(path *byte, length Offset_t) _C_int diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c index f84860891e6..7efc9615985 100644 --- a/libgo/runtime/go-varargs.c +++ b/libgo/runtime/go-varargs.c @@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg) int __go_open64 (char *path, int mode, mode_t perm) { - return open64 (path, mode, perm); + return open (path, mode, perm); } #endif `}, }, ScriptEarly: ` ln -s system/lib / ln -s system/lib /work/ `, // GCC spends most of its time in its many configure scripts, however // it also saturates the CPU for a consequential amount of time. Flag: TExclusive, }, &MakeHelper{ Configure: append([]KV{ {"disable-multilib"}, {"enable-default-pie"}, {"disable-nls"}, {"with-gnu-as"}, {"with-gnu-ld"}, {"with-system-zlib"}, {"enable-languages", "c,c++,go"}, {"with-native-system-header-dir", "/system/include"}, }, configureExtra...), Make: []string{ "BOOT_CFLAGS='-O2 -g'", "bootstrap", }, // This toolchain is hacked to pieces, it is not expected to ever work // well in its current state. That does not matter as long as the // toolchain it produces passes its own test suite. SkipCheck: true, }, Binutils, MPC, Zlib, Libucontext, KernelHeaders, ), version } func init() { native.MustRegister(&Artifact{ f: Toolchain.newGCC, Name: "gcc", Description: "The GNU Compiler Collection", Website: "https://www.gnu.org/software/gcc/", Dependencies: P{ Binutils, MPC, Zlib, Libucontext, }, ID: 6502, }) }