Discussion:
[netcf-devel] Re: netcf - anyone here for an "other operating system (but not (Solaris))"
(too old to reply)
Eric Blake
2016-11-01 14:05:16 UTC
Permalink
Raw Message
[adding gnulib]
ok - how do I submit a patch.
'git send-email' is preferred, but any way of creating the patch and
mailing it to the list can probably work as a starting point.
An issue I have is the syntax for sed in ./bootstrap.
If bootstrap has non-portable sed scripts, that is an issue to report to
upstream gnulib (netcf just copies bootstrap from gnulib); but it may
also be something that is already fixed in upstream gnulib and we just
need to update netcf to the latest gnulib.
I can edit that, but bootstrap is regenerated during the bootstrap - and then fails.
running bootstrap...
+ ./bootstrap --bootstrap-sync
autom4te: need GNU m4 1.4 or later: /opt/bin/m4
./bootstrap: WARNING: your autom4te wrapper eats stdin;
You'll need to fix those issues if you want to bootstrap on AIX.

But what I _strongly_ recommend is that you consider bootstrapping on a
GNU/Linux system, then creating a tarball (with 'make dist'), then
testing the tarball on AIX. It will save you the hassle of having to
upgrade your AIX machine into something capable of doing the bootstrap
(as the built tarball no longer has dependencies on up-to-date GNU m4,
automake, and so on). On the other hand, iterative development is
harder if you have to copy a new tarball every time you want to test a
patch, so maybe investing the time into updating your build environment
to be more GNU-like will pay off.
./bootstrap: if bootstrap fails, consider upgrading your autotools
./bootstrap: Bootstrapping from checked-out netcf sources...
./bootstrap: getting gnulib files...
./bootstrap: updating bootstrap and restarting...
sed: # Skip lines that do not start with version. is not a recognized function.
./bootstrap: Error: 'autoconf' not found
Can you figure out which sed script in the bootstrap script is
triggering this extra output, and/or provide the edits that work for
you, as you hinted above?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Eric Blake
2016-11-01 14:52:28 UTC
Permalink
Raw Message
[re-adding gnulib; please remember to reply all]
Post by Eric Blake
[adding gnulib]
Can you figure out which sed script in the bootstrap script is
triggering this extra output, and/or provide the edits that work for
you, as you hinted above?
In get_version() the sed script includes lots of white space before the #. Bringing the 15 following lines back to the beginning of the line allows this to run (longer).
get_version() {
app=$1
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
$app --version 2>&1 |
sed -n '# Move version to start of line.
s/.*[v ]\([0-9]\)/\1/
# Skip lines that do not start with version.
Sed scripts should not use branch labels longer than 7 characters and
should not contain comments; AIX 5.3 sed rejects indented comments.
Which AIX version are you using? Does the autoconf text need to be
updated to mention a more modern version number? Meanwhile, it sounds
like gnulib's bootstrap should be patched to avoid non-portable sed
comments, then netcf updated to use the newer gnulib version.
In the end, while it finds my GNU m4, it still complains that it is not a GNU m4.
Which version of GNU m4? There are some particular m4 bugs in some
older versions that kill configure scripts, so the bootstrap script
intentionally blacklists m4 versions with those bugs.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Michael Felt
2016-11-01 22:43:28 UTC
Permalink
Raw Message
Post by Eric Blake
Which version of GNU m4? There are some particular m4 bugs in some
older versions that kill configure scripts, so the bootstrap script
intentionally blacklists m4 versions with those bugs.
missed this. 1.4.17
Michael Felt
2016-11-02 08:32:26 UTC
Permalink
Raw Message
Post by Eric Blake
# Skip lines that do not start with version.
Sed scripts should not use branch labels longer than 7 characters and
should not contain comments; AIX 5.3 sed rejects indented comments.
Which AIX version are you using? Does the autoconf text need to be
updated to mention a more modern version number? Meanwhile, it sounds
like gnulib's bootstrap should be patched to avoid non-portable sed
comments, then netcf updated to use the newer gnulib version.
In the end, while it finds my GNU m4, it still complains that it is not a GNU m4.
I thought it was finding my m4 - but that was this code in autom4ate:
# $M4.
my $m4 = $ENV{"M4"} || '/opt/bin/m4';
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
fatal "need GNU m4 1.4 or later: $m4"
if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";

Since it was not installed the command failed - however, the fatal
message was giving the correct command plus path - so I thought it was
using it. A nice improvement for the tool autom4te would be to check
"$m4" actually exists.

And I shall update my packaging to make gnu.m4 a dependency (now that I
know how to specify that).
Post by Eric Blake
Which version of GNU m4? There are some particular m4 bugs in some
older versions that kill configure scripts, so the bootstrap script
intentionally blacklists m4 versions with those bugs.
So, performed the following steps on a system with m4 plus all the
autotools...

This is the result:

***@x071:[/data/prj/aixtools]git clone
git://git.fedorahosted.org/netcf.git netcf-0.2.8.2
Cloning into 'netcf-0.2.8.2'...
remote: Counting objects: 2383, done.
remote: Compressing objects: 100% (1969/1969), done.
remote: Total 2383 (delta 1652), reused 579 (delta 358)
Receiving objects: 100% (2383/2383), 502.07 KiB | 298.00 KiB/s, done.
Resolving deltas: 100% (1652/1652), done.
***@x071:[/data/prj/aixtools]cd net*2
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]vi bootstrap
"bootstrap" 1026 lines, 31605 characters
#! /bin/sh
# Print a version string.
scriptversion=2014-12-08.12; # UTC

# Bootstrap this package from checked-out sources.

# Copyright (C) 2003-2015 Free Software Foundation, Inc.

# 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 3 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, see <http://www.gnu.org/licenses/>.

# Originally written by Paul Eggert. The canonical version of this
# script is maintained as build-aux/bootstrap in gnulib, however, to
# be useful to your project, you should place a copy of it under
# version control in the top-level directory of your project. The
# intent is that all customization can be done with a bootstrap.conf
# file also maintained in your version control; gnulib comes with a
# template build-aux/bootstrap.conf to get you started.

/ #
i=$(($i+1))
done
}

get_version() {
app=$1

$app --version >/dev/null 2>&1 || { $app --version; return 1; }

$app --version 2>&1 |
sed -n '# Move version to start of line.
s/.*[v ]\([0-9]\)/\1/

# Skip lines that do not start with version.
/^[0-9]/!d

# Remove characters after the version.
s/[^.a-z0-9-].*//

# The first component must be digits only.
s/^\([0-9]*\)[a-z-].*/\1/

#the following essentially does s/5.005/5.5/
s/\.0*\([1-9]\)/.\1/g
p
q'
}

check_versions() {
"bootstrap" 1026 lines, 31495 characters
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]ls *.sh
autobuild.sh autogen.sh
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]./autobuild.sh

# Make things clean.

test -n "$1" && RESULTS=$1 || RESULTS=results.log
: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}

test -f Makefile && make -k distclean || :
rm -rf coverage

test -d build && chmod -R u+rw build || :
rm -rf build
mkdir build
cd build

../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
--enable-compile-warnings=yes
running bootstrap...
./bootstrap: Bootstrapping from checked-out netcf sources...
./bootstrap: consider installing git-merge-changelog from gnulib
./bootstrap: getting gnulib files...
Submodule 'gnulib' (git://git.sv.gnu.org/gnulib.git) registered for path
'.gnulib'
Cloning into '/data/prj/aixtools/netcf-0.2.8.2/.gnulib'...
Submodule path '.gnulib': checked out
'63881a60d67422cd7b83eae5ecabdc6b67ea7192'
./bootstrap: updating bootstrap and restarting...
sed: # Skip lines that do not start with version. is not a
recognized function.
./bootstrap: Error: 'autoconf' not found
sed: # Skip lines that do not start with version. is not a
recognized function.
./bootstrap: Error: 'automake' not found
sed: # Skip lines that do not start with version. is not a
recognized function.
./bootstrap: Error: 'gettext' not found
sed: # Skip lines that do not start with version. is not a
recognized function.
./bootstrap: Error: 'git' not found
sed: # Skip lines that do not start with version. is not a
recognized function.
./bootstrap: Error: 'perl' not found

./bootstrap: Please install the prerequisite programs
Failed to bootstrap, please investigate.
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]

FYI: I shall manually edit the bootstrap (again) to not do the cp
command and see how far I get. I know there are additional dependancies
- I will not bother you with the details of getting those ready.

Note: from above it should be clear that 'git' and 'autom4te' are
functioning normally - and after the cp the 'sed' issue returns.

FYI: AIX 6.1

***@x071:[/data/prj/aixtools/netcf-0.2.8.2]oslevel -s
lslpp -w /usr/bin/sed
6100-09-04-1441
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]lslpp -w /usr/bin/sed
File Fileset Type
----------------------------------------------------------------------------
/usr/bin/sed bos.rte.edit File
***@x071:[/data/prj/aixtools/netcf-0.2.8.2]lslpp -L bos.rte.edit
Fileset Level State Type Description
(Uninstaller)
----------------------------------------------------------------------------
bos.rte.edit 6.1.9.30 C F Editors
Post by Eric Blake
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization
library http://libvirt.org
Michael Felt
2016-11-02 11:47:03 UTC
Permalink
Raw Message
Granted - the web page is from 7 years ago (now that I look more closely).
How can I help ?
netcf is in its very early stages, and can be improved in any number of ways. The most pressing needs right now are
implementing backends for other distributions (Debian, Ubuntu, etc.) and operating systems (Solaris)
testing and using netcf
So, early stages is probably not correct anymore - and only including Solaris is not very inviting to the other UNIX - still out there (AIX).
My interest: cloud-init is looking at using netcf rather than ubuntu "interfaces" (man 5 interfaces). I am working on a "distro" addin for AIX into cloud-init that will make trunk (the current one is very old, and would never merge into truck, so rewriting from scratch where needed and borrowing when possible)
So, will anyone pay attention if I take the time to download and try to build netcf for AIX?
The (outdated) docs are not intended to suggest exclusivity. Reviewers
would consider patches for any other OS on merits of the patch itself.
In the case of AIX, most people don't have access to such a system, so
we'd be relying on the submitter to have done all neccessary testing,
and also to periodically test that later patches to netcf don't
accidentally cause regressions.
IOW, by all means submit patches for AIX support, or any other OS
Regards,
Daniel
OK - restart.

a) git clone ...

b) edit bootstrap to remove indented 'sed' input and remove cp of
bootstrap from gnulib

c) creating "configure" completes

d) current showstopper: readline
* I'll build and install readline; however, is it really necessary (most
applications warn that it is not present - this is actually the first
one I have come across that "requires" it. I was expecting something
that - I thought - normally runs in the background - would not REQUIRE
readline.

Is pkg-config required for run-time, or only for build/packaging?

Michael
Daniel P. Berrange
2016-11-02 12:30:50 UTC
Permalink
Raw Message
Post by Michael Felt
Granted - the web page is from 7 years ago (now that I look more closely).
How can I help ?
netcf is in its very early stages, and can be improved in any number of ways. The most pressing needs right now are
implementing backends for other distributions (Debian, Ubuntu, etc.) and operating systems (Solaris)
testing and using netcf
So, early stages is probably not correct anymore - and only including Solaris is not very inviting to the other UNIX - still out there (AIX).
My interest: cloud-init is looking at using netcf rather than ubuntu "interfaces" (man 5 interfaces). I am working on a "distro" addin for AIX into cloud-init that will make trunk (the current one is very old, and would never merge into truck, so rewriting from scratch where needed and borrowing when possible)
So, will anyone pay attention if I take the time to download and try to build netcf for AIX?
The (outdated) docs are not intended to suggest exclusivity. Reviewers
would consider patches for any other OS on merits of the patch itself.
In the case of AIX, most people don't have access to such a system, so
we'd be relying on the submitter to have done all neccessary testing,
and also to periodically test that later patches to netcf don't
accidentally cause regressions.
IOW, by all means submit patches for AIX support, or any other OS
Regards,
Daniel
OK - restart.
a) git clone ...
b) edit bootstrap to remove indented 'sed' input and remove cp of bootstrap
from gnulib
c) creating "configure" completes
d) current showstopper: readline
* I'll build and install readline; however, is it really necessary (most
applications warn that it is not present - this is actually the first one I
have come across that "requires" it. I was expecting something that - I
thought - normally runs in the background - would not REQUIRE readline.
netcf has a CLI tool that uses readline.
Post by Michael Felt
Is pkg-config required for run-time, or only for build/packaging?
pkg-config is purely a build-time thing.

Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
Loading...