Skip to content

Commit a5ee629

Browse files
authored
Merge pull request #58 from DrDaveD/add-obs
Add support for building debian in cvmfs-contrib OBS
2 parents 3756489 + d2140c1 commit a5ee629

File tree

6 files changed

+103
-8
lines changed

6 files changed

+103
-8
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,10 @@ SciTokens-cpp includes a submodule, jwt-cpp. Therefore, to create a release, yo
5252
git submodule update --init
5353
git submodule foreach --recursive "git archive --prefix=scitokens-cpp-0.3.3/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/scitokens-cpp-0.3.3.tar \$sha1.tar && rm \$sha1.tar"
5454
gzip "scitokens-cpp-0.3.3.tar"
55+
56+
This package is built on the
57+
[cvmfs-config OpenSUSE Build Service](https://build.opensuse.org/project/show/home:cvmfs:contrib).
58+
In order to support that run `debian/obsupdate.sh` whenever the version
59+
or release number is changed in `rpm/scitokens-cpp.spec`, and commit the
60+
generated `debian/scitokens-cpp.dsc` before tagging the release.
61+

cmake/FindUUID.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
1414
#
1515

16-
include(CheckSymbolExists)
17-
18-
# On mac, it can't find uuid library
19-
# So, just check for the functions with the default include
20-
CHECK_SYMBOL_EXISTS("uuid_generate" "uuid/uuid.h" UUID_SYMBOL)
21-
2216
if (UUID_SYMBOL)
2317
set(UUID_FOUND TRUE)
2418
elseif (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)

debian/README.obs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This package is built by cvmfs-contrib on the OpenSUSE Build System
2+
https://build.opensuse.org/project/show/home:cvmfs:contrib
3+
OBS requires a little help from the package in order to build on
4+
Debian. Each time there's a new release, run obsupdate.sh in this
5+
directory and commit the newly updated scitokens-cpp.dsc.

debian/obsupdate.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# update ../packaging/debian/packageName.dsc
3+
# That file is used by build.opensuse.org's Open Build Service
4+
# After the file is updated, it needs to be separately committed to git.
5+
6+
HERE="`dirname $0`"
7+
ME="`basename $0`"
8+
cd $HERE
9+
PKG="`sed -n 's/^Source: //p' control`"
10+
SPECFILE="../rpm/$PKG.spec"
11+
VERSION="$(grep ^Version: $SPECFILE | awk '{print $2}')"
12+
RPMREL="$(grep '^%define release_prefix' $SPECFILE | awk '{print $3}')"
13+
if [ -z "$RPMREL" ]; then
14+
RPMREL="$(grep '^Release:' $SPECFILE | awk '{print $2}' | cut -d% -f1)"
15+
fi
16+
# if the version is current, increment the release number, else choose 1
17+
DEBREL="`sed -n "s/^Version: ${VERSION}\.${RPMREL}-//p" $PKG.dsc 2>/dev/null`"
18+
if [ -z "$DEBREL" ]; then
19+
DEBREL=1
20+
else
21+
let DEBREL+=1
22+
fi
23+
(
24+
echo "# created by $ME, do not edit by hand"
25+
# The following two lines are OBS "magic" to use the tarball from the rpm
26+
echo "Debtransform-Tar: ${PKG}-${VERSION}.tar.gz"
27+
#echo "Debtransform-Files-Tar: "
28+
echo "Format: 3.0"
29+
echo "Version: ${VERSION}.${RPMREL}-${DEBREL}"
30+
echo "Binary: $PKG"
31+
cat control
32+
echo "Files:"
33+
echo " ffffffffffffffffffffffffffffffff 99999 file1"
34+
echo " ffffffffffffffffffffffffffffffff 99999 file2"
35+
) > $PKG.dsc
36+
#
37+
echo "Updated $PWD/$PKG.dsc"

debian/scitokens-cpp.dsc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# created by obsupdate.sh, do not edit by hand
2+
Debtransform-Tar: scitokens-cpp-0.6.3.tar.gz
3+
Format: 3.0
4+
Version: 0.6.3.1-2
5+
Binary: scitokens-cpp
6+
Source: scitokens-cpp
7+
Section: science
8+
Priority: optional
9+
Maintainer: Tim Theisen <tim@cs.wisc.edu>
10+
Build-Depends:
11+
cmake (>=2.6),
12+
debhelper (>=9),
13+
libcurl4-openssl-dev | libcurl4-gnutls-dev,
14+
libsqlite3-dev,
15+
libssl-dev,
16+
pkg-config,
17+
uuid-dev
18+
Standards-Version: 3.9.8
19+
Homepage: https://github.com/scitokens/scitokens-cpp
20+
21+
Package: libscitokens0
22+
Section: libs
23+
Architecture: any
24+
Multi-Arch: same
25+
Pre-Depends: ${misc:Pre-Depends}
26+
Depends: ${misc:Depends}, ${shlibs:Depends}
27+
Description: C++ Implementation of the SciTokens Library
28+
SciTokens provide a token format for distributed authorization
29+
The tokens are self-describing, can be verified in a distributed fashion
30+
(no need to contact the issuer to determine if the token is valid).
31+
This is convenient for a federated environment where several
32+
otherwise-independent storage endpoints want to delegate trust for
33+
an issuer for managing a storage allocation.
34+
35+
Package: libscitokens-dev
36+
Section: libdevel
37+
Architecture: any
38+
Multi-Arch: same
39+
Depends: libscitokens0 (= ${binary:Version}), ${misc:Depends}
40+
Description: Header files for the libscitokens public interfaces
41+
SciTokens provide a token format for distributed authorization.
42+
The tokens are self-describing, can be verified in a distributed fashion
43+
(no need to contact the issuer to determine if the token is valid).
44+
This is convenient for a federated environment where several
45+
otherwise-independent storage endpoints want to delegate trust for
46+
an issuer for managing a storage allocation.
47+
Files:
48+
ffffffffffffffffffffffffffffffff 99999 file1
49+
ffffffffffffffffffffffffffffffff 99999 file2

rpm/scitokens-cpp.spec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: scitokens-cpp
2-
Version: 0.6.2
3-
Release: 2%{?dist}
2+
Version: 0.6.3
3+
Release: 1%{?dist}
44
Summary: C++ Implementation of the SciTokens Library
55
License: ASL 2.0
66
URL: https://github.com/scitokens/scitokens-cpp
@@ -60,6 +60,9 @@ Requires: %{name}%{?_isa} = %{version}
6060
%dir %{_includedir}/scitokens
6161

6262
%changelog
63+
* Fri Aug 27 2021 Dave Dykstra <dwd@fnal.gov> - 0.6.3-1
64+
- Add support for building Debian packages on the OpenSUSE Build System
65+
6366
* Thu Aug 26 2021 Dave Dykstra <dwd@fnal.gov> - 0.6.2-2
6467
- Make the build require cmake3 instead of cmake
6568

0 commit comments

Comments
 (0)