Browse Source

some important code signing and cleanup changes

Kevin Bradley 11 months ago
parent
commit
060ff7aaf0
1 changed files with 9 additions and 13 deletions
  1. 9 13
      the_memo2.sh

+ 9 - 13
the_memo2.sh

@@ -38,7 +38,7 @@ while test $# -gt 0; do
             LOG_VERBOSE="verbose"
             shift
             ;;
-        -V|--verify|)
+        -V|--verify)
             VERIFY="true"
             #echo "Working without verifying packages..."
             #echo "YOU BETTER KNOW WHAT YOU'RE DOING"
@@ -1297,11 +1297,11 @@ buildDpkg() {
         export CXXFLAGS=$CFLAGS
         export LDFLAGS="-isysroot $SDK_PATH -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ -arch $ARCH"
         if [[ $LOG_VERBOSE == "verbose"* ]]; then
-            ./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking  PERL_LIBDIR='$(prefix)/lib/'  --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/usr/etc" | tee "${LOG_FILE}"
+            ./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking  PERL_LIBDIR='$(prefix)/lib/'  --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/etc" | tee "${LOG_FILE}"
             EC=$(grep "configure: error:" -i "${LOG_FILE}" -c)
             checkStatus $PKG_NAME $EC "false"
         else
-            (./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking  PERL_LIBDIR='$(prefix)/lib/'  --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/usr/etc" > "${LOG_FILE}" 2>&1)
+            (./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking  PERL_LIBDIR='$(prefix)/lib/'  --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/etc" > "${LOG_FILE}" 2>&1)
             if [[ $OPEN_LOG == "true" ]]; then
                 open "${LOG_FILE}"
             fi
@@ -1331,12 +1331,6 @@ buildDpkg() {
         codesign "$SKEL_PREFIX/$ROOT_PREFIX/bin/update-alternatives"
         echo "appletvos-arm64" >> "$SKEL_PREFIX/var/lib/dpkg/arch"
         echo "darwin-arm64" >> "$SKEL_PREFIX/var/lib/dpkg/arch"
-
-        #Get rid of cross-compile artifacts
-        sed -i -- "s|$SKEL_PREFIX||g" "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/lib/libdpkg.la"
-        sed -i -- "s|$SKEL_PREFIX||g" "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/lib/pkgconfig/libdpkg.pc"
-        rm -rf "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/lib/libdpkg.la--"
-        rm -rf "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/lib/pkgconfig/libdpkg.pc--"
         cd "$BUILD_ROOT"
     fi
 }
@@ -1417,10 +1411,10 @@ buildGcrypt() {
         export HOST="arm"
         buildProduct $PKG_NAME "--with-libgpg-error-prefix=$SKEL_PREFIX/$ROOT_PREFIX/"
         export HOST="aarch64"
-        codesign "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/bin/dumpsexp"
-        codesign "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/bin/hmac256"
-        codesign "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/bin/mpicalc"
-        codesign "$BUILD_ROOT/$WORKING_DIR/deb/$ROOT_PREFIX/lib/libgcrypt.20.dylib"
+        codesign "$SKEL_PREFIX/$ROOT_PREFIX/bin/dumpsexp"
+        codesign "$SKEL_PREFIX/$ROOT_PREFIX/bin/hmac256"
+        codesign "$SKEL_PREFIX/$ROOT_PREFIX/bin/mpicalc"
+        codesign "$SKEL_PREFIX/$ROOT_PREFIX/lib/libgcrypt.20.dylib"
     fi
 }
 
@@ -1635,6 +1629,8 @@ buildAPT() {
             fi
         fi
         sed -i -- "s|#define COMMON_ARCH \"darwin-amd64\"|#define COMMON_ARCH \"$PLATFORM_LOWER-$ARCH\"|" include/config.h
+        pwd
+        sed -i -- "s|_error->Warning(_(\"No sandbox user|//_error->Warning(_(\"No sandbox user|" ../apt-pkg/acquire.cc
             if [[ $LOG_VERBOSE == "verbose"* ]]; then
                 make -j8 DESTDIR="$SKEL_PREFIX" install | tee "${LOG_FILE}"
                 EC=$(grep "fatal error:" -i "${LOG_FILE}" -c)