-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add telescope+libretls port #196
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -794,7 +794,34 @@ packages: | |
- args: ['make', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
|
||
- name: libretls | ||
source: | ||
subdir: 'ports' | ||
git: 'https://git.causal.agency/libretls' | ||
tag: '3.5.2' | ||
version: '3.5.2' | ||
tools_required: | ||
- host-autoconf-v2.69 | ||
- host-automake-v1.15 | ||
- host-libtool | ||
regenerate: | ||
- args: ['autoreconf', '-fi'] | ||
tools_required: | ||
- system-gcc | ||
pkgs_required: | ||
- mlibc | ||
- openssl | ||
configure: | ||
- args: | ||
- '@THIS_SOURCE_DIR@/configure' | ||
- '--host=@OPTION:arch-triple@' | ||
- '--prefix=/usr' | ||
- '--disable-static' | ||
build: | ||
- args: ['make', '-j@PARALLELISM@'] | ||
- args: ['make', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, newline after a port recipe. |
||
- name: libtasn | ||
labels: [aarch64] | ||
architecture: '@OPTION:arch@' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,40 @@ packages: | |
- args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
- name: telescope | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, a newline should be added between ports. |
||
architecture: '@OPTION:arch@' | ||
metadata: | ||
summary: CLI Gemini Client | ||
description: This package contains a CLI Geminispace browser | ||
website: 'https://telescope.omarpolo.com/' | ||
maintainer: "Alexander Richards <[email protected]>" | ||
categories: ['www-client'] | ||
source: | ||
subdir: 'ports' | ||
git: 'https://github.com/omar-polo/telescope' | ||
tag: '0.8.1' | ||
version: '0.8.1' | ||
tools_required: | ||
- host-autoconf-v2.69 | ||
- host-automake-v1.15 | ||
- host-autoconf-archive | ||
- host-pkg-config | ||
- host-libtool | ||
regenerate: | ||
- args: ['./autogen.sh'] | ||
tools_required: | ||
- system-gcc | ||
pkgs_required: | ||
- mlibc | ||
- libretls | ||
- openssl | ||
- ncurses | ||
configure: | ||
- args: | ||
- '@THIS_SOURCE_DIR@/configure' | ||
- '--host=x86_64-managarm' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use |
||
- '--prefix=/usr' | ||
- '--mandir=/usr/share/man' | ||
build: | ||
- args: ['make', 'all-am', '-j@PARALLELISM@', 'HOSTCC=gcc'] | ||
- args: ['make', 'install-am', 'DESTDIR=@THIS_COLLECT_DIR@'] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
From 084d8d40a24a601c463955ac569183cfb085f96a Mon Sep 17 00:00:00 2001 | ||
From: Alexander <[email protected]> | ||
Date: Thu, 16 Jun 2022 00:31:32 +0200 | ||
Subject: [PATCH] Managarm Patches | ||
|
||
--- | ||
control.c | 14 ++++++++------ | ||
telescope.c | 9 +++++---- | ||
2 files changed, 13 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/control.c b/control.c | ||
index b2cba81..dc2cdcd 100644 | ||
--- a/control.c | ||
+++ b/control.c | ||
@@ -91,12 +91,14 @@ control_init(char *path) | ||
} | ||
umask(old_umask); | ||
|
||
- if (chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { | ||
- warn("%s: chmod", __func__); | ||
- close(fd); | ||
- (void)unlink(path); | ||
- return (-1); | ||
- } | ||
+ | ||
+ // patched because chmod == nop | ||
+ //if (chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { | ||
+ // warn("%s: chmod", __func__); | ||
+ // close(fd); | ||
+ // (void)unlink(path); | ||
+ // return (-1); | ||
+ //} | ||
|
||
return (fd); | ||
} | ||
diff --git a/telescope.c b/telescope.c | ||
index 0a65f41..1991d1b 100644 | ||
--- a/telescope.c | ||
+++ b/telescope.c | ||
@@ -64,7 +64,7 @@ int operating; | ||
* "Safe" (or "sandobox") mode. If enabled, Telescope shouldn't write | ||
* anything to the filesystem or execute external programs. | ||
*/ | ||
-int safe_mode; | ||
+int safe_mode = 0; | ||
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't do anything since global vars are initialized to zero anyway. |
||
|
||
static struct imsgev *iev_net; | ||
|
||
@@ -1047,8 +1047,8 @@ main(int argc, char * const *argv) | ||
|
||
if (getenv("NO_COLOR") != NULL) | ||
enable_colors = 0; | ||
- | ||
- while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) { | ||
+ optind = 0; | ||
+ while ((ch = getopt(argc, argv, opts)) != -1) { | ||
Comment on lines
+54
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this done? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Working around unimplemented/incorrectly implemented functionality in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then getopt_long should be fixed instead of hacking around such issues here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See managarm/mlibc#438 for the fix. |
||
switch (ch) { | ||
case 'C': | ||
exit(ui_print_colors()); | ||
@@ -1128,8 +1128,9 @@ main(int argc, char * const *argv) | ||
"telescope already running?"); | ||
} | ||
|
||
+ | ||
/* Start children. */ | ||
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe2net) == -1) | ||
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipe2net) == -1) | ||
Comment on lines
+66
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this done? If we're missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have it, however Managarm code asserts that the protocol (3rd argument) is 0. We should change the Managarm code to allow PF_UNSPEC (which is basically pick what you think is best afaik). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upstream is wrong here afaik, from posix:
|
||
err(1, "socketpair"); | ||
start_child(PROC_NET, argv0, pipe2net[1]); | ||
imsg_init(&net_ibuf.ibuf, pipe2net[0]); | ||
-- | ||
2.36.1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This port lacks meta data. Is it necessary to use this package? We already have OpenSSL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libretls is a libtls reimplementation of libtls for openssl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from missing metadata and architecture labels, ports should have one empty line between them. And yes, we need
libretls
or maketelescope
link againstlibressl
, which I'm against. Gentoo haslibretls
in their repo's too, so this is fine.