The installer scripts fails on fedora - config-manager broken arguments #1489

Open
opened 2025-11-20 05:31:34 -05:00 by saavagebueno · 9 comments
Owner

Originally created by @ricardo-st on GitHub (Dec 10, 2024).

Describe the problem
The install script does not finalize in fedora.

It returns:
Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.

The fix is easy, change:

        ${SUDO} dnf config-manager --add-repo /etc/yum.repos.d/netbird.repo

for

        ${SUDO} dnf config-manager addrepo --from-repofile=/etc/yum.repos.d/netbird.repo

To Reproduce

Steps to reproduce the behavior:
Run curl -fsSL https://pkgs.netbird.io/install.sh | sh in a clean fedora install.

Expected behavior

The script installs.

Are you using NetBird Cloud?

Self-Hosted

NetBird version

0.34.1

NetBird status -dA output:

N/A

Do you face any (non-mobile) client issues?

N/A

Screenshots

N/A

Additional context

N/A

Originally created by @ricardo-st on GitHub (Dec 10, 2024). **Describe the problem** The install script does not finalize in fedora. It returns: Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments. The fix is easy, change: ``` ${SUDO} dnf config-manager --add-repo /etc/yum.repos.d/netbird.repo ``` for ``` ${SUDO} dnf config-manager addrepo --from-repofile=/etc/yum.repos.d/netbird.repo ``` **To Reproduce** Steps to reproduce the behavior: Run `curl -fsSL https://pkgs.netbird.io/install.sh | sh` in a clean fedora install. **Expected behavior** The script installs. **Are you using NetBird Cloud?** Self-Hosted **NetBird version** `0.34.1` **NetBird status -dA output:** N/A **Do you face any (non-mobile) client issues?** N/A **Screenshots** N/A **Additional context** N/A
saavagebueno added the triage-needed label 2025-11-20 05:31:34 -05:00
Author
Owner

@mohamed-essam commented on GitHub (Dec 11, 2024):

I have a fresh Fedora 40 installation and the script worked normally, and in my dnf config-manager --help it shows:

Config-manager command-specific options:
  --save                save the current options (useful with --setopt)
  --add-repo URL        add (and enable) the repo from the specified file or
                        url

According to this page this is a new format for Fedora 41+, so the script will need to detect which version it is to change the command accordingly to maintain backward compatibility.

@mohamed-essam commented on GitHub (Dec 11, 2024): I have a fresh Fedora 40 installation and the script worked normally, and in my `dnf config-manager --help` it shows: ``` Config-manager command-specific options: --save save the current options (useful with --setopt) --add-repo URL add (and enable) the repo from the specified file or url ``` According to [this page](https://docs.fedoraproject.org/en-US/quick-docs/adding-or-removing-software-repositories-in-fedora/#_for_fedora_41_or_later_dnf_5) this is a new format for Fedora 41+, so the script will need to detect which version it is to change the command accordingly to maintain backward compatibility.
Author
Owner

@mohamed-essam commented on GitHub (Dec 12, 2024):

@ricardo-st Could you test this install script to ensure it works on DNF v5+ (I tested on dnf v4 and it works correctly) 🙏
https://github.com/netbirdio/netbird/pull/3026

@mohamed-essam commented on GitHub (Dec 12, 2024): @ricardo-st Could you test this install script to ensure it works on DNF v5+ (I tested on dnf v4 and it works correctly) :pray: https://github.com/netbirdio/netbird/pull/3026
Author
Owner

@orchard0 commented on GitHub (Dec 14, 2024):

@mohamed-essam Salam. Your commit fixes the issue with the dnf v5 argument changes. Another issue is that OpenPGP checks for packages from the repo are being skipped. Is there a key issue?

@orchard0 commented on GitHub (Dec 14, 2024): @mohamed-essam Salam. Your commit fixes the issue with the dnf v5 argument changes. Another issue is that OpenPGP checks for packages from the repo are being skipped. Is there a key issue?
Author
Owner

@mohamed-essam commented on GitHub (Dec 14, 2024):

@orchard0 im not sure, does that only happen with dnf v5?

@mohamed-essam commented on GitHub (Dec 14, 2024): @orchard0 im not sure, does that only happen with dnf v5?
Author
Owner

@orchard0 commented on GitHub (Dec 14, 2024):

Thank God I notice that gpgcheck=0 on line 124 in the install script. If I manually change that to gpgcheck=1 then I get the following error:

OpenPGP check for package "netbird-ui-0.34.1-1.x86_64" (/var/cache/libdnf5/NetBird-3f1333a6e9119c03/packages/netbird-ui_0.34.1_linux_amd64.rpm) from repo "NetBird" has failed: The package is not signed.

I get the same message for the main package:

OpenPGP check for package "netbird-0.34.1-1.x86_64" (/var/cache/libdnf5/NetBird-3f1333a6e9119c03/packages/netbird_0.34.1_linux_amd64.rpm) from repo "NetBird" has failed: The package is not signed.

Are the packages not signed?

@orchard0 commented on GitHub (Dec 14, 2024): Thank God I notice that `gpgcheck=0` on line 124 in the install script. If I manually change that to `gpgcheck=1` then I get the following error: `OpenPGP check for package "netbird-ui-0.34.1-1.x86_64" (/var/cache/libdnf5/NetBird-3f1333a6e9119c03/packages/netbird-ui_0.34.1_linux_amd64.rpm) from repo "NetBird" has failed: The package is not signed.` I get the same message for the main package: `OpenPGP check for package "netbird-0.34.1-1.x86_64" (/var/cache/libdnf5/NetBird-3f1333a6e9119c03/packages/netbird_0.34.1_linux_amd64.rpm) from repo "NetBird" has failed: The package is not signed.` Are the packages not signed?
Author
Owner

@orchard0 commented on GitHub (Dec 14, 2024):

The key issue has been reported before earlier this year: https://github.com/netbirdio/netbird/issues/1698

@orchard0 commented on GitHub (Dec 14, 2024): The key issue has been reported before earlier this year: https://github.com/netbirdio/netbird/issues/1698
Author
Owner

@VinterSolen commented on GitHub (Dec 29, 2024):

I just installed fedora kde plasma 41.

My installation also failed.

Tried also the installer in comment https://github.com/netbirdio/netbird/issues/3014#issuecomment-2538356305

4:01:14 stefan@Ares Downloads → ./install.sh 
The installation will be performed using dnf package manager
[NetBird]
name=NetBird
baseurl=https://pkgs.netbird.io/yum/
enabled=1
gpgcheck=0
gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key
repo_gpgcheck=1
Updating and loading repositories:
 NetBird                                                                                                                                                                                  100% |  13.9 KiB/s |   2.1 KiB |  00m00s
Repositories loaded.
Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed.

Nothing to do.
File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite.
04:01:17 stefan@Ares Downloads → sudo netbird status
sudo: netbird: command not found
04:01:22 stefan@Ares Downloads → netbird status
bash: netbird: command not found
04:01:27 stefan@Ares Downloads → netbird up
bash: netbird: command not found
04:01:29 stefan@Ares Downloads → 




@VinterSolen commented on GitHub (Dec 29, 2024): I just installed fedora kde plasma 41. My installation also failed. Tried _also_ the installer in comment https://github.com/netbirdio/netbird/issues/3014#issuecomment-2538356305 ``` 4:01:14 stefan@Ares Downloads → ./install.sh The installation will be performed using dnf package manager [NetBird] name=NetBird baseurl=https://pkgs.netbird.io/yum/ enabled=1 gpgcheck=0 gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key repo_gpgcheck=1 Updating and loading repositories: NetBird 100% | 13.9 KiB/s | 2.1 KiB | 00m00s Repositories loaded. Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed. Nothing to do. File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite. 04:01:17 stefan@Ares Downloads → sudo netbird status sudo: netbird: command not found 04:01:22 stefan@Ares Downloads → netbird status bash: netbird: command not found 04:01:27 stefan@Ares Downloads → netbird up bash: netbird: command not found 04:01:29 stefan@Ares Downloads → ```
Author
Owner

@VinterSolen commented on GitHub (Dec 29, 2024):

I just installed fedora kde plasma 41.

My installation also failed.

Tried also the installer in comment #3014 (comment)

4:01:14 stefan@Ares Downloads → ./install.sh 
The installation will be performed using dnf package manager
[NetBird]
name=NetBird
baseurl=https://pkgs.netbird.io/yum/
enabled=1
gpgcheck=0
gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key
repo_gpgcheck=1
Updating and loading repositories:
 NetBird                                                                                                                                                                                  100% |  13.9 KiB/s |   2.1 KiB |  00m00s
Repositories loaded.
Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed.

Nothing to do.
File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite.
04:01:17 stefan@Ares Downloads → sudo netbird status
sudo: netbird: command not found
04:01:22 stefan@Ares Downloads → netbird status
bash: netbird: command not found
04:01:27 stefan@Ares Downloads → netbird up
bash: netbird: command not found
04:01:29 stefan@Ares Downloads → 

Had to do "sudo dns in netbird" to get the actual program.

@VinterSolen commented on GitHub (Dec 29, 2024): > I just installed fedora kde plasma 41. > > My installation also failed. > > Tried _also_ the installer in comment [#3014 (comment)](https://github.com/netbirdio/netbird/issues/3014#issuecomment-2538356305) > > ``` > 4:01:14 stefan@Ares Downloads → ./install.sh > The installation will be performed using dnf package manager > [NetBird] > name=NetBird > baseurl=https://pkgs.netbird.io/yum/ > enabled=1 > gpgcheck=0 > gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key > repo_gpgcheck=1 > Updating and loading repositories: > NetBird 100% | 13.9 KiB/s | 2.1 KiB | 00m00s > Repositories loaded. > Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed. > > Nothing to do. > File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite. > 04:01:17 stefan@Ares Downloads → sudo netbird status > sudo: netbird: command not found > 04:01:22 stefan@Ares Downloads → netbird status > bash: netbird: command not found > 04:01:27 stefan@Ares Downloads → netbird up > bash: netbird: command not found > 04:01:29 stefan@Ares Downloads → > ``` Had to do "sudo dns in netbird" to get the actual program.
Author
Owner

@plantex commented on GitHub (Jan 29, 2025):

I just installed fedora kde plasma 41.

My installation also failed.

Tried also the installer in comment #3014 (comment)

4:01:14 stefan@Ares Downloads → ./install.sh 
The installation will be performed using dnf package manager
[NetBird]
name=NetBird
baseurl=https://pkgs.netbird.io/yum/
enabled=1
gpgcheck=0
gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key
repo_gpgcheck=1
Updating and loading repositories:
 NetBird                                                                                                                                                                                  100% |  13.9 KiB/s |   2.1 KiB |  00m00s
Repositories loaded.
Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed.

Nothing to do.
File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite.
04:01:17 stefan@Ares Downloads → sudo netbird status
sudo: netbird: command not found
04:01:22 stefan@Ares Downloads → netbird status
bash: netbird: command not found
04:01:27 stefan@Ares Downloads → netbird up
bash: netbird: command not found
04:01:29 stefan@Ares Downloads → 

Same error.
I just added the --overwrite as the message mentioned and it worked.
Not sure if this would have worked if the repo didn't already existed but there is an option --add-or-replace that could work in both scenario.

$ dnf config-manager addrepo --help
Usage:
  dnf5 [GLOBAL OPTIONS] config-manager addrepo [OPTIONS]

Description:
  Add repositories from the specified configuration file or define a new repository using user options.

Options:
  --from-repofile=REPO_CONFIGURATION_FILE_URL  Download repository configuration file, test it and put it in reposdir
  --id=REPO_ID                                 Set id for newly created repository
  --set=REPO_OPTION=VALUE                      Set option in newly created repository
  --add-or-replace                             Allow adding or replacing a repository in the existing configuration file
  --create-missing-dir                         Allow creation of missing directories
  --overwrite                                  Allow overwriting of existing repository configuration file
  --save-filename=FILENAME                     Set the name of the configuration file of the added repository. The ".repo" extension is added if it is missing.

I did not test it. --overwrite worked fine for me.

@plantex commented on GitHub (Jan 29, 2025): > I just installed fedora kde plasma 41. > > My installation also failed. > > Tried _also_ the installer in comment [#3014 (comment)](https://github.com/netbirdio/netbird/issues/3014#issuecomment-2538356305) > > ``` > 4:01:14 stefan@Ares Downloads → ./install.sh > The installation will be performed using dnf package manager > [NetBird] > name=NetBird > baseurl=https://pkgs.netbird.io/yum/ > enabled=1 > gpgcheck=0 > gpgkey=https://pkgs.netbird.io/yum/repodata/repomd.xml.key > repo_gpgcheck=1 > Updating and loading repositories: > NetBird 100% | 13.9 KiB/s | 2.1 KiB | 00m00s > Repositories loaded. > Package "dnf-plugins-core-4.10.0-1.fc41.noarch" is already installed. > > Nothing to do. > File "/etc/yum.repos.d/netbird.repo" already exists and configures repositories with IDs "NetBird". Add "--overwrite" to overwrite. > 04:01:17 stefan@Ares Downloads → sudo netbird status > sudo: netbird: command not found > 04:01:22 stefan@Ares Downloads → netbird status > bash: netbird: command not found > 04:01:27 stefan@Ares Downloads → netbird up > bash: netbird: command not found > 04:01:29 stefan@Ares Downloads → > ``` Same error. I just added the `--overwrite` as the message mentioned and it worked. Not sure if this would have worked if the repo didn't already existed but there is an option `--add-or-replace` that could work in both scenario. ``` $ dnf config-manager addrepo --help Usage: dnf5 [GLOBAL OPTIONS] config-manager addrepo [OPTIONS] Description: Add repositories from the specified configuration file or define a new repository using user options. Options: --from-repofile=REPO_CONFIGURATION_FILE_URL Download repository configuration file, test it and put it in reposdir --id=REPO_ID Set id for newly created repository --set=REPO_OPTION=VALUE Set option in newly created repository --add-or-replace Allow adding or replacing a repository in the existing configuration file --create-missing-dir Allow creation of missing directories --overwrite Allow overwriting of existing repository configuration file --save-filename=FILENAME Set the name of the configuration file of the added repository. The ".repo" extension is added if it is missing. ``` I did not test it. `--overwrite` worked fine for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1489