[pacman-dev] [PATCH 0/3] FreeBSD compile fixes
Pacman no longer compiles on FreeBSD (tried with version 8.2).
* FreeBSD ships with libarchive 2.7.0 that has slightly fewer macros
* diskspace.c does not have strict enough #ifdef's (for statfs/statvfs)
* util.c does not include
There is no reason to not support versions of libarchive that lack
ARCHIVE_COMPRESSION_UU. Distributions should work properly without
this.
Signed-off-by: Rémy Oudompheng
On Fri, Apr 1, 2011 at 5:35 PM, Rémy Oudompheng
There is no reason to not support versions of libarchive that lack ARCHIVE_COMPRESSION_UU. Distributions should work properly without this.
Signed-off-by: Rémy Oudompheng
Thanks, applied to maint.
--- lib/libalpm/be_sync.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index ef8517e..c2c62aa 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -197,9 +197,11 @@ static size_t estimate_package_count(struct stat *st, struct archive *archive) case ARCHIVE_COMPRESSION_XZ: per_package = 143; break; +#ifdef ARCHIVE_COMPRESSION_UU case ARCHIVE_COMPRESSION_UU: per_package = 3543; break; +#endif default: /* assume it is at least somewhat compressed */ per_package = 200; -- 1.7.4.2
Signed-off-by: Rémy Oudompheng
On Fri, Apr 1, 2011 at 5:36 PM, Rémy Oudompheng
Signed-off-by: Rémy Oudompheng
Applied to maint.
--- lib/libalpm/util.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 11e6904..430da92 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -34,6 +34,7 @@ #include
#include #include +#include #include #include #include -- 1.7.4.2
Some systems, like FreeBSD might define both statfs
and statvfs: however if statvfs exists whereas getmntinfo()
uses a statfs struct, the current ifdefs would select the wrong
line of code.
Signed-off-by: Rémy Oudompheng
On Fri, Apr 1, 2011 at 5:36 PM, Rémy Oudompheng
Some systems, like FreeBSD might define both statfs and statvfs: however if statvfs exists whereas getmntinfo() uses a statfs struct, the current ifdefs would select the wrong line of code.
Signed-off-by: Rémy Oudompheng
--- acinclude.m4 | 8 ++++++-- lib/libalpm/diskspace.c | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 7309d73..1e51e92 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -115,8 +115,12 @@ AC_DEFUN([FS_STATS_TYPE], extern int getmntinfo (struct statfs **, int); ]], [])], - [fs_stats_cv_type="struct statfs"], - [fs_stats_cv_type="struct statvfs"])], + [fs_stats_cv_type="struct statfs" + AC_DEFINE([HAVE_GETMNTINFO_STATFS], 1, [Define if getmntinfo() uses statfs.]) + ], + [fs_stats_cv_type="struct statvfs" + AC_DEFINE([HAVE_GETMNTINFO_STATVFS], 1, [Define if getmntinfo() uses statvfs.]) + ])], [AC_CHECK_FUNC(getmntent, [fs_stats_cv_type="struct statvfs"])] )] diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 281173a..066107d 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -112,9 +112,9 @@ static alpm_list_t *mount_point_list(void) mp->mount_dir = strdup(fsp->f_mntonname); mp->mount_dir_len = strlen(mp->mount_dir); memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE)); -#if defined HAVE_STRUCT_STATVFS_F_FLAG +#if defined(HAVE_GETMNTINFO_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FLAG) mp->read_only = fsp->f_flag & ST_RDONLY; -#elif defined HAVE_STRUCT_STATFS_F_FLAGS +#elif defined(HAVE_GETMNTINFO_STATFS) && defined(HAVE_STRUCT_STATFS_F_FLAGS) mp->read_only = fsp->f_flags & MNT_RDONLY; #endif
configure.ac:196: warning: AC_CACHE_VAL(fs_stats_cv_type, ...): suspicious presence of an AC_DEFINE in the second argument, where no actions should be taken ../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... acinclude.m4:105: FS_STATS_TYPE is expanded from... configure.ac:196: the top level cd . && /bin/sh /home/dmcgee/projects/pacman-maint/missing --run automake-1.11 --foreign configure.ac:196: warning: AC_CACHE_VAL(fs_stats_cv_type, ...): suspicious presence of an AC_DEFINE in the second argument, where no actions should be taken ../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... acinclude.m4:105: FS_STATS_TYPE is expanded from... configure.ac:196: the top level CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/dmcgee/projects/pacman-maint/missing --run autoconf configure.ac:196: warning: AC_CACHE_VAL(fs_stats_cv_type, ...): suspicious presence of an AC_DEFINE in the second argument, where no actions should be taken ../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... acinclude.m4:105: FS_STATS_TYPE is expanded from... configure.ac:196: the top level
A non-GNU version of awk may not support the (|...) syntax for
an optional group and require '()' to match an empty string.
The (...)? syntax is more appropriate for this usage.
Signed-off-by: Rémy Oudompheng
On Sat, Apr 2, 2011 at 5:31 AM, Rémy Oudompheng
A non-GNU version of awk may not support the (|...) syntax for an optional group and require '()' to match an empty string. The (...)? syntax is more appropriate for this usage.
Signed-off-by: Rémy Oudompheng
--- Problem arises when trying to use makepkg with FreeBSD's awk. I'll let Allan take a look at this and sign off, eval and awk scare me too much. :)
scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 193a185..6d78887 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1275,7 +1275,7 @@ check_sanity() { done
local optdepends_list=() - eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(|#.*)$/' "$BUILDFILE" | \ + eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \ sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//") for i in "${optdepends_list[@]}"; do local pkg=${i%%:*} -- 1.7.4.2
On 03/04/11 04:13, Dan McGee wrote:
On Sat, Apr 2, 2011 at 5:31 AM, Rémy Oudompheng
wrote: A non-GNU version of awk may not support the (|...) syntax for an optional group and require '()' to match an empty string. The (...)? syntax is more appropriate for this usage.
Signed-off-by: Rémy Oudompheng
--- Problem arises when trying to use makepkg with FreeBSD's awk. I'll let Allan take a look at this and sign off, eval and awk scare me too much. :)
Signoff. Allan
participants (3)
-
Allan McRae
-
Dan McGee
-
Rémy Oudompheng