[pacman-dev] [PATCH 1/4] Remove Cygwin support
Signed-off-by: Allan McRae <allan@archlinux.org> --- configure.ac | 5 ----- src/pacman/pacman.c | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index faa0792..122f387 100644 --- a/configure.ac +++ b/configure.ac @@ -309,10 +309,6 @@ case "${host_os}" in SIZECMD="stat -f %z" SEDINPLACE="sed -i \"\"" ;; - cygwin*) - host_os_cygwin=yes - AC_DEFINE([CYGWIN], [1], [Define if host OS is cygwin]) - ;; darwin*) host_os_darwin=yes INODECMD="/usr/bin/stat -f '%i %n'" @@ -324,7 +320,6 @@ case "${host_os}" in ;; esac -AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes") AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] ) AC_SUBST(INODECMD) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 29a489b..e3293a0 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -758,8 +758,7 @@ int main(int argc, char *argv[]) size_t i; struct sigaction new_action, old_action; const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV }; -#if defined(HAVE_GETEUID) && !defined(CYGWIN) - /* geteuid undefined in CYGWIN */ +#if defined(HAVE_GETEUID) uid_t myuid = geteuid(); #endif @@ -881,7 +880,7 @@ int main(int argc, char *argv[]) config->logmask &= ~ALPM_LOG_WARNING; } -#if defined(HAVE_GETEUID) && !defined(CYGWIN) +#if defined(HAVE_GETEUID) /* check if we have sufficient permission for the requested operation */ if(myuid > 0 && needs_root()) { pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); -- 1.8.0.2
The geteuid function is defeined in POSIX and we will not support any operating systems without it. Signed-off-by: Allan McRae <allan@archlinux.org> --- configure.ac | 2 +- src/pacman/pacman.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 122f387..8ec0eab 100644 --- a/configure.ac +++ b/configure.ac @@ -279,7 +279,7 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_MKTIME AC_FUNC_STRCOLL -AC_CHECK_FUNCS([dup2 getcwd geteuid getmntinfo gettimeofday memmove memset \ +AC_CHECK_FUNCS([dup2 getcwd getmntinfo gettimeofday memmove memset \ mkdir realpath regcomp rmdir setenv setlocale strcasecmp \ strchr strcspn strdup strerror strndup strrchr strsep strstr \ strtol swprintf tcflush wcwidth uname]) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index e3293a0..e29cfc2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -758,9 +758,7 @@ int main(int argc, char *argv[]) size_t i; struct sigaction new_action, old_action; const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV }; -#if defined(HAVE_GETEUID) uid_t myuid = geteuid(); -#endif /* Set signal handlers */ /* Set up the structure to specify the new action. */ @@ -880,13 +878,11 @@ int main(int argc, char *argv[]) config->logmask &= ~ALPM_LOG_WARNING; } -#if defined(HAVE_GETEUID) /* check if we have sufficient permission for the requested operation */ if(myuid > 0 && needs_root()) { pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); cleanup(EXIT_FAILURE); } -#endif if(config->verbose > 0) { alpm_list_t *j; -- 1.8.0.2
On Sun, Dec 16, 2012 at 7:36 AM, Allan McRae <allan@archlinux.org> wrote:
The geteuid function is defeined in POSIX and we will not support any operating systems without it.
typo: defeined -> defined
Signed-off-by: Allan McRae <allan@archlinux.org> --- configure.ac | 2 +- src/pacman/pacman.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac index 122f387..8ec0eab 100644 --- a/configure.ac +++ b/configure.ac @@ -279,7 +279,7 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_MKTIME AC_FUNC_STRCOLL -AC_CHECK_FUNCS([dup2 getcwd geteuid getmntinfo gettimeofday memmove memset \ +AC_CHECK_FUNCS([dup2 getcwd getmntinfo gettimeofday memmove memset \ mkdir realpath regcomp rmdir setenv setlocale strcasecmp \ strchr strcspn strdup strerror strndup strrchr strsep strstr \ strtol swprintf tcflush wcwidth uname]) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index e3293a0..e29cfc2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -758,9 +758,7 @@ int main(int argc, char *argv[]) size_t i; struct sigaction new_action, old_action; const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV }; -#if defined(HAVE_GETEUID) uid_t myuid = geteuid(); -#endif
/* Set signal handlers */ /* Set up the structure to specify the new action. */ @@ -880,13 +878,11 @@ int main(int argc, char *argv[]) config->logmask &= ~ALPM_LOG_WARNING; }
-#if defined(HAVE_GETEUID) /* check if we have sufficient permission for the requested operation */ if(myuid > 0 && needs_root()) { pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); cleanup(EXIT_FAILURE); } -#endif
if(config->verbose > 0) { alpm_list_t *j; -- 1.8.0.2
Features such as splitting debuging symbols and libdeps in makepkg assume we are dealing with ELF binaries. However, we have at least one developer who wishes to still compile pacman on OSX so we can not drop support completely. Instead post a warning at the end of the configure output about makepkg's limitations. Signed-off-by: Allan McRae <allan@archlinux.org> --- Dan wants to be able to compile on OSX, so we keep makepkg doing the basics rather then removing darwin support altogether. configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 8ec0eab..8ea4d53 100644 --- a/configure.ac +++ b/configure.ac @@ -520,4 +520,9 @@ ${PACKAGE_NAME}: use git version : ${wantgitver} " +if test "x$host_os_darwin" = "xyes"; then + AC_MSG_WARN([pacman does support systems using non-ELF binaries. Some features of makepkg will not work.]) +fi + + # vim:set ts=2 sw=2 noet: -- 1.8.0.2
participants (2)
-
Allan McRae
-
Eric Bélanger