Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael.luceno AT gmail.com>
  • To: Remko van der Vossen <wich AT yuugen.jp>
  • Cc: Vlad Glagolev <stealth AT tiberian.ru>, sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)
  • Date: Sun, 15 May 2016 16:04:39 -0300

On 15/May/2016 15:00, Remko van der Vossen wrote:
> On Sun, May 15, 2016 at 12:00:14AM -0300, Ismael Luceno wrote:
> > On 14/May/2016 21:36, Vlad Glagolev wrote:
> > > How about rewriting it in something else than awk?
> > >
> > > Let's say what Sorcery uses, i.e. bash?
> >
> > I would love to see an implementation in pure BASH, I'm inclined
> > towards AWK just because it was designed for pattern matching, and
> > I couldn't think of any elegant way to solve the problem in pure BASH.
>
> Pure bash is never going to work as bash cannot have nul bytes contained
> in variables.
>
> I made a version [0] that uses od(1) to get the file header in hex.
> I think it's a reasonable solution that;
> 1) is fast
> 2) only depends on coreutils
> 3) is not sensitive to awk syntax idiosyncrasies
>
> Regards, Remko
>
> [0] https://bugs.sourcemage.org/attachment.cgi?id=7585

Looks about the same (neither good), so I don't mind using this one,
it's in the end more a matter of taste than robustness or speed.

We might at some point want to re-structure sorcery (I certainly wish
to do so), so I propose to make it a separate command.

I am thinking about having the uncompression, checksumming, signature
verification, etc. all reworked and split into a separate unit, so
that we can make it more flexible and streamline all tasks related
to the inspection, packing and unpacking of spell sources, which I
hope makes it easier to build better tools, specially to automate
spell creation and inspection, and which could remove the need to
specify information like BUILD_DIRECTORY into the spells.




Archive powered by MHonArc 2.6.24.

Top of Page