Dear all,

Thank you for reaching out to us and reporting this.

The current installation scripts for Debian have a provision that is intended to perform a migration
of the configuration files from the pre-FHS directories to the new post-FHS directories, similar to how
it is done for RPM (many thanks to Robert Scheck for highlighting the code snippet). For Debian, the
relevant snippet can be found in `ripe-atlas-common.preinst` as follows:

migrate_file()
{
	if ( [ -f "$1" ] && ! cmp -s "$1" "$2" 1>/dev/null 2>&1 ); then
		install -D -p -m "$3" -o "$4" -g "$5" "$1" "$2" 1>/dev/null 2>&1
	fi 
}
...
case "$1" in
	install)
...
		if ! [ -d "/etc/ripe-atlas" ]; then
			install -d -m 0770 -o "ripe-atlas" -g "ripe-atlas" "/etc/ripe-atlas" 1>/dev/null 2>&1
		fi
		migrate_file "/var/atlas-probe/etc/probe_key"     "/etc/ripe-atlas/probe_key"                  0600 \
		             "ripe-atlas"       "ripe-atlas"
		migrate_file "/var/atlas-probe/probe_key.pub" "/etc/ripe-atlas/probe_key.pub"              0644 \
		             "ripe-atlas"       "ripe-atlas"
		migrate_file "/var/atlas-probe/state/mode"    "/etc/ripe-atlas/mode.atlasswprobe"    0644 \
		             "ripe-atlas"       "ripe-atlas"
		migrate_file "/var/atlas-probe/state/config.txt"  "/etc/ripe-atlas/config.txt"               0644 \
		             "ripe-atlas"       "ripe-atlas" 
;; 

It is important to note that I have also expanded the variables to facilitate readability of the code snippet.

On a minimal, clean Debian 12 test system, I further executed the following steps:
- Compiled and installed a `5080` software probe.
- Downloaded the `common` and `probe` packages for the Debian 12 distribution from the FTP server.
- Executed `dpkg -i ripe-atlas-common_5100_amd64.deb ripe-atlas-probe_5100_all.deb` with superuser privileges.

Before installing the `5100` package, the state directory for `5080` contained the following items
(output of `ls -la /var/atlas-probe/state`):

total 16

drwxr-xr-x 2 atlas root    4096 Feb 25 12:08 .

drwxr-xr-x 9 atlas root    4096 Feb 25 12:07 ..

lrwxrwxrwx 1 atlas nogroup   44 Feb 25 12:07 FIRMWARE_APPS_VERSION -> 

/usr/local/atlas/state/FIRMWARE_APPS_VERSION

-rw-r--r-- 1 atlas root      11 Feb 25 12:08 config.txt

-rw-r--r-- 1 atlas root       5 Feb 25 10:08 mode


The configuration directory for `5080` contained the following (output of `ls -la /var/atlas-probe/etc`):

total 16

drwxr-xr-x 2 atlas nogroup 4096 Feb 25 12:07 .

drwxr-xr-x 9 atlas root    4096 Feb 25 12:07 ..

-rw------- 1 atlas nogroup 1823 Feb 25 12:07 probe_key

-rw-r--r-- 1 atlas nogroup  394 Feb 25 12:07 probe_key.pu


After installation as described above, the post- FHS configuration directory for `5100` contained the following items
(output of `ls -la /etc/ripe-atlas/):

total 24

drwxrwx---  2 ripe-atlas ripe-atlas 4096 Feb 25 12:09 .

drwxr-xr-x 74 root       root       4096 Feb 25 12:09 ..

-rw-r--r--  1 ripe-atlas ripe-atlas   11 Feb 25 12:08 config.txt

-rw-r--r--  1 ripe-atlas ripe-atlas    5 Feb 25 10:08 mode

-rw-------  1 ripe-atlas ripe-atlas 1823 Feb 25 12:07 probe_key

-rw-r--r--  1 ripe-atlas ripe-atlas  394 Feb 25 12:07 probe_key.pub


It is important to note that the RIPE Atlas service is now disabled and stopped by default post-installation. As such, 
the final step would be to execute `systemctl enable ripe-atlas.service && systemctl start ripe-atlas.service` with
superuser privileges in order to start the probe up.

Based on the outcome of this approach, it appears that executing the steps described above resulted in successful
migration of the configuration files. Therefore, executing the aforementioned steps would be the best practice
recommended from our end in this case.

We also thank you for highlighting the need for more detailed documentation on this matter. We will update the
documentation to list this process for all Debian distributions (currently Debian 11 and 12) in an upcoming release.

Best regards,
Marios Mavropoulos Papoudas
Software Engineer @ RIPE Atlas
RIPE NCC



On Sun, 23 Feb 2025 at 23:07, Alexander Bochmann <ab@lists.gxis.de> wrote:
Hi -

I tried upgrading a software probe that runs on Debian from version 5080
to the 5100 binaries provided by the project, and while the old atlasswprobe
package is being removed, it seems there is no attempt to migrate the
existing probe key or other configuration?

What's the recommended path here, back up the key and copy it into
the new configuration directory, or just start a new probe from scratch?

Alex.

-----
To unsubscribe from this mailing list or change your subscription options, please visit: https://mailman.ripe.net/mailman3/lists/ripe-atlas.ripe.net/
As we have migrated to Mailman 3, you will need to create an account with the email matching your subscription before you can change your settings.
More details at: https://www.ripe.net/membership/mail/mailman-3-migration/