Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-10-04 Thread Panu Matilainen
Closed #2650 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#event-10551580009
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-10-04 Thread Panu Matilainen
Closing as I fail to see any bug in here. All our CI builds are done outside 
the source tree.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1746943425
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-11 Thread Panu Matilainen
The ${Python_SITEARCH} variable (and friends) come from the cmake Python module:
https://cmake.org/cmake/help/v3.18/module/FindPython.html

So basically that seems to be disagreeing with your expectation, but as to 
where it goes wrong I'm not going to even begin to guess.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1713704849
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-11 Thread Tomasz Kłoczko
Do you have any suggestion why in my case cmake is not installing pytom module 
in `%{python3_sitearch}`? 樂 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1713690481
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-11 Thread Panu Matilainen
There used to be a comment in Fedora rpm.spec that apparently got lost in the 
cmake transition, but applies equally to cmake:

```
# Using configure macro has some unwanted side-effects on rpm platform
# setup, use the old-fashioned way for now only defining minimal paths.
./configure \
[...]
```

I'll that back there, but the moral of the story is, don't. Use Fedora %cmake 
that is. The configured values affect not just where rpm itself is installed 
but the configuration as to how other packages will be built, and it creates 
this mirror-in-mirror continuum that's just impossible to work with.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1713602933
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-08 Thread Tomasz Kłoczko
In python/CMakeLists.txt is:
```cmake
install(TARGETS _rpm
DESTINATION ${Python3_SITEARCH}/rpm)
install(FILES rpm/transaction.py rpm/__init__.py
DESTINATION ${Python3_SITEARCH}/rpm)

set(egginfo 
${PROJECT_NAME}-${PROJECT_VERSION}-py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.egg-info)
configure_file(rpm.egg-info.in ${egginfo} @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${egginfo}
DESTINATION ${Python3_SITEARCH})
```
Looksl like this cmake variable is defined  in rpm tree樂 
```console
[tkloczko@pers-jacek rpm-4.18.99]$ grep -r Python3_SITEARCH
python/CMakeLists.txt:  DESTINATION ${Python3_SITEARCH}/rpm)
python/CMakeLists.txt:  DESTINATION ${Python3_SITEARCH}/rpm)
python/CMakeLists.txt:  DESTINATION ${Python3_SITEARCH})
```
```console
[tkloczko@pers-jacek rpm-4.18.99]$ grep -r Python3_SITEARCH /usr
grep: /usr/libexec/utempter: Permission denied
grep: /usr/share/polkit-1/rules.d: Permission denied
/usr/share/cmake/Modules/FindPython3.cmake:``Python3_SITEARCH``
grep: /usr/sbin/unix_update: Permission denied
```
In that files is:
```cmake 
``Python3_SITEARCH``
  Third-party platform dependent installation directory.

  Information returned by ``sysconfig.get_path('platlib')``.
```
However ..
```console
[tkloczko@pers-jacek rpm-4.18.99]$ python3 -m sysconfig | grep platlib
platlib = "/usr/lib64/python3.8/site-packages"
```
comments? 樂 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1711404469
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-08 Thread Tomasz Kłoczko
Looks like python module wrong directory may be related to the fact that I'm 
using %cmake macro which in my case looks like below
```spec
%cmake %{set_build_flags} \
%__cmake \\\
-B %{_vpath_builddir} \\\
-D BUILD_SHARED_LIBS=ON \\\
-D CMAKE_AR="$AR" \\\
-D CMAKE_BUILD_TYPE=RelWithDebInfo \\\
-D CMAKE_C_FLAGS_RELEASE="-DNDEBUG" \\\
-D CMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \\\
-D CMAKE_Fortran_FLAGS_RELEASE="-DNDEBUG" \\\
-D CMAKE_INSTALL_PREFIX=%{_prefix} \\\
-D CMAKE_NM="$NM" \\\
-D CMAKE_RANLIB="$RANLIB" \\\
-D CMAKE_VERBOSE_MAKEFILE=ON \\\
-D INCLUDE_INSTALL_DIR=%{_includedir} \\\
-D LIB_INSTALL_DIR=%{_libdir} \\\
%if "%{?_lib}" == "lib64" \
-D LIB_SUFFIX=64 \\\
%endif \
-D SHARE_INSTALL_PREFIX=%{_datadir} \\\
-D SYSCONF_INSTALL_DIR=%{_sysconfdir} \\\
-S %{_vpath_srcdir}
```



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1711391974
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-08 Thread Tomasz Kłoczko
After install 4.18.99 and rebuild looks globs are working (so indeed globs re 
related to %arch).
However looks like python module installation hack still is needed .. so still 
something is wrong 樂
```console
RPM build errors:
File not found: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.x86_64/usr/lib64/python3.8/site-packages/rpm
File not found: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.x86_64/usr/lib64/python3.8/site-packages/rpm-*.*-info
```
```console
[tkloczko@pers-jacek SPECS]$ ls 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.x86_64/usr/lib/python3.8/site-packages/rpm*
 -l
-rw-r--r-- 1 tkloczko tkloczko 262 Sep  8 09:23 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.x86_64/usr/lib/python3.8/site-packages/rpm-4.18.99-py3.8.egg-info

/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.x86_64/usr/lib/python3.8/site-packages/rpm:
total 168
-rw-r--r-- 1 tkloczko tkloczko   3070 Sep  4 10:19 __init__.py
-rwxr-xr-x 1 tkloczko tkloczko 157512 Sep  8 09:23 _rpm.so
-rw-r--r-- 1 tkloczko tkloczko   6226 Sep  4 10:19 transaction.py
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1711360674
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-08 Thread Tomasz Kłoczko
On building 4.18.99 using rpm 4.17.0 I found that it is yet another issue which 
is somehow related to %_arch.

On building python module lands in /usr/lib/python* instead in 
/usr/lib64/python*
Initially I've added hack in %install
```spec
%__mv %{buildroot}{%{_prefix}/lib/python*,%{_libdir}}
```



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1711293523
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-09-08 Thread Tomasz Kłoczko
>From https://github.com/rpm-software-management/rpm/issues/2649
I just realised that %_arch macro is not defined as well and I see in %install
```console
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.TkXan3
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ '[' '/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}' '!=' / ']'
+ rm -rf '/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}'
++ dirname '/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}'
+ /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILDROOT
+ /usr/bin/mkdir '/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}'
+ ASMFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections'
+ CFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections'
+ CXXFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections'
+ FFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections 
-I/usr/lib/gfortran/modules'
+ FCFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections 
-I/usr/lib/gfortran/modules'
+ LDFLAGS='-Wl,--gc-sections -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1'
+ RUSTFLAGS='-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C 
link-arg=-fdata-sections -C link-arg=-ffunction-sections -C 
link-arg=-Wl,--as-needed -C link-arg=-Wl,-z,now -C link-arg=-Wl,-z,relro 
--cap-lints=warn'
+ VALAFLAGS=-g
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR 
NM RANLIB RUSTFLAGS VALAFLAGS
+ cd rpm-4.18.99
+ DESTDIR='/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}'
+ /usr/bin/cmake --install x86_64-redhat-linux
-- Install configuration: "RelWithDebInfo"
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/share/man/man1/gendiff.1

[..]

-- Set runtime path of 
"/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/rpmuncompress"
 to ""
grep: rpmrc: No such file or directory
sed: can't read rpmrc: No such file or directory
cat: platform: No such file or directory
cat: macros: No such file or directory
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/macros
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/rpmrc
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/rpmpopt-4.18.99
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib64/pkgconfig/rpm.pc
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/lua
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib/rpm/macros.d
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib64/cmake/rpm/rpm-config.cmake
-- Installing: 
/home/tkloczko/rpmbuild/BUILDROOT/rpm-4.18.99-2.fc35.%{_arch}/usr/lib64/cmake/rpm/rpm-config-version.cmake
-- Installing: