Skip to content

Commit 5fecb52

Browse files
committed
build: prepare 2.0.1 security release and portable packaging gates
1 parent e07ebcd commit 5fecb52

7 files changed

Lines changed: 46 additions & 15 deletions

File tree

‎ChangeLog‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 2.0.1
2+
3+
Fixed an unauthenticated server crash when a multipart file part omits
4+
the name attribute. Unnamed file parts are ignored before memory
5+
or disk upload handling. Thanks to AllenYen for the private report.
6+
Corrected the documentation include path and graph font configuration.
7+
Fixed release-note extraction on macOS and made the ABI packaging gate
8+
use the configured patch version while retaining SONAME 2.
9+
110
Version 2.0.0
211

312
Fixed macOS CI failure when verifying the pinned libmicrohttpd

‎Makefile.am‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838

3939
endif
4040

41-
EXTRA_DIST = libhttpserver.pc.in $(DX_CONFIG) scripts/extract-release-notes.sh scripts/validate-version.sh \
41+
EXTRA_DIST = libhttpserver.pc.in $(DX_CONFIG) scripts/extract-release-notes.sh scripts/test_extract_release_notes.sh scripts/validate-version.sh \
4242
scripts/check-examples.sh scripts/check-readme.sh scripts/check-release-notes.sh \
4343
scripts/check-doxygen.sh scripts/check-hooks-doc-spotcheck.sh \
4444
scripts/check-soversion.sh \
@@ -414,6 +414,7 @@ check-readme:
414414

415415
# TASK-042: static checks on RELEASE_NOTES.md — see scripts/check-release-notes.sh
416416
check-release-notes:
417+
@$(top_srcdir)/scripts/test_extract_release_notes.sh
417418
@echo "=== check-release-notes: enforce TASK-042 invariants on RELEASE_NOTES.md ==="
418419
@$(top_srcdir)/scripts/check-release-notes.sh
419420

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
AC_PREREQ(2.57)
2323
m4_define([libhttpserver_MAJOR_VERSION],[2])dnl
2424
m4_define([libhttpserver_MINOR_VERSION],[0])dnl
25-
m4_define([libhttpserver_REVISION],[0])dnl
25+
m4_define([libhttpserver_REVISION],[1])dnl
2626
m4_define([libhttpserver_PKG_VERSION],[libhttpserver_MAJOR_VERSION.libhttpserver_MINOR_VERSION.libhttpserver_REVISION])dnl
2727
m4_define([libhttpserver_LDF_VERSION],[libhttpserver_MAJOR_VERSION:libhttpserver_MINOR_VERSION:libhttpserver_REVISION])dnl
2828
AC_INIT([libhttpserver], libhttpserver_PKG_VERSION, [electrictwister2000@gmail.com])

‎doxyconfig.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ SEARCH_INCLUDES = YES
13481348
# contain include files that are not input files but should be processed by
13491349
# the preprocessor.
13501350

1351-
INCLUDE_PATH =
1351+
INCLUDE_PATH = $(SRCDIR)/src
13521352

13531353
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
13541354
# patterns (like *.h and *.hpp) to filter out the header-files in the
@@ -1479,7 +1479,7 @@ DOT_NUM_THREADS = 0
14791479
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
14801480
# containing the font.
14811481

1482-
DOT_FONTNAME = FreeSans.ttf
1482+
DOT_FONTNAME = Helvetica
14831483

14841484
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
14851485
# The default size is 10pt.

‎scripts/check-soversion.sh‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
# that the on-disk layout matches the v2.0 SOVERSION contract:
77
#
88
# A1. `make install DESTDIR=$STAGE` succeeds.
9-
# A2. On Linux: $libdir/libhttpserver.so.2.0.0 exists as a regular file.
9+
# A2. On Linux: $libdir/libhttpserver.so.<package-version> exists as a regular file.
1010
# On Darwin: $libdir/libhttpserver.2.dylib exists as a regular file.
1111
# (Note: with libtool's `-version-number A:B:C` on Darwin, only the
1212
# major-numbered .2.dylib is produced. Linux produces the full
1313
# three-file chain .so / .so.2 / .so.2.0.0.)
1414
# A3. On Linux: $libdir/libhttpserver.so.2 exists and is a symlink that
15-
# (transitively) resolves to libhttpserver.so.2.0.0.
15+
# (transitively) resolves to libhttpserver.so.<package-version>.
1616
# On Darwin: skipped (no intermediate symlink layer on Mach-O).
1717
# A4. On Linux: $libdir/libhttpserver.so dev symlink exists and resolves
18-
# to libhttpserver.so.2.0.0.
18+
# to libhttpserver.so.<package-version>.
1919
# On Darwin: $libdir/libhttpserver.dylib dev symlink exists and
2020
# resolves to libhttpserver.2.dylib.
2121
# A5. SONAME / install-name: on Linux `readelf -d` must report
@@ -24,7 +24,7 @@
2424
# HARD prerequisite — if it is absent the script FAILS (rather than
2525
# degrading to a filename-only check), so an under-provisioned CI lane
2626
# can never mask a broken SONAME behind a green signal.
27-
# A6. pkg-config: `pkg-config --modversion libhttpserver` prints 2.0.0,
27+
# A6. pkg-config: `pkg-config --modversion libhttpserver` prints the configured package version,
2828
# `--cflags` includes -I.../include, `--libs` includes -lhttpserver.
2929
# A7. libhttpserver.la was installed and lists library_names that include
3030
# the SONAME (libhttpserver.so.2 on Linux or libhttpserver.2.dylib on
@@ -90,6 +90,11 @@ if [ ! -d "$BUILD_DIR" ]; then
9090
fail "BUILD_DIR=$BUILD_DIR does not exist; run ./configure first"
9191
fi
9292

93+
# Package metadata follows the configured patch release; the ABI SONAME stays 2.
94+
PACKAGE_VERSION="$(sed -n 's/^VERSION = //p' "$BUILD_DIR/Makefile")"
95+
[[ "$PACKAGE_VERSION" =~ ^2\.[0-9]+\.[0-9]+$ ]] \
96+
|| fail "expected configured v2 package version, got '$PACKAGE_VERSION'"
97+
9398
CONFIG_STATUS="$BUILD_DIR/config.status"
9499
if [ ! -x "$CONFIG_STATUS" ]; then
95100
fail "$CONFIG_STATUS not found; run ./configure in $BUILD_DIR first"
@@ -133,10 +138,10 @@ STAGE_INC="$STAGE$INCDIR"
133138
# ---- A2/A3/A4: platform-specific filename + symlink checks --------------------
134139
case "$PLATFORM" in
135140
Linux)
136-
FULL="$STAGE_LIB/libhttpserver.so.2.0.0"
141+
FULL="$STAGE_LIB/libhttpserver.so.$PACKAGE_VERSION"
137142
SONAME_LINK="$STAGE_LIB/libhttpserver.so.2"
138143
DEV_LINK="$STAGE_LIB/libhttpserver.so"
139-
FULL_BASENAME="libhttpserver.so.2.0.0"
144+
FULL_BASENAME="libhttpserver.so.$PACKAGE_VERSION"
140145
SONAME_BASENAME="libhttpserver.so.2"
141146
HAS_INTERMEDIATE_SONAME_LINK=yes
142147
;;
@@ -232,8 +237,8 @@ if command -v pkg-config >/dev/null 2>&1; then
232237
|| fail "A6: pkg-config --exists libhttpserver failed"
233238

234239
modver="$(PKG_CONFIG_PATH="$PC_DIR" pkg-config --modversion libhttpserver)"
235-
[ "$modver" = "2.0.0" ] \
236-
|| fail "A6: pkg-config --modversion = '$modver', expected '2.0.0'"
240+
[ "$modver" = "$PACKAGE_VERSION" ] \
241+
|| fail "A6: pkg-config --modversion = '$modver', expected '$PACKAGE_VERSION'"
237242

238243
# `pkg-config --cflags` reports the canonical (installed, not DESTDIR'd)
239244
# include path; we just verify the canonical $INCDIR appears, NOT
@@ -250,7 +255,7 @@ if command -v pkg-config >/dev/null 2>&1; then
250255
*"-lhttpserver"*) ;;
251256
*) fail "A6: pkg-config --libs missing -lhttpserver ; got: $libs" ;;
252257
esac
253-
pass "A6: pkg-config reports modversion=2.0.0 and consistent -I/-l flags"
258+
pass "A6: pkg-config reports modversion=$PACKAGE_VERSION and consistent -I/-l flags"
254259
else
255260
# pkg-config is a hard CI prerequisite: the literal Version-line grep
256261
# fallback only proved the .pc string, never that pkg-config could parse

‎scripts/extract-release-notes.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ -z "$VERSION" ]; then
2727
}
2828
found && /^$/ && !started { next }
2929
found { started = 1; print }
30-
' "$CHANGELOG" | sed -e :a -e '/^[[:space:]]*$/{ $d; N; ba; }'
30+
' "$CHANGELOG" | sed -e ':a' -e '/^[[:space:]]*$/ {' -e '$d' -e 'N' -e 'ba' -e '}'
3131
else
3232
# Extract notes for the specific version
3333
awk -v ver="$VERSION" '
@@ -40,5 +40,5 @@ else
4040
}
4141
found && /^$/ && !started { next }
4242
found { started = 1; print }
43-
' "$CHANGELOG" | sed -e :a -e '/^[[:space:]]*$/{ $d; N; ba; }'
43+
' "$CHANGELOG" | sed -e ':a' -e '/^[[:space:]]*$/ {' -e '$d' -e 'N' -e 'ba' -e '}'
4444
fi
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
4+
cd "$REPO_ROOT"
5+
fixture="$(mktemp -d)"
6+
trap 'rm -rf "$fixture"' EXIT
7+
printf 'Version 2.0.1\n\nFix crash.\n\nRetain paragraph.\n\n\nVersion 2.0.0\n\nPrior release.\n\n' > "$fixture/ChangeLog"
8+
printf 'Fix crash.\n\nRetain paragraph.\n' > "$fixture/new"
9+
printf 'Prior release.\n' > "$fixture/old"
10+
for version in '' 2.0.1 v2.0.1; do
11+
CHANGELOG="$fixture/ChangeLog" scripts/extract-release-notes.sh "$version" > "$fixture/actual"
12+
cmp "$fixture/new" "$fixture/actual"
13+
done
14+
CHANGELOG="$fixture/ChangeLog" scripts/extract-release-notes.sh 2.0.0 > "$fixture/actual"
15+
cmp "$fixture/old" "$fixture/actual"
16+
printf 'Release extraction fixture PASS\n'

0 commit comments

Comments
 (0)