podman-desktop: 0.12.0 -> 1.13.2

This commit is contained in:
Ihar Hrachyshka 2024-10-16 02:22:36 +00:00
parent 1b89990e78
commit d4e06ddc97
4 changed files with 36 additions and 231 deletions

View File

@ -1,50 +1,42 @@
{ lib
, stdenv
, fetchFromGitHub
, applyPatches
, fetchYarnDeps
, yarn
, fixup-yarn-lock
, nodejs
, makeWrapper
, copyDesktopItems
, electron
, nodejs
, pnpm
, makeDesktopItem
, xcbuild
, autoSignDarwinBinariesHook
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "podman-desktop";
version = "1.12.0";
version = "1.13.2";
src = applyPatches {
src = fetchFromGitHub {
owner = "containers";
repo = "podman-desktop";
rev = "v${finalAttrs.version}";
sha256 = "sha256-AdiomKM2RfJQKnyrcsdh8FtX7NuAj3g0KQ3pzy76gYI=";
};
# fix handling of Unix epoch timestamps for zip header, https://github.com/cthackers/adm-zip/pull/518
# apply the patch early so that fetchYarnDeps can pull the patched yarn.lock
patches = [
./patches/0001-chore-deps-bump-adm-zip-from-0.5.14-to-0.5.15.patch
];
passthru.updateScript = nix-update-script { };
src = fetchFromGitHub {
owner = "containers";
repo = "podman-desktop";
rev = "v${finalAttrs.version}";
sha256 = "sha256-07lf9jy22JUT+Vc5y9Tu1nkWaXU5RTdu3GibcvQsSs8=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
sha256 = "sha256-y3ftK2SrysaWoHKEUeTF7aFp3yKmKcdVEJtOOKLr2G0=";
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-mkWbFFv0IdLtog6uZM6xgTNlQPC+ytUQD8po8yiv/6Y=";
};
patches = [
# podman should be installed with nix; disable auto-installation
./patches/extension-no-download-podman.patch
./patches/fix-yarn-lock-deterministic.patch
];
postPatch = ''
for file in packages/main/src/tray-animate-icon.ts extensions/podman/src/util.ts packages/main/src/plugin/certificates.ts; do
for file in packages/main/src/tray-animate-icon.ts extensions/podman/packages/extension/src/util.ts packages/main/src/plugin/certificates.ts; do
substituteInPlace "$file" \
--replace 'process.resourcesPath' "'$out/share/lib/podman-desktop/resources'" \
--replace '(process as any).resourcesPath' "'$out/share/lib/podman-desktop/resources'"
@ -54,10 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
nativeBuildInputs = [
yarn
fixup-yarn-lock
nodejs
makeWrapper
makeWrapper nodejs pnpm.configHook
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
copyDesktopItems
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
@ -65,23 +54,9 @@ stdenv.mkDerivation (finalAttrs: {
autoSignDarwinBinariesHook
];
configurePhase = ''
runHook preConfigure
export HOME="$TMPDIR"
yarn config --offline set yarn-offline-mirror "$offlineCache"
fixup-yarn-lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn --offline run build
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
@ -89,7 +64,9 @@ stdenv.mkDerivation (finalAttrs: {
export CSC_IDENTITY_AUTO_DISCOVERY=false
sed -i "/afterSign/d" .electron-builder.config.cjs
'' + ''
yarn --offline run electron-builder --dir \
pnpm build
./node_modules/.bin/electron-builder \
--dir \
--config .electron-builder.config.cjs \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version}
@ -138,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = with lib; {
description = "A graphical tool for developing on containers and Kubernetes";
homepage = "https://podman-desktop.io";
changelog = "https://github.com/containers/podman-desktop/releases/tag/v${finalAttrs.version}";
changelog = "https://github.com/containers/podman-desktop/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ panda2134 ];
inherit (electron.meta) platforms;

View File

@ -1,170 +0,0 @@
From 4712fa5535ff32fccc24743c67708a34c8d621b3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 12 Aug 2024 06:11:35 +0000
Subject: [PATCH] chore(deps): bump adm-zip from 0.5.14 to 0.5.15
Bumps [adm-zip](https://github.com/cthackers/adm-zip) from 0.5.14 to 0.5.15.
- [Release notes](https://github.com/cthackers/adm-zip/releases)
- [Changelog](https://github.com/cthackers/adm-zip/blob/master/history.md)
- [Commits](https://github.com/cthackers/adm-zip/compare/v0.5.14...v0.5.15)
---
updated-dependencies:
- dependency-name: adm-zip
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
---
extensions/compose/package.json | 2 +-
extensions/docker/package.json | 2 +-
extensions/kind/package.json | 2 +-
extensions/kube-context/package.json | 2 +-
extensions/kubectl-cli/package.json | 2 +-
extensions/lima/package.json | 2 +-
extensions/podman/package.json | 2 +-
extensions/registries/package.json | 2 +-
package.json | 2 +-
yarn.lock | 8 ++++----
10 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/extensions/compose/package.json b/extensions/compose/package.json
index f9e706770b..f1837ef285 100644
--- a/extensions/compose/package.json
+++ b/extensions/compose/package.json
@@ -157,7 +157,7 @@
"devDependencies": {
"@podman-desktop/api": "^0.0.1",
"@types/mustache": "^4.2.5",
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"mkdirp": "^3.0.1",
"vite": "^5.3.5",
"vitest": "^1.6.0"
diff --git a/extensions/docker/package.json b/extensions/docker/package.json
index 148c792c4b..e762cdc8b7 100644
--- a/extensions/docker/package.json
+++ b/extensions/docker/package.json
@@ -20,7 +20,7 @@
"@podman-desktop/api": "^0.0.1"
},
"devDependencies": {
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"@podman-desktop/api": "^0.0.1",
"mkdirp": "^3.0.1",
"vite": "^5.3.5",
diff --git a/extensions/kind/package.json b/extensions/kind/package.json
index 2a3aebc146..8f62a0c314 100644
--- a/extensions/kind/package.json
+++ b/extensions/kind/package.json
@@ -108,7 +108,7 @@
"yaml": "^2.5.0"
},
"devDependencies": {
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"mkdirp": "^3.0.1",
"tmp-promise": "^3.0.3",
"tsx": "^4.17.0",
diff --git a/extensions/kube-context/package.json b/extensions/kube-context/package.json
index cc783d1270..a9ce1df721 100644
--- a/extensions/kube-context/package.json
+++ b/extensions/kube-context/package.json
@@ -42,7 +42,7 @@
"js-yaml": "^4.1.0"
},
"devDependencies": {
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"@types/js-yaml": "^4.0.9",
"mkdirp": "^3.0.1",
"vite": "^5.3.5",
diff --git a/extensions/kubectl-cli/package.json b/extensions/kubectl-cli/package.json
index 4ad90d77ac..252d9e630e 100644
--- a/extensions/kubectl-cli/package.json
+++ b/extensions/kubectl-cli/package.json
@@ -152,7 +152,7 @@
},
"devDependencies": {
"@types/semver": "^7.5.8",
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"byline": "^5.0.0",
"copyfiles": "^2.4.1",
"mkdirp": "^3.0.1",
diff --git a/extensions/lima/package.json b/extensions/lima/package.json
index 375426f6ba..4203715800 100644
--- a/extensions/lima/package.json
+++ b/extensions/lima/package.json
@@ -67,7 +67,7 @@
"@podman-desktop/api": "^0.0.1"
},
"devDependencies": {
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"mkdirp": "^3.0.1",
"vite": "^5.3.5",
"vitest": "^1.6.0",
diff --git a/extensions/podman/package.json b/extensions/podman/package.json
index 1c2491d173..8456532d62 100644
--- a/extensions/podman/package.json
+++ b/extensions/podman/package.json
@@ -391,7 +391,7 @@
"devDependencies": {
"@types/ssh2": "^1.15.0",
"@types/sshpk": "^1.17.4",
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"hasha": "^6.0.0",
"mkdirp": "^3.0.1",
"nock": "^14.0.0-beta.7",
diff --git a/extensions/registries/package.json b/extensions/registries/package.json
index 6b2fa237f9..36051db6f9 100644
--- a/extensions/registries/package.json
+++ b/extensions/registries/package.json
@@ -21,7 +21,7 @@
"@podman-desktop/api": "^0.0.1"
},
"devDependencies": {
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"mkdirp": "^3.0.1",
"vite": "^5.3.5",
"vitest": "^1.6.0"
diff --git a/package.json b/package.json
index f14bca5363..8c3f767ecf 100644
--- a/package.json
+++ b/package.json
@@ -177,7 +177,7 @@
"@segment/analytics-node": "^2.1.2",
"@types/semver": "^7.5.8",
"@types/stream-json": "^1.7.7",
- "adm-zip": "^0.5.14",
+ "adm-zip": "^0.5.15",
"check-disk-space": "^3.4.0",
"chokidar": "^3.6.0",
"compare-versions": "^6.1.1",
diff --git a/yarn.lock b/yarn.lock
index 023b8df270..81f672d028 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7325,10 +7325,10 @@ address@^1.0.1, address@^1.1.2:
resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6"
integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==
-adm-zip@^0.5.14:
- version "0.5.14"
- resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.14.tgz#2c557c0bf12af4311cf6d32970f4060cf8133b2a"
- integrity sha512-DnyqqifT4Jrcvb8USYjp6FHtBpEIz1mnXu6pTRHZ0RL69LbQYiO+0lDFg5+OKA7U29oWSs3a/i8fhn8ZcceIWg==
+adm-zip@^0.5.15:
+ version "0.5.15"
+ resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.15.tgz#c2c9b3d4f3b1c911e72b2394e84fd91bcc81e08e"
+ integrity sha512-jYPWSeOA8EFoZnucrKCNihqBjoEGQSU4HKgHYQgKNEQ0pQF9a/DYuo/+fAxY76k4qe75LUlLWpAM1QWcBMTOKw==
agent-base@6:
version "6.0.2"
--
2.46.0

View File

@ -1,8 +1,17 @@
diff --git a/extensions/podman/package.json b/extensions/podman/package.json
index 3c827750e0..ce7b79d119 100644
--- a/extensions/podman/package.json
+++ b/extensions/podman/package.json
@@ -376,7 +376,7 @@
From f6dfc258742d03bd0270e9fded925ffa75cc60b0 Mon Sep 17 00:00:00 2001
From: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Date: Sat, 21 Sep 2024 18:56:02 -0400
Subject: [PATCH] Don't download podman
---
extensions/podman/packages/extension/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/podman/packages/extension/package.json b/extensions/podman/packages/extension/package.json
index 1824d817f1..d1cc9a5dbf 100644
--- a/extensions/podman/packages/extension/package.json
+++ b/extensions/podman/packages/extension/package.json
@@ -369,7 +369,7 @@
}
},
"scripts": {
@ -11,3 +20,5 @@ index 3c827750e0..ce7b79d119 100644
"test": "vitest run --coverage --passWithNoTests",
"test:watch": "vitest watch --coverage --passWithNoTests",
"watch": "vite build -w"
--
2.46.0

View File

@ -1,13 +0,0 @@
diff --git a/yarn.lock b/yarn.lock
index 0a3e336a2c..a39e473631 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -17736,7 +17736,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
-semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.1, semver@^7.6.2, semver@^7.6.3:
+semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.5.8, semver@^7.6.0, semver@^7.6.1, semver@^7.6.2, semver@^7.6.3:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==