@dotpi/tools 2.9.7 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186,6 +186,31 @@ KBEOF
186
186
  dpkg-reconfigure -f noninteractive keyboard-configuration
187
187
  fi
188
188
 
189
+ # Adapt swap to low-memory devices (eg. Raspberry Pi Zero 2 W)
190
+ memory_kb=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
191
+
192
+ # test for 3GB, to cope with some unavailable memory (MemTotal reports less)
193
+ if (( memory_kb < $(( 3 * 1024 * 1024 )) )) ; then
194
+ dotpi echo_warning "Low memory device detected: configure 2GB swap"
195
+
196
+ rpi_swap_directory="/etc/rpi"
197
+
198
+ # Trixie
199
+ if [[ -f "${rpi_swap_directory}/swap.conf" ]] ; then
200
+ rpi_swap_directory_user="${rpi_swap_directory}/swap.conf.d"
201
+ sudo mkdir -p "$rpi_swap_directory_user"
202
+ sudo cp "${DOTPI_ROOT}/share/swap/99-dotpi-2GB-swapfile.conf" "${rpi_swap_directory_user}"
203
+
204
+ # Bookworm
205
+ elif [[ -f /etc/dphys-swapfile ]] ; then
206
+ sudo cp "${DOTPI_ROOT}/share/swap/dotpi-2GB-dphys-swapfile" /etc/dphys-swapfile
207
+
208
+ else
209
+ dotpi echo_ERROR "No known swap configuration found, unable to configure."
210
+ fi
211
+
212
+ fi
213
+
189
214
  # read again as it may have changed
190
215
  FIRSTUSER="$(getent passwd 1000 | cut -d: -f1)"
191
216
 
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@dotpi/avahi-monitor-module",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "A tool to monitor and restart Avahi service",
5
5
  "scripts": {
6
6
  "postinstall": "./dotpi_install",
7
7
  "preuninstall": "./dotpi_uninstall"
8
8
  },
9
- "license": "BSD-3-clause"
9
+ "license": "BSD-3-clause",
10
+ "gitHead": "0321bc097fea5755a4af8a2d59c9392d30bd452c"
10
11
  }
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/javascript",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "dotpi javascript utilities",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,5 +12,6 @@
12
12
  "chalk": "^5.4.0",
13
13
  "execa": "^9.5.2",
14
14
  "template-literal": "^1.0.4"
15
- }
15
+ },
16
+ "gitHead": "0321bc097fea5755a4af8a2d59c9392d30bd452c"
16
17
  }
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,8 +8,9 @@
8
8
  },
9
9
  "license": "BSD-3-clause",
10
10
  "dependencies": {
11
- "@dotpi/javascript": "^1.6.2",
11
+ "@dotpi/javascript": "^1.6.3",
12
12
  "execa": "^9.5.2",
13
13
  "globby": "^14.0.2"
14
- }
14
+ },
15
+ "gitHead": "0321bc097fea5755a4af8a2d59c9392d30bd452c"
15
16
  }
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice, this
12
+ list of conditions and the following disclaimer in the documentation and/or
13
+ other materials provided with the distribution.
14
+
15
+ * Neither the name of the IRCAM nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module-module",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "bin": "./bin/dotpi_module",
@@ -10,8 +10,9 @@
10
10
  },
11
11
  "license": "BSD-3-clause",
12
12
  "dependencies": {
13
- "@dotpi/javascript": "^1.6.2",
14
- "@dotpi/module": "^1.8.2",
13
+ "@dotpi/javascript": "^1.6.3",
14
+ "@dotpi/module": "^1.8.3",
15
15
  "commander": "^12.1.0"
16
- }
16
+ },
17
+ "gitHead": "0321bc097fea5755a4af8a2d59c9392d30bd452c"
17
18
  }
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ /usr/bin/env node /opt/dotpi/share/n/bin/corepack "${@}"
4
+
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ /opt/dotpi/share/n/bin/node --lite_mode --optimize_for_size "${@}"
4
+
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ /usr/bin/env node /opt/dotpi/share/n/bin/npm "${@}"
4
+
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ /usr/bin/env node /opt/dotpi/share/n/bin/npx "${@}"
4
+
@@ -0,0 +1,11 @@
1
+ # This file is for Debian Trixie
2
+ # Force a 2GB swap on constrained device (eg. Raspberry Pi Zero 2 W)
3
+
4
+ [Main]
5
+ Mechanism=swapfile
6
+
7
+ [File]
8
+ FixedSizeMiB=2048
9
+
10
+ [Zram]
11
+ FixedSizeMiB=2048
@@ -0,0 +1,5 @@
1
+ # This file is for Debian Bookworm
2
+ # Force a 2GB swap on constrained device (eg. Raspberry Pi Zero 2 W)
3
+
4
+ # set size to absolute value
5
+ CONF_SWAPSIZE=2048
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/tools",
3
- "version": "2.9.7",
3
+ "version": "2.10.1",
4
4
  "description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
5
5
  "author": "Jean-Philippe Lambert",
6
6
  "contributors": [
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "license": "BSD-3-Clause",
38
38
  "dependencies": {
39
- "@dotpi/javascript": "^1.6.2",
40
- "@dotpi/module": "^1.8.2",
39
+ "@dotpi/javascript": "^1.6.3",
40
+ "@dotpi/module": "^1.8.3",
41
41
  "chalk": "^5.3.0",
42
42
  "commander": "^12.1.0",
43
43
  "prompts": "^2.4.2",
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "lerna": "^8.2.4"
48
48
  },
49
- "gitHead": "4a302d365f76441e33f76ec552939e341a620e41"
49
+ "gitHead": "0321bc097fea5755a4af8a2d59c9392d30bd452c"
50
50
  }