On Mon, 10 Nov 2025 21:53:51 +0100,
Stuart Henderson <[email protected]> wrote:
>
> On 2025/11/10 21:42, Kirill A. Korinsky wrote:
> > On Mon, 10 Nov 2025 20:18:37 +0100,
> > Stuart Henderson <[email protected]> wrote:
> > > >
> > > > Probably don't understand. LOCALSTATEDIR is /var, isn't it?
> > >
> > > the whole point of having a variable is for the extremely unlikely
> > > case somebody might rebuild packages with it set to something
> > > different.
> > >
> > > so, in that case, all references within the package need to be
> > > consistent with each other, either /var, or ${LOCALSTATEDIR}.
> > >
> >
> > I don't understand how to use ${LOCALSTATEDIR} in .login file, so I've
> > replaced to /var and /etc both variables in PLIST.
>
> I think that would need a change in bsd.port.mk.
>
Not that complicated, BTW:
Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /home/cvs/ports/infrastructure/mk/bsd.port.mk,v
diff -u -p -r1.1646 bsd.port.mk
--- infrastructure/mk/bsd.port.mk 24 Oct 2025 14:25:34 -0000 1.1646
+++ infrastructure/mk/bsd.port.mk 10 Nov 2025 21:13:57 -0000
@@ -3206,7 +3206,7 @@ _internal-generate-readmes: ${_FAKE_COOK
r=${WRKINST}${PREFIX}/share/examples/login.conf.d/$${i%.login}; \
echo "Installing ${PKGDIR}/$$i as $$r"; \
${_PBUILD} ${INSTALL_DATA_DIR} $${r%/*} ; \
- ${_PBUILD} ${INSTALL_DATA} $$i $$r; \
+ ${_PBUILD} ${SUBST_CMD} -m ${SHAREMODE} -c $$i $$r; \
fi; \
done
... and I can't find any .login file with $; so, it looks safe.
> > Ok for this?
>
> yep.
>
> > +@sample /etc/login.conf.d/llama_server
>
> so this is not consistent across the tree... I think it should actually
> be /etc and not ${SYSCONFDIR}.
>
I had moved ${SYSCONFDIR} -> /etc to be consistent across PLIST.
But with this bsd.port.mk changes, I like much more.
--
wbr, Kirill