Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Email: noel.ambrose@gmail.com Subject: AC_INIT VERSION info fix + checkpolicy test Date: Fri, 03 Oct 2008 19:42:04 -0400 Jason Tang wrote: > Subject: [autotools][patch] AC_INIT VERSION info fix + checkpolicy test > Date: Tue, 30 Sep 2008 13:17:55 -0400 > From: Vikram Noel Ambrose <noel.ambrose@gmail.com> > To: owner-selinux@tycho.nsa.gov > CC: Joshua Brindle <method@manicmethod.com> > > >> Changelog. >> 1. AC_INIT gets version string from $srcdir/VERSION file >> 2. checkpolicy tests are now being built with --enable-tests >> > > With this patch applied against the current autotools branch on git, the following issues seem to exist: > > libsepol: > 1. Version information is in both configure.ac as well as the VERSION file. Consider having configure.ac generate the VERSION file via a @Version@ substitution in AC_CONFIG_FILE. > 2. Default behavior of libsepol should be to enable_tests. > 3. Syntax of subsequent AM_CONDITIONAL is incorrect; there is a stray right bracket. > 4. Actual library and symlink will be installed to $(LIBDIR). The current model is to place library at /lib and symlink at /usr/lib. > 5. No Makefile.am for tests subdirectory. > > 1,2,3 -> Fixed with attached libsepol-fixes.patch -1- The VERSION file is deleted, it is redundant. From now on the only file that will track the version string will be configure.ac for all packages 4. -> This is an issue for the distro maintainer, not the package maintainer. 5 -> I dont understand how to build the tests for libsepol. Can someone explain the libsepol/tests/Makefile from the master branch to me? I have just stubbed it out for now // make distcheck OK after patch > libselinux: > 1. No Ruby support in configure.ac. > 2. By default, configure.ac will not enable Python. This is because $with_python is set to the default ("no"), but then it does not actually guess the Python site folder despite what the help message claims. > 3. Consider using the ac_pkg_swig package (http://autoconf-archive.cryp.to/ac_pkg_swig.html) to detect if SWIG and Python are installed. > 4. In utils/Makefile.am, instead of $(builddir)/.., this should simply be $(top_builddir). Likewise, consider $(top_srcdir) instead of $(srcdir)/... > 5. In src/Makefile.am, private header files are not included. > 6. Actual library and symlink will be installed to $(LIBDIR). The current model is to place library at /lib and symlink at /usr/lib. > > 1 -> I'm not going to address this one. If someone knows how to use ruby, go ahead and add it. 2 -> You seem to be mixing 2 very different things here. -1- $with_python refers to building code that needs python support and yes, by default, it is set to no. Python is extra functionality, it is not a mandatory dependency, use --with-python=/path/to/include/python2.4 if you want these python features from libselinux -2- The python site-packages folder is indeed guessed if one is not specified, why do you say differently? Did you look at the resulting/guessed site-packages folder after running configure without specifying --with-python-site? libselinux-fixes.patch stops the WARNING message from being displayed if the libpy* cannot be built 3 -> Like I said previously, can you give me the logs from the machine you claim fails the swig checks? 4 -> Fixed with attached libselinux-fixes.patch 5 -> Not sure what you mean 6 -> As in libsepol, this is a distro maintainer policy, not one to be enforced by the build system. // make distcheck OK after patch > libsemanage: > 1. Instead of using AC_SEARCH_LIBS in configure.ac, why not use AC_CHECK_LIB? There are no alternatives to libselinux, libsepol, and libustr, respectively, AC_CHECK_LIB would be simpler. > 2. Defining HAVE_SELINUX_SELINUX_H and its kin are unnecessary. In no case would it be possible to compile libsemanage without having these defines be false. > 3. By default, configure.ac will not enable Python. This is because $with_python is set to the default ("no"). > 4. Consider using the ac_pkg_swig package (http://autoconf-archive.cryp.to/ac_pkg_swig.html) to detect if SWIG and Python are installed. > 5. No Makefile.am for tests subdirectory. > 6. In src/Makefile.am, private header files are not included. > 7. Actual library and symlink will be installed to $(LIBDIR). The current model is to place library at /lib and symlink at /usr/lib. > > > 1,2 -> Fixed with attached libsemanage-fixes.patch 3 -> Yup, that's true. Python is not needed for libsemanage. If you need this extra functionality (ie, libpysemanage), then specify the headers you want to build with. ./configure --with-python=/these/guys/include/python2.4 4 -> Why? Whats wrong with the current test? 5 -> Fixed with attached libsemanage-fixes.patch -1- I have not tested the tests. CUnit header checks may also be needed in configure.ac 6 -> Not sure what you mean 7 -> Again this is a site policy and no concern of the package maintainer. The distro maintainer adjusts these sort of things according to the policies of the distro. // make distcheck OK after patch phew....that was some work... I've attached my quilt series file along with the patches. So that you can apply them in stack, as i had them. Thanks again Jason for taking such a close look at the autotools branch. 5 patches! have fun Josh. Vikram
- Loading branch information
Showing
19 changed files
with
155 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
noinst_PROGRAMS = $(c_extras) | ||
c_extras = | ||
if BUILD_tests | ||
c_extras += dispol dismod | ||
endif | ||
|
||
dispol_LDADD = $(LIBSEPOL_A_PATH) | ||
dismod_LDADD = $(LIBSEPOL_A_PATH) | ||
AM_LDFLAGS = -lselinux |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SUBDIRS = man src include | ||
SUBDIRS = man src include tests |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
noinst_PROGRAMS = $(c_extra) | ||
if BUILD_tests | ||
c_extra = libsemanage-tests | ||
else | ||
c_extra = | ||
endif | ||
libsemanage_tests_SOURCES = libsemanage-tests.c test_semanage_store.c \ | ||
test_utilities.c utilities.c | ||
|
||
libsemanage_tests_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/semanage | ||
libsemanage_tests_LDFLAGS = -Wl,--as-needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SUBDIRS = include man src utils | ||
SUBDIRS = include man src utils tests |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.