xfs
[Top] [All Lists]

Re: [PATCH 2/5] xfstests: Use libtool to install applications

To: Greg Freemyer <greg.freemyer@xxxxxxxxx>
Subject: Re: [PATCH 2/5] xfstests: Use libtool to install applications
From: Boris Ranto <ranto.boris@xxxxxxxxx>
Date: Thu, 18 Apr 2013 15:37:23 +0200
Cc: Rich Johnston <rjohnston@xxxxxxx>, Boris Ranto <branto@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0RtXKGCjKm7mUtQNZt+rN/0rNr5OHRiITzeW7LxsDtE=; b=NixkW3f6ZBEpWNw33Q1l+IIn0vAGkl1FOItezTSGg9qcotKmJeeeeZSAj1exT/Nae/ ixb6LBVs2k6C6BBoX9xCo9U6MseVvxMh+fUMdIvCsTsi5yaDgeyxnTzAjXguqp36K3Hl UtsKPMfSUK+LJ/CgErOSg6ovHvGWvxUeOGA4g210lPGFhuq81bJJNDriI6rIwBZoEAvP xuHnslVxWTVooK5fnoPmqqzz//ICdtq1lGuhExftWqbVSbxEO25thN7iaXvtrvy98o6g dj7RoCjImGrhI/slpdERWiXTGhF7fI+6+nREGfYeJbQPgosu6iJBPtl9Hco9Wcaf81tP pprw==
In-reply-to: <ab33d007-10b8-45c1-b361-c089ee4b15e8@xxxxxxxxxxxxxxxxx>
References: <20120828172605.607853317@xxxxxxx> <20120828172928.999971219@xxxxxxx> <CAFZPdfgFjRS2rFUekfSr4dT+-sfuji-0uUo1i7VE6=9GZOnzfg@xxxxxxxxxxxxxx> <516EB6E3.9040903@xxxxxxx> <CAFZPdfguUWWPXcH_NJ30134N=39-KD422LL+k=edOWhjO2GTeA@xxxxxxxxxxxxxx> <ab33d007-10b8-45c1-b361-c089ee4b15e8@xxxxxxxxxxxxxxxxx>
Greg,

sure, currently, I use the following spec file to package it (I've trimmed things like changelog to limit the space used):
--------------------------------------------------- SPEC FILE -----------------------------------------------------------------------
Name:          xfstests
Version:        20130415
Release:       3.git
Summary:     xfs qa tests

Group:             misc
License:           GPL
URL:                http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git
Source0:          $RPM_BUILD_ROOT/SOURCES/xfstests-dev.tar.bz2
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  autoconf, libtool, e2fsprogs-devel, xfsprogs-devel
BuildRequires:  libacl-devel, libattr-devel, libaio-devel
Requires:         bash, perl, acl, attr, bind-utils
Requires:         bc, indent, quota, xfsprogs

%description
The xfsqa test available at git://oss.sgi.com/xfs/cmds/xfstests.git.

%prep
%setup -q -n xfstests-dev

%build
autoheader
autoconf
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
# Dirty workaround, xfstests won't build if these two directories do not exist...
mkdir -p /var/lib/xfstests/{ltp,src}

make DIST_ROOT=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README
/var/lib/xfstests
--------------------------------------------------- SPEC FILE -----------------------------------------------------------------------

Before the libtool was used for installation I didn't need the workaround (mkdir -p /var/lib/xfstets/{src,ltp}). Additionally, there is a template spec file in xfstests git repository (build/rpm/xfstests.spec.in) that you can use.

I get the tar.bz2 package from git repository by:
git archive --format=tar --output xfstests-dev.tar --prefix=xfstests-dev/
bzip2 xfstests-dev.tar

btw: I did not originally write the file, I just maintain it, now. I suppose that Eric Sandeen is the one who originally wrote the .spec file.

Regards,
Boris



On Thu, Apr 18, 2013 at 2:46 PM, Greg Freemyer <greg.freemyer@xxxxxxxxx> wrote:


Boris Ranto <ranto.boris@xxxxxxxxx> wrote:

>Rich,
>
>just as Eric guessed, I package the xfstests test suite (and that is
>also
>why I need the DIST_ROOT variable functioning properly). Although I can
>currently work around the problem  by doing something like
>
>./configure
>make
>mkdir -p /var/lib/xfstets/{ltp,src}
>make DIST_ROOT=$RPM_BUILD_ROOT install
>
>it certainly is not the best solution to the problem. If the test suite
>is
>completely independent from its location then also maybe this could
>work (I
>did not try it, yet and I'm still not sure it is the best solution)
>
>./configure --prefix=$RPM_BUILD_ROOT
>make
>make install
>
>but if that is the case then it'd probably make sense to drop the whole
>DIST_ROOT support from install-sh script to avoid confusion and update
>the
>spec file in bulld/rpm/.
>
>Regards,
>Boris

Boris,

When you get it working for packaging purposes I'd appreciate a post detailing what works.  I thought about packaging xfstests for opensuse a couple years ago but aborted the effort when I realized it was not designed to be installed at the time.

Greg
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

<Prev in Thread] Current Thread [Next in Thread>