Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2025 08:20:42 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Dima Panov <fluffy@FreeBSD.org>
Cc:        "Herbert J. Skuhra" <herbert@gojira.at>, Cy Schubert <cy@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 7e35117eb07f - main - Makefile: Hook MIT KRB5 into the build
Message-ID:  <20250708082036.039eb96f@slippy>
In-Reply-To: <68ffaac2-d1b1-4889-b93b-53513cbea5a8@FreeBSD.org>
References:  <202506160251.55G2pwx4063231@gitrepo.freebsd.org> <cc9222b0-8745-48cf-988c-4206287a7a7b@FreeBSD.org> <20250620073050.7f03f74e@slippy> <ea078103-ece6-4f00-af38-ec5688bef7db@FreeBSD.org> <aGwv06rGlgW8zmJI@mail.bsd4all.net> <20250707230446.F279E3A1@slippy.cwsent.com> <aGxx371-HV384A0r@mail.bsd4all.net> <20250708042825.669BF20E@slippy.cwsent.com> <f03bf0ee-0ff6-4f82-87c3-8f5ee73525f4@FreeBSD.org> <68ffaac2-d1b1-4889-b93b-53513cbea5a8@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 8 Jul 2025 16:07:25 +0300
Dima Panov <fluffy@FreeBSD.org> wrote:

> On 08.07.2025 14:09, Dima Panov wrote:
> > Hello!
> >=20
> > On 08.07.2025 07:28, Cy Schubert wrote: =20
> >> In message <aGxx371-HV384A0r@mail.bsd4all.net>, "Herbert J. Skuhra" wr=
ites: =20
> >>> On Mon, Jul 07, 2025 at 04:04:46PM -0700, Cy Schubert wrote: =20
> >>>> In message <aGwv06rGlgW8zmJI@mail.bsd4all.net>, "Herbert J. Skuhra" =
writes: =20
> >>>>> On Mon, Jul 07, 2025 at 10:36:31PM +0300, Dima Panov wrote: =20
> >>>>>> Hello!
> >>>>>>
> >>>>>>
> >>>>>> BTW, it looks like symlink for libkadm5clnt.so is broken and produ=
ced a =20
> >>> =C2=A0 bad =20
> >>>>> =C2=A0 file =20
> >>>>>> $ ls -la libkadm5clnt
> >>>>>> lrwxr-xr-x=C2=A0 1 root wheel 13=C2=A0 7 Jul 20:40 libkadm5clnt ->=
 kadm5clnt_mit
> >>>>>>
> >>>>>> instead of assumed libkadm5clnt.so -> kadm5clnt_mit.so
> >>>>>>
> >>>>>>
> >>>>>> Please review:
> >>>>>>
> >>>>>> diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Make=
file
> >>>>>> index e377f95f5b6e..be09dd3e210e 100644
> >>>>>> --- a/krb5/lib/kadm5clnt/Makefile
> >>>>>> +++ b/krb5/lib/kadm5clnt/Makefile
> >>>>>> @@ -88,7 +88,7 @@ ${CHPASS_UTIL_STRINGS_ERR_C}: ${CHPASS_UTIL_STRI=
NGS_E =20
> >>> RR} =20
> >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rm -f et-c-${.PRE=
FIX}.et et-c-${.PREFIX}.c
> >>>>>>
> >>>>>> =C2=A0 afterinstall:
> >>>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${INSTALL_LIBSYMLINK} ${SHLI=
B} ${DESTDIR}${LIBDIR}/libkadm5clnt
> >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${INSTALL_LIBSYMLINK} ${SHLI=
B_NAME} ${DESTDIR}${LIBDIR}/libkadm =20
> >>> 5cln =20
> >>>>> t.so =20
> >>>>>>
> >>>>>> =C2=A0 .include <bsd.lib.mk> =20
> >>>>>
> >>>>> This produces a valid symlink that 'make delete-old' wants to
> >>>>> remove again:
> >>>>>
> >>>>> lrwxr-xr-x=C2=A0 1 root wheel=C2=A0=C2=A0=C2=A0=C2=A0 23 Jul=C2=A0 =
7 22:26 /usr/lib/libkadm5clnt.so ->
> >>>>> libkadm5clnt_mit.so.121
> >>>>>
> >>>>> # make delete-old =20
> >>>>>>>> Removing old files (only deletes safe to delete libs) =20
> >>>>> remove /usr/lib/libkadm5clnt.so? =20
> >>>>
> >>>> Thanks Dima and Herbert for reporting this. It's been fixed. =20
> >>>
> >>> Cy, I am sorry for not being more precise.
> >>>
> >>> Dima's change, which hasn't been commited yet, fixes the real issue of
> >>> creating a bad symlink.
> >>>
> >>> I just wanted to add that his fix also needs removal of
> >>> usr/lib/libkadm5clnt.so in tools/build/mk/OptionalObsoleteFiles.inc.
> >>>
> >>> Maybe usr/lib/libkadm5clnt should be added to OptionalObsoleteFiles.i=
nc? =20
> >>
> >> libkadm5clnt.so is a legitimate symlink for both MIT and Heimdal. In t=
he
> >> case of Heimdal it points to libkadm5clnt.so.11. Whereas for MIT it po=
ints
> >> to libkadm5clnt_mit.so.121. There is o libkadm5clnt in MIT. It is
> >> libkadm5clnt_mit. You can see this in the port with pkg info -l as fol=
lows:
> >>
> >> slippy$ pkg info -l krb5 | grep libkadm5clnt
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/local/lib/libkad=
m5clnt.so
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/local/lib/libkad=
m5clnt_mit.so
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/local/lib/libkad=
m5clnt_mit.so.12
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/local/lib/libkad=
m5clnt_mit.so.12.0
> >> slippy$
> >> =20
> >=20
> > Cy, it looks you still have something staled at your machine :(
> >=20
> > On a clean build for pkgbase in poudriere without my patch it still pro=
duces a bad symlink and no compat is packaged as result
> >=20
> > root@aarch64:~ # pkg info -l -x krb5 | grep libkadm5clnt
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib/libkadm5clnt_mit.s=
o.121
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib/debug/usr/lib/libk=
adm5clnt_mit.so.121.debug
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib/debug/usr/lib32/li=
bkadm5clnt_mit.so.121.debug
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib/libkadm5clnt_mit.a
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib/libkadm5clnt_mit.so
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib32/libkadm5clnt_mit=
.a
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib32/libkadm5clnt_mit=
.so
> >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/lib32/libkadm5clnt_mit=
.so.121
> >=20
> >  =20
>=20
> ${SHLIB} macro gives a wrong name, check it:
>=20
> $ make -V SHLIB
> kadm5clnt_mit
> $ make -V SHLIB_LINK
> libkadm5clnt_mit.so
> $ pwd
> /home/fluffy/repo/FreeBSD/FreeBSD-src/krb5/lib/kadm5clnt
>=20
>=20
> So we still need to patch it :)
>=20
> diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile
> index e377f95f5b6e..ddb9b0e9fec5 100644
> --- a/krb5/lib/kadm5clnt/Makefile
> +++ b/krb5/lib/kadm5clnt/Makefile
> @@ -88,7 +88,7 @@ ${CHPASS_UTIL_STRINGS_ERR_C}: ${CHPASS_UTIL_STRINGS_ERR}
>          rm -f et-c-${.PREFIX}.et et-c-${.PREFIX}.c
>=20
>   afterinstall:
> -       ${INSTALL_LIBSYMLINK} ${SHLIB} ${DESTDIR}${LIBDIR}/libkadm5clnt
> +       ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${LIBDIR}/libkadm5c=
lnt.so
>=20
>   .include <bsd.lib.mk>

Thanks for the patch. I've pushed this with an ObsoleteFiles.inc change
to fix the brokenness. Thanks for pointing this out.


--=20
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e**(i*pi)+1=3D0



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