wg-autoconf: add WireGuard Auto-Configuration tool#28459
wg-autoconf: add WireGuard Auto-Configuration tool#28459alexandrglm wants to merge 1 commit intoopenwrt:masterfrom
Conversation
d25975b to
2b157e3
Compare
|
You need to squash your commits. |
71e843e to
f92e471
Compare
Fixed |
|
OK, but you still need to follow the commit format guidelines. There is no message or sign-off now. |
f6a854f to
50151b6
Compare
Ok, had to make my email public. No other way to --amend + push correctly. |
|
Also please describe the changes in the commit message, that is why this package is useful for. And you don't need the |
f7a86c6 to
074dd6c
Compare
Ok, sir, all set, 75 chars/line, 50 char subject. Good to go? |
074dd6c to
58f7a7b
Compare
CLI tool for handling (multiple) WireGuard setups, with batch configs, policy-based routing, and cleanup operations. Easy and safe WireGuard-VPN tunneling manager for OpenWrt. DOC: https://github.com/alexandrglm/openwrt_wg-autoconf Signed-off-by: Alexander Gomez <[email protected]>
58f7a7b to
84b97a3
Compare
|
Made several update:
Ready for review! |
feckert
left a comment
There was a problem hiding this comment.
I must admit, I'm not entirely convinced why we need all the preinst, postinst and prerm scripts!
| # WireGuard Auto-Configuration tool for OpenWrt v1.0.0-r6 | ||
| # Maintainer: Alexander Gomez <[email protected]> | ||
| # Repository: https://github.com/alexandrglm/openwrt_wg-autoconf | ||
| # |
There was a problem hiding this comment.
Please remove this lines these lines are not needed.
| PKG_VERSION:=1.0.0 | ||
| PKG_RELEASE:=6 | ||
| PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)-r$(PKG_RELEASE)-source.tar.gz | ||
| PKG_SOURCE_URL:=https://github.com/alexandrglm/openwrt_wg-autoconf/releases/download/1.0.0-r6/ |
There was a problem hiding this comment.
Normally, an upstream project has versioning scheme <x.x.x>.
The value r6 refers to the change that OpenWrt is making and is therefore the PKG_RELEASE.
Therefore, the URL is normally structured as follows:
PKG_SOURCE_URL:=https://github.com/alexandrglm/openwrt_wg-autoconf/releases/download/$(PKG_VERSION)/
Can you adjust that in your Upstream repository?
|
|
||
| define Package/wg-autoconf/preinst | ||
| #!/bin/sh | ||
| /usr/libexec/wg-autoconf/scripts/wg-autoconf_preinst.sh |
There was a problem hiding this comment.
I suspect that this will not work as expected. The script call is not available because it is a preinst call! The referenced script is currently not installed in /usr/libexec/wg-autoconf/scripts/.
Testing various scenarios:
... I've endeavoured to ensure users don't end up in a "disaster" which requires a hard reset. The processes verify:
Then, executes their actions:
This, much to my regret, which would simplify my work by making "an easy code" but could nuke any router, must be repeated at different points outside the binary (such as in each existing lifecycle method ...), in an almost "surgical" manner, to ensure all cases are covered.
Got it.
Indeed, using Alpine SDK (abuild), the pre-install method doesn't execute the referenced script because—during pre-installation—the script doesn't exist in In that case, the method includes the cleanup instructions directly within the pre_inst script itself, as I've explained before, even though the recommendations to avoid maintenance and scalability issues were to move that logic out of the lifecycle method in the Makefile. Do I understand the need for these methods (not in my app but in general) ? Furthermore, since my sources aren't compiled from, e.g. C, but rather a shell scripts bin, I admittedly don't fully understand what a Makefile requires or how APK lifecycle methods function....though I've grasped APKBUILD usage well enough. I see now the necessity for revisiting certain points across different APK lifecycle phases (including pre_upgrade, post_upgrade, which don't exist in a Makefile; hence the pre-existence hook in preinst). In summary, a review of certain lifecycle phases that are not yet fully understood is planned. I plan to implement a function that:
Is this preferable to what many OpenWrt projects do (configure, reconfigure, and obliterate configurations, forcing users into hard resets)? Hardly ideal. Once everything is updated, I will remove this from draft status for review. Thank you for your time, @feckert |
Adds wg-autoconf package for OpenWrt