pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel



Module Name:    pkgsrc
Committed By:   nia
Date:           Wed Nov 15 15:23:13 UTC 2023

Modified Files:
        pkgsrc/devel: Makefile
Added Files:
        pkgsrc/devel/macports-legacy-support: DESCR Makefile buildlink3.mk
            distinfo
        pkgsrc/devel/macports-legacy-support/patches: patch-include_dirent.h
            patch-src_fdopendir.c patch-test_do__test__faccessat__setuid
            patch-test_test__faccessat.c

Log Message:
Add devel/macports-legacy-support

Installs wrapper headers and library functions that add common
functions missing in various older OSX releases to bring them
approximately up to current expected standards.

This package differs from libnbcompat in that it includes
Mac OS X specific APIs.


To generate a diff of this commit:
cvs rdiff -u -r1.4129 -r1.4130 pkgsrc/devel/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/macports-legacy-support/DESCR \
    pkgsrc/devel/macports-legacy-support/Makefile \
    pkgsrc/devel/macports-legacy-support/buildlink3.mk \
    pkgsrc/devel/macports-legacy-support/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/macports-legacy-support/patches/patch-include_dirent.h \
    pkgsrc/devel/macports-legacy-support/patches/patch-src_fdopendir.c \
    pkgsrc/devel/macports-legacy-support/patches/patch-test_do__test__faccessat__setuid \
    pkgsrc/devel/macports-legacy-support/patches/patch-test_test__faccessat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/Makefile
diff -u pkgsrc/devel/Makefile:1.4129 pkgsrc/devel/Makefile:1.4130
--- pkgsrc/devel/Makefile:1.4129        Wed Nov 15 00:56:00 2023
+++ pkgsrc/devel/Makefile       Wed Nov 15 15:23:12 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4129 2023/11/15 00:56:00 wiz Exp $
+# $NetBSD: Makefile,v 1.4130 2023/11/15 15:23:12 nia Exp $
 #
 
 COMMENT=       Development utilities
@@ -1097,6 +1097,7 @@ SUBDIR+=  lwp
 SUBDIR+=       lxqt-build-tools
 SUBDIR+=       m17n-lib
 SUBDIR+=       m4
+SUBDIR+=       macports-legacy-support
 SUBDIR+=       mad-flute
 SUBDIR+=       makedepend
 SUBDIR+=       makedepf90

Added files:

Index: pkgsrc/devel/macports-legacy-support/DESCR
diff -u /dev/null pkgsrc/devel/macports-legacy-support/DESCR:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/DESCR  Wed Nov 15 15:23:13 2023
@@ -0,0 +1,6 @@
+Installs wrapper headers and library functions that add common
+functions missing in various older OSX releases to bring them
+approximately up to current expected standards.
+
+This package differs from libnbcompat in that it includes
+Mac OS X specific APIs.
Index: pkgsrc/devel/macports-legacy-support/Makefile
diff -u /dev/null pkgsrc/devel/macports-legacy-support/Makefile:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/Makefile       Wed Nov 15 15:23:13 2023
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+DISTNAME=      macports-legacy-support-1.1.1
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=macports/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/macports/macports-legacy-support
+COMMENT=       Support for missing functions in legacy Mac OS X
+LICENSE=       apple-public-source-license AND mit
+
+USE_TOOLS+=    gmake
+
+MAKE_JOBS_SAFE=        no
+
+# Disable building the wrapped libSystem, through pkgsrc we can link with
+# legacy support explicitly.
+BUILD_TARGET=  dlib slib
+INSTALL_TARGET=        install-dlib install-slib install-headers
+
+ONLY_FOR_PLATFORM+=    Darwin-*-*
+
+# PLIST depends on OS version.
+GENERATE_PLIST+= \
+       cd ${DESTDIR}${PREFIX} && \
+       ${FIND} lib include \( -type f -o -type l \) -print | ${SORT};
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS_VERSION} < 100500
+CWRAPPERS_APPEND.cc+=  -isystem ${WRKSRC}/tiger_only/include
+.endif
+
+pre-configure:
+       ${RM} ${WRKSRC}/src/macports_legacy_atexit.c
+
+post-install:
+.if ${OPSYS_VERSION} < 100500
+       ${CP} -Rp ${WRKSRC}/tiger_only/include/* ${DESTDIR}${PREFIX}/include/LegacySupport
+.endif
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/macports-legacy-support/buildlink3.mk
diff -u /dev/null pkgsrc/devel/macports-legacy-support/buildlink3.mk:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/buildlink3.mk  Wed Nov 15 15:23:13 2023
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+BUILDLINK_TREE+=       macports-legacy-support
+
+.if !defined(MACPORTS_LEGACY_SUPPORT_BUILDLINK3_MK)
+MACPORTS_LEGACY_SUPPORT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.macports-legacy-support+=        macports-legacy-support>=1.1.1
+BUILDLINK_PKGSRCDIR.macports-legacy-support?=  ../../devel/macports-legacy-support
+BUILDLINK_INCDIRS.macports-legacy-support+=    include/LegacySupport
+.endif # MACPORTS_LEGACY_SUPPORT_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -macports-legacy-support
Index: pkgsrc/devel/macports-legacy-support/distinfo
diff -u /dev/null pkgsrc/devel/macports-legacy-support/distinfo:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/distinfo       Wed Nov 15 15:23:13 2023
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+BLAKE2s (macports-legacy-support-1.1.1.tar.gz) = c5bee6e20f1ad45d17cc9c3b0649d5918cd40c4a41444b4f0c7c6c5800320e3c
+SHA512 (macports-legacy-support-1.1.1.tar.gz) = 5bb7108ed23a17ab13e5774211cffdc79ad8c050ce6501d7f5c61e7131f053ebfdb4389e63c68d4fc7da9b08692d6564177747685cb6694f471b1dc026f446a2
+Size (macports-legacy-support-1.1.1.tar.gz) = 72248 bytes
+SHA1 (patch-include_dirent.h) = 965b0d3e44d401b906badf26979411524bf23372
+SHA1 (patch-src_fdopendir.c) = 5cbfa0a7a5b98646c5f57e5965ecd67de904c123
+SHA1 (patch-test_do__test__faccessat__setuid) = b59e8a3c2b25604b187d50d489fe27600a893cc9
+SHA1 (patch-test_test__faccessat.c) = efd8945a452ac34fd3e2bcc434f93abfcafeba27

Index: pkgsrc/devel/macports-legacy-support/patches/patch-include_dirent.h
diff -u /dev/null pkgsrc/devel/macports-legacy-support/patches/patch-include_dirent.h:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/patches/patch-include_dirent.h Wed Nov 15 15:23:13 2023
@@ -0,0 +1,133 @@
+$NetBSD: patch-include_dirent.h,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+Fix 10.4 support.
+https://github.com/macports/macports-legacy-support/pull/69
+
+--- include/dirent.h.orig      2023-09-15 08:59:52.000000000 +0000
++++ include/dirent.h
+@@ -22,64 +22,9 @@
+ /* MP support header */
+ #include "MacportsLegacySupport.h"
+ 
+-/* Alter function names declared by <dirent.h> to get them out of the way */
+-/* Note: These renamed names are non-functional */
+-#if __MP_LEGACY_SUPPORT_FDOPENDIR__
+-#define opendir __mpls_renamed_libc_opendir
+-#define closedir __mpls_renamed_libc_closedir
+-#define readdir __mpls_renamed_libc_readdir
+-#define readdir_r __mpls_renamed_libc_readdir_r
+-#define rewinddir __mpls_renamed_libc_rewinddir
+-#define seekdir __mpls_renamed_libc_seekdir
+-#define telldir __mpls_renamed_libc_telldir
+-#endif
+-
+ /* Include the primary system dirent.h */
+ #include_next <dirent.h>
+ 
+-/* Remove the above macros to make way for the declarations below */
+-#if __MP_LEGACY_SUPPORT_FDOPENDIR__
+-#undef opendir
+-#undef closedir
+-#undef readdir
+-#undef readdir_r
+-#undef rewinddir
+-#undef seekdir
+-#undef telldir
+-
+-#ifndef __MPLS_ALIAS
+-#  define __MPLS_ALIAS(sym) __DARWIN_ALIAS(sym)
+-#endif
+-
+-/* Fallback to __DARWIN_ALIAS if the other variants are not defined (?) */
+-/* Note: I don't know if this makes sense */
+-#ifndef __MPLS_ALIAS_I
+-#  ifdef __DARWIN_ALIAS_I
+-#    define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS_I(sym)
+-#  else
+-#    define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS(sym)
+-#  endif
+-#endif
+-
+-#ifndef __MPLS_INODE64
+-#  ifdef __DARWIN_INODE64
+-#    define __MPLS_INODE64(sym) __DARWIN_INODE64(sym)
+-#  else
+-#    define __MPLS_INODE64(sym) __DARWIN_ALIAS(sym)
+-#  endif
+-#endif
+-
+-/* Declare alternative names for the underlying functions for use by the wrappers */
+-/* Note: Each __MPLS_ALIAS* macro must match the corresponding __DARWIN_ALIAS* in system <dirent.h> */
+-DIR *__mpls_libc_opendir(const char *name) __MPLS_ALIAS_I(opendir);
+-int __mpls_libc_closedir(DIR *dir) __MPLS_ALIAS(closedir);
+-struct dirent *__mpls_libc_readdir(DIR *dir) __MPLS_INODE64(readdir);
+-int __mpls_libc_readdir_r(DIR *dir, struct dirent *entry, struct dirent **result) __MPLS_INODE64(readdir_r);
+-void __mpls_libc_rewinddir(DIR *dir) __MPLS_ALIAS_I(rewinddir);
+-void __mpls_libc_seekdir(DIR *dir, long loc) __MPLS_ALIAS_I(seekdir);
+-long __mpls_libc_telldir(DIR *dir) __MPLS_ALIAS_I(telldir);
+-#endif
+-
+ /* fdopendir */
+ #if __MP_LEGACY_SUPPORT_FDOPENDIR__
+ 
+@@ -89,14 +34,17 @@ struct __MPLS_DIR {
+     DIR *__mpls_dir;
+     int __mpls_dirfd;
+ };
+-
+ #define DIR __MPLS_DIR
+ 
+ __MP__BEGIN_DECLS
+ 
+-extern DIR *fdopendir(int fd) __MPLS_ALIAS_I(fdopendir);
++#ifndef __DARWIN_ALIAS_I
++extern DIR *fdopendir(int fd) __DARWIN_ALIAS(fdopendir);
++#else
++extern DIR *fdopendir(int fd) __DARWIN_ALIAS_I(fdopendir);
++#endif
+ 
+-/* Wrapper functions to support fdopendir */
++/* Wrapper functions/macros to support fdopendir */
+ extern DIR *__mpls_opendir(const char *name);
+ extern int __mpls_closedir(DIR *dir);
+ extern struct dirent *__mpls_readdir(DIR *dir);
+@@ -106,14 +54,31 @@ extern void __mpls_seekdir(DIR *dir, lon
+ extern long __mpls_telldir(DIR *dir);
+ extern int __mpls_dirfd(DIR *dir);
+ 
+-/* Define the standard names to refer to LegacySupport's wrappers (via asm renaming) */
+-DIR *opendir(const char *name) __asm("___mpls_opendir");
+-int closedir(DIR *dir) __asm("___mpls_closedir");
+-struct dirent *readdir(DIR *dir) __asm("___mpls_readdir");
+-int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result) __asm("___mpls_readdir_r");
+-void rewinddir(DIR *dir) __asm("___mpls_rewinddir");
+-void seekdir(DIR *dir, long loc) __asm("___mpls_seekdir");
+-long telldir(DIR *dir) __asm("___mpls_telldir");
++#define opendir __mpls_opendir
++/*
++** Add params to closedir to avoid apparently triggering a mysterious
++** problem encountered when testing capnproto. But only do this in C++
++** for capnproto's benefit. It is unknown why this makes any difference.
++** It really shouldn't. It makes no sense. It's probably unrelated.
++** WARNING: This means that it's not possible to take the address of
++** closedir in C++ (which has also been seen in the wild (dyld)).
++** But it is possible in C code. This is pragmatic(?), but not ideal.
++*/
++#if defined(__cplusplus)
++#define closedir(dir) __mpls_closedir(dir)
++#else
++#define closedir __mpls_closedir
++#endif
++#define readdir __mpls_readdir
++#define readdir_r __mpls_readdir_r
++#define rewinddir __mpls_rewinddir
++/* Add params to seekdir in C++ to not clash with type std::ios_base::seekdir */
++#if defined(__cplusplus)
++#define seekdir(dir, loc) __mpls_seekdir((dir), (loc))
++#else
++#define seekdir __mpls_seekdir
++#endif
++#define telldir __mpls_telldir
+ 
+ #ifndef __MP_LEGACY_SUPPORT_NO_DIRFD_MACRO
+ #undef dirfd
Index: pkgsrc/devel/macports-legacy-support/patches/patch-src_fdopendir.c
diff -u /dev/null pkgsrc/devel/macports-legacy-support/patches/patch-src_fdopendir.c:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/patches/patch-src_fdopendir.c  Wed Nov 15 15:23:13 2023
@@ -0,0 +1,109 @@
+$NetBSD: patch-src_fdopendir.c,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+Fix 10.4 support.
+https://github.com/macports/macports-legacy-support/pull/69
+
+--- src/fdopendir.c.orig       2023-09-15 08:59:52.000000000 +0000
++++ src/fdopendir.c
+@@ -29,6 +29,13 @@
+ #include <sys/errno.h>
+ 
+ #undef DIR
++#undef opendir
++#undef closedir
++#undef readdir
++#undef readdir_r
++#undef rewinddir
++#undef seekdir
++#undef telldir
+ 
+ 
+ /*
+@@ -52,7 +59,7 @@ __MPLS_DIR *fdopendir(int dirfd) {
+ 
+     /* Open the supplied directory safely */
+ 
+-    DIR *dir = _ATCALL(dirfd, ".", NULL, __mpls_libc_opendir("."));
++    DIR *dir = _ATCALL(dirfd, ".", NULL, opendir("."));
+     if (!dir)
+         return 0;
+ 
+@@ -60,7 +67,7 @@ __MPLS_DIR *fdopendir(int dirfd) {
+ 
+     __MPLS_DIR *mplsdir = malloc(sizeof(*mplsdir));
+     if (!mplsdir) {
+-        (void)__mpls_libc_closedir(dir);
++        (void)closedir(dir);
+         errno = ENOMEM;
+         return 0;
+     }
+@@ -80,13 +87,13 @@ __MPLS_DIR *fdopendir(int dirfd) {
+ 
+ __MPLS_DIR *__mpls_opendir(const char *name) {
+ 
+-    DIR *dir = __mpls_libc_opendir(name);
++    DIR *dir = opendir(name);
+     if (!dir)
+         return 0;
+ 
+     __MPLS_DIR *mplsdir = malloc(sizeof(*mplsdir));
+     if (!mplsdir) {
+-        (void)__mpls_libc_closedir(dir);
++        (void)closedir(dir);
+         errno = ENOMEM;
+         return 0;
+     }
+@@ -112,7 +119,7 @@ int __mpls_closedir(__MPLS_DIR *mplsdir)
+         return -1;
+     }
+ 
+-    int rc = __mpls_libc_closedir(mplsdir->__mpls_dir);
++    int rc = closedir(mplsdir->__mpls_dir);
+ 
+     if (mplsdir->__mpls_dirfd != -1)
+         PROTECT_ERRNO(close(mplsdir->__mpls_dirfd));
+@@ -127,7 +134,7 @@ int __mpls_closedir(__MPLS_DIR *mplsdir)
+  */
+ 
+ struct dirent *__mpls_readdir(__MPLS_DIR *mplsdir) {
+-    return __mpls_libc_readdir(mplsdir->__mpls_dir);
++    return readdir(mplsdir->__mpls_dir);
+ }
+ 
+ /*
+@@ -135,7 +142,7 @@ struct dirent *__mpls_readdir(__MPLS_DIR
+  */
+ 
+ int __mpls_readdir_r(__MPLS_DIR *mplsdir, struct dirent *entry, struct dirent **result) {
+-    return __mpls_libc_readdir_r(mplsdir->__mpls_dir, entry, result);
++    return readdir_r(mplsdir->__mpls_dir, entry, result);
+ }
+ 
+ /*
+@@ -143,7 +150,7 @@ int __mpls_readdir_r(__MPLS_DIR *mplsdir
+  */
+ 
+ void __mpls_rewinddir(__MPLS_DIR *mplsdir) {
+-    __mpls_libc_rewinddir(mplsdir->__mpls_dir);
++    rewinddir(mplsdir->__mpls_dir);
+ }
+ 
+ /*
+@@ -151,7 +158,7 @@ void __mpls_rewinddir(__MPLS_DIR *mplsdi
+  */
+ 
+ void __mpls_seekdir(__MPLS_DIR *mplsdir, long loc) {
+-    __mpls_libc_seekdir(mplsdir->__mpls_dir, loc);
++    seekdir(mplsdir->__mpls_dir, loc);
+ }
+ 
+ /*
+@@ -159,7 +166,7 @@ void __mpls_seekdir(__MPLS_DIR *mplsdir,
+  */
+ 
+ long __mpls_telldir(__MPLS_DIR *mplsdir) {
+-    return __mpls_libc_telldir(mplsdir->__mpls_dir);
++    return telldir(mplsdir->__mpls_dir);
+ }
+ 
+ /*
Index: pkgsrc/devel/macports-legacy-support/patches/patch-test_do__test__faccessat__setuid
diff -u /dev/null pkgsrc/devel/macports-legacy-support/patches/patch-test_do__test__faccessat__setuid:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/patches/patch-test_do__test__faccessat__setuid Wed Nov 15 15:23:13 2023
@@ -0,0 +1,130 @@
+$NetBSD: patch-test_do__test__faccessat__setuid,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+Fix 10.4 support.
+https://github.com/macports/macports-legacy-support/pull/69
+
+--- test/do_test_faccessat_setuid.orig 2023-09-15 08:59:52.000000000 +0000
++++ test/do_test_faccessat_setuid
+@@ -16,6 +16,9 @@
+ 
+ # When run as root, test faccessat() properly
+ 
++# Note: On 10.4, this doesn't work because setreuid/setregid are incorrect.
++# They set effective uid/gid, but not real uid/gid.
++
+ if [ "$(whoami)" != root ]
+ then
+       echo 'Run "sudo make test_faccessat_setuid" to test faccessat properly'
+@@ -60,24 +63,32 @@ clean()
+       rm -rf $s $t
+ }
+ 
+-get_group()
++get_group() # Get the user's primary group name
+ {
+       echo $(id $1 | sed -E 's/^.*gid=-?[0-9]+\(//; s/\).*$//')
+ }
+ 
+-get_supp_group()
++get_supp_group() # Get the user's first supplementary group name, if any
+ {
+-      echo $(id $1 | sed -E 's/^.*groups=-?[0-9]+\([^)]+\),-?[0-9]+\(//; s/\).*$//')
++      echo $(id $1 | sed -E '
++              s/^uid=-?[0-9]+\([^)]+\) //;
++              s/^gid=-?[0-9]+\([^)]+\) //;
++              s/^groups=-?[0-9]+\([^)]+\)//;
++              s/^,//;
++              s/,.*$//;
++              s/^-?[0-9]+\(//;
++              s/\)$//
++      ')
+ }
+ 
+-uucp_group=$(get_group _uucp)
++daemon_group=$(get_group daemon)
+ nobody_group=$(get_group nobody)
+ nobody_supp_group=$(get_supp_group nobody)
+ 
+-# Run normal test as setuid _uucp (to test AT_EACCESS)
++# Run normal test as setuid daemon (to test AT_EACCESS)
+ 
+-echo setuid _uucp
+-setup _uucp $uucp_group 4755
++echo setuid daemon
++setup daemon $daemon_group 4755
+ check sudo -u nobody $s
+ clean
+ 
+@@ -91,20 +102,20 @@ clean
+ # Test different numbers of leading dirs and leading dirs with different
+ # permissions (to test leading executable check)
+ 
+-setup _uucp $uucp_group 4755
+-setid _uucp $uucp_group 644 $t/f touch
+-setid _uucp $uucp_group 755 $t/d1 mkdir
+-setid _uucp $uucp_group 000 $t/d2 mkdir
+-setid _uucp $uucp_group 644 $t/d1/f touch
+-setid _uucp $uucp_group 644 $t/d2/f touch
++setup daemon $daemon_group 4755
++setid daemon $daemon_group 644 $t/f touch
++setid daemon $daemon_group 755 $t/d1 mkdir
++setid daemon $daemon_group 000 $t/d2 mkdir
++setid daemon $daemon_group 644 $t/d1/f touch
++setid daemon $daemon_group 644 $t/d2/f touch
+ 
+-echo leading dirs ruid=nobody euid=_uucp
++echo leading dirs ruid=nobody euid=daemon
+ check sudo -u nobody $s test test/ \
+       $t $t/ $t/f \
+       $t/d1 $t/d1/ $t/d1/f \
+       $t/d2 $t/d2/ $t/d2/f
+ 
+-echo leading dirs ruid=root euid=_uucp
++echo leading dirs ruid=root euid=daemon
+ check $s test test/ \
+       $t $t/ $t/f \
+       $t/d1 $t/d1/ $t/d1/f \
+@@ -152,32 +163,35 @@ checkperms nobody $nobody_group 755
+ # (to test when uid/gid don't match)
+ 
+ echo perm diff user
+-checkperms _uucp $uucp_group 755
++checkperms daemon $daemon_group 755
+ 
+ # Test lots of permissions without setuid/setgid with different user's files
+ # but the same group (to test when uid doesn't match but gid does match)
+ 
+ echo perm same group
+-checkperms _uucp $nobody_group 755
++checkperms daemon $nobody_group 755
+ 
+ # Test lots of permissions without setuid/setgid with different user's files
+ # but same supplementary group (to test when uid/gid don't match but a
+ # supplementary group matches)
+ 
+-echo perm same supp group
+-checkperms _uucp $nobody_supp_group 755
++if [ -n "$nobody_supp_group" ]
++then
++      echo perm same supp group
++      checkperms daemon $nobody_supp_group 755
++fi
+ 
+ # Test lots of permissions with setuid with different user's files
+ # (to test setuid)
+ 
+-echo perm setuid _uucp
+-checkperms _uucp $uucp_group 4755
++echo perm setuid daemon
++checkperms daemon $daemon_group 4755
+ 
+ # Test lots of permissions with setgid with different user's files
+ # (to test setgid)
+ 
+-echo perm setgid _uucp
+-checkperms _uucp $uucp_group 2755
++echo perm setgid daemon
++checkperms daemon $daemon_group 2755
+ 
+ exit $fail
+ 
Index: pkgsrc/devel/macports-legacy-support/patches/patch-test_test__faccessat.c
diff -u /dev/null pkgsrc/devel/macports-legacy-support/patches/patch-test_test__faccessat.c:1.1
--- /dev/null   Wed Nov 15 15:23:13 2023
+++ pkgsrc/devel/macports-legacy-support/patches/patch-test_test__faccessat.c   Wed Nov 15 15:23:13 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-test_test__faccessat.c,v 1.1 2023/11/15 15:23:13 nia Exp $
+
+Fix 10.4 support.
+https://github.com/macports/macports-legacy-support/pull/69
+
+--- test/test_faccessat.c.orig 2023-09-15 08:59:52.000000000 +0000
++++ test/test_faccessat.c
+@@ -351,8 +351,8 @@ int main(int ac, char **av)
+       if (check_pathname_rc == -1)
+               TEST(check_pathname_errno == EFAULT, "check pathname errno wrong (should be EFAULT)", check_pathname_errno)
+       TEST(check_dirfd_rc == -1, "check dirfd failed", 0)
+-      if (check_dirfd_rc == -1)
+-              TEST(check_dirfd_errno == EBADF, "check dirfd errno wrong (should be EBADF)", check_dirfd_errno)
++      if (check_dirfd_rc == -1) // On 10.14 this is EBADF. On 10.4 it's ENOENT
++              TEST(check_dirfd_errno == EBADF || check_dirfd_errno == ENOENT, "check dirfd errno wrong (should be EBADF or ENOENT)", check_dirfd_errno)
+       TEST(check_mode_rc == -1, "check mode failed", 0) // Apple doesn't check this argument - failure is ENOENT/EPERM
+       //if (check_mode_rc == -1)
+       //      TEST(check_mode_errno == EINVAL, "check mode errno wrong (should be EINVAL)", check_mode_errno)



Home | Main Index | Thread Index | Old Index