diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2024-05-21 01:29:20 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2024-05-21 01:29:20 +0200 |
commit | b54b8f5b25403cf3b9623804b2491ec78a8b913e (patch) | |
tree | 8100b69a2fd1e37d1eb400a33c92ec3c984f208b /maint | |
parent | 0bbc18869720ad042b668742ca48e5cb8a37491a (diff) | |
download | blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.tar.gz blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.tar.bz2 blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.zip |
build: replace autotools with cmake
this patch removes all the autoconf/automake/libtool build
infrastructure and replaces it with cmake.
notable default behavior changes:
- man pages are not pre-built, and are not built by default, must be
enabled with `-DBUILD_MANPAGES=ON`.
removed features:
- srpm packaging, to be reintroduced at some point.
- deb packaging, now handled externally via rafaelmartins/deb.rgm.io
more stuff must be missing, please report bugs!
Diffstat (limited to 'maint')
-rw-r--r-- | maint/README.md | 93 | ||||
-rwxr-xr-x | maint/download_release.py | 49 |
2 files changed, 0 insertions, 142 deletions
diff --git a/maint/README.md b/maint/README.md deleted file mode 100644 index 27ff7d8..0000000 --- a/maint/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# How to release a new blogc version - -These are some rough steps required to produce a blogc release. - - -## Define version number - -- Read repository logs: - ``` - $ git log v0.18.0..HEAD # replace with whatever latest release - ``` -- Follow this criteria: - - Only bug fixes: Bump micro version. - - Something new: Bump minor version, set micro to `0`. - - We have no plans to change major version so far. Keep it `0`. - - -## Prepare release - -- Write blog post (repository is https://github.com/blogc/blogc.rgm.io/) - ``` - $ cp content/news/blogc-0.18.0.txt content/news/blogc-0.19.0.txt # replace versions - $ vim blogcfile # change LATEST_RELEASE, add new post file to the end of [posts] - $ vim content/news/blogc-0.19.0.txt # write the content, based on what changed. put some placeholder DATE - $ blogc-make runserver - ``` -- Copy manpage sources from main repository (https://github.com/blogc/blogc): - ``` - $ cp -r ../blogc/man/* man/ - $ make -C man - ``` - ronn output is not idempotent. It may rewrite HTML for manpages that are unchanged. Make sure to discard these changes somehow with git. -- Write GitHub release draft. Content is similar to blog post. No need to include lots of links. Always append this to the end of text: - ``` - Please download the custom tarballs, not the files generated automatically by GitHub, they are garbage. - ``` - - -## Bump version - -- Make sure that all the code is in place. -- Edit `blogc.spec.in`. Check if dependencies and packaging are still correct. - - If something needs update, do it. Then commit, push and wait for [CI](https://github.com/blogc/blogc/actions). After successful build, grab a `.src.rpm` from https://distfiles.rgm.io/blogc/LATEST/, upload to a test [Copr](https://copr.fedorainfracloud.org/), wait until it builds and follow also next step. - - If everything is ok, add a changelog line to the top of the `%changelog` section. -- Update debian version: - - If something needs update, do it. Then commit, push and wait for [CI](https://github.com/blogc/blogc/actions). - - Run `dch`: - ``` - $ dch --distribution unstable --newversion 0.19.0-1~0upstream "Upstream Release" - ``` -- Commit, push and wait for [CI](https://github.com/blogc/blogc/actions). -- Create signed tag: - ``` - $ git tag -s -m 'blogc-0.19.0' v0.19.0 # replace with whatever version you defined before - ``` - This requires my (rafaelmartins) personal GPG key. If someone else needs to publish a release, please announce the new key in the blog post and GitHub release. -- Push signed tag: - ``` - $ git push origin v0.19.0 # replace with whatever version you defined before - ``` -- Wait for [CI](https://github.com/blogc/blogc/actions) to build the release files and push them to https://distfiles.rgm.io/blogc/. - - -## Releasing new version - -- Download new release files and sign them: - ``` - $ ./download_release.py - ``` - This requires my (rafaelmartins) personal GPG key to sign files. If someone else needs to publish a release, please edit the script to add new GPG key and announce it in the blog post and GitHub release. -- Grab files from `releases/0.19.0` (replace version) and upload to GitHub release draft, including `.asc` files. The `.src.rpm` and tarballs with debs can be omited. -- Publish release on GitHub. -- Fix blog post DATE, commit and push. - - -## Maintain downstream packages -- Upload `.src.rpm` file to the [official Copr](https://copr.fedorainfracloud.org/coprs/rafaelmartins/blogc/). The Copr is owned by rafaelmartins, there's no concept of organizations. I believe that an user could request publish access here: https://copr.fedorainfracloud.org/coprs/rafaelmartins/blogc/permissions/ -- Prepare and submit [termux-packages](https://github.com/termux/termux-packages) pull request. - - Edit `packages/blogc/build.sh`. Update version. - - Try to build package (it will fail): - ``` - $ ./scripts/run-docker.sh ./build-package.sh blogc - ``` - - Get new SHA256 hash from last command and update `packages/blogc/build.sh`. - - Build package: - ``` - $ ./scripts/run-docker.sh ./build-package.sh blogc - ``` - - If everything builds fine, commit and create pull request. - -## Celebrate - - \o/ diff --git a/maint/download_release.py b/maint/download_release.py deleted file mode 100755 index 6618972..0000000 --- a/maint/download_release.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -import os -import re -import requests -import shutil -import subprocess -import sys - -re_version = re.compile(r'blogc-([^\'"]+)\.tar\.gz') -re_distfile = re.compile(r'(blogc[^\'"]+)\.sha512') -base_url = 'https://distfiles.rgm.io/blogc' -cwd = os.path.dirname(os.path.abspath(__file__)) -gpg_key = '0x47B8CCD75DBE6358' - - -def download_release(version): - if version is None: - release_url = '%s/LATEST' % (base_url,) - r = requests.get(release_url) - r.raise_for_status() - match = re_version.search(r.text) - if match is None: - raise RuntimeError('Could not guess version') - version = match.group(1) - else: - release_url = '%s/blogc-%s' % (base_url, version) - r = requests.get(release_url) - r.raise_for_status() - - dest_path = os.path.join(cwd, 'releases', version) - if os.path.exists(dest_path): - shutil.rmtree(dest_path) - os.makedirs(dest_path) - - for distfile in set(re_distfile.findall(r.text)): - file_url = '%s/%s' % (release_url, distfile) - subprocess.check_call(['wget', '-P', dest_path, file_url, - '%s.sha512' % file_url]) - subprocess.check_call(['sha512sum', '-c', '%s.sha512' % distfile], - cwd=dest_path) - subprocess.check_call(['gpg', '--local-user', gpg_key, '--detach-sign', - '--armor', distfile], - cwd=dest_path) - - -if __name__ == '__main__': - download_release(sys.argv[1] if len(sys.argv) > 1 else None) |