Bug 250966 - databases/postgresql11-server: rc.d file incorrectly uses 'REQUIRE: sshd'
Summary: databases/postgresql11-server: rc.d file incorrectly uses 'REQUIRE: sshd'
Status: Closed DUPLICATE of bug 253558
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-08 19:58 UTC by Kevin Thompson
Modified: 2021-05-14 23:37 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Thompson 2020-11-08 19:58:21 UTC
This affects all postgres server ports.

The rc.d file lists the base sshd service as the predecessor for rcorder:

# $FreeBSD: head/databases/postgresql11-server/files/postgresql.in 501149 2019-05-09 22:32:11Z girgen $
#
# PROVIDE: postgresql
# REQUIRE: sshd
# KEYWORD: shutdown

If sshd is not part of base and thus sshd is not PROVIDE'd anywhere, then rcorder handles this by putting postgres at the absolute top of the list, before any useful machine init has happened:

masheen(~) # rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/usr/local/etc/rc.d/postgresql
/etc/rc.d/rctl
/etc/rc.d/dhclient
/etc/rc.d/natd
/usr/local/etc/rc.d/htcacheclean
/etc/rc.d/growfs
...



A more sensible REQUIRE line would be:

# REQUIRE: LOGIN FILESYSTEMS

...

To anticipate questions why sshd would not be present:

sshd might be not installed on machines that have removed it from base, such as one can do with pkg-base, or by recompiling world without the built-in sshd (by setting WITHOUT_OPENSSH=YES).

One might choose to strip out base sshd and replace it with ports' security/openssh-portable because it's easier to update and maintain a port than it is to recompile base when openssh has updates (at least, until pkg-base is released).
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2021-05-14 23:37:05 UTC

*** This bug has been marked as a duplicate of bug 253558 ***