-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
miredo: Initial import of the package #4201
Conversation
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.
Please review these suggestions
ipv6/miredo/Makefile
Outdated
@@ -0,0 +1,65 @@ | |||
# | |||
# Copyright (C) 2006-2017 OpenWrt.org |
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.
Do not assign copyright to OpenWrt unless you affiliated.
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.
OK, I probably misunderstood
An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
in the Contribution Guidelines. I don't really care for copyright, so I'm happy to have none, but I can put there whatever is preferred, or create my own.
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.
To be clear, you're free to add your own however :-)
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.
Added my own, pro forma :)
ipv6/miredo/Makefile
Outdated
PKG_VERSION:=1.2.6 | ||
PKG_RELEASE:=1 | ||
|
||
PKG_BUILD_DIR:=$(BUILD_DIR)/miredo-$(PKG_VERSION) |
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.
Not needed?
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.
Done.
ipv6/miredo/Makefile
Outdated
PKG_BUILD_DIR:=$(BUILD_DIR)/miredo-$(PKG_VERSION) | ||
PKG_SOURCE:=miredo-1.2.6.tar.xz | ||
PKG_SOURCE_URL:=https://www.remlab.net/files/miredo/ | ||
PKG_SHA256SUM:=fa26d2f4a405415833669e2e2e22677b225d8f83600844645d5683535ea43149 |
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.
Should be PKG_HASH
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.
Done.
ipv6/miredo/Makefile
Outdated
PKG_SOURCE:=miredo-1.2.6.tar.xz | ||
PKG_SOURCE_URL:=https://www.remlab.net/files/miredo/ | ||
PKG_SHA256SUM:=fa26d2f4a405415833669e2e2e22677b225d8f83600844645d5683535ea43149 | ||
PKG_CAT:=xzcat |
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.
Not needed
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.
Done.
ipv6/miredo/Makefile
Outdated
|
||
CONFIGURE_VARS += CFLAGS="$(TARGET_CFLAGS) -std=gnu99" | ||
|
||
define Build/Configure |
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.
CONFIGURE_ARGS doesn't work?
Also, we most likely do not want a static binary rather a shared one.
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.
Works, thank you.
I was struggling a bit with shared libraries as libtool
creates wrappers instead of the actual programs. But pulling the original ones from its helper directories like src/.libs/miredo works, I updated the patch to do this. (Maybe there's a better way, I'll keep looking.) However, when using shared libraries, the package is actually larger than when using static builds. In that case, is it still worth using shared, considering that it's very unlikely another program will ever use the libraries?
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.
Please disregard the comment about libtool
, this is properly fixed by copying files created by make install
. Still I'm curious if a smaller, static version won't be more efficient.
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.
CONFIGURE_ARGS
work and now I'm using shared libraries.
ipv6/miredo/Makefile
Outdated
IPv6 connectivity even from behind NAT devices. | ||
endef | ||
|
||
CONFIGURE_VARS += CFLAGS="$(TARGET_CFLAGS) -std=gnu99" |
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.
You probably want PKG_FIXUP:=autoreconf and TARGET_CFLAGS like here:
https:/openwrt/packages/blob/master/libs/libx264/Makefile#L27
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.
TARGET_CFLAGS
works nicely, but autoreconf
doesn't. The problem is that I need to patch configure
to omit some test that fails to build in the build environment (see patches/100-cross-compile.patch), but I couldn't find a way of doing this after running autoreconf
.
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.
In particular, I'm fixing configure
to prevent the error below, I didn't find a better solution.
configure: checking required libraries...
checking for /proc/self/maps... configure: error: cannot check for file existence when cross compiling
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.
Just omit it?
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.
Omited autoreconf
, kept TARGET_CFLAGS
, this works now.
28a037c
to
cccb636
Compare
PTAL? |
ipv6/miredo/Makefile
Outdated
include $(INCLUDE_DIR)/package.mk | ||
|
||
CONFIGURE_ARGS+=--with-pic --without-libiconv-prefix --without-libintl-prefix --without-Judy | ||
TARGET_CFLAGS+=-std=gnu99 -O3 -ffast-math |
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.
Why is -O3 and -ffast-math needed here? If it is a performance optimization please add some numbers to the comments or explain why this is good.
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.
Removed. I copied it from some other package when creating this one, probably not needed at all.
ipv6/miredo/files/miredo.init
Outdated
procd_set_param file $CONFFILE | ||
procd_set_param stdout 1 # forward stdout of the command to logd | ||
procd_set_param stderr 1 # same for stderr | ||
#procd_set_param user nobody # run service as user nobody |
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.
Please remove this useless commented line.
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.
Done.
|
||
# Linux iproute2 path: | ||
-IP="/sbin/ip" | ||
+IP="/usr/sbin/ip" |
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.
Could you make it use ip without an absolute path here or does the application does not have the PATH when executing this?
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.
I checked, but absolute path is required here.
(Using a relative one would probably be a potential security issue anyway.)
PTAL? |
Signed-off-by: Petr Pudlak <[email protected]>
This package on openwrt 18.06 can't be compiled in musl, but it can be compiled with glibc or uclibc(use patches are redundant! |
Old PR being closed for lack of interest. |
My apologies to everyone involved, I haven't had any time to work on this. Should this improve, I'll fix the problems above and reopen. Thank you! |
Hello! What about continuing? I tried to build miredo (with all modifications from here plus replaced gettext.h with newer one) against musl, but with no success. Can you help me? Thanks! |
@Ykidia See following pull request |
Thank you, but I already adopted miredo package for actual (latest in OpenWrt) gettext, modified all *.m4 (recompiling aclocal.m4), applied https:/ppetr/openwrt-miredo/pull/4 and it is compiling and working now very good. Fixing errors like in #11467 ("pass PKG_CHECK_FORMAT_SECURITY:=0") is not the way I like (and many others). |
Maintainer: me
Compile tested: OpenWrt-SDK-15.05.1-brcm47xx-mips74k_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64
Run tested: ASUS RT-N66U (brcm47xx-mips74k) running Chaos Calmer (15.05.1, r48532); works and provides IPv6 connectivity behind NAT as expected out of the box.
Description:
Miredo is an open-source Teredo IPv6 tunneling software, for Linux and the BSD operating systems. It includes functional implementations of all components of the Teredo specification (client, relay and server). It is meant to provide IPv6 connectivity even from behind NAT devices.