Compare commits

...

22 Commits

Author SHA1 Message Date
lubo 3e82b0085b Make development version strings PEP 440 compliant (#366)
With current pip (23.1.2) and setuptools (67.7.2) versions, installation
from Git was failing with "Invalid version: '7.0.0-17-ge57cf1e7'"
message. The issue can be reproduced by running the following command
with the latest pip and setuptools installed:

  $ pip install git+https://code.ungleich.ch/ungleich-public/cdist.git@e57cf1e70a3818180b3f54e1e0364ff3b6bbd9cc#egg=cdist

Reviewed-on: ungleich-public/cdist#366
Co-authored-by: Ľubomír Kučera <lubomir.kucera.jr@gmail.com>
Co-committed-by: Ľubomír Kučera <lubomir.kucera.jr@gmail.com>
2024-05-01 12:11:07 +00:00
Mark Verboom b7394ff4c2 Locally sort remote group information, to prevent differences in sort output. 2024-05-01 11:58:13 +00:00
fancsali 61fc5e5de8
Fix typo in __apt_pin docs 2024-05-01 13:50:17 +02:00
marcoduif 2b102f303a changed package state from installed to present 2024-03-01 11:43:23 +00:00
Nico Schottelius e57cf1e70a Apply machine_type explorer fix from pedro
e139397529
2023-03-25 12:53:24 +01:00
Nico Schottelius 7dd2d1025a ++changelog 2023-02-03 22:54:18 +01:00
nico14571 513a8ae177 Merge pull request 'Make sure flag is followed by end of line or space.' (#349) from mark/cdist:machine_type into master
Reviewed-on: ungleich-public/cdist#349
2023-02-03 21:53:12 +00:00
nico14571 2a2f91959e Merge pull request 'Updated the python version of cerbot freebsd' (#359) from CamilionEU/cdist:cerbot-freebsd into master
Reviewed-on: ungleich-public/cdist#359
2023-02-03 21:43:02 +00:00
nico14571 fcf76cdb2c Merge pull request 'Added support for Devuan Daedalus' (#358) from CamilionEU/cdist:explorer-devuan-update into master
Reviewed-on: ungleich-public/cdist#358
2023-02-03 21:40:33 +00:00
Michelle 1450861e26
Updated the python version of cerbot freebsd
The package referenced for cerbot to be install in the FreeBSD platform
used python 3.7 package, updated to python 3.9
2023-02-02 18:21:43 -05:00
Michelle 08a6b467fa
Added support for Devuan Daedalus
Added one line that allows cdist to support Devuan Daedelus version
2023-01-25 16:06:35 -05:00
Nico Schottelius ed3da3c829 ++changes 2022-12-26 21:02:41 +01:00
Nico Schottelius b974969f28 Remove double definition of scan parser
Fixes #353
2022-12-26 20:59:16 +01:00
Nico Schottelius bdfd92dc37 ++changes 2022-12-21 09:41:33 +01:00
nico14571 5c85b04309 Merge pull request 'Initialise options variable to avoid unset variable expansion' (#351) from mark/cdist:options-initialise into master
Reviewed-on: ungleich-public/cdist#351
2022-12-20 17:04:45 +00:00
Nico Schottelius f36069754c ++changelog 2022-12-20 18:03:15 +01:00
nico14571 d4dfe95a97 Merge pull request 'Make grep more specific' (#352) from marcoduif/cdist:master into master
Reviewed-on: ungleich-public/cdist#352
2022-12-20 17:02:16 +00:00
marcoduif ffeaafe9b6 Make grep more specific
package name should be an exact match, not a substring
2022-10-07 07:22:31 +00:00
Mark Verboom 62db96bb37 Initialise options variable so expansion when running files/source.list.template
there will not be an error when the variable is not set.
2022-09-29 16:19:07 +02:00
Mark Verboom c85184dcb4 Make sure flag is followed by end of line or space. 2022-09-18 08:49:37 +02:00
Nico Schottelius 90488d2e9e [doc] add release process documentation 2022-08-01 00:03:51 +02:00
Nico Schottelius be6e7fcc08 Prepare release of cdist 7.0.0 2022-07-31 21:59:35 +02:00
13 changed files with 115 additions and 15 deletions

View File

@ -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.
@ -534,7 +534,8 @@ eof
;;
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)

View File

@ -472,9 +472,6 @@ def get_parsers():
parser['info'].set_defaults(func=cdist.info.Info.commandline)
# Scan = config + further
parser['scan'] = parser['sub'].add_parser('scan', add_help=False,
parents=[parser['config']])
parser['scan'] = parser['sub'].add_parser(
'scan', parents=[parser['loglevel'],
parser['beta'],

View File

@ -515,7 +515,7 @@ check_vm_arch_specific() {
&& return 0
fi
if has_cpuinfo \
&& grep -q -i -e '^flags.*:.*\(hypervisor\|vmm\)' /proc/cpuinfo
&& grep -q -i -e '^flags.*:.*\(hypervisor\|vmm\)\( \|$\)' /proc/cpuinfo
then
return 0
fi

View File

@ -82,6 +82,7 @@ in
# ceres versions don't have a number, so we decode by codename:
case ${devuan_version}
in
(daedalus/ceres) echo 4.99 ;;
(chimaera/ceres) echo 3.99 ;;
(beowulf/ceres) echo 2.99 ;;
(ascii/ceres) echo 1.99 ;;

View File

@ -24,4 +24,4 @@ else
name="$__object_id"
fi
apt-mark showhold | grep -Fq "$name" && echo hold || echo unhold
apt-mark showhold | grep -q "^${name}$" && echo hold || echo unhold

View File

@ -23,7 +23,7 @@ package
Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used.
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
Will be passed to underlying `__file` type; see there for valid values and defaults.

View File

@ -21,6 +21,7 @@
name="$__object_id"
state="$(cat "$__object/parameter/state")"
uri="$(cat "$__object/parameter/uri")"
options=""
if [ -f "$__object/parameter/distribution" ]; then
distribution="$(cat "$__object/parameter/distribution")"

View File

@ -85,7 +85,7 @@ if [ -z "${certbot_fullpath}" ]; then
esac
;;
freebsd)
__package py37-certbot
__package py39-certbot
certbot_fullpath="/usr/local/bin/certbot"
;;
ubuntu)

View File

@ -19,5 +19,5 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
__package luarocks --state installed
__package make --state installed
__package luarocks --state present
__package make --state present

View File

@ -20,4 +20,4 @@
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

View File

@ -26,13 +26,15 @@ os=$(cat "$__global/explorer/os")
mkdir "$__object/files"
# file has to be sorted for comparison with `comm`
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
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)
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

View File

@ -1,7 +1,15 @@
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)
* New type: __sed (Ander Punnar)
* New type: __haproxy_dualstack (Evilham and ungleich)

View 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"