From nobody Fri Jun 30 20:58:12 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qt72F1pYGz4kvtC for ; Fri, 30 Jun 2023 20:58:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt72D6Hzmz3k0N for ; Fri, 30 Jun 2023 20:58:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688158692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fm2ojW1KsCBk/6Lchgur5i7LP7VFJGVCgKxsTL6yYXM=; b=GmY3n+9MfcUWAOq7mzY8EfckgubQld513GNS1qN5cNE+Pa4op0RCaDtSw0L0YkLpCie8pj lNgLyQlKMsY3rlVmdpszWQsPiCvS9UOy/aG8Trj/uXIuLy1CIb+3xfnFQcFgHtjVbTdb6Z VAGx0gZFZFHdgd2QT2RGHSEgiGiSQ9gCYdO08PsmhXxOG10lricNan3kxc2z3SVhrxd/C2 xsTPtgDiD0B2/uV6vCwgaLKHcmyUzv2xwDxrENbjdxcNdAq/8NLvkGuZzXPCMTN2JchiuS KObWi+d//j/uuXDr5Hp10rytPPf59eU/qF7mZ7Be2GFJydW5Zqn7wdws2ro61w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688158692; a=rsa-sha256; cv=none; b=Uv0Rnt2j0Or2R0DATsOKIpq/UogNLdahjlMvSTZ0U2E+2t4p+K83+NL0JyAC2tUySWuOkQ 5k2F865wYKi5xIULM153QtksvBmO8Bfe9uQOxzNSXXJiOTYvU6DanUTUZKdrDxTIzGFEbe PXh9O+VIxeTkVuYOyLH3Ho3H5Hg+50XeoNgF6DSFTTOW0GoowWvqascYYwFSMX8qR+IcIt faezkl9Z7aApcSGBtlONNg9+gMJWIX0H68oPvcTrrDLgn0AjrQUFg2o8CH81vdogIOQRKX 0CUFJcK/SeORUiRuk2Jz4MZ3KSL/Ff4F2qbWMHS9YpOL0xRoKZcbqafzfSY29g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt72D5JXdz1Cwp for ; Fri, 30 Jun 2023 20:58:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 35UKwCP7042236 for ; Fri, 30 Jun 2023 20:58:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35UKwCMb042235 for ports-bugs@FreeBSD.org; Fri, 30 Jun 2023 20:58:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 272054] [NEW PORT] sysutils/gh-md-toc: Easy TOC creation for GitHub README.md Date: Fri, 30 Jun 2023 20:58:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: DtxdF@disroot.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete flagtypes.name attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272054 Jes=C3=BAs Daniel Colmenares Oviedo changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #242850|0 |1 is obsolete| | Attachment #243084| |maintainer-approval+ Flags| | --- Comment #2 from Jes=C3=BAs Daniel Colmenares Oviedo = --- Created attachment 243084 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D243084&action= =3Dedit gh-md-toc-0.8.0.patch Thanks for reviewing my patch and sorry for taking so long to respond. --- > does this script run with /bin/sh? If yes, we could eliminate the bash d= ependency. Not by default, but I have patched gh-md-toc to work seamlessly with sh(1). > could you patch the script to use fetch(1) instead of wget(1) or curl(1)?= This would permit elimination of these dependencies. Unfortunately, fetch(1) doesn't allow you to set the headers that the Github needs to set the token, but I've read gh-md-toc carefully and I think ftp/w= get doesn't make sense as the README says. ``` gh_toc_load() { local gh_url=3D$1 if type curl &>/dev/null; then curl --user-agent "$gh_user_agent" -s "$gh_url" elif type wget &>/dev/null; then wget --user-agent=3D"$gh_user_agent" -qO- "$gh_url" else echo "Please, install 'curl' or 'wget' and try again." exit 1 fi } ``` The above code only makes sense if wget or curl is used depending on the us= er's preferences in the following code. ``` OUTPUT=3D$(curl -s \ --user-agent "$gh_user_agent" \ --data-binary @"$gh_tmp_file_md" \ -H "Content-Type:text/plain" \ -H "$AUTHORIZATION" \ "$URL") ``` The above code creates a dependency so the user must install ftp/curl and t= he gh_toc_load() will match curl first, so ftp/wget makes no sense. I simply remove it to have less dependencies. --- All other mentioned problems have been fixed and I have also patched gh-md-= toc in some parts that may create new problems, such as: ``` gh-md-toc --version 0.8.0 os: FreeBSD 13.2-RELEASE kernel: 1302001 shell: /bin/csh grep : grep (BSD grep, GNU compatible) 2.6.0-FreeBSD awk : awk version 20210215 sed : sed (BSD sed) fetch: fetch (BSD fetch) ``` --=20 You are receiving this mail because: You are the assignee for the bug.=