RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1215685 - Global configuration file for preupgrade-assistant
Summary: Global configuration file for preupgrade-assistant
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks: 1245120
TreeView+ depends on / blocked
 
Reported: 2015-04-27 13:23 UTC by Petr Hracek
Modified: 2015-11-20 01:41 UTC (History)
7 users (show)

Fixed In Version: preupgrade-assistant-2.1.0-6.el6
Doc Type: Bug Fix
Doc Text:
Previously, the preupgrade-assistant did not contain a configuration file that could be used to configure both the preupgrade-assistant and the preupgrade-assistant-contents. The configuration file is now available in the package.
Clone Of:
Environment:
Last Closed: 2015-11-20 01:41:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:2497 0 normal SHIPPED_LIVE preupgrade-assistant enhancement update 2015-11-20 06:41:27 UTC

Description Petr Hracek 2015-04-27 13:23:25 UTC
Description of problem:
preupgrade-assistant does not provide a global configuration file which can be used as for preupgrade-assistant itself as for preupgrade-assistant-contents.

E.g. Home directories content can be controlled by them.

Configuration file could have the name /etc/preupgrade-assistant.conf

Comment 2 Petr Hracek 2015-07-21 09:01:54 UTC
Proposed format of preupgrade-assistant configuration file can be like:

[contents]
home_directory_file=.preupgrade_dirs

[preupgrade-assistant]
debug=False //User could not specify -d option e.g.


Default home directory file is /etc/preupgrade-assistant/.preupgrade_dirs
which contains lines like
.config
.mozilla

What do you think about this suggestion?

This bug is not for preupgrade-assistant engine but only for introducing configuration file for contents.

Comment 3 Petr Hracek 2015-07-21 11:21:03 UTC
Global configuration file already exists in upstream by commit https://github.com/phracek/preupgrade-assistant/commit/a5c2a019be3a9197e92e14b48f92c3f627ba15f4

When common.sh and script_api.py are done then bugzilla can be switched to POST.

Comment 4 Petr Stodulka 2015-08-07 08:42:43 UTC
common.sh provides API for parsing of config file already.

scipt_api.py doesn't yet

Comment 5 Petr Hracek 2015-08-10 10:12:54 UTC
The bug is already fixed by upstream commit https://github.com/phracek/preupgrade-assistant/commit/2916bf2caa1556ea98c062345a955231dec4bb19

Switching to POST.


How to test it?
- In /etc/preupgrade-assistant.conf fileset user_config_file to enabled
- in an user create a file like /home/<user_name>/.preupgrade_dirs which will contain e.g.
[home-dirs]
.bash_history
.bash_logout

Let's test it with content aide.
- To shell script /usr/share/preupgrade/RHEL6_7/system/aide/aide.sh
add at the beginning after #END GENERATED SECTION
~~~
print_home_dirs <user_name>
~~~
And this should print all rows mentioned in /home/<user_name>/.preupgrade_dirs file

Comment 6 Petr Stodulka 2015-08-10 10:35:03 UTC
And API for bash (common.sh) is modified by these two commits [0,1].

Aditional info about other available functions in common.sh and variables:

conf_get_sections <config_file>
 --> print all found sections

conf_get_section <CONFIG_FILE> <section-without-brackets>
 --> print lines inside specific section

load_pa_configuration()
 --> used for own parsing of config file, set variables 
$USER_CONFIG_FILE == 0 (disabled) or 1 (enabled)
$HOME_DIRECTORY_FILE -> allowed filename for user's PA config file

---------------------------------------------------

[0] https://github.com/phracek/preupgrade-assistant/commit/e24ec86
[1] https://github.com/phracek/preupgrade-assistant/commit/5bb6ff5

Comment 9 Petr Stodulka 2015-08-31 14:15:40 UTC
Variables were set according to config files in subshell. Resolved by commit (https://github.com/phracek/preupgrade-assistant/commit/5a7fda64805fc9f9ac52e1ae41bc5d5654822a92)

Comment 10 Petr Stodulka 2015-08-31 14:16:43 UTC
+ removed test/debug echo - which shouldn't be part of output

Comment 15 errata-xmlrpc 2015-11-20 01:41:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-2497.html


Note You need to log in before you can comment on or make changes to this bug.