Skip to content

Conversation

@guyuqi
Copy link
Member

@guyuqi guyuqi commented May 11, 2023

https://issues.apache.org/jira/browse/BIGTOP-3919
Upgrade GPDB to 6.23.4.

  1. Removed the obsoleted patches;
  2. Suppressed 'implicit-fallthrough' warning on ubuntu;
  3. Declared python version explicitly to fix gpcheckcat issues of ambiguous python shebang.
  4. Refactored puppet scripts.
  5. Fixed smoke tests and rpath issues on Fedora.

guyuqi added 4 commits May 11, 2023 10:05
Upgrade GPDB to 6.23.4.
Removed the obsoleted patches;
Suppressed 'implicit-fallthrough' warning on ubuntu;
Declare python version explicitly to fix gpcheckcat issues
of ambiguous python shebang.

Change-Id: I54c773573fc0c475351dd95a3673cc60f84cede8
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
When upgrading GPDB to 6.23.4:
The command options had been changed and GPDB-6.23.4 do not
support 'hiden system columns' queries anymore.
Consequently, we need to refactor the auto-deployment scripts correspondingly.

Change-Id: Ifb9865ace1aa65968365e70770d4949c127729c1
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
The puppet scripts was updated in ENTWLS-2967.
This patch is to fix GPDB smoke tests corresponding to
the changes in the auto-depolyment scripts in GPDB puppet.

Change-Id: Ib438fe6346a442e9b25c0d597815ea765a84100f
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
Change-Id: Ie55c0c69e55d8df357b8a7c5d93938fa2f629164
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
@guyuqi
Copy link
Member Author

guyuqi commented May 11, 2023

Tests:

  1. Build gpdb on Fedora-36, Rockylinux-8, CentOS-7, Ubtuntu-20 and Debian-11 (Arm64/x86_64).
  2. The related smoke tests are passed.


OS="$ID"
if [ "${OS}" = "fedora" ]; then
./configure --prefix=$1 --with-python --with-libxml --with-gssapi --disable-orca --disable-rpath CFLAGS='-fcommon -Wno-implicit-fallthrough'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guyuqi This looks not the right solution. We should not expect users to set LD_LIBRARY_PATH. If we really need to disable rpath, the RPM should add a configuration file under /etc/ld.so.conf.d/ and run ldconfig on installing.

How about setting QA_RPATHS=$(( 0x0001|0x0002 )) on rpmbuild as the message suggest?

+ /usr/lib/rpm/check-rpaths
*******************************************************************************
*
* WARNING: 'check-rpaths' detected a broken RPATH OR RUNPATH and will cause
*          'rpmbuild' to fail. To ignore these errors, you can set the
*          '$QA_RPATHS' environment variable which is a bitmask allowing the
*          values below. The current value of QA_RPATHS is 0x0002.
*
*    0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor
*               issue but are introducing redundant searchpaths without
*               providing a benefit. They can also cause errors in multilib
*               environments.
*    0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute
*               nor relative filenames and can therefore be a SECURITY risk
*    0x0004 ... insecure RPATHs; these are relative RPATHs which are a
*               SECURITY risk
*    0x0008 ... the special '$ORIGIN' RPATHs are appearing after other
*               RPATHs; this is just a minor issue but usually unwanted
*    0x0010 ... the RPATH is empty; there is no reason for such RPATHs
*               and they cause unneeded work while loading libraries
*    0x0020 ... an RPATH references '..' of an absolute path; this will break
*               the functionality when the path before '..' is a symlink
*
*
* Examples:
* - to ignore standard and empty RPATHs, execute 'rpmbuild' like
*   $ QA_RPATHS=$(( 0x0001|0x0010 )) rpmbuild my-package.src.rpm
* - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like
*   $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths
*
*******************************************************************************
ERROR   0001: file '/usr/lib/gpdb/lib/postgresql/plpython2.so' contains a standard  '/usr/lib64' in [/usr/lib64:/ext/python/lib]
WARNING 0002: file '/usr/lib/gpdb/lib/postgresql/plpython2.so' contains an invalid  '/ext/python/lib' in [/usr/lib64:/ext/python/lib]
error: Bad exit status from /var/tmp/rpm-tmp.4dIXaK (%install)

Copy link
Member Author

@guyuqi guyuqi May 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments and Sorry for the late reply.

Agreed with your suggestion.
We should not disable rpath check in Gpdb binary building in order to prevent users from setting unnecessary LD_LIBRARY_PATH when installing gpdb rpm.

QA_RPATHS=$(( 0x0001|0x0002 )) is to skip the errors of rpath check.
But it appears that it is not working when I add the settings in ~/.rpmmacros or export it as the global variable.

From https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild:
what about setting Broken RPATH to null by %global __brp_check_rpaths %{nil} which also performs as skipping the errors of rpath check.
I also remove unnecessary LD_LIBRARY_PATH setting in puppet scripts as shown in the latest commit. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The building and smoke tests are passed on x86_64 and Arm64.

…Y_PATH setting

Change-Id: I8e9d219a2c4a23356ae4fde467fde749eef764ff
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
Copy link
Member

@iwasakims iwasakims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @guyuqi.

@iwasakims iwasakims merged commit 5e8092a into apache:master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants