#26 Where do I find the 'right' release
Closed 2 years ago by clime. Opened 4 years ago by erinn.

Recently rpkg tag doesn't seem to work and I am unsure why. When I make changes in git, then commit them, I then run rpkg tag and it simply tells me that the existing tags already exist even when changes have gone in:

git log -1
commit 192c041c1fd824395d47c66de6855ae95efe2fff (HEAD -> master, tag: python-check_subscription_manager-1.0-1, origin/master)
Author: Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
Date:   Mon Mar 23 18:23:06 2020 -0600

    Still messing with versioning.

Do some git stuff, make a trivial change and commit it:

git log -2
commit 583cecac5ccedbb74b6f790af481c3a2d7dbd6e0 (HEAD -> master)
Author: Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
Date:   Wed Mar 25 10:54:22 2020 -0600

    Trivial change

commit 192c041c1fd824395d47c66de6855ae95efe2fff (tag: python-check_subscription_manager-1.0-1, origin/master)
Author: Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
Date:   Mon Mar 23 18:23:06 2020 -0600

    Still messing with versioning.

rpkg tag

Wrote: /tmp/rpkg/check_subscription_manager-26-ywn6k9we/check_subscription_manager.spec
Tag python-check_subscription_manager-1.0-1 already exists.

Fine maybe there is a bug there? Maybe it a user issue I don't know, but my real issue is, I am running on Fedora 32, rpkg version is: rpkg-2.7-5.fc32.noarch

Is this the latest version? Looking at your release tags in pagure I have this weirdness:

 rpkg-util-1.0-1-3
- fooo • 17 days ago

 rpkg-util-2.7-1
Commits: rpkg-util-2.6-1..HEAD • a year ago

So is 1.0 newer than 2.7? Was that branch work?

If I go with the copr repo I get something entirely different: 3.prototype.git.145.60c7000-1

Should I not be using this? If so why is it listed in the docs:
https://docs.pagure.org/rpkg-util/#installation

In general this is all very confusing for someone just trying to use this for best practices.
- Is rpkg in fedora the same as rpkg-util or is it the original rpkg? The URL points to rpkg-util but who can be sure.
- Should COPR not be used?

I appreciate the effort I really do I am just trying to sort through this,
-Erinn


Recently rpkg tag doesn't seem to work and I am unsure why. When I make changes in git, then commit them, I then run rpkg tag and it simply tells me that the existing tags already exist even when changes have gone in:
git log -1
commit 192c041c1fd824395d47c66de6855ae95efe2fff (HEAD -> master, tag: python-check_subscription_manager-1.0-1, origin/master)
Author: Erinn Looney-Triggs erinn.looneytriggs@gmail.com
Date: Mon Mar 23 18:23:06 2020 -0600

Still messing with versioning.

Do some git stuff, make a trivial change and commit it:
git log -2
commit 583cecac5ccedbb74b6f790af481c3a2d7dbd6e0 (HEAD -> master)
Author: Erinn Looney-Triggs erinn.looneytriggs@gmail.com
Date: Wed Mar 25 10:54:22 2020 -0600

Trivial change

commit 192c041c1fd824395d47c66de6855ae95efe2fff (tag: python-check_subscription_manager-1.0-1, origin/master)
Author: Erinn Looney-Triggs erinn.looneytriggs@gmail.com
Date: Mon Mar 23 18:23:06 2020 -0600

Still messing with versioning.

rpkg tag

Wrote: /tmp/rpkg/check_subscription_manager-26-ywn6k9we/check_subscription_manager.spec
Tag python-check_subscription_manager-1.0-1 already exists.

Hello Erinn!

don't you have follow in spec file specified? If you fix follow, then the version stops being auto-incremented. Can you show your version tag?

Fine maybe there is a bug there? Maybe it a user issue I don't know, but my real issue is, I am running on Fedora 32, rpkg version is: rpkg-2.7-5.fc32.noarch
Is this the latest version? Looking at your release tags in pagure I have this weirdness:
rpkg-util-1.0-1-3
- fooo • 17 days ago

rpkg-util-2.7-1
Commits: rpkg-util-2.6-1..HEAD • a year ago

So is 1.0 newer than 2.7? Was that branch work?

I was testing something and I accidentally pushed the rpkg-util-1.0-1-3 tag you are seeing. I removed it now so that it is not confusing (I am not going to push a tag with the same name anymore...). I am very sorry for the confusion there.

If I go with the copr repo I get something entirely different: 3.prototype.git.145.60c7000-1
Should I not be using this? If so why is it listed in the docs:
https://docs.pagure.org/rpkg-util/#installation
In general this is all very confusing for someone just trying to use this for best practices.
- Is rpkg in fedora the same as rpkg-util or is it the original rpkg? The URL points to rpkg-util but who can be sure.

rpkg in Fedora is rpkg-util, it is version 2.7 from branch https://pagure.io/rpkg-util/tree/v2.

  • Should COPR not be used?

You can use the version from COPR, yes, it is built from the current master branch and it should be usable. However, I will need to do one more check on rpkg switch command for switching branches if the interface still makes sense after introduction of new git switch command.

I think if you try the new version v3, you will find it quite similar to v2 (except v3 has wider user interface). The differences are in the code :). v3 should be much more solid from programming point of view.

I appreciate the effort I really do I am just trying to sort through this,

Yes, I understand and thank you for asking those questions.

-Erinn

Thanks, running out the door so I will only comment on one part, there is no follow specified, hence my confusion:

Name: python-{{{ git_dir_name }}}
Version: {{{ git_version lead=1 }}}
Release: 1%{?dist}
Source: {{{ git_dir_pack }}}
License: AGPLv3+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
Url: https://github.com/erinn/check_subscription_manager
VCS: {{{ git_dir_vcs }}

It also continues to create a version number that is... well not right, continuing from the original example:

git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

rpkg spec
Wrote: /tmp/rpkg/check_subscription_manager-27-ofvbxzhs/check_subscription_manager.spec

cat /tmp/rpkg/check_subscription_manager-27-ofvbxzhs/check_subscription_manager.spec

Cut for brevity:
Name: python-check_subscription_manager
Version: 1.0.git.7.583ceca
Release: 1%{?dist}
Source: check_subscription_manager-1.0.git.7.583ceca.tar.gz

Now my experience on previous versions of rpkg util indicates that this should by all rights just be version 1.0, but that behavior seems to have changed.

Thanks again,
-Erinn

Ah ye, I can see the problem:

instead of:

Name: python-{{{ git_dir_name }}}

try to use:

Name: {{{ git_dir_name prepend="python-" }}}

rpkg needs to know the whole name to be able to correctly match tags. This is for the case that you have multiple packages/spec files inside the same repository.

To explain, when git_dir_name is invoked, it stores the resulting name into "${OUTPUT[git_name]}" environment variable and this is then by default used by git_dir_version to match the tags.

You could also fix the behavior by:

{{{ git_dir_version name=python-check_subscription_manager }}}

By the way, are you using/trying out rpkg on an "upstream" or a "downstream" project? If downstream, {{{ git_dir_release }}} might be useful :). Or the new variant {{{ git_dir_release_branched }}}.

You can read more about those macros in man pages, they are not yet described in the online documentation.

Hello, the right release is now 3.0. Will be in f35 and is also available in https://copr.fedorainfracloud.org/coprs/clime/rpkg-util/

Metadata Update from @clime:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata