[Bug 707661] New: grep and awk portability issues in package release date checking

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Sep 6 14:41:19 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=707661
  GStreamer | gst-plugins-ugly | 0.10.19

           Summary: grep and awk portability issues in package release
                    date checking
    Classification: Platform
           Product: GStreamer
           Version: 0.10.19
        OS/Version: opensolaris
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-ugly
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: mooney at dogbert.cc.ndsu.nodak.edu
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=254311)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=254311)
fix non-portable use of grep and awk related to release date checks

Building gst-plugins-ugly-0.10.19 on x86_64-pc-solaris2.11 (OpenIndiana
oi151a8).  I'm using the Oracle Studio 12.3 compiler suite, but this issue
isn't related to the compiler.

While configuring gst-plugins-ugly, I see

checking for GST_BASE... yes
checking for GST_CHECK... no
configure: No package 'gstreamer-check-0.10' found
configure: no gstreamer-check-0.10 >= 0.10.36 (GStreamer Check unittest
Library) found
checking for GST_PLUGINS_BASE... yes
configure: using GStreamer Base Plugins in /usr/lib/amd64/gstreamer-0.10
configure: Using /local/lib/64/gstreamer-0.10 as the plugin install location
grep: illegal option -- e
Usage: grep [-c|-l|-q] [-r|-R] -hbnsviw pattern file . . .
awk: syntax error near line 3
awk: illegal statement near line 3
awk: syntax error near line 4
awk: bailing out near line 4
configure: error: SET_PACKAGE_RELEASE_DATETIME: could not extract
            release date for release version  0.10.19  from 
"./gst-plugins-ugly.doap"


There are two issues here

1) common/m4/gst-package-release-datetime.m4 uses "grep -e" in a couple places.
That's not portable (traditional grep on UNIX systems doesn't accept a -e
option) and in this case it's also not needed.  The regexes in use are simple
and do not require extended regular expression support (a la egrep), so
dropping the -e fixes the issue.

2) the common/extract-release-date-from-doap-file uses some non-portable
awk syntax:

  $0 ~ "something"

isn't portable, but

  $0 ~ /something/

would be.

Ultimately, I think it would be a better idea to use xsltproc (which is
required by pre-reqs of gstreamer, so you can safely assume it's going to be
present) and a small .xsl file to get the release date from the .doap file, but
that's a separate issue

A possible patch for the two portability issues is attached.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list