Skip to content
This repository was archived by the owner on Mar 28, 2018. It is now read-only.

install: Extract autoconf-archive install to separate script #876

Merged
merged 1 commit into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions installation/curl-autoconf-archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# This file is part of cc-oci-runtime.
#
# Copyright (C) 2017 Intel Corporation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Description: This script downloads and installs the autoconf-archive macros
# necessary to configure this project. This is invoked for distro builds where
# the necessary package is not available to install, and is also useful to
# hand run under certain circumstances.
# Should be run from the top level directory
#

# autoconf-archive url
autoconf_archive_url="http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently added autoconf_archive to Clear Linux, what do you think to chanage that url with something like this
https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2017.03.21.tar.xz

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like the versioned link better than the gitweb one, yes.
What do you think - we can just pull the tar file and extract just the files we need into the m4 directory with a single piped tar command maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this decision effectively summarises to:

  • do we want to remain on the development tip of autoconf-archive (gitweb)? or,
  • do we want stability at the expense of using old code (ftp)?

I'd leaning slightly towards the former since otherwise we have something else to maintain (if we go with the latter we should add the package version to versions.txt). If the GNU tip does break, we can raise a PR to revert to the last good commit. That said, I can't imagine that the two m4 files we're using are going to change significantly enough to warrant tracking the top of development. However, by remaining current, we'll ensure RHEL/CentOS are more in line with the other distros (which presumably will update the autoconf-archive package as new versions are released upstream.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice breakdown @jodh-intel With that info, I think I agree that longer term the development tip is safe enough (these are very low churn files)...
@jcvenegas , what say you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grahamwhaley @jodh-intel , not problem here, I was curious to be a consistent with the versions.txt, it already includes a version for "autoconf_archive_version", and in case of that happen, we potentially could know about it and fix it quickly

mkdir -p m4/
# curl the required autoconf archive files into the correct place
curl -L "${autoconf_archive_url}/ax_code_coverage.m4" -o m4/ax_code_coverage.m4
curl -L "${autoconf_archive_url}/ax_valgrind_check.m4" -o m4/ax_valgrind_check.m4
9 changes: 3 additions & 6 deletions installation/rhel-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,12 @@ cor=github.com/01org/cc-oci-runtime
# Currently it is the latest version for cc-oci-runtime
commit=tags/2.1.9
release=${commit##*/}
# autoconf-archive url
autoconf_archive_url="http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4"
go get "$cor"
pushd "$GOPATH/src/$cor"
git checkout -b "$release" "$commit"
mkdir -p m4/
# autoconf-archive package does not exist in RHEL we need to download all m4 files required
curl -L "${autoconf_archive_url}/ax_code_coverage.m4" -o m4/ax_code_coverage.m4
curl -L "${autoconf_archive_url}/ax_valgrind_check.m4" -o m4/ax_valgrind_check.m4
# autoconf-archive package does not exist in RHEL we need to download all m4
# files required
source "${SCRIPT_PATH}/curl-autoconf-archive.sh"
./autogen.sh \
--prefix="${prefix_dir}" \
--disable-tests \
Expand Down