From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 8Cn/MXlVEmcVGwAA62LTzQ:P1 (envelope-from ) for ; Fri, 18 Oct 2024 12:32:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 8Cn/MXlVEmcVGwAA62LTzQ (envelope-from ) for ; Fri, 18 Oct 2024 14:32:57 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=St3jpSeI; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=pLtcWdgs; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729254777; a=rsa-sha256; cv=none; b=kAHD8TjBWrA0GVXCHQ23pbXjgTCQ0WZZ8C7slot6DVFhZp4+0UQ+Rb9/L/aUGqng0jiZ34 txukn9X6naECk3k8OUWXcqm2209EY58W7BsOo1vZNWi32CQSL+rrMx4z0zREbmyaSxQ3mr eYuHIh6aXgWG4JU81TjX25Bvbfq2GCzwVQnQuSEiIhtX+BA6IlFeSXiVCy921MyXt16Kfw TxPENAaJtBBTcqPPQufkqwgEosuDWIedLdH4iCy1IrLlSuTThaOd1Mm8nYwoJdR1OnCqkM bxLKFQ6BYY3JVUjLxR2pH4KW1ZFZVlmGEoFQVPvxekMYgiMtnNOlTGb3AxwLMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=St3jpSeI; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=pLtcWdgs; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729254777; 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=8VAKJvTnCBRMe4qpJYDYiccPqd5fInEH7BXPMh2f9cg=; b=kO+ovlrP+JPF5lR8rkqEsa4B7UGVl4GgI+UQVdmd65kqGsRS9L63iPKj68cGBRjgX+fXB7 iTzTCvNtdhI6WHHZ4K1Z7ntCCFZbTkeBoMSq+4gVjG174RLpNb4ilEU2wTZybKFYcSV6MZ n9KHIL8HztwAQXvIyyxEuBps9cY8avyvpqXPia1MYujjqTUaa83vlEhIE+sSMwngGngsiz 5v9+Vpcf7FCcQy8rSj8dFYBAlcy8DFqPgTFZWJltKSbChilXcV8x+oANkIFN9e0t0JlwJ6 oOEmxdTXY9Bibfk8J/aCn/d87hqb7yavOg04SDXIoRfQOvYEttIxq7B0RmsyQA== 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 72EA81D802 for ; Fri, 18 Oct 2024 14:32:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1m9p-0004aE-41; Fri, 18 Oct 2024 08:32:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1m9o-0004a1-4a for guix-patches@gnu.org; Fri, 18 Oct 2024 08:32:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1m9n-0006b1-Rh for guix-patches@gnu.org; Fri, 18 Oct 2024 08:32:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=8VAKJvTnCBRMe4qpJYDYiccPqd5fInEH7BXPMh2f9cg=; b=St3jpSeIFqjKeHjUNj8FOxHFlBACvMlCWmBdTxBDeFOVV+9CEjuoSKIrtF8sAdy3w7sjLwuverzOzkWgg+sfcQOz3IoDDCxoy/nnm2B+xPpgnyBOdVNwImr5S60mN8iiKKxWFIi5sIwcFFBI47/8ass/VGaamv9jkQG/sTetTGXsaMB9+u76GrSXtBOvcAiaFi5qYD7HlopjMSsYCkaS+jiyKxw3/znwVRU1ZsPhFbiZ+nJfiNNXIDix+HEo6kS2RPhFd5qIqtS4agd+ByvNTBDop8rLxpJWC615U9Ux8pQuVtnaGPo6ICTmKLUv+Bhstlo/UrR1f2gC++aoKLAl/A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1mAA-00059R-2C for guix-patches@gnu.org; Fri, 18 Oct 2024 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73439] [PATCH v5 1/5] import: Add %libreoffice-updater. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Oct 2024 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73439 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 73439@debbugs.gnu.org Received: via spool by 73439-submit@debbugs.gnu.org id=B73439.172925474419736 (code B ref 73439); Fri, 18 Oct 2024 12:33:02 +0000 Received: (at 73439) by debbugs.gnu.org; 18 Oct 2024 12:32:24 +0000 Received: from localhost ([127.0.0.1]:37377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1m9X-00058F-Gf for submit@debbugs.gnu.org; Fri, 18 Oct 2024 08:32:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1m9U-00057y-Vt for 73439@debbugs.gnu.org; Fri, 18 Oct 2024 08:32:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1m92-0006VH-2T; Fri, 18 Oct 2024 08:31:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=8VAKJvTnCBRMe4qpJYDYiccPqd5fInEH7BXPMh2f9cg=; b=pLtcWdgsz7KYByh3v9pZ NETdufWkim1JVoupZ5YRcsWmQAUn5PYO7bC1g0BJHAWm3lWv6vrnuPQ8TwaGECwDouUN9jV4THOPi uBhxYYjPAdqrxTw6eMhbU4zxiPk7B/RDslFTOVwz1UybfBX6/zuxqG/zTKXhIyCDdAeeqlsdyVISw BOXV3y4oKQDmaWQR4gOYcHwrAK/oko/svj5HCQV+jhjaF7jXmBXu1D9G1Y7Fd0HqBJBU7NRAiYRXD ZTd9Sblemv+Q/Z9PeQJNYadgfHoJFV5pbv7gDWJ+lgL3xv/8RjJBcHaY09FzEv4h0Hw61C4xadXMn covRvFaQMt+2Yg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <20241016170744.15991-1-ngraves@ngraves.fr> (Nicolas Graves's message of "Wed, 16 Oct 2024 19:07:33 +0200") References: <20240923122128.14126-1-ngraves@ngraves.fr> <20241016170744.15991-1-ngraves@ngraves.fr> Date: Fri, 18 Oct 2024 14:31:47 +0200 Message-ID: <87o73hpp70.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.48 X-Spam-Score: -3.48 X-Migadu-Queue-Id: 72EA81D802 X-Migadu-Scanner: mx10.migadu.com X-TUID: 7hKf7EOc7j0C Hi, Nicolas Graves skribis: > Change-Id: I481b1175db531c4fea4a57838fe190f679cd1a85 > --- > Makefile.am | 1 + > guix/import/libreoffice.scm | 98 +++++++++++++++++++++++++++++++++++++ Neat. Could you add a test, an @item in doc/guix.texi next to the other updaters, and a commit log? > +(define (libreoffice-latest-version) Please add a docstring to all top-level procedures. > + (let* ((response port (http-get libreoffice-latest-url > + #:streaming? #t)) > + (content (get-string-all port)) PORT is not closed. If you=E2=80=99re going to load it all in memory, just leave #:streaming? to #f and you=E2=80=99ll get a string instead of a port. > + ;; xml->sxml is not flexible enough for html. > + ;; For instance, tags don't have closing . > + ;; This trick preprocesses html to extract all tags in > + ;; a wrapper, which sxml-match can handle well. > + (xml (xml->sxml > + (string-append > + "<" > + (string-join > + (filter (cute string-prefix? "a " <>) > + (string-split content #\<)) > + "<") > + ">") > + #:trim-whitespace? #t))) This is terrible. :-) (guix import go) and (guix gnu-maintenance) use (htmlprag) for that. Would that work for you? Thinking about it, the strategy looks very similar to that of the =E2=80=98generic-html=E2=80=99 updater. Would it be enough to add a =E2=80=98release-monitoring-url=E2=80=99 proper= ty to the relevant LibreOffice packages? Thanks, Ludo=E2=80=99.