SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
2.98k stars 1.22k forks source link

[Package Request] Adguard Home #6069

Open c0154936 opened 2 months ago

c0154936 commented 2 months ago

Software Name

Adguard Home

Brief Description

Free and open source, powerful network-wide ads & trackers blocking DNS server.

Website

https://adguard.com/en/adguard-home/overview.html

Documentation

https://github.com/AdguardTeam/AdGuardHome#getting-started

Build/Installation documentation

https://github.com/AdguardTeam/AdGuardHome#getting-started

Source code

https://github.com/AdguardTeam/AdGuardHome#getting-started

OpenSource License

GPLv3

Other License

No response

c0154936 commented 2 months ago

I know you have been having trouble packaging Pi-Hole, I've seen the request for pi hole has been open since 2016.

This is an alternative to pi hole but pretty much does the same stuff.

Maybe this could be easily packaged instead? I don't know.

publicarray commented 2 months ago

I gave it a quick shot but because port 53 for DNS is a privileged port it's not possible anymore, Synology has put in roadblocks to prevent package developers from using root. Using a different port than 53 is worthless but even that wasn't possible, not sure why, in the config file I specified an unprivileged port: https://adguard-dns.io/kb/adguard-home/getting-started/#running-without-superuser

Screenshot from 2024-04-18 01-05-21 Screenshot from 2024-04-18 01-05-05

publicarray commented 2 months ago

https://help.synology.com/developer-guide/privilege/preface.html

You can still use docker, however.

Even the sample capabilities give the above error message https://help.synology.com/developer-guide/privilege/privilege_config.html

{
    "defaults": {
        "run-as": "package"
    },
    "username": "sc-adguardhome",
    "tool": [{
        "relpath": "bin/adguardhome",
        "user": "package",
        "group": "package",
        "capabilities": "cap_net_raw",
        "permission": "0700"
    }]
}
{
    "defaults": {
        "run-as": "package"
    },
    "username": "sc-adguardhome",
    "tool": [{
        "relpath": "bin/adguardhome",
        "user": "package",
        "group": "package",
        "capabilities": "",  #< even an empty string is blocked, but if i remove this line, I can at least install the package
        "permission": "0700"
    }]
}
publicarray commented 2 months ago

Source Code if anyone is interested: https://github.com/SynoCommunity/spksrc/compare/master...publicarray:spksrc:adguardhome