RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm on OSX Lion

From: Jeffrey Johnson <n3npq@me.com>
Date: Wed 28 Mar 2012 - 00:32:26 CEST
Message-id: <6DFDC848-A977-4ED5-BBAD-728DD04C3A35@me.com>

On Mar 27, 2012, at 6:17 PM, Henri Gomez wrote:

>> This error looks moderately serious (you can comment out the patterns
>> in macros/* if you must: but pattern matching looks fubar):
>> error: ^[A-Za-z0-9+._]+$: regexec failed: regexec() failed to match(1)
>> 
>> Because -lpcreposix and the system regexec(3) routines have
>> identical symbols, there's a high risk of collision. I've re-added
>> --with-pcre=internal
>> in order to avoid some issues on RHEL6.
> 
> I'm rebuilding rpm 5.4.7 (not from cvs) with --with-pcre=internal
> 
> Studying devtool.conf I could see for Lion :
> 
> 
> %falmouth
>    %autogen
>    %configure \
>        --verbose \
>        --prefix=/opt/local \
>        --enable-shared \
>        --with-db \
>        --with-dbsql \
>        --without-db-tools-integrated \
>        --with-zlib \
>        --with-bzip2 \
>        --with-xz \
>        --with-file \
>        --with-path-magic=/opt/local/share/misc/magic \
>        --with-lua=internal \
>        --with-tcl \
>        --without-sqlite \
>        --with-syck=internal \
>        --with-readline \
>        --with-augeas \
>        --with-beecrypt=internal \
>        --without-java \
>        --with-openssl \
>        --with-nss \
>        --with-gcrypt \
>        --with-tomcrypt \
>        --without-tpm \
>        --with-libtasn1 \
>        --without-pakchois \
>        --without-gnutls \
>        --with-neon=external \
>        --without-libproxy \
>        --with-expat \
>        --with-pcre=internal \
>        --enable-utf \
>        --with-uuid=/opt/local/lib:/opt/local/include/ossp \
>        --without-attr \
>        --without-acl \
>        --with-xar=/opt/local/lib:/opt/local/include/xar \
>        --with-popt=internal \
>        --without-keyutils \
>        --with-pthreads \
>        --without-libelf \
>        --with-cudf \
>        --without-ficl \
>        --without-aterm \
>        --without-nix \
>        --without-bash \
>        --without-rc \
>        --without-js \
>        --without-gpsee \
>        --with-python=system \
>        --with-pythonembed=/usr/lib:/usr/include/python2.7 \
>        --without-perl \
>        --without-perl-urpm \
>        --without-perlembed \
>        --with-ruby=/opt/local/lib/ruby/1.8 \
>        --without-selinux \
>        --without-sepol \
>        --without-semanage \
>        --without-libgit2 \
>        --without-squirrel \
>        --with-installed-readline \
>        --with-valgrind \
>        --disable-openmp \
>        --enable-build-warnings \
>        --enable-build-debug \
>        --enable-maintainer-mode
> 
> Did you use macports libraries ?
> 

Yes: bog-standard MacPorts at --prefix=/opt/local found by RPM_CHECK_LIB()
used in ./configure.

> What could you suggest for 100% MacPorts Free build ?
> 

Well that usually means
	Choose a Newer! Better! Bestest! value for --prefix!!!

I would _NOT_ suggest defaulting to --prefix=/usr/local because
that ends up in compiler search paths and there's already 2-3
choices for prefixes that are dueling for supremacy on Mac OS X
(fink/macports/homebrew)

Personally I like --prefix=/usr which (if everything is done careful;y)
isn't likely to collide with Apple warez any time soon.

> standalone mode ?

That's another approach, but a bit more complex because
of the need to script everything into devtool.conf (which
can/will get tedious because of the complexity of RPM's builds).

I'm personally just working out of the tests/ sub-directory in
a RPM checkout. All *.src.rpm's copied into that directory
will be rebuilt during
	make clean test
But "make clean test" has its own level(s) of complexity similar
to "make clean world".

Its pretty easy to add some rules to test/Makefile.am that aren't
part of "make clean test" that look like, say,

build-bash:
	-${rpm} -bb /path/to/some/where/bash*.src.rpm

If I spent about 15-20 minutes I could create a pattern rule like
	Install-FOO
	Verify-FOO
(where FOO is used as a distro nick name) and create a
	Build-BAR
target in Makefile.am (where BAR is used as a package N to find
a *.src.rpm in some cache dir).

If what I said about make pattern rules doesn't make sense, I'll create an example.
Its harder to explain than to do.

73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Wed Mar 28 00:32:42 2012
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.