Re: Future of ident(1)

2021-10-27 Thread Rodney W. Grimes
Has anyone considered that ident(1) works on all the binaries
produced by FreeBSD for the first 25 years it existed?

Ie, you can run ident on a FreeBSD 1.0 binary... 
I also believe it can be run on binaries from many other
systems.


So though we have lost the data in FreeBSD 14, the other
data still exists, and though some might call this obscure,
others of us find this data pricessless in figuring out
from which a binary was made.

Regards,
Rod
> Just in case someone thinks this is something useful, I've got a PR filed
> against git to implement custom $Id$. There are no technical issues with
> the change but Git developers are not very keen on merging it in, since
> they see this as an obscure feature, no one needs. :-/ So if anyone wants
> to chime in on GitHub or git mailing list please do so.
> 
> https://github.com/git/git/pull/1074
> 
> Thanks!
> 
> -Max
> 
> On Fri, Oct 22, 2021 at 2:30 PM Steve Kargl <
> s...@troutmask.apl.washington.edu> wrote:
> 
> > All,
> >
> > With the new world order, what is the future of ident(1)?
> > Should it be removed from base?  Given a compiled binary
> > in base, how does one find the equivalent git info that
> > ident(1) used to perform?
> >
> > Having a few minutes to dust off old patchs for libm, should
> > I remove $FreeBSD$ tags in files I touch?  For new files, is
> > it expected that useless $FreeBSD$ tags should be added?
> >
> > --
> > Steve
> >
> >

-- 
Rod Grimes rgri...@freebsd.org



Re: Future of ident(1)

2021-10-27 Thread Slawa Olhovchenkov
On Mon, Oct 25, 2021 at 09:47:18AM -0700, Maxim Sobolev wrote:

> Just in case someone thinks this is something useful, I've got a PR filed
> against git to implement custom $Id$. There are no technical issues with
> the change but Git developers are not very keen on merging it in, since
> they see this as an obscure feature, no one needs. :-/ So if anyone wants
> to chime in on GitHub or git mailing list please do so.
> 
> https://github.com/git/git/pull/1074

Or temporary put one file into devel/git/files?

> Thanks!
> 
> -Max
> 
> On Fri, Oct 22, 2021 at 2:30 PM Steve Kargl <
> s...@troutmask.apl.washington.edu> wrote:
> 
> > All,
> >
> > With the new world order, what is the future of ident(1)?
> > Should it be removed from base?  Given a compiled binary
> > in base, how does one find the equivalent git info that
> > ident(1) used to perform?
> >
> > Having a few minutes to dust off old patchs for libm, should
> > I remove $FreeBSD$ tags in files I touch?  For new files, is
> > it expected that useless $FreeBSD$ tags should be added?
> >
> > --
> > Steve
> >
> >



Re: Future of ident(1)

2021-10-25 Thread Maxim Sobolev
Just in case someone thinks this is something useful, I've got a PR filed
against git to implement custom $Id$. There are no technical issues with
the change but Git developers are not very keen on merging it in, since
they see this as an obscure feature, no one needs. :-/ So if anyone wants
to chime in on GitHub or git mailing list please do so.

https://github.com/git/git/pull/1074

Thanks!

-Max

On Fri, Oct 22, 2021 at 2:30 PM Steve Kargl <
s...@troutmask.apl.washington.edu> wrote:

> All,
>
> With the new world order, what is the future of ident(1)?
> Should it be removed from base?  Given a compiled binary
> in base, how does one find the equivalent git info that
> ident(1) used to perform?
>
> Having a few minutes to dust off old patchs for libm, should
> I remove $FreeBSD$ tags in files I touch?  For new files, is
> it expected that useless $FreeBSD$ tags should be added?
>
> --
> Steve
>
>


Re: Future of ident(1)

2021-10-22 Thread Steve Kargl
On Fri, Oct 22, 2021 at 03:51:15PM -0600, Warner Losh wrote:
> On Fri, Oct 22, 2021 at 3:30 PM Steve Kargl <
> s...@troutmask.apl.washington.edu> wrote:
> 
> > All,
> >
> > With the new world order, what is the future of ident(1)?
> > Should it be removed from base?  Given a compiled binary
> > in base, how does one find the equivalent git info that
> > ident(1) used to perform?
> >
> 
> It is useful for some rare cases, but in general those cases likely
> can likely be handled by readelf / elfdump and adding build info
> to the files. I tendto think it's time to retire ident(1), but I'm in no
> hurry.
> 

I played a bit with objdump.  It seems currently a compiled object
and/or binary does not include a git hash.  I suppose this makes 
it only a bit more inconvenient to explore history.

> >
> > Having a few minutes to dust off old patchs for libm, should
> > I remove $FreeBSD$ tags in files I touch?
> 
> No. The current rule is that we're not removing $FreeBSD$ as we touch files.
> The plan is to remove it wholesale in the future. This gives maximum
> flexibility because stable/12 is still built out of svn and you never
> know what might get MFC'd there.
> 

OK.

> > For new files, is
> > it expected that useless $FreeBSD$ tags should be added?
> >
> 
> If you plan to or expet to merge the new file to stable/12, then yes.
> Otherwise omit $FreeBSD$. Most new files won't likely be merged to 12
> and even if you make an error in judgement and a new file without
> $FreeBSD$ is merged to 12, the impact is going to be minimal.

I have no intentions of merging anything.  I'll submit re-open a PR
and attach the updated to it.

-- 
Steve



Re: Future of ident(1)

2021-10-22 Thread Warner Losh
On Fri, Oct 22, 2021 at 3:30 PM Steve Kargl <
s...@troutmask.apl.washington.edu> wrote:

> All,
>
> With the new world order, what is the future of ident(1)?
> Should it be removed from base?  Given a compiled binary
> in base, how does one find the equivalent git info that
> ident(1) used to perform?
>

It is useful for some rare cases, but in general those cases likely
can likely be handled by readelf / elfdump and adding build info
to the files. I tendto think it's time to retire ident(1), but I'm in no
hurry.

>
> Having a few minutes to dust off old patchs for libm, should
> I remove $FreeBSD$ tags in files I touch?


No. The current rule is that we're not removing $FreeBSD$ as we touch files.
The plan is to remove it wholesale in the future. This gives maximum
flexibility
because stable/12 is still built out of svn and you never know what might
get
MFC'd there.


> For new files, is
> it expected that useless $FreeBSD$ tags should be added?
>

If you plan to or expet to merge the new file to stable/12, then yes.
Otherwise
omit $FreeBSD$. Most new files won't likely be merged to 12 and even
if you make an error in judgement and a new file without $FreeBSD$ is
merged to 12, the impact is going to be minimal.

Warner


Future of ident(1)

2021-10-22 Thread Steve Kargl
All,

With the new world order, what is the future of ident(1)?
Should it be removed from base?  Given a compiled binary
in base, how does one find the equivalent git info that
ident(1) used to perform?

Having a few minutes to dust off old patchs for libm, should
I remove $FreeBSD$ tags in files I touch?  For new files, is
it expected that useless $FreeBSD$ tags should be added?
 
-- 
Steve