-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45298/#review129587
-----------------------------------------------------------



Thanks for plugging away at this.  It sounds like you were trying to get 
versions like '0.13.1-SNAPSHOT' working but they still don't (see below).  As 
such I'm not sure what the new AURORA_INTERNAL_VERSION is buying.


specs/rpm/Makefile 
<https://reviews.apache.org/r/45298/#comment193033>

    Previously, AURORA_VERSION had `tr '-' '_'` treatment both here and in 
builder/rpm/centos-7/build.sh.  Its true this should never have happened in 2 
spots, but it should still be happening here to handle versions like 
0.13.1-SNAPSHOT - which is an illegal rpm version string and causes this blowup:
    ```
    (aurora) $ git archive --prefix=apache-aurora-$(cat .auroraversion)/ -o 
/tmp/snapshot.tar.gz HEAD
    $ tar -tzf /tmp/snapshot.tar.gz | head -1
    apache-aurora-0.13.1-SNAPSHOT/
    (aurora-packaging) $ ./build-artifact.sh /tmp/snapshot.tar.gz 
0.13.1-SNAPSHOT
    Using docker image aurora-centos-7
    ...
    + make srpm
    rm -rf /dist/rpmbuild
    mkdir -p /dist/rpmbuild/BUILD
    mkdir -p /dist/rpmbuild/BUILDROOT
    mkdir -p /dist/rpmbuild/RPMS
    mkdir -p /dist/rpmbuild/SOURCES
    mkdir -p /dist/rpmbuild/SRPMS
    cp /src.tar.gz /dist/rpmbuild/SOURCES/apache-aurora-0.13.1-SNAPSHOT.tar.gz
    cp SOURCES/* /dist/rpmbuild/SOURCES
    rpmbuild  \
        --define "_topdir /dist" \
        --define "_builddir %{_topdir}/rpmbuild/BUILD" \
        --define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \
        --define "_rpmdir %{_topdir}/rpmbuild/RPMS" \
        --define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \
        --define "_specdir %(pwd)" \
        --define "_sourcedir  %{_topdir}/rpmbuild/SOURCES" \
        --define "AURORA_VERSION 0.13.1-SNAPSHOT" \
        --define "AURORA_INTERNAL_VERSION 0.13.1-SNAPSHOT" \
        --define "MESOS_VERSION 0.26.0" \
        --nodeps -bs aurora.spec
    error: line 58: Illegal char '-' in: Version:       0.13.1-SNAPSHOT
    make: *** [srpm] Error 1
    ```
    
    Without your patch the blowup was further along:
    ```
    ...
    + make srpm
    rm -rf /dist/rpmbuild
    mkdir -p /dist/rpmbuild/BUILD
    mkdir -p /dist/rpmbuild/BUILDROOT
    mkdir -p /dist/rpmbuild/RPMS
    mkdir -p /dist/rpmbuild/SOURCES
    mkdir -p /dist/rpmbuild/SRPMS
    cp /src.tar.gz /dist/rpmbuild/SOURCES/0.13.1_SNAPSHOT.tar.gz
    cp SOURCES/* /dist/rpmbuild/SOURCES
    rpmbuild  \
        --define "_topdir /dist" \
        --define "_builddir %{_topdir}/rpmbuild/BUILD" \
        --define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \
        --define "_rpmdir %{_topdir}/rpmbuild/RPMS" \
        --define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \
        --define "_specdir %(pwd)" \
        --define "_sourcedir  %{_topdir}/rpmbuild/SOURCES" \
        --define "AURORA_VERSION 0.13.1_SNAPSHOT" \
        --define "MESOS_VERSION 0.26.0" \
        --nodeps -bs aurora.spec
    Wrote: 
/dist/rpmbuild/SRPMS/aurora-scheduler-0.13.1_SNAPSHOT-1.el7.centos.aurora.src.rpm
    + yum-builddep -y 
../../../dist/rpmbuild/SRPMS/aurora-scheduler-0.13.1_SNAPSHOT-1.el7.centos.aurora.src.rpm
    ...
    cp /src.tar.gz /dist/rpmbuild/SOURCES/0.13.1_SNAPSHOT.tar.gz
    cp SOURCES/* /dist/rpmbuild/SOURCES
    rpmbuild  \
        --define "_topdir /dist" \
        --define "_builddir %{_topdir}/rpmbuild/BUILD" \
        --define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \
        --define "_rpmdir %{_topdir}/rpmbuild/RPMS" \
        --define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \
        --define "_specdir %(pwd)" \
        --define "_sourcedir  %{_topdir}/rpmbuild/SOURCES" \
        --define "AURORA_VERSION 0.13.1_SNAPSHOT" \
        --define "MESOS_VERSION 0.26.0" \
        -ba aurora.spec
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.gcBcSI
    + umask 022
    + cd /dist/rpmbuild/BUILD
    + cd /dist/rpmbuild/BUILD
    + rm -rf apache-aurora-0.13.1_SNAPSHOT
    + /usr/bin/gzip -dc /dist/rpmbuild/SOURCES/0.13.1_SNAPSHOT.tar.gz
    + /usr/bin/tar -xvvf -
    drwxrwxr-x root/root         0 2016-04-18 21:52 
apache-aurora-0.13.1-SNAPSHOT/
    -rw-rw-r-- root/root        16 2016-04-18 21:52 
apache-aurora-0.13.1-SNAPSHOT/.auroraversion
    -rw-rw-r-- root/root        35 2016-04-18 21:52 
apache-aurora-0.13.1-SNAPSHOT/.bowerrc
    ...
    -rw-rw-r-- root/root      1483 2016-04-18 21:52 
apache-aurora-0.13.1-SNAPSHOT/src/test/sh/org/apache/aurora/e2e/validate_serverset.py
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd apache-aurora-0.13.1_SNAPSHOT
    /var/tmp/rpm-tmp.gcBcSI: line 35: cd: apache-aurora-0.13.1_SNAPSHOT: No 
such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.gcBcSI (%prep)
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.gcBcSI (%prep)
    make: *** [rpm] Error 1
    ```


- John Sirois


On April 19, 2016, 11:48 a.m., Pierre Cheynier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45298/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 11:48 a.m.)
> 
> 
> Review request for Aurora and John Sirois.
> 
> 
> Repository: aurora-packaging
> 
> 
> Description
> -------
> 
> An operator should be able to build Aurora on his platform without
> relying on Docker.
> 
> Even if this is an interesting way of doing it, it sometimes introduce missed
> (build-)dependencies (in this case openssl) and context-specific behaviour
> (here, the way pants.ini was added to the build context)
> 
> 
> Diffs
> -----
> 
>   builder/deb/debian-jessie/Dockerfile 
> fd15dfe6fd4518cfe9915b7339c1b3e609e968d7 
>   builder/deb/debian-jessie/pants.ini 
> 446ea8d8ebb4fce2665dc4c7c1a2ea32d5f18707 
>   builder/deb/ubuntu-trusty/Dockerfile 
> a4a9e648537841583fdc02c006bfa00a3a095aca 
>   builder/deb/ubuntu-trusty/pants.ini  
>   builder/rpm/centos-7/Dockerfile a4d9dfcee5637d23333c31d0c2b63a9ebcf04e8d 
>   builder/rpm/centos-7/build.sh be3c6fb970dbdd1b94630473e6f67e4a91700e43 
>   builder/rpm/centos-7/pants.ini  
>   specs/debian/control 9dd927df63f68afc10506a7dcab8d26f21fbee33 
>   specs/debian/rules 974fddfda6da04686daae691fa32c5b4c11a0b5d 
>   specs/rpm/Makefile 0476bcbda489bf53edc2101831475fe4a4ea3241 
>   specs/rpm/aurora.spec fa89242f0c39ca058bc791dab18f67f75150e2d2 
> 
> Diff: https://reviews.apache.org/r/45298/diff/
> 
> 
> Testing
> -------
> 
> Able to build on CentOS 6 using mock.
> Able to build on Debian. Limitation = need the patched version of Gradle.
> Still able to build using the current Docker build system
> 
> 
> Thanks,
> 
> Pierre Cheynier
> 
>

Reply via email to