Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

RPM build fails because no tag tag is present in the repository #3

Open
lpetre-ulb opened this issue Mar 2, 2020 · 5 comments
Open

Comments

@lpetre-ulb
Copy link

Title says it all. Since no tag is present to the repository, tag2rel.sh fails:

[lpetre@gem904daq04 reedmuller-c]$ ./config/tag2rel.sh
[lpetre@gem904daq04 reedmuller-c]$

As a consequence, the Version: tag in the SPEC file is not replaced properly which make the RPM build fails:

[lpetre@gem904daq04 reedmuller-c]$ scl enable devtoolset-8 -- make rpm
[...]
rpmbuild --quiet -bs -bl \
    --buildroot=/afs/cern.ch/user/l/lpetre/GEM/develop/reedmuller-c/x86_64/rpm/RPMBUILD/BUILDROOT \
    --define "_requires 0" \
    --define "_release .caffde7git" \
    --define "_build_requires 0" \
    --define  "_topdir /afs/cern.ch/user/l/lpetre/GEM/develop/reedmuller-c/x86_64/rpm/RPMBUILD" \
    /afs/cern.ch/user/l/lpetre/GEM/develop/reedmuller-c/x86_64/rpm/reedmuller.spec \
     --target "x86_64";
Building target platforms: x86_64
Building for target x86_64
error: line 41: Illegal sequence ".." in: Version: ..
make[1]: *** [/afs/cern.ch/user/l/lpetre/GEM/develop/reedmuller-c/x86_64/rpm/reedmuller.src.rpm] Error 1
make[1]: Leaving directory `/afs/cern.ch/user/l/lpetre/GEM/develop/reedmuller-c'
make: *** [x86_64.rpm] Error 2

Possible solution: At least one tag should be pushed to the Git repository.

@jsturdy
Copy link

jsturdy commented Mar 3, 2020

@lpetre-ulb, can't reproduce, are you sure the gembuild submodule is up-to-date (should be at 30f5327)?

[sturdy@gemdaq-build-xdaq15 /tmp/sturdy]% git clone --recurse-submodules [email protected]:cms-gem-daq-project/reedmuller-c.git
Cloning into 'reedmuller-c'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 152 (delta 4), reused 8 (delta 2), pack-reused 140
Receiving objects: 100% (152/152), 220.13 KiB | 870.00 KiB/s, done.
Resolving deltas: 100% (78/78), done.
Submodule 'config' ([email protected]:cms-gem-daq-project/gembuild.git) registered for path 'config'
Cloning into '/tmp/sturdy/reedmuller-c/config'...
remote: Enumerating objects: 141, done.
remote: Counting objects: 100% (141/141), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 406 (delta 88), reused 87 (delta 41), pack-reused 265
Receiving objects: 100% (406/406), 135.64 KiB | 780.00 KiB/s, done.
Resolving deltas: 100% (256/256), done.
Submodule path 'config': checked out '30f5327e456c26b23a1f6ec224889c5c46610226'
[sturdy@gemdaq-build-xdaq15 /tmp/sturdy]% export PATH=/opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin:$PATH
[sturdy@gemdaq-build-xdaq15 /tmp/sturdy]% cd reedmuller-c
[sturdy@gemdaq-build-xdaq15 sturdy/reedmuller-c]% make && make rpm
[snip]
[sturdy@gemdaq-build-xdaq15 sturdy/reedmuller-c]% echo $?
0

@lpetre-ulb
Copy link
Author

lpetre-ulb commented Mar 3, 2020

Yes, I'm using this commit (30f5327) for gembuild, but it still does not work on gem904daq04 (without any environment variable):

[lpetre@gem904daq04 reedmuller-c]$ git rev-parse --short HEAD
caffde7
[lpetre@gem904daq04 reedmuller-c]$ cd config/ && git rev-parse --short HEAD && cd ..
30f5327
[lpetre@gem904daq04 reedmuller-c]$ git tag -l
[lpetre@gem904daq04 reedmuller-c]$ make rpm
[...]
rpmbuild --quiet -bs -bl \
    --buildroot=/afs/cern.ch/user/l/lpetre/GEM/develop/test/reedmuller-c/arm/rpm/RPMBUILD/BUILDROOT \
    --define "_requires 0" \
    --define "_release .caffde7git" \
    --define "_build_requires 0" \
    --define  "_topdir /afs/cern.ch/user/l/lpetre/GEM/develop/test/reedmuller-c/arm/rpm/RPMBUILD" \
    /afs/cern.ch/user/l/lpetre/GEM/develop/test/reedmuller-c/arm/rpm/reedmuller.spec \
     --target "armv7l";
Building target platforms: armv7l
Building for target armv7l
error: line 41: Illegal sequence ".." in: Version: ..
make[1]: *** [/afs/cern.ch/user/l/lpetre/GEM/develop/test/reedmuller-c/arm/rpm/reedmuller.src.rpm] Error 1
make[1]: Leaving directory `/afs/cern.ch/user/l/lpetre/GEM/develop/test/reedmuller-c'
make: *** [arm.rpm] Error 2
[lpetre@gem904daq04 reedmuller-c]$ echo $?
2

Actually, it works on gemdaq-build-xdaq15 which a more recent version of Git enabled by default.

[lpetre@gem904daq04 reedmuller-c]$ git --version
git version 1.8.3.1
[lpetre@gem904daq04 reedmuller-c]$ ./config/tag2rel.sh
[lpetre@gem904daq04 reedmuller-c]$

[lpetre@gemdaq-build-xdaq15 reedmuller-c]$ git --version
git version 2.18.2
[lpetre@gemdaq-build-xdaq15 reedmuller-c]$ ./config/tag2rel.sh
Major:0 Minor:0 Patch:0 Release:0.0.27 Version:untagged FullVersion:untagged-gitcaffde7 TagVersion:untagged BuildTag:untagged.dev27 Revision:caffde7 GitVersion:caffde NextMajorVer:1.0.0 NextMinorVer:0.1.0 NextPatchVer:0.0.1

If a minimal version a Git is required, it should be documented somewhere (but where?).

@jsturdy
Copy link

jsturdy commented Mar 4, 2020

If a minimal version a Git is required, it should be documented somewhere (but where?).

This is probably it, I have all GEM machines installed with rh-git218, and enable it in my startup scripts (because why would I use an old version of git when I can use a new version of git!), but hadn't forced the machines (other than my VMs and gem904daq02) to default to it (I guess I can do that)

I'll document it in the gembuild readme, and in the new developers documentation

@jsturdy
Copy link

jsturdy commented Mar 5, 2020

Should be fixed by updating to cms-gem-daq-project/gembuild#7 (when merged)

@lpetre-ulb
Copy link
Author

lpetre-ulb commented Mar 5, 2020

This is probably it, I have all GEM machines installed with rh-git218, and enable it in my startup scripts (because why would I use an old version of git when I can use a new version of git!), but hadn't forced the machines (other than my VMs and gem904daq02) to default to it (I guess I can do that)

Right, but it means that each developer (or sysadmin) will have to use a SCL additional version. It might be better on many points, but it is not practical to use a non base package version if is exists. Anyway, this is probably too late to be changed everywhere since you will be moving towards CC8.

Should be fixed by updating to cms-gem-daq-project/gembuild#7 (when merged)

Fixes the issue. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants