Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Yuriy Kohut | eb9a866aa4 | |
Yuriy Kohut | 424d109053 |
|
@ -0,0 +1,113 @@
|
|||
--- data/preassessment/scripts.txt.orig 2021-01-29 16:52:35.000000000 +0200
|
||||
+++ data/preassessment/scripts.txt 2023-12-20 10:02:52.872880812 +0200
|
||||
@@ -7,4 +7,4 @@ chkconfig --list=chkconfig.log=CHKCONFIG
|
||||
rpm -qal | sort=rpmtrackedfiles.log=RPMTRACKEDFILES=All installed files=YES=All_installed_files
|
||||
for i in `df --local -P | rev | cut -f1 -d' ' | rev | tail -n +2`;do find $i -xdev -print; done | sort=allmyfiles.log=ALLMYFILES=All local files=NO
|
||||
for i in `df --local -P | rev | cut -f1 -d' ' | rev | tail -n +2`;do find $i -xdev -perm /111 -type f -print; done | sort=executable.log=EXECUTABLES=All executable files=NO
|
||||
-grep -e "199e2f91fd431d51" -e "5326810137017186" -e "938a80caf21541eb" -e "fd372689897da07a" -e "45689c882fa658e0" rpm_qa.log=rpm_rhsigned.log=RPM_RHSIGNED_LOG=Red Hat signed packages=NO
|
||||
+grep -e "0946fca2c105b9de" -e "0b132c3ffe837f6f" -e "119c1a87ef1d6db8" -e "3b75cf79d0ff3d16" -e "24c6a8a7f4a80eb5" -e "c78893ac8fae34bd" rpm_qa.log=rpm_centossigned.log=RPM_CENTOSSIGNED_LOG=CentOS signed packages=NO
|
||||
--- common.sh.orig 2021-01-29 16:52:35.000000000 +0200
|
||||
+++ common.sh 2023-12-20 10:06:43.632875179 +0200
|
||||
@@ -56,7 +56,7 @@ VALUE_GROUP=$PREUPGRADE_CACHE/group.log
|
||||
VALUE_RPMTRACKEDFILES=$PREUPGRADE_CACHE/rpmtrackedfiles.log
|
||||
|
||||
#
|
||||
-# Full path to log file with all Red Hat signed packages
|
||||
+# Full path to log file with all CentOS signed packages
|
||||
#
|
||||
VALUE_RPM_RHSIGNED=$PREUPGRADE_CACHE/rpm_rhsigned.log
|
||||
|
||||
@@ -61,6 +61,11 @@ VALUE_RPMTRACKEDFILES=$PREUPGRADE_CACHE/
|
||||
VALUE_RPM_RHSIGNED=$PREUPGRADE_CACHE/rpm_rhsigned.log
|
||||
|
||||
#
|
||||
+# Full path to log file with all CentOS signed packages
|
||||
+#
|
||||
+VALUE_RPM_CENTOSSIGNED=$PREUPGRADE_CACHE/rpm_centossigned.log
|
||||
+
|
||||
+#
|
||||
# Full path to log file with all local files
|
||||
#
|
||||
VALUE_ALLMYFILES=$PREUPGRADE_CACHE/allmyfiles.log
|
||||
@@ -395,10 +395,10 @@ switch_to_content() {
|
||||
|
||||
check_applies_to() {
|
||||
#
|
||||
- # Function checks is package is installed and signed by Red Hat
|
||||
+ # Function checks is package is installed and signed by CentOS
|
||||
#
|
||||
# Parameter list of packages which will be checked. Module requires them.
|
||||
- # :return: 0 - package is installed and signed by Red Hat
|
||||
+ # :return: 0 - package is installed and signed by CentOS
|
||||
# exit_not_applicable - module will not be executed
|
||||
#
|
||||
local RPM=1
|
||||
@@ -412,7 +412,7 @@ check_applies_to() {
|
||||
for pkg in $RPM_NAME
|
||||
do
|
||||
is_pkg_installed "$pkg" && is_dist_native "$pkg" || {
|
||||
- log_info "Package $pkg is not installed or it is not signed by Red Hat."
|
||||
+ log_info "Package $pkg is not installed or it is not signed by CentOS."
|
||||
NOT_APPLICABLE=1
|
||||
}
|
||||
done
|
||||
@@ -599,7 +599,7 @@ is_dist_native() {
|
||||
|
||||
grep "^$pkg[[:space:]]" $VALUE_RPM_QA > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
- log_warning "Package $pkg is not installed on Red Hat Enterprise Linux system."
|
||||
+ log_warning "Package $pkg is not installed on CentOS Enterprise Linux system."
|
||||
return 1
|
||||
fi
|
||||
if [ x"$DEVEL_MODE" == "x0" ]; then
|
||||
@@ -603,7 +603,8 @@ is_dist_native() {
|
||||
return 1
|
||||
fi
|
||||
if [ x"$DEVEL_MODE" == "x0" ]; then
|
||||
- grep "^$pkg[[:space:]]" $VALUE_RPM_RHSIGNED > /dev/null
|
||||
+ #grep "^$pkg[[:space:]]" $VALUE_RPM_RHSIGNED > /dev/null
|
||||
+ grep "^$pkg[[:space:]]" $VALUE_RPM_CENTOSSIGNED > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
return 0
|
||||
else
|
||||
@@ -615,7 +616,8 @@ is_dist_native() {
|
||||
return 0
|
||||
;;
|
||||
"sign")
|
||||
- grep "^$pkg[[:space:]]" $VALUE_RPM_RHSIGNED > /dev/null
|
||||
+ #grep "^$pkg[[:space:]]" $VALUE_RPM_RHSIGNED > /dev/null
|
||||
+ grep "^$pkg[[:space:]]" $VALUE_RPM_CENTOSSIGNED > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
return 0
|
||||
else
|
||||
--- preupg/script_api.py.orig 2021-01-29 16:52:35.000000000 +0200
|
||||
+++ preupg/script_api.py 2023-12-20 10:13:17.284874209 +0200
|
||||
@@ -75,6 +75,7 @@ __all__ = (
|
||||
'VALUE_ALLMYFILES',
|
||||
'VALUE_EXECUTABLES',
|
||||
'VALUE_RPM_RHSIGNED',
|
||||
+ 'VALUE_RPM_CENTOSSIGNED',
|
||||
'VALUE_TMP_PREUPGRADE',
|
||||
'MODULE_PATH',
|
||||
'COMMON_DIR',
|
||||
@@ -162,6 +163,11 @@ VALUE_EXECUTABLES = os.path.join(PREUPGR
|
||||
VALUE_RPM_RHSIGNED = os.path.join(PREUPGRADE_CACHE, "rpm_rhsigned.log")
|
||||
|
||||
#
|
||||
+# Full path to log file with all CentOS signed packages
|
||||
+#
|
||||
+VALUE_RPM_CENTOSSIGNED=os.path.join(PREUPGRADE_CACHE, "rpm_centossigned.log")
|
||||
+
|
||||
+#
|
||||
# Variable which referes to temporary directory directory provided by module
|
||||
#
|
||||
VALUE_TMP_PREUPGRADE = os.environ['XCCDF_VALUE_TMP_PREUPGRADE']
|
||||
@@ -655,7 +661,7 @@ def is_dist_native(pkg):
|
||||
log_warning("Package %s is not installed on Red Hat Enterprise Linux system.")
|
||||
return False
|
||||
|
||||
- rpm_signed = FileHelper.get_file_content(VALUE_RPM_RHSIGNED, "rb", True)
|
||||
+ rpm_signed = FileHelper.get_file_content(VALUE_RPM_CENTOSSIGNED, "rb", True)
|
||||
found = [x for x in rpm_signed if x.split()[0] == pkg]
|
||||
|
||||
if int(DEVEL_MODE) == 0:
|
|
@ -0,0 +1,18 @@
|
|||
--- preupg/utils.py.orig 2021-01-29 16:52:35.000000000 +0200
|
||||
+++ preupg/utils.py 2023-12-20 10:22:28.516874749 +0200
|
||||
@@ -380,14 +380,7 @@ class SystemIdentification(object):
|
||||
@staticmethod
|
||||
def get_variant():
|
||||
"""Function return a variant"""
|
||||
- redhat_release = FileHelper.get_file_content("/etc/redhat-release", "rb")
|
||||
- if redhat_release.startswith('Fedora'):
|
||||
- return None
|
||||
- try:
|
||||
- rel = redhat_release.split()
|
||||
- return rel[4]
|
||||
- except IndexError:
|
||||
- return None
|
||||
+ return "Server"
|
||||
|
||||
|
||||
class TarballHelper(object):
|
|
@ -15,12 +15,14 @@
|
|||
|
||||
Name: preupgrade-assistant
|
||||
Version: 2.6.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Preupgrade Assistant advises on feasibility of system upgrade or migration
|
||||
Group: System Environment/Libraries
|
||||
License: GPLv3+
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch1: 1-preupgrade-assistant-centospkgs.patch
|
||||
Patch2: 2-preupgrade-assistant-no-variants.patch
|
||||
%if %{build_ui}
|
||||
Source1: Django-%{django_version}.tar.gz
|
||||
Source2: south-%{south_version}.tar.gz
|
||||
|
@ -63,8 +65,8 @@ Preupgrade Assistant is also capable of migrating the system. It then
|
|||
produces a report, which assists you in performing the upgrade itself
|
||||
by outlining potential problem areas and by offering suggestions about
|
||||
mitigating any possible incompatibilities. The Preupgrade Assistant
|
||||
utility is a Red Hat Upgrade Tool prerequisite for completing a successful
|
||||
in-place upgrade to the next major version of Red Hat Enterprise Linux.
|
||||
utility is a CentOS Upgrade Tool prerequisite for completing a successful
|
||||
in-place upgrade to the next major version of CentOS Linux.
|
||||
|
||||
%if %{build_ui}
|
||||
%package ui
|
||||
|
@ -94,6 +96,8 @@ OpenSCAP is generated automatically.
|
|||
|
||||
%prep
|
||||
%setup -n %{name}-%{version} -q
|
||||
%patch1 -p0
|
||||
%patch2 -p0
|
||||
|
||||
%if %{build_ui}
|
||||
# Unpack UI-related tarballs
|
||||
|
@ -215,6 +219,7 @@ su apache - -s /bin/bash -c "preupg-ui-manage collectstatic --noinput" >/dev/nul
|
|||
if [ "$1" == 1 ]; then
|
||||
# allow httpd to run preupgrade ui
|
||||
setsebool httpd_run_preupgrade on
|
||||
setsebool -P httpd_run_preupgrade on
|
||||
fi
|
||||
# restart apache
|
||||
service httpd condrestart
|
||||
|
@ -226,6 +231,7 @@ service httpd condrestart
|
|||
if [ "$1" == 0 ]; then
|
||||
# disallow httpd to run preupgrade ui
|
||||
setsebool httpd_run_preupgrade off
|
||||
setsebool -P httpd_run_preupgrade off
|
||||
# restart apache
|
||||
service httpd condrestart
|
||||
fi
|
||||
|
@ -277,6 +283,9 @@ fi
|
|||
%attr(0644,root,root) %{_mandir}/man1/preupg-diff.*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 2 2024 Yuriy Kohut <ykohut@almalinux.org> - 2.6.2-2
|
||||
- Add CentOS branding with patches: 1-preupgrade-assistant-centospkgs.patch, 2-preupgrade-assistant-no-variants.patch
|
||||
|
||||
* Tue Jul 21 2020 Petr Stodulka <pstodulk@redhat.com> - 2.6.2-1
|
||||
- Rebased to upstream version 2.6.2
|
||||
- enable the httpd_run_preupgrade SELinux boolean permanently for Web UI
|
||||
|
|
Loading…
Reference in New Issue