mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-21 20:39:46 +01:00
David Oberhollenzer
858779e42c
The goal is to transform a package file to a squashfs image. The mksquashfs utility is a PITA with all kinds of idiotic not-thought-through corner cases (e.g. the way "pseudo file definitions" have been tacked on, the inabillity to set UID/GID for / *AND* have files not owned by root, the way xattrs are handled, .....). It would be preferable to fix mksquashfs itself, but the source code itself is a horrid, unmaintained garbage pile. Its easier to write a small utility instead that can turn a pkg file into a squashfs image in a way that propperly treats file permissions and ownership, and is deterministic (i.e. reproducable). The utility currently generates an uncompressed squashfs image that unsquashfs can unpack, but the kernel refuses the mount. The exact problem still needs to be determined. Furthermore, compression has to be implemented and some cleanup shoul be done. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
61 lines
1.7 KiB
Text
61 lines
1.7 KiB
Text
AC_PREREQ([2.60])
|
|
AC_INIT([pkgtool], [0.3], [goliath@infraroot.at], pkgtool)
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
|
|
AM_SILENT_RULES([yes])
|
|
AC_PROG_CC
|
|
AC_PROG_CC_C99
|
|
AC_PROG_RANLIB
|
|
AC_PROG_INSTALL
|
|
|
|
m4_ifndef([PKG_PROG_PKG_CONFIG],
|
|
[m4_fatal([Could not locate the pkg-config autoconf
|
|
macros. These are usually located in /usr/share/aclocal/pkg.m4.
|
|
If your macros are in a different location, try setting the
|
|
environment variable AL_OPTS="-I/other/macro/dir" before running
|
|
./autogen.sh or autoreconf again. Make sure pkg-config is installed.])])
|
|
PKG_PROG_PKG_CONFIG
|
|
|
|
UL_WARN_ADD([-Wall])
|
|
UL_WARN_ADD([-Wextra])
|
|
UL_WARN_ADD([-Wunused])
|
|
UL_WARN_ADD([-Wmissing-prototypes])
|
|
UL_WARN_ADD([-Wmissing-declarations])
|
|
UL_WARN_ADD([-Wwrite-strings])
|
|
UL_WARN_ADD([-Wjump-misses-init])
|
|
UL_WARN_ADD([-Wuninitialized])
|
|
UL_WARN_ADD([-Winit-self])
|
|
UL_WARN_ADD([-Wlogical-op])
|
|
UL_WARN_ADD([-Wunused-but-set-parameter])
|
|
UL_WARN_ADD([-Wunused-but-set-variable])
|
|
UL_WARN_ADD([-Wunused-parameter])
|
|
UL_WARN_ADD([-Wunused-result])
|
|
UL_WARN_ADD([-Wunused-variable])
|
|
UL_WARN_ADD([-Wduplicated-cond])
|
|
UL_WARN_ADD([-Wduplicated-branches])
|
|
UL_WARN_ADD([-Wrestrict])
|
|
UL_WARN_ADD([-Wnull-dereference])
|
|
UL_WARN_ADD([-pedantic])
|
|
|
|
AC_SUBST([WARN_CFLAGS])
|
|
|
|
##### search for dependencies #####
|
|
|
|
have_zlib="no"
|
|
have_lzma="no"
|
|
|
|
PKG_CHECK_MODULES(ZLIB, [zlib], [have_zlib="yes"], [])
|
|
PKG_CHECK_MODULES(XZ, [liblzma >= 5.0.0], [have_lzma="yes"], [])
|
|
|
|
AM_CONDITIONAL([WITH_ZLIB], [test "x$have_zlib" == "xyes"])
|
|
AM_CONDITIONAL([WITH_LZMA], [test "x$have_lzma" == "xyes"])
|
|
|
|
AM_CONDITIONAL([HAVE_LIBBSD], [true])
|
|
PKG_CHECK_MODULES(LIBBSD, [libbsd], [],
|
|
[AC_MSG_ERROR([missing libbsd])])
|
|
|
|
##### generate output #####
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
AC_OUTPUT([Makefile])
|