Open tbirz opened 3 years ago
Similar issue for me on:
sudo docker run --rm --privileged --env PACKAGE_ARCH=braswell --env DSM_VER=7.0 -v $(pwd)/artifacts:/result_spk synobuild
WireGuard version: 1.0.20210606
WireGuard tools version: 1.0.20210424
libmnl version: 1.0.4
Cloning into 'pkgscripts-ng'...
Download... https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/base_env-7.0.txz
Download destination: /toolkit_tarballs/base_env-7.0.txz%
Download... https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/ds.braswell-7.0.env.txz
Download destination: /toolkit_tarballs/ds.braswell-7.0.env.txz
Download... https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/ds.braswell-7.0.dev.txz
Download destination: /toolkit_tarballs/ds.braswell-7.0.dev.txz
tar -xhf /toolkit_tarballs/base_env-7.0.txz -C /build_env/ds.braswell-7.0
tar -xhf /toolkit_tarballs/ds.braswell-7.0.env.txz -C /build_env/ds.braswell-7.0
tar -xhf /toolkit_tarballs/ds.braswell-7.0.dev.txz -C /build_env/ds.braswell-7.0
All task finished.
============================================================
Parse argument result
------------------------------------------------------------
env_section : default
env_version : 7.0
dep_level : 1
branch : master
suffix :
collect : True
update : True
link : True
build : True
install : True
only_install : False
sign : False
build_opt : -J
install_opt :
print_log : True
sdk_ver : 6.0
package : WireGuard
Processing [7.0-42176]: braswell
============================================================
Start to run "Traverse project"
------------------------------------------------------------
[INFO] Branch projects: WireGuard
[INFO] Tag projects:
[INFO] Reference projects:
[INFO] Reference tag projects:
============================================================
Start to run "Link Project"
------------------------------------------------------------
Link /pkgscripts-ng -> /build_env/ds.braswell-7.0/pkgscripts-ng
Link //source/WireGuard -> /build_env/ds.braswell-7.0/source/WireGuard
============================================================
Start to run "Build Package"
------------------------------------------------------------
[braswell] set -o pipefail; env PackageName=WireGuard /pkgscripts-ng/SynoBuild --braswell -c --min-sdk 6.0 -J WireGuard 2>&1 | tee logs.build
Traceback (most recent call last):
File "/pkgscripts-ng/include/python/parallel.py", line 12, in __call__
result = self.__callable(*args, **kwargs)
File "pkgscripts-ng/PkgCreate.py", line 408, in run_command
with open(os.devnull, 'wb') as null:
PermissionError: [Errno 13] Permission denied: '/dev/null'
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/pkgscripts-ng/include/python/parallel.py", line 12, in __call__
result = self.__callable(*args, **kwargs)
File "pkgscripts-ng/PkgCreate.py", line 408, in run_command
with open(os.devnull, 'wb') as null:
PermissionError: [Errno 13] Permission denied: '/dev/null'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pkgscripts-ng/PkgCreate.py", line 722, in <module>
main(sys.argv[1:])
File "pkgscripts-ng/PkgCreate.py", line 716, in main
packer.pack_package()
File "pkgscripts-ng/PkgCreate.py", line 663, in pack_package
worker.execute()
File "pkgscripts-ng/PkgCreate.py", line 158, in execute
self._process_output(self._run(*argv))
File "pkgscripts-ng/PkgCreate.py", line 428, in _run
return doPlatformParallel(self.run_command, self.env_config.platforms)
File "/pkgscripts-ng/include/python/parallel.py", line 57, in doPlatformParallel
output[item] = results[item].get()
File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
PermissionError: [Errno 13] Permission denied: '/dev/null'
Build log
=========
cat: /build_env/ds.braswell-7.0/logs.build: No such file or directory
Install log
===========
cat: /build_env/ds.braswell-7.0/logs.install: No such file or directory
It looks this is specific to docker rights on Synology. I have compiled on a Debian linux X86 machine without any issue. But, unfortunately, the package can not be installed due to new security rules on DSM 7.0 Any way to force unsigned spk on DSM 7.0 ?
Thanks for the feedback. Unfortunately I am not experienced with docker permissions. It looks as though i might have to go with a vm solution
@tbirz But, Synology have reenforce security rules on DSM 7.0. I didn't find a way to force custom package installation. Due to this limitation, I have switched back to openvpn and I am planning to not use Synology accept for their native application.
@tbirz have you read the installation instructions? you can allow unsigned spks from the control panel
@mcdallas Sorry, don't have an unsigned spk for dsm 7.0 (thats why I wanted to compile one). Do you have or know of anyone who has an spk for DSM 7.0 apollolake?
@tbirz sorry I meant to tag @slysiou , I only have one for geminilake I am afraid but compilation is super easy on macos/linux just follow the instructions
@mcdallas I didn't find where to allow unsigned spk on control panel. Can you share link of installation instruction?
Has anyone tried recently to compile and install? I have just compiled successfully on macOS but cannot install the package in DSM 7.0.
I am running the latest DSM 7 version: DSM 7.0-41890
Compiled for apollolake... I have the spk but when I go to install, I get "Invalid File Format. Please contact the package developer."
Has anyone tried recently to compile and install? I have just compiled successfully on macOS but cannot install the package in DSM 7.0.
I am running the latest DSM 7 version: DSM 7.0-41890
Compiled for apollolake... I have the spk but when I go to install, I get "Invalid File Format. Please contact the package developer."
Same for me. I didn't find the way to force install of unsigned package...
I am running the latest DSM 7 version: DSM 7.0-41890
Compiled for apollolake... I have the spk but when I go to install, I get "Invalid File Format. Please contact the package developer."
I believe you need to compile from the DSM 7 branch that’s not merged in yet for DSM 7
Has anyone tried recently to compile and install? I have just compiled successfully on macOS but cannot install the package in DSM 7.0. I am running the latest DSM 7 version: DSM 7.0-41890 Compiled for apollolake... I have the spk but when I go to install, I get "Invalid File Format. Please contact the package developer."
Same for me. I didn't find the way to force install of unsigned package...
Hi Guys, I too am running the latest version: DSM 7.0-41890. I have now managed to get Wireguard working. I used the spk apollolake file from matige's issue #71. If memory serves me correctly, the invalid file format comes from trying to install via the package centre. This does not work for DSM7.0. You must use SSH. Loaded SSH using putty Completed username & password sudo -i copied spk file to root then run the following commands (in root): sudo synopkg install WireGuard-apollolake-xxxxxxxxxxxx.spk sudo /var/packages/WireGuard/scripts/start
You can then complete the rest of your wireguard setup........
I am running the latest DSM 7 version: DSM 7.0-41890 Compiled for apollolake... I have the spk but when I go to install, I get "Invalid File Format. Please contact the package developer."
I believe you need to compile from the DSM 7 branch that’s not merged in yet for DSM 7
This was the piece I overlooked... I recompiled using the DSM 7 branch that hasnt been merged yet and it works perfectly. https://github.com/Matige/synology-wireguard.git Branch: DSM7.0
Need to install from command line.
@mcdallas ... did you compiled the geminilake version for DSM7.0? I tried, but got the same error like above: "/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied ERROR: This script must be run as root"
Could you publish your geminilake build (for me or for all)?
@Pasternak8 you can find it here https://keybase.pub/mcdallas/WireGuard-geminilake-1.0.20210219.spk
@mccdallas: thanks a lot. After
wireguard works like before - with the old key an configurations.
Well done!
@mccdallas: thanks a lot. After
- uninstall the old wireguard package
- installing on the shell like tbirz wrote: (sudo synopkg install WireGuard-geminilake-1.0.20210219.spk)
- starting the wireguard package in the DSM
- and running wg-quick up wg0
wireguard works like before - with the old key an configurations.
Well done!
I got an error when attempting to install 20210219.spk
{"error":{"code":0},"results":[{"action":"install","beta":false,"betaIncoming":false,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"postreplace","package":"WireGuard","packageName":"WireGuard","pid":26044,"spk":"WireGuard-geminilake-1.0.20210219.spk","stage":"installed_and_stopped","status":"stop","success":true,"username":""}],"success":true}
The DSM also fails to run the package service. Any idea what's up with this?
@Nitrousoxide what is the model of your NAS? Are you sure that geminilake is the one you want? You can check here https://github.com/runfalk/synology-wireguard#compatibility-list
@mcdallas Yep, it's a 920+ so should be a geminilake.
anyone got an apollolake build? Tried to compile it myself but when I tried to run it after installing from command line, DSM GUI said it failed...
anyone got an apollolake build? Tried to compile it myself but when I tried to run it after installing from command line, DSM GUI said it failed...
I am looking also for an apollolake build (DS918+). I have tried the buld mentioned above with installation from command line, but it says it is the wrong format (?)
anyone got an apollolake build?
Apollolake built correctly for me with cross-compilation from x86_64 - https://github.com/runfalk/synology-wireguard/pull/102
anyone got an apollolake build?
Apollolake built correctly for me with cross-compilation from x86_64 - #102
This worked perfectly on my DS918+. Thansk!
@mcdallas Yep, it's a 920+ so should be a geminilake.
Did you ever get this working
I have the same model and SPK file doesnt run
@mcdallas Yep, it's a 920+ so should be a geminilake.
Did you ever get this working
I have the same model and SPK file doesnt run
Try the spk from my github https://github.com/SirNoish/synology-wireguard/releases/tag/1.0.20211208
Well I guess I found the solution:
diff --git a/build.sh b/build.sh
index ee8a382..89fe673 100755
--- a/build.sh
+++ b/build.sh
@@ -114,6 +114,9 @@ fi
# Disable quit if errors to allow printing of logfiles
set +e
+# bind mount /dev into build env chroot
+mount -o bind /dev $build_env/dev
+
# Build packages
# -p package arch
# -v DSM version
Adding this line and running a
sudo docker build -t synobuild .
worked out of the box.
Would have create a PR but I'm not sure if this can be considered a general solution.
Hi guys, DSM Ver 7.0 41882 (DS1019+) tried to compile using matiges instructions (refer pull request #71). Did not compile. See putty output:
Can any one shed light on this issue please? I also ran as root rm /dev/null mknod /dev/null c 1 3 chmod 666 /dev/null
then tried to compile again! still no joy!