Skip to content

Fix deb package version field #3157

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Mycron
Copy link

@Mycron Mycron commented Jan 9, 2020

issue: #3143
The suggestion to resolve #3143

@boegel boegel added the change label Jan 14, 2020
@boegel boegel added this to the release after 4.1.1 (4.1.2?) milestone Jan 14, 2020
@easybuilders easybuilders deleted a comment from boegelbot Jan 15, 2020
Revert to use eb version as a package version but in a form of`EASYBUILD_VERSION~eb`
@@ -50,4 +49,4 @@ def version(self, ec):
# cfr. http://rpm.org/ticket/56,
# https://debian-handbook.info/browse/stable/sect.manipulating-packages-with-dpkg.html (see box in 5.4.3)
ebver.replace('dev', '~dev')
Copy link
Member

@ocaisa ocaisa Jan 15, 2020

Choose a reason for hiding this comment

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

I'm no expert here but shouldn't we somehow concat this with the change below so the function returns either 4.x.x~eb or 4.x.x~ebdev...or is it ok to have 2 ~?

Copy link
Author

Choose a reason for hiding this comment

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

Good information to clarify and analyze it may be here: https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
As I understand, having two tildas is allowed. And in the case of having 4.x.x~eb and 4.x.x~dev~eb, the first one seems to be the latest

Copy link
Author

Choose a reason for hiding this comment

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

To be honest, I didn't check such form for the case of rpm packages

Copy link
Member

Choose a reason for hiding this comment

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

For me then this seems ok, but maybe @boegel should give the final ok

@ocaisa
Copy link
Member

ocaisa commented Jan 15, 2020

@Mycron You will need to update the tests in test/framework/package.py to reflect the updated naming

@boegelbot
Copy link

Travis test report: 8/8 runs failed - see https://travis-ci.org/easybuilders/easybuild-framework/builds/637435167

Only showing partial log for 1st failed test suite run 3788.1;
full log at https://travis-ci.org/easybuilders/easybuild-framework/jobs/637435168

...
.Skipping test_fetch_easyconfigs_from_pr, no GitHub token available?
.Skipping test_fetch_latest_commit_sha, no GitHub token available?
.Skipping test_fetch_pr_data, no GitHub token available?
.Skipping test_find_easybuild_easyconfig, no GitHub token available?
..Skipping test_install_github_token, no GitHub token available?
.Skipping test_list_prs, no GitHub token available?
..Skipping test_read, no GitHub token available?
.Skipping test_read_api, no GitHub token available?
.Skipping test_reasons_for_closing, no GitHub token available?
.Skipping test_restclient, no GitHub token available?
.Skipping test_validate_github_token, no GitHub token available?
.Skipping test_walk, no GitHub token available?
.........................................................FF.......................................................................................................................F..E..........................................
WARNING: Robot search path is empty!

.
WARNING: Robot search path is empty!

.
WARNING: Robot search path is empty!

.
======================================================================
ERROR: test_package (test.framework.package.PackageTest)
Test package function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/package.py", line 228, in test_package
    pkgtxt = read_file(pkgfile)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/easybuild/tools/filetools.py", line 191, in read_file
    raise EasyBuildError("Failed to read %s: %s", path, err)
EasyBuildError: "Failed to read /tmp/eb-QaM9DG/eb-nO03Hh/eb-o1_tgh/eb-OjF3AO/eb-5G10RS/eb-pkgs-9PZqO1/toy-0.0-gompi-2018a-test-eb-4.1.1.dev0.1.rpm: [Errno 2] No such file or directory: '/tmp/eb-QaM9DG/eb-nO03Hh/eb-o1_tgh/eb-OjF3AO/eb-5G10RS/eb-pkgs-9PZqO1/toy-0.0-gompi-2018a-test-eb-4.1.1.dev0.1.rpm'"

======================================================================
FAIL: test_package (test.framework.toy_build.ToyBuildTest)
Test use of --package and accompanying package configuration settings.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/toy_build.py", line 1650, in test_package
    self.assertTrue(os.path.exists(toypkg), "%s is there" % toypkg)
AssertionError: False is not true : /tmp/eb-QaM9DG/eb-nO03Hh/eb-Xb8aYa/pkgs/toy-0.0-eb-4.1.1.dev0.321.foo is there

======================================================================
FAIL: test_package_skip (test.framework.toy_build.ToyBuildTest)
Test use of --package with --skip.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/toy_build.py", line 1665, in test_package_skip
    self.assertTrue(os.path.exists(toypkg), "%s is there" % toypkg)
AssertionError: False is not true : /tmp/eb-QaM9DG/eb-nO03Hh/eb-jUyHlc/packages/toy-0.0-eb-4.1.1.dev0.1.rpm is there

======================================================================
FAIL: test_active_pns (test.framework.package.PackageTest)
Test use of ActivePNS.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/package.py", line 193, in test_active_pns
    self.assertEqual(pns.version(ec), 'eb-%s' % EASYBUILD_VERSION)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/easybuild/base/testing.py", line 115, in assertEqual
    raise AssertionError("%s:\nDIFF%s:\n%s" % (msg, limit, ''.join(diff[:self.ASSERT_MAX_DIFF])))
AssertionError: '4.1.1.dev0~eb' != 'eb-4.1.1.dev0':
DIFF:
- 4.1.1.dev0~eb?           ---
+ eb-4.1.1.dev0

----------------------------------------------------------------------
Ran 680 tests in 634.464s

FAILED (failures=3, errors=1)
ERROR: Not all tests were successful.
Log available at /tmp/eb-QaM9DG/eb-nO03Hh/easybuild-tests-bir1Os.log
travis_time:end:02602088:start=1579095668929161507,finish=1579096303969465793,duration=635040304286,event=script
�[0K�[32;1mThe command "python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log" exited with 0.�[0m
travis_time:start:06cd1dbd
�[0K$ IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|lib/python2.6/site-packages|requires Lmod as modules tool"
travis_time:end:06cd1dbd:start=1579096303973276494,finish=1579096303975650760,duration=2374266,event=script
�[0K�[32;1mThe command "IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|lib/python2.6/site-packages|requires Lmod as modules tool"" exited with 0.�[0m
travis_time:start:0645ddf8
�[0K$ PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
travis_time:end:0645ddf8:start=1579096303978867935,finish=1579096303984465943,duration=5598008,event=script
�[0K�[32;1mThe command "PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)" exited with 0.�[0m
travis_time:start:11a2b88a
�[0K$ test "x$PRINTED_MSG" = "x" || (echo "Found printed messages in output of test suite\n${PRINTED_MSG}" && exit 1)
Found printed messages in output of test suite\n.........................................................FF.......................................................................................................................F..E..........................................
ERROR: test_package (test.framework.package.PackageTest)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/package.py", line 228, in test_package
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/easybuild/tools/filetools.py", line 191, in read_file
EasyBuildError: "Failed to read /tmp/eb-QaM9DG/eb-nO03Hh/eb-o1_tgh/eb-OjF3AO/eb-5G10RS/eb-pkgs-9PZqO1/toy-0.0-gompi-2018a-test-eb-4.1.1.dev0.1.rpm: [Errno 2] No such file or directory: '/tmp/eb-QaM9DG/eb-nO03Hh/eb-o1_tgh/eb-OjF3AO/eb-5G10RS/eb-pkgs-9PZqO1/toy-0.0-gompi-2018a-test-eb-4.1.1.dev0.1.rpm'"
FAIL: test_package (test.framework.toy_build.ToyBuildTest)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/toy_build.py", line 1650, in test_package
    self.assertTrue(os.path.exists(toypkg), "%s is there" % toypkg)
AssertionError: False is not true : /tmp/eb-QaM9DG/eb-nO03Hh/eb-Xb8aYa/pkgs/toy-0.0-eb-4.1.1.dev0.321.foo is there
FAIL: test_package_skip (test.framework.toy_build.ToyBuildTest)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/toy_build.py", line 1665, in test_package_skip
    self.assertTrue(os.path.exists(toypkg), "%s is there" % toypkg)
AssertionError: False is not true : /tmp/eb-QaM9DG/eb-nO03Hh/eb-jUyHlc/packages/toy-0.0-eb-4.1.1.dev0.1.rpm is there
FAIL: test_active_pns (test.framework.package.PackageTest)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/test/framework/package.py", line 193, in test_active_pns
    self.assertEqual(pns.version(ec), 'eb-%s' % EASYBUILD_VERSION)
  File "/tmp/637435168/lib/python2.7/site-packages/easybuild_framework-4.1.1.dev0-py2.7.egg/easybuild/base/testing.py", line 115, in assertEqual
    raise AssertionError("%s:\nDIFF%s:\n%s" % (msg, limit, ''.join(diff[:self.ASSERT_MAX_DIFF])))
AssertionError: '4.1.1.dev0~eb' != 'eb-4.1.1.dev0':
- 4.1.1.dev0~eb?           ---
+ eb-4.1.1.dev0
Log available at /tmp/eb-QaM9DG/eb-nO03Hh/easybuild-tests-bir1Os.log

*bleep, bloop, I'm just a bot (boegelbot v20180813.01)*Please talk to my owner @boegel if you notice you me acting stupid),or submit a pull request to https://github.com/boegel/boegelbot fix the problem.

@@ -50,4 +49,4 @@ def version(self, ec):
# cfr. http://rpm.org/ticket/56,
# https://debian-handbook.info/browse/stable/sect.manipulating-packages-with-dpkg.html (see box in 5.4.3)
ebver.replace('dev', '~dev')
return 'eb-%s' % ebver
return '%s~eb' % ebver
Copy link
Contributor

Choose a reason for hiding this comment

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

What you should do is add a timestamp after the ~eb, as in ~eb-yyyymmdd to make it possible to update the eb built package automatically. Using the date_stamp = datetime.today().strftime('%Y%m%d') code from the first commit.

@boegel boegel modified the milestones: 4.x, next release (4.5.1?) Nov 7, 2021
@boegel boegel modified the milestones: 4.5.1, release after 4.5.1 Dec 7, 2021
@boegel boegel modified the milestones: next release (4.5.2?), 4.x Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEB package version doesn't follow dpkg policy
5 participants