@dotpi/tools 1.3.3 → 2.3.2
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.
- package/.editorbackup/NOTES.md~ +974 -0
- package/.editorbackup/PIPEWIRE.md~ +42 -0
- package/.editorbackup/README.md~ +335 -0
- package/BACKUP-SANDO.command +61 -0
- package/BACKUP-SISIDO.command +61 -0
- package/NOTES.md +41 -1
- package/README.md +3 -13
- package/dotpi_root/bin/dotpi +1 -0
- package/dotpi_root/bin/dotpi_prepare_sd_card +34 -22
- package/dotpi_root/bin/dotpi_prepare_system +113 -68
- package/dotpi_root/bin/package.json +6 -0
- package/dotpi_root/{share/dotpi_avahi_monitor → dist/@dotpi/avahi_monitor}/dotpi_avahi_monitor.service +1 -5
- package/dotpi_root/dist/@dotpi/avahi_monitor/dotpi_install +21 -0
- package/dotpi_root/dist/@dotpi/avahi_monitor/dotpi_uninstall +17 -0
- package/dotpi_root/dist/@dotpi/avahi_monitor/package.json +10 -0
- package/dotpi_root/dist/@dotpi/javascript/bash.js +103 -0
- package/dotpi_root/dist/@dotpi/javascript/echo.js +13 -0
- package/dotpi_root/dist/@dotpi/javascript/filesystem.js +25 -0
- package/dotpi_root/dist/@dotpi/javascript/package.json +12 -0
- package/dotpi_root/dist/@dotpi/javascript/service.js +49 -0
- package/dotpi_root/dist/@dotpi/javascript/system.js +36 -0
- package/dotpi_root/dist/@dotpi/javascript/template.js +13 -0
- package/dotpi_root/dist/@dotpi/javascript/user.js +32 -0
- package/dotpi_root/dist/@dotpi/module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module/bin/dotpi_module +13 -0
- package/dotpi_root/dist/@dotpi/module/dotpi_install +52 -0
- package/dotpi_root/dist/@dotpi/module/dotpi_uninstall +50 -0
- package/dotpi_root/dist/@dotpi/module/package.json +22 -0
- package/dotpi_root/dist/@dotpi/module/src/configuration.js +43 -0
- package/dotpi_root/dist/@dotpi/module/src/createConfig.js +108 -0
- package/dotpi_root/dist/@dotpi/module/src/definition.js +7 -0
- package/dotpi_root/dist/@dotpi/module/src/index.js +0 -0
- package/dotpi_root/dist/@dotpi/module/src/install.js +145 -0
- package/dotpi_root/dist/@dotpi/module/src/uninstall.js +180 -0
- package/dotpi_root/etc/dotpi_environment_default.bash +16 -0
- package/dotpi_root/etc/dotpi_init.d/.gitkeep +0 -0
- package/dotpi_root/etc/dotpi_modules.json +8 -0
- package/dotpi_root/lib/package.json +6 -0
- package/dotpi_root/share/dotpi_audio_bluetooth/dotpi_audio_pipewire_relink +7 -6
- package/dotpi_root/share/dotpi_audio_bluetooth/package.json +6 -0
- package/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device.bash +12 -26
- package/dotpi_root/share/dotpi_functions/dotpi_functions_configuration.bash +2 -2
- package/dotpi_root/share/dotpi_functions/dotpi_functions_service.bash +6 -2
- package/dotpi_root/share/dotpi_functions/dotpi_functions_system.bash +11 -0
- package/dotpi_root/share/dotpi_functions/dotpi_functions_user.bash +28 -0
- package/dotpi_root/share/dotpi_functions.bash +4 -4
- package/dotpi_root/share/dotpi_init.bash +10 -1
- package/dotpi_root/share/dotpi_pipewire/bin/dotpi_pipewire_relink +86 -0
- package/dotpi_root/share/dotpi_pipewire/dotpi_install +24 -0
- package/dotpi_root/share/dotpi_pipewire/package.json +9 -0
- package/dotpi_root/share/dotpi_pipewire/systemd/dotpi_pipewire.service +22 -0
- package/dotpi_root/share/dotpi_pipewire/systemd/dotpi_pipewire_command +29 -0
- package/dotpi_root/share/limits/zzz_dotpi_audio.conf +2 -6
- package/dotpi_root/share/wireplumber/wireplumber.conf.d/dotpi-wireplumber-config.conf +8 -0
- package/lerna.json +4 -0
- package/package.json +12 -2
- package/projects/asterismes.tgz +0 -0
- package/projects/example-bluetooth/configuration/.editorbackup/dotpi_instance_001.bash~ +4 -0
- package/projects/example-bluetooth/configuration/.editorbackup/dotpi_instance_002.bash~ +3 -0
- package/projects/example-bluetooth/configuration/.editorbackup/dotpi_project.bash~ +46 -0
- package/projects/example-bluetooth/configuration/dotpi_instance_001.bash +3 -0
- package/projects/example-bluetooth/configuration/dotpi_instance_002.bash +3 -0
- package/projects/example-bluetooth/configuration/dotpi_project.bash +48 -0
- package/projects/example-development/configuration/.editorbackup/dotpi_project.bash~ +59 -0
- package/projects/example-development/configuration/dotpi_instance_114.bash +4 -0
- package/projects/example-headphones/configuration/.editorbackup/dotpi_project.bash~ +18 -0
- package/projects/example-hifiberry/configuration/.editorbackup/dotpi_instance_012.bash~ +4 -0
- package/projects/example-hifiberry/configuration/.editorbackup/dotpi_project.bash~ +18 -0
- package/projects/example-network/configuration/.editorbackup/dotpi_project.bash~ +21 -0
- package/projects/led-test/.dotpi +3 -0
- package/projects/led-test/README.md +16 -0
- package/projects/led-test/dotpi_project.bash +29 -0
- package/projects/old/bad/.editorbackup/dotpi_environment_instance.bash~ +1 -0
- package/projects/old/bad/.editorbackup/dotpi_environment_project.bash~ +26 -0
- package/projects/old/bad/.editorbackup/dotpi_project.bash~ +33 -0
- package/projects/old/bad/.editorbackup/dotpi_tmp.bash~ +3 -0
- package/projects/old/bad/.editorbackup/wpa_supplicant.conf~ +37 -0
- package/projects/old/bad/dotpi_project.bash +20 -0
- package/projects/old/bluetooth/.editorbackup/dotpi_environment_instance.bash~ +1 -0
- package/projects/old/bluetooth/.editorbackup/dotpi_environment_project.bash~ +26 -0
- package/projects/old/bluetooth/.editorbackup/dotpi_project.bash~ +21 -0
- package/projects/old/bluetooth/.editorbackup/dotpi_tmp.bash~ +3 -0
- package/projects/old/bluetooth/.editorbackup/wpa_supplicant.conf~ +37 -0
- package/projects/old/bluetooth/dotpi_project.bash +29 -0
- package/projects/old/dev.zip +0 -0
- package/projects/old/example/.editorbackup/dotpi_environment_instance.bash~ +1 -0
- package/projects/old/example/.editorbackup/dotpi_environment_project.bash~ +26 -0
- package/projects/old/example/.editorbackup/dotpi_project.bash~ +21 -0
- package/projects/old/example/.editorbackup/dotpi_tmp.bash~ +3 -0
- package/projects/old/example/.editorbackup/wpa_supplicant.conf~ +37 -0
- package/projects/old/example/configuration/.editorbackup/dotpi_project.bash~ +21 -0
- package/projects/old/example/configuration/dotpi_project.bash +21 -0
- package/projects/qsddsqsd/.dotpi +3 -0
- package/projects/qsddsqsd/README.md +16 -0
- package/projects/qsddsqsd/dotpi_project.bash +29 -0
- package/src/constants.js +4 -4
- package/src/create-project.js +124 -56
- package/src/templates/dotpi_project.bash +5 -7
- package/src/utils.js +2 -2
- package/test/create-project.test.js +0 -1
- package/dotpi_root/share/jackd/dotpi_jackd_bluetooth.bash +0 -18
- package/dotpi_root/share/jackd/dotpi_jackd_command +0 -26
- package/dotpi_root/share/jackd/dotpi_jackd_headphones.bash +0 -21
- package/dotpi_root/share/jackd/dotpi_jackd_hifiberry.bash +0 -17
- package/dotpi_root/share/jackd/jackd.service +0 -22
- /package/dotpi_root/{share/dotpi_avahi_monitor → dist/@dotpi/avahi_monitor}/dotpi_avahi_monitor_command +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Pipewire
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
### Alsa
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Jackd
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Search for `spa` or `libspa` for plugins, in particular:
|
|
18
|
+
|
|
19
|
+
- [ ] jack
|
|
20
|
+
- [ ] alsa
|
|
21
|
+
- [ ] alsa only? (multiple clients through pipewire)
|
|
22
|
+
- [ ]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
See also `pipewire-media-session` `apt` package.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Run with session
|
|
29
|
+
|
|
30
|
+
Need a user session?
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
systemctl --user status pipewire
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Start with `pw-jack`
|
|
37
|
+
|
|
38
|
+
Is it possible to bypass that with the `ld` over-ride?
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/
|
|
42
|
+
```
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# dotpi-install
|
|
2
|
+
|
|
3
|
+
## Intro
|
|
4
|
+
|
|
5
|
+
This utility prepares a Raspberry Pi for running in a `dotpi` system. It serves several purposes:
|
|
6
|
+
|
|
7
|
+
- locally configure a project
|
|
8
|
+
- run locally to prepare the SD card
|
|
9
|
+
- run on Raspberry Pi to prepare the remote system
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
In the `project` folder, select a project that is close to your needs: `example-dev` is quite complete.
|
|
14
|
+
|
|
15
|
+
Do not forget to install the pair SSH keys from `projects/example-dev/secrets/ssh` to local you `${HOME}/.ssh` configuration.
|
|
16
|
+
|
|
17
|
+
- Download and install the Raspberry Pi Imager.
|
|
18
|
+
- Select OS (operating system)
|
|
19
|
+
<<<<<<< HEAD
|
|
20
|
+
- Choose `Rapsberry Pi OS (other)`
|
|
21
|
+
- Choose `Rapsberry Pi OS Lite (64-bit)`
|
|
22
|
+
=======
|
|
23
|
+
- Choose `Rapsberry Pi OS (other)`
|
|
24
|
+
- Choose `Rapsberry Pi OS Lite (64-bit)`
|
|
25
|
+
- For Raspberry Pi 3, you may need to separately download a non-legacy OS, and choose `Use custom`
|
|
26
|
+
>>>>>>> develop
|
|
27
|
+
- Insert a new SD card in your computer
|
|
28
|
+
- Select it as the storage
|
|
29
|
+
|
|
30
|
+
- You may change somme settings. In particular, you can choose *not* to eject media when done, to avoid pulling the SD card out, then inserting it again.
|
|
31
|
+
- Write the SD card
|
|
32
|
+
- You you choose to apply the settings, these will be the defaults before applying the `dotpi` settings
|
|
33
|
+
|
|
34
|
+
In a terminal:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
# change path to the dotpi-install folder
|
|
38
|
+
cd ~/src/dotpi-install
|
|
39
|
+
|
|
40
|
+
# prepare the SD car with the chosen project
|
|
41
|
+
./dotpi_root/bin/dotpi_prepare_sd_card --project ./projects/example-dev
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Type the instance number, or accept the default. The first instance will be `1`
|
|
45
|
+
|
|
46
|
+
- Put the SD card into a Raspberry
|
|
47
|
+
- Power it on
|
|
48
|
+
- Connect it to the internet, and to you computer
|
|
49
|
+
|
|
50
|
+
You may then copy the last line to get info of the remote process.
|
|
51
|
+
|
|
52
|
+
Any SSH operation will wait until the network on the Raspberry Pi is ready.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
# This will monitor the first instance of the `dev` project
|
|
56
|
+
ssh pi@dotpi-dev-001.local 'tail -f /opt/dotpi/var/log/dotpi_prepare_system_*.log'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When done, you can connect.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
ssh pi@dotpi-dev-001.local
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
It should also appear in the `dotpi-manager`.
|
|
66
|
+
|
|
67
|
+
## Settings
|
|
68
|
+
|
|
69
|
+
### Raspberry Pi Imager
|
|
70
|
+
|
|
71
|
+
The installer will first apply the settings of the Raspberry Pi Imager.
|
|
72
|
+
|
|
73
|
+
In particular:
|
|
74
|
+
|
|
75
|
+
- host-name
|
|
76
|
+
|
|
77
|
+
- ssh access
|
|
78
|
+
- you can allow for password authentication (in case the authentication via key fails)
|
|
79
|
+
|
|
80
|
+
- user and password
|
|
81
|
+
- user name: not recommended to change
|
|
82
|
+
- user password, when ssh is not available
|
|
83
|
+
|
|
84
|
+
- the wifi settings will be over-ridden
|
|
85
|
+
|
|
86
|
+
- you can avoid the eject the SD car when done
|
|
87
|
+
|
|
88
|
+
### Environment defaults
|
|
89
|
+
|
|
90
|
+
Then, `dotpi-install` will apply the default settings of the `dotpi` environment.
|
|
91
|
+
|
|
92
|
+
`dotpi_root/etc/dotpi_environment_default.bash`
|
|
93
|
+
|
|
94
|
+
You should not change anything here. Instead, you can over-ride any value in your projects.
|
|
95
|
+
|
|
96
|
+
### Project settings
|
|
97
|
+
|
|
98
|
+
Then, `dotpi-install` will apply the default settings of your project.
|
|
99
|
+
|
|
100
|
+
#### `configuration` folder
|
|
101
|
+
|
|
102
|
+
This folder is for "public" settings, that you would share on a repository.
|
|
103
|
+
|
|
104
|
+
In you project, there is a configuration file named `configuration/dotpi_project.bash`, where you can override any value.
|
|
105
|
+
|
|
106
|
+
Note that you can also extend settings, by appendind to bash arrays:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
# this add `screen` to the list of packages to install
|
|
110
|
+
dotpi_apt_install+=(
|
|
111
|
+
screen
|
|
112
|
+
)
|
|
113
|
+
```
|
|
114
|
+
In particular, you can change the name of your project. (The default is the folder name.)
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
dotpi_project_name='dev'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The remote machine hosnames will be on the form `dotpi-dev-xxx` with `xxx` as the instance numbers.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
You can also choose your audio device.
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
dotpi_audio_device='HiFiBerry DAC+ ADC Pro'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
##### `jackd` folder
|
|
130
|
+
|
|
131
|
+
You can add a `jackd` folder in you `<project>/configuration` folder, in order to over-ride jackd settings from `dotpi-root/share/jackd`.
|
|
132
|
+
|
|
133
|
+
Note that there is a symbolic link to configuration for known sound-cads. If it does not suit your needs, you can use a `dotpi_jackd.bash` configuration file.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# keep this
|
|
137
|
+
DOTPI_JACKD_ENVIRONMENT=(
|
|
138
|
+
JACK_NO_AUDIO_RESERVATION=1
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
# warning: long option for -d (--driver) seems broken
|
|
142
|
+
|
|
143
|
+
DOTPI_JACKD_ARGUMENTS=(
|
|
144
|
+
--realtime
|
|
145
|
+
--realtime-priority 95
|
|
146
|
+
-d alsa
|
|
147
|
+
--device hw:0
|
|
148
|
+
--playback
|
|
149
|
+
--period 1024
|
|
150
|
+
--nperiods 2
|
|
151
|
+
--rate 48000
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### `secrets` folder
|
|
156
|
+
|
|
157
|
+
This folder is for "private" settings, that you would *not* share on a repository.
|
|
158
|
+
|
|
159
|
+
In you project, there is a configuration file named `secrets/dotpi_secrets.bash`, where you can chage the password.
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
dotpi_password='!rapsberry'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
##### `network` folder
|
|
166
|
+
|
|
167
|
+
You can add any NetworkManager configuration file. Be sure *not* to quote values, including `ssid` and `psk`, as anything is part of the value, including quotes.
|
|
168
|
+
|
|
169
|
+
To keep the automatic configuration for the ethernet interface, do not add it here.
|
|
170
|
+
|
|
171
|
+
To keep `NetworkManager` functional, do *not* configure network in an other way (ie. no `wpa_supplicant.conf` file).
|
|
172
|
+
|
|
173
|
+
##### `ssh` folder
|
|
174
|
+
|
|
175
|
+
Be sure to install the pair of SSH keys in you `${HOME}/.ssh` configuration.
|
|
176
|
+
|
|
177
|
+
### Instance settings, `tmp` folder
|
|
178
|
+
|
|
179
|
+
The last step is to apply particular settings relative to the instance.
|
|
180
|
+
|
|
181
|
+
After sucessfully preparing an SD card, a copy of the last settings will be in your pject, in a `tmp` folder.
|
|
182
|
+
|
|
183
|
+
- `dotpi_prepare_sd_card_*.log` is a copy of the screen messages
|
|
184
|
+
- `dotpi_tmp.bash` contains the instance number (to increment for the next time)
|
|
185
|
+
- `file-system` is a full copy of what will be installed on the Raspberry Pi.
|
|
186
|
+
|
|
187
|
+
## On the Raspberry Pi
|
|
188
|
+
|
|
189
|
+
Any system-wide installation will link to the `/opt/dotpi` directory. Except the following.
|
|
190
|
+
|
|
191
|
+
The `/boot/firmware` folder (mounted as `/bootfs` as a local SD card) contains the `config.txt` file.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Commands
|
|
195
|
+
|
|
196
|
+
Use `dotpi` or `sudo dotpi` to run any `dotpi_function` function.
|
|
197
|
+
|
|
198
|
+
### `/boot/firmware` `/bootfs`
|
|
199
|
+
|
|
200
|
+
- `config.txt` is the hardware configuration file.
|
|
201
|
+
- `firstrun_*.log` is the log the the first run
|
|
202
|
+
- Intentionnaly, the network does not start at this stage
|
|
203
|
+
- the `dotpi` folder contains the initial version of the `dotpi` file-system, and a non-customised version of the `firstrun.sh` script from the imager.
|
|
204
|
+
|
|
205
|
+
### `/opt/dotpi`
|
|
206
|
+
|
|
207
|
+
`/opt/dotpi/bin/dotpi` is the main executable, installed in `/usr/bin`
|
|
208
|
+
|
|
209
|
+
#### `/opt/dotpi/etc`
|
|
210
|
+
|
|
211
|
+
- `config.txt` is an *initial* copy of the hardware configuration. It may diverge after any mofdification.
|
|
212
|
+
- `dotpi_environment_*.bash` contain the customisation of the environment
|
|
213
|
+
- `network` contains the network configuration, that where copied to `/etc/NetworkManager/system-connections`. It may diverge after any mofdification.
|
|
214
|
+
- `ssh` contains the public SSH keys that were copied to `${HOME}/.ssh/authorized_keys`
|
|
215
|
+
|
|
216
|
+
#### `/opt/dotpi/share`
|
|
217
|
+
|
|
218
|
+
- `dotpi-manager` contains the client and the service. Use `sudo dotpi manager_update` to update the client.
|
|
219
|
+
- `jackd` contains the configuration and the service.
|
|
220
|
+
- `limits` contains the limits that were copied to `/etc/security/limits.d`.
|
|
221
|
+
- `n` contains the node version manager. `node.js` itself, is in `/home/pi/n/bin/node` and linked in `/usr/bin/node`.
|
|
222
|
+
|
|
223
|
+
#### `/opt/dotpi/var/log`
|
|
224
|
+
|
|
225
|
+
Log files.
|
|
226
|
+
|
|
227
|
+
- `dotpi_prepare_system_*.log` contains the log of the system preparation
|
|
228
|
+
- `dotpi_manager_update_*.log` contain the logs of the dotpi-manager updates
|
|
229
|
+
|
|
230
|
+
#### `/usr/local/bin`
|
|
231
|
+
|
|
232
|
+
This is an alias to `/usr/bin`.
|
|
233
|
+
|
|
234
|
+
### Other
|
|
235
|
+
|
|
236
|
+
#### Local machine
|
|
237
|
+
|
|
238
|
+
If you install `wpa_passphrase`, wifi passwords will be hashed.
|
|
239
|
+
|
|
240
|
+
You should install the version 3 of `rsync` to get quicker transfer times with `dotpi-manager`.
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
rsync --version | grep version
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
#### Remote Raspberry Pi
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
##### Network
|
|
250
|
+
|
|
251
|
+
Everything is managed via `NetworkManager`. You can use `nmtui` to use a user-interface.
|
|
252
|
+
|
|
253
|
+
You also directly use `nmcli` with a command-line interface.
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
nmcli device
|
|
257
|
+
# DEVICE TYPE STATE CONNECTION
|
|
258
|
+
# eth0 ethernet connected Wired connection 1
|
|
259
|
+
# lo loopback connected (externally) lo
|
|
260
|
+
# wlan0 wifi disconnected --
|
|
261
|
+
# p2p-dev-wlan0 wifi-p2p disconnected --
|
|
262
|
+
|
|
263
|
+
nmcli radio
|
|
264
|
+
# WIFI-HW WIFI WWAN-HW WWAN
|
|
265
|
+
# enabled enabled missing enabled
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
##### `jackd`
|
|
270
|
+
|
|
271
|
+
In order to play soundfiles via `jackd`, you can install `mpv`
|
|
272
|
+
|
|
273
|
+
```sh
|
|
274
|
+
mpv --ao=jack 'sound.mp3'
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
You can monitor a jack connection in a terminal with. Warning, you need to install the `jackmeter` package but the command is `jack_meter`.
|
|
278
|
+
|
|
279
|
+
```sh
|
|
280
|
+
# list jack connections
|
|
281
|
+
jack_lsp
|
|
282
|
+
# system:capture_1
|
|
283
|
+
# system:capture_2
|
|
284
|
+
# system:playback_1
|
|
285
|
+
# system:playback_2
|
|
286
|
+
# cpal_client_out:out_0
|
|
287
|
+
# cpal_client_out:out_1
|
|
288
|
+
# cpal_client_out-01:out_0
|
|
289
|
+
# cpal_client_out-01:out_1
|
|
290
|
+
|
|
291
|
+
# monitor the system output
|
|
292
|
+
jack_meter system:playback_1
|
|
293
|
+
|
|
294
|
+
# monitor a particular connection
|
|
295
|
+
jack_meter mpv:out_0
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
##### Raspberry pi
|
|
299
|
+
|
|
300
|
+
You can get various information about the hardware and software.
|
|
301
|
+
|
|
302
|
+
```sh
|
|
303
|
+
cat /proc/device-tree/model
|
|
304
|
+
# Raspberry Pi 4 Model B Rev 1.4pi
|
|
305
|
+
|
|
306
|
+
# 64bit kernel (even for 32bit system)
|
|
307
|
+
uname -a
|
|
308
|
+
# Linux dotpi-dev-019 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
|
|
309
|
+
|
|
310
|
+
# 64bit kernel (even for 32bit system)
|
|
311
|
+
arch
|
|
312
|
+
# aarch64
|
|
313
|
+
|
|
314
|
+
# 32bit system
|
|
315
|
+
file $(which file)
|
|
316
|
+
# /usr/bin/file: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=f5f7f7c84dbb609f53ae3b9ac6b4437d927bde7d, for GNU/Linux 3.2.0, stripped
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Known bugs
|
|
320
|
+
|
|
321
|
+
Please do report them.
|
|
322
|
+
|
|
323
|
+
## Todo
|
|
324
|
+
|
|
325
|
+
- [ ] dotpi-manager: dependency to jackd should be soft
|
|
326
|
+
- [ ] allow client to run without audio
|
|
327
|
+
- [ ] client should continue to run if audio stops
|
|
328
|
+
|
|
329
|
+
- [ ] Make a command-line interface
|
|
330
|
+
- [ ] choose between options
|
|
331
|
+
- [ ] project name
|
|
332
|
+
- [ ] audio device model
|
|
333
|
+
- [ ] jackd configuration
|
|
334
|
+
- [ ] make pair of ssh keys
|
|
335
|
+
- [ ] wifi/network configuration
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Double-click
|
|
4
|
+
cd "$(dirname "$0")" || exit 0
|
|
5
|
+
|
|
6
|
+
# explicitly add symbolic links to directories relative paths, ending with '/'
|
|
7
|
+
SRC=(
|
|
8
|
+
'./'
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
DST="/Volumes/SANDO/svg/$(basename "$(pwd)")"
|
|
12
|
+
BAK="${DST}/../$(basename "${DST}.bak")/$(date '+%Y-%m-%d_%H-%M-%S')"
|
|
13
|
+
|
|
14
|
+
EXCLUDE_FLAGS=(
|
|
15
|
+
--exclude 'max-include-test' # big and not specific
|
|
16
|
+
--exclude 'CVS/' # centralised
|
|
17
|
+
--exclude '.svn/' # centralised
|
|
18
|
+
--exclude 'node_modules/' # node
|
|
19
|
+
--exclude 'site-packages/' # python
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
mkdir -p "${DST}"
|
|
23
|
+
|
|
24
|
+
# --extended-attributes update the destination ACLs to be the same as the source ACLs
|
|
25
|
+
# --archive turn on archive mode (recursive copy + retain attributes)
|
|
26
|
+
# --delete delete any files that have been deleted locally
|
|
27
|
+
# --delete-excluded delete any files (on DST) that are part of the list of excluded files
|
|
28
|
+
# --exclude-from reference a list of files to exclude
|
|
29
|
+
# --hard-links preserve hard-links
|
|
30
|
+
# --one-file-system don't cross device boundaries (ignore mounted volumes)
|
|
31
|
+
# --sparse handle sparse files efficiently
|
|
32
|
+
# --verbose increase verbosity
|
|
33
|
+
|
|
34
|
+
rsync_version="$(rsync --version)"
|
|
35
|
+
|
|
36
|
+
if [[ ${rsync_version} =~ 'xattrs' ]] ; then
|
|
37
|
+
# rsync 3
|
|
38
|
+
sudo rsync --verbose \
|
|
39
|
+
--archive \
|
|
40
|
+
--hard-links \
|
|
41
|
+
--xattrs \
|
|
42
|
+
--acls \
|
|
43
|
+
--one-file-system \
|
|
44
|
+
--delete \
|
|
45
|
+
"${EXCLUDE_FLAGS[@]}" \
|
|
46
|
+
--backup --backup-dir="${BAK}" \
|
|
47
|
+
--relative "${SRC[@]}" "${DST}"
|
|
48
|
+
else
|
|
49
|
+
# rsync 2
|
|
50
|
+
sudo rsync --verbose \
|
|
51
|
+
--archive \
|
|
52
|
+
--hard-links \
|
|
53
|
+
--extended-attributes \
|
|
54
|
+
--one-file-system \
|
|
55
|
+
--delete \
|
|
56
|
+
"${EXCLUDE_FLAGS[@]}" \
|
|
57
|
+
--backup --backup-dir="${BAK}" \
|
|
58
|
+
--relative "${SRC[@]}" "${DST}"
|
|
59
|
+
fi
|
|
60
|
+
sudo -k
|
|
61
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Double-click
|
|
4
|
+
cd "$(dirname "$0")" || exit 0
|
|
5
|
+
|
|
6
|
+
# explicitly add symbolic links to directories relative paths, ending with '/'
|
|
7
|
+
SRC=(
|
|
8
|
+
'./'
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
DST="/Volumes/SISIDO/svg/$(basename "$(pwd)")"
|
|
12
|
+
BAK="${DST}/../$(basename "${DST}.bak")/$(date '+%Y-%m-%d_%H-%M-%S')"
|
|
13
|
+
|
|
14
|
+
EXCLUDE_FLAGS=(
|
|
15
|
+
--exclude 'max-include-test' # big and not specific
|
|
16
|
+
--exclude 'CVS/' # centralised
|
|
17
|
+
--exclude '.svn/' # centralised
|
|
18
|
+
--exclude 'node_modules/' # node
|
|
19
|
+
--exclude 'site-packages/' # python
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
mkdir -p "${DST}"
|
|
23
|
+
|
|
24
|
+
# --extended-attributes update the destination ACLs to be the same as the source ACLs
|
|
25
|
+
# --archive turn on archive mode (recursive copy + retain attributes)
|
|
26
|
+
# --delete delete any files that have been deleted locally
|
|
27
|
+
# --delete-excluded delete any files (on DST) that are part of the list of excluded files
|
|
28
|
+
# --exclude-from reference a list of files to exclude
|
|
29
|
+
# --hard-links preserve hard-links
|
|
30
|
+
# --one-file-system don't cross device boundaries (ignore mounted volumes)
|
|
31
|
+
# --sparse handle sparse files efficiently
|
|
32
|
+
# --verbose increase verbosity
|
|
33
|
+
|
|
34
|
+
rsync_version="$(rsync --version)"
|
|
35
|
+
|
|
36
|
+
if [[ ${rsync_version} =~ 'xattrs' ]] ; then
|
|
37
|
+
# rsync 3
|
|
38
|
+
sudo rsync --verbose \
|
|
39
|
+
--archive \
|
|
40
|
+
--hard-links \
|
|
41
|
+
--xattrs \
|
|
42
|
+
--acls \
|
|
43
|
+
--one-file-system \
|
|
44
|
+
--delete \
|
|
45
|
+
"${EXCLUDE_FLAGS[@]}" \
|
|
46
|
+
--backup --backup-dir="${BAK}" \
|
|
47
|
+
--relative "${SRC[@]}" "${DST}"
|
|
48
|
+
else
|
|
49
|
+
# rsync 2
|
|
50
|
+
sudo rsync --verbose \
|
|
51
|
+
--archive \
|
|
52
|
+
--hard-links \
|
|
53
|
+
--extended-attributes \
|
|
54
|
+
--one-file-system \
|
|
55
|
+
--delete \
|
|
56
|
+
"${EXCLUDE_FLAGS[@]}" \
|
|
57
|
+
--backup --backup-dir="${BAK}" \
|
|
58
|
+
--relative "${SRC[@]}" "${DST}"
|
|
59
|
+
fi
|
|
60
|
+
sudo -k
|
|
61
|
+
|
package/NOTES.md
CHANGED
|
@@ -33,6 +33,47 @@
|
|
|
33
33
|
- [x] rename to `@dotpi/tools` rather than `@dotpi/install`
|
|
34
34
|
- [x] make it work using `npx`
|
|
35
35
|
|
|
36
|
+
### Modules
|
|
37
|
+
|
|
38
|
+
#### support apt dependencies
|
|
39
|
+
|
|
40
|
+
- [ ] add `aptDependecies` to `package.json`
|
|
41
|
+
- [ ] generate `<package>/DEBIAN/control` file from `package.json`
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Package: ${package.name.replace(/@/, '').toLowerCase().replace(/[^a-z0-9.+-]/, '-')
|
|
45
|
+
}
|
|
46
|
+
Description: ${package.description}
|
|
47
|
+
Version: ${package.version || '0.0.0'}
|
|
48
|
+
Maintainer: ${package.maintainer || 'nobody <no@mail.com>'}
|
|
49
|
+
Section: embedded
|
|
50
|
+
Priority: optional
|
|
51
|
+
Architecture: all
|
|
52
|
+
Standards-Version: 11.0.0
|
|
53
|
+
Depends: ${package.aptDependencies}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- [ ] `dotpi_install`:
|
|
57
|
+
- [ ] `sudo dotpi module install apt-packages`
|
|
58
|
+
- [ ] generate debian package and install
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
sudo dpkg-deb --root-owner-group --build <package>
|
|
62
|
+
sudo chmod a+rw <package>
|
|
63
|
+
sudo cp <package> /tmp
|
|
64
|
+
sudo dotpi apt-get install /tmp/<package>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- [ ] `dotpi_uninstall`:
|
|
68
|
+
- [ ]`sudo dotpi module uninstall apt-packages`
|
|
69
|
+
- [ ] uninstall debian package
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
sudo apt-get uninstall <package>
|
|
73
|
+
sudo dotpi apt-get autoremove
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
36
77
|
## Questions
|
|
37
78
|
|
|
38
79
|
- [ ] add a level of indirection in config files?
|
|
@@ -40,7 +81,6 @@
|
|
|
40
81
|
- [ ] system to check for new version
|
|
41
82
|
+ `npm view @soundworks/core version`
|
|
42
83
|
|
|
43
|
-
|
|
44
84
|
## Final File Structure
|
|
45
85
|
|
|
46
86
|
```sh
|
package/README.md
CHANGED
|
@@ -320,22 +320,12 @@ Please do report them.
|
|
|
320
320
|
|
|
321
321
|
## Todo
|
|
322
322
|
|
|
323
|
-
- [x] option not to install dotpi-manager
|
|
324
|
-
|
|
325
323
|
- [ ] allow to use configuration files from project
|
|
326
|
-
- [ ] jack
|
|
327
324
|
- [ ] dotpi-led
|
|
328
325
|
|
|
329
|
-
- [ ] dotpi-manager: dependency to
|
|
326
|
+
- [ ] dotpi-manager: dependency to audio should be soft
|
|
330
327
|
- [ ] allow client to run without audio
|
|
331
328
|
- [ ] client should continue to run if audio stops
|
|
332
329
|
|
|
333
|
-
- [ ]
|
|
334
|
-
- [ ]
|
|
335
|
-
- [ ] project name
|
|
336
|
-
- [ ] audio device model
|
|
337
|
-
- [ ] jackd configuration
|
|
338
|
-
- [ ] make pair of ssh keys
|
|
339
|
-
- [ ] wifi/network configuration
|
|
340
|
-
|
|
341
|
-
- [ ] share dotpi_manager_update w/ install
|
|
330
|
+
- [ ] @dotpi/audio module
|
|
331
|
+
- [ ] generate
|
package/dotpi_root/bin/dotpi
CHANGED