Mailinglist Archive: opensuse-buildservice (89 mails)

< Previous Next >
[opensuse-buildservice] questions re: creating & building minimal project/spec file
I'm working on a local osc build, exploring minimal spec file & build process
for an eventual, intended, local obs install.

On local machine, atm, my test-project dir contains only

tree "home:pgnd:usrlocal-stack"/
home:pgnd:usrlocal-stack/
└── openssl
├── openssl-1.0.2a.tar.gz
└── openssl.spec

1 directory, 2 files

The rudimentary spec is

cat openssl.spec

%define basepkgname openssl
Name: %{basepkgname}-local
Version: 1.0.2a
Release: 1
Summary: openssl test
License: https://www.openssl.org/source/license.html
Group: Productivity/Networking/Security
Url: https://www.openssl.org/
Source:
https://www.%{basepkgname}.org/source/%{basepkgname}-%{version}.tar.gz

Provides: ssl-local
BuildRequires: bc
BuildRequires: ed
BuildRequires: patchelf
BuildRequires: pkg-config
BuildRequires: zlib-devel

BuildRoot: /tmp/%{basepkgname}-%{version}-build

%description
openssl test

%prep
%setup -q

%build
find -type f -name "*.c" -exec sed -i -e
's|getenv|secure_getenv|g' {} +

./config -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
--openssldir=/opt/ssl --libdir=lib64 threads shared enable-ec_nistp_64_gcc_128
enable-rfc3779
make depend
make

%install
make install DESTDIR="%buildroot"

%clean

%post

%postun

%files

%changelog

On exec of build, with rpm deps already cached,

osc build --noinit openSUSE_13.2 x86_64 openssl.spec
Building openssl.spec for openSUSE_13.2/x86_64
Use local
'/home/pgnd/obs/home:pgnd:usrlocal-stack/openssl/.osc/_buildinfo-openSUSE_13.2-x86_64.xml'
file as buildinfo
Use local
'/home/pgnd/obs/home:pgnd:usrlocal-stack/openssl/.osc/_buildconfig-openSUSE_13.2-x86_64'
file as buildconfig
Updating cache of required packages
0.0% cache miss. 103/103 dependencies cached.

Verifying integrity of cached packages
using keys from openSUSE:13.2
Writing build configuration
Running build
logging output to
/var/tmp/build-root/openSUSE_13.2-x86_64/.build.log...
[ 0s] Memory limit set to 33093592KB
[ 0s] Using
BUILD_ROOT=/var/tmp/build-root/openSUSE_13.2-x86_64
[ 0s] Using BUILD_ARCH=x86_64:i686:i586:i486:i386
[ 0s]
[ 0s]
[ 0s] desk.loc started "build openssl.spec" at Fri Apr 24
17:05:39 UTC 2015.
[ 0s]
[ 0s]
[ 0s] processing recipe
/home/pgnd/obs/home:pgnd:usrlocal-stack/openssl/openssl.spec ...
[ 0s] running changelog2spec --target rpm --file
/home/pgnd/obs/home:pgnd:usrlocal-stack/openssl/openssl.spec
[ 1s]
-----------------------------------------------------------------
[ 1s] ----- building openssl.spec (user abuild)
[ 1s]
-----------------------------------------------------------------
[ 1s]
-----------------------------------------------------------------
[ 1s] + exec rpmbuild -ba --define '_srcdefattr
(-,root,root)' --nosignature /usr/src/packages/SOURCES/openssl.spec
[ 1s] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ZLrbSJ
[ 1s] + umask 022
[ 1s] + cd /usr/src/packages/BUILD
[ 1s] + cd /usr/src/packages/BUILD
[ 1s] + rm -rf openssl-local-1.0.2a
[ 1s] + /usr/bin/gzip -dc
/usr/src/packages/SOURCES/openssl-1.0.2a.tar.gz
[ 1s] + /bin/tar -xf -
[ 2s] + STATUS=0
[ 2s] + '[' 0 -ne 0 ']'
[ 2s] + cd openssl-local-1.0.2a
[ 2s] /var/tmp/rpm-tmp.ZLrbSJ: line 34: cd:
openssl-local-1.0.2a: No such file or directory
[ 2s] error: Bad exit status from /var/tmp/rpm-tmp.ZLrbSJ
(%prep)
[ 2s]
[ 2s]
[ 2s] RPM build errors:
[ 2s] Bad exit status from /var/tmp/rpm-tmp.ZLrbSJ
(%prep)

The buildroot was: /var/tmp/build-root/openSUSE_13.2-x86_64

Couple of questions,

(1) The osc build cmd line specifies build target & arch,

osc build --noinit openSUSE_13.2 x86_64 openssl.spec

The build, however appears to use multiple arches

[ 0s] Using BUILD_ARCH=x86_64:i686:i586:i486:i386

Why?

(2) The spec file defines build root,

BuildRoot: /tmp/%{basepkgname}-%{version}-build

but, the build uses, instead,

[ 0s] Using
BUILD_ROOT=/var/tmp/build-root/openSUSE_13.2-x86_64

Why?

(3) The build fails @ %prep

[ 2s] /var/tmp/rpm-tmp.ZLrbSJ: line 34: cd:
openssl-local-1.0.2a: No such file or directory
[ 2s] error: Bad exit status from /var/tmp/rpm-tmp.ZLrbSJ
(%prep)

Is

%setup -q

not appropriate? Or is the .tar.gz not properly handled?




--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >