Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish atix main #1

Merged
merged 95 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
6961b39
Collect Azure VM Name and Resource Group Name as a cloud fact.
chambridge Jul 31, 2024
5a75445
feat: Disable anonymous cloud registration temporarily
m-horky Aug 1, 2024
0902378
code review comments fixes
chambridge Aug 1, 2024
22aaac3
Merge pull request #3433 from chambridge/azure-deduplication-facts
jirihnidek Aug 1, 2024
7568520
Fixed spec file to list packages twice
sbernhard Aug 2, 2024
3565182
Merge pull request #3438 from candlepin/mhorky/cct-654-disable-autore…
jirihnidek Aug 5, 2024
261baa6
doc: Update install and testing guide
Glutexo Aug 8, 2024
793208e
feat: Require SCA for registration
m-horky Aug 13, 2024
7ee4459
chore: Format register.py
m-horky Aug 8, 2024
f7693bc
Merge pull request #3430 from candlepin/mhorky/cct-612/sca-only-regis…
jirihnidek Aug 15, 2024
eaf3dd1
Translated using Weblate (Korean)
simmon-nplob Mar 21, 2024
7c301f0
Translated using Weblate (Russian)
FAlexei Mar 21, 2024
283bc89
Automatic commit of package [subscription-manager] release [1.30.0-1].
ptoscano Aug 16, 2024
2c559a3
feat: forcefully switch automatic cloud registration to v1
ptoscano Aug 20, 2024
e869c85
Automatic commit of package [subscription-manager] release [1.30.1-1].
ptoscano Aug 21, 2024
fb939bf
test(ci): Improve container pre-test script
m-horky Aug 22, 2024
5811943
docs: Change reverse proxy to proxy in man page
jvlcek Aug 6, 2024
fb3d585
Update the correct man page file.
jvlcek Aug 21, 2024
9bfd201
feat: Removed command "redeem" from subscription-manager
jirihnidek Aug 16, 2024
dd0395b
feat: Remove 'addons' subcommand(s)
m-horky Jul 8, 2024
371beb4
feat: Removed attach command and CLI option related to attach
jirihnidek Jun 3, 2024
cc4af13
feat: Removed D-Bus methods related to attach
jirihnidek Jun 3, 2024
0dc86a2
feat: Removed attach service
jirihnidek Jun 3, 2024
9eab30d
feat: Remove references on auto-attach in man page
jirihnidek Jun 3, 2024
00deef2
feat: Remove attach from bash completion script
jirihnidek Jun 19, 2024
d9204e3
feat: Eliminate command 'remove' from subscription-manager
jvlcek Aug 6, 2024
f39d07f
feat: Remove auto-attach command
jirihnidek Sep 3, 2024
8af6106
docs: remove references to removed commands
DuckBoss Aug 16, 2024
6006ec6
feat: dnf plugin - outsource uploading of profile to rhsmcertd.
jirihnidek Sep 9, 2024
9c6c0f4
feat: Add rhsm group during installation of subman RPM
jirihnidek Aug 1, 2024
c763cc0
feat: Create consumer cert & key owner by rhsm group
jirihnidek Aug 1, 2024
fbe0737
Translated using Weblate (Georgian)
NorwayFun Sep 19, 2024
21038d3
Automatic commit of package [subscription-manager] release [1.30.2-1].
ptoscano Sep 26, 2024
c124784
feat: Remove autoheal functionality from rhsmcertd
jvlcek Sep 12, 2024
f222b57
feat: support registering specifying environments with activation keys
rverdile Sep 25, 2024
85544b2
chore: move autoreg waiting code in own function
ptoscano Oct 1, 2024
0d27a59
fix: perform autoreg waiting when performing standard autoreg
ptoscano Oct 1, 2024
336f78b
feat: Remove useless CLI options from list command
jirihnidek Oct 1, 2024
4f9ee11
fix: Removed show_autosubscribe_output() method
jirihnidek Oct 4, 2024
5e094e3
refactor: Moved some definition of lists from list.py
jirihnidek Oct 4, 2024
e7ff6fb
feat: Better automatic registration logging
m-horky Sep 23, 2024
4c8a44a
fix: Handle Retry-After headers better for 429 responses
m-horky Sep 23, 2024
b568393
Merge pull request #3464 from candlepin/ptoscano/retry-after
jirihnidek Oct 14, 2024
1175cc5
feat/cct-874: Autocompletion for option --servicelevel removed
Nov 5, 2024
6e2c0a6
feat/cct-875: Options -i and --cert-interval were removed from rhsmce…
Nov 5, 2024
f46ba8c
fix: drop "autoattachinterval" from the rhsmcertd defaults
ptoscano Nov 12, 2024
9f8f921
Merge pull request #3472 from candlepin/ptoscano/CCT-966
pkoprda Nov 13, 2024
04c1bee
feat: Added basic configuration for Packit
jirihnidek Nov 6, 2024
41d91d7
feat: add GetEnvironments method to DBus register
rverdile Oct 1, 2024
05870c4
Merge pull request #3462 from rverdile/764
jirihnidek Nov 27, 2024
011c8c4
feat: remove content access mode cache
DuckBoss Nov 12, 2024
55e250d
Feat CCT-965: Include timezone in the logs
mgrunwal Nov 25, 2024
71c526e
fix: Renamed integration-tests to cockpit-tests
jirihnidek Nov 15, 2024
5365981
feat: Add initial support for tmt
jirihnidek Nov 18, 2024
58c7834
chore: Remove auto-assign CI job
m-horky Dec 9, 2024
50c0d8c
Merge pull request #3482 from candlepin/mhorky/no-auto-assign
jirihnidek Dec 10, 2024
d1b2a44
fix: Fixed integration tests
jirihnidek Dec 9, 2024
3763a93
fix: Added missing python packages
jirihnidek Dec 10, 2024
1d157bd
chore: Remove artifacts of attach
Glutexo Nov 20, 2024
0ecf37d
chore: Remove artifacts of --auto-attach
Glutexo Nov 28, 2024
ea85bee
chore: Remove artifacts of autoheal
Glutexo Nov 28, 2024
2154435
chore: Remove artifacts of remove
Glutexo Dec 4, 2024
3ed142d
chore: Remove artifacts of redeem
Glutexo Dec 3, 2024
bea14ec
chore: Remove artifacts of import
Glutexo Dec 3, 2024
5eee229
chore: Remove the --token authentication
pkoprda Dec 9, 2024
a746f6f
Card ID: CCT-731 - integration tests for DBus Register method
jstavel Nov 26, 2024
d6b8040
Merge pull request #3477 from candlepin/jstavel/dbus-integration-tests
jirihnidek Dec 17, 2024
6e5a644
Automatic commit of package [subscription-manager] release [1.30.3-1].
jirihnidek Dec 19, 2024
8140ecc
feat: Enable register with environment names and environment types
jirihnidek Dec 9, 2024
76d9858
Merge pull request #3480 from candlepin/jhnidek/reg_env_names
jirihnidek Dec 19, 2024
889230c
Translated using Weblate (Korean)
simmon-nplob Dec 23, 2024
82bd1f3
Translated using Weblate (German)
Atalanttore Dec 23, 2024
c6adde0
Translated using Weblate (French)
HarmfulBreeze Dec 23, 2024
c0c62d1
Translated using Weblate (Italian)
salvatore-cocuzza Dec 23, 2024
50cb52b
ci: use official c10s container image
ptoscano Jan 9, 2025
4da2473
New extraction for translatable strings
ptoscano Jan 7, 2025
0f4614d
[ATIX] Add DebProfile to Profilemanager
Aug 1, 2019
9ad7982
[ATIX] Move repofile to rhsm subpackage
Aug 8, 2019
e867c8c
[ATIX] Generate enabled_repos from repofile
Aug 8, 2019
79342ab
[ATIX] Fix report enabled deb-repositories only
m-bucher Oct 20, 2020
d53a3b3
[ATIX] Allow syspurpose file to be written
sbernhard Dec 7, 2021
154a614
[ATIX] This import is really necessary because it will be imported in…
sbernhard Dec 9, 2021
8c05d2b
[ATIX] Add handling of params in repository urls
hstct Jan 17, 2023
a337fbb
[ATIX] Use repofile from rhsm subpackage
goarsna Jun 28, 2023
35d7f5e
[ATIX] Remove failing method annotations
goarsna Jun 28, 2023
cd84f6a
[ATIX] Adjust katello script for Python3
goarsna Jun 28, 2023
a3538a0
[ATIX] Fix APT component selection
quba42 Jul 3, 2023
1475fe5
[ATIX] Fix failing profile upload with SCA enabled
m-bucher Feb 2, 2024
9612ee0
[ATIX] Add deb repo-setting Signed-By
m-bucher May 24, 2024
28cc02b
[ATIX] Handle quoted baseurl
quba42 Sep 5, 2024
48ff219
[ATIX] Skip creating the yum.repos.d structure on debian based systems
sbernhard Jan 12, 2024
e391f3d
[ATIX] Fix test_repolib tests because of apt/deb822
sbernhard Dec 22, 2024
af3d8b3
[ATIX] Fix GPG trusted repolib test
sbernhard Dec 22, 2024
c1255fb
[ATIX] Remove package-profile-upload while building RPM
sbernhard Jan 10, 2025
8ca6f9e
WIP: temp. disable centos10 because of failed build
sbernhard Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cockpit-ci/run
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
16 changes: 0 additions & 16 deletions .github/workflows/auto-assign.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/libdnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
include:
- name: "CentOS Stream 10"
image: "quay.io/centos/centos:stream10-development"
image: "quay.io/centos/centos:stream10"
- name: "Fedora latest"
image: "registry.fedoraproject.org/fedora:latest"
- name: "Fedora Rawhide"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
include:
- name: "CentOS Stream 10"
image: "quay.io/centos/centos:stream10-development"
image: "quay.io/centos/centos:stream10"
pytest_args: ''
- name: "Fedora latest"
image: "registry.fedoraproject.org/fedora:latest"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
fail-fast: false
matrix:
include:
- name: "CentOS Stream 10"
image: "quay.io/centos/centos:stream10-development"
packager: "dnf4"
- name: "Fedora latest"
image: "registry.fedoraproject.org/fedora:latest"
packager: "dnf4"
Expand Down
46 changes: 46 additions & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
upstream_package_name: subscription-manager
downstream_package_name: subscription-manager
specfile_path: subscription-manager.spec
upstream_tag_template: "subscription-manager-{version}-1"

jobs:
- job: copr_build
trigger: pull_request
targets:
- centos-stream-10
- fedora-all

- job: copr_build
trigger: commit
branch: main
owner: "@yggdrasil"
project: latest
targets:
- centos-stream-10
- fedora-all

# - job: tests
# trigger: pull_request
# identifier: "unit/centos-stream"
# targets:
# - centos-stream-10
# labels:
# - unit
# tf_extra_params:
# environments:
# - artifacts:
# - type: repository-file
# id: https://copr.fedorainfracloud.org/coprs/g/yggdrasil/latest/repo/centos-stream-$releasever/group_yggdrasil-latest-centos-stream-$releasever.repo

- job: tests
trigger: pull_request
identifier: "unit/fedora"
targets:
- fedora-all
labels:
- unit
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/yggdrasil/latest/repo/fedora-$releasever/group_yggdrasil-latest-fedora-$releasever.repo
2 changes: 1 addition & 1 deletion .tito/packages/subscription-manager
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.29.40-1 ./
1.30.3-1 ./
23 changes: 18 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ To install subscription-manager, run
sudo dnf install subscription-manager
```

RHEL already comes with `subscription-manager` pre-installed. With `subscription-manager` present, you can get register the system with your Red Hat account by running

```bash
sudo subscription-manager register
```


## Developer installation

The process below has been tested on Fedora 36.
Other Fedora versions or distributions may require some adaptation.
The process below has been tested on Fedora 36 and RHEL 9.
Other versions or distributions may require some adaptation.

1. First you need to install RPM packages to build and run subscription-manager binaries:

Expand All @@ -23,9 +30,15 @@ Other Fedora versions or distributions may require some adaptation.

<!-- libdnf-devel, cmake are required to build product-id plugin -->

2. Install Fedora's subscription-manager RPM and packages required to run the test suite:
On RHEL, you need to enable the [CodeReady Linux Builder](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/package_manifest/repositories#CodeReadyLinuxBuilder-repository) repository in order to gain access to the development packages like `libdnf-devel`.

```bash
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
```

2. Install the `subscription-manager` RPM (not required for RHEL) and packages required to run the test suite:

***NOTE**: Installing `subscription-manager` package is strictly not necessary, but it will pull down all dependencies and create all the files used by subscription-manager.*
***NOTE**: Installing `subscription-manager` package is not strictly necessary even on Fedora, but it will pull down all dependencies and create all the files used by subscription-manager.*

```bash
sudo dnf install --setopt install_weak_deps=False subscription-manager \
Expand Down Expand Up @@ -87,7 +100,7 @@ Other Fedora versions or distributions may require some adaptation.
alias rhsmcertd="sudo \
PYTHONPATH=/path/to/subscription-manager/src \
$(which python3) \
-m subscription_manager.scripts.rhsmcertd_worker --autoheal"
-m subscription_manager.scripts.rhsmcertd_worker"
```

Before you run rhsm service manually, ensure you have disabled the system service first:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ install-files: dbus-install install-conf install-plugins
install -m 644 etc-conf/subscription-manager.conf.tmpfiles \
$(DESTDIR)/$(PREFIX)/lib/tmpfiles.d/subscription-manager.conf

# Install configuration file with system users and group (only rhsm group ATM)
install -d $(DESTDIR)/$(PREFIX)/lib/sysusers.d
install -m 644 etc-conf/rhsm-sysuser.conf $(DESTDIR)/$(PREFIX)/lib/sysusers.d/rhsm.conf

# SUSE Linux does not make use of consolehelper
if [ -f /etc/redhat-release ]; then \
ln -sf /usr/bin/consolehelper $(DESTDIR)/$(PREFIX)/bin/subscription-manager; \
Expand Down
6 changes: 6 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## subscription-manager

First, install the tests dependencies from [`test-requirements.txt`](test-requirements.txt). Make sure your virtual environment is activated.

```bash
pip install -r test-requirements.txt
```

```bash
pytest
# or, for increased verbosity
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/run → cockpit-tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# like this:
#
# $ export TEST_OS=rhel-8-4
# $ ./integration-tests/run prepare
# $ ./integration-tests/check-subscriptions -v -j1 -t
# $ ./cockpit-tests/run prepare
# $ ./cockpit-tests/check-subscriptions -v -j1 -t
#
# You need a couple of things installed for that. At least Python 3,
# a Chromium browser, and libvirtd. See
Expand All @@ -20,7 +20,7 @@ ifeq ($(TEST_OS),)
TEST_OS = rhel-8-4
endif
export TEST_OS
SUB_MAN_COCKPIT=$(CURDIR)/integration-tests/submancockpit
SUB_MAN_COCKPIT=$(CURDIR)/cockpit-tests/submancockpit
VM_IMAGE=$(SUB_MAN_COCKPIT)/test/images/$(TEST_OS).qcow2
SUBMAN_TAR=$(CURDIR)/dist/subscription-manager.tar.gz
SMBEXT_TAR=$(CURDIR)/dist/subscription-manager-build-extra.tar.gz
Expand All @@ -45,7 +45,7 @@ $(SUBMAN_TAR):
$(SMBEXT_TAR):
tar czf $(SMBEXT_TAR) build_ext

$(VM_IMAGE): $(SUB_MAN_COCKPIT) $(SUBMAN_TAR) $(SMBEXT_TAR) integration-tests/vm.install
$(VM_IMAGE): $(SUB_MAN_COCKPIT) $(SUBMAN_TAR) $(SMBEXT_TAR) cockpit-tests/vm.install
rm -f $(VM_IMAGE)
# setup the test image from subscription-manager-cockpit without
# a custom subscription-manager, which will be installed manually
Expand All @@ -54,7 +54,7 @@ $(VM_IMAGE): $(SUB_MAN_COCKPIT) $(SUBMAN_TAR) $(SMBEXT_TAR) integration-tests/vm
cd $(SUB_MAN_COCKPIT) && bots/image-customize -v $(TEST_OS) \
-u $(SUBMAN_TAR):/var/tmp/ \
-u $(SMBEXT_TAR):/var/tmp/ \
-s ../../integration-tests/vm.install
-s ../../cockpit-tests/vm.install

$(SUB_MAN_COCKPIT):
git clone --quiet https://github.com/candlepin/subscription-manager-cockpit.git $(SUB_MAN_COCKPIT)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion debian-stuff/80package-profile-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DPkg::Post-Invoke { /usr/lib/katello-client/bin/deb_package_profile_upload }
DPkg::Post-Invoke { /usr/bin/package-profile-upload }
35 changes: 0 additions & 35 deletions debian-stuff/deb_package_profile_upload

This file was deleted.

6 changes: 3 additions & 3 deletions debian-stuff/katello
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python -u
#! /usr/bin/python3 -u
#
# The katello Acquire Method
#
Expand Down Expand Up @@ -29,7 +29,7 @@ import re
import hashlib
import requests
from urllib.parse import quote
from configparser import SafeConfigParser
from configparser import ConfigParser


class pkg_acquire_method:
Expand Down Expand Up @@ -138,7 +138,7 @@ class katello_method(pkg_acquire_method):
Return the proxy server config from /etc/rhsm/rhsm.conf as dict
Adapted from https://github.com/Katello/katello-client-bootstrap/blob/master/bootstrap.py
"""
rhsmconfig = SafeConfigParser()
rhsmconfig = ConfigParser()
rhsmconfig.read('/etc/rhsm/rhsm.conf')

proxy_options = [option for option in rhsmconfig.options('server') if option.startswith('proxy')]
Expand Down
3 changes: 0 additions & 3 deletions etc-conf/dbus/system.d/com.redhat.RHSM1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<allow send_destination="com.redhat.RHSM1"
send_interface="com.redhat.RHSM1"/>

<allow send_destination="com.redhat.RHSM1"
send_interface="com.redhat.RHSM1.Attach"/>

<allow send_destination="com.redhat.RHSM1"
send_interface="com.redhat.RHSM1.Products"/>

Expand Down
2 changes: 2 additions & 0 deletions etc-conf/rhsm-sysuser.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
g rhsm - -
2 changes: 0 additions & 2 deletions etc-conf/rhsm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ progress_messages = 1
[rhsmcertd]
# Interval to run cert check (in minutes):
certCheckInterval = 240
# Interval to run auto-attach (in minutes):
autoAttachInterval = 1440
# If set to zero, the checks done by the rhsmcertd daemon will not be splayed (randomly offset)
splay = 1
# If set to 1, rhsmcertd will not execute.
Expand Down
2 changes: 1 addition & 1 deletion etc-conf/rhsmcertd.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _rhsmcertd()
first="${COMP_WORDS[1]}"
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-h --help -c --cert-check-interval --cert-interval -d --debug --heal-interval -i --auto-attach-interval -n --now -s --no-splay -a --auto-registration -r --auto-registration-interval"
opts="-h --help -c --cert-check-interval -d --debug -n --now -s --no-splay -a --auto-registration -r --auto-registration-interval"

case "${cur}" in
-*)
Expand Down
Loading
Loading