Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2025 18:54:41 GMT
From:      Lexi Winter <ivy@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 014647a30ff4 - main - packages: Add some missing dependencies
Message-ID:  <202509241854.58OIsfga092312@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ivy:

URL: https://cgit.FreeBSD.org/src/commit/?id=014647a30ff4c76a99962ee6b079db0d9cdf5949

commit 014647a30ff4c76a99962ee6b079db0d9cdf5949
Author:     Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-09-24 18:39:35 +0000
Commit:     Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-09-24 18:39:35 +0000

    packages: Add some missing dependencies
    
    * at requires cron, since atrun is started by cron and won't work
      without it, and also requires runtime because at runs jobs under
      /bin/sh.
    
    * bluetooth requires ppp for rfcomm_pppd (a very common use case).
    
    * bsdconfig and bsdinstall are written in shell script and therefore
      require /bin/sh.
    
    * devd requires /bin/sh to invoke its hooks.
    
    While here, document the policy for adding dependencies in the README.
    This will hopefully ensure we end up with consistent dependencies.
    
    MFC after:      1 day
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D52699
---
 release/packages/ucl/README         | 29 +++++++++++++++++++++++++++++
 release/packages/ucl/at.ucl         | 33 +++++++++++++++++++++++++++++++++
 release/packages/ucl/bluetooth.ucl  | 28 ++++++++++++++++++++++++++++
 release/packages/ucl/bsdconfig.ucl  | 25 +++++++++++++++++++++++++
 release/packages/ucl/bsdinstall.ucl | 25 +++++++++++++++++++++++++
 release/packages/ucl/devd.ucl       | 25 +++++++++++++++++++++++++
 6 files changed, 165 insertions(+)

diff --git a/release/packages/ucl/README b/release/packages/ucl/README
index 85b6130c0488..6f1bdb065764 100644
--- a/release/packages/ucl/README
+++ b/release/packages/ucl/README
@@ -19,3 +19,32 @@ In general, dependencies and post-install scripts should be added in the
 package-specific manifests, while comment and description should be set
 in the "-all" manifest.
 
+Policies for package dependencies:
+
+* If a package requires a shared library from another package, do not add a
+  dependency, unless pkg(8) doesn't detect the dependency automatically for
+  some reason (which may happen if the library is loaded with dlopen() at
+  runtime).
+
+* If a package contains rc(8) scripts, do not add a dependency on "rc".
+  Installing "rc" is optional.
+
+* If a package contains hooks intended to be invoked from devd, do not add
+  a dependency on "devd".  Like rc, devd is optional.  The exception is if
+  the package doesn't work at all without devd, in which case a dependency
+  is warranted.
+
+* If a package contains cron(8) jobs in /etc/cron.d, do not a dependency
+  on "cron", unless the package doesn't work at all without cron.
+
+* If a package contains periodic(8) reports, do not add a dependency on
+  "periodic", unless the package only contains periodic reports.
+
+* If a package contains shell scripts, and the script is *not* one of the
+  previously mentioned examples (rc, devd, etc.), add a dependency on
+  "runtime" for /bin/sh.
+
+* Otherwise, if one component of a package requires another package to work,
+  add a dependency on the other package even if not everything in the package
+  requires that dependency.  Users expect that all of a package will work
+  after installing it.
diff --git a/release/packages/ucl/at.ucl b/release/packages/ucl/at.ucl
new file mode 100644
index 000000000000..25724adfd7af
--- /dev/null
+++ b/release/packages/ucl/at.ucl
@@ -0,0 +1,33 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# atrun relies on cron to work.
+	"cron" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+
+	# at(1) passes the command to /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
+
+
diff --git a/release/packages/ucl/bluetooth.ucl b/release/packages/ucl/bluetooth.ucl
new file mode 100644
index 000000000000..c87d5e9c8420
--- /dev/null
+++ b/release/packages/ucl/bluetooth.ucl
@@ -0,0 +1,28 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# rfcomm_pppd(8) uses ppp(8)
+	"ppp" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
+
+
+
diff --git a/release/packages/ucl/bsdconfig.ucl b/release/packages/ucl/bsdconfig.ucl
new file mode 100644
index 000000000000..752c352ae904
--- /dev/null
+++ b/release/packages/ucl/bsdconfig.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# bsdconfig is written in shell script, so it needs /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
diff --git a/release/packages/ucl/bsdinstall.ucl b/release/packages/ucl/bsdinstall.ucl
new file mode 100644
index 000000000000..6e5cbce4e342
--- /dev/null
+++ b/release/packages/ucl/bsdinstall.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# bsdinstall is written in shell script, so it needs /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
diff --git a/release/packages/ucl/devd.ucl b/release/packages/ucl/devd.ucl
new file mode 100644
index 000000000000..8d83ab9ee020
--- /dev/null
+++ b/release/packages/ucl/devd.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# devd uses /bin/sh to invoke hooks.
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509241854.58OIsfga092312>