forked from ungleich-public/cdist
Compare commits
13 commits
docs-fixes
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
90488d2e9e | ||
|
be6e7fcc08 | ||
|
d4bf41ce3b | ||
7de931829a | |||
17466452f0 | |||
7d8fc8a5c3 | |||
6243165645 | |||
483f0c1614 | |||
ff6b2d0abf | |||
|
339ca9347b | ||
5a7542db75 | |||
0ae37b3445 | |||
5e6cde1398 |
14 changed files with 142 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2011-2022 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2016-2019 Darko Poljak (darko.poljak at gmail.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
set +e
|
||||
case "$("$__explorer/os")" in
|
||||
checkpoint)
|
||||
awk '{printf("%s\n", $(NF-1))}' /etc/cp-release
|
||||
;;
|
||||
openwrt)
|
||||
# shellcheck disable=SC1091
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_CODENAME")
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
set +e
|
||||
case "$("$__explorer/os")" in
|
||||
checkpoint)
|
||||
cat /etc/cp-release
|
||||
;;
|
||||
openwrt)
|
||||
# shellcheck disable=SC1091
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION")
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
set +e
|
||||
case "$("$__explorer/os")" in
|
||||
checkpoint)
|
||||
echo "CheckPoint"
|
||||
;;
|
||||
openwrt)
|
||||
# shellcheck disable=SC1091
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_ID")
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
set +e
|
||||
case "$("$__explorer/os")" in
|
||||
checkpoint)
|
||||
sed /etc/cp-release -e 's/.* R\([1-9][0-9]*\)\.[0-9]*$/\1/'
|
||||
;;
|
||||
openwrt)
|
||||
# shellcheck disable=SC1091
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_RELEASE")
|
||||
|
|
|
@ -116,6 +116,13 @@ if [ -f /etc/slackware-version ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Appliances
|
||||
|
||||
if grep -q '^Check Point Gaia' /etc/cp-release 2>/dev/null; then
|
||||
echo checkpoint
|
||||
exit 0
|
||||
fi
|
||||
|
||||
uname_s="$(uname -s)"
|
||||
|
||||
# Assume there is no tr on the client -> do lower case ourselves
|
||||
|
|
|
@ -34,5 +34,9 @@ elif test -f /var/run/os-release
|
|||
then
|
||||
# FreeBSD (created by os-release service)
|
||||
cat /var/run/os-release
|
||||
elif test -f /etc/cp-release
|
||||
then
|
||||
# Checkpoint firewall or management (actually linux based)
|
||||
cat /etc/cp-release
|
||||
fi
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ in
|
|||
# empty, but well...
|
||||
cat /etc/arch-release
|
||||
;;
|
||||
checkpoint)
|
||||
awk '{version=$NF; printf("%s\n", substr(version, 2))}' /etc/cp-release
|
||||
;;
|
||||
debian)
|
||||
debian_version=$(cat /etc/debian_version)
|
||||
case $debian_version
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
set -u
|
||||
|
||||
entry="$uri $distribution $component"
|
||||
|
||||
cat << DONE
|
||||
# Created by cdist ${__type##*/}
|
||||
# Do not change. Changes will be overwritten.
|
||||
#
|
||||
|
||||
# $name
|
||||
deb ${forcedarch} $entry
|
||||
deb ${options} $entry
|
||||
DONE
|
||||
if [ -f "$__object/parameter/include-src" ]; then
|
||||
echo "deb-src $entry"
|
||||
|
|
|
@ -23,6 +23,9 @@ OPTIONAL PARAMETERS
|
|||
arch
|
||||
set this if you need to force and specific arch (ubuntu specific)
|
||||
|
||||
signed-by
|
||||
provide a GPG key fingerprint or keyring path for signature checks
|
||||
|
||||
state
|
||||
'present' or 'absent', defaults to 'present'
|
||||
|
||||
|
@ -56,6 +59,11 @@ EXAMPLES
|
|||
--uri http://archive.canonical.com/ \
|
||||
--component partner --state present
|
||||
|
||||
__apt_source goaccess \
|
||||
--uri http://deb.goaccess.io/ \
|
||||
--component main \
|
||||
--signed-by C03B48887D5E56B046715D3297BD1A0133449C3D
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
|
|
|
@ -31,9 +31,15 @@ fi
|
|||
component="$(cat "$__object/parameter/component")"
|
||||
|
||||
if [ -f "$__object/parameter/arch" ]; then
|
||||
forcedarch="[arch=$(cat "$__object/parameter/arch")]"
|
||||
else
|
||||
forcedarch=""
|
||||
options="arch=$(cat "$__object/parameter/arch")"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/signed-by" ]; then
|
||||
options="$options signed-by=$(cat "$__object/parameter/signed-by")"
|
||||
fi
|
||||
|
||||
if [ "$options" ]; then
|
||||
options="[$options]"
|
||||
fi
|
||||
|
||||
# export variables for use in template
|
||||
|
@ -41,7 +47,7 @@ export name
|
|||
export uri
|
||||
export distribution
|
||||
export component
|
||||
export forcedarch
|
||||
export options
|
||||
|
||||
# generate file from template
|
||||
mkdir "$__object/files"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
state
|
||||
distribution
|
||||
component
|
||||
arch
|
||||
arch
|
||||
signed-by
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Changelog
|
||||
---------
|
||||
|
||||
next:
|
||||
7.0.0: 2022-07-31
|
||||
* Explorer machine_type: Rewrite (Dennis Camera)
|
||||
* New type: __sed (Ander Punnar)
|
||||
* New type: __haproxy_dualstack (Evilham and ungleich)
|
||||
|
@ -17,6 +17,8 @@ next:
|
|||
* Type __file: make file uploading and attribute changes more atomic (Steven Armstrong)
|
||||
* Type __dot_file: Add support for using --file parameter (Stephan Leemburg)
|
||||
* Type __apt_ppa: Replace custom "remove-apt-repository" with add-apt-repository -r (Romain Dartigues)
|
||||
* Type __apt_source: Add signed-by parameter (Daniel Fancsali)
|
||||
* Explorer: add support for checkpoint (Stephan Leemburg)
|
||||
|
||||
6.9.8: 2021-08-24
|
||||
* Type __rsync: Rewrite (Ander Punnar)
|
||||
|
|
90
docs/dev/release-process.org
Normal file
90
docs/dev/release-process.org
Normal file
|
@ -0,0 +1,90 @@
|
|||
* Install requirements (Alpine)
|
||||
- apk add py3-pycodestyle shellcheck py3-sphinx py3-sphinx_rtd_theme \
|
||||
py3-build twine
|
||||
* Ensure your gpg setup works with the email used in the git commit!
|
||||
- For me this is nico@nico-notebook.schottelius.org
|
||||
- Signature / id is on nb2
|
||||
* Create ~/.pypirc
|
||||
[distutils]
|
||||
index-servers =
|
||||
pypi
|
||||
cdist
|
||||
|
||||
[pypi]
|
||||
username = __token__
|
||||
password = ...
|
||||
|
||||
[cdist]
|
||||
repository = https://upload.pypi.org/legacy/
|
||||
username = __token__
|
||||
password = ...
|
||||
|
||||
* Add date in docs/changelog
|
||||
* Run ./bin/cdist-build-helper
|
||||
* TODO Move to "build"
|
||||
- python3 -m build
|
||||
* DONE git tag: when?
|
||||
CLOSED: [2022-07-31 Sun 23:58]
|
||||
** Asked during release process: ok
|
||||
* DONE Pypi error with distutils: do not use distutils anymore
|
||||
CLOSED: [2022-07-31 Sun 23:58]
|
||||
python3 setup.py sdist upload
|
||||
...
|
||||
Creating tar archive
|
||||
removing 'cdist-7.0.0' (and everything under it)
|
||||
running upload
|
||||
Submitting dist/cdist-7.0.0.tar.gz to https://upload.pypi.org/legacy/
|
||||
Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest.
|
||||
error: Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest.
|
||||
(venv2) [22:50] nb2:cdist%
|
||||
|
||||
* DONE Pypi error with twine: fixed in twine 4.0.1
|
||||
CLOSED: [2022-07-31 Sun 23:58]
|
||||
|
||||
Seeing:
|
||||
|
||||
(venv2) [22:47] nb2:cdist% twine upload dist/cdist-7.0.0*
|
||||
Uploading distributions to https://upload.pypi.org/legacy/
|
||||
Traceback (most recent call last):
|
||||
File "/usr/bin/twine", line 8, in <module>
|
||||
sys.exit(main())
|
||||
File "/usr/lib/python3.10/site-packages/twine/__main__.py", line 28, in main
|
||||
result = cli.dispatch(sys.argv[1:])
|
||||
File "/usr/lib/python3.10/site-packages/twine/cli.py", line 68, in dispatch
|
||||
return main(args.args)
|
||||
File "/usr/lib/python3.10/site-packages/twine/commands/upload.py", line 197, in main
|
||||
return upload(upload_settings, parsed_args.dists)
|
||||
File "/usr/lib/python3.10/site-packages/twine/commands/upload.py", line 141, in upload
|
||||
resp = repository.upload(package)
|
||||
File "/usr/lib/python3.10/site-packages/twine/repository.py", line 189, in upload
|
||||
resp = self._upload(package)
|
||||
File "/usr/lib/python3.10/site-packages/twine/repository.py", line 144, in _upload
|
||||
data = package.metadata_dictionary()
|
||||
File "/usr/lib/python3.10/site-packages/twine/package.py", line 181, in metadata_dictionary
|
||||
"dynamic": meta.dynamic,
|
||||
AttributeError: 'Wheel' object has no attribute 'dynamic'
|
||||
|
||||
|
||||
Fix:
|
||||
|
||||
|
||||
(venv2) [23:43] nb2:cdist% pipx run twine upload dist/*
|
||||
⚠️ twine is already on your PATH and installed at /home/nico/venv2/bin/twine. Downloading and running anyway.
|
||||
Uploading distributions to https://upload.pypi.org/legacy/
|
||||
Uploading cdist-7.0.0-py3-none-any.whl
|
||||
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 868.6/868.6 kB • 00:04 • 221.3 kB/s
|
||||
Uploading cdist-7.0.0.tar.gz
|
||||
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB • 00:08 • 169.3 kB/s
|
||||
|
||||
View at:
|
||||
https://pypi.org/project/cdist/7.0.0/
|
||||
* TODO cdist web
|
||||
- on staticweb-2022
|
||||
- Should be moved to sftp/k8s
|
||||
|
||||
|
||||
Manual steps:
|
||||
|
||||
~/bin/permissions.public html/
|
||||
rsync -a html/ staticweb.ungleich.ch:/home/services/www/nico/www.cdi.st/www/manual/7.0.0/
|
||||
ssh staticweb.ungleich.ch "cd /home/services/www/nico/www.cdi.st/www/manual; ln -sf 7.0.0 latest"
|
Loading…
Reference in a new issue