apt-ostree/.notes/rpm-ostree/service-files/rpm-ostree-countme.service.md

76 lines
No EOL
2.4 KiB
Markdown

# rpm-ostree-countme.service
## Overview
Weekly reporting service for anonymous usage statistics. This service collects and reports system deployment information to help with project metrics and development decisions.
## Service File
```ini
[Unit]
Description=Weekly rpm-ostree Count Me reporting
Documentation=man:rpm-ostree-countme.service(8)
ConditionPathExists=/run/ostree-booted
[Service]
Type=oneshot
User=rpm-ostree
DynamicUser=yes
StateDirectory=rpm-ostree-countme
StateDirectoryMode=750
ExecStart=rpm-ostree countme
```
## Key Components
### Unit Section
- **Description**: Human-readable description of the service
- **Documentation**: Reference to manual page
- **ConditionPathExists=/run/ostree-booted**: Only run on OSTree-booted systems
### Service Section
- **Type=oneshot**: Run once and exit
- **User=rpm-ostree**: Run as dedicated user
- **DynamicUser=yes**: Create user dynamically if needed
- **StateDirectory=rpm-ostree-countme**: Persistent state directory
- **StateDirectoryMode=750**: Secure permissions for state directory
- **ExecStart=rpm-ostree countme**: Execute countme command
## What It Does
### Core Functions
1. **Usage Statistics**: Collects anonymous usage data
2. **Deployment Information**: Reports system deployment details
3. **Project Metrics**: Helps track adoption and usage patterns
4. **Development Insights**: Provides data for development decisions
### Data Collected
The `rpm-ostree countme` command typically collects:
- System architecture and distribution
- OSTree deployment information
- Package installation statistics
- System configuration details
- Anonymous identifiers for tracking
### Privacy Features
- **Anonymous Reporting**: No personally identifiable information
- **Opt-out Capability**: Users can disable reporting
- **Secure Storage**: State directory with restricted permissions
- **Limited Scope**: Only collects necessary metrics
## Timer Integration
This service is triggered by `rpm-ostree-countme.timer` which:
- Runs 5 minutes after boot
- Executes every 3 days with 1-day randomized delay
- Prevents thundering herd problems
## Dependencies
- OSTree-booted system (`/run/ostree-booted`)
- rpm-ostree command-line tool
- systemd
## apt-ostree Equivalent
For apt-ostree, this would be `apt-ostree-countme.service` with:
- Command: `apt-ostree countme`
- State directory: `apt-ostree-countme`
- APT-specific metrics collection
- Debian/Ubuntu system information
- Privacy-compliant data collection