Details

    • Technical task
    • Resolution: Done
    • Critical
    • Lustre 2.9.0
    • None
    • None
    • 9223372036854775807

    Description

      There are numerous oddities about Lustre's system for applying version numbers in the configuration and packaging system. At this point, it is looking strongly like an overhaul is in order.

      Attachments

        Issue Links

          Activity

            [LU-7699] Overhaul lustre's versioning

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18108/
            Subject: LU-7699 build: Eliminate lustre_build_version.h
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 9c710162e5acebd860f1d3f0e1bf204ac1ba98c1

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18108/ Subject: LU-7699 build: Eliminate lustre_build_version.h Project: fs/lustre-release Branch: master Current Patch Set: Commit: 9c710162e5acebd860f1d3f0e1bf204ac1ba98c1

            Already mentioned this to Chris, but this may have broken SUSE builds on the Lustre Buildbot.

            I don't think so. I think that this is a problem in the buildbot configuration. I will open a github ticket shortly.

            morrone Christopher Morrone (Inactive) added a comment - Already mentioned this to Chris, but this may have broken SUSE builds on the Lustre Buildbot. I don't think so. I think that this is a problem in the buildbot configuration. I will open a github ticket shortly.

            Already mentioned this to Chris, but this may have broken SUSE builds on the Lustre Buildbot. The error I'm seeing on builds is "error: line 86: Empty tag: Release:". Example log is here.

            dinatale2 Giuseppe Di Natale (Inactive) added a comment - - edited Already mentioned this to Chris, but this may have broken SUSE builds on the Lustre Buildbot. The error I'm seeing on builds is "error: line 86: Empty tag: Release:". Example log is here .
            simmonsja James A Simmons added a comment - - edited

            Yeah more simplification. Debian platforms are back in business. Thanks Chris.

            simmonsja James A Simmons added a comment - - edited Yeah more simplification. Debian platforms are back in business. Thanks Chris.

            Christopher J. Morrone (morrone2@llnl.gov) uploaded a new patch: http://review.whamcloud.com/19488
            Subject: LU-7699 build: Convert version underscores to dashes for dpkg
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 368150054a379f1da81dce8b2e5016016f126655

            gerrit Gerrit Updater added a comment - Christopher J. Morrone (morrone2@llnl.gov) uploaded a new patch: http://review.whamcloud.com/19488 Subject: LU-7699 build: Convert version underscores to dashes for dpkg Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 368150054a379f1da81dce8b2e5016016f126655

            Thanks for the legwork on that, James!

            We don't even need sed any more; I'll just use tr.

            morrone Christopher Morrone (Inactive) added a comment - Thanks for the legwork on that, James! We don't even need sed any more; I'll just use tr.

            I tracked down what needs to be changed for make debs. We have:

            lversion=$$(sed -ne 's/^#define VERSION "(.*)"$$/\1/p' config.h);

            The sed command needs to be modified to change '_' to '-'. I'm no sed master so Chris what needs to be done to make that so.

            simmonsja James A Simmons added a comment - I tracked down what needs to be changed for make debs. We have: lversion=$$(sed -ne 's/^#define VERSION "(.*)"$$/\1/p' config.h); The sed command needs to be modified to change '_' to '-'. I'm no sed master so Chris what needs to be done to make that so.

            Also I found when you have a top level .git directory if you remove the LUSTRE-VERSION-FILE it will not regenerate and it causes make rpms to fail.

            Yeah, that is true. For now, you will just need to rerun autogen.sh to make any version changes. This could be automated in the future, but we pretty much need to fix autoreconf (LU-7700) to do it sanely.

            morrone Christopher Morrone (Inactive) added a comment - Also I found when you have a top level .git directory if you remove the LUSTRE-VERSION-FILE it will not regenerate and it causes make rpms to fail. Yeah, that is true. For now, you will just need to rerun autogen.sh to make any version changes. This could be automated in the future, but we pretty much need to fix autoreconf ( LU-7700 ) to do it sanely.
            simmonsja James A Simmons added a comment - - edited

            I discovered the is needed on rpms systems for the version field the hard way today. For dpkgs both Name and Version fields can not have '_'. I need to rethink this. I did see many sites stating you should avoid '-' at all cost for rpms Also I found when you have a top level .git directory if you remove the LUSTRE-VERSION-FILE it will not regenerate and it causes make rpms to fail.

            simmonsja James A Simmons added a comment - - edited I discovered the is needed on rpms systems for the version field the hard way today. For dpkgs both Name and Version fields can not have '_'. I need to rethink this. I did see many sites stating you should avoid '-' at all cost for rpms Also I found when you have a top level .git directory if you remove the LUSTRE-VERSION-FILE it will not regenerate and it causes make rpms to fail.

            So I did some digging and I found that '_' is actually an invalid character for fedora as well. See this link:

            Actually, that page says the following:

            When naming packages for Fedora, the maintainer must use the dash '-' as the delimiter for name parts. The maintainer must NOT use an underscore '_', a plus '+', or a period '.' as a delimiter.

            We are not using underscores in the name parts, i.e. the Name field. Underscores are only used in the Version.

            But yes, it looks like we'll need to work something out for dpkg systems.

            The main reason that we use underscores in the version is because Lustre currently has a variable number of version fields, which makes it difficult to tell the delineation between the upstream version and the following part of the version, whether third-party or development (git describe) information.

            We can't use a dash (-) in the version string on rpm systems. That pretty much leaves a period as the only other sane option if we decide to stop using underscores.

            But maybe we stick with underscores on rpm systems, and munge the string in some acceptable way for dpkg?

            morrone Christopher Morrone (Inactive) added a comment - So I did some digging and I found that '_' is actually an invalid character for fedora as well. See this link: Actually, that page says the following: When naming packages for Fedora, the maintainer must use the dash '-' as the delimiter for name parts. The maintainer must NOT use an underscore '_', a plus '+', or a period '.' as a delimiter. We are not using underscores in the name parts , i.e. the Name field. Underscores are only used in the Version. But yes, it looks like we'll need to work something out for dpkg systems. The main reason that we use underscores in the version is because Lustre currently has a variable number of version fields, which makes it difficult to tell the delineation between the upstream version and the following part of the version, whether third-party or development (git describe) information. We can't use a dash (-) in the version string on rpm systems. That pretty much leaves a period as the only other sane option if we decide to stop using underscores. But maybe we stick with underscores on rpm systems, and munge the string in some acceptable way for dpkg?

            I tried a spin with the latest lustre on Ubuntu 15.04 and I get this error:

            dpkg-buildpackage: warning: debian/changelog(l1): version '2.8.51_17_g5bd8f72-1' is invalid: version number contains illegal character '_'
            LINE: lustre (2.8.51_17_g5bd8f72-1) unstable; urgency=low
            dpkg-buildpackage: source package lustre
            dpkg-buildpackage: source version 2.8.51_17_g5bd8f72-1
            dpkg-buildpackage: error: version number contains illegal character '_'
            autoMakefile:1136: recipe for target 'debs' failed
            make: *** [debs] Error 25

            So I did some digging and I found that '_' is actually an invalid character for fedora as well. See this link:

            https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Separators

            So basically we will need to fix the lustre version not to contain any '_' for proper packaging on rpm and deb systems.

            simmonsja James A Simmons added a comment - I tried a spin with the latest lustre on Ubuntu 15.04 and I get this error: dpkg-buildpackage: warning: debian/changelog(l1): version '2.8.51_17_g5bd8f72-1' is invalid: version number contains illegal character '_' LINE: lustre (2.8.51_17_g5bd8f72-1) unstable; urgency=low dpkg-buildpackage: source package lustre dpkg-buildpackage: source version 2.8.51_17_g5bd8f72-1 dpkg-buildpackage: error: version number contains illegal character '_' autoMakefile:1136: recipe for target 'debs' failed make: *** [debs] Error 25 So I did some digging and I found that '_' is actually an invalid character for fedora as well. See this link: https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Separators So basically we will need to fix the lustre version not to contain any '_' for proper packaging on rpm and deb systems.

            People

              morrone Christopher Morrone (Inactive)
              morrone Christopher Morrone (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: