From nobody Tue Apr 18 12:26:32 2023 X-Original-To: ports@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 4Q137p2Lb7z4521c for ; Tue, 18 Apr 2023 12:26:46 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q137m6dmhz4lF6; Tue, 18 Apr 2023 12:26:44 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681820804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MkPNav+g9NfviBuPmYiOJQzCyC3XSh07vtqnPaNiOlQ=; b=BTwJEklRRFS7AZSYq6SANi8NltrO+84YIkG0h6ULw75TOiHFGSKvQVAxsXXzRWvekpvNIB LL3Mq6NTUMNUmubuYS1+Qqq2hpOTGpzJdkpqQtplaIvAMwqCb3iNjza8Mpb74TerBzrxCn yrdzvllOdA1JQJMJZgZLRahnwkGtO86nw1Tt8e2pF62MeZTQGBg3wTKg1V3HiQ1iM94ha0 z5CUMLimF+h6WG8EZPwRdJulUnV+chay7a4yECFQeg9YO4Hgj0jhS/m7L74XiWv5lcdJ0U r51xv/a4S2FFQz8bTD/kPH3x6n2B1VUmiefujQiwR0NtrqbNaqTCzR/rjGkWjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681820804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MkPNav+g9NfviBuPmYiOJQzCyC3XSh07vtqnPaNiOlQ=; b=MgpLxIBTd2dgy+huWPVhXGaB8V9uQXBG17MRL42LKy6BKzbiNBnhx9zACyJ8fJZdObyBuD AAFt/3IpnkENNSVw4LKjCO8YzU79dC7V1JpoBTu8VyT4O6BtIot9csYQRx4hFmwud4bOl/ RvuDJM4oFLhengBNJb+hmykPuhffjf/d0oBQnsuj4J6zHlgVMXqH/ip1QpxBDFptrtMO5N ThPRnoA76kQLbidpEgc0h0HGQ3iHBkZqEXOz+tLyHm6zhcMXIuSwBGCBJELpZsld7QDsWE H2HR9HjlRbFrjKLERaU/vo5fzENhuLX9iQT4dwjP+tHoESboJaHeqo2l25ioNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681820804; a=rsa-sha256; cv=none; b=IlYASOj3YTNSaNsxbgGIoJ4lhaBqcgsVooV3lKcMKM7AnZlDKzaroAfIlo0ZforuTY5QhT VSDT1Nl/KWz7NDMTC6DDo8KJtGUbgpIf9/U849abOeXt9usj/OrZVT41d1o1ePQgiiQTFa B4k6/c48uVI5BcHNoOBvCeeXo3wgcN3A6xwNsYTu5xZQEJ989aP3W38hnO9+CPeVq5953W FmeHFzRElexismxiS6nezruJ5YZs5GwCdKb2essqBb/XAHQSck5oEB3e2gmQEmUmYHREa7 OqBX+JANxE4j8JEc5RT61O2YYwrKI5bZtWAHB3hBJ/dpIDvc7rNLmv8N3HdZKg== Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q137m5Xdzz13fl; Tue, 18 Apr 2023 12:26:44 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f44.google.com with SMTP id g187so10572976vsc.10; Tue, 18 Apr 2023 05:26:44 -0700 (PDT) X-Gm-Message-State: AAQBX9dTmlPIhKIKhmkG2DUbRfrTFJh/2/jsx4BjNZIBVfRD69mgq9Fl jYY+7ltwuzfkgBegFBLVFm7qpQrXTA9r3s8x9fw= X-Google-Smtp-Source: AKy350YKVrPWgygZPisb5Gh08i8MduZpO4RkE3lZBqxeL4GCVdalYWB+mHWO9RHFCzVRS+98/AX7RT7GnWvUi3oVCVQ= X-Received: by 2002:a67:d298:0:b0:42e:513d:7f08 with SMTP id z24-20020a67d298000000b0042e513d7f08mr7576095vsi.7.1681820803731; Tue, 18 Apr 2023 05:26:43 -0700 (PDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 References: <3gizlmiaz2h3qwk6xe64iik42vr6mtxyex4d2hjaymazz5nngt@3wm6jdrdxslm> In-Reply-To: From: Nuno Teixeira Date: Tue, 18 Apr 2023 13:26:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Get ${OSREL} at install time To: Felix Palmen Cc: ports@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009517bb05f99b6b7f" X-ThisMailContainsUnwantedMimeParts: N --0000000000009517bb05f99b6b7f Content-Type: text/plain; charset="UTF-8" ok, pkg-script manual have also something interesting for finding prefix: PKG_PREFIX PREFIX defined within the package at build time. So I can use ${PKG_PREFIX}/etc/gitup.conf About ${PKG_ROOTDIR}/bin/freebsd-version it doesn't seem to be called in pkg-post-install: osrel=${PKG_ROOTDIR}/bin/freebsd-version Am I missing something? --0000000000009517bb05f99b6b7f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
ok, pkg-script manual have also something interesting= for finding prefix:
PKG_PREFIX
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0PREFIX defined within the package at build time.
So I can use ${PKG_PREFIX}/etc/gitup.conf

= About ${PKG_ROOTDIR}/bin/freebsd-version it doesn't seem to be called i= n pkg-post-install:
osrel=3D${PKG_ROOTDIR}/bin/freebsd-version

Am I missing something?
--0000000000009517bb05f99b6b7f--