Skip to content

Commit

Permalink
add support for fedora-28 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Nov 29, 2018
1 parent 7bf17be commit bccf93b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ AC_CHECK_LIB([jemalloc], [malloc], [:], [AC_MSG_ERROR(jemalloc not found or func

AC_CHECK_HEADER(expat.h, [], [AC_MSG_ERROR(expat.h not found. Install Expat.)], [])

PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-journal ] )
PKG_CHECK_MODULES(SYSTEMD, [ libsystemd ] )
PKG_CHECK_MODULES(LEVELDB, [ leveldb ])
PKG_CHECK_MODULES(CURL, [ libcurl >= 7.24.0 ])
PKG_CHECK_MODULES(FUSE, [ fuse >= 2.8 ])
Expand Down
8 changes: 4 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ The scripts herein are invoked by CircleCI via the circle.yml. They use docker c

## Environment Variables
* CIRCLE_BUILD_NUM - Used to determine the build iterator. Defaults to 0 if not present
* BUILD_VERSIONS - a shell array of fedora versions to build for. Defaults to (20 22)
* BUILD_VERSIONS - a shell array of fedora versions to build for.
* BUILD_DEBUG - If present triggers the build scripts to drop you into a shell for the docker container.

## Local building of dev packages
Building local is simple, first invoke the version.sh to generate the VERSION and CHANNEL files, and call docker-outter.sh. This assumes you have a working docker setup.
Building local is simple, first invoke the version.sh to generate the VERSION and CHANNEL files, and call docker-outer.sh. This assumes you have a working docker setup.

```
./scripts/version.sh
./scripts/docker-outer.sh
```

## Debuging Builds
To get a shell in a docker build container use `BUILD_DEBUG=1` `BUILD_VERSIONS` and invoke `docker-outter.sh`
To get a shell in a docker build container use `BUILD_DEBUG=1` `BUILD_VERSIONS` and invoke `docker-outer.sh`

```
BUILD_DEBUG=1 BUILD_VERSIONS=22 ./scripts/docker-outer.sh
Expand Down Expand Up @@ -49,7 +49,7 @@ If you want to get into a container for debugging you can export BUILD_DEBUG wit
...
Digest: sha256:b0f4562429925a8be579eb7b86fea8fe8e676b7a962bba8d6bf372fb68b396d7
Status: Image is up to date for quay.io/getpantheon/rpmbuild-fusedav:20
Running: docker run --rm -ti -e "build=0" -w /src -v /Users/jnelson/orgs/pantheon/fusedav/scripts/../:/src quay.io/getpantheon/rpmbuild-fusedav:20 /bin/bash
Running: docker run --rm -ti -e "build=0" -w /src -v /Users/jnelson/orgs/pantheon/fusedav/scripts/../:/src quay.io/getpantheon/rpmbuild-fusedav:20 /bin/bash
[root@d868541bc6ae src]#
```

Expand Down
22 changes: 12 additions & 10 deletions scripts/docker-inner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ description='Fusedav: Pantheon fuse-based DAV client'
fusedav_name="fusedav-$fusedav_channel"
install_prefix="/opt/pantheon/$name"

# copy pre-compiled vanilla libcurl into $install_prefix/$name/libs
# If the "/curl-7.4.6.0" directory exists in the build container it means we are using a
# custom build of curl, copy pre-compiled vanilla libcurl into $install_prefix/$name/libs
# the curl lib is part of the upstream container
curl_libdir=$install_prefix/libs
if [[ -d "/curl-7.46.0" ]]; then
curl_libdir=$install_prefix/libs

if [ ! -d "$curl_libdir" ]; then
mkdir -p $curl_libdir
fi
cp -R /curl-7.46.0/lib/.libs/* $curl_libdir
if [ ! -d "$curl_libdir" ]; then
mkdir -p $curl_libdir
fi
cp -R /curl-7.46.0/lib/.libs/* $curl_libdir

# use our custom curl, and compile fusedav
export CFLAGS="-Wl,-rpath,$curl_libdir,-rpath-link,$curl_libdir -L$curl_libdir -lcurl"
# use our custom curl, and compile fusedav
export CFLAGS="-Wl,-rpath,$curl_libdir,-rpath-link,$curl_libdir -L$curl_libdir -lcurl"
fi

./autogen.sh
CURL_LIBS="-lcurl" ./configure
Expand Down Expand Up @@ -75,8 +78,7 @@ fpm -s dir -t rpm \
--depends fuse-libs \
--depends leveldb \
--log=debug \
$install_prefix/$name \
$install_prefix/libs \
$install_prefix \
/usr/sbin/mount.$name

if [ ! -d "$rpm_dir/$fedora_release/fusedav" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker-outer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bin="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
docker=$(which docker)

# which fedora distros to build this rpm for
BUILD_VERSIONS=${BUILD_VERSIONS:-22}
BUILD_VERSIONS=${BUILD_VERSIONS:-22 28}

echo "==> Running RPM builds for these Fedora version(s): $BUILD_VERSIONS"

Expand Down
2 changes: 1 addition & 1 deletion scripts/push_packagecloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -z "$1" ] ; then
exit 1
fi

BUILD_VERSIONS=${BUILD_VERSIONS:-22}
BUILD_VERSIONS=${BUILD_VERSIONS:-22 28}
for i in $BUILD_VERSIONS ; do
package_cloud push "pantheon/$1/fedora/$i" $bin/../pkg/$i/fusedav/*.rpm
done
4 changes: 2 additions & 2 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function gittag {
git push origin --tags
}

BUILD=$CIRCLE_BUILD_NUM
if [ -z "$CIRCLE_BUILD_NUM" ] ; then
BUILD=${CIRCLE_BUILD_NUM:-}
if [ -z "$BUILD" ] ; then
BUILD=0
fi

Expand Down

0 comments on commit bccf93b

Please sign in to comment.