Mailinglist Archive: opensuse-buildservice (89 mails)

< Previous Next >
[opensuse-buildservice] OBS source_service usage with upstream git sources -- syntax for .spec file's dynamic Source:/Version:/Release: values?
I am creating a pkg, intending to use upstream git repo for its source.

Manually pulling the source repo into local obs workspace, tar.gz'ing it, works
as expected. I need to prepare for frequent updates of multiple packages'
upstream git sources, and wish to automate the process.

For triggerable automation of the process, OBS' Source Services are appropriate,

8 Source Services

http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.source_service.html

For my current test pkg,

osc mkpac pgnd-cryptodev
cd ./pgnd-cryptodev

'add' the obs source_service template

osc add git://github.com/openSUSE/obs-build.git

edit for the target git source's URL

edit _service
- <param name="url">git://github.com/openSUSE/obs-build.git</param>
+ <param
name="url">https://github.com/cryptodev-linux/cryptodev-linux.git</param>

The docs state

The default mode of a service is to always run after each commit on the
server side and locally before every local build.

Iiuc, all that the workspace package dir requires, is

project/
package/
_service
package.spec

and a local

osc build ...

should trigger the source pull.

Since the upstream's git revision is (1) changing frequently, and (2) typically
added to the local package's version etc strings, what's the correct form &
syntax for the

Source:
Version:
Release:

variables, as well as the package name value

%setup -q -n XXX

in the .spec file be?

e.g.

edit pgnd-cryptodev.spec

%define basepkgname cryptodev
Name: pgnd-%{basepkgname}
Version: ???
Release: ???

Summary: cryptodev test
Group: Productivity/Networking/Security

Url: http://cryptodev-linux.org/
License: GPL2
Source: ???

Provides: ???

BuildRequires: kernel-desktop-devel
BuildRoot: /tmp/%{basepkgname}-%{version}-build

%description
cryptodev test install

%prep
%setup -q -n ???

%build
make

%install
make install DESTDIR="%buildroot"

%clean

%post

%postun

%files

%changelog

One good example would be useful, and helpful if added to the docs
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups