Skip to contentSkip to conversation

On TARGET_LINUX define _GNU_SOURCE if not defined

PATCH Applied David Sommerseth 5 participants 26 messages Mar 10, 2010 – Mar 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 On TARGET_LINUX define _GNU_SOURCE if not defined

From: David Sommerseth <[email protected]...>

This is to include peercred support on hosts where _GNU_SOURCE is not defined by default. This issue has been found on Gentoo with glibc-2.8.

The solution was discussed on the IRC meeting March 4, 2010 in #openvpn-discussions.
<http://thread.gmane.org/gmane.network.openvpn.devel/3242>

---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
syshead.h +4 -0
index 6e81103..fe6ae4b 100644
@@ -85,6 +85,10 @@
 #endif
 
 #ifdef HAVE_SYS_SOCKET_H
+# if defined(TARGET_LINUX) && !defined(_GNU_SOURCE)
+   /* needed for peercred support on glibc-2.8 */
+#  define _GNU_SOURCE
+# endif
 #include <sys/socket.h>
 #endif
 
Signature · 1 line
1.6.6.1
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · David Sommerseth

From: David Sommerseth <[email protected]...>

This is to include peercred support on hosts where _GNU_SOURCE is not defined by default. This issue has been found on Gentoo with glibc-2.8.

Quoted 9 lines

The solution was discussed on the IRC meeting March 4, 2010 in #openvpn-discussions.
<http://thread.gmane.org/gmane.network.openvpn.devel/3242>

---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

This is the "Gentoo patch", modified to be more generic. In the IRC meeting I said I would try to make this change only in socket.c, but that was not possible.

TARGET_LINUX is defined in config.h, and not available before syshead.h is included, as that is a wrapper which either includes config.h or config-win32.h, depending on OS. Further defining _GNU_SOURCE after including syshead.h would not make any difference at all, as it needs to be defined before sys/socket.h is loaded.

Therefore, I'd prefer a second review on this patch.

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuXjQsACgkQDC186MBRfrorFQCePuxnsCBq3pIcPJ3mG1zZO2Y9 4FAAniyfy82e0vJhep0TUvQeI+7nzZsr
=bTNV
-----END PGP SIGNATURE-----

#2 lore raw

This is not the way to do it.

Use AC_USE_SYSTEM_EXTENSIONS in autoconf, which detects libc settings.

The current autoconf shape is poor, long ago I offered James to rewrite it but he refused. I only made it partially work for cross compile.

There are a lot of none standard/best practice stuff there.

I did fix automake stuff... :)

Alon.

Quoted 56 lines · David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · David Sommerseth

From: David Sommerseth <[email protected]...>

This is to include peercred support on hosts where _GNU_SOURCE is not defined by default.  This issue has been found on Gentoo with glibc-2.8.

Quoted 9 lines

The solution was discussed on the IRC meeting March 4, 2010 in #openvpn-discussions.
<http://thread.gmane.org/gmane.network.openvpn.devel/3242>

---
 syshead.h |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)

This is the "Gentoo patch", modified to be more generic.  In the IRC meeting I said I would try to make this change only in socket.c, but that was not possible.

TARGET_LINUX is defined in config.h, and not available before syshead.h is included, as that is a wrapper which either includes config.h or config-win32.h, depending on OS.  Further defining _GNU_SOURCE after including syshead.h would not make any difference at all, as it needs to be defined before sys/socket.h is loaded.

Therefore, I'd prefer a second review on this patch.

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuXjQsACgkQDC186MBRfrorFQCePuxnsCBq3pIcPJ3mG1zZO2Y9 4FAAniyfy82e0vJhep0TUvQeI+7nzZsr
=bTNV
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Alon Bar-Lev

This is not the way to do it.

Use AC_USE_SYSTEM_EXTENSIONS in autoconf, which detects libc settings.

The current autoconf shape is poor, long ago I offered James to rewrite it but he refused. I only made it partially work for cross compile.

There are a lot of none standard/best practice stuff there.

I did fix automake stuff... :)

Thanks a lot for the feedback! I am interested in getting this sorted out. I'm setting up a RHEL4 box which will be used to check the lower-end of the autoconf version, which is James' concern about modifying the current autoconf scripts.

Trust me, I want to fix this issue and get it right. but I'm no big autoconf expert so all helpful advices are most welcome!

I'm willing to accept patches with updates as long as it don't break the oldest version OpenVPN need to support (autotools/autoconf v2.59). If it can be built an old RHEL4.6 installation, it's good enough for James, according to the last meeting.

We have also this other update hanging around on the mailing list (cross compile fixes) which I've not had time to look at yet, which also will do some updates here as well.

kind regards,

David Sommerseth

Quoted 29 lines
Quoted 1 line · David Sommerseth
Quoted 9 lines · David Sommerseth
Quoted 9 lines
Quoted 9 lines

From: David Sommerseth <[email protected]...>

This is to include peercred support on hosts where _GNU_SOURCE is not defined by default. This issue has been found on Gentoo with glibc-2.8.

The solution was discussed on the IRC meeting March 4, 2010 in #openvpn-discussions.
<http://thread.gmane.org/gmane.network.openvpn.devel/3242>

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

This is the "Gentoo patch", modified to be more generic. In the IRC meeting I said I would try to make this change only in socket.c, but that was not possible.

TARGET_LINUX is defined in config.h, and not available before syshead.h is included, as that is a wrapper which either includes config.h or config-win32.h, depending on OS. Further defining _GNU_SOURCE after including syshead.h would not make any difference at all, as it needs to be defined before sys/socket.h is loaded.

Quoted 8 lines

Therefore, I'd prefer a second review on this patch.

kind regards,

David Sommerseth

Quoted 1 line

-
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuXze8ACgkQDC186MBRfrpnMwCgprwvSqOD2aponWxp/Li8/Mg2 kJEAn3T/6k/PNQmbctTuB9ZJ8rO6kFWW
=dMKb
-----END PGP SIGNATURE-----

#4 lore raw
Quoted 4 lines · David Sommerseth

I'm willing to accept patches with updates as long as it don't break the oldest version OpenVPN need to support (autotools/autoconf v2.59).  If it can be built an old RHEL4.6 installation, it's good enough for James, according to the last meeting.

This is the root cause of the mistake.
You don't have any dependency in the versions of autoconf/automake/libtool at target machine.
These tools are used at the packager machine in order to generate whatever needed in order to successfully compile on target machine. So there is no need to support old versions of these tools. The decent versions are >=autoconf-2.60 >=automake-1.10 >=libtool-1.5.26

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Alon Bar-Lev
Quoted 4 lines · David Sommerseth

I'm willing to accept patches with updates as long as it don't break the oldest version OpenVPN need to support (autotools/autoconf v2.59). If it can be built an old RHEL4.6 installation, it's good enough for James, according to the last meeting.

Quoted 8 lines

This is the root cause of the mistake.
You don't have any dependency in the versions of autoconf/automake/libtool at target machine.
These tools are used at the packager machine in order to generate whatever needed in order to successfully compile on target machine. So there is no need to support old versions of these tools. The decent versions are >=autoconf-2.60 >=automake-1.10 >=libtool-1.5.26

Well, I wish it was as easy as just to update everything to decent versions of autotools. But the fact is that it's a requirement to be able to build OpenVPN on RHEL4.6. I am not in a position to move that requirement now.

[[email protected]... ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 6) [[email protected]... ~]# rpm -q autoconf automake libtool autoconf-2.59-5
automake-1.9.2-3
libtool-1.5.6-4.EL4.2

If it really makes sense to support building on a ~2 year old RHEL4 base installation, that's a completely different question. But that's the reality I need to work within right now.

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX04IACgkQDC186MBRfrockACfai1otkAjPZZ46Pcdfd99a+VT Z90An20IVCpEFeHGRTaKq1H5YswtUUm0
=ukuX
-----END PGP SIGNATURE-----

#6 lore raw

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist

Now, you transfer the tarball to users, the old redhat computer is one of them. The tarball will work WITHOUT ANY AUTOCONF/AUTOMAKE/LIBTOOL installed.

I use older environments as (2) such as solaris-8.

If you don't believe me try it out.

Alon.

Quoted 51 lines · David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Alon Bar-Lev
Quoted 4 lines · David Sommerseth

I'm willing to accept patches with updates as long as it don't break the oldest version OpenVPN need to support (autotools/autoconf v2.59).  If it can be built an old RHEL4.6 installation, it's good enough for James, according to the last meeting.

Quoted 8 lines

This is the root cause of the mistake.
You don't have any dependency in the versions of autoconf/automake/libtool at target machine.
These tools are used at the packager machine in order to generate whatever needed in order to successfully compile on target machine. So there is no need to support old versions of these tools. The decent versions are >=autoconf-2.60 >=automake-1.10 >=libtool-1.5.26

Well, I wish it was as easy as just to update everything to decent versions of autotools.  But the fact is that it's a requirement to be able to build OpenVPN on RHEL4.6.  I am not in a position to move that requirement now.

[[email protected]... ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 6) [[email protected]... ~]# rpm -q autoconf automake libtool autoconf-2.59-5
automake-1.9.2-3
libtool-1.5.6-4.EL4.2

If it really makes sense to support building on a ~2 year old RHEL4 base installation, that's a completely different question.  But that's the reality I need to work within right now.

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX04IACgkQDC186MBRfrockACfai1otkAjPZZ46Pcdfd99a+VT Z90An20IVCpEFeHGRTaKq1H5YswtUUm0
=ukuX
-----END PGP SIGNATURE-----

#7 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 14 lines · Alon Bar-Lev

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist
Quoted 7 lines

Now, you transfer the tarball to users, the old redhat computer is one of them. The tarball will work WITHOUT ANY AUTOCONF/AUTOMAKE/LIBTOOL installed.

I use older environments as (2) such as solaris-8.

If you don't believe me try it out.

Thank you! I do believe you. Now it's a lot clearer for me, as this was the detail I was missing. I'll bring this up on the meeting on tomorrow.

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX1+gACgkQDC186MBRfrrbwACfRVnBrmDFOqx94o3i1yfSxSjg sS0AoKe9pVqohgwLj8HwkwWcj1KJRe2d
=OUUn
-----END PGP SIGNATURE-----

#8 lore raw
In reply to Alon Bar-Lev
Quoted 15 lines · Alon Bar-Lev

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist
Quoted 6 lines

Now, you transfer the tarball to users, the old redhat computer is one
of them. The tarball will work WITHOUT ANY AUTOCONF/AUTOMAKE/LIBTOOL installed.

I use older environments as (2) such as solaris-8.

And you don't generally want to be running ./configure from within a rpm specfile, so the same is true of using the rpm tools:

On machine 2 you download the tarball, the specfile, (and any patches the rpm maintainer wants to include in the packaged version) and run the rpm build tools on the spec file to build a binary rpm.

Note that http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
says:

"Once the %prep script has gotten everything ready for the build, the % build script is usually somewhat anti-climactic — normally invoking make, maybe a configuration script, and little else.

...

Either the commands required to build the software are simple (such as a single make command), or they are so unique that a macro wouldn't make it easier to write the script. "

In other words ./configure is not expected to be run under normal circumstances.

The whole point of autoconf is to produce something that can be made into a tarball that only requires "make; make install" to compile and install.

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#9 lore raw
Quoted 6 lines · Karl O. Pinc

In other words ./configure is not expected to be run under normal circumstances.

The whole point of autoconf is to produce something that can be made into a tarball that only requires "make; make install" to compile and install.

You do not understand the tools. Nor the common use of them.

You *MUST* run ./configure when compiling from sources.

Sorry,
Alon.

#10 lore raw
Quoted 11 lines · Alon Bar-Lev
Quoted 6 lines · Karl O. Pinc

In other words ./configure is not expected to be run under normal circumstances.

The whole point of autoconf is to produce something that can be made into a tarball that only requires "make; make install" to compile and install.

You do not understand the tools. Nor the common use of them.

You *MUST* run ./configure when compiling from sources.

You are right, on all of the above. I don't use them every day.

But, you _don't_ have to run ./configure every time. You yourself wrote that you do the ./configure on the _new_ machine, and then move the tarball to the old machine and recompile. This is often the situation, or at least I found so, when making rpm spec files.

You are quite correct in pointing out that ./configure should be able to be run on the old machine, which means that it can be executed within the build portion of the spec file.

Thanks for the correction and please tell me if I'm wrong again.

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#11 lore raw

Karl O. Pinc wrote on 2010-03-10:

Quoted 9 lines · Alon Bar-Lev
Quoted 8 lines · Karl O. Pinc
Quoted 6 lines

In other words ./configure is not expected to be run under normal circumstances.

The whole point of autoconf is to produce something that can be made into a tarball that only requires "make; make install" to compile and install.

Quoted 8 lines
Quoted 3 lines

You do not understand the tools. Nor the common use of them.

You *MUST* run ./configure when compiling from sources.

You are right, on all of the above. I don't use them every day.

But, you _don't_ have to run ./configure every time. You

You do. Either explicitly, or after updating the source ("git pull") because the Makefiles figure that you need to and run config.status twice (once with options to re-trigger configure, then to regenerate its AC_OUTPUT files).

Quoted 4 lines

yourself wrote that you do the ./configure on the _new_ machine, and then move the tarball to the old machine and recompile. This is often the situation, or at least I found so, when making rpm spec files.

You need to run ./configure on the _new_ (distributor's) machine so that there is a "Makefile" that you can run "make dist" (to generate a tarball) or "make distdir" (to rsync the dist' directory), and for no other purpose. None of the outputs so generated make it to the tarball. If they did, that would be a bug in Makefile.am or in automake (the latter I've never seen, or at least I don't recall having seen those).

Quoted 4 lines

You are quite correct in pointing out that ./configure should be able to be run on the old machine, which means that it can be executed within the build portion of the spec file.

It's a requisite, but run in the RPM's "prep" section rather than "build". Most distros today would have %configure macros to feed their distribution default options in (directory layout, CFLAGS for hardening, and thereabouts).

HTH

Signature · 1 line
Matthias Andree
#12 lore raw
Quoted 5 lines · Matthias Andree

Karl O. Pinc wrote on 2010-03-10:

Quoted 1 line

But, you _don't_ have to run ./configure every time. You

You do.

Yes. Thanks. I don't know what I was thinking.

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#13 lore raw
In reply to Karl O. Pinc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 21 lines · Karl O. Pinc
Quoted 20 lines · Alon Bar-Lev

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist

Now, you transfer the tarball to users, the old redhat computer is one
of them. The tarball will work WITHOUT ANY AUTOCONF/AUTOMAKE/LIBTOOL installed.

Quoted 4 lines
Quoted 1 line

I use older environments as (2) such as solaris-8.

And you don't generally want to be running ./configure from within a rpm specfile, so the same is true of using the rpm tools:

This is not correct. In fact, you often use the %configure macro in %build, which does call ./configure. The only "allowed" exception from not calling %configure is when ./configure is not a native autotools generated configure script.

Quoted 11 lines

On machine 2 you download the tarball, the specfile, (and any patches the rpm maintainer wants to include in the packaged version) and run the rpm build tools on the spec file to build a binary rpm.

Note that http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
says:

"Once the %prep script has gotten everything ready for the build, the % build script is usually somewhat anti-climactic — normally invoking make, maybe a configuration script, and little else.

It's %build which need to do the %configure. All patching must happen on %prep. But you are right, if there are applied patches which updates some of the autotools generated files, I believe autotools need to be run again. Right, Alon?

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX3OoACgkQDC186MBRfrrMpgCfa6qtBOfumt0Z2AIRP6G7Eaem TEoAnRVqqeU2mFs8XbmiL9ry3NR6ETDJ
=IY4/
-----END PGP SIGNATURE-----

#14 lore raw
Quoted 28 lines · David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 12 lines · Karl O. Pinc
Quoted 11 lines · Alon Bar-Lev

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

Quoted 7 lines
Quoted 7 lines

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist

Now, you transfer the tarball to users, the old redhat computer is one
of them. The tarball will work WITHOUT ANY

AUTOCONF/AUTOMAKE/LIBTOOL

Quoted 4 lines
Quoted 3 lines

installed.

I use older environments as (2) such as solaris-8.

Quoted 8 lines
Quoted 2 lines

And you don't generally want to be running ./configure from within a rpm specfile, so the same is true of using the rpm tools:

This is not correct. In fact, you often use the %configure macro in %build, which does call ./configure. The only "allowed" exception from
not calling %configure is when ./configure is not a native autotools generated configure script.

Ok. I'm totally wrong here.

But how is it then that Alon does not run ./configure on machine 2 above?

Quoted 14 lines
Quoted 10 lines

On machine 2 you download the tarball, the specfile, (and any patches the rpm maintainer wants to include in the packaged version) and run the rpm build tools on the spec file to build a binary rpm.

Note that http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
says:

"Once the %prep script has gotten everything ready for the build,

the %

Quoted 2 lines

build script is usually somewhat anti-climactic — normally invoking make, maybe a configuration script, and little else.

Quoted 6 lines

It's %build which need to do the %configure. All patching must happen
on %prep. But you are right, if there are applied patches which updates
some of the autotools generated files, I believe autotools need to be run again. Right, Alon?

Nothing should patch the autotools generated files, just the autotools source files. Right?

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#15 lore raw
Quoted 2 lines · Karl O. Pinc

But how is it then that Alon does not run ./configure on machine 2 above?

You do...
On the target machine:

tar -xf @TARBALL@
cd @TOP@
./configure
make install

You must run configure in order to generate Makefile in autoconf environment.

Quoted 2 lines

Nothing should patch the autotools generated files, just the autotools source files.  Right?

If you patch autoconf/automake stuff, you *MUST* add autoconf/automake dependency to your package, so you can regenerate the files. It is much simpler to patch also the generated files and avoid this dependency. But it is packager's call.

Please understand, in order to build a package you *DO NOT* need autoconf/automake/libtool installed *AT ALL*.

Best case is to approach upstream to issue a fix release in this case.

Alon.

#16 lore raw

Alon Bar-Lev wrote on 2010-03-10:

Quoted 4 lines

If you patch autoconf/automake stuff, you *MUST* add autoconf/automake dependency to your package, so you can regenerate the files. It is much simpler to patch also the generated files and avoid this dependency. But it is packager's call.

For distributions and packaging, hacking the outputs is often simpler unless the input had been expanded and/or copied around, because it waives and additional build requisites. It sometimes happens that there are distribution-specific changes that aren't fit for upstream inclusion. The FreeBSD ports repository is full of such stuff, and I'd usually patch outputs there -- and for the majority of packages, the patches for the output files aren't any less stable than those for input files would be, but they are so much easier on the end users.

Quoted 2 lines

Please understand, in order to build a package you *DO NOT* need autoconf/automake/libtool installed *AT ALL*.

Careful with the wording here, as "build a package" is ambiguous:
(1) build a tarball distribution package (openvpn-2.1.X.tar.gz)
(2) build a openvpn.rpm or .deb from the tarball.

I'll reword: In order to build the binaries from a tarball generated with "make dist" (what the release manager uploads and the end user usually downloads from sourceforge or other distribution sites), no autoconf/automake/libtool are required.

Signature · 1 line
Matthias Andree
#17 lore raw
In reply to Karl O. Pinc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 38 lines · Karl O. Pinc
Quoted 28 lines · David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 12 lines · Karl O. Pinc
Quoted 11 lines · Alon Bar-Lev

I will try to explain again.

You have two roles of environments:

1. Developer/packager workstation.

2. Target environment.

For example, 1 would be my computer, and 2 would be the old redhat computer.

Quoted 7 lines
Quoted 7 lines

You go to (1) and do:

$ autoreconf -ivf
$ ./configure && make dist

Now, you transfer the tarball to users, the old redhat computer is one
of them. The tarball will work WITHOUT ANY

AUTOCONF/AUTOMAKE/LIBTOOL

Quoted 4 lines
Quoted 3 lines

installed.

I use older environments as (2) such as solaris-8.

Quoted 8 lines
Quoted 2 lines

And you don't generally want to be running ./configure from within a rpm specfile, so the same is true of using the rpm tools:

This is not correct. In fact, you often use the %configure macro in %build, which does call ./configure. The only "allowed" exception from
not calling %configure is when ./configure is not a native autotools generated configure script.

Quoted 4 lines

Ok. I'm totally wrong here.

But how is it then that Alon does not run ./configure on machine 2 above?

The fact is that I believe he does run ./configure on all machines. Autotools just generates a set up files which is not depending on anything else than basic *nix tools, like shell, grep, sed, etc, etc.

But to be able to make the tarball via 'make dist', you need to run ./configure first to have a Makefile which knows what the 'dist' rule is. Then the 'dist' rule wraps it all together into a autotools independent tarball, including a prepared ./configure script.

Quoted 20 lines
Quoted 13 lines
Quoted 9 lines

On machine 2 you download the tarball, the specfile, (and any patches the rpm maintainer wants to include in the packaged version) and run the rpm build tools on the spec file to build a binary rpm.

Note that http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
says:

"Once the %prep script has gotten everything ready for the build,

the %

Quoted 2 lines

build script is usually somewhat anti-climactic — normally invoking make, maybe a configuration script, and little else.

Quoted 6 lines

It's %build which need to do the %configure. All patching must happen
on %prep. But you are right, if there are applied patches which updates
some of the autotools generated files, I believe autotools need to be run again. Right, Alon?

Quoted 2 lines

Nothing should patch the autotools generated files, just the autotools source files. Right?

Correct, that was my mistake. I initially meant autotools source files.
But I believe autotools can detect if some of the generated files have
been modified and it will then want to run 'autoreconf' automatically again. I believe I've seen this behaviour some times.

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX4HMACgkQDC186MBRfrox/wCeIzBmcdNaamPjobF0qXX5+Frs YJgAn11CqkBVYLTzsUS3ygGP576WzqSl
=4qX5
-----END PGP SIGNATURE-----

#18 lore raw
Quoted 5 lines · David Sommerseth
Quoted 2 lines

Nothing should patch the autotools generated files, just the autotools source files. Right?

Correct, that was my mistake. I initially meant autotools source files.

As Alon pointed out it would be less intrusive to patch the files that were generated by autotools, if needed when creating a package.

Especially for long term support I'd strongly prefer that, over patching the autotools source files.

//Peter

#19 lore raw
In reply to David Sommerseth
Quoted 6 lines · David Sommerseth
Quoted 2 lines

But how is it then that Alon does not run ./configure on machine 2 above?

The fact is that I believe he does run ./configure on all machines. Autotools just generates a set up files which is not depending on anything else than basic *nix tools, like shell, grep, sed, etc, etc.

Right. This I've always gotten.

Quoted 5 lines

But to be able to make the tarball via 'make dist', you need to run ./configure first to have a Makefile which knows what the 'dist' rule is. Then the 'dist' rule wraps it all together into a autotools independent tarball, including a prepared ./configure script.

Ok. Thanks. This is what threw me off. I was mistaking this for executing ./configure on the dist tarball.

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#20 lore raw
In reply to David Sommerseth
Quoted 1 line · David Sommerseth

it's a requirement to be able to build OpenVPN on RHEL4.6.

As Alon explained, building is not the problem. autotools are used when preparing git source for build. This is done for every release, so that there is a ready-made configure script included in the tarball.

When building a release (or snapshot, if there are any) from such a tarball then autoconf is no longer relevant, it was run only when the tarball was created.

RHEL4.6 can easily build a release that was prepared using the most recent autoconf. That RHEL4.6 system doesn't need autoconf installed at all.

The only way autoconf on that RHEL4.6 would be relevant is if those RHEL4.6 systems strictly need to build directly from git source, as opposed to building from a prepared tarball. Is that the case?

//Peter

#21 lore raw
Quoted 2 lines · Peter Stuge

RHEL4.6 can easily build a release that was prepared using the most recent autoconf.

In fact, I would suggest that using the newest autotools when creating the package makes it *more* likely to build effortlessly on older systems.

//Peter

#22 lore raw
In reply to Peter Stuge

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 12 lines · Peter Stuge
Quoted 1 line · David Sommerseth

it's a requirement to be able to build OpenVPN on RHEL4.6.

As Alon explained, building is not the problem. autotools are used when preparing git source for build. This is done for every release, so that there is a ready-made configure script included in the tarball.

When building a release (or snapshot, if there are any) from such a tarball then autoconf is no longer relevant, it was run only when the tarball was created.

Quoted 7 lines

RHEL4.6 can easily build a release that was prepared using the most recent autoconf. That RHEL4.6 system doesn't need autoconf installed at all.

The only way autoconf on that RHEL4.6 would be relevant is if those RHEL4.6 systems strictly need to build directly from git source, as opposed to building from a prepared tarball. Is that the case?

I will get that clarified on the meeting tomorrow, as this might be a scenario. But to be honest, I have troubles seeing that people want to do active development on RHEL4.6, at least do changes which require changing autotools files or pulling down SVN or git trees.

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuX2PUACgkQDC186MBRfrpN2QCgn5/NRRY9Je63J6Lgx1LJVjWg WC0AoIDf6ZCBo3ulh3K1JakEnL8u+zXa
=adty
-----END PGP SIGNATURE-----

#23 lore raw
Quoted 11 lines · David Sommerseth
Quoted 3 lines · Peter Stuge

The only way autoconf on that RHEL4.6 would be relevant is if those RHEL4.6 systems strictly need to build directly from git source, as opposed to building from a prepared tarball. Is that the case?

I will get that clarified on the meeting tomorrow, as this might be a scenario. But to be honest, I have troubles seeing that people want to
do active development on RHEL4.6, at least do changes which require changing autotools files or pulling down SVN or git trees.

And, to reiterate, applying patches within an rpm spec file is normal, expected, and part of the
rpm design so a certain level of "development" is supported.

Karl <[email protected]...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

#24 lore raw
Quoted 3 lines · Karl O. Pinc

And, to reiterate, applying patches within an rpm spec file is normal, expected, and part of the
rpm design so a certain level of "development" is supported.

Should also not be a problem, since those patches are likely to start from a known release tarball, so autoconf still isn't needed.

//Peter

author Applied
#25 lore raw
In reply to David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · David Sommerseth

From: David Sommerseth <[email protected]...>

This is to include peercred support on hosts where _GNU_SOURCE is not defined by default. This issue has been found on Gentoo with glibc-2.8.

Quoted 9 lines

The solution was discussed on the IRC meeting March 4, 2010 in #openvpn-discussions.
<http://thread.gmane.org/gmane.network.openvpn.devel/3242>

---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Applied to bugfix2.1, merged into allmerged.
Commit 081ec9314eaa75769b2351a7b1b05315a4c77560

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuf/VYACgkQDC186MBRfroWSwCgrODOR77AeLjg61macOc+dBfa DosAoLB7szhiMQpqB8MvxNirwkPyzhJQ
=6+5n
-----END PGP SIGNATURE-----