Skip to content

Commit

Permalink
Merge branch 'candlepin:main' into feat/cct-467
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnk-dev authored Jan 21, 2025
2 parents 3fa0e39 + 64d7144 commit 0719bd2
Show file tree
Hide file tree
Showing 98 changed files with 1,854 additions and 2,738 deletions.
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
7 changes: 6 additions & 1 deletion .github/workflows/tito.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"
packager: "dnf4"
- name: "Fedora latest"
image: "registry.fedoraproject.org/fedora:latest"
Expand Down Expand Up @@ -70,6 +70,11 @@ jobs:
python3-pip python3-setuptools
pip install https://github.com/rpm-software-management/tito/archive/refs/tags/tito-0.6.22-1.tar.gz
- name: Install which (RHEL-73048)
if: ${{ matrix.name == 'CentOS Stream 10' }}
run: |
dnf --setopt install_weak_deps=False install -y which
- name: Build the package
run: |
tito build --output=tito/ --test --rpm
Expand Down
26 changes: 26 additions & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,29 @@ jobs:
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.30.2-1 ./
1.30.3-1 ./
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PREFIX ?= /usr/local
SYSCONF ?= etc
INSTALL_DIR = $(PREFIX)/share
RUN_DIR ?= /run
SBIN_DIR ?= $(PREFIX)/sbin

OS = $(shell test -f /etc/os-release && source /etc/os-release; echo $$ID)
OS_DIST ?= $(shell rpm --eval='%dist')
Expand Down Expand Up @@ -199,9 +200,9 @@ install-example-plugins: install-plugins
install-via-setup: install-subpackages-via-setup
EXCLUDE_PACKAGES="$(EXCLUDE_PACKAGES)" $(PYTHON) ./setup.py install --root $(DESTDIR) --pkg-version=$(VERSION) --prefix=$(PREFIX) \
$(SETUP_PY_INSTALL_PARAMS)
mkdir -p $(DESTDIR)/$(PREFIX)/sbin/
mkdir -p $(DESTDIR)/$(SBIN_DIR)/
mkdir -p $(DESTDIR)/$(LIBEXEC_DIR)/
mv $(DESTDIR)/$(PREFIX)/bin/subscription-manager $(DESTDIR)/$(PREFIX)/sbin/
mv -n $(DESTDIR)/$(PREFIX)/bin/subscription-manager $(DESTDIR)/$(SBIN_DIR)/
mv $(DESTDIR)/$(PREFIX)/bin/rhsmcertd-worker $(DESTDIR)/$(LIBEXEC_DIR)/
mv $(DESTDIR)/$(PREFIX)/bin/rhsm-service $(DESTDIR)/$(LIBEXEC_DIR)/
mv $(DESTDIR)/$(PREFIX)/bin/rhsm-facts-service $(DESTDIR)/$(LIBEXEC_DIR)/
Expand Down Expand Up @@ -241,13 +242,6 @@ install-files: dbus-install install-conf install-plugins
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; \
install -m 644 etc-conf/subscription-manager.pam $(DESTDIR)/etc/pam.d/subscription-manager; \
install -m 644 etc-conf/subscription-manager.console $(DESTDIR)/etc/security/console.apps/subscription-manager; \
fi; \

install -m 755 bin/rhsmcertd $(DESTDIR)/$(PREFIX)/bin/rhsmcertd

.PHONY: check
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.
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
14 changes: 7 additions & 7 deletions etc-conf/subscription-manager.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ _subscription_manager_syspurpose()
_subscription_manager_role()
{
local opts="--list --org --set --show
--unset --username --password --token
--unset --username --password
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
}

_subscription_manager_usage()
{
local opts="--list --org --set --show
--unset --username --password --token
--unset --username --password
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
}
Expand Down Expand Up @@ -72,7 +72,7 @@ _subscription_manager_config()

_subscription_manager_environments()
{
local opts="--org --password --username --token --set --list --list-enabled --list-disabled
local opts="--org --password --username --set --list --list-enabled --list-disabled
${_subscription_manager_common_url_opts}
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
Expand All @@ -87,7 +87,7 @@ _subscription_manager_facts()

_subscription_manager_identity()
{
local opts="--force --password --regenerate --username --token
local opts="--force --password --regenerate --username
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
}
Expand All @@ -102,7 +102,7 @@ _subscription_manager_list()

_subscription_manager_orgs()
{
local opts="--password --username --token
local opts="--password --username
${_subscription_manager_common_url_opts}
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
Expand Down Expand Up @@ -134,7 +134,7 @@ _subscription_manager_register()
{
local opts="--activationkey --baseurl --consumerid
--environments --force --name --org --password --release
--username --token
--username
${_subscription_manager_common_url_opts}
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
Expand All @@ -159,7 +159,7 @@ _subscription_manager_repos()
_subscription_manager_service_level()
{
local opts="--list --org --set --show
--unset --username --password --token
--unset --username --password
${_subscription_manager_common_url_opts}
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
Expand Down
3 changes: 0 additions & 3 deletions etc-conf/subscription-manager.console

This file was deleted.

4 changes: 0 additions & 4 deletions etc-conf/subscription-manager.pam

This file was deleted.

6 changes: 0 additions & 6 deletions example-plugins/dbus_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,3 @@ def pre_subscribe_hook(self, conduit):

def post_subscribe_hook(self, conduit):
self._dbus_event("post_subscribe", conduit)

def pre_auto_attach_hook(self, conduit):
self._dbus_event("pre_auto_attach", conduit)

def post_auto_attach_hook(self, conduit):
self._dbus_event("post_auto_attach", conduit)
6 changes: 0 additions & 6 deletions example-plugins/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,3 @@ def post_subscribe_hook(self, conduit):
conduit: A PostSubscriptionConduit()
"""
conduit.log.debug("post subscribe called")

def pre_auto_attach_hook(self, conduit):
conduit.log.debug("pre auto attach called")

def post_auto_attach_hook(self, conduit):
conduit.log.debug("post auto attach called")
Loading

0 comments on commit 0719bd2

Please sign in to comment.