fireshare: expose the run_as section. (#2999)

This commit is contained in:
Stavros Kois
2025-08-21 12:53:53 +03:00
committed by GitHub
parent eeb46f3fb2
commit 6376619e73
5 changed files with 82 additions and 32 deletions

View File

@@ -2,80 +2,80 @@
"lockfile_version": "1",
"packages": {
"git@latest": {
"last_modified": "2025-06-20T02:24:11Z",
"resolved": "github:NixOS/nixpkgs/076e8c6678d8c54204abcb4b1b14c366835a58bb#git",
"last_modified": "2025-07-28T17:09:23Z",
"resolved": "github:NixOS/nixpkgs/648f70160c03151bc2121d179291337ad6bc564b#git",
"source": "devbox-search",
"version": "2.49.0",
"version": "2.50.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/ir2bhb7n3ngh0dg7p6jbhm1wa4d8gkb7-git-2.49.0",
"path": "/nix/store/jn9byxgdjndngf0d2by0djg8gcdll7xc-git-2.50.1",
"default": true
},
{
"name": "doc",
"path": "/nix/store/f0bi1v08ki7pq6a4rzhjhnp5szj3940k-git-2.49.0-doc"
"path": "/nix/store/j8djmq64ckbah7bl6jv1y6arrjr0shmv-git-2.50.1-doc"
}
],
"store_path": "/nix/store/ir2bhb7n3ngh0dg7p6jbhm1wa4d8gkb7-git-2.49.0"
"store_path": "/nix/store/jn9byxgdjndngf0d2by0djg8gcdll7xc-git-2.50.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/5p8ljxbgnk31zxbz8hvrfkg1qfgiv3qi-git-2.49.0",
"path": "/nix/store/h4pvvix6pvnvys9a6y1xj2442r1ajdhl-git-2.50.1",
"default": true
},
{
"name": "doc",
"path": "/nix/store/hxw5vli42579b8bkxv6nq2p2z4vjvw97-git-2.49.0-doc"
"path": "/nix/store/q8sicpx16gyzxnp3345a46lj4cz9wd09-git-2.50.1-doc"
},
{
"name": "debug",
"path": "/nix/store/isw51rw1b78yw6k454m7h402k88n291w-git-2.49.0-debug"
"path": "/nix/store/rpxnrnsn4nbx8wm9d2vrgj0fr5xzz5lg-git-2.50.1-debug"
}
],
"store_path": "/nix/store/5p8ljxbgnk31zxbz8hvrfkg1qfgiv3qi-git-2.49.0"
"store_path": "/nix/store/h4pvvix6pvnvys9a6y1xj2442r1ajdhl-git-2.50.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/72qfjivfnm6kzdfbiavvici8bi3jzrs6-git-2.49.0",
"path": "/nix/store/8d1n8cvi5x1j0v61459lvhqs26vmcqbl-git-2.50.1",
"default": true
},
{
"name": "doc",
"path": "/nix/store/900nidzjyaa0950wk104vzgb82h5wspi-git-2.49.0-doc"
"path": "/nix/store/yn9cvbs7jz4dfdb17qralgr0ybi5rmjf-git-2.50.1-doc"
}
],
"store_path": "/nix/store/72qfjivfnm6kzdfbiavvici8bi3jzrs6-git-2.49.0"
"store_path": "/nix/store/8d1n8cvi5x1j0v61459lvhqs26vmcqbl-git-2.50.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rzqvhv48m3nh8g3j4k6jmz6yqy8apr95-git-2.49.0",
"path": "/nix/store/5i8zvall945kypmwgqd0y47f02pldwp4-git-2.50.1",
"default": true
},
{
"name": "debug",
"path": "/nix/store/201xjz2py285323n3y7r30frdwbdnb6q-git-2.49.0-debug"
"path": "/nix/store/l46kpjpcwwp8l7kzzr1s2dlk646r73z2-git-2.50.1-debug"
},
{
"name": "doc",
"path": "/nix/store/zcjdp82yx46w8yp1inxkkzb3a3k05a0m-git-2.49.0-doc"
"path": "/nix/store/d2lhlzkdziwmijik8nszfwp8srbkskb9-git-2.50.1-doc"
}
],
"store_path": "/nix/store/rzqvhv48m3nh8g3j4k6jmz6yqy8apr95-git-2.49.0"
"store_path": "/nix/store/5i8zvall945kypmwgqd0y47f02pldwp4-git-2.50.1"
}
}
},
"github:NixOS/nixpkgs/nixpkgs-unstable": {
"last_modified": "2025-07-09T16:14:05Z",
"resolved": "github:NixOS/nixpkgs/be9e214982e20b8310878ac2baa063a961c1bdf6?lastModified=1752077645&narHash=sha256-HM791ZQtXV93xtCY%2BZxG1REzhQenSQO020cu6rHtAPk%3D"
"last_modified": "2025-08-19T04:17:39Z",
"resolved": "github:NixOS/nixpkgs/97eb7ee0da337d385ab015a23e15022c865be75c?lastModified=1755577059&narHash=sha256-5hYhxIpco8xR%2BIpP3uU56%2B4%2BBw7mf7EMyxS%2FHqUYHQY%3D"
},
"python3Packages.bcrypt": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#python3Packages.bcrypt",
@@ -148,9 +148,9 @@
}
},
"python@3.11": {
"last_modified": "2025-06-20T02:24:11Z",
"last_modified": "2025-07-28T17:09:23Z",
"plugin_version": "0.0.4",
"resolved": "github:NixOS/nixpkgs/076e8c6678d8c54204abcb4b1b14c366835a58bb#python311",
"resolved": "github:NixOS/nixpkgs/648f70160c03151bc2121d179291337ad6bc564b#python311",
"source": "devbox-search",
"version": "3.11.13",
"systems": {
@@ -158,49 +158,49 @@
"outputs": [
{
"name": "out",
"path": "/nix/store/qa0k8h8zngwdzan3cvsmkb1nfq5zb9c5-python3-3.11.13",
"path": "/nix/store/ifxz6hniba9h7p1lcfi8zd4xpslgsy6x-python3-3.11.13",
"default": true
}
],
"store_path": "/nix/store/qa0k8h8zngwdzan3cvsmkb1nfq5zb9c5-python3-3.11.13"
"store_path": "/nix/store/ifxz6hniba9h7p1lcfi8zd4xpslgsy6x-python3-3.11.13"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/7wn1v5c5z8pf45pb12kic9xw4pdrsyl9-python3-3.11.13",
"path": "/nix/store/9gj7a7mjy47l19xx1sh8zrgh687ilqbs-python3-3.11.13",
"default": true
},
{
"name": "debug",
"path": "/nix/store/fy8ynxlxzhl3765y508yh945qsagpajf-python3-3.11.13-debug"
"path": "/nix/store/ixsm2j4hkbwbdvx35qyy4lb0hycg0cix-python3-3.11.13-debug"
}
],
"store_path": "/nix/store/7wn1v5c5z8pf45pb12kic9xw4pdrsyl9-python3-3.11.13"
"store_path": "/nix/store/9gj7a7mjy47l19xx1sh8zrgh687ilqbs-python3-3.11.13"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/ylnasr0xkb01z2n6sskx9j1mq2nlilxb-python3-3.11.13",
"path": "/nix/store/bg2fr8g676s6cvf6afh7md21bz86j4sv-python3-3.11.13",
"default": true
}
],
"store_path": "/nix/store/ylnasr0xkb01z2n6sskx9j1mq2nlilxb-python3-3.11.13"
"store_path": "/nix/store/bg2fr8g676s6cvf6afh7md21bz86j4sv-python3-3.11.13"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rjjg82plny7gzlxh1pwjdmf7wd0zdwp3-python3-3.11.13",
"path": "/nix/store/xldyfac0kbcl5c1yp9ygsag5y23irwxs-python3-3.11.13",
"default": true
},
{
"name": "debug",
"path": "/nix/store/b9109y466px7wgbsdl00idn0b2k3zzlx-python3-3.11.13-debug"
"path": "/nix/store/5ay9f62pyshj15dxfpvw40wa8w6pzwbc-python3-3.11.13-debug"
}
],
"store_path": "/nix/store/rjjg82plny7gzlxh1pwjdmf7wd0zdwp3-python3-3.11.13"
"store_path": "/nix/store/xldyfac0kbcl5c1yp9ygsag5y23irwxs-python3-3.11.13"
}
}
}

View File

@@ -41,4 +41,4 @@ sources:
- https://hub.docker.com/r/shaneisrael/fireshare
title: Fireshare
train: community
version: 1.0.6
version: 1.0.7

View File

@@ -0,0 +1,6 @@
migrations:
- file: run_as_migration
from:
max_version: 1.0.6
target:
min_version: 1.0.7

View File

@@ -0,0 +1,22 @@
#!/usr/bin/python3
import os
import sys
import yaml
def migrate(values):
if "run_as" not in values:
# The default user of the container
# https://github.com/ShaneIsrael/fireshare/blob/570ab5286cc606bee74d443bba9954b9a6b2f055/entrypoint.sh#L5
values["run_as"] = {"user": 1000, "group": 1000}
return values
if __name__ == "__main__":
if len(sys.argv) != 2:
exit(1)
if os.path.exists(sys.argv[1]):
with open(sys.argv[1], "r") as f:
print(yaml.dump(migrate(yaml.safe_load(f.read()))))

View File

@@ -94,6 +94,28 @@ questions:
label: Value
schema:
type: string
- variable: run_as
label: ""
group: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that Fireshare files will be owned by.
schema:
type: int
min: 568
default: 568
required: true
- variable: group
label: Group ID
description: The group id that Fireshare files will be owned by.
schema:
type: int
min: 568
default: 568
required: true
- variable: network
label: ""