Permanently enable additional YUM repositories

The change has been approved also by the support team.
We will implement it :wink:

5 Likes

thats great! Thank you.

Nice!

while you are at it you may review eorepo.conf and pkginfo.conf I think it is dead code, they are templated now in nethserver-base and -subscription.

That’s why the documentation is not completely accurate and we should update it ; to some extend this feature was present in the past.

EDIT:
Reading the below back i’d like to reformulate :grinning:

That why the doc @dnutan refered to in this thread is not completely accurate

That’s why the documentation is not completely accurate and we should update it

3 Likes

You’re right they are always overwritten by the template expansion. However I’d preserve them because they are owned by the nethserver-base RPM.

[root@vm1 ~]# rpm -V nethserver-base
S.5....T.  c /etc/nethserver/eorepo.conf
S.5....T.  c /etc/nethserver/pkginfo.conf

I’m not sure I understood: how do you want to change it?

1 Like

The /etc/e-smith/events/actions/nethserver-subscription-eorepo action configures YUM repositories based on subscription. The behavior of the script can be changed using /etc/nethserver/eorepo.conf file which may contain the list of repositories to be enabled.

IMHO the above suggest a user can edit this file to (permanently) change the behavior… Nowaday’s this file is templated and the changes do not survive a software-repos-save event. Moverover the only link to the nethserver-subscription-eorepo action I can find is in the subscription package @system-init. (can have missed something here).
The above made me believe the documentation and the originally intended behavior was a user can make permanent changes regarding the enabled repositories.

1 Like

Until a (possible) permanent solution is in place, it’s easy enough to create a template override to add repositories to eorepo.conf:

[root@Nethserver ~]# cat /etc/e-smith/templates-custom/etc/nethserver/eorepo.conf/99custom
# Add my repositories in
jdoss-wireguard
nordvpn
PlexRepo
stephdl
tor
[root@Nethserver ~]#

Cheers.

3 Likes

The feature is ready to be tested thanks to @stephdl!

4 Likes

@EddieA @mark_nl @capote @pike anyone want to try the new implementation?

1 Like

Yes, I would.

1 Like

I dit it:

config setprop subscription ExtraRepositories nethforge,nethforge-testing
signal-event software-repos-save

outcome:

[root@nethserver ~]# cat /etc/nethserver/pkginfo.conf
<snip>
# One repository identifier per line
#
sb-nethserver-updates
<snip>
[root@nethserver ~]# cat /etc/nethserver/eorepo.conf
<snip>
# Blank lines and lines beginning with "#" are ignored
#
sb-base
sb-updates
sb-epel
sb-extras
sb-centos-sclo-rh
sb-centos-sclo-sclo
sb-nethserver-base
sb-nethserver-updates
stephdl

…also with reload

It seems not working. :thinking:

Are you sure the package has been updated from testing?

I’ll pass this one, sorry

yum --enablerepo=nethserver-testing install nethserver-subscription

rpm -q  nethserver-subscription
nethserver-subscription-3.6.7-1.4.g100b078.ns7.noarch

config setprop subscription ExtraRepositories nethforge
signal-event software-repos-save

cat /etc/nethserver/eorepo.conf
# ================= DO NOT MODIFY THIS FILE =================
<TRUNCATED>
# Blank lines and lines beginning with "#" are ignored
#
sb-base
sb-updates
sb-epel
sb-extras
sb-centos-sclo-rh
sb-centos-sclo-sclo
sb-nethserver-base
sb-nethserver-updates
nethforge

cat /etc/nethserver/pkginfo.conf
# ================= DO NOT MODIFY THIS FILE =================
<TRUNCATED>
# One repository identifier per line
#
sb-nethserver-updates
nethforge

Works oke over here, thanks @stephdl

@capote is nethserver-subscription-3.6.7-1.4.g100b078 from the testing repository installed?

1 Like

Looks good here:

[root@Nethserver ~]# config setprop subscription ExtraRepositories testthis
[root@Nethserver ~]# signal-event software-repos-save
[root@Nethserver ~]# cat /etc/nethserver/pkginfo.conf
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#

#
# This is the list of YUM repositories that have their groups listed
# on the Software Center UI page, through the pkginfo helper.
#
# One repository identifier per line
#
sb-nethserver-updates
testthis

[root@Nethserver ~]# cat /etc/nethserver/eorepo.conf
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
#
# This file is read by software-repos-save event
#
# Listed repositories will be enabled, everything else will be disabled
#
# Blank lines and lines beginning with "#" are ignored
#

sb-base
sb-updates
sb-epel
sb-extras
sb-centos-sclo-rh
sb-centos-sclo-sclo
sb-nethserver-base
sb-nethserver-updates
testthis
stephdl
# Add my repositories in
jdoss-wireguard
nordvpn
PlexRepo
tor
[root@Nethserver ~]#

Cheers.

3 Likes

One little worry: can enabling the (comps) groups off all extra repo’s have some unwanted side effects?
(I mean if a 3party repo has groups not being nethserver-modules :thinking:)

IMHO the above is not likely to happen !

no, it was not described in Subscription: Enable extra repositories inside the subscription · Issue #6427 · NethServer/dev · GitHub
now it did additionally:
yum --enablerepo=nethserver-testing install nethserver-subscription

checked:

rpm -q  nethserver-subscription
nethserver-subscription-3.6.7-1.4.g100b078.ns7.noarch

config setprop subscription ExtraRepositories nethforge
signal-event software-repos-save

[root@nethserver ~]# cat /etc/nethserver/eorepo.conf
# ================= DO NOT MODIFY THIS FILE =================
# 

sb-base
sb-updates
sb-epel
sb-extras
sb-centos-sclo-rh
sb-centos-sclo-sclo
sb-nethserver-base
sb-nethserver-updates
nethforge
stephdl
[root@nethserver ~]# 


[root@nethserver ~]# cat /etc/nethserver/pkginfo.conf
# ================= DO NOT MODIFY THIS FILE ================
#
sb-nethserver-updates
nethforge

[root@nethserver ~]#

Surprise, surprise :slight_smile:

2 Likes

Thank you all for the testing!

3rd party repo should have the groups metadata if they want to show packages on the Software Center.
There could be a problem only if different modules have the same id, but it’s very unlikely to happen.
So, in the end, it will be safe to have all 3rd party repositories available through the Software Center. :slight_smile:

@stephdl let me know if you need help on this!

4 Likes

thank, this has been asked few time in the past, I am not sure it worth efforts right now, I prefer to waste my time on a mirror architecture or on some modules.

It is a third repository that you must install manually like other of markus,dan…

1 Like

how to roll back this testing for normal updates?

No need to roll back, just update as you used to do.

Some Background:
This testing package is versioned 3.6.7-1.4.g100b078 the released update is 3.6.8-1.
While technically both packages are the same the released one will be considered an update by yum and (as a mater of speech) be (re)installed.

(EDIT: it can take a while before this update lands in the subscription repo, just wait for it :yum:)

4 Likes