[syslinux] OT:Question on gen-id.sh $id

Gene Cumm gene.cumm at gmail.com
Sat Apr 2 07:31:25 PDT 2011


On Sat, Apr 2, 2011 at 05:11, Michael D. Setzer II
<mikes at kuentos.guam.net> wrote:
> Somewhat off-topic.
> I've noticed for some time, when one recompiles the syslinux, that
> it uses an id that is created by the gen-id.sh script that seems to
> be a hex string by making the id variable equal to the $tim
> variable.
>
> I had modified the script to append the the prexx of the directory
> to the $tim variable.  Tested it with the pre15 and pre17 that came
> out today. The first one would pull out the pre after the -, but the
> second one which also works would also handle if the directory
> was without a pre, but does assume that format is constant?
>
> This way the hdt reports the $tim with the pre version, rather than
> the random $tim variable.
>
> The original line is id="$tim"
>
> if test -z "$id"; then
>  id="$tim-`echo ${PWD} | rev | cut -f2 -d/ | rev | cut -f3 -d-`"
>  id="$tim-`echo ${PWD} | rev | cut -f2 -d/ | rev | cut -b15-19`"
> fi
> echo "$id"
>
> Perhaps some other method would be better, but this is additional
> info.

Please read doc/distrib.txt if you haven't already.

The reason you're seeing the hex string is that you didn't set other
"things" first.  If you must compile from source (rather than just
rebuilding the installer binaries with "make clean; make installer" ),
I'd advise setting it to something unique (and doesn't match the
official binaries).  I know Debian sets "things" so a string
Debian-YEAR-MONTH-DAY is in the binaries to distinguish it from the
official precompiled binaries in the official binary/source package.
I believe this is the next best practice to just rebuilding the
binaries but I don't know the official opinion.  I believe Debian
policy is that everything needs to be built from source.

I believe a part of this comes from the fact that historically some
common build systems have incorrectly built the binaries.  I'd
consider distributions distributing these broken binaries to look like
the official binaries which end users report problems to Syslinux
(rather than their distro) similar to me signing your name for
something and having a third party blaming you for my mistake.  By me
signing my name, it would help you to know it came from me.

-- 
-Gene




More information about the Syslinux mailing list