freebsd.passwd: init

This commit is contained in:
Audrey Dutcher
2025-12-06 22:27:30 -07:00
parent b7fa787f58
commit cb27846fba
2 changed files with 49 additions and 0 deletions
@@ -0,0 +1,24 @@
diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile
index f8734053deb0..3bfc1d0e9b5a 100644
--- a/usr.bin/passwd/Makefile
+++ b/usr.bin/passwd/Makefile
@@ -3,7 +3,7 @@
PACKAGE = runtime
PROG = passwd
BINOWN = root
-BINMODE = 4555
+BINMODE = 0555
PRECIOUSPROG=
LIBADD = pam
.if ${MK_NIS} != "no"
@@ -11,10 +11,4 @@ SYMLINKS = passwd ${BINDIR}/yppasswd
MLINKS = passwd.1 yppasswd.1
.endif
-beforeinstall:
-.for i in passwd yppasswd
- [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
- chflags noschg ${DESTDIR}${BINDIR}/$i || true
-.endfor
-
.include <bsd.prog.mk>
@@ -0,0 +1,25 @@
{
lib,
mkDerivation,
libpam,
}:
mkDerivation {
path = "usr.bin/passwd";
buildInputs = [
libpam
];
outputs = [
"out"
"man"
"debug"
];
postPatch = ''
sed -E -i -e '/BINOWN|BINMODE|PRECIOUSPROG/d' $BSDSRCDIR/usr.bin/passwd/Makefile
'';
meta.platforms = lib.platforms.freebsd;
meta.mainProgram = "passwd";
}