Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging for ubuntu bionic #2

Open
wants to merge 75 commits into
base: kx-2.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
91f07b5
PDS: fix opening of datasets with BSQ organization (or single band), …
rouault Oct 28, 2019
e1e63ba
IRIS: make identification more restrictive to avoid false-positive id…
rouault Oct 28, 2019
33bdc43
OGRLinearRing::isPointOnRingBoundary(): fix incomplete test that coul…
rouault Oct 31, 2019
fc29798
nasakeywordhandler: fixes to be able to read some labels with metadat…
rouault Nov 2, 2019
d8c9b28
Contour algorithm: fix (over) precision issue when comparing pixel va…
rouault Nov 11, 2019
c085030
tif_ojpeg.c: fix regression of https://gitlab.com/libtiff/libtiff/iss…
rouault Nov 12, 2019
9af4aa1
/vsicurl (and derived filesystems): fix concurrency issue with multit…
rouault Nov 12, 2019
4ee512d
Multithreaded warper: make sure a transformer object is used by the t…
rouault Nov 12, 2019
fec6c93
VRT warp: do not fail if a block has no corresponding source pixels (…
rouault Nov 12, 2019
6e83a20
gdalwarpkernel.cpp: fix build broken by previous backport
rouault Nov 13, 2019
abe7fd5
Block cache: fix corruption on multithreaded write on datasets (fixes…
rouault Nov 13, 2019
fa6668f
VRT: fix requesting a downsampling version of the mask band of a sour…
rouault Nov 14, 2019
71ce9ef
VRT: refactor previous commit to avoid code duplication. No functiona…
rouault Nov 14, 2019
f80e9b8
VRT: complementary fix for refs #2018
rouault Nov 15, 2019
eec2ce0
Update cache calculation in gdal2tiles.py
EvertEt Nov 15, 2019
92e0a99
GRIB2: do not do erroneous K->C unit conversion for derived forecasts…
rouault Nov 16, 2019
6c47d6a
GRIB: update GRIB tables to degrib 2.24
rouault Nov 20, 2019
fe53a77
metaname.cpp: fix typo
rouault Nov 20, 2019
2fa4d39
degrib: add missing entries in MeteoAtmoChem table
rouault Nov 20, 2019
7f57f48
GRIB: add more values from Table 4.5 in Surface type table
rouault Nov 20, 2019
7c57de9
GRIB: add support for template 4.48 Optical Properties of Aerosol
rouault Nov 20, 2019
b3ad2df
ElasticSearch: translate constructs like CAST(field_name AS CHARACTER…
rouault Nov 21, 2019
042ee2f
ElasticSearch: tranlate as well filters like CAST(field_name AS CHARA…
rouault Nov 21, 2019
58be2f1
GRIB: degrib: avoid erroneous K->C conversion for Dew point depression
rouault Nov 22, 2019
b25599b
GRIB: fix out-of-buffer read on corrupted files added recently in 3ef…
rouault Nov 23, 2019
b5456b3
PDF: fix crash on corrupted file. Fixes https://bugs.chromium.org/p/o…
rouault Nov 26, 2019
3b33e5b
SQLite dialect: fix issue when using JOIN on a layer without fast fil…
rouault Dec 1, 2019
d2e555e
GTF: remove tests and docs (refs #2050)
rouault Dec 5, 2019
ca9a77b
RPC transformer: test success code of GDALRPCTransform() in GDALCreat…
rouault Dec 30, 2018
081bf71
PDF: fix use-after-free on some corrupted PDF files. Fixes https://bu…
rouault Dec 12, 2019
be32e42
XLSX: avoid Invalid-enum-value error. Fixes https://bugs.chromium.org…
rouault Dec 12, 2019
8ac7e54
VRT: avoid Invalid-enum-value behaviour. Fixes https://bugs.chromium.…
rouault Dec 13, 2019
0dca675
Fix compilation
rouault Dec 13, 2019
b233548
DXF: fix handling of SPLINE whose first knot is at a very very close …
rouault Dec 15, 2019
8ae9e1e
Commit forgotten file
rouault Dec 15, 2019
ed3ac13
OGRGeometryFactory::ForceTo(): fix crash when forcing a MultiPolygon …
rouault Dec 18, 2019
888775c
GDALUnrolledCopy<GByte,2,1>: fix SSE2-only implementation
rouault Dec 30, 2019
a271dab
COASP: fix crash on invalid filename. Fixes https://bugs.chromium.org…
rouault Dec 30, 2019
9a7fc8e
GeoJSONSeq & TopoJSON: avoid false positive detection and errors on u…
rouault Jan 4, 2020
a73afe3
CAD: Fix read ellipse and arc (fix #1886).
BishopGIS Jan 5, 2020
2bd7c6a
CAD && SQLite: Removed unnecessary header include and changed strnlen…
BishopGIS Jan 5, 2020
df645e2
WFS: skip silently GeoServer EPSG:404000 dummy CRS
rouault Jan 5, 2020
5204c9e
HFA: fix writing of compressed file when a RLE run count is in the [0…
rouault Jan 6, 2020
cc27493
gdal_fillnodata.py/GDALFillNodata: fix crash when smooth_iterations i…
rouault Jan 7, 2020
9b3d44b
Fix gdal2tiles max cache setting
EvertEt Dec 16, 2019
b9cab5b
Internal libtiff: tif_ojpeg.c: complementary fix for libtiff 4.1.0 re…
rouault Jan 7, 2020
b513e30
PDF: fix build against Poppler 0.82.0dev
rouault Sep 29, 2019
9df7a1c
PDF: fix build against Poppler 0.82.0dev
rouault Oct 22, 2019
a8eb15f
PDF: fix build against Poppler 0.83.0dev
rouault Nov 13, 2019
fbb9a62
PDF: fix to build against latest Poppler master (0.83dev)
rouault Nov 26, 2019
9fe5e1e
Prepare for GDAL 2.4.4
rouault Jan 8, 2020
fe5e0f4
Expand KMLSuperOverlay tile size to 512 < side < 1024px rather than 2…
rcoup Nov 22, 2012
054b244
Don't pass resolution information from TIFFTAG into Kakadu if it's no…
rcoup Dec 6, 2013
585b0fd
gdal_calc: convert data types earlier so output numbers don't get wra…
rcoup Jun 20, 2018
5f770d7
Fix ubuntugis PPA in vagrantfile
craigds Jul 17, 2019
0ae47cc
Debian build and CI config
rcoup Sep 29, 2017
ea42cff
vsicurl: ignore proxy CONNECT response headers
rcoup Jan 17, 2019
37c46fe
Add thread-local config option methods to Python API.
rcoup Feb 7, 2019
6eb20b8
wip run tests with pytest in buildkite
craigds Jul 17, 2019
f17bd8d
Skip known test failures
craigds Jul 18, 2019
a3a3205
Add capability to define VSI plugins from C API (#1289)
tbonfort Feb 15, 2019
83d976b
Don't require agent access token
craigds Dec 17, 2019
53f72df
Initial build of GDAL 2.4.x for bionic
craigds Jan 7, 2020
f2272ce
Use libkakadu 7.10.6 in bionic
craigds Jan 12, 2020
81df67c
Build without libkea for now
craigds Jan 13, 2020
9fb6f39
Attempt to reconcile deb packaging with ubuntugis
craigds Jan 16, 2020
7c82708
Add libssl-dev to build-depends
craigds Jan 22, 2020
c8e2825
Use the right filegdb built for bionic GCC
craigds Jan 22, 2020
183c6cf
Put the rpath back the way it was
craigds Jan 28, 2020
ef408d3
Remove rpath hacks for binary deps
craigds Feb 2, 2020
93aeb7b
Add libkea back in; we now have a bionic package for it
craigds Feb 7, 2020
f079582
GDALMDReaderPleiades: remove noise debug message (fixes #1921)
rouault Apr 5, 2020
81f61ac
data: add Panama PA27-UTM-17N coordinate system
rcoup Aug 20, 2020
045a888
Force libcurl to use openSSL, not gnutls
craigds Jan 15, 2021
194e54c
Build for python 3.7
craigds Jan 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .buildkite/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash
set -eu

if [ -n "${KX_BUILD_DEBUG-}" ]; then
echo "Enabling script debugging..."
set -x
fi

export TIMEFORMAT='🕑 %1lR'
export DEBEMAIL=support@koordinates.com
export DEBFULLNAME="Koordinates CI Builder"

echo "Updating changelog..."

DEB_BASE_VERSION=$(cat gdal/VERSION)
DEB_VERSION="${DEB_BASE_VERSION}+ci${BUILDKITE_BUILD_NUMBER}-$(git show -s --date=format:%Y%m%d --format=git%cd.%h)"
echo "Debian Package Version: ${DEB_VERSION}"

if [ -n "${BUILDKITE_AGENT_ACCESS_TOKEN-}" ] ; then
buildkite-agent meta-data set deb-base-version "$DEB_BASE_VERSION"
buildkite-agent meta-data set deb-version "$DEB_VERSION"

echo -e ":debian: Package Version: \`${DEB_VERSION}\`" \
| buildkite-agent annotate --style info --context deb-version
fi

time docker run \
-v "$(pwd):/src" \
-w "/src/gdal" \
-e DEBEMAIL \
-e DEBFULLNAME \
"${ECR}/ci-tools:latest" \
dch --distribution bionic --newversion "${DEB_VERSION}" "Koordinates CI build of ${BUILDKITE_COMMIT}: branch=${BUILDKITE_BRANCH} tag=${BUILDKITE_TAG-}"

BUILD_CONTAINER="build-${BUILDKITE_JOB_ID}"

echo "--- Building debian package ..."
# Uses a docker volume for ccache
time docker run \
--name "${BUILD_CONTAINER}" \
-v "$(pwd):/kx/source" \
-v "ccache:/ccache" \
-e CCACHE_DIR=/ccache \
-w "/kx/source/gdal" \
"${ECR}/bionicbuild:latest" \
/kx/buildscripts/build_binary_package.sh -uc -us

echo "--- Signing debian archives ..."
time docker run \
-v "$(pwd):/src" \
-e "GPG_KEY=${APT_GPG_KEY}" \
-w "/src" \
"${ECR}/ci-tools:latest" \
sign-debs "/src/build-bionic/*.deb"

echo "--- Running tests ..."
TEST_IMAGE="test-${BUILDKITE_JOB_ID}"
docker commit "${BUILD_CONTAINER}" "${TEST_IMAGE}"
docker rm "${BUILD_CONTAINER}"
R=0
time docker run --rm -i \
-v "$(pwd):/src" \
-w "/src/autotest" \
"${TEST_IMAGE}" \
/bin/bash -exs << EOF || R=$?
DEBIAN_FRONTEND=noninteractive apt-get update -q
DEBIAN_FRONTEND=noninteractive apt-get install -y curl
curl --silent https://bootstrap.pypa.io/get-pip.py 'pip<19' | python -
pip install 'pytest<5'

DEBIAN_FRONTEND=noninteractive dpkg -i ../build-bionic/{gdal-bin,gdal-data,libgdal20,python-gdal,python3-gdal}*.deb

# skip known failures
rm gcore/rfc30.py
TRAVIS=YES TRAVIS_BRANCH=ubuntu_1804 pytest -v -k 'not (test_ogr_fgdb_13 or test_vsisync or test_vsis3_init or test_vsis3_1 or test_vsis3_cleanup or test_eedai_GOOGLE_APPLICATION_CREDENTIALS)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we review the not list here based on what actually fails under bionic?

EOF

if [ $R -ne 0 ]; then
echo "^^^ +++"
echo "⚠️ Errors running GDAL tests ($R). But may be kinda expected. Check them and edit build.sh to skip?"
else
echo "--- ✅ GDAL tests passed!"
fi

44 changes: 44 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
steps:
- label: ':debian: Build & Package & Test'
command: ".buildkite/build.sh"
artifact_paths:
- "build-bionic/*"

- block: "Release?"
prompt: "Tag & Release to archive? Check the test results first!"

- label: ':git: Add git tag'
command: .buildkite/tag.sh
plugins:
docker#v1.4.0:
image: "${ECR}/ci-tools"
always-pull: true
workdir: /src
environment:
- GITHUB_TOKEN
- BUILDKITE_COMMIT
- BUILDKITE_BUILD_NUMBER
- BUILDKITE_BRANCH

- label: ':debian: Publish deb'
command:
- >
aptly-upload
--aptly-url https://apt-repo.kx.gd
--retries 3
--repo kx-builds-bionic
--series bionic
build-bionic/*.deb
retry:
automatic: true
plugins:
artifacts#v1.2.0:
download: "build-bionic/*.deb"
docker#v1.4.0:
image: "${ECR}/ci-tools"
always-pull: true
workdir: /src
environment:
- APTLY_UNAME
- APTLY_PASSWD
27 changes: 27 additions & 0 deletions .buildkite/tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -eu

if [ -n "${KX_BUILD_DEBUG-}" ]; then
echo "Enabling script debugging..."
set -x
fi

DEB_BASE_VERSION="$(buildkite-agent meta-data get deb-base-version)"
if [ -z "${DEB_BASE_VERSION}" ]; then
echo "Missing deb-base-version: ${DEB_BASE_VERSION}"
exit 2
elif [ "${BUILDKITE_COMMIT}" = "HEAD" ]; then
echo "Invalid BUILDKITE_COMMIT: ${BUILDKITE_COMMIT}"
exit 2
fi

TAG="kx-release-${DEB_BASE_VERSION}+ci${BUILDKITE_BUILD_NUMBER}"
echo "Creating tag: ${TAG} for ${BUILDKITE_COMMIT} ..."

hub release create \
-t "${BUILDKITE_COMMIT}" \
-m "CI: ${BUILDKITE_BRANCH}.${BUILDKITE_BUILD_NUMBER}" \
"${TAG}"

echo -e ":git: Git Tag: \`${TAG}\`" \
| buildkite-agent annotate --style info --context git-tag
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
__pycache__/
.env*/
.venv*/

# koordinates
/build-trusty/
/build-bionic/
3 changes: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

ppaRepos = [
"ppa:openjdk-r/ppa",
"ppa:ubuntugis/ubuntugis-unstable",
"ppa:ubuntugis/ppa",
"ppa:ubuntugis/ubuntugis-testing",
"ppa:miurahr/gdal-depends"
]

Expand Down
72 changes: 72 additions & 0 deletions autotest/cpp/test_ogr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1470,4 +1470,76 @@ namespace tut
strcmp("2001-02-03T04:05:06.789-03:00", pszDateTime) == 0);
CPLFree(pszDateTime);
}

// Test OGRLinearRing::isPointOnRingBoundary()
template<>
template<>
void object::test<16>()
{
OGRPolygon oPoly;
const char* pszPoly = "POLYGON((10 9,11 10,10 11,9 10,10 9))";
oPoly.importFromWkt(&pszPoly);
auto poRing = oPoly.getExteriorRing();

// On first vertex
{
OGRPoint p(10, 9);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// On second vertex
{
OGRPoint p(11, 10);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// Middle of first segment
{
OGRPoint p(10.5, 9.5);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// "Before" first segment
{
OGRPoint p(10-1, 9-1);
ensure(!poRing->isPointOnRingBoundary(&p, false));
}

// "After" first segment
{
OGRPoint p(11+1, 10+1);
ensure(!poRing->isPointOnRingBoundary(&p, false));
}

// On third vertex
{
OGRPoint p(10, 11);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// Middle of second segment
{
OGRPoint p(10.5, 10.5);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// On fourth vertex
{
OGRPoint p(9, 10);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// Middle of third segment
{
OGRPoint p(9.5, 10.5);
ensure(poRing->isPointOnRingBoundary(&p, false));
}

// Middle of fourth segment
{
OGRPoint p(9.5, 9.5);
ensure(poRing->isPointOnRingBoundary(&p, false));
}
}

} // namespace tut
71 changes: 64 additions & 7 deletions autotest/cpp/testblockcachewrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,37 +76,94 @@ class MyDataset: public GDALDataset
}
};

static void thread_func(void* /* unused */ )
static void thread_func1(void* /* unused */ )
{
printf("begin thread\n");
GDALFlushCacheBlock();
printf("end of thread\n\n");
}

int main(int argc, char* argv[])
static void test1()
{
CPLJoinableThread* hThread;

printf("Start test1\n");
printf("main thread %p\n", (void*)CPLGetPID());

argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 );

CPLSetConfigOption("GDAL_CACHEMAX", "0");
CPLSetConfigOption("GDAL_DEBUG_BLOCK_CACHE", "ON");
GDALSetCacheMax(0);

MyDataset* poDS = new MyDataset();

char buf1[] = { 1 } ;
CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(poDS, 1), GF_Write, 0, 0, 1, 1, buf1, 1, 1, GDT_Byte, 0, 0));

hThread = CPLCreateJoinableThread(thread_func, nullptr);
hThread = CPLCreateJoinableThread(thread_func1, nullptr);
CPLSleep(0.3);
CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(poDS, 1), GF_Write, 1, 0, 1, 1, buf1, 1, 1, GDT_Byte, 0, 0));
GDALFlushCacheBlock();

CPLJoinThread(hThread);

delete poDS;
printf("End test1\n");
}


static void thread_func2(void* /* unused */)
{
printf("begin thread %p\n", (void*)CPLGetPID());
GDALDatasetH hDS = GDALOpen("data/byte.tif", GA_ReadOnly);
GByte c = 0;
CPL_IGNORE_RET_VAL(GDALDataset::FromHandle(hDS)->GetRasterBand(1)->RasterIO(GF_Read, 0,0,1,1,&c,1,1,GDT_Byte,0,0,nullptr));
GDALClose(hDS);
printf("end of thread\n\n");
}

static void test2()
{
printf("Start test2\n");
printf("main thread %p\n", (void*)CPLGetPID());

CPLJoinableThread* hThread;

CPLSetConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DETACH_BEFORE_WRITE", "0.5");
GDALSetCacheMax(1000*1000);

auto poDS = GetGDALDriverManager()->GetDriverByName("GTiff")->Create("/vsimem/foo.tif", 1, 1, 2, GDT_Byte, nullptr);
poDS->GetRasterBand(1)->Fill(0);
poDS->GetRasterBand(2)->Fill(0);
poDS->FlushCache();
GDALSetCacheMax(0);

poDS->GetRasterBand(1)->Fill(1);
hThread = CPLCreateJoinableThread(thread_func2, nullptr);
CPLSleep(0.2);

GByte c = 0;
CPL_IGNORE_RET_VAL(poDS->GetRasterBand(1)->RasterIO(GF_Read,0,0,1,1,&c,1,1,GDT_Byte,0,0,nullptr));
printf("%d\n", c);
assert(c == 1);
CPLJoinThread(hThread);

CPLSetConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DETACH_BEFORE_WRITE", nullptr);
delete poDS;
VSIUnlink("/vsimem/foo.tif");
printf("End test2\n");
}


int main(int argc, char* argv[])
{
argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 );

CPLSetConfigOption("GDAL_DEBUG_BLOCK_CACHE", "ON");
GDALGetCacheMax();

GDALAllRegister();

test1();
test2();

GDALDestroyDriverManager();
CSLDestroy( argv );

Expand Down
8 changes: 4 additions & 4 deletions autotest/cpp/testcopywords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,29 +630,29 @@ int main(int /* argc */, char* /* argv */ [])
memset(pIn, 0xff, 256);
for(int i=0;i<17;i++)
{
pIn[spacing*i] = (GByte)i;
pIn[spacing*i] = (GByte)(17-i);
}
memset(pOut, 0xff, 256);
GDALCopyWords(pIn, GDT_Byte, spacing,
pOut, GDT_Byte, 1,
17);
for(int i=0;i<17;i++)
{
AssertRes(GDT_Byte, i, GDT_Byte, i, pOut[i], __LINE__);
AssertRes(GDT_Byte, 17-i, GDT_Byte, 17-i, pOut[i], __LINE__);
}

memset(pIn, 0xff, 256);
memset(pOut, 0xff, 256);
for(int i=0;i<17;i++)
{
pIn[i] = (GByte)i;
pIn[i] = (GByte)(17-i);
}
GDALCopyWords(pIn, GDT_Byte, 1,
pOut, GDT_Byte, spacing,
17);
for(int i=0;i<17;i++)
{
AssertRes(GDT_Byte, i, GDT_Byte, i, pOut[i*spacing], __LINE__);
AssertRes(GDT_Byte, 17-i, GDT_Byte, 17-i, pOut[i*spacing], __LINE__);
for(int j=1;j<spacing;j++)
{
AssertRes(GDT_Byte, 0xff, GDT_Byte, 0xff, pOut[i*spacing+j], __LINE__);
Expand Down
Loading