[libvirt] [perl PATCH v2 0/3] maint: Rename autobuild.sh to prepare-release.sh

Changes from [v1]: * rename the script instead of dropping it; * perform some further clean ups. [v1] https://www.redhat.com/archives/libvir-list/2018-May/msg00221.html Andrea Bolognani (3): maint: Rename autobuild.sh to prepare-release.sh prepare-release: Drop references to Test::AutoBuild prepare-release: Drop references to Debian packages autobuild.sh => prepare-release.sh | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) rename autobuild.sh => prepare-release.sh (67%) -- 2.17.0

The script was originally used by the Test::AutoBuild project to perform periodic automatic builds; however, that effort has been abandoned a long time ago, and these days libvirt-perl CI builds are happening on the Jenkins-based CentOS CI environment under the libvirt umbrella[1], where build recipes are maintained separately from the projects themselves. The script is still used to prepare releases, so it can't be dropped from the repository: rename it so that its purpose is more clearly communicated instead. [1] https://ci.centos.org/view/libvirt/ Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- autobuild.sh => prepare-release.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename autobuild.sh => prepare-release.sh (100%) diff --git a/autobuild.sh b/prepare-release.sh similarity index 100% rename from autobuild.sh rename to prepare-release.sh -- 2.17.0

On Fri, May 04, 2018 at 02:20:24PM +0200, Andrea Bolognani wrote:
The script was originally used by the Test::AutoBuild project to perform periodic automatic builds; however, that effort has been abandoned a long time ago, and these days libvirt-perl CI builds are happening on the Jenkins-based CentOS CI environment under the libvirt umbrella[1], where build recipes are maintained separately from the projects themselves.
The script is still used to prepare releases, so it can't be dropped from the repository: rename it so that its purpose is more clearly communicated instead.
[1] https://ci.centos.org/view/libvirt/
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- autobuild.sh => prepare-release.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename autobuild.sh => prepare-release.sh (100%)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

They are no longer relevant and misleading. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- prepare-release.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/prepare-release.sh b/prepare-release.sh index 8a6d102..22f9155 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -1,21 +1,17 @@ #!/bin/sh -# -# This script is used to Test::AutoBuild (http://www.autobuild.org) -# to perform automated builds of the Sys-Virt module NAME=Sys-Virt set -e test -n "$1" && RESULTS=$1 || RESULTS=results.log -: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder} make -k realclean ||: rm -rf MANIFEST blib pm_to_blib export TEST_MAINTAINER=1 -perl Makefile.PL PREFIX=$AUTOBUILD_INSTALL_ROOT +perl Makefile.PL PREFIX=$HOME/builder rm -f MANIFEST @@ -56,12 +52,8 @@ rm -f $NAME-*.tar.gz make dist if [ -f /usr/bin/rpmbuild ]; then - if [ -n "$AUTOBUILD_COUNTER" ]; then - EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" - else - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - fi + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz fi -- 2.17.0

On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote:
They are no longer relevant and misleading.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- prepare-release.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/prepare-release.sh b/prepare-release.sh index 8a6d102..22f9155 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -1,21 +1,17 @@ #!/bin/sh -# -# This script is used to Test::AutoBuild (http://www.autobuild.org) -# to perform automated builds of the Sys-Virt module
NAME=Sys-Virt
set -e
test -n "$1" && RESULTS=$1 || RESULTS=results.log -: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}
make -k realclean ||: rm -rf MANIFEST blib pm_to_blib
export TEST_MAINTAINER=1
-perl Makefile.PL PREFIX=$AUTOBUILD_INSTALL_ROOT +perl Makefile.PL PREFIX=$HOME/builder
rm -f MANIFEST
@@ -56,12 +52,8 @@ rm -f $NAME-*.tar.gz make dist
if [ -f /usr/bin/rpmbuild ]; then - if [ -n "$AUTOBUILD_COUNTER" ]; then - EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" - else - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - fi + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz fi
We can actually chop the 'extra_release' bit out of the RPM spec entirely, as it is only useful for automated CI builds. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote:
On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote: [...]
if [ -f /usr/bin/rpmbuild ]; then - if [ -n "$AUTOBUILD_COUNTER" ]; then - EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" - else - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - fi + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz fi
We can actually chop the 'extra_release' bit out of the RPM spec entirely, as it is only useful for automated CI builds.
Neat. I assume you meant that we can avoid defining it when calling rpmbuild in the script, not that we want to remove it from the spec altogether, right? The latter can still be useful. Can I just squash in the following diff and push, or do you want me to respin? diff --git a/prepare-release.sh b/prepare-release.sh index 22f9155..25a5cda 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -52,9 +52,7 @@ rm -f $NAME-*.tar.gz make dist if [ -f /usr/bin/rpmbuild ]; then - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz + rpmbuild --nodeps -ta --clean $NAME-*.tar.gz fi # Skip debian pkg for now -- Andrea Bolognani / Red Hat / Virtualization

On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote:
On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote:
On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote: [...]
if [ -f /usr/bin/rpmbuild ]; then - if [ -n "$AUTOBUILD_COUNTER" ]; then - EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" - else - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - fi + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz fi
We can actually chop the 'extra_release' bit out of the RPM spec entirely, as it is only useful for automated CI builds.
Neat. I assume you meant that we can avoid defining it when calling rpmbuild in the script, not that we want to remove it from the spec altogether, right? The latter can still be useful.
I did actually mean removing it from the RPM spec entirely - Fedora reviewers have complained about it existing multiple times, but at least in past I could justify it for CI purposes.
Can I just squash in the following diff and push, or do you want me to respin?
diff --git a/prepare-release.sh b/prepare-release.sh index 22f9155..25a5cda 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -52,9 +52,7 @@ rm -f $NAME-*.tar.gz make dist
if [ -f /usr/bin/rpmbuild ]; then - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz + rpmbuild --nodeps -ta --clean $NAME-*.tar.gz fi
# Skip debian pkg for now -- Andrea Bolognani / Red Hat / Virtualization
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, 2018-05-04 at 14:20 +0100, Daniel P. Berrangé wrote:
On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote:
On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote:
We can actually chop the 'extra_release' bit out of the RPM spec entirely, as it is only useful for automated CI builds.
Neat. I assume you meant that we can avoid defining it when calling rpmbuild in the script, not that we want to remove it from the spec altogether, right? The latter can still be useful.
I did actually mean removing it from the RPM spec entirely - Fedora reviewers have complained about it existing multiple times, but at least in past I could justify it for CI purposes.
Not sure I agree, but I don't feel strongly enough to oppose the change either :) That IMHO puts it squarely into separate patch territory though, so if you're okay with it I'll push this one as originally posted and follow up with another that drops extra_release completely. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, May 04, 2018 at 03:37:50PM +0200, Andrea Bolognani wrote:
On Fri, 2018-05-04 at 14:20 +0100, Daniel P. Berrangé wrote:
On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote:
On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote:
We can actually chop the 'extra_release' bit out of the RPM spec entirely, as it is only useful for automated CI builds.
Neat. I assume you meant that we can avoid defining it when calling rpmbuild in the script, not that we want to remove it from the spec altogether, right? The latter can still be useful.
I did actually mean removing it from the RPM spec entirely - Fedora reviewers have complained about it existing multiple times, but at least in past I could justify it for CI purposes.
Not sure I agree, but I don't feel strongly enough to oppose the change either :)
That IMHO puts it squarely into separate patch territory though, so if you're okay with it I'll push this one as originally posted and follow up with another that drops extra_release completely.
Sure, consider it Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

The Debian packaging was never included in the git repository to begin with. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- prepare-release.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/prepare-release.sh b/prepare-release.sh index 22f9155..9de67fe 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -56,11 +56,3 @@ if [ -f /usr/bin/rpmbuild ]; then EXTRA_RELEASE=".$USER$NOW" rpmbuild --nodeps -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz fi - -# Skip debian pkg for now -exit 0 - -if [ -f /usr/bin/fakeroot ]; then - fakeroot debian/rules clean - fakeroot debian/rules DESTDIR=$HOME/packages/debian binary -fi -- 2.17.0

On Fri, May 04, 2018 at 02:20:26PM +0200, Andrea Bolognani wrote:
The Debian packaging was never included in the git repository to begin with.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- prepare-release.sh | 8 -------- 1 file changed, 8 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé