1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

pkgng: use hand-generated test package

Instead of relying on a broken-ish installation
of an older package from FreeBSD 11, hand-generate
a package named `zsh` with no contents and a version
number of `0`. It can be installed on any architecture
and any revision of FreeBSD sucessfully, and it will
always be eligible for upgrade.
This commit is contained in:
Ross Williams 2021-10-09 02:28:17 +00:00
parent 7f30ac8a5b
commit 68a1332a3f
4 changed files with 14 additions and 17 deletions

View file

@ -0,0 +1 @@
{"name":"zsh","origin":"shells/zsh","version":"0","comment":"The Z shell (bogus test package)","maintainer":"bapt@FreeBSD.org","www":"https://www.zsh.org/","abi":"FreeBSD:*:*","arch":"freebsd:*:*","prefix":"/usr/local","flatsize":0,"licenselogic":"single","licenses":["ZSH"],"desc":"Zsh is the Swiss Army knife of shells. It combines the most popular\nfeatures of every other shell, and then lets you customize every\ninch of it. Users of bourne-style and C-style shells will feel at\nhome in it.\n\nZsh does intelligent completion, spell-checking, has a rich syntax\nfor precise globbing, and is fully extensible through plugin\nsystems.\n\nTo fire up the zsh completion system, type the following commands:\n\n\t$ autoload -U compinstall\n\t$ compinstall\n\nWWW: https://www.zsh.org/","categories":["shells"]}

View file

@ -0,0 +1 @@
{"name":"zsh","origin":"shells/zsh","version":"0","comment":"The Z shell (bogus test package)","maintainer":"bapt@FreeBSD.org","www":"https://www.zsh.org/","abi":"FreeBSD:*:*","arch":"freebsd:*:*","prefix":"/usr/local","flatsize":0,"licenselogic":"single","licenses":["ZSH"],"desc":"Zsh is the Swiss Army knife of shells. It combines the most popular\nfeatures of every other shell, and then lets you customize every\ninch of it. Users of bourne-style and C-style shells will feel at\nhome in it.\n\nZsh does intelligent completion, spell-checking, has a rich syntax\nfor precise globbing, and is fully extensible through plugin\nsystems.\n\nTo fire up the zsh completion system, type the following commands:\n\n\t$ autoload -U compinstall\n\t$ compinstall\n\nWWW: https://www.zsh.org/","categories":["shells"],"files":{}}

View file

@ -114,33 +114,28 @@
##
- name: Install intentionally out-of-date package and upgrade it
#
# NOTE: The out-of-date package provided is from the FreeBSD 11 package repo.
# FreeBSD 11 was EOL at the time of writing, 2021-10-08, so this test
# will only run on FreeBSD major versions > 11.
# NOTE: The out-of-date package provided is a minimal,
# no-contents test package that declares zsh with
# a version of 0, so it should always be upgraded.
#
# This test might fail at some point in the
# future if the pkg utility in a FreeBSD version > 14
# makes breaking changes that prevents it from installing
# future if the FreeBSD package format receives
# breaking changes that prevent pkg from installing
# older package formats.
#
# If that occurs, the fix is to replace
# `files/freebsd-release-manifests-20210413__FreeBSD_11.pkg`
# with the version of freebsd-release-manifests from the oldest
# non-breaking release of FreeBSD, update the
# references to it in tasks/main.yml accordingly,
# and update the minimum version number for the test,
# immediately below.
#
when: ansible_distribution_version is version('12.0', '>=')
block:
- name: Copy intentionally out-of-date package to testhost
- name: Copy intentionally out-of-date package manifest to testhost
copy:
src: freebsd-release-manifests-20210413__FreeBSD_11.pkg
src: zsh_test_package_manifests
dest: /tmp/
follow: yes
- name: Force-install out-of-date package
command: pkg add -f /tmp/freebsd-release-manifests-20210413__FreeBSD_11.pkg
- name: Create out-of-date test package
command: tar -C /tmp/zsh_test_package_manifests -cJf /tmp/zsh-0__test.pkg +COMPACT_MANIFEST +MANIFEST
- name: Install out-of-date test package
command: pkg add /tmp/zsh-0__test.pkg
register: pkgng_example4_prepare
- name: Check for any available package upgrades (checkmode)