From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8FyIORPR3GCpVgEAgWs5BA (envelope-from ) for ; Wed, 30 Jun 2021 22:16:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QKkiNRPR3GB9WAAAbx9fmQ (envelope-from ) for ; Wed, 30 Jun 2021 20:16:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9FCC721A70 for ; Wed, 30 Jun 2021 22:16:19 +0200 (CEST) Received: from localhost ([::1]:44718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lygd8-0001kO-H0 for larch@yhetil.org; Wed, 30 Jun 2021 16:16:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lygcu-0001j8-Eh for guix-patches@gnu.org; Wed, 30 Jun 2021 16:16:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lygcs-0005bI-Qv for guix-patches@gnu.org; Wed, 30 Jun 2021 16:16:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lygcs-00048o-CS for guix-patches@gnu.org; Wed, 30 Jun 2021 16:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49254] [PATCH 1/4] gnu: Add wondershaper. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Jun 2021 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49254 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Aljosha Papsch , 49254@debbugs.gnu.org Received: via spool by 49254-submit@debbugs.gnu.org id=B49254.162508414015880 (code B ref 49254); Wed, 30 Jun 2021 20:16:02 +0000 Received: (at 49254) by debbugs.gnu.org; 30 Jun 2021 20:15:40 +0000 Received: from localhost ([127.0.0.1]:58859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lygcW-000483-AJ for submit@debbugs.gnu.org; Wed, 30 Jun 2021 16:15:40 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:51692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lygcU-00047v-ID for 49254@debbugs.gnu.org; Wed, 30 Jun 2021 16:15:39 -0400 Received: from [172.20.10.4] ([5.23.251.255]) by michel.telenet-ops.be with bizsmtp id PYFc250035XNd5906YFcU1; Wed, 30 Jun 2021 22:15:37 +0200 Message-ID: <6648fb8c50107945119d30913a246a9d9a0e52cc.camel@telenet.be> From: Maxime Devos Date: Wed, 30 Jun 2021 22:15:26 +0200 In-Reply-To: <20210628152232.31073-2-ep@stern-data.com> References: <20210628152232.31073-1-ep@stern-data.com> <20210628152232.31073-2-ep@stern-data.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-gA7G/PimSVcgqnR0KpNM" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1625084137; bh=m/x3lIpNKtkyxbLa+9cOYj+NbDqg4zcTZTPlvspWQLY=; h=Subject:From:To:Date:In-Reply-To:References; b=aGM/L962xFd6NQ6DTRE0GBYeamhJJrjKDq3GG4eJJBbcuK95HfGJvS9TGLe4RWalL gBGxEp5ULfF9y60EP1Wjm23+roZEJ8u7/vg/flYZGEwO/UGzb48R+RI/u9or6CffIY 5GYiM7JhcYtDloA4/+MvFu3nMjDt5Wis12RFyqfwzu6LVq7z/NR76pD6zhDu/djm4T c4ESOg2pPIfxxgVfvIPQe7pD4vVtpgj4MpgJdDEPaGAtt7Lmlp6BeNVDJd3AdiTYn2 5Z8iW8+HvijzEOlJkLkjCaLyN40L5yhAYb4eVnx/YEtG2qUq6dmnCnAAgy8Aize0W4 hi/JK1UXo1DaA== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625084179; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=m/x3lIpNKtkyxbLa+9cOYj+NbDqg4zcTZTPlvspWQLY=; b=GpuCkjklAKml634W4/iYg3ykGfox5SAuOMYi511JwZl23V9fVEdSv/Pfr6Owzaa9TPCYLY fdWtTPCbvwqQjkjahvgE7GI7lrzeHrATTsD6CIPj8EHvBEqLmcDbEupIMvKqpCBYIcXnJh tjU0cU9LFyj7fJzLYgvOdwiTBUeZqsPlIpsSfqlDbBWHQit9eqXH+jEnbJNzkBS+3jLlEz hqLgicdp9zhJ57lRirUj2aB/vxtOpxvY33YhRMCbAqQzAxPlNCNBnD/n3qhAFIaD+7cvFH 1Wy/uLW+sWJqwAJ9/7r5wCGVG7rSKs3nf0vZS+0AsmCoUg6OxQV+PNTIL7x7LA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625084179; a=rsa-sha256; cv=none; b=pjQsS2yz5Pgb1baKmnt60s4TIl4EZORKCg63krQrs1251gc/jjVhYp7v0Bj9utK/F1f58m qGKRjchFGOUBd6UPREwYCUQMnO7rpbKFLbz7mO+Uq3x2Lw1voZJF7m2s11qGUpBsMHQGJ3 3efMhFclV5tzHaH98YmKjs+qbr+n0e85U80j3oRcjc2fa8LXt5ClQEEZ0QxmdjpU5+zafQ RKNnQa4pEMI+Vn8syrG2hnck8NI+q53EenXrcNuLIls6J46VLdSszpOF0l2a/HGweQd3Ww SzKEQRobGnUDiL9P/rPvu59sYFOo5Sco+FLLsY6WGA2syh6ZfS+sizoDyDz04Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="aGM/L962"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="aGM/L962"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 9FCC721A70 X-Spam-Score: -3.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: Nq5hpDfYz5zt --=-gA7G/PimSVcgqnR0KpNM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Aljosha Papsch schreef op ma 28-06-2021 om 17:22 [+0200]: > + (git-reference > + (url "https://github.com/apapsch/wondershaper") > + (commit "0987dbb0c360184b8aacf391646e19ea9ee78b10"))) Best add a comment like ;; Use a fork that allows overriding the configuration file =E2=80=98We=E2=80=99 usually try to use upstream versions. > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "1hyivkpvr5pv8wg64i7vgpxib4allbp4v1ahp3qhc1d88rkw7gjs"))= )) > + (build-system copy-build-system) > + (arguments > + `(#:install-plan '(("./wondershaper" "./bin/")) > + #:phases > + (modify-phases %standard-phases > + (add-after 'patch-shebangs 'patch-invoked-commands > + (lambda* (#:key outputs inputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin"))) > + (substitute* (string-append bin "/wondershaper") > + (("^\\s*ip ") > + (string-append (which "ip") " ")) Using (which "blabla") is not correct when cross-compiling, as "which" looks in $PATH, but "iproute2" (and "kmod") won't be in $PATH when cross-compiling as they are 'inputs', not 'native-inputs' You'd need (search-input-file inputs "/bin/ip") (or maybe "/sbin/ip", I dunno). Actually, search-input-file is in core-updates, but not yet on 'master', so instead do (string-append (assoc-ref inputs "iproute2") "/bin/ip") or something like that. Looking at the source code, I see usage(){ cat << EOF so it seems you need to substitute "cat" as well (it is from coreutils). I'd recommend copying "wondershaper.conf" somewhere as well, and substituting "/etc/conf.d/wondershaper.conf" and "/etc/systemd= /wondershaper.conf" in 'wondershaper' appropriately, so it will have some defaults. Greetings, Maxime. --=-gA7G/PimSVcgqnR0KpNM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYNzQ3hccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hhxAQDvFswwmtiS5I2C8moFS/y1jpvD Sa0ELUKhllhpdmb5YQD/ZqbLOcbjdWTWM870M+UJRAc+TKAkHiJQ209R3FvmBQM= =c9Em -----END PGP SIGNATURE----- --=-gA7G/PimSVcgqnR0KpNM--