forked from ungleich-public/cdist
Compare commits
22 Commits
line_creat
...
master
Author | SHA1 | Date |
---|---|---|
|
3e82b0085b | |
|
b7394ff4c2 | |
|
61fc5e5de8 | |
|
2b102f303a | |
|
e57cf1e70a | |
|
7dd2d1025a | |
|
513a8ae177 | |
|
2a2f91959e | |
|
fcf76cdb2c | |
|
1450861e26 | |
|
08a6b467fa | |
|
ed3da3c829 | |
|
b974969f28 | |
|
bdfd92dc37 | |
|
5c85b04309 | |
|
f36069754c | |
|
d4dfe95a97 | |
|
ffeaafe9b6 | |
|
62db96bb37 | |
|
c85184dcb4 | |
|
90488d2e9e | |
|
be6e7fcc08 |
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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)
|
# 2016-2019 Darko Poljak (darko.poljak at gmail.com)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# This file is part of cdist.
|
||||||
|
@ -534,7 +534,8 @@ eof
|
||||||
;;
|
;;
|
||||||
|
|
||||||
version)
|
version)
|
||||||
printf "VERSION = \"%s\"\n" "$(git describe)" > cdist/version.py
|
target_version="$(git describe | sed 's/-/.dev/; s/-/+/g')"
|
||||||
|
printf "VERSION = \"%s\"\n" "${target_version}" > cdist/version.py
|
||||||
;;
|
;;
|
||||||
|
|
||||||
target-version)
|
target-version)
|
||||||
|
|
|
@ -472,9 +472,6 @@ def get_parsers():
|
||||||
parser['info'].set_defaults(func=cdist.info.Info.commandline)
|
parser['info'].set_defaults(func=cdist.info.Info.commandline)
|
||||||
|
|
||||||
# Scan = config + further
|
# Scan = config + further
|
||||||
parser['scan'] = parser['sub'].add_parser('scan', add_help=False,
|
|
||||||
parents=[parser['config']])
|
|
||||||
|
|
||||||
parser['scan'] = parser['sub'].add_parser(
|
parser['scan'] = parser['sub'].add_parser(
|
||||||
'scan', parents=[parser['loglevel'],
|
'scan', parents=[parser['loglevel'],
|
||||||
parser['beta'],
|
parser['beta'],
|
||||||
|
|
|
@ -515,7 +515,7 @@ check_vm_arch_specific() {
|
||||||
&& return 0
|
&& return 0
|
||||||
fi
|
fi
|
||||||
if has_cpuinfo \
|
if has_cpuinfo \
|
||||||
&& grep -q -i -e '^flags.*:.*\(hypervisor\|vmm\)' /proc/cpuinfo
|
&& grep -q -i -e '^flags.*:.*\(hypervisor\|vmm\)\( \|$\)' /proc/cpuinfo
|
||||||
then
|
then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -82,6 +82,7 @@ in
|
||||||
# ceres versions don't have a number, so we decode by codename:
|
# ceres versions don't have a number, so we decode by codename:
|
||||||
case ${devuan_version}
|
case ${devuan_version}
|
||||||
in
|
in
|
||||||
|
(daedalus/ceres) echo 4.99 ;;
|
||||||
(chimaera/ceres) echo 3.99 ;;
|
(chimaera/ceres) echo 3.99 ;;
|
||||||
(beowulf/ceres) echo 2.99 ;;
|
(beowulf/ceres) echo 2.99 ;;
|
||||||
(ascii/ceres) echo 1.99 ;;
|
(ascii/ceres) echo 1.99 ;;
|
||||||
|
|
|
@ -24,4 +24,4 @@ else
|
||||||
name="$__object_id"
|
name="$__object_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-mark showhold | grep -Fq "$name" && echo hold || echo unhold
|
apt-mark showhold | grep -q "^${name}$" && echo hold || echo unhold
|
||||||
|
|
|
@ -23,7 +23,7 @@ package
|
||||||
Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used.
|
Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used.
|
||||||
|
|
||||||
priority
|
priority
|
||||||
The priority value to assign to matching packages. Deafults to 500. (To match the default target distro's priority)
|
The priority value to assign to matching packages. Defaults to 500. (To match the default target distro's priority)
|
||||||
|
|
||||||
state
|
state
|
||||||
Will be passed to underlying `__file` type; see there for valid values and defaults.
|
Will be passed to underlying `__file` type; see there for valid values and defaults.
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
name="$__object_id"
|
name="$__object_id"
|
||||||
state="$(cat "$__object/parameter/state")"
|
state="$(cat "$__object/parameter/state")"
|
||||||
uri="$(cat "$__object/parameter/uri")"
|
uri="$(cat "$__object/parameter/uri")"
|
||||||
|
options=""
|
||||||
|
|
||||||
if [ -f "$__object/parameter/distribution" ]; then
|
if [ -f "$__object/parameter/distribution" ]; then
|
||||||
distribution="$(cat "$__object/parameter/distribution")"
|
distribution="$(cat "$__object/parameter/distribution")"
|
||||||
|
|
|
@ -85,7 +85,7 @@ if [ -z "${certbot_fullpath}" ]; then
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
freebsd)
|
freebsd)
|
||||||
__package py37-certbot
|
__package py39-certbot
|
||||||
certbot_fullpath="/usr/local/bin/certbot"
|
certbot_fullpath="/usr/local/bin/certbot"
|
||||||
;;
|
;;
|
||||||
ubuntu)
|
ubuntu)
|
||||||
|
|
|
@ -19,5 +19,5 @@
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
__package luarocks --state installed
|
__package luarocks --state present
|
||||||
__package make --state installed
|
__package make --state present
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
|
|
||||||
user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")"
|
user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")"
|
||||||
|
|
||||||
(id -G -n "$user" | tr ' ' '\n' | sort) 2>/dev/null || true
|
(id -G -n "$user" | tr ' ' '\n') 2>/dev/null || true
|
||||||
|
|
|
@ -26,13 +26,15 @@ os=$(cat "$__global/explorer/os")
|
||||||
mkdir "$__object/files"
|
mkdir "$__object/files"
|
||||||
# file has to be sorted for comparison with `comm`
|
# file has to be sorted for comparison with `comm`
|
||||||
sort "$__object/parameter/group" > "$__object/files/group.sorted"
|
sort "$__object/parameter/group" > "$__object/files/group.sorted"
|
||||||
|
# Use local sort for remote groups
|
||||||
|
sort "$__object/explorer/group" > "$__object/files/group-remote.sorted"
|
||||||
|
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
present)
|
present)
|
||||||
changed_groups="$(comm -13 "$__object/explorer/group" "$__object/files/group.sorted")"
|
changed_groups="$(comm -13 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")"
|
||||||
;;
|
;;
|
||||||
absent)
|
absent)
|
||||||
changed_groups="$(comm -12 "$__object/explorer/group" "$__object/files/group.sorted")"
|
changed_groups="$(comm -12 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
next:
|
7.0.1:
|
||||||
|
* Core: Remove double definition of scan parser (Nico Schottelius)
|
||||||
|
* Type __apt_mark: Narrow down grep for hold packages (marcoduif)
|
||||||
|
* Type __apt_source: Set required options variable (Mark Verboom)
|
||||||
|
* Type __letsencrypt_cert: Update python version (Michelle)
|
||||||
|
* Explorer os_version: Add support for Daedalus (Michelle)
|
||||||
|
* Explorer machine_type: Correct incorrect VMM matching (Mark Verboom)
|
||||||
|
|
||||||
|
7.0.0: 2022-07-31
|
||||||
* Explorer machine_type: Rewrite (Dennis Camera)
|
* Explorer machine_type: Rewrite (Dennis Camera)
|
||||||
* New type: __sed (Ander Punnar)
|
* New type: __sed (Ander Punnar)
|
||||||
* New type: __haproxy_dualstack (Evilham and ungleich)
|
* New type: __haproxy_dualstack (Evilham and ungleich)
|
||||||
|
|
|
@ -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 New Issue