Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 3 additions & 60 deletions nixos/modules/programs/tsm-client.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
config,
lib,
options,
pkgs,
...
}: # XXX migration code for freeform settings: `options` can be removed in 2025
let
optionsGlobal = options;
in
}:

let

Expand Down Expand Up @@ -75,7 +71,7 @@ let
{
freeformType = attrsOf (either scalarType (listOf scalarType));
# Client system-options file directives are explained here:
# https://www.ibm.com/docs/en/storage-protect/8.1.25?topic=commands-processing-options
# https://www.ibm.com/docs/en/storage-protect/8.1.27?topic=commands-processing-options
options.servername = mkOption {
type = servernameType;
default = name;
Expand Down Expand Up @@ -150,27 +146,6 @@ let
};
config.commmethod = mkDefault "v6tcpip"; # uses v4 or v6, based on dns lookup result
config.passwordaccess = if config.genPasswd then "generate" else "prompt";
# XXX migration code for freeform settings, these can be removed in 2025:
options.warnings = optionsGlobal.warnings;
options.assertions = optionsGlobal.assertions;
imports =
let
inherit (lib.modules) mkRemovedOptionModule mkRenamedOptionModule;
in
[
(mkRemovedOptionModule [ "extraConfig" ]
"Please just add options directly to the server attribute set, cf. the description of `programs.tsmClient.servers`."
)
(mkRemovedOptionModule [ "text" ]
"Please just add options directly to the server attribute set, cf. the description of `programs.tsmClient.servers`."
)
(mkRenamedOptionModule [ "name" ] [ "servername" ])
(mkRenamedOptionModule [ "server" ] [ "tcpserveraddress" ])
(mkRenamedOptionModule [ "port" ] [ "tcpport" ])
(mkRenamedOptionModule [ "node" ] [ "nodename" ])
(mkRenamedOptionModule [ "passwdDir" ] [ "passworddir" ])
(mkRenamedOptionModule [ "includeExclude" ] [ "inclexcl" ])
];
};

options.programs.tsmClient = {
Expand Down Expand Up @@ -291,16 +266,7 @@ let
contain duplicate names
(note that setting names are case insensitive).
'';
}) cfg.servers)
# XXX migration code for freeform settings, this can be removed in 2025:
++ (enrichMigrationInfos "assertions" (
addText:
{ assertion, message }:
{
inherit assertion;
message = addText message;
}
));
}) cfg.servers);

makeDsmSysLines =
key: value:
Expand Down Expand Up @@ -340,17 +306,6 @@ let
attrs = removeAttrs serverCfg [
"servername"
"genPasswd"
# XXX migration code for freeform settings, these can be removed in 2025:
"assertions"
"warnings"
"extraConfig"
"text"
"name"
"server"
"port"
"node"
"passwdDir"
"includeExclude"
];
in
''
Expand All @@ -369,16 +324,6 @@ let
${concatLines (map makeDsmSysStanza (attrValues cfg.servers))}
'';

# XXX migration code for freeform settings, this can be removed in 2025:
enrichMigrationInfos =
what: how:
concatLists (
mapAttrsToList (
name: serverCfg:
map (how (text: "In `programs.tsmClient.servers.${name}`: ${text}")) serverCfg."${what}"
) cfg.servers
);

in

{
Expand All @@ -393,8 +338,6 @@ in
dsmSysApi = dsmSysCli;
};
environment.systemPackages = [ cfg.wrappedPackage ];
# XXX migration code for freeform settings, this can be removed in 2025:
warnings = enrichMigrationInfos "warnings" (addText: addText);
};

meta.maintainers = [ lib.maintainers.yarny ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/backup/tsm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ in
environment.HOME = "/var/lib/tsm-backup";
serviceConfig = {
# for exit status description see
# https://www.ibm.com/docs/en/storage-protect/8.1.25?topic=clients-client-return-codes
# https://www.ibm.com/docs/en/storage-protect/8.1.27?topic=clients-client-return-codes
SuccessExitStatus = "4 8";
# The `-se` option must come after the command.
# The `-optfile` option suppresses a `dsm.opt`-not-found warning.
Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/ts/tsm-client/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# point to this derivations `/dsmi_dir` directory symlink.
# Other environment variables might be necessary,
# depending on local configuration or usage; see:
# https://www.ibm.com/docs/en/storage-protect/8.1.25?topic=solaris-set-api-environment-variables
# https://www.ibm.com/docs/en/storage-protect/8.1.27?topic=solaris-set-api-environment-variables

let

Expand Down Expand Up @@ -91,10 +91,10 @@ let

unwrapped = stdenv.mkDerivation (finalAttrs: {
name = "tsm-client-${finalAttrs.version}-unwrapped";
version = "8.1.25.0";
version = "8.1.27.0";
src = fetchurl {
url = mkSrcUrl finalAttrs.version;
hash = "sha512-OPNjSMnWJ/8Ogy9O0wG0H4cEbYiOwyCVzkWhpG00v/Vm0LDxLzPteMnMOyH8L1egIDhy7lmQYSzI/EC4WWUDDA==";
hash = "sha512-nbQHoD7fUp4qBTgRJ6nHXF4PsZRTin7FGPi340jKc73O/9DCNb1JQG/gY+B2xzPM2g6agqWu/MX5J+Wt0nOEkA==";
};
inherit meta passthru;

Expand Down
Loading