From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0DixMY5wY2D3rgAAgWs5BA (envelope-from ) for ; Tue, 30 Mar 2021 20:40:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4PJ+K45wY2AcCgAAB5/wlQ (envelope-from ) for ; Tue, 30 Mar 2021 18:40:14 +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 2DE4410A18 for ; Tue, 30 Mar 2021 20:40:13 +0200 (CEST) Received: from localhost ([::1]:56178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRJHg-0006oX-Cc for larch@yhetil.org; Tue, 30 Mar 2021 14:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRJHZ-0006nx-Ip for guix-patches@gnu.org; Tue, 30 Mar 2021 14:40:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRJHW-0005AH-7P for guix-patches@gnu.org; Tue, 30 Mar 2021 14:40:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRJHW-0001FY-3q for guix-patches@gnu.org; Tue, 30 Mar 2021 14:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47495] [PATCH] gnu: vsftpd: Use CentOS version and patches. Resent-From: david larsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Mar 2021 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47495 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 47495@debbugs.gnu.org, guix-patches-bounces+david.larsson=selfhosted.xyz@gnu.org X-Debbugs-Original-Cc: 47495@debbugs.gnu.org, Guix-patches , guix-patches@gnu.org Received: via spool by 47495-submit@debbugs.gnu.org id=B47495.16171295544713 (code B ref 47495); Tue, 30 Mar 2021 18:40:02 +0000 Received: (at 47495) by debbugs.gnu.org; 30 Mar 2021 18:39:14 +0000 Received: from localhost ([127.0.0.1]:52831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJGj-0001Dx-L1 for submit@debbugs.gnu.org; Tue, 30 Mar 2021 14:39:14 -0400 Received: from server0.selfhosted.xyz ([217.64.149.7]:50378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJGh-0001Dj-Iu for 47495@debbugs.gnu.org; Tue, 30 Mar 2021 14:39:12 -0400 Received: from server0.selfhosted.xyz (localhost [127.0.0.1]) by server0.selfhosted.xyz (Postfix) with ESMTP id AB0761CC429D; Tue, 30 Mar 2021 20:38:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=selfhosted.xyz; s=dkim; t=1617129545; bh=KE0fmHN58UfSO6+VeMqJw69iNuKU95ExnWKC9iySm3Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Eg2T8Xo0qSW2Ahu1B741PfLHJl8w3nlIbbG40FUD6jtjC8T/Q+EmnoJzuYZbZWEES ErSl0zilMejjZkKTLEoA/pZwoIXUcTOrGuopgYqLydAuZqOVsQ9/RaSI++AfiZts9U fE2QayeAbnvXCqvG4NW0jlAzZx4VDX7GWQ7342F3+RvRnNUlFZdclCcwx4cBp9jDnG U2KCoFxQivMmGBnYXhmx+gR/uh7ct+lLsxZH7myW1tHaboZWXTUQmcwoQug5LSVsFZ YKVLAkGV757qEu5x9y9e0mnsrSH4aUNRrARnySc9WPd1MVccWUyBvBv8xn7NpNhnNL hioVxyERV9GiA== X-Fuglu-Suspect: cff58a3c339445028fdd2fc7e3a6b6d4 X-Fuglu-Spamstatus: NO Received: from webmail.selfhosted.xyz (office.selfhosted.xyz [192.168.1.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mail@selfhosted.xyz) by server0.selfhosted.xyz (Postfix) with ESMTPSA; Tue, 30 Mar 2021 20:38:58 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 30 Mar 2021 20:38:58 +0200 From: david larsson In-Reply-To: <87y2e4hd2z.fsf@nckx> References: <14748028ccd69b0d3a767a70b5832a79@selfhosted.xyz> <08d5f3aefaeff390aa73a1e88bd64e13@selfhosted.xyz> <87y2e4hd2z.fsf@nckx> Message-ID: X-Sender: david.larsson@selfhosted.xyz 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=1617129614; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=KE0fmHN58UfSO6+VeMqJw69iNuKU95ExnWKC9iySm3Q=; b=dkp0csh9D4BAHPTi/gPPyTWJ/GXLz2jp0dXR/yB73JMhJIFr3TkEKsVsoco3ifX1D7B+0b o6u+H7xgVgnCD0yiXjXmoD0xC5k4xZifd98xKSH7EwAbbEByxnxdtOGy5GhDg/QBTw+ShG kl82flN5PTaGK98cJO5wXQ3RVadbvJwSRMN1I8/vE2CVreKxEeI11mWvjFaol7tdhu+RbZ FsBD+R9Hznnf/ceWtFCiGBvV1KBGfF0bVkZp6oOwZcRlChAKpwDaCxZ8O1tFFz16qFeXUn 40KJvZGW20GMFecooUwPV/kVqJsrzFGmg9uiKzasLxfo78eNYEej4mkkChZk5w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617129614; a=rsa-sha256; cv=none; b=jynjjTsSo8W8c+rXOvh35Be+YirR8HpvCAiy08IsAIFlmwVRg02VusCAN7ZdlJVUJNHy2S dy82xLA0VFGo0NaPVbUMU0gAAxJtkrSR/TCQIXfcPjiIgmyiMsyONoANM3vEtZvsEDr4P/ LoMiWIEZhkpmLj520kE8QxYb2k7KpBigv3BfF8Sn+si2VdwAKypeozH6WVu59ugths8dRu tl4YKNjx5CnfRlcmvuNDKQS6l1De3zIG6VpCX153twdrb6kpKGcVPxO40ZEnHJuDDkJ0QZ rn8KAsCVP9qx1d12BOjMAszQXigk0Aqyj5gK4BxaWfSILgNWbBkCP4C8TdQ45g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=selfhosted.xyz header.s=dkim header.b=Eg2T8Xo0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=selfhosted.xyz (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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=selfhosted.xyz header.s=dkim header.b=Eg2T8Xo0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=selfhosted.xyz (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: 2DE4410A18 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: anAH6Fz1Q26m On 2021-03-30 17:32, Tobias Geerinckx-Rice wrote: > As indicated on IRC I've made some changes to the patch, mainly to > avoid hard-coding all patches. The result is attached. Let me know > what you think. It looks great! Especially nice to see that you separated the patch and unpack phases - it looks much better now. >> >> * gnu/packages/ftp.scm (vftpd): Use CentOS version and >> patches. > ^^^^ > > This is what happens when you copy commit messages from git and paste > them right back in :-) In that case, remove the four leading spaces. Yep, thats what I did :-) will fix next time! Reg. why to use the significantly patched CentOS variant (asked in your updated patch's comments): the email passwords thing was a mistake to mention by me in IRC - that feature was probably already there - however, the tlsv1.2 was the main reason for switching to the CentOS version - other features added by the whole patch-set I don't know much about except from glancing over them and it looks mostly like bug and security fixes to me. > >> + (let ((version "3.0.3") > > I renamed this to UPSTREAM-VERSION, so we can show a more specific > VERSION field in the Guix UI. What we offer isn't ‘3.0.3’ any more. Ok, I think I understand. >> + (revision "32") > > I subjectively added ‘.el8’ here, mainly to factor it out below. > Neither of us knows what it means, though... That is fine with me. > >> + (add-after 'unpack 'patch-installation-directory >> + (lambda* (#:key outputs #:allow-other-keys) >> + (substitute* "Makefile" >> + (("/usr") (assoc-ref outputs "out"))) >> + #t)) > > Moved below the redefined 'unpack phase for clarity. Great! I had in mind to do the same myself, but didn't due to a combination of a lack of Guile/Guix coding skills and time. >> + (replace 'unpack >> + (lambda* (#:key source #:allow-other-keys) >> + (let ((version "3.0.3") >> + (revision "32") >> + (centos-version "8.3.2011")) > > OK, so, as mentioned on IRC this can be avoided by quasiquoting > (as it already was, here) and using ,version instead. > > Quoting is probably the most confusing-yet-basic concept in Scheme. Looks good to me! I am actually quite familiar with unquoting, including g-exp unquoting things, and I somehow missed that I was in a quasiquote context from after "arguments"... I intend to improve! > >> + >> + (invoke "7z" "e" source (string-append "-o" >> "./vsftpd-" >> + version "-" >> + revision ".el8.src.cpio")) >> + (chdir (string-append "./vsftpd-" version "-" >> + revision ".el8.src.cpio")) >> + (invoke "cpio" "-idmv" (string-append >> "--file=./vsftpd-" >> + version "-" >> + revision ".el8.src.cpio")) >> + (invoke "tar" "xvf" (string-append "./vsftpd-" >> version ".tar.gz")) > > This dance had a few steps too many IMO, so I simplified it. It's OK > to keep the unpacked steps around during the (short) build process; > they are tiny by today's standards. Agreed. I was not very happy with this myself. Thanks for fixing! > >> + (let ((patches > > I understand the reason for this: the patches need to be applied in > this order, or patching will appear to succeed but result in > unbuildable source. A simple FIND-FILES is right out. > > However, since the order is specified in vsftpd.spec, it's safer, > shorter, and simply more fun to parse it ourselves. > >> + (chdir (string-append "./vsftpd-" version)) >> + (invoke "git" "init" ".") >> + (invoke "git" "config" "user.email" >> "you@example.com") >> + (invoke "git" "config" "user.name" "Your Name" ) >> + (invoke "git" "add" ".") >> + (invoke "git" "commit" "-m" "first") >> + (map (lambda (x) (invoke "git" "am" >> (string-append "./" x))) patches) >> + (map (lambda (x) (invoke "rm" (string-append >> "./" x))) patches) >> + (invoke "rm" "-rf" "./.git") >> + (chdir "../") >> + (invoke "mv" (string-append "./vsftpd-" version) >> "../") >> + (chdir "../") >> + (invoke "rm" "-rf" (string-append "./vsftpd-" >> version "-" >> + revision >> ".el8.src.cpio")) >> + (chdir (string-append "./vsftpd-" version))) > > You lost me here. Why all the git? I removed all mention of git from > the package, since it didn't seem necessary, but please correct me if > needful. I am, or was, simply unfamiliar with the simplicity of just using "patch". I tried git am which failed and reported errors that was solved by the additional git commands. Your replacement is exactly what I need to learn more about, and looks great, thanks! > >> + (native-inputs `(("openssl" ,openssl) >> + ("linux-pam" ,linux-pam) >> + ("p7zip" ,p7zip) >> + ("cpio" ,cpio) >> + ("git" ,git-minimal) >> + ("libcap" ,libcap))) > > These are *all* new, correct? I removed git and added them all to the > commit message (check it out). Yep! > > Thanks again for your work! > > T G-R Well..., thank you for your work! You made this patch a lot better! :-) Best regards, David Larsson