Skip to content

Commit

Permalink
More versioning changes, add tests to makesrcdist.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Feb 27, 2024
1 parent f9b9a40 commit fde58fe
Show file tree
Hide file tree
Showing 18 changed files with 281 additions and 269 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Changes in Mini-XML 4.0.0

- Now require C99 support.
- Renamed `mxml_type_t` enumerations to `MXML_TYPE_xxx`.


# Changes in Mini-XML 3.3.2

- Updated the autoconf `config.guess` and `config.sub` scripts to support cross
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ files "LICENSE" and "NOTICE" for more information.

> Note: The exception listed in the NOTICE file only applies when linking
> against GPL2/LGPL2-only software. Some Apache License purists have objected
> to linking Apache Licensed code against Mini-XML with these exceptions on the
> to linking Apa/che Licensed code against Mini-XML with these exceptions on the
> grounds that it makes Mini-XML somehow incompatible with the Apache License.
> For that reason, people wishing to retain their Apache License purity may
> omit the exception from their copy of Mini-XML.
Expand Down
29 changes: 20 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ This file describes how security issues are reported and handled, and what the
expectations are for security issues reported to this project.


Reporting a Security Bug
------------------------

For the purposes of this project, a security bug is a software defect that
allows a *local or remote user* to gain unauthorized access or privileges on the
host computer or to cause the software to crash. Such defects should be
reported to the project security advisory page at
<https://github.com/michaelrsweet/mxml/security/advisories>.

Alternately, security bugs can be reported to "security AT msweet.org" using the
PGP public key below. Expect a response within 5 business days. Any proposed
embargo date should be at least 30 days and no more than 90 days in the future.

> *Note:* If you've found a software defect that allows a *program* to gain
> unauthorized access or privileges on the host computer or causes the program
> to crash, that defect should be reported as an ordinary project issue at
> <https://github.com/michaelrsweet/mxml/issues>.

Responsible Disclosure
----------------------

Expand Down Expand Up @@ -35,7 +54,7 @@ starting at 0. A feature release has a "PATCH" value of 0, for example:
1.1.0
2.0.0

Beta releases and release candidates are *not* prodution releases and use
Beta releases and release candidates are *not* production releases and use
semantic version numbers of the form:

MAJOR.MINORbNUMBER
Expand All @@ -50,14 +69,6 @@ example:
1.0rc1


Reporting a Vulnerability
-------------------------

Report all security issues to "security AT msweet.org". Expect a response
within 5 business days. Any proposed embargo date should be at least 30 days
and no more than 90 days in the future.


PGP Public Key
--------------

Expand Down
23 changes: 12 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for Mini-XML 4.0b1.
# Generated by GNU Autoconf 2.71 for Mini-XML 4.0.0.
#
# Report bugs to <https://github.com/michaelrsweet/mxml/issues>.
#
Expand Down Expand Up @@ -610,8 +610,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Mini-XML'
PACKAGE_TARNAME='mxml'
PACKAGE_VERSION='4.0b1'
PACKAGE_STRING='Mini-XML 4.0b1'
PACKAGE_VERSION='4.0.0'
PACKAGE_STRING='Mini-XML 4.0.0'
PACKAGE_BUGREPORT='https://github.com/michaelrsweet/mxml/issues'
PACKAGE_URL='https://www.msweet.org/mxml'

Expand Down Expand Up @@ -1296,7 +1296,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Mini-XML 4.0b1 to adapt to many kinds of systems.
\`configure' configures Mini-XML 4.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1362,7 +1362,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Mini-XML 4.0b1:";;
short | recursive ) echo "Configuration of Mini-XML 4.0.0:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1463,7 +1463,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Mini-XML configure 4.0b1
Mini-XML configure 4.0.0
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1662,7 +1662,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Mini-XML $as_me 4.0b1, which was
It was created by Mini-XML $as_me 4.0.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -2420,7 +2420,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"


MXML_VERSION="4.0b1"
MXML_VERSION="4.0.0"


printf "%s\n" "#define MXML_VERSION \"Mini-XML v$MXML_VERSION\"" >>confdefs.h
Expand Down Expand Up @@ -4193,7 +4193,8 @@ then :
if test "x$ac_cv_header_pthread_h" = xyes
then :

printf "%s\n" "#define HAVE_PTHREAD_H Have <pthread.h>?" >>confdefs.h

printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h


fi
Expand Down Expand Up @@ -5244,7 +5245,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Mini-XML $as_me 4.0b1, which was
This file was extended by Mini-XML $as_me 4.0.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5309,7 +5310,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
Mini-XML config.status 4.0b1
Mini-XML config.status 4.0.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AC_PREREQ([2.70])


dnl Package name and version...
AC_INIT([Mini-XML], [4.0b1], [https://github.com/michaelrsweet/mxml/issues], [mxml], [https://www.msweet.org/mxml])
AC_INIT([Mini-XML], [4.0.0], [https://github.com/michaelrsweet/mxml/issues], [mxml], [https://www.msweet.org/mxml])
AC_CONFIG_HEADERS([config.h])

MXML_VERSION="AC_PACKAGE_VERSION"
Expand Down Expand Up @@ -93,7 +93,7 @@ AC_ARG_ENABLE([threads], AS_HELP_STRING([--disable-threads], [disable multi-thre
have_pthread=no
AS_IF([test "x$enable_threads" != xno], [
AC_CHECK_HEADER([pthread.h], [
AC_DEFINE([HAVE_PTHREAD_H], [Have <pthread.h>?])
AC_DEFINE([HAVE_PTHREAD_H], [1], [Have <pthread.h>?])
])
AS_IF([test x$ac_cv_header_pthread_h = xyes], [
Expand Down
61 changes: 60 additions & 1 deletion makesrcdist
Original file line number Diff line number Diff line change
@@ -1,15 +1,74 @@
#!/bin/sh
#
# makesrcdist - make a source distribution of mxml.
# makesrcdist - make a source distribution of Mini-XML.
#
# https://www.msweet.org/mxml
#
# Copyright © 2003-2024 by Michael R Sweet.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
#

if test $# != 1; then
echo "Usage: ./makesrcdist version"
exit 1
fi


# Check that various files are up-to-date...
version=$1

version_major=$(echo $version | awk -F. '{print $1}')
version_minor=$(echo $version | awk -F. '{print $2}')

status=0

if ! grep -q "Changes in Mini-XML $version" CHANGES.md; then
echo "Update CHANGES.md."
status=1
fi

if test "$(grep AC_INIT configure.ac | awk '{print $2}')" != "[$version],"; then
echo "Update configure.ac."
status=1
fi

if test "$(grep MXML_MAJOR_VERSION mxml.h | awk '{print $4}')" != "$version_major"; then
echo "Update MXML_MAJOR_VERSION in mxml.h."
status=1
fi

if test "$(grep MXML_MINOR_VERSION mxml.h | awk '{print $4}')" != "$version_minor"; then
echo "Update MXML_MINOR_VERSION in mxml.h."
status=1
fi

if ! grep -q "Version: $version" mxml.spec; then
echo "Update mxml.spec."
status=1
fi

if ! grep -q "<version>$version</version>" vcnet/libmxml2_native.nuspec; then
echo "Update vcnet/libmxml2_native.nuspec."
status=1
fi
if ! grep -q "version=\"$version\" />" vcnet/libmxml2_native.nuspec; then
echo "Update vcnet/libmxml2_native.nuspec."
status=1
fi

if ! grep -q "<version>$version</version>" vcnet/libmxml2_native.redist.nuspec; then
echo "Update vcnet/libmxml2_native.redist.nuspec."
status=1
fi

if test $status = 1; then
exit 1
fi


# Create tag and archives...
echo Creating tag for release...
git tag -m "Tag $version" v$version
git push origin v$version
Expand Down
4 changes: 2 additions & 2 deletions mxml.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#
# https://www.msweet.org/mxml
#
# Copyright © 2003-2019 by Michael R Sweet.
# Copyright © 2003-2024 by Michael R Sweet.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
#

Summary: Small XML file parsing library
Name: mxml
Version: 3.2
Version: 4.0.0
Release: 1
License: Apache 2.0
Group: Development/Libraries
Expand Down
Loading

0 comments on commit fde58fe

Please sign in to comment.