How can I remove a prefix from {latest-tag} in a Launchpad recipe?
I have a Launchpad recipe that looks like this:
# git-build-recipe format 0.4 deb-version {latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
lp:kvantum master
nest packaging lp:~krisives/kvantum/+git/kvantum-packaging debian master
However, the upstream prefixes the version numbers with a V
which causes the packaging process to complain that versions must begin with a number. The author wants to keep his V
prefixed tag names.
Other than manually modifying the changelog
in my packaging repository is there a way to have the recipe automatically use the {latest-tag}
without breaking the build process?
ppa packaging launchpad recipe
add a comment |
I have a Launchpad recipe that looks like this:
# git-build-recipe format 0.4 deb-version {latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
lp:kvantum master
nest packaging lp:~krisives/kvantum/+git/kvantum-packaging debian master
However, the upstream prefixes the version numbers with a V
which causes the packaging process to complain that versions must begin with a number. The author wants to keep his V
prefixed tag names.
Other than manually modifying the changelog
in my packaging repository is there a way to have the recipe automatically use the {latest-tag}
without breaking the build process?
ppa packaging launchpad recipe
add a comment |
I have a Launchpad recipe that looks like this:
# git-build-recipe format 0.4 deb-version {latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
lp:kvantum master
nest packaging lp:~krisives/kvantum/+git/kvantum-packaging debian master
However, the upstream prefixes the version numbers with a V
which causes the packaging process to complain that versions must begin with a number. The author wants to keep his V
prefixed tag names.
Other than manually modifying the changelog
in my packaging repository is there a way to have the recipe automatically use the {latest-tag}
without breaking the build process?
ppa packaging launchpad recipe
I have a Launchpad recipe that looks like this:
# git-build-recipe format 0.4 deb-version {latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
lp:kvantum master
nest packaging lp:~krisives/kvantum/+git/kvantum-packaging debian master
However, the upstream prefixes the version numbers with a V
which causes the packaging process to complain that versions must begin with a number. The author wants to keep his V
prefixed tag names.
Other than manually modifying the changelog
in my packaging repository is there a way to have the recipe automatically use the {latest-tag}
without breaking the build process?
ppa packaging launchpad recipe
ppa packaging launchpad recipe
asked Dec 10 at 17:14
Kristopher Ives
1,4691016
1,4691016
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
One workaround is to simply make sure that the upstream version part of your package version does start with a digit by inserting one. For example, you could use:
# git-build-recipe format 0.4 deb-version 0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
Note that this will compare lower than anything you might have already published with your current expansion, however, since for example 0V1
sorts after V1
. If you must, you could use an epoch (eg. 1:0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
to ensure it sorts higher than anything published previously, but this bump is not reversible and so should be avoided if at all possible.
For further information:
You can find an explanation of how packaging version strings work in
section 5.6.1.2 of Debian
policy.You can find the exact implementation of the variable expansions by starting with
the source of the git-build-recipe
package.See the documentation of how recipes
work,
including details on the variable
expansions.
Note though that this documentation is really for bzr-based recipes,
and the implementation for git is merely documented as "similar"
(there's a bug open on
this).You can test package version string comparisons with
dpkg --compare-versions
, for exampledpkg --compare-versions 0V1 gt V1 && echo true || echo false
. See dpkg(1) for details.
I don't see any option in the documentation to do anything with the "latest upstream tag" apart from to embed it in your final version string, nor any other way to grab the upstream version if the tag is the only place upstream declare it. Therefore I think my workaround, or something like it, is your only option at the moment, but we can see if anyone else has any other answers.
If the workaround is not acceptable to you, bug reports against git-build-recipe are welcome including for feature requests to cover new use cases such as this. I can't speak for what the answer will be as to what enhancements would be suitable in general, though. An enhancement to provide a regexp-based substitution inside an expansion might be possible, for example, but would probably need to be implemented in a way that ensures that malicious code cannot be executed on the host running git-build-recipe in the face of an untrusted recipe input. It would probably be best to find agreement in a bug first, before attempting to implement such a feature enhancement.
Thanks. Do you know if it's possible to run something indebian/rules
like sed to replace the version of thedebian/changelog
and how that might affect the final deb version of a git-build-recipe?
– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange indebian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.
– Robie Basak
Dec 13 at 21:57
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099844%2fhow-can-i-remove-a-prefix-from-latest-tag-in-a-launchpad-recipe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
One workaround is to simply make sure that the upstream version part of your package version does start with a digit by inserting one. For example, you could use:
# git-build-recipe format 0.4 deb-version 0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
Note that this will compare lower than anything you might have already published with your current expansion, however, since for example 0V1
sorts after V1
. If you must, you could use an epoch (eg. 1:0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
to ensure it sorts higher than anything published previously, but this bump is not reversible and so should be avoided if at all possible.
For further information:
You can find an explanation of how packaging version strings work in
section 5.6.1.2 of Debian
policy.You can find the exact implementation of the variable expansions by starting with
the source of the git-build-recipe
package.See the documentation of how recipes
work,
including details on the variable
expansions.
Note though that this documentation is really for bzr-based recipes,
and the implementation for git is merely documented as "similar"
(there's a bug open on
this).You can test package version string comparisons with
dpkg --compare-versions
, for exampledpkg --compare-versions 0V1 gt V1 && echo true || echo false
. See dpkg(1) for details.
I don't see any option in the documentation to do anything with the "latest upstream tag" apart from to embed it in your final version string, nor any other way to grab the upstream version if the tag is the only place upstream declare it. Therefore I think my workaround, or something like it, is your only option at the moment, but we can see if anyone else has any other answers.
If the workaround is not acceptable to you, bug reports against git-build-recipe are welcome including for feature requests to cover new use cases such as this. I can't speak for what the answer will be as to what enhancements would be suitable in general, though. An enhancement to provide a regexp-based substitution inside an expansion might be possible, for example, but would probably need to be implemented in a way that ensures that malicious code cannot be executed on the host running git-build-recipe in the face of an untrusted recipe input. It would probably be best to find agreement in a bug first, before attempting to implement such a feature enhancement.
Thanks. Do you know if it's possible to run something indebian/rules
like sed to replace the version of thedebian/changelog
and how that might affect the final deb version of a git-build-recipe?
– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange indebian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.
– Robie Basak
Dec 13 at 21:57
add a comment |
One workaround is to simply make sure that the upstream version part of your package version does start with a digit by inserting one. For example, you could use:
# git-build-recipe format 0.4 deb-version 0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
Note that this will compare lower than anything you might have already published with your current expansion, however, since for example 0V1
sorts after V1
. If you must, you could use an epoch (eg. 1:0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
to ensure it sorts higher than anything published previously, but this bump is not reversible and so should be avoided if at all possible.
For further information:
You can find an explanation of how packaging version strings work in
section 5.6.1.2 of Debian
policy.You can find the exact implementation of the variable expansions by starting with
the source of the git-build-recipe
package.See the documentation of how recipes
work,
including details on the variable
expansions.
Note though that this documentation is really for bzr-based recipes,
and the implementation for git is merely documented as "similar"
(there's a bug open on
this).You can test package version string comparisons with
dpkg --compare-versions
, for exampledpkg --compare-versions 0V1 gt V1 && echo true || echo false
. See dpkg(1) for details.
I don't see any option in the documentation to do anything with the "latest upstream tag" apart from to embed it in your final version string, nor any other way to grab the upstream version if the tag is the only place upstream declare it. Therefore I think my workaround, or something like it, is your only option at the moment, but we can see if anyone else has any other answers.
If the workaround is not acceptable to you, bug reports against git-build-recipe are welcome including for feature requests to cover new use cases such as this. I can't speak for what the answer will be as to what enhancements would be suitable in general, though. An enhancement to provide a regexp-based substitution inside an expansion might be possible, for example, but would probably need to be implemented in a way that ensures that malicious code cannot be executed on the host running git-build-recipe in the face of an untrusted recipe input. It would probably be best to find agreement in a bug first, before attempting to implement such a feature enhancement.
Thanks. Do you know if it's possible to run something indebian/rules
like sed to replace the version of thedebian/changelog
and how that might affect the final deb version of a git-build-recipe?
– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange indebian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.
– Robie Basak
Dec 13 at 21:57
add a comment |
One workaround is to simply make sure that the upstream version part of your package version does start with a digit by inserting one. For example, you could use:
# git-build-recipe format 0.4 deb-version 0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
Note that this will compare lower than anything you might have already published with your current expansion, however, since for example 0V1
sorts after V1
. If you must, you could use an epoch (eg. 1:0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
to ensure it sorts higher than anything published previously, but this bump is not reversible and so should be avoided if at all possible.
For further information:
You can find an explanation of how packaging version strings work in
section 5.6.1.2 of Debian
policy.You can find the exact implementation of the variable expansions by starting with
the source of the git-build-recipe
package.See the documentation of how recipes
work,
including details on the variable
expansions.
Note though that this documentation is really for bzr-based recipes,
and the implementation for git is merely documented as "similar"
(there's a bug open on
this).You can test package version string comparisons with
dpkg --compare-versions
, for exampledpkg --compare-versions 0V1 gt V1 && echo true || echo false
. See dpkg(1) for details.
I don't see any option in the documentation to do anything with the "latest upstream tag" apart from to embed it in your final version string, nor any other way to grab the upstream version if the tag is the only place upstream declare it. Therefore I think my workaround, or something like it, is your only option at the moment, but we can see if anyone else has any other answers.
If the workaround is not acceptable to you, bug reports against git-build-recipe are welcome including for feature requests to cover new use cases such as this. I can't speak for what the answer will be as to what enhancements would be suitable in general, though. An enhancement to provide a regexp-based substitution inside an expansion might be possible, for example, but would probably need to be implemented in a way that ensures that malicious code cannot be executed on the host running git-build-recipe in the face of an untrusted recipe input. It would probably be best to find agreement in a bug first, before attempting to implement such a feature enhancement.
One workaround is to simply make sure that the upstream version part of your package version does start with a digit by inserting one. For example, you could use:
# git-build-recipe format 0.4 deb-version 0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
Note that this will compare lower than anything you might have already published with your current expansion, however, since for example 0V1
sorts after V1
. If you must, you could use an epoch (eg. 1:0{latest-tag}-0~{time}~rev{revno}~pkg{revno:packaging}
to ensure it sorts higher than anything published previously, but this bump is not reversible and so should be avoided if at all possible.
For further information:
You can find an explanation of how packaging version strings work in
section 5.6.1.2 of Debian
policy.You can find the exact implementation of the variable expansions by starting with
the source of the git-build-recipe
package.See the documentation of how recipes
work,
including details on the variable
expansions.
Note though that this documentation is really for bzr-based recipes,
and the implementation for git is merely documented as "similar"
(there's a bug open on
this).You can test package version string comparisons with
dpkg --compare-versions
, for exampledpkg --compare-versions 0V1 gt V1 && echo true || echo false
. See dpkg(1) for details.
I don't see any option in the documentation to do anything with the "latest upstream tag" apart from to embed it in your final version string, nor any other way to grab the upstream version if the tag is the only place upstream declare it. Therefore I think my workaround, or something like it, is your only option at the moment, but we can see if anyone else has any other answers.
If the workaround is not acceptable to you, bug reports against git-build-recipe are welcome including for feature requests to cover new use cases such as this. I can't speak for what the answer will be as to what enhancements would be suitable in general, though. An enhancement to provide a regexp-based substitution inside an expansion might be possible, for example, but would probably need to be implemented in a way that ensures that malicious code cannot be executed on the host running git-build-recipe in the face of an untrusted recipe input. It would probably be best to find agreement in a bug first, before attempting to implement such a feature enhancement.
answered Dec 13 at 2:07
Robie Basak
12.4k24576
12.4k24576
Thanks. Do you know if it's possible to run something indebian/rules
like sed to replace the version of thedebian/changelog
and how that might affect the final deb version of a git-build-recipe?
– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange indebian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.
– Robie Basak
Dec 13 at 21:57
add a comment |
Thanks. Do you know if it's possible to run something indebian/rules
like sed to replace the version of thedebian/changelog
and how that might affect the final deb version of a git-build-recipe?
– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange indebian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.
– Robie Basak
Dec 13 at 21:57
Thanks. Do you know if it's possible to run something in
debian/rules
like sed to replace the version of the debian/changelog
and how that might affect the final deb version of a git-build-recipe?– Kristopher Ives
Dec 13 at 19:36
Thanks. Do you know if it's possible to run something in
debian/rules
like sed to replace the version of the debian/changelog
and how that might affect the final deb version of a git-build-recipe?– Kristopher Ives
Dec 13 at 19:36
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange in
debian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.– Robie Basak
Dec 13 at 21:57
It might work as a hack. Binary package versions don't have to match the source package version so you could arrange in
debian/rules
for at least the binary versions to end up using exactly what you want using sed or other tooling. However this won't help with the source package version, unless Launchpad's pipeline doesn't care that the source package that went in mismatches the source package that came out (which might well be the case). So try it and see! You'll need to ensure that the source package version uploaded to the PPA does change, since otherwise the next upload will be rejected.– Robie Basak
Dec 13 at 21:57
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099844%2fhow-can-i-remove-a-prefix-from-latest-tag-in-a-launchpad-recipe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown