From nobody Thu Jan 18 21:07:43 2024 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 4TGFh00Q6gz570h5 for ; Thu, 18 Jan 2024 21:07:44 +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 4TGFgz52V0z4hVY for ; Thu, 18 Jan 2024 21:07:43 +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=1705612063; 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; bh=zQy+sLKrWMLiBefu8gWvPM3RLtaq+aAbLaUAn04Uego=; b=yZiDlNkoUgDrp8EHEBcD1SD4lABsljHsX4xhTJfQUUgeKnqW9hTtSnTlwO1jyxHNQDr7dm ILFXUkhS6wCU811a4NHqm6e2erFFFyr/8QBiL+vChZouYWgAdYfAT4Dt2FzvydcTolEOuD TBnpz7exXga9lhcvg3D7EAbVmd2XVWd79WypbTnMx6OzuitVSBLAfKXLbbmhrR+vFzFJNT QmnfZlNNJwgTuBUXSOlP2T/SPeu58dwmxEjJkWMe7YmQimOLcb/r7wxr52oDsmqMk+Lfya OkH66JO/ZTuWF//Z8MnY+B4emo7lBuMPtP/YWFEpfAbVDqiLTMEVt68ZwxsQXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705612063; a=rsa-sha256; cv=none; b=l/c5miXTGcCkXsTvVNYOYrCbwCzpYEUgSMIMB4vQ/o1dyfdJfB4Hiyj662GMEo7iebO1mb ZHS2/TfU0pOj+7jWhB9jhsQg4EFUb2JlXU2A1s4uT5o2cVIA4Ogm9+GBYVsXYPkysFlJjf TlQ7Mz8L5MIdTPMTY6Ul9Aa5I67gQGuj5pDTHmv7tPywp8AM+2QXuRLYDMZAvlu52nVtkV Zd33qm3fhj2eG6B+0d9UNfS0cCmxCK+mthrfI8W0nuFOi4t/4L50uME1aW6Ep9Li/VcCgQ Tm9pLB0xbWjphHUFxTY2CndPQmrSnZ63cQQGZ0HHpZzaIbMfqe1JP52sOhGTiw== 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 4TGFgz41YWzNKW for ; Thu, 18 Jan 2024 21:07:43 +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 40IL7hDV000353 for ; Thu, 18 Jan 2024 21:07:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40IL7hCq000352 for ports-bugs@FreeBSD.org; Thu, 18 Jan 2024 21:07:43 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 276443] databases/postgresql14-server: rc.conf setting postgresql_env is ignored Date: Thu, 18 Jan 2024 21:07:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new 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 Some People X-Bugzilla-Who: wollman@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pgsql@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276443 Bug ID: 276443 Summary: databases/postgresql14-server: rc.conf setting postgresql_env is ignored Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: pgsql@FreeBSD.org Reporter: wollman@FreeBSD.org Assignee: pgsql@FreeBSD.org Flags: maintainer-feedback?(pgsql@FreeBSD.org) It is documented in rc.subr(8) that setting ${name}_env will supply the indicated values to the environment of the command being run by the rc scri= pts. The port-supplied rc script, however, starts the postmaster with `su -l`, w= hich discards the environment variables set by rc.subr. This is the right thing,= but it prevents the administrator's settings from being passed through to the postmaster. One possible fix is to change the postgresql_command function to simply pass postgresql_env into the command being run under `su`, although this does not help if postgresql_env_file is being used instead. It would be sufficient f= or my use case, however. This looks like: ${su_cmd} -l ${postgresql_user} -c "${postgresql_env} exec ${command} ${command_args} ${rc_arg}" and I have confirmed (with `ps e`) that the right values are being passed i= nto the environment. --=20 You are receiving this mail because: You are the assignee for the bug.=