!9IQChSjwSHXPPWTa:lix.systems

Lix

1104 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms294 Servers

Load older messages


SenderMessageTime
13 Oct 2025
@raitobezarius:matrix.orgraitobezariussomething very going is happening with regexes19:12:10
@raitobezarius:matrix.orgraitobezarius
std::string LinuxLocalDerivationGoal::rewriteResolvConf(std::string fromHost)
{
    if (!runPasta) {
        return fromHost;
    }

    static constexpr auto flags = std::regex::ECMAScript | std::regex::multiline;
    static auto lineRegex = regex::parse("^nameserver\\s.*$", flags);
    static auto v4Regex = regex::parse("^nameserver\\s+\\d{1,3}\\.", flags);
    static auto v6Regex = regex::parse("^nameserver.*:", flags);
    std::string nsInSandbox = "\n";
    if (std::regex_search(fromHost, v4Regex)) {
        nsInSandbox += fmt("nameserver %s\n", PASTA_HOST_IPV4);
    }
    if (std::regex_search(fromHost, v6Regex)) {
        nsInSandbox += fmt("nameserver %s\n", PASTA_HOST_IPV6);
    }
    return std::regex_replace(fromHost, lineRegex, "") + nsInSandbox;
}

19:12:22
@raitobezarius:matrix.orgraitobezariusthis is how the rewrites should take place19:12:26
@raitobezarius:matrix.orgraitobezariusif anyfew has some time to stare at this and find the bug, it'd be greatly appreciated19:12:45
@raitobezarius:matrix.orgraitobezarius(as I'm wrangling with profiling stuff rn)19:12:49
@marie:marie.cologneMarieI'll have a look19:15:03
@hexa:lossy.networkhexauhh, I don't know pasta, but how does it map from PASTA_HOST_IPV4 to the host resolver or wherever?19:28:57
@hexa:lossy.networkhexaespecially if the host resolver points to loopback19:29:09
@hexa:lossy.networkhexathis only substitutes nameservers from the host resolv.conf from what I see19:35:43
@hexa:lossy.networkhexaso as long as it maps the PASTA_HOSTA_IPXX addresses it should be fine?19:36:04
@raitobezarius:matrix.orgraitobezariuspasta connects things together19:37:04
@kfears:matrix.orgKFears (burnt out)Same thought... Resolution should be independent from connectivity19:37:05
@raitobezarius:matrix.orgraitobezariusso the PASTA_HOST_IPV4 is exactly 127.0.0.1 in the other world19:37:12
@raitobezarius:matrix.orgraitobezariuspasta host IPs are AIPA or a ULA that we generate IIRC19:37:35
@raitobezarius:matrix.orgraitobezarius* pasta host IPs are AIPA (v4) or a ULA (v6) that we generate IIRC19:37:41
@k900:0upti.meK900Can it not just do both19:38:18
@k900:0upti.meK900And let the applications happy eyeball19:38:25
@raitobezarius:matrix.orgraitobezariusit perhaps should19:38:49
@yuka:yuka.devYureka (she/her)Is it correct that deleting store paths from a http(s) binary cache is pretty much impossible without destroying the user experience?19:39:15
@raitobezarius:matrix.orgraitobezariuswhat does that mean?19:39:26
@raitobezarius:matrix.orgraitobezariusyou mean that deleting a random path in the middle lead to explosions?19:39:43
@yuka:yuka.devYureka (she/her)No, deleting a whole isolated closure19:39:50
@raitobezarius:matrix.orgraitobezariusthat's kinda a semi bug and a semi accepted thing19:39:51
@raitobezarius:matrix.orgraitobezariuswhy would that lead to destroyed UX?19:39:59
@yuka:yuka.devYureka (she/her)Because when there is still an entry in the narinfo cache, Lix will explode upon trying to fetch the Nar19:40:08
@hexa:lossy.networkhexayeah, that is bad ux19:40:16
@raitobezarius:matrix.orgraitobezariusThat's Bad™19:40:17
@raitobezarius:matrix.orgraitobezariusnarinfo cache should be cache19:40:27
@hexa:lossy.networkhexawith gcing caches you should set a shorter negative lifetime for the cache19:40:37
@raitobezarius:matrix.orgraitobezarius cc ma27 — I remember you did stuff on the narinfo cache or am I misremembering? 19:40:41

Show newer messages


Back to Room ListRoom Version: 10