Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
01c590e
Add dfmfrq to Makefile
akrherz Mar 3, 2026
ee66e4d
Add dependabot GHA config
akrherz Mar 3, 2026
3ff8d3d
CI: update to build on Alma Linux 9+10
akrherz Mar 3, 2026
ceb80aa
bld: replace centos with almalinux (for now)
akrherz Mar 3, 2026
f1e4e04
update script to python3
akrherz Mar 3, 2026
3491b1c
add pdmfrq to Makefile
akrherz Mar 4, 2026
587c844
Punt on Alma Linux 10 for the moment
akrherz Mar 4, 2026
989e1c2
Exit on more (not all yet) make errors
akrherz Mar 4, 2026
0145baa
Use required flags for gfortran on ubuntu
akrherz Mar 4, 2026
4a2e475
Support system provided libxml2 and libxslt
akrherz Mar 4, 2026
d2dceb9
Add almalinux build rpms libxml2-devel libxslt-devel
akrherz Mar 4, 2026
20d3f69
CI: run make install for ubuntu
akrherz Mar 4, 2026
4ed00e8
Add Makefile stubs for gempak/utilities/tca2xml
akrherz Mar 4, 2026
a3eebfe
YOLO: trim extlib jobs
akrherz Mar 4, 2026
fe18a3c
rpm build needs extlibs step
akrherz Mar 4, 2026
ac49d87
Patch for newer libpng support
akrherz Mar 4, 2026
35642c0
Revert "YOLO: trim extlib jobs"
akrherz Mar 4, 2026
bb689fb
Fix python path issues
akrherz Mar 4, 2026
9f41295
add gcc-c++ for almalinux build
akrherz Mar 4, 2026
b5920f0
Revert "Patch for newer libpng support"
akrherz Mar 4, 2026
73f5024
Arm programs subdir Makefiles to exit on error
akrherz Mar 4, 2026
94c9c6e
Reorder NETCDF make opts
akrherz Mar 4, 2026
d685a1f
Fix fortran syntax [dcudcd.f]
akrherz Mar 4, 2026
43bef03
[dcgrib] cleanup invalid symlinks, harden Makefile
akrherz Mar 4, 2026
4452a13
Quiet HDF5/netCDF build warnings
akrherz Mar 4, 2026
79b5b80
CI: run ubuntu 24.04 through docker machinery
akrherz Mar 4, 2026
0c5a7da
Revert "Support system provided libxml2 and libxslt"
akrherz Mar 4, 2026
bdae523
Be cute with gfortran flags
akrherz Mar 4, 2026
4aab819
ci: fix things and make errors fail
akrherz Mar 4, 2026
4bd98c8
extlibs: skip mans in libxslt
akrherz Mar 4, 2026
b0c72a5
[extlibs] tighten up HDF5/netCDF builds
akrherz Mar 4, 2026
8f2de6d
[extlibs] tighten Makefiles more
akrherz Mar 4, 2026
3b179f1
More Makefile fast failing
akrherz Mar 4, 2026
7b3b43a
Update libgfortran deps for deb build
akrherz Mar 4, 2026
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
labels:
- "Bot"
groups:
github-actions:
patterns:
- '*'
53 changes: 25 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,37 @@ name: CI
on: ["push", "pull_request"]

jobs:
build_ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: build
run: |
sudo apt-get update
sudo apt install gcc build-essential libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev
sudo apt install flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev
sudo apt install gfortran
. Gemenviron.profile
rm -f config/Makeinc.linux64_gfortran
ln -s `pwd`/config/Makeinc.linux64_gfortran_ubuntu config/Makeinc.linux64_gfortran
make all

build:
name: Build Centos (${{ matrix.OS_VERSION }})
name: Build ${{ matrix.os_type }} (${{ matrix.os_version }})
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
OS_VERSION: ["7", "stream8"]
env:
OS_VERSION: ${{ matrix.OS_VERSION }}
OS_TYPE: "centos"
include:
- os_type: ubuntu
os_version: "24.04"
container_image: ubuntu:24.04
release_glob: build/dist/*.deb
- os_type: almalinux
os_version: "8"
container_image: quay.io/almalinuxorg/8-base
release_glob: build/dist/*.rpm
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Pull container image
run: |
sudo docker pull ${{ matrix.container_image }}

- name: build
run: |
echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
sudo service docker restart
sleep 5
sudo docker pull quay.io/centos/${OS_TYPE}:${OS_VERSION}
build/setup.sh ${OS_TYPE} ${OS_VERSION}
build/setup.sh ${{ matrix.os_type }} ${{ matrix.os_version }}

- name: Attach assets to GitHub Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.release_glob }}
fail_on_unmatched_files: true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
# Unidata Community GEMPAK Change Log

## Unreleased Version

- Previously when building, `make` errors would not error the build. This will
be changing going forward so to prevent broken builds. The year is 2026.

## 7.20.0 (16 Jan 2026)

This release merges NCEP NAWIPS 7.20.0.
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SUBDIRS = \
all : INSTALLDIRS
@for dir in $(SUBDIRS); do \
( cd $$dir; echo "Making $@ in `pwd`" ; \
$(MAKE) $(MFLAGS) $@ ) ; \
$(MAKE) $(MFLAGS) $@ ) || exit $$?; \
done

All : all
Expand Down Expand Up @@ -71,7 +71,7 @@ install : INSTALLDIRS
NODIR) ;; \
*) if [ -d $$dir ]; then \
(cd $$dir; echo "Making $@ in `pwd`" ; \
$(MAKE) $(MFLAGS) $@) ; \
$(MAKE) $(MFLAGS) $@) || exit $$?; \
else \
echo "Skipping $$dir"; \
fi; \
Expand All @@ -85,7 +85,7 @@ install : INSTALLDIRS
NODIR) ;; \
*) if [ -d $$dir ]; then \
(cd $$dir; echo "Making $@ in `pwd`" ; \
$(MAKE) $(MFLAGS) $@) ; \
$(MAKE) $(MFLAGS) $@) || exit $$?; \
else \
echo "Skipping $$dir"; \
fi; \
Expand All @@ -101,7 +101,7 @@ clean:
NODIR) ;; \
*) if [ -d $$dir ]; then \
(cd $$dir; echo "Making $@ in `pwd`" ; \
$(MAKE) $(MFLAGS) $@) ; \
$(MAKE) $(MFLAGS) $@) || exit $$?; \
else \
echo "Skipping $$dir"; \
fi; \
Expand Down
2 changes: 1 addition & 1 deletion build/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Version: 7.20.0
Maintainer: Daryl Herzmann
Architecture: all
Description: Unidata GEMPAK Distribution
Depends: libgfortran3, libx11-6, libxm4, libxtst6, libxt6
Depends: libgfortran5 | libgfortran4 | libgfortran3, libx11-6, libxm4, libxtst6, libxt6
Homepage: https://www.unidata.ucar.edu/software/gempak/
1 change: 1 addition & 0 deletions build/Installer.gempak/fedora.spec
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ rm -rf Makeinc.linux64_gfortran
ln -s Makeinc.linux64_gfortran_fedora Makeinc.linux64_gfortran
popd

make extlibs #>& make.extlibs
make gempak #>& make.gempak
make install >& /dev/null
make programs_gf >& /dev/null
Expand Down
10 changes: 6 additions & 4 deletions build/Installer.gempak/gempak.spec
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@ tar -xvzf /tmp/rpmbuild/SOURCES/gempak-%{version}.tar.gz -C %{prefix}/ >& /dev/n

%install
# create build root directory
set -ex
pushd %{gem_home}
export NAWIPS=`pwd`
cat source_python.sh
cat source_python.sh >> build/Installer.gempak/Gemenviron.profile
. build/Installer.gempak/Gemenviron.profile
# TODO: ". source_python.sh" doesn't seem to work from spec file
make extlibs #>& make.extlibs
make gempak #>& make.gempak
make install >& /dev/null
make programs_gf >& /dev/null
make programs_nc >& /dev/null
make clean >& /dev/null
make install
make programs_gf
make programs_nc
make clean

#grep -i error make.gempak
#rm -rf make.gempak
Expand Down
3 changes: 1 addition & 2 deletions build/build_centos.sh → build/build_almalinux.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh -xe

# runs on centos7, so no dnf
yum -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake
dnf -y -q install make gcc-gfortran gcc-c++ git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake libxml2-devel libxslt-devel

useradd gempak

Expand Down
32 changes: 24 additions & 8 deletions build/build_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,43 @@
#!/bin/sh -xe
ls -l /home

export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y --no-install-recommends \
git gcc gfortran build-essential \
libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev \
flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev \
dpkg-dev ca-certificates

# Package GEMPAK source from HEAD
pushd /gempak
package_version=`grep "define version" build/Installer.gempak/gempak.spec | grep -v version_core| awk '{print $3}'`
git archive --format=tar --prefix=gempak-${package_version}/ HEAD | gzip >/tmp/gempak-${package_version}.tar.gz
git config --global --add safe.directory /gempak
git archive --format=tar --prefix=gempak-${package_version}/ -o /tmp/gempak-${package_version}.tar HEAD
gzip -f /tmp/gempak-${package_version}.tar

# Prepare the environment
mkdir -p /tmp/gempak-${package_version}/

cp -r /gempak/build/DEBIAN /tmp/gempak-${package_version}/

mkdir -p /home/gempak/
srcdir=$(tar -tzf /tmp/gempak-${package_version}.tar.gz | awk -F/ 'NF>1{print $1; exit}')
if [ -z "$srcdir" ]; then
echo "Failed to determine top-level source directory from /tmp/gempak-${package_version}.tar.gz" >&2
exit 1
fi
tar -xvzf /tmp/gempak-${package_version}.tar.gz -C /home/gempak >& /dev/null
rm -rf /home/gempak/GEMPAK7
mv "/home/gempak/${srcdir}" /home/gempak/GEMPAK7
pushd /home/gempak
mv gempak-${package_version} GEMPAK7
cd GEMPAK7
. Gemenviron.profile
export PYINC="-I/usr/include/python2.7"
export PYLIB="-lpython2.7"
export WITHPY="-DWITHPYTHON"
export PYDEP="-lpthread -lutil -ldl"
export LDFLAGS="-L/usr/lib -L$OS_LIB -s"
export PYINC=""
export PYLIB=""
export WITHPY=""
export PYDEP=""
export LDFLAGS="-L$OS_LIB -s"

pushd config
rm -rf Makeinc.linux64_gfortran
Expand Down Expand Up @@ -61,4 +77,4 @@ cp gempak-${package_version}.deb /gempak/build/dist/
# Confirm install with dependencies
apt-get update -y
dpkg -i gempak-${package_version}.deb
apt-get -f install
apt-get -f install -y
33 changes: 22 additions & 11 deletions build/setup.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
#!/bin/sh -xe
# ./setup.sh centos 7
# ./setup.sh centos stream8
# ./setup.sh centos stream9
# ./setup.sh almalinux 9
# ./setup.sh almalinux 10
# ./setup.sh fedora latest
# ./setup.sh ubuntu latest

os_type=$1
os_version=$2
TAG=${os_type}${os_version}

if [ -z "$os_type" ] || [ -z "$os_version" ]; then
echo "Usage: $0 <dev|almalinux|ubuntu|fedora> <version>" >&2
exit 2
fi

# Run builds in Container

if [ "$os_type" = "dev" ]; then

# sudo docker run --entrypoint=/bin/bash --privileged -d -ti -e "container=docker" -v /awips2/repo/${dn}:/awips2/repo/${dn} $imgname:$imgvers-$os_version
sudo docker run -v `pwd`:/gempak:rw unidata/gempak-devel:centos6 /bin/bash -c "bash -xe /gempak/build/build_dev.sh"

elif [ "$os_type" = "centos" ]; then
# sudo docker run --entrypoint=/bin/bash --privileged -d -ti -e "container=docker" -v /awips2/repo/${dn}:/awips2/repo/${dn} $imgname:$imgvers-$os_version
sudo docker run -v `pwd`:/gempak:rw unidata/gempak-devel:centos6 /bin/bash -c "bash -xe /gempak/build/build_dev.sh"

elif [ "$os_type" = "almalinux" ]; then

sudo docker run --privileged -d -ti -e "container=docker" -v `pwd`:/gempak:rw quay.io/centos/centos:$os_version /bin/bash
DOCKER_CONTAINER_ID=$(sudo docker ps | grep ${os_version} | awk '{print $1}' | head -1 )
CONTAINER_IMAGE=quay.io/almalinuxorg/${os_version}-base
BUILD_SCRIPT=build_almalinux.sh

DOCKER_CONTAINER_ID=$(sudo docker run --privileged -d -ti -e "container=docker" -v `pwd`:/gempak:rw $CONTAINER_IMAGE /bin/bash)
sudo docker logs $DOCKER_CONTAINER_ID
sudo docker exec --tty $DOCKER_CONTAINER_ID /bin/bash -xec "bash -xe /gempak/build/build_${os_type}.sh ${os_version}";
sudo docker exec --tty $DOCKER_CONTAINER_ID /bin/bash -xec "bash -xe /gempak/build/${BUILD_SCRIPT} ${os_version}";
sudo docker ps -a
sudo docker stop $DOCKER_CONTAINER_ID
sudo docker rm -v $DOCKER_CONTAINER_ID

elif [ "$os_type" = "ubuntu" ]; then

sudo docker run --rm=true -v `pwd`:/gempak:rw unidata/gempak-devel:$os_type /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh "
sudo docker run --rm=true -v `pwd`:/gempak:rw ubuntu:${os_version} /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh "

elif [ "$os_type" = "fedora" ]; then

sudo docker run --rm=true -v `pwd`:/gempak:rw unidata/gempak-devel:$os_type /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh"

else

echo "Unsupported os_type '$os_type'. Expected one of: dev, almalinux, ubuntu, fedora." >&2
exit 2

fi
2 changes: 1 addition & 1 deletion config/Makeinc.common_linux
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ UTF = $(OS_LIB)/utf.a
X11LIB = -lX11
GUILIBS = $(MOTIFLIBS) $(X11LIBDIR) -lXt -lX11 -lz
NETCDFINC = $(OS_INC)
NETCDF = $(OS_LIB)/libnetcdf.a -ldl -lz $(OS_LIB)/libhdf5_hl.a $(OS_LIB)/libhdf5.a
NETCDF = $(OS_LIB)/libnetcdf.a $(OS_LIB)/libhdf5_hl.a $(OS_LIB)/libhdf5.a -ldl -lz

ZLIB = $(OS_LIB)/libz.a
ZLIBINC = $(OS_INC)
Expand Down
4 changes: 3 additions & 1 deletion config/Makeinc.linux64_gfortran
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ MOTIFINC = -I/usr/X11R6/include
XWINCDIR = -I/usr/X11R6/include

COPT = -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(PYINC) $(WITHPY) -DG_64BIT -g -O2 -fPIC
FOPT = -fallow-invalid-boz -fallow-argument-mismatch -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O
FALLOW_INVALID_BOZ = $(shell tmpf=$$(mktemp /tmp/gfboz-XXXXXX.f 2>/dev/null || echo /tmp/gfboz-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-invalid-boz -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-invalid-boz; fi; rm -f $$tmpf $$objf)
FALLOW_ARG_MISMATCH = $(shell tmpf=$$(mktemp /tmp/gfarg-XXXXXX.f 2>/dev/null || echo /tmp/gfarg-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-argument-mismatch -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-argument-mismatch; fi; rm -f $$tmpf $$objf)
FOPT = $(FALLOW_INVALID_BOZ) $(FALLOW_ARG_MISMATCH) -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O
NCII = "-I../libsrc"
NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran -I$(OS_INC)" "FFLAGS=-O -Wno-globals" "CFLAGS=-O $(NCII)" "CXX= "
JASPEROPT = 'CC=$(CC)' 'CFLAGS=-O' '--disable-libjpeg'
Expand Down
4 changes: 3 additions & 1 deletion config/Makeinc.linux64_gfortran_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ MOTIFINC = -I/usr/X11R6/include
XWINCDIR = -I/usr/X11R6/include

COPT = -fno-stack-protector -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(PYINC) $(WITHPY) -DG_64BIT -g -O2
FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O
FALLOW_INVALID_BOZ = $(shell tmpf=$$(mktemp /tmp/gfboz-XXXXXX.f 2>/dev/null || echo /tmp/gfboz-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-invalid-boz -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-invalid-boz; fi; rm -f $$tmpf $$objf)
FALLOW_ARG_MISMATCH = $(shell tmpf=$$(mktemp /tmp/gfarg-XXXXXX.f 2>/dev/null || echo /tmp/gfarg-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-argument-mismatch -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-argument-mismatch; fi; rm -f $$tmpf $$objf)
FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments $(FALLOW_INVALID_BOZ) $(FALLOW_ARG_MISMATCH) $(GEMINC) -g -O
NCII = "-I../libsrc"
NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran -I$(OS_INC)" "FFLAGS=-O -Wno-globals" "CFLAGS=-O $(NCII)" "CXX= "
JASPEROPT = 'CC=$(CC)' 'CFLAGS=-O' '--disable-libjpeg'
Expand Down
6 changes: 3 additions & 3 deletions extlibs/AODT/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ SUBDIRS = \

all : INCDIR
@for dir in $(SUBDIRS); do \
( cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \
( cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \
done

install:
@for dir in $(SUBDIRS); do \
(cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \
(cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \
done

clean:
@for dir in $(SUBDIRS); do \
(cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \
(cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \
done

programs_nc:
Expand Down
11 changes: 7 additions & 4 deletions extlibs/HDF5/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include $(CONFIGDIR)/$(MAKEINC)

HDF5_CFLAGS = -O2 -w
HDF5_CPPFLAGS = -w


all: $(OS_LIB)/libhdf5.a

Expand All @@ -10,11 +13,11 @@ $(OS_LIB)/libhdf5.a:
$(MAKE) _lhdf5 $(HDFOPT)

_lhdf5: INSTALLDIR
-@cd libhdf; \
@cd libhdf; \
pwd; \
$(MAKE) distclean ; \
./configure '--prefix=$(OS_ROOT)' '--with-zlib=$(OS_ROOT)' --disable-debug --disable-trace ; \
$(MAKE) all install
if [ -f Makefile ]; then $(MAKE) distclean ; fi ; \
./configure '--prefix=$(OS_ROOT)' '--with-zlib=$(OS_ROOT)' --disable-debug --disable-trace 'CFLAGS=$(HDF5_CFLAGS)' 'CPPFLAGS=$(HDF5_CPPFLAGS)' ; \
$(MAKE) -s all install

INSTALLDIR:
@echo " Creating $(OS_ROOT)"
Expand Down
Loading