slachiewicz opened a new pull request, #1009:
URL: https://github.com/apache/incubator-xtable/pull/1009
## *Important Read*
No separate issue; part of the 0.5.0 release work (#1006). Follow-up to the
cancelled 0.5.0-incubating RC1, whose source tarball held 753 AppleDouble files
(`._*`) and `LIBARCHIVE.xattr.com.apple.provenance` pax headers from bsdtar on
macOS.
#1008 fixes the same symptom inside `create_source_release.sh`
(`COPYFILE_DISABLE=1 tar --no-xattrs` plus an entry check). This PR works one
layer up and retires that script, so the archive no longer depends on the
release manager's tar at all. Both touch `create_source_release.sh` and
`validate_staged_release.sh`; whichever lands second needs a rebase. #1008 is
the smaller change if the PPMC prefers not to switch procedures between RC1 and
RC2.
## What is the purpose of the pull request
Build the source release with Maven, the way most ASF Java projects do,
instead of `create_source_release.sh` (clone, rsync with a hand-kept exclude
list, `tar czf` on the release manager's machine). The archive is now built by
the `apache-release` profile of `org.apache:apache:39`, signed and checksummed
in the same build, and deployed to Nexus staging next to the jars.
plexus-archiver reads no extended attributes, writes 0/0 owners and normalized
modes, and uses `project.build.outputTimestamp`, so the bytes don't depend on
the build machine.
### What `apache-release` does in parent 39
- `maven-assembly-plugin` 3.8.0, execution `source-release-assembly` at
`package`, `runOnlyAtExecutionRoot`, `descriptorRef`
`${sourceReleaseAssemblyDescriptor}` (default `source-release`, zip only; the
descriptor jar `apache-source-release-assembly-descriptor:1.8` also has
`source-release-tar` and `source-release-zip-tar`), `tarLongFileMode` posix.
- The shared descriptor packs `.` with plexus default excludes plus regex
excludes for `target`, IDE files, `.github`, `.asf.yaml`, `.travis.yml`,
`.Jenkinsfile`, release-plugin and shade/flatten leftovers, and a second
fileSet that copies `target/maven-shared-archive-resources/META-INF` (LICENSE,
NOTICE, DISCLAIMER, DEPENDENCIES) to the root.
- `checksum-maven-plugin` 1.11, execution `source-release-checksum`, goal
`artifacts` at `post-integration-test`: SHA-512 of the `source-release`
classifier, attached so it is deployed too.
- `maven-gpg-plugin` 3.2.8, execution `sign-release-artifacts`,
`--digest-algo=SHA512`, `gpg.useagent=true`; it signs every attached artifact
except checksums.
- `maven-source-plugin` `attach-sources` and `maven-javadoc-plugin`
`attach-javadocs`.
- `maven-release-plugin` 3.3.1 is configured in pluginManagement with
`releaseProfiles=apache-release`, `goals=deploy`. Parent 39 also has a
`push-to-atr` profile, not used here.
## Brief change log
- **Exclude strategy.** `release/assembly/source-release.xml` replaces the
shared descriptor (`<descriptorRefs combine.self="override"/>`). It is the
shared fileSet verbatim plus `assets/**`, `demo/**`, `rfc/**`, `style/IDE.png`,
`website/**` and `xtable-service/examples/**`. Shipping those instead is not an
option: they hold images, demo table data and website assets that fail the
binary-file check and that RAT excludes. Two fileSets cannot subtract from each
other, hence a copy rather than an extension. The second fileSet is dropped:
the repository's own LICENSE, NOTICE and DISCLAIMER already win over the
generated copies, and the generated `DEPENDENCIES` file has no place in a
source release.
- **Formats and naming.** tar.gz (continuity with 0.4.0) and zip, under the
parent's default name: `xtable-<version>-source-release.{tar.gz,zip}` with
top-level directory `xtable-<version>/`, the same name as in the Nexus staging
repository, so the files go to dist/dev unchanged. The version carries
`-incubating`, which the Incubator requires in the file name.
- **Checksum format.** `appendFilename=true` keeps the `<hash> <file>`
format of earlier releases, so `sha512sum -c` and `shasum -a 512 -c` work on
the files from Nexus and dist alike.
- **Profiles.** XTable's `release` profile is now an `apache-release`
profile that adds only what the parent lacks: delombok and the javadoc
`sourcepath`/`doclint`/`source` settings (without delombok, the parent's
javadoc fails on Lombok builders), plus the assembly and checksum overrides.
The duplicate sources, javadoc and gpg executions are gone, so everything is
signed once. `-DdeployArtifacts=true` is removed, because property activation
would switch on only XTable's half of the profile; every reference is updated.
`maven-gpg-plugin` moves from 3.2.4 to the parent's 3.2.8. The javadoc and
sources plugin versions stay as they are, so the jars don't change.
- **Release plugin.** Manual tagging stays. `release:prepare` needs a
SNAPSHOT to release and commits its own tag, but `cut_release_branch.sh`
already sets the release version on the branch and RC re-spins reuse it. The
unused `maven-release-plugin` 2.5.3 block, which pointed at the removed
`release` profile, is deleted; the parent's 3.3.1 configuration applies if
anyone runs it.
- **Spotless.** The `<pom>` license-header delimiter gains `^<assembly`, the
root element of the new descriptor.
- **Scripts.**
- `create_source_release.sh` now fails with a pointer to the guide.
- `deploy_staging_jars.sh` drops the `packaging/` check copied from Hudi
and runs one `clean deploy -Papache-release` instead of clean, install and
deploy. It refuses to run unless `HEAD` is a tag and the checkout has no
modified, untracked or ignored files, since the archive packs the working
directory.
- `validate_staged_release.sh` takes the new names, checks every archive's
checksum and signature, and gains `--local_dir` to validate `target/` before
Nexus is closed. A new entry check fails on `._*`, `__MACOSX`, `.DS_Store`, pax
headers other than path/size/time/owner fields (catches `LIBARCHIVE.*` and
`SCHILY.xattr.*`), owners other than 0/0, entries outside the top-level
directory, and tar/zip listings that differ.
- `validate_staged_bundles.sh` also checks the six source-release files in
staging.
- `validate_source_binary_files.sh` used `file -I`, which exists only on
macOS; GNU `file` rejects it, the error went to stderr and the check passed on
Linux whatever the content. It now uses `file --mime`.
- `validate_source_rat.sh` no longer passes `-DdeployArtifacts=true`.
- **Guide.** "Build a release candidate" now runs: tag, push the tag by full
ref (branch and tag share a name), build and deploy from a fresh clone of the
tag, validate `target/`, close Nexus, copy the source release, `.asc` and
`.sha512` from the closed staging repository to
`dist/dev/incubator/xtable/<v>-rc<N>/` with svn, `cmp` against the local build,
validate on dist, vote. The old order built the source release before the tag
existed although the script checked the tag out. Signing uses `-Dgpg.keyname`,
`GPG_TTY` and `MAVEN_GPG_PASSPHRASE` instead of the `gpg --local-user`
examples. `validate_staged_bundles.sh` gets the Maven version instead of
`<v>-rc<N>`.
## Verify this pull request
All on Linux arm64, JDK 11, Maven 3.9.11 from the wrapper, without signing
or deploying unless stated.
- `./mvnw -B clean install -Papache-release -DskipTests -Dgpg.skip
-Dmaven.build.cache.enabled=false` in a fresh clone → BUILD SUCCESS. It
produces `target/xtable-0.5.0-SNAPSHOT-source-release.{tar.gz,zip}` and both
`.sha512` files, and installs every jar, sources and javadoc jar (the root
`xtable` artifact carries `xtable-<v>-source-release.*`). `sha512sum -c` and
`shasum -a 512 -c` accept both checksums.
- Signing with a throwaway key (`-Dgpg.keyname`, root project): one
`sign-release-artifacts` execution, one `.asc` each for pom, tar.gz and zip,
none for `.sha512`; the archive bytes are unchanged by signing.
- Archive: one top-level directory, all entries `root/root`, modes 644/755,
timestamps from `project.build.outputTimestamp`, no `._*`, `__MACOSX` or
`.DS_Store`; GNU tar unpacks it without warnings (RC1 printed 753 "Ignoring
unknown extended header keyword" warnings).
- Contents: the file list equals `git ls-files` minus `.asf.yaml`,
`.gitignore`, `.github/` (14), `assets/` (2), `demo/` (44), `rfc/` (3),
`style/IDE.png`, `website/` (148), `xtable-service/examples/` (2). tar.gz and
zip list the same files.
- Against the RC1 tarball (minus `._*`): RC1 has `.asf.yaml` (the shared
descriptor drops it), the new archive has
`release/assembly/source-release.xml`; every other file is byte-identical
except the `pom.xml` files (version string and this change).
- The unpacked source builds with `./mvnw clean package`: RAT passes in
every module, 868 unit tests run, 0 failures, 0 errors, 3 skipped.
- Reproducibility: two fresh clones built a minute apart give byte-identical
tar.gz and zip; so does a clone checked out under umask 0022 instead of 0002,
and the full `install` build gives the same bytes as a root-only `-N verify` of
the same commit.
- `validate_staged_release.sh --local_dir=../../target` passes every step:
checksums, signatures (with the throwaway key), entries, binary files,
DISCLAIMER/LICENSE/NOTICE, headers, RAT. Against RC1 renamed to the new scheme
it fails on the pax xattr headers, 501/20 owners and `._*` entries.
- `deploy_staging_jars.sh` with `MVN=echo`: refuses off-tag and with an
untracked file; on a clean tagged clone prints the single deploy command.
Not run here: a real deploy, Nexus close or svn commit, and so
`validate_staged_bundles.sh`, which needs a closed staging repository; the
build on JDK 21, which fails at Spotless independently of this change. During
javadoc of `xtable-spark-runtime`, the javadoc plugin reported "Error occurred
during initialization of VM", retried with empty `MAVEN_OPTS` and produced the
jar; the same javadoc version and configuration as before.
## For the PPMC to decide
- **Published name.** `xtable-<v>-source-release.tar.gz` replaces 0.4.0's
`apache-xtable-<v>.src.tgz`; `website/releases/downloads.mdx` needs the new
name when 0.5.0 is published.
- **zip.** Shipping both doubles the files to verify. Dropping zip is one
line in `release/assembly/source-release.xml`; the scripts accept a tar.gz-only
candidate.
- **`.asf.yaml`.** No longer shipped (it was in 0.4.0 and RC1); it
configures GitHub only.
## How the RM cuts RC2
```shell
export RELEASE_VERSION=0.5.0-incubating RC_NUM=2 KEY_ID=<FINGERPRINT>
export RELEASE_TAG=release-${RELEASE_VERSION}-rc${RC_NUM}
# on release-0.5.0-incubating-rc2, after cherry-picking this change
git tag -s ${RELEASE_TAG} -u ${KEY_ID} -m "${RELEASE_VERSION} rc${RC_NUM}"
git push origin refs/tags/${RELEASE_TAG}
git clone https://github.com/apache/incubator-xtable.git
xtable-${RELEASE_TAG} && cd xtable-${RELEASE_TAG}
git checkout --detach refs/tags/${RELEASE_TAG}
export GPG_TTY=$(tty)
./release/scripts/deploy_staging_jars.sh -Dgpg.keyname=${KEY_ID} # JDK 11
(cd release/scripts && ./validate_staged_release.sh
--release=${RELEASE_VERSION} --rc_num=${RC_NUM} --local_dir=../../target)
# close orgapachextable-NNNN in Nexus, then
STAGING_URL=https://repository.apache.org/content/repositories/orgapachextable-NNNN/org/apache/xtable/xtable/${RELEASE_VERSION}
svn checkout https://dist.apache.org/repos/dist/dev/incubator/xtable
--depth=immediates
mkdir xtable/${RELEASE_VERSION}-rc${RC_NUM} && cd
xtable/${RELEASE_VERSION}-rc${RC_NUM}
for ext in tar.gz tar.gz.asc tar.gz.sha512 zip zip.asc zip.sha512; do
curl -fsSLO ${STAGING_URL}/xtable-${RELEASE_VERSION}-source-release.${ext}
done
shasum -a 512 -c *.sha512 && for f in *.tar.gz *.zip; do gpg --verify $f.asc
$f; done
cd .. && svn add ${RELEASE_VERSION}-rc${RC_NUM} && svn commit -m "Add Apache
XTable ${RELEASE_VERSION} rc${RC_NUM}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]