Changeset 169


Ignore:
Timestamp:
09/13/12 16:15:44 (12 years ago)
Author:
kdeugau
Message:

/trunk

Light tweak on the .spec to reflect the GPL2+ header
Add bash as a dependency in the .spec file, so we can use /bin/bash

in scriptlets. Debian's migration of /bin/sh -> /bin/dash has
turned out to have some very unfortunate effects on scriptlets...

Trim empty lines and comment lines from %files sections
Typofix a warning
Tighten up build-dependency checking:

  • add a ##fixme to ponder regarding the exact syntax for the entries
  • find a workable way to detect if virtual packages are installed, at least for this week

Extend the characters checked for in sonames for auto-requires
Expand a newly-found macro "buildsubdir" -> %_topdir/BUILD/<tarball-dir>

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r168 r169  
    66
    77PKGNAME=debbuild
    8 VERSION=0.9.5
     8VERSION=0.9.6
    99
    1010MANDIR=/usr/share/man
  • trunk/debbuild

    r167 r169  
    9696my $hostarch;   # we set this later...
    9797my $scriptletbase =
    98 q(#!/bin/sh
     98q(#!/bin/bash
    9999
    100100  RPM_SOURCE_DIR="%{_topdir}/SOURCES"
     
    843843      next LINE if /^\%docdir/;
    844844#      my $singleton = 0;       # don't recall what this was for
     845      next LINE if /^\s*#/;
     846      next LINE if /^\s*$/;
    845847
    846848# create and initialize flags
     
    980982      } elsif (/^enhances:\s*(.+)/i) {
    981983        $pkgdata{main}{enhances} .= ", $1";
    982         warn "Warning:  Debian-specific 'Enahnces:' outside \%if wrapper\n" if $iflevel == 0;
     984        warn "Warning:  Debian-specific 'Enhances:' outside \%if wrapper\n" if $iflevel == 0;
    983985      } elsif (/^replaces:\s*(.+)/i) {
    984986        $pkgdata{main}{replaces} .= ", $1";
     
    14651467
    14661468  foreach my $req (@reqlist) {
     1469    # from rpmbuild error message
     1470    # Dependency tokens must begin with alpha-numeric, '_' or '/'
     1471##fixme:  check for suitable whitespace around $rel
    14671472    my ($pkg,$rel,$ver);
    14681473
     
    14791484
    14801485    my @pkglist = qx { dpkg-query --showformat '\${status}\t\${version}\n' -W $pkg };
    1481 # need to check if no lines returned - means a bad buildreq
    14821486    if (!$pkglist[0]) {
    14831487      print " * Missing build-dependency $pkg!\n";
    14841488      $reqflag = 0;
    14851489    } else {
     1490# real package, installed
     1491#kdeugau:~$ dpkg-query --showformat '${status}\t${version}\n' -W libc-client2007e-dev 2>&1
     1492#install ok installed    8:2007f~dfsg-1
     1493# virtual package, provided by ???
     1494#kdeugau:~$ dpkg-query --showformat '${status}\t${version}\n' -W libc-client-dev 2>&1
     1495#unknown ok not-installed
     1496# real package or virtual package not installed or provided
     1497#kdeugau:~$ dpkg-query --showformat '${status}\t${version}\n' -W libdb4.8-dbg 2>&1
     1498#dpkg-query: no packages found matching libdb4.8-dbg
     1499
    14861500      my ($reqstat,undef,undef,$reqver) = split /\s+/, $pkglist[0];
    1487       if ($reqstat !~ /install/) {
    1488         print " * Missing build-dependency $pkg!\n";
    1489         $reqflag = 0;
    1490       } else {
     1501      if ($reqstat =~ /^unknown/) {
     1502        # this seems to be a virtual package.
     1503        print " * Warning: $pkg is probably installed but seems to be a virtual package.\n";
     1504      } elsif ($reqstat =~ /^install/) {
    14911505        my ($resp) = qx { dpkg --compare-versions $reqver '$rel' $ver && echo "ok" };
    14921506        if ($resp !~ /^ok/) {
     
    14941508          print " * Buildreq $pkg is installed, but wrong version ($reqver):  Need $ver\n"
    14951509        }
     1510      } else {
     1511        # whatever state it's in, it's not completely installed, therefore it's missing.
     1512        print " * Missing build-dependency $pkg!\n";
     1513        $reqflag = 0;
    14961514      } # end not installed/installed check
    14971515    }
     
    15431561    next if /linux-vdso.so/;            # More kernel hackery.  Whee!
    15441562
    1545     my ($req) = (m|=\>\s+([a-z0-9._/-]+)|); # dig out the actual library (so)name.
     1563    my ($req) = (m|=\>\s+([a-zA-Z0-9._/+-]+)|); # dig out the actual library (so)name.
    15461564        # And feh, we need the *path*, since I've discovered a new edge case where
    15471565        # the same libnnn.1.2.3 *file*name is found across *several* lib dirs.  >:(
     
    17091727
    17101728    $macrostring =~ s|%{_builddir}|%{_topdir}/BUILD|g;
     1729    $macrostring =~ s|%{buildsubdir}|$tarballdir|g;
    17111730    $macrostring =~ s|%{_topdir}|$topdir|g;
    17121731    $macrostring =~ s|%{_tmppath}|$tmpdir|g;
  • trunk/debbuild.spec

    r162 r169  
    4949Source: http://www.deepnet.cx/debbuild/debbuild-%{version}.tar.gz
    5050Group: Development/Tools
    51 License: GPLv2
     51License: GPLv2+
    5252Packager: Kris Deugau <kdeugau@deepnet.cx>
    53 Requires: perl, build-essential, pax, fakeroot
     53Requires: perl, build-essential, pax, fakeroot, bash
    5454%if %{_vendor} == "debbuild"
    5555Recommends: patch, bzip2
Note: See TracChangeset for help on using the changeset viewer.