Skip to content

Keep openshift.spec uptodate #1302

Closed
Closed

Description

@hingstarne

Dear all,

i would appreciate if it would be possible to have the https://github.com/openshift/origin/blob/master/openshift.spec file uptodate at least in the released versions. Due to the multiple parts that needs to be updated for every build it would be nice to have it generic like the build scripts.

Activity

  1. detiber commented on Mar 13, 2015

    @detiber
    Contributor

    @hingstarne The spec file is managed by tito (http://rm-rf.ca/tito). You can generate the rpm from a checkout using tito build --test --rpm

  2. hingstarne commented on Mar 13, 2015

    @hingstarne
    ContributorAuthor

    @detiber
    Thank you for your reply. But in the following output the package should be version 0.3.1 and not hardcoded 0.2.2 release 4 . So this tito workflow is very nice indeed but it does not cover the version numbering at the moment or did i used tito in a wrong way?

    tito build --test --rpm
    Creating output directory: /tmp/tito
    WARNING: unable to lookup latest package tag, building untagged test project
    WARNING: rel-eng/packages/openshift doesn't exist in git, using current directory
    Building package [openshift-0.2.2-4]
    Wrote: /tmp/tito/openshift-git-0.9652ad0.tar.gz
    
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.B8ypha
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + rm -rf openshift-git-0.9652ad0
    + /usr/bin/gzip -dc /tmp/tito/rpmbuild-openshift8gmEk0/SOURCES/openshift-git-0.9652ad0.tar.gz
    + /usr/bin/tar -xf -
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd openshift-git-0.9652ad0
    + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.l0uxLi
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + cd openshift-git-0.9652ad0
    + mkdir _build
    + pushd _build
    /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_build /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0
    + mkdir -p src/github.com/openshift
    ++ dirs +1 -l
    + ln -s /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0 src/github.com/openshift/origin
    + popd
    /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0
    + mkdir _thirdpartyhacks
    + pushd _thirdpartyhacks
    /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_thirdpartyhacks /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0
    ++ dirs +1 -l
    + ln -s /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/Godeps/_workspace/src/ src
    + popd
    /tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0
    ++ pwd
    ++ pwd
    + export GOPATH=/tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_build:/tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_thirdpartyhacks:/tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/gocode:/usr/share/gocode
    + GOPATH=/tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_build:/tmp/tito/rpmbuild-openshift8gmEk0/BUILD/openshift-git-0.9652ad0/_thirdpartyhacks:/tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/gocode:/usr/share/gocode
    + for cmd in openshift
    + go build -ldflags '-X github.com/openshift/origin/pkg/version.majorFromGit 0 -X github.com/openshift/origin/pkg/version.minorFromGit 3+ -X github.com/openshift/origin/pkg/version.versionFromGit v0.3.1-57-g9652ad0 -X github.com/openshift/origin/pkg/version.commitFromGit 9652ad0 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitCommit c977a45 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitVersion v0.10.0-503-gc977a45' github.com/openshift/origin/cmd/openshift
    + sed -i 's|IMAGES=.*|IMAGES=openshift/origin-${component}:${version}|' rel-eng/openshift-master.sysconfig rel-eng/openshift-node.sysconfig
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.uecgpD
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + '[' /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64 '!=' / ']'
    + rm -rf /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    ++ dirname /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    + mkdir -p /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT
    + mkdir /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    + cd openshift-git-0.9652ad0
    + install -d /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/bin
    + for bin in openshift
    + echo '+++ INSTALLING openshift'
    +++ INSTALLING openshift
    + install -p -m 755 openshift /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/bin/openshift
    + install -d -m 0755 /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/lib/systemd/system
    + install -m 0644 -t /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/lib/systemd/system rel-eng/openshift-master.service
    + install -m 0644 -t /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/lib/systemd/system rel-eng/openshift-node.service
    + mkdir -p /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/etc/sysconfig
    + install -m 0644 rel-eng/openshift-master.sysconfig /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/etc/sysconfig/openshift-master
    + install -m 0644 rel-eng/openshift-node.sysconfig /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/etc/sysconfig/openshift-node
    + mkdir -p /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/var/lib/openshift
    + ln -s /usr/bin/openshift /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/bin/osc
    + mkdir -p /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/lib/tuned/openshift-node
    + install -m 0644 -t /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/lib/tuned/openshift-node tuned/openshift-node/tuned.conf
    + /usr/lib/rpm/check-buildroot
    + /usr/lib/rpm/redhat/brp-compress
    + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
    + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
    + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
    + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
    + /usr/lib/rpm/redhat/brp-python-hardlink
    + /usr/lib/rpm/redhat/brp-java-repack-jars
    Processing files: openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.XSVqIZ
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + cd openshift-git-0.9652ad0
    + DOCDIR=/tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/doc/openshift-0.2.2
    + export DOCDIR
    + /usr/bin/mkdir -p /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/doc/openshift-0.2.2
    + cp -pr README.md /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/doc/openshift-0.2.2
    + cp -pr LICENSE /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64/usr/share/doc/openshift-0.2.2
    + exit 0
    Provides: openshift = 0.2.2-4.git.0.9652ad0.el7.centos openshift(x86-64) = 0.2.2-4.git.0.9652ad0.el7.centos
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) rtld(GNU_HASH)
    Processing files: openshift-master-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    Provides: config(openshift-master) = 0.2.2-4.git.0.9652ad0.el7.centos openshift-master = 0.2.2-4.git.0.9652ad0.el7.centos openshift-master(x86-64) = 0.2.2-4.git.0.9652ad0.el7.centos
    Requires(interp): /bin/sh /bin/sh /bin/sh
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires(post): /bin/sh systemd
    Requires(preun): /bin/sh systemd
    Requires(postun): /bin/sh systemd
    Processing files: openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    Provides: config(openshift-node) = 0.2.2-4.git.0.9652ad0.el7.centos openshift-node = 0.2.2-4.git.0.9652ad0.el7.centos openshift-node(x86-64) = 0.2.2-4.git.0.9652ad0.el7.centos
    Requires(interp): /bin/sh /bin/sh /bin/sh
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires(post): /bin/sh systemd
    Requires(preun): /bin/sh systemd
    Requires(postun): /bin/sh systemd
    Processing files: tuned-profiles-openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    Provides: tuned-profiles-openshift-node = 0.2.2-4.git.0.9652ad0.el7.centos tuned-profiles-openshift-node(x86-64) = 0.2.2-4.git.0.9652ad0.el7.centos
    Requires(interp): /bin/sh /bin/sh
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires(post): /bin/sh
    Requires(preun): /bin/sh
    Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    Wrote: /tmp/tito/openshift-0.2.2-4.git.0.9652ad0.el7.centos.src.rpm
    Wrote: /tmp/tito/x86_64/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm
    Wrote: /tmp/tito/x86_64/openshift-master-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm
    Wrote: /tmp/tito/x86_64/openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm
    Wrote: /tmp/tito/x86_64/tuned-profiles-openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm
    Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.Thhg01
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + cd openshift-git-0.9652ad0
    + /usr/bin/rm -rf /tmp/tito/rpmbuild-openshift8gmEk0/BUILDROOT/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64
    + exit 0
    Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.kEvqdB
    + umask 022
    + cd /tmp/tito/rpmbuild-openshift8gmEk0/BUILD
    + rm -rf openshift-git-0.9652ad0
    + exit 0
    
    
    Successfully built: /tmp/tito/openshift-0.2.2-4.git.0.9652ad0.el7.centos.src.rpm /tmp/tito/x86_64/openshift-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm /tmp/tito/x86_64/openshift-master-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm /tmp/tito/x86_64/openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm /tmp/tito/x86_64/tuned-profiles-openshift-node-0.2.2-4.git.0.9652ad0.el7.centos.x86_64.rpm
    
  3. detiber commented on Mar 13, 2015

    @detiber
    Contributor

    @hingstarne you are indeed correct. you would need to either edit the version in the spec file before doing tito build --test --rpm.

    @brenton @smarterclayton: can we incorporate tito tag into the release tagging process or origin?

  4. hingstarne commented on Mar 13, 2015

    @hingstarne
    ContributorAuthor

    @detiber
    Is this part handled by tito tag too?

    %{!?ldflags:
    %global ldflags -X github.com/openshift/origin/pkg/version.majorFromGit 0 -X github.com/openshift/origin/pkg/version.minorFromGit 2+ -X github.com/openshift/origin/pkg/version.versionFromGit v0.2.2-134-gc9e7c25aaf0e61-dirty -X github.com/openshift/origin/pkg/version.commitFromGit c9e7c25 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitCommit 72ad4f1 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitVersion v0.10.0-46-g72ad4f1
    }
    
  5. brenton commented on Mar 13, 2015

    @brenton
    Contributor

    I think the intention is for Origin to be deployed solely as containers. The rpm spec file is there to provide distro maintainers a starting point. I'm not totally sure we'll stick with this tito process much longer anyway so this may go away.

    I guess technically since we need a git tag to create the releases in github we could technically do it with tito. I'll defer to clayton if he's OK with that. It's sort of a burden for upstream since tito might not even be availalbe on the system the upstream developer is using to the create the Origin release.

  6. brenton commented on Mar 13, 2015

    @brenton
    Contributor

    @hingstarne, tito does handle that. It's done by a custom plugin under https://github.com/openshift/origin/tree/master/rel-eng/lib/openshift. However, I'm not sure if the latest tito plugin has made it to this repo yet.

    It's related to the larger discussion of "do we even want to continue using tito". @sdodson, I'm guessing the tito plugin is pretty stable now. Would you want to create a PR against this repo to push the latest updates?

  7. sdodson commented on Mar 13, 2015

    @sdodson
    Member

    tito will update the ldflags so the resultant binary will properly identify its version. However, unfortunately it will not update the version and release in the specfile so the rpm version will be incorrect. This is in the custom builder and tagger already.

    I was getting close to having tito tag things in the format that the scripts in hack/ expect 'vX.Y.Z' I think if we do that we could use tito to tag things assuming we're amenable to including tito in the origin tagging process. Alternately we should probably update the existing tagging process to update the spec file.

  8. sdodson commented on Mar 14, 2015

    @sdodson
    Member

    #1309 should allow one to use tito to tag the repo without breaking the normal hack/build-go.sh build process. We should discuss how / if we want to use this in the normal release process.

  9. added
    kind/bug
    on Mar 16, 2015
  10. brenton commented on Apr 13, 2015

    @brenton
    Contributor

    #1309 is merging so I'm going to close this. @hingstarne, let us know on [email protected] if you need help with tito.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions