]> granicus.if.org Git - sudo/commitdiff
Fix setting of pp_rpm_version when there is no patchlevel present.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 7 Apr 2015 16:15:45 +0000 (10:15 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 7 Apr 2015 16:15:45 +0000 (10:15 -0600)
Also tighten up the regexp for pp_rpm_release.

sudo.pp

diff --git a/sudo.pp b/sudo.pp
index d78db42fd58c1daf7f1c667f4c7afd3481bdffcf..930cc5b20824e814b4fa0bad0d0952dc282d42a3 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -41,8 +41,8 @@ still allow people to get their work done."
 
 %if [rpm,deb]
        # Convert patch level into release and remove from version
-       pp_rpm_release="`expr \( $version : '.*p\([0-9][0-9]*\)' \| 0 \) + 1`"
-       pp_rpm_version="`expr $version : '\(.*\)p[0-9][0-9]*'`"
+       pp_rpm_release="`expr \( $version : '.*p\([0-9][0-9]*\)$' \| 0 \) + 1`"
+       pp_rpm_version="`expr \( $version : '\(.*\)p[0-9][0-9]*$' \| $version \)`"
        pp_rpm_license="BSD"
        pp_rpm_url="http://www.sudo.ws/"
        pp_rpm_group="Applications/System"