Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build http rpm package using packpack #165

Closed
artembo opened this issue Jul 7, 2022 · 6 comments
Closed

Can't build http rpm package using packpack #165

artembo opened this issue Jul 7, 2022 · 6 comments

Comments

@artembo
Copy link
Contributor

artembo commented Jul 7, 2022

Sorry for the silly questions, It's the first package I build using packpack.

When I build rpm package using packpack I get an error:

+ make -j8
make[1]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
error: Bad exit status from /var/tmp/rpm-tmp.ezuRPM (%build)

Then I try to modify tarantool-http.spec:

%build
%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo

to

%build
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo

Okay, I guess it's not a proper way to use cmake in spec, but it starts to build.

The second issue after modifying the spec is that packpack can't find rpm:

rpmbuild \
        --define '_topdir /build' \
        --define '_sourcedir /build' \
        --define '_specdir /build' \
        --define '_srcrpmdir /build' \
        --define '_ci %{nil}' \
        --define '_builddir /build/usr/src/debug' \
        --define '_smp_mflags -j8' \
        --rebuild /build/tarantool-http-0.0.1-1.fc36.src.rpm 2>&1 | tee /build/build.log
Installing /build/tarantool-http-0.0.1-1.fc36.src.rpm
setting SOURCE_DATE_EPOCH=1657152000
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.5OkYpU
+ umask 022
+ cd /build/usr/src/debug
+ cd /build/usr/src/debug
+ rm -rf tarantool-http-0.0.1
+ /usr/bin/xz -dc /build/tarantool-http-0.0.1.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd tarantool-http-0.0.1
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.oasHW9
+ umask 022
+ cd /build/usr/src/debug
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/build/usr/src/debug/tarantool-http-0.0.1/.package_note-tarantool-http-0.0.1-1.fc36.x86_64.ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ '[' -f /usr/lib/rpm/generate-rpm-note.sh ']'
+ /usr/lib/rpm/generate-rpm-note.sh tarantool-http 0.0.1-1.fc36 x86_64
+ cd tarantool-http-0.0.1
+ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find LuaTest (missing: LUATEST) 
-- Could NOT find LuaCheck (missing: LUACHECK) 
-- Could NOT find LuaCov (missing: LUACOV) 
-- Could NOT find LuaCovCoveralls (missing: LUACOVCOVERALLS) 
-- Found Tarantool: /usr/include (found version "2.4.2-68-g17621b0") 
-- Tarantool LUADIR is share/tarantool
-- Tarantool LIBDIR is lib64/tarantool
-- Configuring done
-- Generating done
-- Build files have been written to: /build/usr/src/debug/tarantool-http-0.0.1
+ make -j8
make[1]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[2]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[3]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[3]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[3]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
[ 50%] Building C object http/CMakeFiles/httpd.dir/lib.c.o
In file included from /build/usr/src/debug/tarantool-http-0.0.1/http/lib.c:40:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h: In function ‘httpfast_parse.constprop.0.isra.0’:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘tl’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:232:12: note: ‘tl’ was declared here
  232 |     size_t tl;          /* length of token */
      |            ^~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘tb’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:227:14: note: ‘tb’ was declared here
  227 |             *tb,        /* begin of token */
      |              ^~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘h_is_c’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:235:9: note: ‘h_is_c’ was declared here
  235 |     int h_is_c;         /* header is continuation */
      |         ^~~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘code’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:240:14: note: ‘code’ was declared here
  240 |     unsigned code;
      |              ^~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘major’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:239:10: note: ‘major’ was declared here
  239 |     char major, minor;
      |          ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘minor’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:239:17: note: ‘minor’ was declared here
  239 |     char major, minor;
      |                 ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘ptb’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:229:14: note: ‘ptb’ was declared here
  229 |             *ptb,       /* begin of prev token */
      |              ^~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘ptl’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:233:12: note: ‘ptl’ was declared here
  233 |     size_t ptl;         /* length of prev token */
      |            ^~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘pptl’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:234:12: note: ‘pptl’ was declared here
  234 |     size_t pptl;        /* length of prev prev token */
      |            ^~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:158:21: warning: ‘pptb’ may be used uninitialized [-Wmaybe-uninitialized]
  158 |                 if (event->name(uobj, arg) != 0) {                  \
      |                     ^~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:230:14: note: ‘pptb’ was declared here
  230 |             *pptb       /* begin of prev prev token */
      |              ^~~~
In function ‘httpfast_parse_params’,
    inlined from ‘lbox_httpd_params’ at /build/usr/src/debug/tarantool-http-0.0.1/http/lib.c:553:2,
    inlined from ‘lbox_httpd_params’ at /build/usr/src/debug/tarantool-http-0.0.1/http/lib.c:544:1:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:61:33: warning: ‘nl’ may be used uninitialized [-Wmaybe-uninitialized]
   61 |                                 on_param(uobj, nb, nl, vb, vl);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h: In function ‘lbox_httpd_params’:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:18:16: note: ‘nl’ was declared here
   18 |         size_t nl, vl;
      |                ^~
In function ‘httpfast_parse_params’,
    inlined from ‘lbox_httpd_params’ at /build/usr/src/debug/tarantool-http-0.0.1/http/lib.c:553:2,
    inlined from ‘lbox_httpd_params’ at /build/usr/src/debug/tarantool-http-0.0.1/http/lib.c:544:1:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:61:33: warning: ‘vb’ may be used uninitialized [-Wmaybe-uninitialized]
   61 |                                 on_param(uobj, nb, nl, vb, vl);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h: In function ‘lbox_httpd_params’:
/build/usr/src/debug/tarantool-http-0.0.1/http/httpfast.h:17:26: note: ‘vb’ was declared here
   17 |         const char *nb, *vb;
      |                          ^~
[100%] Linking C shared library lib.so
make[3]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
[100%] Built target httpd
make[2]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[1]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.HIOGre
+ umask 022
+ cd /build/usr/src/debug
+ '[' /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64 '!=' / ']'
+ rm -rf /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64
++ dirname /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64
+ mkdir -p /build/BUILDROOT
+ mkdir /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/build/usr/src/debug/tarantool-http-0.0.1/.package_note-tarantool-http-0.0.1-1.fc36.x86_64.ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ cd tarantool-http-0.0.1
+ /usr/bin/make install DESTDIR=/build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64 'INSTALL=/usr/bin/install -p'
make[1]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[2]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
make[3]: Entering directory '/build/usr/src/debug/tarantool-http-0.0.1'
Consolidate compiler generated dependencies of target httpd
make[3]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
[100%] Built target httpd
make[2]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/local/lib64/tarantool/http/lib.so
-- Installing: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/local/share/tarantool/http/server.lua
-- Installing: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/local/share/tarantool/http/mime_types.lua
-- Installing: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/local/share/tarantool/http/codes.lua
make[1]: Leaving directory '/build/usr/src/debug/tarantool-http-0.0.1'
+ /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 0.0.1-1.fc36 --unique-debug-suffix -0.0.1-1.fc36.x86_64 --unique-debug-src-base tarantool-http-0.0.1-1.fc36.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /build/usr/src/debug/tarantool-http-0.0.1
extracting debug info from /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/local/lib64/tarantool/http/lib.so
original debug info size: 56kB, size after compression: 56kB
/usr/bin/sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match.
62 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
*** WARNING: ./usr/local/share/tarantool/http/codes.lua is executable but has no shebang, removing executable bit
*** WARNING: ./usr/local/share/tarantool/http/mime_types.lua is executable but has no shebang, removing executable bit
*** WARNING: ./usr/local/share/tarantool/http/server.lua is executable but has no shebang, removing executable bit
*** WARNING: ./usr/src/debug/tarantool-http-0.0.1-1.fc36.x86_64/http/httpfast.h is executable but has no shebang, removing executable bit
*** WARNING: ./usr/src/debug/tarantool-http-0.0.1-1.fc36.x86_64/http/lib.c is executable but has no shebang, removing executable bit
*** WARNING: ./usr/src/debug/tarantool-http-0.0.1-1.fc36.x86_64/http/tpleval.h is executable but has no shebang, removing executable bit
+ /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0
+ /usr/lib/rpm/redhat/brp-python-hardlink
Processing files: tarantool-http-0.0.1-1.fc36.x86_64
error: Directory not found: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/lib64/tarantool/*
error: Directory not found: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/tarantool/*
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.Farmp5
+ umask 022
+ cd /build/usr/src/debug
+ cd tarantool-http-0.0.1
+ DOCDIR=/build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/doc/tarantool-http
+ export LC_ALL=C
+ LC_ALL=C
+ export DOCDIR
+ /usr/bin/mkdir -p /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/doc/tarantool-http
+ cp -pr README.md /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/doc/tarantool-http
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.ivyIN3
+ umask 022
+ cd /build/usr/src/debug
+ cd tarantool-http-0.0.1
+ LICENSEDIR=/build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/licenses/tarantool-http
+ export LC_ALL=C
+ LC_ALL=C
+ export LICENSEDIR
+ /usr/bin/mkdir -p /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/licenses/tarantool-http
+ cp -pr LICENSE /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/licenses/tarantool-http
+ cp -pr AUTHORS /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/licenses/tarantool-http
+ RPM_EC=0
++ jobs -p
+ exit 0


RPM build errors:
    Directory not found: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/lib64/tarantool/*
    Directory not found: /build/BUILDROOT/tarantool-http-0.0.1-1.fc36.x86_64/usr/share/tarantool/*
mv -f /build/RPMS/*/*.rpm /build
mv: cannot stat '/build/RPMS/*/*.rpm': No such file or directory
make: *** [/pack//rpm.mk:168: package] Error 1

The third issue is the version of the package. It's 0.0.1 even though I build it using a tag commit.

Please help!

@artembo artembo added the teamE label Jul 7, 2022
@Totktonada
Copy link
Member

%files
%{_libdir}/tarantool/*/
%{_datarootdir}/tarantool/*/
%doc README.md
%{!?_licensedir:%global license %doc}
%license LICENSE AUTHORS

Globbing here looks unusual. I would try

%files
%{_libdir}/tarantool
%{_datarootdir}/tarantool
<...>

@artembo
Copy link
Contributor Author

artembo commented Jul 7, 2022

%{_libdir}/tarantool
%{_datarootdir}/tarantool

Unfortunately, the same issue with this configuration

@Totktonada
Copy link
Member

Disregard, I realized that my suggestion is wrong. I should be like

%files
%{_libdir}/tarantool/blabla
%{_datarootdir}/tarantool/foo.lua
%{_datarootdir}/tarantool/foo
<...>

But maybe globbing is okay too. The problem is something else.

@LeonidVas
Copy link

LeonidVas commented Jul 8, 2022

How about using %cmake_install instead of %make_install on fedora > 32 ? (like in tarantool/queue@769bc72 )

Starting with fedora 33, the cmake build strategy has been changed to "out-of-source builds" by default.

@artembo
Copy link
Contributor Author

artembo commented Jul 8, 2022

How about using %cmake_install instead of %make_install on fedora > 32

I tried this config on different versions of OSes, it does not help, probably the root issue is somewhere else.

@Totktonada
Copy link
Member

I applied the changed suggested by https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds (taking compatibility with older systems into account):

diff --git a/rpm/tarantool-http.spec b/rpm/tarantool-http.spec
index ee00cb5..d4d99ef 100644
--- a/rpm/tarantool-http.spec
+++ b/rpm/tarantool-http.spec
@@ -20,14 +20,19 @@ This package provides a HTTP server for Tarantool.
 %setup -q -n %{name}-%{version}
 
 %build
-%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo
-make %{?_smp_mflags}
-
-%check
-make %{?_smp_mflags} luatest
+%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo
+%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8
+  %cmake_build
+%else
+  %make_build
+%endif
 
 %install
-%make_install
+%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8
+  %cmake_install
+%else
+  %make_install
+%endif
 
 %files
 %{_libdir}/tarantool/*/

(I removed the luacheck call, because we have no packages for it.)

The packages are successfully built for CentOS 7 and Fedora 36.

Regarding versions: if you performed the steps from CI, you need extra care to deep clone and tags deannotation. See my comment here: https://github.com/tarantool/http/pull/164/files#r917260118.

artembo added a commit that referenced this issue Jul 12, 2022
Starting with fedora 33, the cmake build strategy has been changed
to "out-of-source builds" by default (see [1]). Let's add support
for the new behavior.

[1] https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Closes #165
artembo added a commit that referenced this issue Jul 12, 2022
Starting with fedora 33, the cmake build strategy has been changed
to "out-of-source builds" by default (see [1]). Let's add support
for the new behavior.

Added `prebuild.sh` script with installation of Tarantool repo.

[1] https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Closes #165
artembo added a commit that referenced this issue Jul 19, 2022
Starting with fedora 33, the cmake build strategy has been changed
to "out-of-source builds" by default (see [1]). Let's add support
for the new behavior.

Added `prebuild.sh` script with installation of Tarantool repo.

`Packpack` performs building rpm packages in a clean docker container.
The container must contain `luatest` to perform testing during the
build as it was set by `-DCMAKE_BUILD_TYPE=RelWithDebInfo` cmake var.
This cmake var was removed in this commit as well as `%check` phase.

It's quite challenging to set up `luacheck` while the package is
building and a bit useless because the module is tested in another job.

[1] https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Closes #165
@0x501D 0x501D closed this as completed in 09ac0e6 Jul 26, 2022
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

No branches or pull requests

3 participants