openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2022
- 1 participants
- 2263 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gnome-boxes for openSUSE:Factory checked in at 2022-12-23 10:21:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-boxes (Old)
and /work/SRC/openSUSE:Factory/.gnome-boxes.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-boxes"
Fri Dec 23 10:21:44 2022 rev:95 rq:1044370 version:43.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-boxes/gnome-boxes.changes 2022-12-13 18:56:16.639462641 +0100
+++ /work/SRC/openSUSE:Factory/.gnome-boxes.new.1563/gnome-boxes.changes 2022-12-23 10:21:52.003605545 +0100
@@ -1,0 +2,8 @@
+Thu Dec 22 20:50:13 UTC 2022 - Bj��rn Lie <bjorn.lie(a)gmail.com>
+
+- Update to version 43.2:
+ + Fix wrong key sent for the tty9 shortcut.
+ + Fix creating VMs from remote disks.
+ + Updated translations.
+
+-------------------------------------------------------------------
Old:
----
gnome-boxes-43.1.tar.xz
New:
----
gnome-boxes-43.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-boxes.spec ++++++
--- /var/tmp/diff_new_pack.5sNSGO/_old 2022-12-23 10:21:52.547608654 +0100
+++ /var/tmp/diff_new_pack.5sNSGO/_new 2022-12-23 10:21:52.555608699 +0100
@@ -20,7 +20,7 @@
%define govf_libver 0_1
%define govf_sover 0.1
Name: gnome-boxes
-Version: 43.1
+Version: 43.2
Release: 0
Summary: A GNOME 3 application to access remote or virtual systems
License: LGPL-2.0-or-later
++++++ gnome-boxes-43.1.tar.xz -> gnome-boxes-43.2.tar.xz ++++++
++++ 8698 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package lollypop for openSUSE:Factory checked in at 2022-12-23 10:21:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lollypop (Old)
and /work/SRC/openSUSE:Factory/.lollypop.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lollypop"
Fri Dec 23 10:21:39 2022 rev:165 rq:1044329 version:1.4.37
Changes:
--------
--- /work/SRC/openSUSE:Factory/lollypop/lollypop.changes 2022-11-15 13:21:40.436877722 +0100
+++ /work/SRC/openSUSE:Factory/.lollypop.new.1563/lollypop.changes 2022-12-23 10:21:47.203578112 +0100
@@ -1,0 +2,8 @@
+Thu Dec 22 19:24:24 UTC 2022 - antoine.belvire(a)opensuse.org
+
+- Update to version 1.4.37:
+ * Bug fixes (glgo#World/lollypop#2970, glgo#World/lollypop#2957,
+ glgo#World/lollypop#2779).
+- Remove lollypop-1.4.36-libsoup3.patch: Fixed upstream.
+
+-------------------------------------------------------------------
Old:
----
lollypop-1.4.36-libsoup3.patch
lollypop-1.4.36.obscpio
New:
----
lollypop-1.4.37.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lollypop.spec ++++++
--- /var/tmp/diff_new_pack.EiOzaT/_old 2022-12-23 10:21:48.511585588 +0100
+++ /var/tmp/diff_new_pack.EiOzaT/_new 2022-12-23 10:21:48.519585634 +0100
@@ -17,15 +17,13 @@
Name: lollypop
-Version: 1.4.36
+Version: 1.4.37
Release: 0
Summary: GNOME music playing application
License: GPL-3.0-or-later
Group: Productivity/Multimedia/Sound/Players
URL: https://wiki.gnome.org/Apps/Lollypop
Source0: %{name}-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM lollypop-1.4.36-libsoup3.patch -- glgo#World/lollypop#2959
-Patch0: lollypop-1.4.36-libsoup3.patch
BuildRequires: desktop-file-utils
BuildRequires: intltool
BuildRequires: itstool
++++++ _service ++++++
--- /var/tmp/diff_new_pack.EiOzaT/_old 2022-12-23 10:21:48.555585839 +0100
+++ /var/tmp/diff_new_pack.EiOzaT/_new 2022-12-23 10:21:48.559585862 +0100
@@ -1,7 +1,7 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="changesgenerate">enable</param>
- <param name="revision">1.4.36</param>
+ <param name="revision">1.4.37</param>
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/World/lollypop.git</param>
<param name="versionformat">@PARENT_TAG@</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.EiOzaT/_old 2022-12-23 10:21:48.579585977 +0100
+++ /var/tmp/diff_new_pack.EiOzaT/_new 2022-12-23 10:21:48.583585999 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.gnome.org/World/lollypop.git</param>
- <param name="changesrevision">e3daa763ef0baa1d8679af8de6175b3d77b74e04</param></service></servicedata>
+ <param name="changesrevision">847c7640b1e1b82170dd8bd81651d518e3446bd4</param></service></servicedata>
(No newline at EOF)
++++++ lollypop-1.4.36.obscpio -> lollypop-1.4.37.obscpio ++++++
++++ 27773 lines of diff (skipped)
++++++ lollypop.obsinfo ++++++
--- /var/tmp/diff_new_pack.EiOzaT/_old 2022-12-23 10:21:48.991588331 +0100
+++ /var/tmp/diff_new_pack.EiOzaT/_new 2022-12-23 10:21:48.995588354 +0100
@@ -1,5 +1,5 @@
name: lollypop
-version: 1.4.36
-mtime: 1668419350
-commit: e3daa763ef0baa1d8679af8de6175b3d77b74e04
+version: 1.4.37
+mtime: 1671701019
+commit: 847c7640b1e1b82170dd8bd81651d518e3446bd4
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gmic for openSUSE:Factory checked in at 2022-12-23 10:21:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gmic (Old)
and /work/SRC/openSUSE:Factory/.gmic.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gmic"
Fri Dec 23 10:21:38 2022 rev:27 rq:1044323 version:3.1.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/gmic/gmic.changes 2022-09-26 18:48:21.520071809 +0200
+++ /work/SRC/openSUSE:Factory/.gmic.new.1563/gmic.changes 2022-12-23 10:21:46.255572695 +0100
@@ -1,0 +2,5 @@
+Mon Dec 19 15:49:41 UTC 2022 - pgajdos(a)suse.com
+
+- GraphicsMagick is not required for build [bsc#1206620]
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gmic.spec ++++++
--- /var/tmp/diff_new_pack.8CfCUa/_old 2022-12-23 10:21:46.775575667 +0100
+++ /var/tmp/diff_new_pack.8CfCUa/_new 2022-12-23 10:21:46.779575690 +0100
@@ -81,7 +81,6 @@
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Xml)
-BuildRequires: pkgconfig(GraphicsMagick++)
BuildRequires: pkgconfig(OpenEXR)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(libcurl)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package chezmoi for openSUSE:Factory checked in at 2022-12-23 10:21:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chezmoi (Old)
and /work/SRC/openSUSE:Factory/.chezmoi.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chezmoi"
Fri Dec 23 10:21:36 2022 rev:8 rq:1044319 version:2.28.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/chezmoi/chezmoi.changes 2022-12-07 17:36:44.073120480 +0100
+++ /work/SRC/openSUSE:Factory/.chezmoi.new.1563/chezmoi.changes 2022-12-23 10:21:44.771564214 +0100
@@ -1,0 +2,9 @@
+Thu Dec 22 17:15:35 UTC 2022 - Filippo Bonazzi <filippo.bonazzi(a)suse.com>
+
+- Update to version 2.28.0:
+ * feat: Add lstat template function
+ * feat: Add --path-style option to managed and unmanaged commands
+ * feat: Add verification of external checksums
+ * chore: Update dependencies
+
+-------------------------------------------------------------------
Old:
----
chezmoi-2.27.3.obscpio
New:
----
chezmoi-2.28.0.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ chezmoi.spec ++++++
--- /var/tmp/diff_new_pack.c7Stzc/_old 2022-12-23 10:21:45.587568877 +0100
+++ /var/tmp/diff_new_pack.c7Stzc/_new 2022-12-23 10:21:45.591568900 +0100
@@ -17,7 +17,7 @@
Name: chezmoi
-Version: 2.27.3
+Version: 2.28.0
Release: 0
Summary: A multi-host manager for dotfiles
License: MIT
++++++ _service ++++++
--- /var/tmp/diff_new_pack.c7Stzc/_old 2022-12-23 10:21:45.635569152 +0100
+++ /var/tmp/diff_new_pack.c7Stzc/_new 2022-12-23 10:21:45.639569174 +0100
@@ -2,7 +2,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/twpayne/chezmoi.git</param>
- <param name="revision">v2.27.3</param>
+ <param name="revision">v2.28.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="changesgenerate">enable</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.c7Stzc/_old 2022-12-23 10:21:45.667569334 +0100
+++ /var/tmp/diff_new_pack.c7Stzc/_new 2022-12-23 10:21:45.671569357 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/twpayne/chezmoi.git</param>
- <param name="changesrevision">feab4e788831e803d84a544739dfb8188245deae</param></service></servicedata>
+ <param name="changesrevision">8e9ed2eee04b708b4d7531863e47b5c5a876050f</param></service></servicedata>
(No newline at EOF)
++++++ chezmoi-2.27.3.obscpio -> chezmoi-2.28.0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/.github/workflows/main.yml new/chezmoi-2.28.0/.github/workflows/main.yml
--- old/chezmoi-2.27.3/.github/workflows/main.yml 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/.github/workflows/main.yml 2022-12-13 21:48:41.000000000 +0100
@@ -10,7 +10,7 @@
- v*
env:
AGE_VERSION: 1.0.0
- GO_VERSION: 1.19.3
+ GO_VERSION: 1.19.4
GOFUMPT_VERSION: 0.4.0
GOLANGCI_LINT_VERSION: 1.50.1
GOVERSIONINFO_VERSION: 1.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/commands/managed.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/commands/managed.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/commands/managed.md 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/commands/managed.md 2022-12-13 21:48:41.000000000 +0100
@@ -4,6 +4,11 @@
alphabetical order. When no *path*s are supplied, list all managed entries in
the destination directory in alphabetical order.
+## `-p`, `--path-style` `absolute`|`relative`
+
+Print paths in the given style. Relative paths are relative to the destination
+directory. The default is `relative`.
+
!!! example
```console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/commands/unmanaged.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/commands/unmanaged.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/commands/unmanaged.md 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/commands/unmanaged.md 2022-12-13 21:48:41.000000000 +0100
@@ -5,6 +5,11 @@
It is an error to supply *path*s that are not found on the filesystem.
+## `-p`, `--path-style` `absolute`|`relative`
+
+Print paths in the given style. Relative paths are relative to the destination
+directory. The default is `relative`.
+
!!! example
```console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/special-files-and-directories/chezmoiexternal-format.md 2022-12-13 21:48:41.000000000 +0100
@@ -35,6 +35,14 @@
| `refreshPeriod` | duration | `0` | Refresh period |
| `stripComponents` | int | `0` | Number of leading directory components to strip from archives |
| `url` | string | *none* | URL |
+| `checksum.sha256` | string | *none* | Expected SHA256 checksum of data |
+| `checksum.sha384` | string | *none* | Expected SHA384 checksum of data |
+| `checksum.sha512` | string | *none* | Expected SHA512 checksum of data |
+| `checksum.size` | int | *none* | Expected size of data |
+
+If any of the optional `checksum.sha256`, `checksum.sha384`, or
+`checksum.sha512` fields are set, chezmoi will verify that the downloaded data
+has the given checksum.
The optional boolean `encrypted` field specifies whether the file or archive is
encrypted.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/target-types.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/target-types.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/target-types.md 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/target-types.md 2022-12-13 21:48:41.000000000 +0100
@@ -161,7 +161,7 @@
If you intend to use PowerShell Core (`pwsh.exe`) as the `.ps1`
interpreter, include the following in your config file:
- ```toml title="~/.confg/chezmoi/chezmoi.toml"
+ ```toml title="~/.config/chezmoi/chezmoi.toml"
[interpreters.ps1]
command = "pwsh"
args = ["-NoLogo"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/templates/functions/lstat.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/templates/functions/lstat.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/templates/functions/lstat.md 1970-01-01 01:00:00.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/templates/functions/lstat.md 2022-12-13 21:48:41.000000000 +0100
@@ -0,0 +1,19 @@
+# `lstat` *name*
+
+`lstat` runs [`os.Lstat`](https://pkg.go.dev/os#File.Lstat) on *name*. If *name*
+exists it returns structured data. If *name* does not exist then it returns a
+false value. If `os.Lstat` returns any other error then it raises an error. The
+structured value returned if *name* exists contains the fields `name`, `size`,
+`mode`, `perm`, `modTime`, `isDir`, and `type`.
+
+`lstat` is not hermetic: its return value depends on the state of the filesystem
+at the moment the template is executed. Exercise caution when using it in your
+templates.
+
+!!! example
+
+ ```
+ {{ if eq (joinPath .chezmoi.homeDir ".xinitrc" | lstat).type "symlink" }}
+ # ~/.xinitrc exists and is a symlink
+ {{ end }}
+ ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/templates/functions/stat.md new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/templates/functions/stat.md
--- old/chezmoi-2.27.3/assets/chezmoi.io/docs/reference/templates/functions/stat.md 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/docs/reference/templates/functions/stat.md 2022-12-13 21:48:41.000000000 +0100
@@ -4,7 +4,7 @@
exists it returns structured data. If *name* does not exist then it returns a
false value. If `os.Stat` returns any other error then it raises an error. The
structured value returned if *name* exists contains the fields `name`, `size`,
-`mode`, `perm`, `modTime`, and `isDir`.
+`mode`, `perm`, `modTime`, `isDir`, and `type`.
`stat` is not hermetic: its return value depends on the state of the filesystem
at the moment the template is executed. Exercise caution when using it in your
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/chezmoi.io/mkdocs.yml new/chezmoi-2.28.0/assets/chezmoi.io/mkdocs.yml
--- old/chezmoi-2.27.3/assets/chezmoi.io/mkdocs.yml 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/chezmoi.io/mkdocs.yml 2022-12-13 21:48:41.000000000 +0100
@@ -187,6 +187,7 @@
- ioreg: reference/templates/functions/ioreg.md
- joinPath: reference/templates/functions/joinPath.md
- lookPath: reference/templates/functions/lookPath.md
+ - lstat: reference/templates/functions/lstat.md
- mozillaInstallHash: reference/templates/functions/mozillaInstallHash.md
- output: reference/templates/functions/output.md
- quoteList: reference/templates/functions/quoteList.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/docker/test.sh new/chezmoi-2.28.0/assets/docker/test.sh
--- old/chezmoi-2.27.3/assets/docker/test.sh 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/docker/test.sh 2022-12-13 21:48:41.000000000 +0100
@@ -4,7 +4,7 @@
cd ../..
for distribution in "$@"; do
- echo ${distribution}
+ echo "${distribution}"
dockerfile="assets/docker/${distribution}.Dockerfile"
if [ ! -f "${dockerfile}" ]; then
echo "${dockerfile} not found"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/assets/vagrant/test.sh new/chezmoi-2.28.0/assets/vagrant/test.sh
--- old/chezmoi-2.27.3/assets/vagrant/test.sh 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/assets/vagrant/test.sh 2022-12-13 21:48:41.000000000 +0100
@@ -3,7 +3,7 @@
set -eufo pipefail
for os in "$@"; do
- echo ${os}
+ echo "${os}"
if [ ! -f "${os}.Vagrantfile" ]; then
echo "${os}.Vagrantfile not found"
exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/go.mod new/chezmoi-2.28.0/go.mod
--- old/chezmoi-2.27.3/go.mod 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/go.mod 2022-12-13 21:48:41.000000000 +0100
@@ -15,8 +15,8 @@
github.com/charmbracelet/glamour v0.6.0
github.com/coreos/go-semver v0.3.0
github.com/fsnotify/fsnotify v1.6.0
- github.com/go-git/go-git/v5 v5.5.0
- github.com/google/go-github/v48 v48.1.0
+ github.com/go-git/go-git/v5 v5.5.1
+ github.com/google/go-github/v48 v48.2.0
github.com/google/renameio/v2 v2.0.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/mitchellh/mapstructure v1.5.0
@@ -37,15 +37,16 @@
github.com/zalando/go-keyring v0.2.1
go.etcd.io/bbolt v1.3.7-0.20220226045046-fd5535f71f48
go.uber.org/multierr v1.8.0
- golang.org/x/exp v0.0.0-20221204150635-6dcec336b2bb
- golang.org/x/oauth2 v0.2.0
+ golang.org/x/crypto v0.4.0
+ golang.org/x/exp v0.0.0-20221211140036-ad323defaf05
+ golang.org/x/oauth2 v0.3.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.3.0
- golang.org/x/term v0.2.0
+ golang.org/x/term v0.3.0
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v3 v3.0.1
howett.net/plist v1.0.0
- mvdan.cc/sh/v3 v3.5.1
+ mvdan.cc/sh/v3 v3.6.0
)
require (
@@ -116,11 +117,10 @@
github.com/yuin/goldmark v1.5.3 // indirect
github.com/yuin/goldmark-emoji v1.0.1 // indirect
go.uber.org/atomic v1.10.0 // indirect
- golang.org/x/crypto v0.3.0 // indirect
golang.org/x/mod v0.7.0 // indirect
- golang.org/x/net v0.2.0 // indirect
+ golang.org/x/net v0.4.0 // indirect
golang.org/x/text v0.5.0 // indirect
- golang.org/x/tools v0.3.0 // indirect
+ golang.org/x/tools v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/go.sum new/chezmoi-2.28.0/go.sum
--- old/chezmoi-2.27.3/go.sum 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/go.sum 2022-12-13 21:48:41.000000000 +0100
@@ -88,7 +88,7 @@
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
+github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg=
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
@@ -100,7 +100,7 @@
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
-github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
+github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
@@ -111,8 +111,8 @@
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ=
github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
-github.com/go-git/go-git/v5 v5.5.0 h1:StO/ASRvk1Pp74tr7XQ0pQwKlCFignzzTF/NLKdQzUE=
-github.com/go-git/go-git/v5 v5.5.0/go.mod h1:g456XI30HAdt7GQtIf8JR6GDAdULGaR4KtfFtQa0uTg=
+github.com/go-git/go-git/v5 v5.5.1 h1:5vtv2TB5PM/gPM+EvsHJ16hJh4uAkdGcKilcwY7FYwo=
+github.com/go-git/go-git/v5 v5.5.1/go.mod h1:uz5PQ3d0gz7mSgzZhSJToM6ALPaKCdSnl58/Xb5hzr8=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
@@ -129,11 +129,10 @@
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-github/v48 v48.1.0 h1:nqPqq+0oRY2AMR/SRskGrrP4nnewPB7e/m2+kbT/UvM=
-github.com/google/go-github/v48 v48.1.0/go.mod h1:dDlehKBDo850ZPvCTK0sEqTCVWcrGl2LcDiajkYi89Y=
+github.com/google/go-github/v48 v48.2.0 h1:68puzySE6WqUY9KWmpOsDEQfDZsso98rT6pZcz9HqcE=
+github.com/google/go-github/v48 v48.2.0/go.mod h1:dDlehKBDo850ZPvCTK0sEqTCVWcrGl2LcDiajkYi89Y=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
-github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU=
github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg=
github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -165,7 +164,7 @@
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
@@ -224,7 +223,6 @@
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
-github.com/pjbgf/sha1cd v0.2.0/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M=
github.com/pjbgf/sha1cd v0.2.3 h1:uKQP/7QOzNtKYH7UTohZLcjF5/55EnTw0jO/Ru4jZwI=
github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=
@@ -288,7 +286,6 @@
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 h1:+dBg5k7nuTE38VVdoroRsT0Z88fmvdYrI2EjzJst35I=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1/go.mod h1:nmuySobZb4kFgFy6BptpXp/BBw+xFSyvVPP6auoJB4k=
-github.com/xanzy/ssh-agent v0.3.2/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -312,10 +309,11 @@
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
-golang.org/x/exp v0.0.0-20221204150635-6dcec336b2bb h1:QIsP/NmClBICkqnJ4rSIhnrGiGR7Yv9ZORGGnmmLTPk=
-golang.org/x/exp v0.0.0-20221204150635-6dcec336b2bb/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
+golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
+golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
+golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 h1:T8EldfGCcveFMewH5xAYxxoX3PSQMrsechlUGVFlQBU=
+golang.org/x/exp v0.0.0-20221211140036-ad323defaf05/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
@@ -326,10 +324,11 @@
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
-golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
-golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU=
-golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
+golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8=
+golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
@@ -362,8 +361,9 @@
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
+golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
+golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -375,11 +375,11 @@
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM=
-golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
+golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4=
+golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
@@ -391,7 +391,6 @@
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
@@ -412,5 +411,5 @@
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
mvdan.cc/editorconfig v0.2.0 h1:XL+7ys6ls/RKrkUNFQvEwIvNHh+JKx8Mj1pUV5wQxQE=
-mvdan.cc/sh/v3 v3.5.1 h1:hmP3UOw4f+EYexsJjFxvU38+kn+V/s2CclXHanIBkmQ=
-mvdan.cc/sh/v3 v3.5.1/go.mod h1:1JcoyAKm1lZw/2bZje/iYKWicU/KMd0rsyJeKHnsK4E=
+mvdan.cc/sh/v3 v3.6.0 h1:gtva4EXJ0dFNvl5bHjcUEvws+KRcDslT8VKheTYkbGU=
+mvdan.cc/sh/v3 v3.6.0/go.mod h1:U4mhtBLZ32iWhif5/lD+ygy1zrgaQhUu+XFy7C8+TTA=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/chezmoi/chezmoi.go new/chezmoi-2.28.0/pkg/chezmoi/chezmoi.go
--- old/chezmoi-2.27.3/pkg/chezmoi/chezmoi.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/chezmoi/chezmoi.go 2022-12-13 21:48:41.000000000 +0100
@@ -4,7 +4,10 @@
import (
"bufio"
"bytes"
+ "crypto/md5" //nolint:gosec
+ "crypto/sha1" //nolint:gosec
"crypto/sha256"
+ "crypto/sha512"
"fmt"
"io"
"io/fs"
@@ -17,6 +20,7 @@
"github.com/spf13/cobra"
vfs "github.com/twpayne/go-vfs/v4"
+ "golang.org/x/crypto/ripemd160" //nolint:staticcheck
"golang.org/x/exp/constraints"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
@@ -115,7 +119,7 @@
"chezmoistate.boltdb",
)
-var modeTypeNames = map[fs.FileMode]string{
+var FileModeTypeNames = map[fs.FileMode]string{
0: "file",
fs.ModeDir: "dir",
fs.ModeSymlink: "symlink",
@@ -295,9 +299,15 @@
return len(bytes.TrimSpace(data)) == 0
}
+// md5Sum returns the MD5 sum of data.
+func md5Sum(data []byte) []byte {
+ md5SumArr := md5.Sum(data) //nolint:gosec
+ return md5SumArr[:]
+}
+
// modeTypeName returns a string representation of mode.
func modeTypeName(mode fs.FileMode) string {
- if name, ok := modeTypeNames[mode.Type()]; ok {
+ if name, ok := FileModeTypeNames[mode.Type()]; ok {
return name
}
return fmt.Sprintf("0o%o: unknown type", mode.Type())
@@ -321,6 +331,29 @@
return s[:len(s)-len(suffix)]
}
+// ripemd160Sum returns the RIPEMD-160 sum of data.
+func ripemd160Sum(data []byte) []byte {
+ return ripemd160.New().Sum(data)
+}
+
+// sha1Sum returns the SHA1 sum of data.
+func sha1Sum(data []byte) []byte {
+ sha1SumArr := sha1.Sum(data) //nolint:gosec
+ return sha1SumArr[:]
+}
+
+// sha384Sum returns the SHA384 sum of data.
+func sha384Sum(data []byte) []byte {
+ sha384SumArr := sha512.Sum384(data)
+ return sha384SumArr[:]
+}
+
+// sha512Sum returns the SHA512 sum of data.
+func sha512Sum(data []byte) []byte {
+ sha512SumArr := sha512.Sum512(data)
+ return sha512SumArr[:]
+}
+
// sortedKeys returns the keys of V in order.
func sortedKeys[K constraints.Ordered, V any](m map[K]V) []K {
keys := maps.Keys(m)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/chezmoi/sourcestate.go new/chezmoi-2.28.0/pkg/chezmoi/sourcestate.go
--- old/chezmoi-2.27.3/pkg/chezmoi/sourcestate.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/chezmoi/sourcestate.go 2022-12-13 21:48:41.000000000 +0100
@@ -59,7 +59,16 @@
Encrypted bool `json:"encrypted" toml:"encrypted" yaml:"encrypted"`
Exact bool `json:"exact" toml:"exact" yaml:"exact"`
Executable bool `json:"executable" toml:"executable" yaml:"executable"`
- Clone struct {
+ Checksum struct {
+ MD5 HexBytes `json:"md5" toml:"md5" yaml:"md5"`
+ RIPEMD160 HexBytes `json:"ripemd160" toml:"ripemd160" yaml:"ripemd160"`
+ SHA1 HexBytes `json:"sha1" toml:"sha1" yaml:"sha1"`
+ SHA256 HexBytes `json:"sha256" toml:"sha256" yaml:"sha256"`
+ SHA384 HexBytes `json:"sha384" toml:"sha384" yaml:"sha384"`
+ SHA512 HexBytes `json:"sha512" toml:"sha512" yaml:"sha512"`
+ Size int `json:"size" toml:"size" yaml:"size"`
+ } `json:"checksum" toml:"checksum" yaml:"checksum"`
+ Clone struct {
Args []string `json:"args" toml:"args" yaml:"args"`
} `json:"clone" toml:"clone" yaml:"clone"`
Exclude []string `json:"exclude" toml:"exclude" yaml:"exclude"`
@@ -1371,6 +1380,59 @@
return nil, err
}
+ if external.Checksum.Size != 0 {
+ if len(data) != external.Checksum.Size {
+ err = multierr.Append(err, fmt.Errorf("size mismatch: expected %d, got %d",
+ external.Checksum.Size, len(data)))
+ }
+ }
+
+ if external.Checksum.MD5 != nil {
+ if gotMD5Sum := md5Sum(data); !bytes.Equal(gotMD5Sum, external.Checksum.MD5) {
+ err = multierr.Append(err, fmt.Errorf("MD5 mismatch: expected %s, got %s",
+ external.Checksum.MD5, hex.EncodeToString(gotMD5Sum)))
+ }
+ }
+
+ if external.Checksum.RIPEMD160 != nil {
+ if gotRIPEMD160Sum := ripemd160Sum(data); !bytes.Equal(gotRIPEMD160Sum, external.Checksum.RIPEMD160) {
+ err = multierr.Append(err, fmt.Errorf("RIPEMD-160 mismatch: expected %s, got %s",
+ external.Checksum.RIPEMD160, hex.EncodeToString(gotRIPEMD160Sum)))
+ }
+ }
+
+ if external.Checksum.SHA1 != nil {
+ if gotSHA1Sum := sha1Sum(data); !bytes.Equal(gotSHA1Sum, external.Checksum.SHA1) {
+ err = multierr.Append(err, fmt.Errorf("SHA1 mismatch: expected %s, got %s",
+ external.Checksum.SHA1, hex.EncodeToString(gotSHA1Sum)))
+ }
+ }
+
+ if external.Checksum.SHA256 != nil {
+ if gotSHA256Sum := SHA256Sum(data); !bytes.Equal(gotSHA256Sum, external.Checksum.SHA256) {
+ err = multierr.Append(err, fmt.Errorf("SHA256 mismatch: expected %s, got %s",
+ external.Checksum.SHA256, hex.EncodeToString(gotSHA256Sum)))
+ }
+ }
+
+ if external.Checksum.SHA384 != nil {
+ if gotSHA384Sum := sha384Sum(data); !bytes.Equal(gotSHA384Sum, external.Checksum.SHA384) {
+ err = multierr.Append(err, fmt.Errorf("SHA384 mismatch: expected %s, got %s",
+ external.Checksum.SHA384, hex.EncodeToString(gotSHA384Sum)))
+ }
+ }
+
+ if external.Checksum.SHA512 != nil {
+ if gotSHA512Sum := sha512Sum(data); !bytes.Equal(gotSHA512Sum, external.Checksum.SHA512) {
+ err = multierr.Append(err, fmt.Errorf("SHA512 mismatch: expected %s, got %s",
+ external.Checksum.SHA512, hex.EncodeToString(gotSHA512Sum)))
+ }
+ }
+
+ if err != nil {
+ return nil, fmt.Errorf("%s: %w", externalRelPath, err)
+ }
+
if external.Encrypted {
data, err = s.encryption.Decrypt(data)
if err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/config.go new/chezmoi-2.28.0/pkg/cmd/config.go
--- old/chezmoi-2.27.3/pkg/cmd/config.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/config.go 2022-12-13 21:48:41.000000000 +0100
@@ -168,6 +168,7 @@
remove removeCmdConfig
secret secretCmdConfig
state stateCmdConfig
+ unmanaged unmanagedCmdConfig
upgrade upgradeCmdConfig
// Version information.
@@ -307,7 +308,8 @@
recurseSubmodules: true,
},
managed: managedCmdConfig{
- filter: chezmoi.NewEntryTypeFilter(chezmoi.EntryTypesAll, chezmoi.EntryTypesNone),
+ filter: chezmoi.NewEntryTypeFilter(chezmoi.EntryTypesAll, chezmoi.EntryTypesNone),
+ pathStyle: pathStyleRelative,
},
mergeAll: mergeAllCmdConfig{
recursive: true,
@@ -315,6 +317,9 @@
reAdd: reAddCmdConfig{
filter: chezmoi.NewEntryTypeFilter(chezmoi.EntryTypesAll, chezmoi.EntryTypesNone),
},
+ unmanaged: unmanagedCmdConfig{
+ pathStyle: pathStyleRelative,
+ },
upgrade: upgradeCmdConfig{
owner: gitHubOwner,
repo: gitHubRepo,
@@ -369,6 +374,7 @@
"lastpass": c.lastpassTemplateFunc,
"lastpassRaw": c.lastpassRawTemplateFunc,
"lookPath": c.lookPathTemplateFunc,
+ "lstat": c.lstatTemplateFunc,
"mozillaInstallHash": c.mozillaInstallHashTemplateFunc,
"onepassword": c.onepasswordTemplateFunc,
"onepasswordDetailsFields": c.onepasswordDetailsFieldsTemplateFunc,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/managedcmd.go new/chezmoi-2.28.0/pkg/cmd/managedcmd.go
--- old/chezmoi-2.27.3/pkg/cmd/managedcmd.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/managedcmd.go 2022-12-13 21:48:41.000000000 +0100
@@ -11,7 +11,8 @@
)
type managedCmdConfig struct {
- filter *chezmoi.EntryTypeFilter
+ filter *chezmoi.EntryTypeFilter
+ pathStyle pathStyle
}
func (c *Config) newManagedCmd() *cobra.Command {
@@ -28,8 +29,12 @@
flags := managedCmd.Flags()
flags.VarP(c.managed.filter.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(c.managed.filter.Include, "include", "i", "Include entry types")
+ flags.VarP(&c.managed.pathStyle, "path-style", "p", "Path style")
registerExcludeIncludeFlagCompletionFuncs(managedCmd)
+ if err := managedCmd.RegisterFlagCompletionFunc("path-style", pathStyleFlagCompletionFunc); err != nil {
+ panic(err)
+ }
return managedCmd
}
@@ -83,7 +88,12 @@
sort.Sort(targetRelPaths)
builder := strings.Builder{}
for _, targetRelPath := range targetRelPaths {
- fmt.Fprintln(&builder, targetRelPath)
+ switch c.managed.pathStyle {
+ case pathStyleAbsolute:
+ fmt.Fprintln(&builder, c.DestDirAbsPath.Join(targetRelPath))
+ case pathStyleRelative:
+ fmt.Fprintln(&builder, targetRelPath)
+ }
}
return c.writeOutputString(builder.String())
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/pathstyle.go new/chezmoi-2.28.0/pkg/cmd/pathstyle.go
--- old/chezmoi-2.27.3/pkg/cmd/pathstyle.go 1970-01-01 01:00:00.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/pathstyle.go 2022-12-13 21:48:41.000000000 +0100
@@ -0,0 +1,43 @@
+package cmd
+
+import (
+ "fmt"
+
+ "github.com/twpayne/chezmoi/v2/pkg/chezmoi"
+)
+
+type pathStyle string
+
+const (
+ pathStyleAbsolute pathStyle = "absolute"
+ pathStyleRelative pathStyle = "relative"
+)
+
+var (
+ pathStyleStrings = []string{
+ pathStyleAbsolute.String(),
+ pathStyleRelative.String(),
+ }
+
+ pathStyleFlagCompletionFunc = chezmoi.FlagCompletionFunc(pathStyleStrings)
+)
+
+// Set implements github.com/spf13/pflag.Value.Set.
+func (p *pathStyle) Set(s string) error {
+ uniqueAbbreviations := chezmoi.UniqueAbbreviations(pathStyleStrings)
+ pathStyleStr, ok := uniqueAbbreviations[s]
+ if !ok {
+ return fmt.Errorf("%s: unknown path style", s)
+ }
+ *p = pathStyle(pathStyleStr)
+ return nil
+}
+
+func (p pathStyle) String() string {
+ return string(p)
+}
+
+// Type implements github.com/spf13/pflag.Value.Type.
+func (p pathStyle) Type() string {
+ return "absolute|relative"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/templatefuncs.go new/chezmoi-2.28.0/pkg/cmd/templatefuncs.go
--- old/chezmoi-2.27.3/pkg/cmd/templatefuncs.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/templatefuncs.go 2022-12-13 21:48:41.000000000 +0100
@@ -245,6 +245,17 @@
}
}
+func (c *Config) lstatTemplateFunc(name string) any {
+ switch fileInfo, err := c.fileSystem.Lstat(name); {
+ case err == nil:
+ return fileInfoToMap(fileInfo)
+ case errors.Is(err, fs.ErrNotExist):
+ return nil
+ default:
+ panic(err)
+ }
+}
+
func (c *Config) mozillaInstallHashTemplateFunc(path string) string {
mozillaInstallHash, err := mozillainstallhash.MozillaInstallHash(path)
if err != nil {
@@ -345,14 +356,7 @@
func (c *Config) statTemplateFunc(name string) any {
switch fileInfo, err := c.fileSystem.Stat(name); {
case err == nil:
- return map[string]any{
- "name": fileInfo.Name(),
- "size": fileInfo.Size(),
- "mode": int(fileInfo.Mode()),
- "perm": int(fileInfo.Mode().Perm()),
- "modTime": fileInfo.ModTime().Unix(),
- "isDir": fileInfo.IsDir(),
- }
+ return fileInfoToMap(fileInfo)
case errors.Is(err, fs.ErrNotExist):
return nil
default:
@@ -384,6 +388,18 @@
return string(yaml)
}
+func fileInfoToMap(fileInfo fs.FileInfo) map[string]any {
+ return map[string]any{
+ "name": fileInfo.Name(),
+ "size": fileInfo.Size(),
+ "mode": int(fileInfo.Mode()),
+ "perm": int(fileInfo.Mode().Perm()),
+ "modTime": fileInfo.ModTime().Unix(),
+ "isDir": fileInfo.IsDir(),
+ "type": chezmoi.FileModeTypeNames[fileInfo.Mode()&fs.ModeType],
+ }
+}
+
func iniFileToMap(file *ini.File) map[string]any {
m := make(map[string]any)
for _, section := range file.Sections() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/external.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/external.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/external.txtar 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/external.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -84,6 +84,19 @@
# test that duplicate equivalent directories are allowed
exec chezmoi apply --force
+chhome home10/user
+
+# test that checksums are verified
+exec chezmoi apply --force
+cp $HOME/.file golden/.file
+
+chhome home11/user
+
+# test that checksums detect corrupt files
+! exec chezmoi apply --force
+stderr 'MD5 mismatch'
+stderr 'SHA256 mismatch'
+
-- archive/dir/file --
# contents of dir/file
-- golden/.file --
@@ -99,6 +112,24 @@
[".file"]
type = "file"
url = "{{ env "HTTPD_URL" }}/.file"
+-- home10/user/.local/share/chezmoi/.chezmoiexternal.yaml --
+.file:
+ type: file
+ url: {{ env "HTTPD_URL" }}/.file
+ checksum:
+ size: 20
+ md5: 49fe9018f97349cdd0a0ac7b7f668b05
+ ripemd160: 2320636f6e74656e7473206f66202e66696c650a9c1185a5c5e9fc54612808977ee8f548b2258d31
+ sha1: cb91d72dc73f6d984b33ac5745f1cf6f76745bd2
+ sha256: 634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663
+ sha384: f8545bb66433eb514727bbc61c4e4939c436d38079767f39f12b8803d6472ca1dfcd101675b20cd525f7e3d02c368b61
+ sha512: a68814ec3d16e8bd28c9291bbc596f0282687c5ba5d1f4c26c4e427166666a03c11df1dab3577b4483142764c37d4887def77244c4a52cb9852a234fa8cb15ba
+-- home11/user/.local/share/chezmoi/.chezmoiexternal.toml --
+[".file"]
+ type = "file"
+ url = "{{ env "HTTPD_URL" }}/.corrupt-file"
+ checksum.md5 = "49fe9018f97349cdd0a0ac7b7f668b05"
+ checksum.sha256 = "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663"
-- home2/user/.local/share/chezmoi/.chezmoiexternal.toml --
[".file"]
type = "file"
@@ -157,5 +188,7 @@
stripComponents = 1
-- home9/user/.local/share/chezmoi/dot_dir/file2 --
# contents of .dir/file2
+-- www/.corrupt-file --
+# corrupt contents of .file
-- www/.file --
# contents of .file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2427.txt new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2427.txt
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2427.txt 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2427.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-symlink archive/dir/symlink -> file
-exec tar czf www/archive.tar.gz archive
-
-httpd www
-
-# test that chezmoi managed lists all targets
-exec chezmoi managed
-cmp stdout golden/managed
-
-# test that chezmoi managed --include=encrypted lists encrypted files only
-exec chezmoi managed --include=encrypted
-cmp stdout golden/managed-encrypted
-
-# test that chezmoi managed --include=externals lists external targets only
-exec chezmoi managed --include=externals
-cmp stdout golden/managed-externals
-
--- archive/dir/file --
-# contents of dir/file
--- golden/managed --
-.dir
-.dir/dir
-.dir/dir/file
-.dir/dir/symlink
-.encrypted
-.file
--- golden/managed-encrypted --
-.encrypted
--- golden/managed-externals --
-.dir
-.dir/dir
-.dir/dir/file
-.dir/dir/symlink
--- home/user/.config/chezmoi/chezmoi.toml --
-encryption = "gpg"
--- home/user/.local/share/chezmoi/.chezmoiexternal.yaml --
-.dir:
- type: archive
- url: {{ env "HTTPD_URL" }}/archive.tar.gz
- stripComponents: 1
--- home/user/.local/share/chezmoi/dot_file --
--- home/user/.local/share/chezmoi/encrypted_dot_encrypted.asc --
--- www/.file --
-# contents of .file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2427.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2427.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2427.txtar 1970-01-01 01:00:00.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2427.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -0,0 +1,44 @@
+symlink archive/dir/symlink -> file
+exec tar czf www/archive.tar.gz archive
+
+httpd www
+
+# test that chezmoi managed lists all targets
+exec chezmoi managed
+cmp stdout golden/managed
+
+# test that chezmoi managed --include=encrypted lists encrypted files only
+exec chezmoi managed --include=encrypted
+cmp stdout golden/managed-encrypted
+
+# test that chezmoi managed --include=externals lists external targets only
+exec chezmoi managed --include=externals
+cmp stdout golden/managed-externals
+
+-- archive/dir/file --
+# contents of dir/file
+-- golden/managed --
+.dir
+.dir/dir
+.dir/dir/file
+.dir/dir/symlink
+.encrypted
+.file
+-- golden/managed-encrypted --
+.encrypted
+-- golden/managed-externals --
+.dir
+.dir/dir
+.dir/dir/file
+.dir/dir/symlink
+-- home/user/.config/chezmoi/chezmoi.toml --
+encryption = "gpg"
+-- home/user/.local/share/chezmoi/.chezmoiexternal.yaml --
+.dir:
+ type: archive
+ url: {{ env "HTTPD_URL" }}/archive.tar.gz
+ stripComponents: 1
+-- home/user/.local/share/chezmoi/dot_file --
+-- home/user/.local/share/chezmoi/encrypted_dot_encrypted.asc --
+-- www/.file --
+# contents of .file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2573.txt new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2573.txt
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2573.txt 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2573.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-[windows] skip 'UNIX only'
-chmod 755 bin/diff
-
-# test that chezmoi apply --verbose with an external diff command and dirs excluded does not run the diff command when a directory is removed
-exec chezmoi apply --verbose
-! stdout diff
-
--- bin/diff --
-#!/bin/sh
-
-echo diff $*
--- home/user/.config/chezmoi/chezmoi.toml --
-[diff]
- command = "diff"
- exclude = ["dirs"]
--- home/user/.dir/subdir/.keep --
--- home/user/.local/share/chezmoi/exact_dot_dir/.keep --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2573.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2573.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2573.txtar 1970-01-01 01:00:00.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2573.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -0,0 +1,17 @@
+[windows] skip 'UNIX only'
+chmod 755 bin/diff
+
+# test that chezmoi apply --verbose with an external diff command and dirs excluded does not run the diff command when a directory is removed
+exec chezmoi apply --verbose
+! stdout diff
+
+-- bin/diff --
+#!/bin/sh
+
+echo diff $*
+-- home/user/.config/chezmoi/chezmoi.toml --
+[diff]
+ command = "diff"
+ exclude = ["dirs"]
+-- home/user/.dir/subdir/.keep --
+-- home/user/.local/share/chezmoi/exact_dot_dir/.keep --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2577.txt new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2577.txt
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2577.txt 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2577.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-[windows] skip 'UNIX only'
-chmod 755 bin/fossil
-
-# test that chezmoi update runs a custom update command and applies changes
-exec chezmoi update
-cmp $HOME/.file golden/.file
-
--- bin/fossil --
-#!/bin/sh
-
-case "$*" in
-"update")
- echo "# contents of .file" > dot_file
- ;;
-*)
- echo fossil: unknown command: $*
- echo fossil: use "help" for more information
- exit 1
- ;;
-esac
--- golden/.file --
-# contents of .file
--- home/user/.config/chezmoi/chezmoi.toml --
-[update]
- command = "fossil"
- args = ["update"]
--- home/user/.local/share/chezmoi/.keep --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2577.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2577.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/issue2577.txtar 1970-01-01 01:00:00.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/issue2577.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -0,0 +1,27 @@
+[windows] skip 'UNIX only'
+chmod 755 bin/fossil
+
+# test that chezmoi update runs a custom update command and applies changes
+exec chezmoi update
+cmp $HOME/.file golden/.file
+
+-- bin/fossil --
+#!/bin/sh
+
+case "$*" in
+"update")
+ echo "# contents of .file" > dot_file
+ ;;
+*)
+ echo fossil: unknown command: $*
+ echo fossil: use "help" for more information
+ exit 1
+ ;;
+esac
+-- golden/.file --
+# contents of .file
+-- home/user/.config/chezmoi/chezmoi.toml --
+[update]
+ command = "fossil"
+ args = ["update"]
+-- home/user/.local/share/chezmoi/.keep --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/managed.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/managed.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/managed.txtar 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/managed.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -60,6 +60,10 @@
exec chezmoi managed $HOME${/}.dir $HOME${/}.non-exist
cmp stdout golden/managed-with-absent-args
+# test chezmoi managed --path-style=absolute
+[!windows] exec chezmoi managed --path-style=absolute
+[!windows] cmpenv stdout golden/managed-absolute
+
chhome home2/user
# test that chezmoi managed does not evaluate templates
@@ -81,6 +85,21 @@
.remove
.symlink
.template
+-- golden/managed-absolute --
+$WORK/home/user/.create
+$WORK/home/user/.dir
+$WORK/home/user/.dir/file
+$WORK/home/user/.dir/subdir
+$WORK/home/user/.dir/subdir/file
+$WORK/home/user/.empty
+$WORK/home/user/.encrypted
+$WORK/home/user/.executable
+$WORK/home/user/.file
+$WORK/home/user/.private
+$WORK/home/user/.readonly
+$WORK/home/user/.remove
+$WORK/home/user/.symlink
+$WORK/home/user/.template
-- golden/managed-exclude-encrypted --
.create
.dir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/templatefuncs.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/templatefuncs.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/templatefuncs.txtar 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/templatefuncs.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -3,6 +3,8 @@
[!windows] chmod 755 bin/ioreg
[windows] unix2dos bin/chezmoi-output-test.cmd
+symlink $HOME/symlink -> dir
+
# test comment template function
exec chezmoi execute-template '{{ "line1\nline2" | comment "# " }}'
rmfinalnewline golden/comment
@@ -52,6 +54,10 @@
exec chezmoi execute-template '{{ lookPath "/non-existing-file" }}'
! stdout .
+# test lstat template function
+exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | lstat).type }}'
+stdout ^symlink$
+
# test mozillaInstallHash template function
exec chezmoi execute-template '{{ mozillaInstallHash "/Applications/Firefox.app/Contents/MacOS" }}'
stdout 2656FF1E876E9973
@@ -79,7 +85,7 @@
cmp stdout golden/toIni
# test stat template function
-exec chezmoi execute-template '{{ (stat ".").isDir }}'
+exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | stat).isDir }}'
stdout true
# test that the output template function returns a command's output
@@ -187,5 +193,6 @@
chezmoi:template:left-delimiter=[[ right-delimiter=]]
[[ . ]]
-- home/user/.local/share/chezmoi/template --
+-- home/user/dir/.keep --
-- home/user/file1.txt --
-- home/user/file2.txt --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/unmanaged.txtar new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/unmanaged.txtar
--- old/chezmoi-2.27.3/pkg/cmd/testdata/scripts/unmanaged.txtar 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/testdata/scripts/unmanaged.txtar 2022-12-13 21:48:41.000000000 +0100
@@ -27,8 +27,16 @@
# test that chezmoi unmanaged with absent paths should fail
! exec chezmoi unmanaged $HOME${/}absent-path
+# test chezmoi unmanaged --path-style=absolute
+[!windows] exec chezmoi unmanaged --path-style=absolute
+[!windows] cmpenv stdout golden/unmanaged-absolute
+
-- golden/unmanaged --
.local
+-- golden/unmanaged-absolute --
+$WORK/home/user/.dir
+$WORK/home/user/.file
+$WORK/home/user/.local
-- golden/unmanaged-dir --
.dir
.local
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.3/pkg/cmd/unmanagedcmd.go new/chezmoi-2.28.0/pkg/cmd/unmanagedcmd.go
--- old/chezmoi-2.27.3/pkg/cmd/unmanagedcmd.go 2022-12-05 00:47:57.000000000 +0100
+++ new/chezmoi-2.28.0/pkg/cmd/unmanagedcmd.go 2022-12-13 21:48:41.000000000 +0100
@@ -1,6 +1,7 @@
package cmd
import (
+ "fmt"
"io/fs"
"sort"
"strings"
@@ -12,6 +13,10 @@
"github.com/twpayne/chezmoi/v2/pkg/chezmoi"
)
+type unmanagedCmdConfig struct {
+ pathStyle pathStyle
+}
+
func (c *Config) newUnmanagedCmd() *cobra.Command {
unmanagedCmd := &cobra.Command{
Use: "unmanaged [path]...",
@@ -22,6 +27,13 @@
RunE: c.makeRunEWithSourceState(c.runUnmanagedCmd),
}
+ flags := unmanagedCmd.Flags()
+ flags.VarP(&c.unmanaged.pathStyle, "path-style", "p", "Path style")
+
+ if err := unmanagedCmd.RegisterFlagCompletionFunc("path-style", pathStyleFlagCompletionFunc); err != nil {
+ panic(err)
+ }
+
return unmanagedCmd
}
@@ -76,8 +88,12 @@
sortedRelPaths := chezmoi.RelPaths(maps.Keys(unmanagedRelPaths))
sort.Sort(sortedRelPaths)
for _, relPath := range sortedRelPaths {
- builder.WriteString(relPath.String())
- builder.WriteByte('\n')
+ switch c.unmanaged.pathStyle {
+ case pathStyleAbsolute:
+ fmt.Fprintln(&builder, c.DestDirAbsPath.Join(relPath))
+ case pathStyleRelative:
+ fmt.Fprintln(&builder, relPath)
+ }
}
return c.writeOutputString(builder.String())
}
++++++ chezmoi.obsinfo ++++++
--- /var/tmp/diff_new_pack.c7Stzc/_old 2022-12-23 10:21:46.055571552 +0100
+++ /var/tmp/diff_new_pack.c7Stzc/_new 2022-12-23 10:21:46.063571597 +0100
@@ -1,5 +1,5 @@
name: chezmoi
-version: 2.27.3
-mtime: 1670197677
-commit: feab4e788831e803d84a544739dfb8188245deae
+version: 2.28.0
+mtime: 1670964521
+commit: 8e9ed2eee04b708b4d7531863e47b5c5a876050f
++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/chezmoi/vendor.tar.gz /work/SRC/openSUSE:Factory/.chezmoi.new.1563/vendor.tar.gz differ: char 5, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gama for openSUSE:Factory checked in at 2022-12-23 10:21:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gama (Old)
and /work/SRC/openSUSE:Factory/.gama.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gama"
Fri Dec 23 10:21:32 2022 rev:26 rq:1044298 version:2.23
Changes:
--------
--- /work/SRC/openSUSE:Factory/gama/gama.changes 2022-09-05 21:21:43.681089479 +0200
+++ /work/SRC/openSUSE:Factory/.gama.new.1563/gama.changes 2022-12-23 10:21:41.255544120 +0100
@@ -1,0 +2,10 @@
+Thu Dec 22 12:53:12 UTC 2022 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 2.23:
+ * Fixed the bug in gama-local reading sqlite3 database. The bug was
+ introduced after version 2.10 when testing shell scripts were
+ updated to be generated from templates .sh_ files (testing
+ templates .sh_ use symbolic names like @INPUT_FILES@ or $RES etc).
+ * More readeable output format in check_xml_coordinates.cpp test.
+
+-------------------------------------------------------------------
Old:
----
gama-2.22.tar.gz
gama-2.22.tar.gz.sig
New:
----
gama-2.23.tar.gz
gama-2.23.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gama.spec ++++++
--- /var/tmp/diff_new_pack.DiHuit/_old 2022-12-23 10:21:42.303550109 +0100
+++ /var/tmp/diff_new_pack.DiHuit/_new 2022-12-23 10:21:42.311550155 +0100
@@ -17,7 +17,7 @@
Name: gama
-Version: 2.22
+Version: 2.23
Release: 0
Summary: Adjustment of geodetic networks
License: GPL-3.0-or-later
++++++ gama-2.22.tar.gz -> gama-2.23.tar.gz ++++++
/work/SRC/openSUSE:Factory/gama/gama-2.22.tar.gz /work/SRC/openSUSE:Factory/.gama.new.1563/gama-2.23.tar.gz differ: char 91, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-photutils for openSUSE:Factory checked in at 2022-12-23 10:21:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-photutils (Old)
and /work/SRC/openSUSE:Factory/.python-photutils.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-photutils"
Fri Dec 23 10:21:31 2022 rev:18 rq:1044300 version:1.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-photutils/python-photutils.changes 2022-08-02 22:09:21.285800653 +0200
+++ /work/SRC/openSUSE:Factory/.python-photutils.new.1563/python-photutils.changes 2022-12-23 10:21:39.587534587 +0100
@@ -1,0 +2,95 @@
+Thu Dec 22 15:05:47 UTC 2022 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 1.6.0
+ ## General
+ * Following NEP 29, the minimum required Numpy is now 1.20.
+ [#1442]
+ * The minimum required Matplotlib is now 3.3.0. [#1442]
+ * The minimum required scikit-image is now 0.18.0. [#1442]
+ * The minimum required scikit-learn is now 1.0. [#1442]
+ ## New Features
+ ### photutils.aperture
+ * The ApertureStats class now accepts astropy NDData objects as
+ input. [#1409]
+ * Improved the performance of aperture photometry by 10-25%
+ (depending on the number of aperture positions). [#1438]
+ ### photutils.psf
+ * Added a progress bar for fitting PSF photometry [#1426]
+ * Added a subshape keyword to the PSF-fitting classes to define
+ the shape over which the PSF is subtracted. [#1477]
+ ### photutils.segmentation
+ * Added the ability to slice SegmentationImage objects. [#1413]
+ * Added mode and fill_value keywords to SourceCatalog
+ make_cutouts method. [#1420]
+ * Added segment_area source property and wcs, localbkg_width,
+ apermask_method, and kron_params attributes to SourceCatalog.
+ [#1425]
+ * Added the ability to use Quantity arrays with detect_threshold,
+ detect_sources, deblend_sources, and SourceFinder. [#1436]
+ * The progress bar used when deblending sources now is prepended
+ with ���Deblending���. [#1439]
+ * Added ���windowed��� centroids to SourceCatalog. [#1447, #1468]
+ * Added quadratic centroids to SourceCatalog. [#1467, #1469]
+ * Added a progress_bar option to SourceCatalog for displaying
+ progress bars when calculating some source properties. [#1471]
+ ### photutils.utils
+ * Added xyorigin attribute to CutoutImage. [#1419]
+ * Added ImageDepth class. [#1434]
+ ## Bug Fixes
+ ### photutils.aperture
+ * Fixed a bug in the PixelAperture area_overlap method so that
+ the returned value does not inherit the data units. [#1408]
+ * Fixed an issue in ApertureStats get_ids for the case when the
+ ID numbers are not sorted (due to slicing). [#1423]
+ ### photutils.datasets
+ * Fixed a bug in the various load functions where FITS files were
+ not closed. [#1455]
+ ### photutils.segmentation
+ * Fixed an issue in the SourceCatalog kron_photometry,
+ make_kron_apertures, and plot_kron_apertures methods where the
+ input minimum Kron and circular radii would not be applied.
+ Instead the instance-level minima would always be used. [#1421]
+ * Fixed an issue where the SourceCatalog plot_kron_apertures
+ method would raise an error for a scalar SourceCatalog. [#1421]
+ * Fixed an issue in SourceCatalog get_labels for the case when
+ the labels are not sorted (due to slicing). [#1423]
+ ## API Changes
+ * Deprecated axes keyword in favor of ax for consistency with
+ other packages. [#1432]
+ * Importing tools from all subpackages now requires including the
+ subpackage name.
+ ### photutils.aperture
+ * Inputting PixelAperture positions as an Astropy Quantity in
+ pixel units is no longer allowed. [#1398]
+ * Inputting SkyAperture shape parameters as an Astropy Quantity
+ in pixel units is no longer allowed. [#1398]
+ * Removed the deprecated BoundingBox as_patch method. [#1462]
+ ### photutils.centroids
+ * Removed the deprecated oversampling keyword in centroid_com.
+ [#1398]
+ ### photutils.datasets
+ * Deprecated the load_fermi_image function. [#1455]
+ ### photutils.psf
+ * Removed the deprecated flux_residual_sigclip keyword in
+ EPSFBuilder. Use sigma_clip instead. [#1398]
+ * PSF photometry classes will no longer emit a RuntimeWarning if
+ the fitted parameter variance is negative. [#1458]
+ ### photutils.segmentation
+ * Removed the deprecated sigclip_sigma and sigclip_iters keywords
+ in detect_threshold. Use the sigma_clip keyword instead.
+ [#1398]
+ * Removed the mask_value, sigclip_sigma, and sigclip_iters
+ keywords in detect_threshold. Use the mask or sigma_clip
+ keywords instead. [#1398]
+ * Removed the deprecated the filter_fwhm and filter_size keywords
+ in make_source_mask. Use the kernel keyword instead. [#1398]
+ * If detection_cat is input to SourceCatalog, then the detection
+ catalog source centroids and morphological/shape properties
+ will be returned instead of calculating them from the input
+ data. Also, if detection_cat is input, then the input wcs,
+ apermask_method, and kron_params keywords will be ignored.
+ [#1425]
+- Add photutils-pr1484-no-setuptools.patch
+ gh#astropy/photutils#1484
+
+-------------------------------------------------------------------
Old:
----
photutils-1.5.0.tar.gz
New:
----
photutils-1.6.0.tar.gz
photutils-pr1484-no-setuptools.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-photutils.spec ++++++
--- /var/tmp/diff_new_pack.RqNFr9/_old 2022-12-23 10:21:40.115537605 +0100
+++ /var/tmp/diff_new_pack.RqNFr9/_new 2022-12-23 10:21:40.119537628 +0100
@@ -17,39 +17,43 @@
Name: python-photutils
-Version: 1.5.0
+Version: 1.6.0
Release: 0
Summary: An Astropy package for photometry
License: BSD-3-Clause
Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/photutils
Source: https://files.pythonhosted.org/packages/source/p/photutils/photutils-%{vers…
-BuildRequires: %{python_module Cython >= 0.29.22}
+# PATCH-FIX-UPSTREAM photutils-pr1484-no-setuptools.patch -- gh#astropy/photutils#1484
+Patch1: photutils-pr1484-no-setuptools.patch
+BuildRequires: %{python_module Cython >= 0.29.30}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module extension-helpers}
-BuildRequires: %{python_module numpy-devel >= 1.18}
+BuildRequires: %{python_module numpy-devel >= 1.20}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python >= 3.7
Requires: python-astropy >= 5.0
-Requires: python-numpy >= 1.18
+Requires: python-numpy >= 1.20
Recommends: python-Bottleneck
Recommends: python-gwcs >= 0.16
-Recommends: python-matplotlib >= 3.1
-Recommends: python-scikit-image >= 0.15.0
-Recommends: python-scikit-learn
+Recommends: python-matplotlib >= 3.3
+Recommends: python-scikit-image >= 0.18.0
+Recommends: python-scikit-learn >= 1.0
Recommends: python-scipy >= 1.6.0
Recommends: python-tqdm
# SECTION test requirements
BuildRequires: %{python_module Bottleneck}
BuildRequires: %{python_module astropy >= 5.0}
BuildRequires: %{python_module gwcs >= 0.16}
-BuildRequires: %{python_module matplotlib >= 3.1}
+BuildRequires: %{python_module matplotlib >= 3.3}
BuildRequires: %{python_module pytest-astropy}
-BuildRequires: %{python_module scikit-image >= 0.15.0}
-BuildRequires: %{python_module scikit-learn}
+BuildRequires: %{python_module scikit-image >= 0.18.0}
+BuildRequires: %{python_module scikit-learn >= 1.0}
BuildRequires: %{python_module scipy >= 1.6.0}
# /SECTION
%python_subpackages
@@ -63,10 +67,10 @@
%build
export CFLAGS="%{optflags}"
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
@@ -79,9 +83,9 @@
}
%files %{python_files}
-%doc CHANGES.rst CITATION.rst README.rst
+%doc CHANGES.rst photutils/CITATION.rst README.rst
%license LICENSE.rst
%{python_sitearch}/photutils
-%{python_sitearch}/photutils-%{version}*-info
+%{python_sitearch}/photutils-%{version}.dist-info
%changelog
++++++ photutils-1.5.0.tar.gz -> photutils-1.6.0.tar.gz ++++++
++++ 18677 lines of diff (skipped)
++++++ photutils-pr1484-no-setuptools.patch ++++++
From a7e777279e0b44423cb5a7e641641fcfcb59d2da Mon Sep 17 00:00:00 2001
From: Ben Greiner <code(a)bnavigator.de>
Date: Thu, 22 Dec 2022 16:16:38 +0100
Subject: [PATCH] remove setuptools from install_requires
---
setup.cfg | 1 -
1 file changed, 1 deletion(-)
Index: photutils-1.6.0/setup.cfg
===================================================================
--- photutils-1.6.0.orig/setup.cfg
+++ photutils-1.6.0/setup.cfg
@@ -27,7 +27,6 @@ packages = find:
python_requires = >=3.8
setup_requires = setuptools_scm
install_requires =
- setuptools
numpy>=1.20
astropy>=5.0
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-d-installer for openSUSE:Factory checked in at 2022-12-23 10:21:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-d-installer (Old)
and /work/SRC/openSUSE:Factory/.rubygem-d-installer.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-d-installer"
Fri Dec 23 10:21:29 2022 rev:2 rq:1044303 version:0.6.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-d-installer/rubygem-d-installer.changes 2022-12-07 17:36:53.517172191 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-d-installer.new.1563/rubygem-d-installer.changes 2022-12-23 10:21:38.511528438 +0100
@@ -1,0 +2,30 @@
+Thu Dec 15 13:15:10 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Implement the ImportGpgKey libzypp callback
+ (gh#yast/d-installer#371)
+- Version 0.6.2
+
+-------------------------------------------------------------------
+Wed Dec 14 22:38:24 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Implement AcceptUnsignedFile and MediaChange libzypp callbacks
+ (gh#yast/d-installer#369).
+
+-------------------------------------------------------------------
+Wed Dec 14 15:29:12 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Switch the SELinux policy for ALP to "enforcing"
+ (gh#yast/d-installer#360).
+- Fix generic questions handling (gh#yast/d-installer#362)
+- Version 0.6.1
+
+-------------------------------------------------------------------
+Wed Dec 14 13:25:22 UTC 2022 - Ancor Gonzalez Sosa <ancor(a)suse.com>
+
+- Removed previous temporary setting "olaf_luks2_password" and all
+ the code supporting it.
+- Added new temporary setting "tpm_luks_open" to try to configure
+ TPM-based unlocking of the LUKS devices during the first system
+ boot (gh#yast/d-installer#363).
+
+-------------------------------------------------------------------
Old:
----
d-installer-0.6.gem
New:
----
d-installer-0.6.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-d-installer.spec ++++++
--- /var/tmp/diff_new_pack.I0RFIC/_old 2022-12-23 10:21:39.051531524 +0100
+++ /var/tmp/diff_new_pack.I0RFIC/_new 2022-12-23 10:21:39.055531547 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-d-installer
#
-# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -24,7 +24,7 @@
#
Name: rubygem-d-installer
-Version: 0.6
+Version: 0.6.2
Release: 0
%define mod_name d-installer
%define mod_full_name %{mod_name}-%{version}
@@ -44,11 +44,11 @@
Requires: yast2 >= 4.5.20
# /MANUAL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 5
BuildRequires: %{ruby >= 2.5.0}
BuildRequires: %{rubygem gem2rpm}
+BuildRequires: ruby-macros >= 5
BuildRequires: update-alternatives
-Url: https://github.com/yast/d-installer
+URL: https://github.com/yast/d-installer
Source: %{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: D-Installer Service
@@ -75,7 +75,6 @@
install -D -m 0644 %{buildroot}%{gem_base}/gems/%{mod_full_name}/etc/d-installer.yaml %{buildroot}%{_sysconfdir}/d-installer.yaml
# /MANUAL
-
%gem_packages
%changelog
++++++ d-installer-0.6.gem -> d-installer-0.6.2.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/d-installer.yaml new/etc/d-installer.yaml
--- old/etc/d-installer.yaml 2022-12-05 16:56:00.000000000 +0100
+++ new/etc/d-installer.yaml 2022-12-22 16:38:27.000000000 +0100
@@ -161,10 +161,13 @@
optional_patterns: null # no optional pattern shared
mandatory_packages:
- device-mapper # Apparently needed if devices at /dev/mapper are used at boot (eg. FDE)
+ - fde-tools # Needed for FDE with TPM, hardcoded here temporarily
+ - libtss2-tcti-device0 # Same than fde-tools
optional_packages: null
base_product: ALP
security:
+ tpm_luks_open: true
lsm: selinux
available_lsms:
# apparmor:
@@ -173,7 +176,7 @@
selinux:
patterns:
- alp_selinux
- policy: permissive
+ policy: enforcing
none:
patterns: null
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/dbus/clients/question.rb new/lib/dinstaller/dbus/clients/question.rb
--- old/lib/dinstaller/dbus/clients/question.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/dbus/clients/question.rb 2022-12-22 16:38:27.000000000 +0100
@@ -28,6 +28,9 @@
# Its interface is a subset of {DInstaller::Question}
# so it can be used in the block of {DInstaller::CanAskQuestion#ask}.
class Question < Base
+ LUKS_ACTIVATION_IFACE = "org.opensuse.DInstaller.Question.LuksActivation1"
+ private_constant :LUKS_ACTIVATION_IFACE
+
# @return [::DBus::ProxyObject]
attr_reader :dbus_object
@@ -38,7 +41,9 @@
@dbus_object = service[object_path]
@dbus_iface = @dbus_object["org.opensuse.DInstaller.Question1"]
# one D-Bus client for all kinds of questions
- @luks_iface = @dbus_object["org.opensuse.DInstaller.Question.LuksActivation1"]
+ return unless @dbus_object.has_iface?(LUKS_ACTIVATION_IFACE)
+
+ @luks_iface = @dbus_object[LUKS_ACTIVATION_IFACE]
end
# @return [String]
@@ -58,8 +63,10 @@
@dbus_iface["Answer"].to_sym
end
- # @return [String]
+ # @return [String,nil] Password or nil if there is no LUKS interface
def password
+ return nil unless @luks_iface
+
@luks_iface["Password"]
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/dbus/clients/questions_manager.rb new/lib/dinstaller/dbus/clients/questions_manager.rb
--- old/lib/dinstaller/dbus/clients/questions_manager.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/dbus/clients/questions_manager.rb 2022-12-22 16:38:27.000000000 +0100
@@ -21,6 +21,7 @@
require "dinstaller/dbus/clients/base"
require "dinstaller/dbus/clients/question"
+require "dinstaller/luks_activation_question"
module DInstaller
module DBus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/dbus/software_service.rb new/lib/dinstaller/dbus/software_service.rb
--- old/lib/dinstaller/dbus/software_service.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/dbus/software_service.rb 2022-12-22 16:38:27.000000000 +0100
@@ -43,7 +43,7 @@
def initialize(config, logger = nil)
@logger = logger || Logger.new($stdout)
@bus = ::DBus::SystemBus.instance
- @backend = DInstaller::Software.new(config, logger)
+ @backend = DInstaller::Software::Manager.new(config, logger)
@backend.on_progress_change { dispatch }
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/dbus/storage/proposal.rb new/lib/dinstaller/dbus/storage/proposal.rb
--- old/lib/dinstaller/dbus/storage/proposal.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/dbus/storage/proposal.rb 2022-12-22 16:38:27.000000000 +0100
@@ -144,6 +144,8 @@
#
# @param dbus_settings [DInstaller::Storage::ProposalSettings]
def calculate(dbus_settings)
+ logger.info("Calculating storage proposal from D-Bus settings: #{dbus_settings}")
+
backend.calculate(to_proposal_settings(dbus_settings))
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/dbus/y2dir/software/modules/PackageCallbacks.rb new/lib/dinstaller/dbus/y2dir/software/modules/PackageCallbacks.rb
--- old/lib/dinstaller/dbus/y2dir/software/modules/PackageCallbacks.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/dbus/y2dir/software/modules/PackageCallbacks.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,52 @@
+# Copyright (c) [2022] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "logger"
+require "dinstaller/software/callbacks"
+require "dinstaller/dbus/clients/questions_manager"
+
+# :nodoc:
+module Yast
+ # Replacement for the Yast::PackageCallbacks module.
+ class PackageCallbacksClass < Module
+ def main
+ puts "Loading mocked module #{__FILE__}"
+ end
+
+ # @see https://github.com/yast/yast-yast2/blob/19180445ab935a25edd4ae0243aa7a3bcd0…
+ def InitPackageCallbacks(logger = ::Logger.new($stdout))
+ DInstaller::Software::Callbacks::Signature.new(
+ questions_manager, logger
+ ).setup
+
+ DInstaller::Software::Callbacks::Media.new(
+ questions_manager, logger
+ ).setup
+ end
+
+ def questions_manager
+ @questions_manager ||= DInstaller::DBus::Clients::QuestionsManager.new
+ end
+ end
+
+ PackageCallbacks = PackageCallbacksClass.new
+ PackageCallbacks.main
+end
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/manager.rb new/lib/dinstaller/manager.rb
--- old/lib/dinstaller/manager.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/manager.rb 2022-12-22 16:38:27.000000000 +0100
@@ -86,7 +86,7 @@
def install_phase
installation_phase.install
- start_progress(9)
+ start_progress(8)
progress.step("Reading software repositories") do
software.probe
@@ -107,7 +107,6 @@
progress.step("Writing Network Configuration") { network.install }
progress.step("Saving Language Settings") { language.finish }
progress.step("Writing repositories information") { software.finish }
- progress.step("Copying logs") { copy_logs }
progress.step("Finishing storage configuration") { storage.finish }
end
@@ -191,10 +190,5 @@
# @return [ServiceStatusRecorder]
attr_reader :service_status_recorder
-
- # Copy the logs to the target system
- def copy_logs
- Yast::WFM.CallFunction("copy_logs_finish", ["Write"])
- end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/package_callbacks.rb new/lib/dinstaller/package_callbacks.rb
--- old/lib/dinstaller/package_callbacks.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/package_callbacks.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-# frozen_string_literal: true
-
-# Copyright (c) [2021] SUSE LLC
-#
-# All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of version 2 of the GNU General Public License as published
-# by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, contact SUSE LLC.
-#
-# To contact SUSE LLC about this file by physical or electronic mail, you may
-# find current contact information at www.suse.com.
-
-require "yast"
-
-Yast.import "Pkg"
-
-# YaST specific code lives under this namespace
-module DInstaller
- # This class represents the installer status
- class PackageCallbacks
- class << self
- def setup(pkg_count, progress)
- new(pkg_count, progress).setup
- end
- end
-
- def initialize(pkg_count, progress)
- @total = pkg_count
- @installed = 0
- @progress = progress
- end
-
- def setup
- Yast::Pkg.CallbackDonePackage(
- fun_ref(method(:package_installed), "string (integer, string)")
- )
- end
-
- private
-
- # @return [DInstaller::Progress]
- attr_reader :progress
-
- def fun_ref(method, signature)
- Yast::FunRef.new(method, signature)
- end
-
- # TODO: error handling
- def package_installed(_error, _reason)
- @installed += 1
- progress.step(msg)
-
- ""
- end
-
- def msg
- "Installing packages (#{@total - @installed} remains)"
- end
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software/callbacks/media.rb new/lib/dinstaller/software/callbacks/media.rb
--- old/lib/dinstaller/software/callbacks/media.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/software/callbacks/media.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,81 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "dinstaller/can_ask_question"
+require "dinstaller/question"
+
+Yast.import "Pkg"
+
+module DInstaller
+ module Software
+ module Callbacks
+ # Callbacks related to media handling
+ class Media
+ include CanAskQuestion
+
+ # @param questions_manager [DBus::Clients::QuestionsManager]
+ # @param logger [Logger]
+ def initialize(questions_manager, logger)
+ @questions_manager = questions_manager
+ @logger = logger
+ end
+
+ # Register the callbacks
+ def setup
+ Yast::Pkg.CallbackMediaChange(
+ Yast::FunRef.new(
+ method(:media_change),
+ "string (string, string, string, string, integer, string, integer, string, " \
+ "boolean, list <string>, integer)"
+ )
+ )
+ end
+
+ # Media change callback
+ #
+ # @return [String]
+ # @see https://github.com/yast/yast-yast2/blob/19180445ab935a25edd4ae0243aa7a3bcd0…
+ # rubocop:disable Metrics/ParameterLists
+ def media_change(_error_code, error, _url, _product, _current, _current_label, _wanted,
+ _wanted_label, _double_sided, _devices, _current_device)
+ question = DInstaller::Question.new(
+ error, options: [:Retry, :Skip], default_option: :Retry
+ )
+ ask(question) do |q|
+ logger.info "#{q.text}: #{q.answer}"
+
+ (q.answer == :Retry) ? "" : "S"
+ end
+ end
+ # rubocop:enable Metrics/ParameterLists
+
+ private
+
+ # @return [DBus::Clients::QuestionsManager]
+ attr_reader :questions_manager
+
+ # @return [Logger]
+ attr_reader :logger
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software/callbacks/progress.rb new/lib/dinstaller/software/callbacks/progress.rb
--- old/lib/dinstaller/software/callbacks/progress.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/software/callbacks/progress.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,72 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+
+Yast.import "Pkg"
+
+module DInstaller
+ module Software
+ module Callbacks
+ # This class represents the installer status
+ class Progress
+ class << self
+ def setup(pkg_count, progress)
+ new(pkg_count, progress).setup
+ end
+ end
+
+ def initialize(pkg_count, progress)
+ @total = pkg_count
+ @installed = 0
+ @progress = progress
+ end
+
+ def setup
+ Yast::Pkg.CallbackDonePackage(
+ fun_ref(method(:package_installed), "string (integer, string)")
+ )
+ end
+
+ private
+
+ # @return [DInstaller::Progress]
+ attr_reader :progress
+
+ def fun_ref(method, signature)
+ Yast::FunRef.new(method, signature)
+ end
+
+ # TODO: error handling
+ def package_installed(_error, _reason)
+ @installed += 1
+ progress.step(msg)
+
+ ""
+ end
+
+ def msg
+ "Installing packages (#{@total - @installed} remains)"
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software/callbacks/signature.rb new/lib/dinstaller/software/callbacks/signature.rb
--- old/lib/dinstaller/software/callbacks/signature.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/software/callbacks/signature.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,113 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2022] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "dinstaller/can_ask_question"
+require "dinstaller/question"
+
+Yast.import "Pkg"
+
+module DInstaller
+ module Software
+ module Callbacks
+ # Callbacks related to signatures handling
+ class Signature
+ include CanAskQuestion
+
+ # @param questions_manager [DBus::Clients::QuestionsManager]
+ # @param logger [Logger]
+ def initialize(questions_manager, logger)
+ @questions_manager = questions_manager
+ @logger = logger
+ end
+
+ # Register the callbacks
+ def setup
+ Yast::Pkg.CallbackAcceptUnsignedFile(
+ Yast::FunRef.new(method(:accept_unsigned_file), "boolean (string, integer)")
+ )
+ Yast::Pkg.CallbackImportGpgKey(
+ Yast::FunRef.new(method(:import_gpg_key), "boolean (map <string, any>, integer)")
+ )
+ end
+
+ # Callback to handle unsigned files
+ #
+ # @param filename [String] File name
+ # @param repo_id [Integer] Repository ID. It might be -1 if there is not an associated repo.
+ def accept_unsigned_file(filename, repo_id)
+ repo = Yast::Pkg.SourceGeneralData(repo_id)
+ source = if repo
+ format(
+ "The file %{filename} from repository %{repo_name} (%{repo_url})",
+ filename: filename, repo_name: repo["name"], repo_url: repo["url"]
+ )
+ else
+ format("The file %{filename}", filename: filename)
+ end
+
+ message = format(
+ "%{source} is not digitally signed. The origin and integrity of the file cannot be " \
+ "verified. Use it anyway?", source: source
+ )
+
+ question = DInstaller::Question.new(
+ message, options: [:Yes, :No], default_option: :No
+ )
+ ask(question) do |q|
+ logger.info "#{q.text} #{q.answer}"
+ q.answer == :Yes
+ end
+ end
+
+ # Callback to handle signature verification failures
+ #
+ # @param key [Hash] GPG key data (id, name, fingerprint, etc.)
+ # @param _repo_id [Integer] Repository ID
+ def import_gpg_key(key, _repo_id)
+ fingerprint = key["fingerprint"].scan(/.{4}/).join(" ")
+ message = format(
+ "The key %{id} (%{name}) with fingerprint %{fingerprint} is unknown. " \
+ "Do you want to trust this key?",
+ id: key["id"], name: key["name"], fingerprint: fingerprint
+ )
+
+ question = DInstaller::Question.new(
+ message, options: [:Trust, :Skip], default_option: :Skip
+ )
+
+ ask(question) do |q|
+ logger.info "#{q.text} #{q.answer}"
+ q.answer == :Trust
+ end
+ end
+
+ private
+
+ # @return [DBus::Clients::QuestionsManager]
+ attr_reader :questions_manager
+
+ # @return [Logger]
+ attr_reader :logger
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software/callbacks.rb new/lib/dinstaller/software/callbacks.rb
--- old/lib/dinstaller/software/callbacks.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/software/callbacks.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2022] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+module DInstaller
+ module Software
+ # Namespace for software callbacks
+ module Callbacks
+ end
+ end
+end
+
+require "dinstaller/software/callbacks/media"
+require "dinstaller/software/callbacks/progress"
+require "dinstaller/software/callbacks/signature"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software/manager.rb new/lib/dinstaller/software/manager.rb
--- old/lib/dinstaller/software/manager.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dinstaller/software/manager.rb 2022-12-22 16:38:27.000000000 +0100
@@ -0,0 +1,262 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "fileutils"
+require "dinstaller/config"
+require "dinstaller/with_progress"
+require "y2packager/product"
+require "yast2/arch_filter"
+require "dinstaller/software/callbacks"
+
+Yast.import "Package"
+Yast.import "Packages"
+Yast.import "PackageCallbacks"
+Yast.import "Pkg"
+Yast.import "Stage"
+
+module DInstaller
+ module Software
+ # This class is responsible for software handling
+ class Manager
+ include WithProgress
+
+ GPG_KEYS_GLOB = "/usr/lib/rpm/gnupg/keys/gpg-*"
+ private_constant :GPG_KEYS_GLOB
+
+ attr_reader :product
+
+ DEFAULT_LANGUAGES = ["en_US"].freeze
+ private_constant :DEFAULT_LANGUAGES
+
+ attr_accessor :languages
+
+ # FIXME: what about defining a Product class?
+ # @return [Array<Array<String,Hash>>] An array containing the product ID and
+ # additional information in a hash
+ attr_reader :products
+
+ def initialize(config, logger)
+ @config = config
+ @logger = logger
+ @languages = DEFAULT_LANGUAGES
+ @products = @config.products
+ if @config.multi_product?
+ @product = nil
+ else
+ @product = @products.keys.first # use the available product as default
+ @config.pick_product(@product)
+ end
+ end
+
+ def select_product(name)
+ return if name == @product
+ raise ArgumentError unless @products[name]
+
+ @config.pick_product(name)
+ @product = name
+ end
+
+ def probe
+ logger.info "Probing software"
+
+ store_original_repos
+ Yast::Pkg.SetSolverFlags("ignoreAlreadyRecommended" => false, "onlyRequires" => true)
+
+ # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos
+ Yast::Stage.Set("normal")
+
+ start_progress(3)
+ Yast::PackageCallbacks.InitPackageCallbacks(logger)
+ progress.step("Initialize target repositories") { initialize_target_repos }
+ progress.step("Initialize sources") { add_base_repo }
+ progress.step("Making the initial proposal") do
+ proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true)
+ logger.info "proposal #{proposal["raw_proposal"]}"
+ end
+
+ Yast::Stage.Set("initial")
+ end
+
+ def initialize_target_repos
+ Yast::Pkg.TargetInitialize("/")
+ import_gpg_keys
+ end
+
+ def propose
+ Yast::Pkg.TargetFinish # ensure that previous target is closed
+ Yast::Pkg.TargetInitialize(Yast::Installation.destdir)
+ Yast::Pkg.TargetLoad
+ Yast::Pkg.SetAdditionalLocales(languages)
+ select_base_product((a)config.data["software"]["base_product"])
+
+ add_resolvables
+ proposal = Yast::Packages.Proposal(force_reset = false, reinit = false, _simple = true)
+ logger.info "proposal #{proposal["raw_proposal"]}"
+
+ solve_dependencies
+
+ # do not return proposal hash, so intentional nil here
+ nil
+ end
+
+ def install
+ start_progress(count_packages)
+ Callbacks::Progress.setup(count_packages, progress)
+
+ # TODO: error handling
+ commit_result = Yast::Pkg.Commit({})
+
+ if commit_result.nil? || commit_result.empty?
+ logger.error("Commit failed")
+ raise Yast::Pkg.LastError
+ end
+
+ logger.info "Commit result #{commit_result}"
+ rescue DInstaller::WithProgress::NotFinishedProgress => e
+ logger.error "There is an unfinished progress: #{e.inspect}"
+ finish_progress
+ end
+
+ # Writes the repositories information to the installed system
+ def finish
+ start_progress(2)
+ progress.step("Writing repositories to the target system") do
+ Yast::Pkg.SourceSaveAll
+ Yast::Pkg.TargetFinish
+ Yast::Pkg.SourceCacheCopyTo(Yast::Installation.destdir)
+ end
+ progress.step("Restoring original repositories") { restore_original_repos }
+ end
+
+ # Determine whether the given tag is provided by the selected packages
+ #
+ # @param tag [String] Tag to search for (package names, requires/provides, or file
+ # names)
+ # @return [Boolean] true if it is provided; false otherwise
+ def provision_selected?(tag)
+ Yast::Pkg.IsSelected(tag) || Yast::Pkg.IsProvided(tag)
+ end
+
+ # Determines whether a package is installed
+ #
+ # @param name [String] Package name
+ # @return [Boolean] true if it is installed; false otherwise
+ def package_installed?(name)
+ Yast::Package.Installed(name, target: :system)
+ end
+
+ private
+
+ # adds resolvables from yaml config for given product
+ def add_resolvables
+ mandatory_patterns = @config.data["software"]["mandatory_patterns"] || []
+ Yast::PackagesProposal.SetResolvables("d-installer", :pattern, mandatory_patterns)
+
+ optional_patterns = @config.data["software"]["optional_patterns"] || []
+ Yast::PackagesProposal.SetResolvables("d-installer", :pattern, optional_patterns,
+ optional: true)
+
+ mandatory_packages = @config.data["software"]["mandatory_packages"] || []
+ Yast::PackagesProposal.SetResolvables("d-installer", :package, mandatory_packages)
+
+ optional_packages = @config.data["software"]["optional_packages"] || []
+ Yast::PackagesProposal.SetResolvables("d-installer", :package, optional_packages,
+ optional: true)
+ end
+
+ # call solver to satisfy dependency or log error
+ def solve_dependencies
+ res = Yast::Pkg.PkgSolve(unused = true)
+ logger.info "solver run #{res.inspect}"
+
+ return if res
+
+ logger.error "Solver failed: #{Yast::Pkg.LastError}"
+ logger.error "Details: #{Yast::Pkg.LastErrorDetails}"
+ logger.error "Solving issues: #{Yast::Pkg.PkgSolveErrors}"
+ end
+
+ # @return [Logger]
+ attr_reader :logger
+
+ def count_packages
+ Yast::Pkg.PkgMediaCount.reduce(0) { |sum, res| sum + res.reduce(0, :+) }
+ end
+
+ def import_gpg_keys
+ gpg_keys = Dir.glob(GPG_KEYS_GLOB).map(&:to_s)
+ logger.info "Importing GPG keys: #{gpg_keys}"
+ gpg_keys.each do |path|
+ Yast::Pkg.ImportGPGKey(path, true)
+ end
+ end
+
+ def add_base_repo
+ @config.data["software"]["installation_repositories"].each do |repo|
+ if repo.is_a?(Hash)
+ url = repo["url"]
+ # skip if repo is not for current arch
+ next if repo["archs"] && !Yast2::ArchFilter.from_string(repo["archs"]).match?
+ else
+ url = repo
+ end
+ Yast::Pkg.SourceCreate(url, "/") # TODO: having that dir also in config?
+ end
+
+ Yast::Pkg.SourceSaveAll
+ end
+
+ def select_base_product(name)
+ base_product = Y2Packager::Product.available_base_products.find do |product|
+ product.name == name
+ end
+ logger.info "Base product to select: #{base_product&.name}"
+ base_product&.select
+ end
+
+ REPOS_BACKUP = "/etc/zypp/repos.d.dinstaller.backup"
+ private_constant :REPOS_BACKUP
+
+ REPOS_DIR = "/etc/zypp/repos.d"
+ private_constant :REPOS_DIR
+
+ # ensure that repos backup is there and repos.d is empty
+ def store_original_repos
+ # Backup was already created, so just remove all repos
+ if File.directory?(REPOS_BACKUP)
+ logger.info "removing #{REPOS_DIR}"
+ FileUtils.rm_rf(REPOS_DIR)
+ else # move repos to backup
+ logger.info "moving #{REPOS_DIR} to #{REPOS_BACKUP}"
+ FileUtils.mv(REPOS_DIR, REPOS_BACKUP)
+ end
+ end
+
+ def restore_original_repos
+ logger.info "removing #{REPOS_DIR}"
+ FileUtils.rm_rf(REPOS_DIR)
+ logger.info "moving #{REPOS_BACKUP} to #{REPOS_DIR}"
+ FileUtils.mv(REPOS_BACKUP, REPOS_DIR)
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/software.rb new/lib/dinstaller/software.rb
--- old/lib/dinstaller/software.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/software.rb 2022-12-22 16:38:27.000000000 +0100
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# Copyright (c) [2021] SUSE LLC
+# Copyright (c) [2022] SUSE LLC
#
# All Rights Reserved.
#
@@ -19,238 +19,10 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.
-require "yast"
-require "fileutils"
-require "dinstaller/package_callbacks"
-require "dinstaller/config"
-require "dinstaller/with_progress"
-require "y2packager/product"
-require "yast2/arch_filter"
-
-Yast.import "Package"
-Yast.import "Packages"
-Yast.import "Pkg"
-Yast.import "Stage"
-
-# YaST specific code lives under this namespace
module DInstaller
- # This class is responsible for software handling
- class Software
- include WithProgress
-
- GPG_KEYS_GLOB = "/usr/lib/rpm/gnupg/keys/gpg-*"
- private_constant :GPG_KEYS_GLOB
-
- attr_reader :product
-
- DEFAULT_LANGUAGES = ["en_US"].freeze
- private_constant :DEFAULT_LANGUAGES
-
- attr_accessor :languages
-
- # FIXME: what about defining a Product class?
- # @return [Array<Array<String,Hash>>] An array containing the product ID and
- # additional information in a hash
- attr_reader :products
-
- def initialize(config, logger)
- @config = config
- @logger = logger
- @languages = DEFAULT_LANGUAGES
- @products = @config.products
- if @config.multi_product?
- @product = nil
- else
- @product = @products.keys.first # use the available product as default
- @config.pick_product(@product)
- end
- end
-
- def select_product(name)
- return if name == @product
- raise ArgumentError unless @products[name]
-
- @config.pick_product(name)
- @product = name
- end
-
- def probe
- logger.info "Probing software"
-
- store_original_repos
- Yast::Pkg.SetSolverFlags("ignoreAlreadyRecommended" => false, "onlyRequires" => true)
-
- # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos
- Yast::Stage.Set("normal")
-
- start_progress(3)
- progress.step("Initialize target repositories") { initialize_target_repos }
- progress.step("Initialize sources") { add_base_repo }
- progress.step("Making the initial proposal") do
- proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true)
- logger.info "proposal #{proposal["raw_proposal"]}"
- end
-
- Yast::Stage.Set("initial")
- end
-
- def initialize_target_repos
- Yast::Pkg.TargetInitialize("/")
- import_gpg_keys
- end
-
- def propose
- Yast::Pkg.TargetFinish # ensure that previous target is closed
- Yast::Pkg.TargetInitialize(Yast::Installation.destdir)
- Yast::Pkg.TargetLoad
- Yast::Pkg.SetAdditionalLocales(languages)
- select_base_product((a)config.data["software"]["base_product"])
-
- add_resolvables
- proposal = Yast::Packages.Proposal(force_reset = false, reinit = false, _simple = true)
- logger.info "proposal #{proposal["raw_proposal"]}"
-
- solve_dependencies
-
- # do not return proposal hash, so intentional nil here
- nil
- end
-
- def install
- start_progress(count_packages)
- PackageCallbacks.setup(count_packages, progress)
-
- # TODO: error handling
- commit_result = Yast::Pkg.Commit({})
-
- if commit_result.nil? || commit_result.empty?
- logger.error("Commit failed")
- raise Yast::Pkg.LastError
- end
-
- logger.info "Commit result #{commit_result}"
- end
-
- # Writes the repositories information to the installed system
- def finish
- start_progress(2)
- progress.step("Writing repositories to the target system") do
- Yast::Pkg.SourceSaveAll
- Yast::Pkg.TargetFinish
- Yast::Pkg.SourceCacheCopyTo(Yast::Installation.destdir)
- end
- progress.step("Restoring original repositories") { restore_original_repos }
- end
-
- # Determine whether the given tag is provided by the selected packages
- #
- # @param tag [String] Tag to search for (package names, requires/provides, or file
- # names)
- # @return [Boolean] true if it is provided; false otherwise
- def provision_selected?(tag)
- Yast::Pkg.IsSelected(tag) || Yast::Pkg.IsProvided(tag)
- end
-
- # Determines whether a package is installed
- #
- # @param name [String] Package name
- # @return [Boolean] true if it is installed; false otherwise
- def package_installed?(name)
- Yast::Package.Installed(name, target: :system)
- end
-
- private
-
- # adds resolvables from yaml config for given product
- def add_resolvables
- mandatory_patterns = @config.data["software"]["mandatory_patterns"] || []
- Yast::PackagesProposal.SetResolvables("d-installer", :pattern, mandatory_patterns)
-
- optional_patterns = @config.data["software"]["optional_patterns"] || []
- Yast::PackagesProposal.SetResolvables("d-installer", :pattern, optional_patterns,
- optional: true)
-
- mandatory_packages = @config.data["software"]["mandatory_packages"] || []
- Yast::PackagesProposal.SetResolvables("d-installer", :package, mandatory_packages)
-
- optional_packages = @config.data["software"]["optional_packages"] || []
- Yast::PackagesProposal.SetResolvables("d-installer", :package, optional_packages,
- optional: true)
- end
-
- # call solver to satisfy dependency or log error
- def solve_dependencies
- res = Yast::Pkg.PkgSolve(unused = true)
- logger.info "solver run #{res.inspect}"
-
- return if res
-
- logger.error "Solver failed: #{Yast::Pkg.LastError}"
- logger.error "Details: #{Yast::Pkg.LastErrorDetails}"
- logger.error "Solving issues: #{Yast::Pkg.PkgSolveErrors}"
- end
-
- # @return [Logger]
- attr_reader :logger
-
- def count_packages
- Yast::Pkg.PkgMediaCount.reduce(0) { |sum, res| sum + res.reduce(0, :+) }
- end
-
- def import_gpg_keys
- gpg_keys = Dir.glob(GPG_KEYS_GLOB).map(&:to_s)
- logger.info "Importing GPG keys: #{gpg_keys}"
- gpg_keys.each do |path|
- Yast::Pkg.ImportGPGKey(path, true)
- end
- end
-
- def add_base_repo
- @config.data["software"]["installation_repositories"].each do |repo|
- if repo.is_a?(Hash)
- url = repo["url"]
- # skip if repo is not for current arch
- next if repo["archs"] && !Yast2::ArchFilter.from_string(repo["archs"]).match?
- else
- url = repo
- end
- Yast::Pkg.SourceCreate(url, "/") # TODO: having that dir also in config?
- end
-
- Yast::Pkg.SourceSaveAll
- end
-
- def select_base_product(name)
- base_product = Y2Packager::Product.available_base_products.find do |product|
- product.name == name
- end
- logger.info "Base product to select: #{base_product&.name}"
- base_product&.select
- end
-
- REPOS_BACKUP = "/etc/zypp/repos.d.dinstaller.backup"
- private_constant :REPOS_BACKUP
-
- REPOS_DIR = "/etc/zypp/repos.d"
- private_constant :REPOS_DIR
-
- # ensure that repos backup is there and repos.d is empty
- def store_original_repos
- # Backup was already created, so just remove all repos
- if File.directory?(REPOS_BACKUP)
- logger.info "removing #{REPOS_DIR}"
- FileUtils.rm_rf(REPOS_DIR)
- else # move repos to backup
- logger.info "moving #{REPOS_DIR} to #{REPOS_BACKUP}"
- FileUtils.mv(REPOS_DIR, REPOS_BACKUP)
- end
- end
-
- def restore_original_repos
- logger.info "removing #{REPOS_DIR}"
- FileUtils.rm_rf(REPOS_DIR)
- logger.info "moving #{REPOS_BACKUP} to #{REPOS_DIR}"
- FileUtils.mv(REPOS_BACKUP, REPOS_DIR)
- end
+ # Namespace for software backend
+ module Software
end
end
+
+require "dinstaller/software/manager"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/storage/manager.rb new/lib/dinstaller/storage/manager.rb
--- old/lib/dinstaller/storage/manager.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/storage/manager.rb 2022-12-22 16:38:27.000000000 +0100
@@ -20,6 +20,8 @@
# find current contact information at www.suse.com.
require "yast"
+require "yast2/execute"
+require "yast2/systemd/service"
require "bootloader/proposal_client"
require "bootloader/finish_client"
require "y2storage/storage_manager"
@@ -79,17 +81,25 @@
# Unmounts the target file system
def finish
- start_progress(4)
+ steps = tpm_key? ? 6 : 5
+ start_progress(steps)
on_target do
progress.step("Writing Linux Security Modules configuration") { security.write }
progress.step("Installing bootloader") do
- hack_olaf_password
::Bootloader::FinishClient.new.write
end
+ if tpm_key?
+ progress.step("Preparing the system to unlock the encryption using the TPM") do
+ prepare_tpm_key
+ end
+ end
progress.step("Configuring file systems snapshots") do
Yast::WFM.CallFunction("snapshots_finish", ["Write"])
end
+ progress.step("Copying logs") do
+ Yast::WFM.CallFunction("copy_logs_finish", ["Write"])
+ end
progress.step("Unmounting storage devices") do
Yast::WFM.CallFunction("umount_finish", ["Write"])
end
@@ -175,38 +185,60 @@
@software ||= DBus::Clients::Software.new
end
- # Temporary method for testing FDE during early development
- def hack_olaf_password
- password = config.data.fetch("security", {})["olaf_luks2_password"]
- return if password.nil? || password.empty?
-
- grub_path = File.join(Yast::Installation.destdir, "etc", "default", "grub")
- File.open(grub_path, "a") do |file|
- file.puts "GRUB_CRYPTODISK_PASSWORD=\"#{password}\""
- end
+ def tpm_key?
+ tpm_product? && tpm_proposal? && tpm_system?
+ end
- hack_jeos_firstboot
+ def tpm_proposal?
+ settings = proposal.calculated_settings
+ settings.encrypt? && !settings.lvm
end
- # @see #hack_olaf_password
- #
- # This assumes the package jeos-firstboot has been installed
- def hack_jeos_firstboot
- require "yast2/systemd/service"
- require "fileutils"
- destdir = Yast::Installation.destdir
+ def tpm_system?
+ Y2Storage::Arch.new.efiboot? && tpm_present?
+ end
+
+ def tpm_present?
+ return @tpm_present unless @tpm_present.nil?
+
+ @tpm_present =
+ begin
+ execute_fdectl("tpm-present")
+ logger.info "FDE: TPMv2 detected"
+ true
+ rescue Cheetah::ExecutionFailed
+ logger.info "FDE: TPMv2 not detected"
+ false
+ end
+ end
+
+ def tpm_product?
+ config.data.fetch("security", {}).fetch("tpm_luks_open", false)
+ end
+
+ def prepare_tpm_key
+ keyfile_path = File.join(Yast::Installation.destdir, "root", ".root.keyfile")
+ execute_fdectl(
+ "add-secondary-key", "--keyfile", keyfile_path,
+ stdin: "#{proposal.calculated_settings.encryption_password}\n",
+ recorder: Yast::ReducedRecorder.new(skip: :stdin)
+ )
- service = Yast2::Systemd::Service.find("jeos-firstboot")
+ service = Yast2::Systemd::Service.find("fde-tpm-enroll.service")
+ logger.info "FDE: TPM enroll service: #{service}"
service&.enable
+ rescue Cheetah::ExecutionFailed
+ false
+ end
- reconfig_path = File.join(destdir, "var", "lib", "YaST2")
- FileUtils.mkdir_p(reconfig_path)
- FileUtils.touch(File.join(reconfig_path, "reconfig_system"))
-
- jeos_path = File.join(destdir, "etc", "jeos-firstboot.conf")
- File.open(jeos_path, "a") do |file|
- file.puts "JEOS_PASSWORD_ALREADY_SET='yes'"
- end
+ def execute_fdectl(*args)
+ # Some subcommands like "tpm-present" should not require a --device argument, but they
+ # currently do. Let's always us until the problem at fdectl is fully fixed.
+ Yast::Execute.locally!("fdectl", "--device", fdectl_device, *args)
+ end
+
+ def fdectl_device
+ Yast::Installation.destdir
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/storage/proposal.rb new/lib/dinstaller/storage/proposal.rb
--- old/lib/dinstaller/storage/proposal.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/storage/proposal.rb 2022-12-22 16:38:27.000000000 +0100
@@ -123,7 +123,6 @@
settings ||= ProposalSettings.new
settings.freeze
proposal_settings = to_y2storage_settings(settings)
- hack_olaf_password(proposal_settings)
@proposal = new_proposal(proposal_settings)
storage_manager.proposal = proposal
@@ -296,16 +295,6 @@
# Setting #linux_delete_mode to :all is not enough to prevent VG reusing in all cases
settings.lvm_vg_reuse = false
end
-
- # Temporary method for testing FDE during early development
- #
- # @param settings [Y2Storage::ProposalSettings]
- def hack_olaf_password(settings)
- password = config.data.fetch("security", {})["olaf_luks2_password"]
- return if password.nil? || password.empty?
-
- settings.encryption_password = password
- end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/storage/proposal_settings.rb new/lib/dinstaller/storage/proposal_settings.rb
--- old/lib/dinstaller/storage/proposal_settings.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/storage/proposal_settings.rb 2022-12-22 16:38:27.000000000 +0100
@@ -55,6 +55,13 @@
@candidate_devices = []
@volumes = []
end
+
+ # Whether the proposal must create encrypted devices
+ #
+ # @return [Boolean]
+ def encrypt?
+ !(encryption_password.nil? || encryption_password.empty?)
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/dinstaller/with_progress.rb new/lib/dinstaller/with_progress.rb
--- old/lib/dinstaller/with_progress.rb 2022-12-05 16:56:00.000000000 +0100
+++ new/lib/dinstaller/with_progress.rb 2022-12-22 16:38:27.000000000 +0100
@@ -24,6 +24,9 @@
module DInstaller
# Mixin that allows to start a progress and configure callbacks
module WithProgress
+ # There is an unfinished progress
+ class NotFinishedProgress < StandardError; end
+
# @return [Progress, nil]
attr_reader :progress
@@ -33,7 +36,7 @@
#
# @param total_steps [Integer] total number of the steps for the progress.
def start_progress(total_steps)
- raise "There already is an unfinished progress" if progress && !progress.finished?
+ raise NotFinishedProgress if progress && !progress.finished?
on_change_callbacks = @on_progress_change_callbacks || []
on_finish_callbacks = @on_progress_finish_callbacks || []
@@ -44,6 +47,13 @@
end
end
+ # Finishes the current progress
+ def finish_progress
+ return if progress.nil? || progress.finished?
+
+ progress.finish
+ end
+
# Registers an on_change callback to be added to the progress
#
# @param block [Proc]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2022-12-05 16:56:00.000000000 +0100
+++ new/metadata 2022-12-22 16:38:27.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: d-installer
version: !ruby/object:Gem::Version
- version: '0.6'
+ version: 0.6.2
platform: ruby
authors:
- YaST Team
autorequire:
bindir: bin
cert_chain: []
-date: 2022-12-05 00:00:00.000000000 Z
+date: 2022-12-22 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: packaging_rake_tasks
@@ -261,6 +261,7 @@
- lib/dinstaller/dbus/y2dir/manager/modules/Package.rb
- lib/dinstaller/dbus/y2dir/manager/modules/PackagesProposal.rb
- lib/dinstaller/dbus/y2dir/modules/Autologin.rb
+- lib/dinstaller/dbus/y2dir/software/modules/PackageCallbacks.rb
- lib/dinstaller/dbus/y2dir/software/modules/SpaceCalculation.rb
- lib/dinstaller/dbus/y2dir/storage/modules/Package.rb
- lib/dinstaller/dbus/y2dir/storage/modules/PackagesProposal.rb
@@ -271,13 +272,17 @@
- lib/dinstaller/luks_activation_question.rb
- lib/dinstaller/manager.rb
- lib/dinstaller/network.rb
-- lib/dinstaller/package_callbacks.rb
- lib/dinstaller/progress.rb
- lib/dinstaller/question.rb
- lib/dinstaller/questions_manager.rb
- lib/dinstaller/security.rb
- lib/dinstaller/service_status_recorder.rb
- lib/dinstaller/software.rb
+- lib/dinstaller/software/callbacks.rb
+- lib/dinstaller/software/callbacks/media.rb
+- lib/dinstaller/software/callbacks/progress.rb
+- lib/dinstaller/software/callbacks/signature.rb
+- lib/dinstaller/software/manager.rb
- lib/dinstaller/storage.rb
- lib/dinstaller/storage/actions.rb
- lib/dinstaller/storage/callbacks.rb
++++++ gem2rpm.yml ++++++
--- /var/tmp/diff_new_pack.I0RFIC/_old 2022-12-23 10:21:39.231532553 +0100
+++ /var/tmp/diff_new_pack.I0RFIC/_new 2022-12-23 10:21:39.235532576 +0100
@@ -1,8 +1,8 @@
---
:sourceurl: "%{mod_full_name}.gem"
:preamble: |-
- BuildRequires: pkgconfig(dbus-1)
- Requires: pkgconfig(dbus-1)
+ BuildRequires: dbus-1-common
+ Requires: dbus-1-common
Requires: snapper
Requires: yast2-bootloader
Requires: yast2-country
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package cockpit-d-installer for openSUSE:Factory checked in at 2022-12-23 10:21:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cockpit-d-installer (Old)
and /work/SRC/openSUSE:Factory/.cockpit-d-installer.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cockpit-d-installer"
Fri Dec 23 10:21:24 2022 rev:2 rq:1044289 version:0
Changes:
--------
--- /work/SRC/openSUSE:Factory/cockpit-d-installer/cockpit-d-installer.changes 2022-12-07 17:37:19.245313066 +0100
+++ /work/SRC/openSUSE:Factory/.cockpit-d-installer.new.1563/cockpit-d-installer.changes 2022-12-23 10:21:25.539454303 +0100
@@ -1,0 +2,14 @@
+Thu Dec 15 10:14:22 UTC 2022 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Do not show the link to configure wifi networks when wireless is
+ not enabled (gh#yast/d-installer#323).
+- Version 0.6.2
+
+-------------------------------------------------------------------
+Thu Dec 15 08:55:02 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Display questions during the software installation (related to
+ gh#yast/d-installer#369).
+- Update to version 0.6.1
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cockpit-d-installer.spec ++++++
--- /var/tmp/diff_new_pack.dPk0D6/_old 2022-12-23 10:21:37.803524392 +0100
+++ /var/tmp/diff_new_pack.dPk0D6/_new 2022-12-23 10:21:37.807524414 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package cockpit-machines
+# spec file for package cockpit-d-installer
#
# Copyright (c) 2022 SUSE LLC
#
@@ -31,10 +31,10 @@
%include %_sourcedir/node_modules.spec.inc
BuildArch: noarch
Requires: cockpit
+BuildRequires: appstream-glib
BuildRequires: cockpit
BuildRequires: cockpit-devel >= 243
BuildRequires: local-npm-registry
-BuildRequires: appstream-glib
%description
Cockpit module for the experimental YaST D-Installer.
++++++ d-installer.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/package/_service new/d-installer/package/_service
--- old/d-installer/package/_service 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/package/_service 2022-12-15 15:26:34.000000000 +0100
@@ -5,6 +5,7 @@
<param name="scm">git</param>
<param name="revision">master</param>
<param name="subdir">web</param>
+ <param name="without-version">enable</param>
<param name="extract">package-lock.json</param>
<param name="extract">package/cockpit-d-installer.changes</param>
<param name="extract">package/cockpit-d-installer.spec</param>
@@ -16,6 +17,7 @@
</service>
<service mode="buildtime" name="tar">
<param name="obsinfo">d-installer.obsinfo</param>
+ <param name="filename">d-installer</param>
</service>
<service mode="buildtime" name="set_version">
<param name="basename">d-installer</param>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/package/cockpit-d-installer.changes new/d-installer/package/cockpit-d-installer.changes
--- old/d-installer/package/cockpit-d-installer.changes 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/package/cockpit-d-installer.changes 2022-12-15 15:26:34.000000000 +0100
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Thu Dec 15 10:14:22 UTC 2022 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Do not show the link to configure wifi networks when wireless is
+ not enabled (gh#yast/d-installer#323).
+- Version 0.6.2
+
+-------------------------------------------------------------------
+Thu Dec 15 08:55:02 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Display questions during the software installation (related to
+ gh#yast/d-installer#369).
+- Update to version 0.6.1
+
+-------------------------------------------------------------------
Mon Dec 5 13:18:37 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
- Update to version 0.6.0
@@ -10,18 +24,18 @@
(related to gh#yast/d-installer#297)
-------------------------------------------------------------------
-Fri Dec 2 10:48:14 UTC 2022 - Josef Reidinger <jreidinger(a)suse.cz>
-
-- Add support for adapting the configuration depending on the
- architecture (gh#yast/d-installer#339)
-
--------------------------------------------------------------------
Fri Dec 2 13:41:41 UTC 2022 - Jos�� Iv��n L��pez Gonz��lez <jlopez(a)suse.com>
- Add new UI for storage proposal offering LVM and encyption
options (gh#yast/d-installer#321).
-------------------------------------------------------------------
+Fri Dec 2 10:48:14 UTC 2022 - Josef Reidinger <jreidinger(a)suse.cz>
+
+- Add support for adapting the configuration depending on the
+ architecture (gh#yast/d-installer#339)
+
+-------------------------------------------------------------------
Wed Nov 30 08:16:42 UTC 2022 - Knut Alejandro Anderssen Gonz��lez <kanderssen(a)suse.de>
- Add validation for the first user creation (gh#yast/d-installer#337)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/package/cockpit-d-installer.spec new/d-installer/package/cockpit-d-installer.spec
--- old/d-installer/package/cockpit-d-installer.spec 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/package/cockpit-d-installer.spec 2022-12-15 15:26:34.000000000 +0100
@@ -24,7 +24,7 @@
URL: https://github.com/yast/d-installer
# source_validator insists that if obscpio has no version then
# tarball must neither
-Source0: d-installer-%{version}.tar
+Source0: d-installer.tar
Source10: package-lock.json
Source11: node_modules.spec.inc
Source12: node_modules.sums
@@ -40,7 +40,7 @@
Cockpit module for the experimental YaST D-Installer.
%prep
-%autosetup -p1 -n d-installer-%{version}
+%autosetup -p1 -n d-installer
rm -f package-lock.json
local-npm-registry %{_sourcedir} install --with=dev --legacy-peer-deps || ( find ~/.npm/_logs -name '*-debug.log' -print0 | xargs -0 cat; false)
@@ -50,6 +50,8 @@
%install
%make_install
+
+%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*
%files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/network/index.js new/d-installer/src/client/network/index.js
--- old/d-installer/src/client/network/index.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/network/index.js 2022-12-15 15:26:34.000000000 +0100
@@ -25,6 +25,7 @@
import { ConnectionTypes, ConnectionState } from "./model";
/**
+ * @typedef {import("./model").NetworkSettings} NetworkSettings
* @typedef {import("./model").Connection} Connection
* @typedef {import("./model").ActiveConnection} ActiveConnection
* @typedef {import("./model").IPAddress} IPAddress
@@ -37,7 +38,8 @@
ACTIVE_CONNECTION_REMOVED: "active_connection_removed",
CONNECTION_ADDED: "connection_added",
CONNECTION_UPDATED: "connection_updated",
- CONNECTION_REMOVED: "connection_removed"
+ CONNECTION_REMOVED: "connection_removed",
+ SETTINGS_UPDATED: "settings_updated"
});
/**
@@ -52,7 +54,7 @@
* @property {(connection: Connection) => Promise<any>} addConnection
* @property {(connection: Connection) => Promise<any>} updateConnection
* @property {(connection: Connection) => void} deleteConnection
- * @property {() => string} hostname
+ * @property {() => NetworkSettings} settings
* @property {() => void} setUp
*/
@@ -210,13 +212,11 @@
return conns.flatMap(c => c.addresses);
}
- /**
- * Returns the computer's hostname
- *
- * @return {string}
- */
- hostname() {
- return this.adapter.hostname();
+ /*
+ * Returns network general settings
+ */
+ settings() {
+ return this.adapter.settings();
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/network/model.js new/d-installer/src/client/network/model.js
--- old/d-installer/src/client/network/model.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/network/model.js 2022-12-15 15:26:34.000000000 +0100
@@ -108,6 +108,11 @@
*/
/**
+* @typedef {object} NetworkSettings
+* @property {boolean} wireless
+* @property {string} hostname
+
+/**
* Returns an IPv4 configuration object
*
* Defaults values can be overriden
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/network/network_manager.js new/d-installer/src/client/network/network_manager.js
--- old/d-installer/src/client/network/network_manager.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/network/network_manager.js 2022-12-15 15:26:34.000000000 +0100
@@ -28,6 +28,7 @@
import { createAccessPoint, createConnection, SecurityProtocols } from "./model";
/**
+ * @typedef {import("./model").NetworkSettings} NetworkSettings
* @typedef {import("./model").Connection} Connection
* @typedef {import("./model").ActiveConnection} ActiveConnection
* @typedef {import("./model").IPAddress} IPAddress
@@ -177,6 +178,7 @@
accessPoints: {},
activeConnections: {},
ip4Configs: {},
+ manager: null,
settings: null,
connections: {}
};
@@ -196,6 +198,7 @@
ACTIVE_CONNECTION_IFACE, ACTIVE_CONNECTION_NAMESPACE
),
ip4Configs: await this.client.proxies(IP4CONFIG_IFACE, IP4CONFIG_NAMESPACE),
+ manager: await this.client.proxy(IFACE),
settings: await this.client.proxy(SETTINGS_IFACE),
connections: await this.client.proxies(CONNECTION_IFACE, SETTINGS_NAMESPACE)
};
@@ -372,6 +375,8 @@
async subscribeToEvents() {
const activeConnectionProxies = this.proxies.activeConnections;
const connectionProxies = this.proxies.connections;
+ const managerProxy = this.proxies.manager;
+ const settingsProxy = this.proxies.settings;
/** @type {(eventType: string) => NetworkEventFn} */
const handleWrapperActiveConnection = (eventType) => (_event, proxy) => {
@@ -392,6 +397,12 @@
this.eventsHandler({ type: eventType, payload: connection });
};
+ const handleWrapperSettings = (eventType) => () => {
+ const settings = this.settingsFromProxies(managerProxy, settingsProxy);
+
+ this.eventsHandler({ type: eventType, payload: settings });
+ };
+
// FIXME: do not build a map (eventTypesMap), just inject the type here
connectionProxies.addEventListener("added", handleWrapperConnection(NetworkEventTypes.CONNECTION_ADDED));
connectionProxies.addEventListener("changed", handleWrapperConnection(NetworkEventTypes.CONNECTION_UPDATED));
@@ -401,6 +412,9 @@
activeConnectionProxies.addEventListener("added", handleWrapperActiveConnection(NetworkEventTypes.ACTIVE_CONNECTION_ADDED));
activeConnectionProxies.addEventListener("changed", handleWrapperActiveConnection(NetworkEventTypes.ACTIVE_CONNECTION_UPDATED));
activeConnectionProxies.addEventListener("removed", handleWrapperActiveConnection(NetworkEventTypes.ACTIVE_CONNECTION_REMOVED));
+
+ managerProxy.addEventListener("changed", handleWrapperSettings(NetworkEventTypes.SETTINGS_UPDATED));
+ settingsProxy.addEventListener("changed", handleWrapperSettings(NetworkEventTypes.SETTINGS_UPDATED));
}
/**
@@ -486,17 +500,19 @@
return { address: data.address.v, prefix: parseInt(data.prefix.v) };
}
- /**
- * Returns the computer's hostname
- *
- * @return {string}
- *
- * https://developer-old.gnome.org/NetworkManager/stable/gdbus-org.freedesktop…
- */
- hostname() {
- if (!this.proxies.settings) return "";
+ settingsFromProxies(manager, settings) {
+ return {
+ wireless: !!(manager?.WirelessEnabled && manager?.WirelessHardwareEnabled),
+ hostname: settings?.Hostname || ""
+ };
+ }
- return this.proxies.settings.Hostname;
+ /*
+ * Returns NetworkManager general settings
+ * @return {NetworkSettings}
+ */
+ settings() {
+ return this.settingsFromProxies(this.proxies.manager, this.proxies.settings);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/network/network_manager.test.js new/d-installer/src/client/network/network_manager.test.js
--- old/d-installer/src/client/network/network_manager.test.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/network/network_manager.test.js 2022-12-15 15:26:34.000000000 +0100
@@ -95,12 +95,15 @@
}
};
+// Reminder: by default, properties added using Object.defineProperties() are not enumerable.
+// We use #defineProperties here, so it doesn't show up as a "connection" in these objects.
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Ob…
Object.defineProperties(activeConnections, {
- addEventListener: { value: jest.fn(), enumerable: false }
+ addEventListener: { value: jest.fn() }
});
Object.defineProperties(connections, {
- addEventListener: { value: jest.fn(), enumerable: false }
+ addEventListener: { value: jest.fn() }
});
const addressesData = {
@@ -125,18 +128,26 @@
};
const ActivateConnectionFn = jest.fn();
-const networkProxy = () => ({
+
+const networkProxy = {
wait: jest.fn(),
ActivateConnection: ActivateConnectionFn,
ActiveConnections: Object.keys(activeConnections),
-});
+ WirelessEnabled: false,
+ WifiHardwareEnabled: true
+};
const AddConnectionFn = jest.fn();
-const networkSettingsProxy = () => ({
+const networkSettingsProxy = {
wait: jest.fn(),
Hostname: "testing-machine",
GetConnectionByUuid: () => "/org/freedesktop/NetworkManager/Settings/1",
- AddConnection: AddConnectionFn
+ AddConnection: AddConnectionFn,
+ addEventListener: () => ({ value: jest.fn(), enumerable: false })
+};
+
+Object.defineProperties(networkProxy, {
+ addEventListener: { value: jest.fn(), enumerable: false }
});
const connectionSettingsMock = {
@@ -172,8 +183,8 @@
describe("NetworkManagerAdapter", () => {
beforeEach(() => {
dbusClient.proxy = jest.fn().mockImplementation(iface => {
- if (iface === NM_IFACE) return networkProxy();
- if (iface === NM_SETTINGS_IFACE) return networkSettingsProxy();
+ if (iface === NM_IFACE) return networkProxy;
+ if (iface === NM_SETTINGS_IFACE) return networkSettingsProxy;
if (iface === NM_CONNECTION_IFACE) return connectionSettingsProxy();
});
@@ -345,11 +356,12 @@
});
});
- describe("#hostname", () => {
+ describe("#settings", () => {
it("returns the Network Manager settings hostname", async() => {
const client = new NetworkManagerAdapter(dbusClient);
await client.setUp();
- expect(client.hostname()).toEqual("testing-machine");
+ expect(client.settings().hostname).toEqual("testing-machine");
+ expect(client.settings().wireless).toEqual(false);
});
});
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/network.test.js new/d-installer/src/client/network.test.js
--- old/d-installer/src/client/network.test.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/network.test.js 2022-12-15 15:26:34.000000000 +0100
@@ -38,11 +38,15 @@
addresses: [{ address: "192.168.122.1", prefix: 24 }]
};
+const settings = {
+ wireless: true,
+ hostname: "localhost.localdomain"
+};
+
const adapter = {
setUp: jest.fn(),
activeConnections: jest.fn().mockReturnValue([active_conn]),
connections: jest.fn().mockReturnValue([conn]),
- hostname: jest.fn().mockReturnValue("localhost.localdomain"),
subscribe: jest.fn(),
getConnection: jest.fn(),
addConnection: jest.fn(),
@@ -50,7 +54,8 @@
deleteConnection: jest.fn(),
accessPoints: jest.fn(),
connectTo: jest.fn(),
- addAndConnectTo: jest.fn()
+ addAndConnectTo: jest.fn(),
+ settings: jest.fn().mockReturnValue(settings),
};
describe("NetworkClient", () => {
@@ -69,10 +74,11 @@
});
});
- describe("#hostname", () => {
- it("returns the hostname from the adapter", () => {
+ describe("#settings", () => {
+ it("returns network general settings", () => {
const client = new NetworkClient(adapter);
- expect(client.hostname()).toEqual("localhost.localdomain");
+ expect(client.settings().hostname).toEqual("localhost.localdomain");
+ expect(client.settings().wireless).toEqual(true);
});
});
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/storage.js new/d-installer/src/client/storage.js
--- old/d-installer/src/client/storage.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/storage.js 2022-12-15 15:26:34.000000000 +0100
@@ -95,8 +95,6 @@
/**
* Calculates a new proposal
*
- * @todo Do not send undefined values
- *
* @param {object} settings - proposal settings
* @param {?string[]} [settings.candidateDevices] - Devices to use for the proposal
* @param {?string} [settings.encryptionPassword] - Password for encrypting devices
@@ -107,24 +105,47 @@
async calculateProposal({ candidateDevices, encryptionPassword, lvm, volumes }) {
const proxy = await this.client.proxy(STORAGE_PROPOSAL_IFACE);
- const dbusVolume = volume => {
- return {
- MountPoint: cockpit.variant("s", volume.mountPoint),
- Encrypted: cockpit.variant("b", volume.encrypted),
- FsType: cockpit.variant("s", volume.fsType),
- MinSize: cockpit.variant("x", volume.minSize),
- MaxSize: cockpit.variant("x", volume.maxSize),
- FixedSizeLimits: cockpit.variant("b", volume.fixedSizeLimits),
- Snapshots: cockpit.variant("b", volume.snapshots)
- };
+ // Builds a new object without undefined attributes
+ const cleanObject = (object) => {
+ const newObject = { ...object };
+
+ Object.keys(newObject).forEach(key => newObject[key] === undefined && delete newObject[key]);
+ return newObject;
+ };
+
+ // Builds the cockpit object or returns undefined if there is no value
+ const cockpitValue = (type, value) => {
+ if (value === undefined) return undefined;
+
+ return cockpit.variant(type, value);
};
- return proxy.Calculate({
- CandidateDevices: cockpit.variant("as", candidateDevices),
- EncryptionPassword: cockpit.variant("s", encryptionPassword),
- LVM: cockpit.variant("b", lvm),
- Volumes: cockpit.variant("aa{sv}", volumes.map(dbusVolume))
+ const dbusVolume = (volume) => {
+ return cleanObject({
+ MountPoint: cockpitValue("s", volume.mountPoint),
+ Encrypted: cockpitValue("b", volume.encrypted),
+ FsType: cockpitValue("s", volume.fsType),
+ MinSize: cockpitValue("x", volume.minSize),
+ MaxSize: cockpitValue("x", volume.maxSize),
+ FixedSizeLimits: cockpitValue("b", volume.fixedSizeLimits),
+ Snapshots: cockpitValue("b", volume.snapshots)
+ });
+ };
+
+ const dbusVolumes = (volumes) => {
+ if (!volumes) return undefined;
+
+ return volumes.map(dbusVolume);
+ };
+
+ const settings = cleanObject({
+ CandidateDevices: cockpitValue("as", candidateDevices),
+ EncryptionPassword: cockpitValue("s", encryptionPassword),
+ LVM: cockpitValue("b", lvm),
+ Volumes: cockpitValue("aa{sv}", dbusVolumes(volumes))
});
+
+ return proxy.Calculate(settings);
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/client/storage.test.js new/d-installer/src/client/storage.test.js
--- old/d-installer/src/client/storage.test.js 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/client/storage.test.js 2022-12-15 15:26:34.000000000 +0100
@@ -25,6 +25,8 @@
// NOTE: should we export them?
const STORAGE_PROPOSAL_IFACE = "org.opensuse.DInstaller.Storage.Proposal1";
+const calculateFn = jest.fn();
+
const dbusClient = new DBusClient("");
const storageProposalProxy = {
wait: jest.fn(),
@@ -35,8 +37,25 @@
CandidateDevices: ["/dev/sda"],
LVM: true,
Volumes: [
- { MountPoint: { t: "s", v: "/test1" } },
- { MountPoint: { t: "s", v: "/test2" } }
+ {
+ MountPoint: { t: "s", v: "/test1" },
+ Optional: { t: "b", v: true },
+ DeviceType: { t: "s", v: "partition" },
+ Encrypted: { t: "b", v: false },
+ FsTypes: { t: "as", v: [{ t: "s" , v: "Btrfs"} , { t: "s", v: "Ext3"}] },
+ FsType: { t: "s", v: "Btrfs" },
+ MinSize: { t: "x", v: 1024 },
+ MaxSize: { t: "x", v: 2048 },
+ FixedSizeLimits: { t: "b", v: false },
+ AdaptiveSizes: { t: "b", v: false },
+ Snapshots: { t: "b", v: true },
+ SnapshotsConfigurable: { t: "b", v: true },
+ SnapshotsAffectSizes: { t: "b", v: false },
+ SizeRelevantVolumes: { t: "as", v: [] }
+ },
+ {
+ MountPoint: { t: "s", v: "/test2" }
+ }
],
Actions: [
{
@@ -44,7 +63,8 @@
Subvol: { t: "b", v: false },
Delete: { t: "b", v: false }
}
- ]
+ ],
+ Calculate: calculateFn
};
beforeEach(() => {
@@ -67,7 +87,76 @@
{ text: "Mount /dev/sdb1 as root", subvol: false, delete: false }
]);
- expect(proposal.volumes[0].mountPoint).toEqual("/test1");
+ expect(proposal.volumes[0]).toEqual({
+ mountPoint: "/test1",
+ optional: true,
+ deviceType: "partition",
+ encrypted: false,
+ fsTypes: ["Btrfs", "Ext3"],
+ fsType: "Btrfs",
+ minSize: 1024,
+ maxSize:2048,
+ fixedSizeLimits: false,
+ adaptiveSizes: false,
+ snapshots: true,
+ snapshotsConfigurable: true,
+ snapshotsAffectSizes: false,
+ sizeRelevantVolumes: []
+ });
expect(proposal.volumes[1].mountPoint).toEqual("/test2");
});
});
+
+describe("#calculate", () => {
+ it("calculates a default proposal when no settings are given", async () => {
+ const client = new StorageClient(dbusClient);
+ await client.calculateProposal({});
+
+ expect(calculateFn).toHaveBeenCalledWith({});
+ });
+
+ it("calculates a proposal with the given settings", async () => {
+ const client = new StorageClient(dbusClient);
+ await client.calculateProposal({
+ candidateDevices: ["/dev/vda"],
+ encryptionPassword: "12345",
+ lvm: true,
+ volumes: [
+ {
+ mountPoint: "/test1",
+ encrypted: false,
+ fsType: "Btrfs",
+ minSize: 1024,
+ maxSize:2048,
+ fixedSizeLimits: false,
+ snapshots: true
+ },
+ {
+ mountPoint: "/test2",
+ minSize: 1024
+ }
+ ]
+ });
+
+ expect(calculateFn).toHaveBeenCalledWith({
+ CandidateDevices: { t: "as", v: ["/dev/vda"] },
+ EncryptionPassword: { t: "s", v: "12345" },
+ LVM: { t: "b", v: true },
+ Volumes: { t: "aa{sv}", v: [
+ {
+ MountPoint: { t: "s", v: "/test1" },
+ Encrypted: { t: "b", v: false },
+ FsType: { t: "s", v: "Btrfs" },
+ MinSize: { t: "x", v: 1024 },
+ MaxSize: { t: "x", v: 2048 },
+ FixedSizeLimits: { t: "b", v: false },
+ Snapshots: { t: "b", v: true }
+ },
+ {
+ MountPoint: { t: "s", v: "/test2" },
+ MinSize: { t: "x", v: 1024 }
+ }
+ ]}
+ });
+ });
+});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/core/InstallationProgress.jsx new/d-installer/src/components/core/InstallationProgress.jsx
--- old/d-installer/src/components/core/InstallationProgress.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/core/InstallationProgress.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -23,6 +23,7 @@
import ProgressReport from "./ProgressReport";
import { Center, Title, PageIcon } from "@components/layout";
+import { Questions } from "@components/questions";
import { EOS_DOWNLOADING as Icon } from "eos-icons-react";
@@ -32,6 +33,7 @@
<Title>Installing</Title>
<PageIcon><Icon /></PageIcon>
<Center><ProgressReport /></Center>
+ <Questions />
</>
);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/network/Network.jsx new/d-installer/src/components/network/Network.jsx
--- old/d-installer/src/components/network/Network.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/network/Network.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -31,10 +31,12 @@
const [initialized, setInitialized] = useState(false);
const [connections, setConnections] = useState([]);
const [wifiSelectorOpen, setWifiSelectorOpen] = useState(false);
+ const [wireless, setWireless] = useState(false);
useEffect(() => {
if (!initialized) return;
+ setWireless(client.network.settings().wireless);
setConnections(client.network.activeConnections());
}, [client.network, initialized]);
@@ -59,6 +61,11 @@
case NetworkEventTypes.ACTIVE_CONNECTION_REMOVED: {
setConnections(conns => conns.filter(c => c.id !== payload.id));
+ break;
+ }
+
+ case NetworkEventTypes.SETTINGS_UPDATED: {
+ setWireless(payload.wireless);
}
}
});
@@ -81,10 +88,11 @@
<StackItem>
<NetworkWifiStatus connections={activeWifiConnections} />
</StackItem>
- <StackItem>
- <Button variant="link" onClick={() => setWifiSelectorOpen(true)}>Connect to a Wi-Fi network</Button>
- <WifiSelector isOpen={wifiSelectorOpen} onClose={() => setWifiSelectorOpen(false)} />
- </StackItem>
+ { wireless &&
+ <StackItem>
+ <Button variant="link" onClick={() => setWifiSelectorOpen(true)}>Connect to a Wi-Fi network</Button>
+ <WifiSelector isOpen={wifiSelectorOpen} onClose={() => setWifiSelectorOpen(false)} />
+ </StackItem> }
</Stack>
);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/network/Network.test.jsx new/d-installer/src/components/network/Network.test.jsx
--- old/d-installer/src/components/network/Network.test.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/network/Network.test.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -20,7 +20,7 @@
*/
import React from "react";
-import { screen, within } from "@testing-library/react";
+import { screen, within, waitFor } from "@testing-library/react";
import { installerRender } from "@/test-utils";
import Network from "@components/network/Network";
import { createClient } from "@client";
@@ -29,6 +29,9 @@
jest.mock("@components/network/NetworkWiredStatus", () => () => "Wired Connections");
jest.mock("@components/network/NetworkWifiStatus", () => () => "WiFi Connections");
+const networkSettings = { wireless: false, hostname: "test" };
+let settingsFn = jest.fn().mockReturnValue(networkSettings);
+
beforeEach(() => {
createClient.mockImplementation(() => {
return {
@@ -37,32 +40,55 @@
activeConnections: () => [],
connections: () => Promise.resolve([]),
accessPoints: () => [],
- onNetworkEvent: jest.fn()
+ onNetworkEvent: jest.fn(),
+ settings: settingsFn
}
};
});
});
describe("Network", () => {
- it("shows a link to open the WiFi selector", async () => {
- installerRender(<Network />);
- await screen.findByRole("button", { name: "Connect to a Wi-Fi network" });
+ describe("when it has not been initialized", () => {
+ it("renders nothing", async () => {
+ const { container } = installerRender(<Network />, { usingLayout: false });
+ await waitFor(() => expect(container).toBeEmptyDOMElement());
+ });
});
- it("renders a summary for wired and wifi connections", async () => {
- installerRender(<Network />);
+ describe("when it has been initialized", () => {
+ it("renders a summary for wired and wifi connections", async () => {
+ installerRender(<Network />);
- await screen.findByText("Wired Connections");
- await screen.findByText("WiFi Connections");
- });
+ await screen.findByText("Wired Connections");
+ await screen.findByText("WiFi Connections");
+ });
+
+ describe("when Wireless is currently not enabled", () => {
+ it("does not show a link to open the WiFi selector", async () => {
+ installerRender(<Network />, { usingLayout: false });
+ await waitFor(() => expect(screen.queryByRole("button", { name: "Connect to a Wi-Fi network" })).not.toBeInTheDocument());
+ });
+ });
- describe("when the user clicks on connect to a Wi-Fi", () => {
- it("opens the WiFi selector dialog", async () => {
- const { user } = installerRender(<Network />);
- const link = await screen.findByRole("button", { name: "Connect to a Wi-Fi network" });
- await user.click(link);
- const wifiDialog = await screen.findByRole("dialog");
- within(wifiDialog).getByText("Connect to a Wi-Fi network");
+ describe("when Wireless is currently enabled", () => {
+ beforeEach(() => {
+ settingsFn = jest.fn().mockReturnValue({ ...networkSettings, wireless: true });
+ });
+
+ it("shows a link to open the WiFi selector", async () => {
+ installerRender(<Network />);
+ await screen.findByRole("button", { name: "Connect to a Wi-Fi network" });
+ });
+
+ describe("when the user clicks on connect to a Wi-Fi", () => {
+ it("opens the WiFi selector dialog", async () => {
+ const { user } = installerRender(<Network />);
+ const link = await screen.findByRole("button", { name: "Connect to a Wi-Fi network" });
+ await user.click(link);
+ const wifiDialog = await screen.findByRole("dialog");
+ within(wifiDialog).getByText("Connect to a Wi-Fi network");
+ });
+ });
});
});
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/network/TargetIpsPopup.jsx new/d-installer/src/components/network/TargetIpsPopup.jsx
--- old/d-installer/src/components/network/TargetIpsPopup.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/network/TargetIpsPopup.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -45,7 +45,7 @@
const refreshState = () => {
setAddresses(client.network.addresses());
- setHostname(client.network.hostname());
+ setHostname(client.network.settings().hostname);
};
refreshState();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/network/TargetIpsPopup.test.jsx new/d-installer/src/components/network/TargetIpsPopup.test.jsx
--- old/d-installer/src/components/network/TargetIpsPopup.test.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/network/TargetIpsPopup.test.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -34,7 +34,8 @@
{ address: "5.6.7.8", prefix: 16 },
];
const addressFn = jest.fn().mockReturnValue(addresses);
-const hostnameFn = jest.fn().mockReturnValue("example.net");
+const networkSettings = { wireless: false, hostname: "example.net" };
+const settingsFn = jest.fn().mockReturnValue(networkSettings);
describe("TargetIpsPopup", () => {
let callbacks;
@@ -46,7 +47,7 @@
network: {
onNetworkEvent: onNetworkEventFn,
addresses: addressFn,
- hostname: hostnameFn,
+ settings: settingsFn,
setUp: jest.fn().mockResolvedValue()
}
};
@@ -77,7 +78,7 @@
await screen.findByRole("button", { name: /1.2.3.4\/24 \(example.net\)/i });
addressFn.mockReturnValue([{ address: "5.6.7.8", prefix: 24 }]);
- hostnameFn.mockReturnValue("localhost.localdomain");
+ settingsFn.mockReturnValue({ wireless: false, hostname: "localhost.localdomain" });
act(() => {
callbacks.forEach(cb => cb());
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/network/WifiSelector.jsx new/d-installer/src/components/network/WifiSelector.jsx
--- old/d-installer/src/components/network/WifiSelector.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/network/WifiSelector.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -84,7 +84,7 @@
setNetworks(data);
setActiveNetwork(networksFromValues(data).find(d => d.connection));
});
- }, [client.network, connections, activeConnections]);
+ }, [client.network, connections, activeConnections, isOpen]);
useEffect(() => {
return client.network.onNetworkEvent(({ type, payload }) => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/d-installer/src/components/storage/ProposalSettingsSection.test.jsx new/d-installer/src/components/storage/ProposalSettingsSection.test.jsx
--- old/d-installer/src/components/storage/ProposalSettingsSection.test.jsx 2022-12-05 16:55:34.000000000 +0100
+++ new/d-installer/src/components/storage/ProposalSettingsSection.test.jsx 2022-12-15 15:26:34.000000000 +0100
@@ -35,16 +35,11 @@
jest.mock("@components/storage/ProposalSettingsForm", () => FakeProposalSettingsForm);
-let candidateDevices = ["/dev/sda"];
-let encryptionPassword = "";
-let lvm = false;
-let volumes = [{ mountPoint: "/test1" }, { mountPoint: "/test2" }];
-
-const proposal = {
- candidateDevices,
- encryptionPassword,
- lvm,
- volumes
+let proposal = {
+ candidateDevices: ["/dev/sda"],
+ encryptionPassword: "",
+ lvm: false,
+ volumes: [{ mountPoint: "/test1" }, { mountPoint: "/test2" }]
};
it("renders the list of the volumes to create", () => {
@@ -111,16 +106,54 @@
expect(calculateFn).toHaveBeenCalled();
});
-describe("when lvm and encryption are not selected", () => {
+describe("when neither lvm nor encryption are selected", () => {
beforeEach(() => {
- lvm = false;
- encryptionPassword = "";
+ proposal.lvm = false;
+ proposal.encryptionPassword = "";
});
- it("renders the proper description for the selected settings", () => {
+ it("renders the proper description for the current settings", () => {
installerRender(<ProposalSettingsSection proposal={proposal} />);
screen.getByText(/Create file systems over partitions/);
});
});
+describe("when lvm is selected", () => {
+ beforeEach(() => {
+ proposal.lvm = true;
+ proposal.encryptionPassword = "";
+ });
+
+ it("renders the proper description for the current settings", () => {
+ installerRender(<ProposalSettingsSection proposal={proposal} />);
+
+ screen.getByText(/Create file systems over LVM volumes/);
+ });
+});
+
+describe("when encryption is selected", () => {
+ beforeEach(() => {
+ proposal.lvm = false;
+ proposal.encryptionPassword = "12345"
+ });
+
+ it("renders the proper description for the current settings", () => {
+ installerRender(<ProposalSettingsSection proposal={proposal} />);
+
+ screen.getByText(/Create file systems over encrypted partitions/);
+ });
+});
+
+describe("when LVM and encryption are selected", () => {
+ beforeEach(() => {
+ proposal.lvm = true;
+ proposal.encryptionPassword = "12345"
+ });
+
+ it("renders the proper description for the current settings", () => {
+ installerRender(<ProposalSettingsSection proposal={proposal} />);
+
+ screen.getByText(/Create file systems over encrypted LVM volumes/);
+ });
+});
++++++ d-installer.obsinfo ++++++
--- /var/tmp/diff_new_pack.dPk0D6/_old 2022-12-23 10:21:38.075525946 +0100
+++ /var/tmp/diff_new_pack.dPk0D6/_new 2022-12-23 10:21:38.079525969 +0100
@@ -1,5 +1,5 @@
name: d-installer
-version: 0.6.1a0b3e2
-mtime: 1670255734
-commit: 1a0b3e2b303537fee3a88f7a3d0e2dec610f481d
+version: 0.6.2.09d561d
+mtime: 1671114394
+commit: 09d561d396a67c71664c01ceb8204dcc56e24da0
++++++ node_modules.obscpio ++++++
/work/SRC/openSUSE:Factory/cockpit-d-installer/node_modules.obscpio /work/SRC/openSUSE:Factory/.cockpit-d-installer.new.1563/node_modules.obscpio differ: char 50, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yubikey-manager for openSUSE:Factory checked in at 2022-12-23 10:21:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yubikey-manager (Old)
and /work/SRC/openSUSE:Factory/.yubikey-manager.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yubikey-manager"
Fri Dec 23 10:21:22 2022 rev:21 rq:1044283 version:4.0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/yubikey-manager/yubikey-manager.changes 2022-12-06 14:23:09.773518117 +0100
+++ /work/SRC/openSUSE:Factory/.yubikey-manager.new.1563/yubikey-manager.changes 2022-12-23 10:21:23.659443559 +0100
@@ -2 +2 @@
-Sat Dec 3 17:13:35 UTC 2022 - Dirk M��ller <dmueller(a)suse.com>
+Mon Dec 19 18:58:06 UTC 2022 - Torsten Gruner <simmphonie(a)opensuse.org>
@@ -4,16 +4,3 @@
-- update to 5.0.0:
- * Various cleanups and improvements to the API.
- * Improvements to the handling of YubiKeys and connections.
- * Command aliases for ykman 3.x (introduced in ykman 4.0) have now been dropped.
- * Installers for ykman are now provided for Windows (amd64) and MacOS (universal2).
- * Logging has been improved, and a new TRAFFIC level has been introduced.
- * The codebase has been improved for scripting usage, either directly as a
- Python module, or via the new "ykman script" command.
- * PIV: Add support for dotted-string OIDs when parsing RFC4514 strings.
- * PIV: Drop support for signing certificates and CSRs with SHA-1.
- * FIDO: Credential management commands have been improved to deal with
- ambiguity in certain cases.
- * OATH: Access Keys ("remembered" passwords) are now stored in the system
- keyring.
- * OpenPGP: Commands have been added to manage PINs.
-- add keyring
+- Keep this version until version 5.0.0 or
+ yubikey-manager-qt v1.2.4 and yubioath-desktop v5.1.0 was fixed
+- Some small .spec file fixes
@@ -22 +9 @@
-Thu Oct 6 13:10:53 UTC 2022 - Torsten Gruner <simmphonie(a)opensuse.org>
+Wed Oct 5 20:03:36 UTC 2022 - Torsten Gruner <simmphonie(a)opensuse.org>
Old:
----
yubikey-manager.keyring
yubikey_manager-5.0.0.tar.gz
yubikey_manager-5.0.0.tar.gz.sig
New:
----
yubikey-manager-4.0.9.tar.gz
yubikey-manager-4.0.9.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yubikey-manager.spec ++++++
--- /var/tmp/diff_new_pack.y8BCWR/_old 2022-12-23 10:21:24.127446233 +0100
+++ /var/tmp/diff_new_pack.y8BCWR/_new 2022-12-23 10:21:24.135446279 +0100
@@ -17,41 +17,38 @@
Name: yubikey-manager
-Version: 5.0.0
+Version: 4.0.9
Release: 0
Summary: Python 3 library and command line tool for configuring a YubiKey
License: BSD-2-Clause
Group: Productivity/Security
URL: https://developers.yubico.com/yubikey-manager/Releases
-Source0: https://developers.yubico.com/yubikey-manager/Releases/yubikey_manager-%{ve…
-Source1: https://developers.yubico.com/yubikey-manager/Releases/yubikey_manager-%{ve…
-Source3: yubikey-manager.keyring
+Source0: https://developers.yubico.com/yubikey-manager/Releases/%{name}-%{version}.t…
+Source1: https://developers.yubico.com/yubikey-manager/Releases/%{name}-%{version}.t…
BuildRequires: fdupes
BuildRequires: pkgconfig
-BuildRequires: python3-click >= 8.0
+BuildRequires: python3-click
BuildRequires: python3-cryptography >= 3.0
-BuildRequires: python3-fido2 >= 1.0
-BuildRequires: python3-keyring >= 23.4
-BuildRequires: python3-makefun >= 1.9.5
+BuildRequires: python3-fido2 >= 0.9
BuildRequires: python3-pip
+BuildRequires: python3-pyscard
+BuildRequires: python3-setuptools
# TEST DEPENDENCIES
BuildRequires: python3-pyOpenSSL
-BuildRequires: python3-pyscard >= 2.0
+BuildRequires: python3-makefun >= 1.9.5
BuildRequires: python3-pytest
-BuildRequires: python3-setuptools
-Requires: python3-click >= 8.0
-Requires: python3-cryptography >= 3.0
-Requires: python3-fido2 >= 1.0
-Requires: python3-keyring >= 23.4
-Requires: python3-pyscard >= 2.0
-Recommends: python3-pyOpenSSL
-Provides: python3-yubikey-manager
-BuildArch: noarch
%if 0%{?suse_version} <= 1540
# dataclasses is required for tests if python < 3.7
BuildRequires: python3-dataclasses >= 0.8
Requires: python3-dataclasses >= 0.8
%endif
+Requires: python3-click
+Requires: python3-cryptography
+Requires: python3-fido2 >= 0.9
+Requires: python3-pyscard
+Recommends: python3-pyOpenSSL
+Provides: python3-yubikey-manager
+BuildArch: noarch
%description
Python 3 library and command line tool for configuring a YubiKey.
@@ -61,7 +58,7 @@
connection transports an programming various types of credentials.
%prep
-%autosetup -p1 -n yubikey_manager-%{version}
+%autosetup -p1
%build
%python3_build
@@ -78,7 +75,9 @@
%license COPYING*
%doc NEWS*
%{_bindir}/ykman
-%{python3_sitelib}
+%{python3_sitelib}/ykman
+%{python3_sitelib}/yubikey_manager-*.egg-info
+%{python3_sitelib}/yubikit
%{_mandir}/man1/*
%changelog
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pyerfa for openSUSE:Factory checked in at 2022-12-23 10:21:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyerfa (Old)
and /work/SRC/openSUSE:Factory/.python-pyerfa.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyerfa"
Fri Dec 23 10:21:20 2022 rev:9 rq:1044287 version:2.0.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyerfa/python-pyerfa.changes 2021-05-20 19:25:19.157878770 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyerfa.new.1563/python-pyerfa.changes 2022-12-23 10:21:22.363436152 +0100
@@ -1,0 +2,8 @@
+Thu Dec 22 14:40:49 UTC 2022 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 2.0.0.1
+ * The underlying universal functions in erfa.ufunc now work with
+ an out argument also if the required output is a structured
+ array. [gh-76]
+
+-------------------------------------------------------------------
Old:
----
pyerfa-2.0.0.tar.gz
New:
----
pyerfa-2.0.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyerfa.spec ++++++
--- /var/tmp/diff_new_pack.D1esML/_old 2022-12-23 10:21:22.871439055 +0100
+++ /var/tmp/diff_new_pack.D1esML/_new 2022-12-23 10:21:22.875439078 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pyerfa
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,31 +22,31 @@
%else
%bcond_without systemlibs
%endif
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+
%define erfaversion 2.0.0
%define skip_python2 1
-%define skip_python36 1
Name: python-pyerfa
-Version: 2.0.0
+Version: 2.0.0.1
Release: 0
Summary: Python bindings for ERFA
License: BSD-3-Clause
URL: https://github.com/liberfa/pyerfa
Source: https://files.pythonhosted.org/packages/source/p/pyerfa/pyerfa-%{version}.t…
-BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module devel}
-BuildRequires: %{python_module numpy-devel >= 1.16}
+BuildRequires: %{python_module numpy-devel >= 1.17}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-doctestplus >= 0.7}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
%if %{with systemlibs}
BuildRequires: pkgconfig(erfa) >= %{erfaversion}
%endif
-Requires: python-numpy >= 1.16
+Requires: python-numpy >= 1.17
%python_subpackages
%description
@@ -64,18 +64,20 @@
%if %{with systemlibs}
rm -rf liberfa/
%endif
+# numpy 1.24 has some new xpass ufunc tests -- https://github.com/liberfa/pyerfa/issues/99
+sed -i '/xfail_strict = true/d' setup.cfg
%build
%if %{with systemlibs}
export PYERFA_USE_SYSTEM_LIBERFA=1
%endif
-%python_build
+%pyproject_wheel
%install
%if %{with systemlibs}
export PYERFA_USE_SYSTEM_LIBERFA=1
%endif
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
@@ -86,8 +88,12 @@
%pytest_arch --pyargs erfa %{?skip_embedded_test}
%files %{python_files}
-%license LICENSE.rst licenses/ERFA.rst
+%doc README.rst
+%license LICENSE.rst
+%if !%{with systemlibs}
+%license licenses/ERFA.rst
+%endif
%{python_sitearch}/erfa
-%{python_sitearch}/pyerfa-%{version}-py*.egg-info
+%{python_sitearch}/pyerfa-%{version}.dist-info
%changelog
++++++ pyerfa-2.0.0.tar.gz -> pyerfa-2.0.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/CHANGES.rst new/pyerfa-2.0.0.1/CHANGES.rst
--- old/pyerfa-2.0.0/CHANGES.rst 2021-05-17 17:26:51.000000000 +0200
+++ new/pyerfa-2.0.0.1/CHANGES.rst 2021-11-02 20:17:42.000000000 +0100
@@ -1,4 +1,10 @@
-2.0.0 (17/05/2021)
+2.0.0.1 (2021-11-02)
+====================
+
+- The underlying universal functions in ``erfa.ufunc`` now work with an ``out``
+ argument also if the required output is a structured array. [gh-76]
+
+2.0.0 (2021-05-17)
==================
- Bundled liberfa version update to v2.0.0. This includes new functionality,
@@ -12,14 +18,14 @@
specific output file names has been removed, as it was not used.
(Note: these changes have no effect on use of PyERFA.) [gh-71]
-1.7.3 (25/04/2021)
+1.7.3 (2021-04-25)
==================
- Bundled liberfa version update to v1.7.3.
- Fixed a bug that caused the output of ``rx``, ``ry``, and ``rz`` to be
boolean rather than float for some compilers/OS. [gh-72]
-1.7.2 (25/01/2021)
+1.7.2 (2021-01-25)
==================
- Bundled liberfa version update to v1.7.2.
@@ -27,13 +33,13 @@
(backport https://github.com/astropy/astropy/pull/11224).
-1.7.1.1 (18/11/2020)
+1.7.1.1 (2020-11-18)
====================
- Fix incorrect ``__version__`` value [gh-60].
-1.7.1 (16/11/2020)
+1.7.1 (2020-11-16)
==================
- Bundled liberfa version update to v1.7.1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/PKG-INFO new/pyerfa-2.0.0.1/PKG-INFO
--- old/pyerfa-2.0.0/PKG-INFO 2021-05-17 17:27:20.522589200 +0200
+++ new/pyerfa-2.0.0.1/PKG-INFO 2021-11-02 20:18:20.977307600 +0100
@@ -1,134 +1,10 @@
Metadata-Version: 2.1
Name: pyerfa
-Version: 2.0.0
+Version: 2.0.0.1
Summary: Python bindings for ERFA
Home-page: https://github.com/liberfa/pyerfa
Author: The PyERFA Developers
License: BSD 3-Clause License
-Description: ======
- PyERFA
- ======
-
- |PyPI Status| |Zenodo| |Travis Status| |Documentation Status|
-
- PyERFA is the Python_ wrapper for the ERFA_ library (Essential Routines for
- Fundamental Astronomy), a C library containing key algorithms for astronomy,
- which is based on the SOFA library published by the International Astronomical
- Union (IAU). All C routines are wrapped as Numpy_ `universal functions
- <https://numpy.org/devdocs/reference/ufuncs.html>`_, so that they can be
- called with scalar or array inputs.
-
- The project is a split of ``astropy._erfa`` module, developed in the
- context of Astropy_ project, into a standalone package. It contains
- the ERFA_ C source code as a git submodule. The wrapping is done
- with help of the Jinja2_ template engine.
-
- If you use this package in your research, please cita it via DOI
- `10.5281/zenodo.3940699 <https://doi.org/10.5281/zenodo.3940699>`_.
-
- .. Installation
-
- Installation instructions
- -------------------------
-
- The package can be installed from the package directory using a simple::
-
- $ pip install .
-
- and similarly a wheel_ can be created with::
-
- $ pip wheel .
-
- .. note:: If you already have the C library ``liberfa`` on your
- system, you can use that by setting environment variable
- ``PYERFA_USE_SYSTEM_LIBERFA=1``.
-
-
- .. _wheel: https://github.com/pypa/wheel
-
-
- Testing
- -------
-
- For testing, one can install the packages together with its testing
- dependencies and then test it with::
-
- $ pip install .[test]
- $ pytest
-
- Alternatively, one can use ``tox``, which will set up a separate testing
- environment for you, with::
-
- $ tox -e test
-
-
- Usage
- -----
-
- The package can be imported as ``erfa`` which has all ERFA_ ufuncs wrapped with
- python code that tallies errors and warnings. Also exposed are the constants
- defined by ERFA_ in `erfam.h
- <https://github.com/liberfa/erfa/blob/master/src/erfam.h>`_, as well
- as `numpy.dtype` corresponding to structures used by ERFA_. Examples::
-
- >>> import erfa
- >>> erfa.jd2cal(2460000., [0, 1, 2, 3])
- (array([2023, 2023, 2023, 2023], dtype=int32),
- array([2, 2, 2, 2], dtype=int32),
- array([24, 25, 26, 27], dtype=int32),
- array([0.5, 0.5, 0.5, 0.5]))
- >>> erfa.plan94(2460000., [0, 1, 2, 3], 1)
- array([([ 0.09083713, -0.39041392, -0.21797389], [0.02192341, 0.00705449, 0.00149618]),
- ([ 0.11260694, -0.38275202, -0.21613731], [0.02160375, 0.00826891, 0.00217806]),
- ([ 0.13401992, -0.37387798, -0.21361622], [0.0212094 , 0.00947838, 0.00286503]),
- ([ 0.15500031, -0.36379788, -0.21040601], [0.02073822, 0.01068061, 0.0035561 ])],
- dtype={'names':['p','v'], 'formats':[('<f8', (3,)),('<f8', (3,))], 'offsets':[0,24], 'itemsize':48, 'aligned':True})
- >>> erfa.dt_pv
- dtype([('p', '<f8', (3,)), ('v', '<f8', (3,))], align=True)
- >>> erfa.dt_eraLDBODY
- dtype([('bm', '<f8'), ('dl', '<f8'), ('pv', [('p', '<f8', (3,)), ('v', '<f8', (3,))])], align=True)
- >>> erfa.DAYSEC
- 86400.0
-
- It is also possible to use the ufuncs directly, though then one has to
- deal with the warning and error states explicitly. For instance, compare::
-
- >>> erfa.jd2cal(-600000., [0, 1, 2, 3])
- Traceback (most recent call last):
- ...
- ErfaError: ERFA function "jd2cal" yielded 4 of "unacceptable date (Note 1)"
- >>> erfa.ufunc.jd2cal(-600000., [0, 1, 2, 3])
- (array([-1, -1, -1, -1], dtype=int32),
- ...,
- array([-1, -1, -1, -1], dtype=int32))
-
-
- License
- -------
-
- PyERFA is licensed under a 3-clause BSD style license - see the
- `LICENSE.rst <LICENSE.rst>`_ file.
-
-
- .. References
- .. _Python: https://www.python.org/
- .. _ERFA: https://github.com/liberfa/erfa
- .. _Numpy: https://numpy.org/
- .. _Astropy: https://www.astropy.org
- .. _Jinja2: https://palletsprojects.com/p/jinja/
- .. |PyPI Status| image:: https://img.shields.io/pypi/v/pyerfa.svg
- :target: https://pypi.python.org/pypi/pyerfa
- :alt: PyPI Status
- .. |Zenodo| image:: https://zenodo.org/badge/261332899.svg
- :target: https://zenodo.org/badge/latestdoi/261332899
- :alt: DOI 10.5281/zenodo.3940699
- .. |Travis Status| image:: https://img.shields.io/travis/liberfa/pyerfa/master?logo=travis%20ci&logoCo…
- :target: https://travis-ci.org/liberfa/pyerfa
- :alt: Travis CI Status
- .. |Documentation Status| image:: https://img.shields.io/readthedocs/pyerfa/latest.svg?logo=read%20the%20docs…
- :target: http://pyerfa.readthedocs.org/en/stable/?badge=stable
- :alt: Documentation Status
-
Keywords: astronomy,astrophysics,cosmology,space,science,coordinate
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
@@ -142,3 +18,130 @@
Requires-Python: >=3.7
Provides-Extra: test
Provides-Extra: docs
+License-File: LICENSE.rst
+
+======
+PyERFA
+======
+
+|PyPI Status| |Zenodo| |Travis Status| |Documentation Status|
+
+PyERFA is the Python_ wrapper for the ERFA_ library (Essential Routines for
+Fundamental Astronomy), a C library containing key algorithms for astronomy,
+which is based on the SOFA library published by the International Astronomical
+Union (IAU). All C routines are wrapped as Numpy_ `universal functions
+<https://numpy.org/devdocs/reference/ufuncs.html>`_, so that they can be
+called with scalar or array inputs.
+
+The project is a split of ``astropy._erfa`` module, developed in the
+context of Astropy_ project, into a standalone package. It contains
+the ERFA_ C source code as a git submodule. The wrapping is done
+with help of the Jinja2_ template engine.
+
+If you use this package in your research, please cita it via DOI
+`10.5281/zenodo.3940699 <https://doi.org/10.5281/zenodo.3940699>`_.
+
+.. Installation
+
+Installation instructions
+-------------------------
+
+The package can be installed from the package directory using a simple::
+
+ $ pip install .
+
+and similarly a wheel_ can be created with::
+
+ $ pip wheel .
+
+.. note:: If you already have the C library ``liberfa`` on your
+ system, you can use that by setting environment variable
+ ``PYERFA_USE_SYSTEM_LIBERFA=1``.
+
+
+.. _wheel: https://github.com/pypa/wheel
+
+
+Testing
+-------
+
+For testing, one can install the packages together with its testing
+dependencies and then test it with::
+
+ $ pip install .[test]
+ $ pytest
+
+Alternatively, one can use ``tox``, which will set up a separate testing
+environment for you, with::
+
+ $ tox -e test
+
+
+Usage
+-----
+
+The package can be imported as ``erfa`` which has all ERFA_ ufuncs wrapped with
+python code that tallies errors and warnings. Also exposed are the constants
+defined by ERFA_ in `erfam.h
+<https://github.com/liberfa/erfa/blob/master/src/erfam.h>`_, as well
+as `numpy.dtype` corresponding to structures used by ERFA_. Examples::
+
+ >>> import erfa
+ >>> erfa.jd2cal(2460000., [0, 1, 2, 3])
+ (array([2023, 2023, 2023, 2023], dtype=int32),
+ array([2, 2, 2, 2], dtype=int32),
+ array([24, 25, 26, 27], dtype=int32),
+ array([0.5, 0.5, 0.5, 0.5]))
+ >>> erfa.plan94(2460000., [0, 1, 2, 3], 1)
+ array([([ 0.09083713, -0.39041392, -0.21797389], [0.02192341, 0.00705449, 0.00149618]),
+ ([ 0.11260694, -0.38275202, -0.21613731], [0.02160375, 0.00826891, 0.00217806]),
+ ([ 0.13401992, -0.37387798, -0.21361622], [0.0212094 , 0.00947838, 0.00286503]),
+ ([ 0.15500031, -0.36379788, -0.21040601], [0.02073822, 0.01068061, 0.0035561 ])],
+ dtype={'names':['p','v'], 'formats':[('<f8', (3,)),('<f8', (3,))], 'offsets':[0,24], 'itemsize':48, 'aligned':True})
+ >>> erfa.dt_pv
+ dtype([('p', '<f8', (3,)), ('v', '<f8', (3,))], align=True)
+ >>> erfa.dt_eraLDBODY
+ dtype([('bm', '<f8'), ('dl', '<f8'), ('pv', [('p', '<f8', (3,)), ('v', '<f8', (3,))])], align=True)
+ >>> erfa.DAYSEC
+ 86400.0
+
+It is also possible to use the ufuncs directly, though then one has to
+deal with the warning and error states explicitly. For instance, compare::
+
+ >>> erfa.jd2cal(-600000., [0, 1, 2, 3])
+ Traceback (most recent call last):
+ ...
+ ErfaError: ERFA function "jd2cal" yielded 4 of "unacceptable date (Note 1)"
+ >>> erfa.ufunc.jd2cal(-600000., [0, 1, 2, 3])
+ (array([-1, -1, -1, -1], dtype=int32),
+ ...,
+ array([-1, -1, -1, -1], dtype=int32))
+
+
+License
+-------
+
+PyERFA is licensed under a 3-clause BSD style license - see the
+`LICENSE.rst <LICENSE.rst>`_ file.
+
+
+.. References
+.. _Python: https://www.python.org/
+.. _ERFA: https://github.com/liberfa/erfa
+.. _Numpy: https://numpy.org/
+.. _Astropy: https://www.astropy.org
+.. _Jinja2: https://palletsprojects.com/p/jinja/
+.. |PyPI Status| image:: https://img.shields.io/pypi/v/pyerfa.svg
+ :target: https://pypi.python.org/pypi/pyerfa
+ :alt: PyPI Status
+.. |Zenodo| image:: https://zenodo.org/badge/261332899.svg
+ :target: https://zenodo.org/badge/latestdoi/261332899
+ :alt: DOI 10.5281/zenodo.3940699
+.. |Travis Status| image:: https://img.shields.io/travis/liberfa/pyerfa/master?logo=travis%20ci&logoCo…
+ :target: https://travis-ci.org/liberfa/pyerfa
+ :alt: Travis CI Status
+.. |Documentation Status| image:: https://img.shields.io/readthedocs/pyerfa/latest.svg?logo=read%20the%20docs…
+ :target: http://pyerfa.readthedocs.org/en/stable/?badge=stable
+ :alt: Documentation Status
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/RELEASING.rst new/pyerfa-2.0.0.1/RELEASING.rst
--- old/pyerfa-2.0.0/RELEASING.rst 2021-05-17 17:26:51.000000000 +0200
+++ new/pyerfa-2.0.0.1/RELEASING.rst 2021-11-02 20:17:42.000000000 +0100
@@ -62,3 +62,9 @@
See the `OpenAstronomy Azure Pipelines Templates Documentation <https://openastronomy-azure-pipelines.readthedocs.io/en/latest/publish.html>`_
for more details about the Azure Pipelines set-up.
+
+Finally, for completeness, update the ``Releases`` section on the main
+github page. Click on the new tag you just made, then ``edit tag``,
+then insert ``vx.y.z`` for the version, and in the description write
+``PyERFA v`` and then paste the relevant section of ``CHANGES.rst`` to
+it. Preview to ensure this works, and then publish the release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/azure-pipelines.yml new/pyerfa-2.0.0.1/azure-pipelines.yml
--- old/pyerfa-2.0.0/azure-pipelines.yml 2021-05-17 17:26:51.000000000 +0200
+++ new/pyerfa-2.0.0.1/azure-pipelines.yml 2021-11-02 20:17:42.000000000 +0100
@@ -1,5 +1,6 @@
variables:
- CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
+ CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
+ CIBW_ARCHS_LINUX: "auto, aarch64"
resources:
repositories:
@@ -31,6 +32,15 @@
test_command: pytest --pyargs erfa
targets:
- sdist
- - wheels_linux
+ - wheels_cp*-manylinux_i686
+ - wheels_cp*-manylinux_x86_64
+ - wheels_cp37-musllinux_x86_64
+ - wheels_cp38-musllinux_x86_64
+ - wheels_cp39-musllinux_x86_64
+ - wheels_cp310-musllinux_x86_64
+ - wheels_cp37-manylinux_aarch64
+ - wheels_cp38-manylinux_aarch64
+ - wheels_cp39-manylinux_aarch64
+ - wheels_cp310-manylinux_aarch64
- wheels_macos
- wheels_windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/erfa/_version.py new/pyerfa-2.0.0.1/erfa/_version.py
--- old/pyerfa-2.0.0/erfa/_version.py 2021-05-17 17:27:20.000000000 +0200
+++ new/pyerfa-2.0.0.1/erfa/_version.py 2021-11-02 20:18:20.000000000 +0100
@@ -1,5 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '2.0.0'
-version_tuple = (2, 0, 0)
+version = '2.0.0.1'
+version_tuple = (2, 0, 0, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/erfa/tests/test_erfa.py new/pyerfa-2.0.0.1/erfa/tests/test_erfa.py
--- old/pyerfa-2.0.0/erfa/tests/test_erfa.py 2021-05-17 17:26:51.000000000 +0200
+++ new/pyerfa-2.0.0.1/erfa/tests/test_erfa.py 2021-11-02 20:17:42.000000000 +0100
@@ -286,6 +286,24 @@
np.testing.assert_allclose(astrom3['em'], 1.010428384373318379)
+def test_pv_out():
+ """Test that ufunc can also deal with 'out' argument."""
+ pv = erfa.ufunc.s2pv(np.pi/2.0, np.pi/4.0, 2.0, np.sqrt(2.0)/2.0, 0.0, 0.0)
+ pv2 = np.empty_like(pv)
+ out = erfa.ufunc.s2pv(np.pi/2.0, np.pi/4.0, 2.0, np.sqrt(2.0)/2.0, 0.0, 0.0,
+ out=pv2)
+ assert out is pv2
+ assert np.all(pv2 == pv)
+
+
+def test_zpv_out():
+ """Test that no-input routines work with 'out' argument."""
+ pv = np.zeros(10, erfa.dt_pv)
+ out = erfa.ufunc.zpv(out=pv)
+ assert out is pv
+ np.testing.assert_array_equal(pv, np.zeros(10, erfa.dt_pv))
+
+
def test_struct_ldbody():
"""
Check dt_eraLDBODY is correctly defined (regression test; gh-74)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/erfa/ufunc.c new/pyerfa-2.0.0.1/erfa/ufunc.c
--- old/pyerfa-2.0.0/erfa/ufunc.c 2021-05-17 17:27:06.000000000 +0200
+++ new/pyerfa-2.0.0.1/erfa/ufunc.c 2021-11-02 20:18:05.000000000 +0100
@@ -9537,21 +9537,32 @@
}
/*
* All inputs were ok; now check casting back to the outputs.
- * MHvK: Since no casting from structured to non-structured is
- * possible, no changes needed here.
+ * For void, only allow casting to the same void.
*/
for (i = nin; i < nop; ++i) {
if (op[i] != NULL) {
- PyArray_Descr *tmp = PyArray_DescrFromType(types[i]);
- if (tmp == NULL) {
- return -1;
+ if (types[i] == NPY_VOID && dtypes != NULL) {
+ PyArray_Descr *op_descr = PyArray_DESCR(op[i]);
+ /*
+ * MHvK: for VOID, we only allow VOID->same VOID.
+ */
+ if (op_descr->type_num != NPY_VOID
+ || !PyArray_EquivTypes(op_descr, dtypes[i])) {
+ return 0;
+ }
}
- if (!PyArray_CanCastTypeTo(tmp, PyArray_DESCR(op[i]),
+ else {
+ PyArray_Descr *tmp = PyArray_DescrFromType(types[i]);
+ if (tmp == NULL) {
+ return -1;
+ }
+ if (!PyArray_CanCastTypeTo(tmp, PyArray_DESCR(op[i]),
casting)) {
+ Py_DECREF(tmp);
+ return 0;
+ }
Py_DECREF(tmp);
- return 0;
}
- Py_DECREF(tmp);
}
}
return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/erfa/ufunc.c.templ new/pyerfa-2.0.0.1/erfa/ufunc.c.templ
--- old/pyerfa-2.0.0/erfa/ufunc.c.templ 2021-05-17 17:26:51.000000000 +0200
+++ new/pyerfa-2.0.0.1/erfa/ufunc.c.templ 2021-11-02 20:17:42.000000000 +0100
@@ -402,21 +402,32 @@
}
/*
* All inputs were ok; now check casting back to the outputs.
- * MHvK: Since no casting from structured to non-structured is
- * possible, no changes needed here.
+ * For void, only allow casting to the same void.
*/
for (i = nin; i < nop; ++i) {
if (op[i] != NULL) {
- PyArray_Descr *tmp = PyArray_DescrFromType(types[i]);
- if (tmp == NULL) {
- return -1;
+ if (types[i] == NPY_VOID && dtypes != NULL) {
+ PyArray_Descr *op_descr = PyArray_DESCR(op[i]);
+ /*
+ * MHvK: for VOID, we only allow VOID->same VOID.
+ */
+ if (op_descr->type_num != NPY_VOID
+ || !PyArray_EquivTypes(op_descr, dtypes[i])) {
+ return 0;
+ }
}
- if (!PyArray_CanCastTypeTo(tmp, PyArray_DESCR(op[i]),
+ else {
+ PyArray_Descr *tmp = PyArray_DescrFromType(types[i]);
+ if (tmp == NULL) {
+ return -1;
+ }
+ if (!PyArray_CanCastTypeTo(tmp, PyArray_DESCR(op[i]),
casting)) {
+ Py_DECREF(tmp);
+ return 0;
+ }
Py_DECREF(tmp);
- return 0;
}
- Py_DECREF(tmp);
}
}
return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyerfa-2.0.0/pyerfa.egg-info/PKG-INFO new/pyerfa-2.0.0.1/pyerfa.egg-info/PKG-INFO
--- old/pyerfa-2.0.0/pyerfa.egg-info/PKG-INFO 2021-05-17 17:27:20.000000000 +0200
+++ new/pyerfa-2.0.0.1/pyerfa.egg-info/PKG-INFO 2021-11-02 20:18:20.000000000 +0100
@@ -1,134 +1,10 @@
Metadata-Version: 2.1
Name: pyerfa
-Version: 2.0.0
+Version: 2.0.0.1
Summary: Python bindings for ERFA
Home-page: https://github.com/liberfa/pyerfa
Author: The PyERFA Developers
License: BSD 3-Clause License
-Description: ======
- PyERFA
- ======
-
- |PyPI Status| |Zenodo| |Travis Status| |Documentation Status|
-
- PyERFA is the Python_ wrapper for the ERFA_ library (Essential Routines for
- Fundamental Astronomy), a C library containing key algorithms for astronomy,
- which is based on the SOFA library published by the International Astronomical
- Union (IAU). All C routines are wrapped as Numpy_ `universal functions
- <https://numpy.org/devdocs/reference/ufuncs.html>`_, so that they can be
- called with scalar or array inputs.
-
- The project is a split of ``astropy._erfa`` module, developed in the
- context of Astropy_ project, into a standalone package. It contains
- the ERFA_ C source code as a git submodule. The wrapping is done
- with help of the Jinja2_ template engine.
-
- If you use this package in your research, please cita it via DOI
- `10.5281/zenodo.3940699 <https://doi.org/10.5281/zenodo.3940699>`_.
-
- .. Installation
-
- Installation instructions
- -------------------------
-
- The package can be installed from the package directory using a simple::
-
- $ pip install .
-
- and similarly a wheel_ can be created with::
-
- $ pip wheel .
-
- .. note:: If you already have the C library ``liberfa`` on your
- system, you can use that by setting environment variable
- ``PYERFA_USE_SYSTEM_LIBERFA=1``.
-
-
- .. _wheel: https://github.com/pypa/wheel
-
-
- Testing
- -------
-
- For testing, one can install the packages together with its testing
- dependencies and then test it with::
-
- $ pip install .[test]
- $ pytest
-
- Alternatively, one can use ``tox``, which will set up a separate testing
- environment for you, with::
-
- $ tox -e test
-
-
- Usage
- -----
-
- The package can be imported as ``erfa`` which has all ERFA_ ufuncs wrapped with
- python code that tallies errors and warnings. Also exposed are the constants
- defined by ERFA_ in `erfam.h
- <https://github.com/liberfa/erfa/blob/master/src/erfam.h>`_, as well
- as `numpy.dtype` corresponding to structures used by ERFA_. Examples::
-
- >>> import erfa
- >>> erfa.jd2cal(2460000., [0, 1, 2, 3])
- (array([2023, 2023, 2023, 2023], dtype=int32),
- array([2, 2, 2, 2], dtype=int32),
- array([24, 25, 26, 27], dtype=int32),
- array([0.5, 0.5, 0.5, 0.5]))
- >>> erfa.plan94(2460000., [0, 1, 2, 3], 1)
- array([([ 0.09083713, -0.39041392, -0.21797389], [0.02192341, 0.00705449, 0.00149618]),
- ([ 0.11260694, -0.38275202, -0.21613731], [0.02160375, 0.00826891, 0.00217806]),
- ([ 0.13401992, -0.37387798, -0.21361622], [0.0212094 , 0.00947838, 0.00286503]),
- ([ 0.15500031, -0.36379788, -0.21040601], [0.02073822, 0.01068061, 0.0035561 ])],
- dtype={'names':['p','v'], 'formats':[('<f8', (3,)),('<f8', (3,))], 'offsets':[0,24], 'itemsize':48, 'aligned':True})
- >>> erfa.dt_pv
- dtype([('p', '<f8', (3,)), ('v', '<f8', (3,))], align=True)
- >>> erfa.dt_eraLDBODY
- dtype([('bm', '<f8'), ('dl', '<f8'), ('pv', [('p', '<f8', (3,)), ('v', '<f8', (3,))])], align=True)
- >>> erfa.DAYSEC
- 86400.0
-
- It is also possible to use the ufuncs directly, though then one has to
- deal with the warning and error states explicitly. For instance, compare::
-
- >>> erfa.jd2cal(-600000., [0, 1, 2, 3])
- Traceback (most recent call last):
- ...
- ErfaError: ERFA function "jd2cal" yielded 4 of "unacceptable date (Note 1)"
- >>> erfa.ufunc.jd2cal(-600000., [0, 1, 2, 3])
- (array([-1, -1, -1, -1], dtype=int32),
- ...,
- array([-1, -1, -1, -1], dtype=int32))
-
-
- License
- -------
-
- PyERFA is licensed under a 3-clause BSD style license - see the
- `LICENSE.rst <LICENSE.rst>`_ file.
-
-
- .. References
- .. _Python: https://www.python.org/
- .. _ERFA: https://github.com/liberfa/erfa
- .. _Numpy: https://numpy.org/
- .. _Astropy: https://www.astropy.org
- .. _Jinja2: https://palletsprojects.com/p/jinja/
- .. |PyPI Status| image:: https://img.shields.io/pypi/v/pyerfa.svg
- :target: https://pypi.python.org/pypi/pyerfa
- :alt: PyPI Status
- .. |Zenodo| image:: https://zenodo.org/badge/261332899.svg
- :target: https://zenodo.org/badge/latestdoi/261332899
- :alt: DOI 10.5281/zenodo.3940699
- .. |Travis Status| image:: https://img.shields.io/travis/liberfa/pyerfa/master?logo=travis%20ci&logoCo…
- :target: https://travis-ci.org/liberfa/pyerfa
- :alt: Travis CI Status
- .. |Documentation Status| image:: https://img.shields.io/readthedocs/pyerfa/latest.svg?logo=read%20the%20docs…
- :target: http://pyerfa.readthedocs.org/en/stable/?badge=stable
- :alt: Documentation Status
-
Keywords: astronomy,astrophysics,cosmology,space,science,coordinate
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
@@ -142,3 +18,130 @@
Requires-Python: >=3.7
Provides-Extra: test
Provides-Extra: docs
+License-File: LICENSE.rst
+
+======
+PyERFA
+======
+
+|PyPI Status| |Zenodo| |Travis Status| |Documentation Status|
+
+PyERFA is the Python_ wrapper for the ERFA_ library (Essential Routines for
+Fundamental Astronomy), a C library containing key algorithms for astronomy,
+which is based on the SOFA library published by the International Astronomical
+Union (IAU). All C routines are wrapped as Numpy_ `universal functions
+<https://numpy.org/devdocs/reference/ufuncs.html>`_, so that they can be
+called with scalar or array inputs.
+
+The project is a split of ``astropy._erfa`` module, developed in the
+context of Astropy_ project, into a standalone package. It contains
+the ERFA_ C source code as a git submodule. The wrapping is done
+with help of the Jinja2_ template engine.
+
+If you use this package in your research, please cita it via DOI
+`10.5281/zenodo.3940699 <https://doi.org/10.5281/zenodo.3940699>`_.
+
+.. Installation
+
+Installation instructions
+-------------------------
+
+The package can be installed from the package directory using a simple::
+
+ $ pip install .
+
+and similarly a wheel_ can be created with::
+
+ $ pip wheel .
+
+.. note:: If you already have the C library ``liberfa`` on your
+ system, you can use that by setting environment variable
+ ``PYERFA_USE_SYSTEM_LIBERFA=1``.
+
+
+.. _wheel: https://github.com/pypa/wheel
+
+
+Testing
+-------
+
+For testing, one can install the packages together with its testing
+dependencies and then test it with::
+
+ $ pip install .[test]
+ $ pytest
+
+Alternatively, one can use ``tox``, which will set up a separate testing
+environment for you, with::
+
+ $ tox -e test
+
+
+Usage
+-----
+
+The package can be imported as ``erfa`` which has all ERFA_ ufuncs wrapped with
+python code that tallies errors and warnings. Also exposed are the constants
+defined by ERFA_ in `erfam.h
+<https://github.com/liberfa/erfa/blob/master/src/erfam.h>`_, as well
+as `numpy.dtype` corresponding to structures used by ERFA_. Examples::
+
+ >>> import erfa
+ >>> erfa.jd2cal(2460000., [0, 1, 2, 3])
+ (array([2023, 2023, 2023, 2023], dtype=int32),
+ array([2, 2, 2, 2], dtype=int32),
+ array([24, 25, 26, 27], dtype=int32),
+ array([0.5, 0.5, 0.5, 0.5]))
+ >>> erfa.plan94(2460000., [0, 1, 2, 3], 1)
+ array([([ 0.09083713, -0.39041392, -0.21797389], [0.02192341, 0.00705449, 0.00149618]),
+ ([ 0.11260694, -0.38275202, -0.21613731], [0.02160375, 0.00826891, 0.00217806]),
+ ([ 0.13401992, -0.37387798, -0.21361622], [0.0212094 , 0.00947838, 0.00286503]),
+ ([ 0.15500031, -0.36379788, -0.21040601], [0.02073822, 0.01068061, 0.0035561 ])],
+ dtype={'names':['p','v'], 'formats':[('<f8', (3,)),('<f8', (3,))], 'offsets':[0,24], 'itemsize':48, 'aligned':True})
+ >>> erfa.dt_pv
+ dtype([('p', '<f8', (3,)), ('v', '<f8', (3,))], align=True)
+ >>> erfa.dt_eraLDBODY
+ dtype([('bm', '<f8'), ('dl', '<f8'), ('pv', [('p', '<f8', (3,)), ('v', '<f8', (3,))])], align=True)
+ >>> erfa.DAYSEC
+ 86400.0
+
+It is also possible to use the ufuncs directly, though then one has to
+deal with the warning and error states explicitly. For instance, compare::
+
+ >>> erfa.jd2cal(-600000., [0, 1, 2, 3])
+ Traceback (most recent call last):
+ ...
+ ErfaError: ERFA function "jd2cal" yielded 4 of "unacceptable date (Note 1)"
+ >>> erfa.ufunc.jd2cal(-600000., [0, 1, 2, 3])
+ (array([-1, -1, -1, -1], dtype=int32),
+ ...,
+ array([-1, -1, -1, -1], dtype=int32))
+
+
+License
+-------
+
+PyERFA is licensed under a 3-clause BSD style license - see the
+`LICENSE.rst <LICENSE.rst>`_ file.
+
+
+.. References
+.. _Python: https://www.python.org/
+.. _ERFA: https://github.com/liberfa/erfa
+.. _Numpy: https://numpy.org/
+.. _Astropy: https://www.astropy.org
+.. _Jinja2: https://palletsprojects.com/p/jinja/
+.. |PyPI Status| image:: https://img.shields.io/pypi/v/pyerfa.svg
+ :target: https://pypi.python.org/pypi/pyerfa
+ :alt: PyPI Status
+.. |Zenodo| image:: https://zenodo.org/badge/261332899.svg
+ :target: https://zenodo.org/badge/latestdoi/261332899
+ :alt: DOI 10.5281/zenodo.3940699
+.. |Travis Status| image:: https://img.shields.io/travis/liberfa/pyerfa/master?logo=travis%20ci&logoCo…
+ :target: https://travis-ci.org/liberfa/pyerfa
+ :alt: Travis CI Status
+.. |Documentation Status| image:: https://img.shields.io/readthedocs/pyerfa/latest.svg?logo=read%20the%20docs…
+ :target: http://pyerfa.readthedocs.org/en/stable/?badge=stable
+ :alt: Documentation Status
+
+
1
0