File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 # package: tpm
9696 # secrets:
9797 # token: ${{ secrets.HUB_JWT }}
98+ lshw :
99+ uses : ./.github/workflows/bin-package.yaml
100+ with :
101+ package : lshw
102+ secrets :
103+ token : ${{ secrets.HUB_JWT }}
98104 qsfs :
99105 uses : ./.github/workflows/bin-package-no-tag.yaml
100106 with :
Original file line number Diff line number Diff line change 1+ LSHW_VERSION=" B.02.20"
2+ LSHW_CHECKSUM=" 5805eba5f31886582fff673c5dccdb3b"
3+ LSHW_LINK=" https://github.com/lyonel/lshw/archive/refs/tags/${LSHW_VERSION} .tar.gz"
4+
5+ download_lshw () {
6+ download_file ${LSHW_LINK} ${LSHW_CHECKSUM} lshw-${LSHW_VERSION} .tar.gz
7+ }
8+
9+ dependencies_lshw () {
10+ apt-get install -y build-essential gcc g++ make
11+ }
12+
13+ extract_lshw () {
14+ if [ ! -d " lshw-${LSHW_VERSION} " ]; then
15+ echo " [+] extracting: lshw-${LSHW_VERSION} "
16+ tar -xf ${DISTDIR} /lshw-${LSHW_VERSION} .tar.gz -C ${WORKDIR}
17+ fi
18+ }
19+
20+ prepare_lshw () {
21+ echo " [+] configuring lshw"
22+ github_name " lshw-${LSHW_VERSION} "
23+ }
24+
25+ compile_lshw () {
26+ pushd src
27+ # Build static binary
28+ make static
29+ popd
30+ }
31+
32+ install_lshw () {
33+ echo " [+] installing lshw to initramfs"
34+
35+ mkdir -p " ${ROOTDIR} /usr/sbin"
36+ mkdir -p " ${ROOTDIR} /usr/share/man/man1"
37+ mkdir -p " ${ROOTDIR} /usr/share/lshw"
38+
39+ # Install the static binary
40+ cp src/lshw-static " ${ROOTDIR} /usr/sbin/lshw"
41+ chmod +x " ${ROOTDIR} /usr/sbin/lshw"
42+
43+ cp src/lshw.1 " ${ROOTDIR} /usr/share/man/man1/"
44+ cp src/pci.ids src/usb.ids src/oui.txt src/manuf.txt src/pnp.ids src/pnpid.txt " ${ROOTDIR} /usr/share/lshw/"
45+ }
46+
47+ build_lshw () {
48+ dependencies_lshw
49+
50+ pushd " ${DISTDIR} "
51+ download_lshw
52+ popd
53+
54+ pushd " ${WORKDIR} "
55+ extract_lshw
56+
57+ pushd " lshw-${LSHW_VERSION} "
58+ prepare_lshw
59+ compile_lshw
60+ install_lshw
61+ popd
62+
63+ popd
64+ }
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ use std::path::Path;
1111
1212#[ derive( Deserialize ) ]
1313struct ZosConfig {
14- hub_url : Vec < String > ,
14+ hub_urls : Vec < String > ,
1515}
1616
17- fn get_hub_url ( runmode : & RunMode ) -> Result < Vec < String > > {
17+ fn get_hub_urls ( runmode : & RunMode ) -> Result < Vec < String > > {
1818 let base_url = "https://github.com/threefoldtech/zos-config/raw/main/" ;
1919 let config_filename = match runmode {
2020 RunMode :: Prod => "production.json" ,
@@ -43,10 +43,10 @@ fn get_hub_url(runmode: &RunMode) -> Result<Vec<String>> {
4343 Err ( _) => return Ok ( fallback) ,
4444 } ;
4545
46- if config. hub_url . is_empty ( ) {
46+ if config. hub_urls . is_empty ( ) {
4747 Ok ( fallback)
4848 } else {
49- Ok ( config. hub_url )
49+ Ok ( config. hub_urls )
5050 }
5151}
5252
@@ -86,7 +86,7 @@ impl Repo {
8686 T : AsRef < str > ,
8787 {
8888 let config = crate :: config:: Config :: current ( ) ?;
89- let hub = get_hub_url ( & config. runmode ) ?;
89+ let hub = get_hub_urls ( & config. runmode ) ?;
9090 Ok ( Repo {
9191 name : String :: from ( name. as_ref ( ) ) ,
9292 hub,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ require (
1717 github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2
1818 github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.8
1919 github.com/threefoldtech/zbus v1.0.1
20- github.com/threefoldtech/zosbase v0.1.11-0.20250722101116-fb41de052e4a
20+ github.com/threefoldtech/zosbase v0.1.11-0.20250729092219-8aa23b682790
2121 github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa
2222 gopkg.in/yaml.v2 v2.4.0
2323)
Original file line number Diff line number Diff line change @@ -562,8 +562,8 @@ github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.8 h1:BDuus/zqEBDsmPQA0h3
562562github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.8 /go.mod h1:93SROfr+QjgaJ5/jIWtIpLkhaD8Pv8WbdfwvwMNG2p4 =
563563github.com/threefoldtech/zbus v1.0.1 h1:3KaEpyOiDYAw+lrAyoQUGIvY9BcjVRXlQ1beBRqhRNk =
564564github.com/threefoldtech/zbus v1.0.1 /go.mod h1:E/v/xEvG/l6z/Oj0aDkuSUXFm/1RVJkhKBwDTAIdsHo =
565- github.com/threefoldtech/zosbase v0.1.11-0.20250722101116-fb41de052e4a h1:6WmHqKgLlmloUpSzBQAzUNYt/pJrVmSVFG0nHW0Y3X0 =
566- github.com/threefoldtech/zosbase v0.1.11-0.20250722101116-fb41de052e4a /go.mod h1:v3moVR/JyNGG8LhiPhq6oPyAYdVL+AluCsmj4c0EzfA =
565+ github.com/threefoldtech/zosbase v0.1.11-0.20250729092219-8aa23b682790 h1:8b3sjTH1QQn1ciOm458idHEjgPXacYnU9C3xgX8LtTw =
566+ github.com/threefoldtech/zosbase v0.1.11-0.20250729092219-8aa23b682790 /go.mod h1:v3moVR/JyNGG8LhiPhq6oPyAYdVL+AluCsmj4c0EzfA =
567567github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0 =
568568github.com/tinylib/msgp v1.1.5 /go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg =
569569github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU =
You can’t perform that action at this time.
0 commit comments