From 3795d57d3054ff3803ec33f148f3217a8806ec22 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 28 Feb 2022 00:08:38 +0200 Subject: [PATCH] PKG package for macOS --- .gitignore | 4 + Makefile | 4 + installer/macos/.gitignore | 4 + installer/macos/README.md | 9 + installer/macos/nimbus-pkg.pkgproj | 955 ++++++++++++++++++ .../nimbus-pkg.xcodeproj/project.pbxproj | 334 ++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcschemes/nimbus-pkg.xcscheme | 67 ++ .../nimbus-pkg/Base.lproj/MyInstallerPane.xib | 118 +++ installer/macos/nimbus-pkg/Info.plist | 28 + .../macos/nimbus-pkg/InstallerSections.plist | 16 + installer/macos/nimbus-pkg/MyInstallerPane.h | 19 + installer/macos/nimbus-pkg/MyInstallerPane.m | 65 ++ installer/macos/nimbus-pkg/ReadMe.html | 1 + .../nimbus-pkg/en.lproj/InfoPlist.strings | 2 + .../nimbus-pkg/en.lproj/Localizable.strings | 3 + installer/macos/nimbus-pkg/launchservice.sh | 8 + installer/macos/nimbus-pkg/license.html | 155 +++ installer/macos/nimbus-pkg/nimbus.plist | 23 + installer/macos/nimbus-pkg/postinstall.sh | 30 + 22 files changed, 1868 insertions(+) create mode 100644 installer/macos/.gitignore create mode 100644 installer/macos/README.md create mode 100644 installer/macos/nimbus-pkg.pkgproj create mode 100644 installer/macos/nimbus-pkg.xcodeproj/project.pbxproj create mode 100644 installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 installer/macos/nimbus-pkg.xcodeproj/xcshareddata/xcschemes/nimbus-pkg.xcscheme create mode 100644 installer/macos/nimbus-pkg/Base.lproj/MyInstallerPane.xib create mode 100644 installer/macos/nimbus-pkg/Info.plist create mode 100644 installer/macos/nimbus-pkg/InstallerSections.plist create mode 100644 installer/macos/nimbus-pkg/MyInstallerPane.h create mode 100644 installer/macos/nimbus-pkg/MyInstallerPane.m create mode 100644 installer/macos/nimbus-pkg/ReadMe.html create mode 100644 installer/macos/nimbus-pkg/en.lproj/InfoPlist.strings create mode 100644 installer/macos/nimbus-pkg/en.lproj/Localizable.strings create mode 100755 installer/macos/nimbus-pkg/launchservice.sh create mode 100644 installer/macos/nimbus-pkg/license.html create mode 100644 installer/macos/nimbus-pkg/nimbus.plist create mode 100755 installer/macos/nimbus-pkg/postinstall.sh diff --git a/.gitignore b/.gitignore index ec72cdfb0..ea1660403 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,7 @@ build/ /benchmark_results /.update.timestamp resttest0_data + +# OSX +.DS_Store +**/.DS_Store diff --git a/Makefile b/Makefile index 048113f21..7a7be4ab0 100644 --- a/Makefile +++ b/Makefile @@ -475,6 +475,10 @@ nimbus-msi: | nimbus_beacon_node "$(WIX)/bin/candle" -ext WixUIExtension -ext WixUtilExtension installer/windows/*.wxs -o installer/windows/obj/ "$(WIX)/bin/light" -ext WixUIExtension -ext WixUtilExtension -cultures:"en-us;en-uk;neutral" installer/windows/obj/*.wixobj -out build/NimbusBeaconNode.msi +nimbus-pkg: | nimbus_beacon_node + xcodebuild -project installer/macos/nimbus-pkg.xcodeproj -scheme nimbus-pkg build + packagesbuild installer/macos/nimbus-pkg.pkgproj + ctail: | build deps mkdir -p vendor/.nimble/bin/ + $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim diff --git a/installer/macos/.gitignore b/installer/macos/.gitignore new file mode 100644 index 000000000..b539956fc --- /dev/null +++ b/installer/macos/.gitignore @@ -0,0 +1,4 @@ +./build/ +./DerivedData/ +nimbus-pkg.xcodeproj/project.xcworkspace/xcuserdata + diff --git a/installer/macos/README.md b/installer/macos/README.md new file mode 100644 index 000000000..3cf50fa6a --- /dev/null +++ b/installer/macos/README.md @@ -0,0 +1,9 @@ +This directory contains a set of files used for building a PKG macOS +installation package for the Nimbus beacon node. + +To build the package, you'll need XCode and and the "Packages" tool freeware +developer tool from: +http://s.sudre.free.fr/Software/Packages/about.html + +Make sure the `packagesbuild` binary is in your PATH and run `make nimbus-pkg` +from the root of this repo. diff --git a/installer/macos/nimbus-pkg.pkgproj b/installer/macos/nimbus-pkg.pkgproj new file mode 100644 index 000000000..a5e0c3ae1 --- /dev/null +++ b/installer/macos/nimbus-pkg.pkgproj @@ -0,0 +1,955 @@ + + + + + PACKAGES + + + MUST-CLOSE-APPLICATION-ITEMS + + MUST-CLOSE-APPLICATIONS + + PACKAGE_FILES + + DEFAULT_INSTALL_LOCATION + / + HIERARCHY + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Applications + PATH_TYPE + 0 + PERMISSIONS + 509 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Application Support + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Documentation + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Filesystems + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Frameworks + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Input Methods + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Internet Plug-Ins + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchAgents + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + nimbus-pkg/nimbus.plist + PATH_TYPE + 1 + PERMISSIONS + 420 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + LaunchDaemons + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PreferencePanes + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Preferences + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 80 + PATH + Printers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PrivilegedHelperTools + PATH_TYPE + 0 + PERMISSIONS + 1005 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickLook + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickTime + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Screen Savers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + nimbus-pkg/launchservice.sh + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + ../../build/nimbus_beacon_node + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + ../../scripts + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + Nimbus + PATH_TYPE + 2 + PERMISSIONS + 509 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + Scripts + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Services + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Widgets + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Shared + PATH_TYPE + 0 + PERMISSIONS + 1023 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Users + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + / + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + PAYLOAD_TYPE + 0 + PRESERVE_EXTENDED_ATTRIBUTES + + SHOW_INVISIBLE + + SPLIT_FORKS + + TREAT_MISSING_FILES_AS_WARNING + + VERSION + 5 + + PACKAGE_SCRIPTS + + POSTINSTALL_PATH + + PATH + nimbus-pkg/postinstall.sh + PATH_TYPE + 1 + + PREINSTALL_PATH + + PATH_TYPE + 0 + + RESOURCES + + + PACKAGE_SETTINGS + + AUTHENTICATION + 1 + CONCLUSION_ACTION + 0 + FOLLOW_SYMBOLIC_LINKS + + IDENTIFIER + com.mygreatcompany.pkg.nimbus-pkg + LOCATION + 0 + NAME + nimbus-pkg + OVERWRITE_PERMISSIONS + + PAYLOAD_SIZE + -1 + REFERENCE_PATH + + RELOCATABLE + + USE_HFS+_COMPRESSION + + VERSION + 1.0 + + TYPE + 0 + UUID + 89A64D1F-DCD9-43D6-8A16-32E2C1DE1F65 + + + PROJECT + + PROJECT_COMMENTS + + NOTES + + + + PROJECT_PRESENTATION + + BACKGROUND + + APPAREANCES + + DARK_AQUA + + LIGHT_AQUA + + + SHARED_SETTINGS_FOR_ALL_APPAREANCES + + + INSTALLATION TYPE + + HIERARCHIES + + INSTALLER + + LIST + + + CHILDREN + + DESCRIPTION + + OPTIONS + + HIDDEN + + STATE + 1 + + PACKAGE_UUID + 89A64D1F-DCD9-43D6-8A16-32E2C1DE1F65 + TITLE + + TYPE + 0 + UUID + 2C42F8D7-6A1D-47B7-9A3A-A65193F4A870 + + + REMOVED + + + + MODE + 0 + + INSTALLATION_STEPS + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewIntroductionController + INSTALLER_PLUGIN + Introduction + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewReadMeController + INSTALLER_PLUGIN + ReadMe + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewLicenseController + INSTALLER_PLUGIN + License + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewInstallerPluginController + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_INSTALLERPLUGIN_PATH + + PATH + ../build/Release/nimbus-pkg.bundle + PATH_TYPE + 1 + + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewDestinationSelectController + INSTALLER_PLUGIN + TargetSelect + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewInstallationTypeController + INSTALLER_PLUGIN + PackageSelection + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewInstallationController + INSTALLER_PLUGIN + Install + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewSummaryController + INSTALLER_PLUGIN + Summary + LIST_TITLE_KEY + InstallerSectionTitle + + + INTRODUCTION + + LOCALIZATIONS + + + LICENSE + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + + PATH + nimbus-pkg/license.html + PATH_TYPE + 1 + + + + MODE + 0 + + README + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + + PATH + nimbus-pkg/ReadMe.html + PATH_TYPE + 1 + + + + + SUMMARY + + LOCALIZATIONS + + + TITLE + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + nimbus-pkg + + + + + PROJECT_REQUIREMENTS + + LIST + + RESOURCES + + ROOT_VOLUME_ONLY + + + PROJECT_SETTINGS + + BUILD_FORMAT + 1 + BUILD_PATH + + PATH + build + PATH_TYPE + 1 + + EXCLUDED_FILES + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + .DS_Store + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove .DS_Store files + PROXY_TOOLTIP + Remove ".DS_Store" files created by the Finder. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + .pbdevelopment + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove .pbdevelopment files + PROXY_TOOLTIP + Remove ".pbdevelopment" files created by ProjectBuilder or Xcode. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + CVS + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .cvsignore + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + .cvspass + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + .svn + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .git + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .gitignore + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove SCM metadata + PROXY_TOOLTIP + Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + classes.nib + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + designable.db + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + info.nib + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Optimize nib files + PROXY_TOOLTIP + Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + Resources Disabled + TYPE + 1 + + + PROTECTED + + PROXY_NAME + Remove Resources Disabled folders + PROXY_TOOLTIP + Remove "Resources Disabled" folders. + STATE + + + + SEPARATOR + + + + NAME + nimbus-pkg + PAYLOAD_ONLY + + TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING + + + + TYPE + 0 + VERSION + 2 + + diff --git a/installer/macos/nimbus-pkg.xcodeproj/project.pbxproj b/installer/macos/nimbus-pkg.xcodeproj/project.pbxproj new file mode 100644 index 000000000..8da7b6069 --- /dev/null +++ b/installer/macos/nimbus-pkg.xcodeproj/project.pbxproj @@ -0,0 +1,334 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D481668526CA670F00DB47E8 /* MyInstallerPane.m in Sources */ = {isa = PBXBuildFile; fileRef = D481668426CA670F00DB47E8 /* MyInstallerPane.m */; }; + D481668826CA670F00DB47E8 /* MyInstallerPane.xib in Resources */ = {isa = PBXBuildFile; fileRef = D481668626CA670F00DB47E8 /* MyInstallerPane.xib */; }; + D481668B26CA670F00DB47E8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D481668926CA670F00DB47E8 /* Localizable.strings */; }; + D481668D26CA670F00DB47E8 /* InstallerSections.plist in Resources */ = {isa = PBXBuildFile; fileRef = D481668C26CA670F00DB47E8 /* InstallerSections.plist */; }; + D481669126CA670F00DB47E8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D481668F26CA670F00DB47E8 /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D481668026CA670F00DB47E8 /* nimbus-pkg.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "nimbus-pkg.bundle"; sourceTree = BUILT_PRODUCTS_DIR; }; + D481668326CA670F00DB47E8 /* MyInstallerPane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyInstallerPane.h; sourceTree = ""; }; + D481668426CA670F00DB47E8 /* MyInstallerPane.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyInstallerPane.m; sourceTree = ""; }; + D481668726CA670F00DB47E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MyInstallerPane.xib; sourceTree = ""; }; + D481668A26CA670F00DB47E8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + D481668C26CA670F00DB47E8 /* InstallerSections.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = InstallerSections.plist; sourceTree = ""; }; + D481668E26CA670F00DB47E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D481669026CA670F00DB47E8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D481667D26CA670F00DB47E8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D481667726CA670F00DB47E8 = { + isa = PBXGroup; + children = ( + D481668226CA670F00DB47E8 /* nimbus-pkg */, + D481668126CA670F00DB47E8 /* Products */, + ); + sourceTree = ""; + }; + D481668126CA670F00DB47E8 /* Products */ = { + isa = PBXGroup; + children = ( + D481668026CA670F00DB47E8 /* nimbus-pkg.bundle */, + ); + name = Products; + sourceTree = ""; + }; + D481668226CA670F00DB47E8 /* nimbus-pkg */ = { + isa = PBXGroup; + children = ( + D481668326CA670F00DB47E8 /* MyInstallerPane.h */, + D481668426CA670F00DB47E8 /* MyInstallerPane.m */, + D481668626CA670F00DB47E8 /* MyInstallerPane.xib */, + D481668926CA670F00DB47E8 /* Localizable.strings */, + D481668C26CA670F00DB47E8 /* InstallerSections.plist */, + D481668E26CA670F00DB47E8 /* Info.plist */, + D481668F26CA670F00DB47E8 /* InfoPlist.strings */, + ); + path = "nimbus-pkg"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D481667F26CA670F00DB47E8 /* nimbus-pkg */ = { + isa = PBXNativeTarget; + buildConfigurationList = D481669426CA670F00DB47E8 /* Build configuration list for PBXNativeTarget "nimbus-pkg" */; + buildPhases = ( + D481667C26CA670F00DB47E8 /* Sources */, + D481667D26CA670F00DB47E8 /* Frameworks */, + D481667E26CA670F00DB47E8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "nimbus-pkg"; + productName = "nimbus-pkg"; + productReference = D481668026CA670F00DB47E8 /* nimbus-pkg.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D481667826CA670F00DB47E8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1250; + TargetAttributes = { + D481667F26CA670F00DB47E8 = { + CreatedOnToolsVersion = 12.5.1; + }; + }; + }; + buildConfigurationList = D481667B26CA670F00DB47E8 /* Build configuration list for PBXProject "nimbus-pkg" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D481667726CA670F00DB47E8; + productRefGroup = D481668126CA670F00DB47E8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D481667F26CA670F00DB47E8 /* nimbus-pkg */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D481667E26CA670F00DB47E8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D481668826CA670F00DB47E8 /* MyInstallerPane.xib in Resources */, + D481669126CA670F00DB47E8 /* InfoPlist.strings in Resources */, + D481668B26CA670F00DB47E8 /* Localizable.strings in Resources */, + D481668D26CA670F00DB47E8 /* InstallerSections.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D481667C26CA670F00DB47E8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D481668526CA670F00DB47E8 /* MyInstallerPane.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + D481668626CA670F00DB47E8 /* MyInstallerPane.xib */ = { + isa = PBXVariantGroup; + children = ( + D481668726CA670F00DB47E8 /* Base */, + ); + name = MyInstallerPane.xib; + sourceTree = ""; + }; + D481668926CA670F00DB47E8 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + D481668A26CA670F00DB47E8 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + D481668F26CA670F00DB47E8 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + D481669026CA670F00DB47E8 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D481669226CA670F00DB47E8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D481669326CA670F00DB47E8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + }; + name = Release; + }; + D481669526CA670F00DB47E8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "nimbus-pkg/Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_BUNDLE_IDENTIFIER = "metacraft.nimbus-pkg"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + D481669626CA670F00DB47E8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "nimbus-pkg/Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_BUNDLE_IDENTIFIER = "metacraft.nimbus-pkg"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D481667B26CA670F00DB47E8 /* Build configuration list for PBXProject "nimbus-pkg" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D481669226CA670F00DB47E8 /* Debug */, + D481669326CA670F00DB47E8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D481669426CA670F00DB47E8 /* Build configuration list for PBXNativeTarget "nimbus-pkg" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D481669526CA670F00DB47E8 /* Debug */, + D481669626CA670F00DB47E8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D481667826CA670F00DB47E8 /* Project object */; +} diff --git a/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/installer/macos/nimbus-pkg.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/installer/macos/nimbus-pkg.xcodeproj/xcshareddata/xcschemes/nimbus-pkg.xcscheme b/installer/macos/nimbus-pkg.xcodeproj/xcshareddata/xcschemes/nimbus-pkg.xcscheme new file mode 100644 index 000000000..f982e7d8b --- /dev/null +++ b/installer/macos/nimbus-pkg.xcodeproj/xcshareddata/xcschemes/nimbus-pkg.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/macos/nimbus-pkg/Base.lproj/MyInstallerPane.xib b/installer/macos/nimbus-pkg/Base.lproj/MyInstallerPane.xib new file mode 100644 index 000000000..f93f40675 --- /dev/null +++ b/installer/macos/nimbus-pkg/Base.lproj/MyInstallerPane.xib @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mainnet + Prater + Pyrmont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To monitor the Eth1 validator deposit contract, you'll need to pair +the Nimbus beacon node with a Web3 provider capable of serving Eth1 +event logs. This could be a locally running Eth1 client such as Geth +or a cloud service such as Infura. For more information please see +our setup guides: + +https://status-im.github.io/nimbus-eth2/eth1.html + + + + + + + + + + + + diff --git a/installer/macos/nimbus-pkg/Info.plist b/installer/macos/nimbus-pkg/Info.plist new file mode 100644 index 000000000..637834cb2 --- /dev/null +++ b/installer/macos/nimbus-pkg/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + InstallerSectionTitle + Configure + NSMainNibFile + MyInstallerPane + NSPrincipalClass + InstallerSection + + diff --git a/installer/macos/nimbus-pkg/InstallerSections.plist b/installer/macos/nimbus-pkg/InstallerSections.plist new file mode 100644 index 000000000..a8ba07da4 --- /dev/null +++ b/installer/macos/nimbus-pkg/InstallerSections.plist @@ -0,0 +1,16 @@ + + + + + SectionOrder + + Introduction + ReadMe + License + nimbus-pkg.bundle + Target + PackageSelection + Install + + + diff --git a/installer/macos/nimbus-pkg/MyInstallerPane.h b/installer/macos/nimbus-pkg/MyInstallerPane.h new file mode 100644 index 000000000..4a266f499 --- /dev/null +++ b/installer/macos/nimbus-pkg/MyInstallerPane.h @@ -0,0 +1,19 @@ +// +// MyInstallerPane.h +// nimbus-pkg +// +// Created by zahary on 16.08.21. +// + +#import + +@interface MyInstallerPane : InstallerPane +@property BOOL EthValid; +@property BOOL NetworkChosen; +@property int ChosenNetwork; +@property (weak) IBOutlet NSComboBoxCell *comboBox; +@property (weak) IBOutlet NSTextField *EthField; +@property (weak) IBOutlet NSTextField *descriptionField; +@property (weak) IBOutlet NSButton *startServiceCheckbox; + +@end diff --git a/installer/macos/nimbus-pkg/MyInstallerPane.m b/installer/macos/nimbus-pkg/MyInstallerPane.m new file mode 100644 index 000000000..b9ed07b65 --- /dev/null +++ b/installer/macos/nimbus-pkg/MyInstallerPane.m @@ -0,0 +1,65 @@ +// +// MyInstallerPane.m +// nimbus-pkg +// +// Created by zahary on 16.08.21. +// + +#import "MyInstallerPane.h" + +@implementation MyInstallerPane + +- (NSString *)title +{ + [self setNextEnabled: NO]; + return [[NSBundle bundleForClass: [self class]] localizedStringForKey: @"PaneTitle" value: nil table: nil]; +} + +- (void)comboBoxSelectionDidChange:(NSNotification *)notification{ + self.NetworkChosen = YES; + self.ChosenNetwork = self.comboBox.intValue; + [self isInputValid]; +} + +- (void)controlTextDidChange:(NSNotification *)obj { + NSURL *url = [NSURL URLWithString: self.EthField.stringValue]; + if (url && url.scheme && url.host) { + self.EthValid = YES; + } else { + self.EthValid = NO; + } + [self isInputValid]; +} + +- (void)isInputValid { + if(self.NetworkChosen && self.EthValid) { + [self setNextEnabled: YES]; + } else{ + [self setNextEnabled: NO]; + } +} + +- (BOOL)shouldExitPane:(InstallerSectionDirection)dir { + [self.comboBox.intValue == 1 ? @"prater" : @"pyrmont" + writeToFile: [NSString stringWithFormat: @"%@%@", @"/tmp", @"/nimbus.server.config"] + atomically: YES + encoding: NSUTF8StringEncoding + error: nil]; + + [self.EthField.stringValue + writeToFile: [NSString stringWithFormat: @"%@%@", @"/tmp", @"/nimbus.eth.config"] + atomically: YES + encoding: NSUTF8StringEncoding + error: nil]; + + [self.startServiceCheckbox.state ? @"0" : @"1" + writeToFile: [NSString stringWithFormat:@"%@%@", @"/tmp", @"/nimbus.launch.config"] + atomically: YES + encoding: NSUTF8StringEncoding + error: nil]; + + return YES; +} + +@end + diff --git a/installer/macos/nimbus-pkg/ReadMe.html b/installer/macos/nimbus-pkg/ReadMe.html new file mode 100644 index 000000000..6195423e7 --- /dev/null +++ b/installer/macos/nimbus-pkg/ReadMe.html @@ -0,0 +1 @@ +Nimbus-eth2 is a extremely efficient Beacon Chain client for participating in the Ethereum Proof of Stake protocol. It performs well on embedded systems, resource-restricted devices -- including Raspberry Pis and mobile devices -- the low resource usage also makes it an excellet choice for running together with an Ethereum client on a server or a desktop where it simply takes up less resources. diff --git a/installer/macos/nimbus-pkg/en.lproj/InfoPlist.strings b/installer/macos/nimbus-pkg/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..b7940e7ad --- /dev/null +++ b/installer/macos/nimbus-pkg/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +InstallerSectionTitle = "Configure"; + diff --git a/installer/macos/nimbus-pkg/en.lproj/Localizable.strings b/installer/macos/nimbus-pkg/en.lproj/Localizable.strings new file mode 100644 index 000000000..366deac2a --- /dev/null +++ b/installer/macos/nimbus-pkg/en.lproj/Localizable.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +"PaneTitle" = "Configure"; diff --git a/installer/macos/nimbus-pkg/launchservice.sh b/installer/macos/nimbus-pkg/launchservice.sh new file mode 100755 index 000000000..3d78afdda --- /dev/null +++ b/installer/macos/nimbus-pkg/launchservice.sh @@ -0,0 +1,8 @@ +#!/bin/sh +PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Scripts/Nimbus:/Library/Scripts/Nimbus:scripts + +source /etc/nimbus.config + +cd "/Library/Scripts/Nimbus" + +/Library/Scripts/Nimbus/nimbus_beacon_node --web3-url="${WEB3_URL}" --network="${NETWORK}" diff --git a/installer/macos/nimbus-pkg/license.html b/installer/macos/nimbus-pkg/license.html new file mode 100644 index 000000000..d6e7eed7b --- /dev/null +++ b/installer/macos/nimbus-pkg/license.html @@ -0,0 +1,155 @@ + +

+Apache License
Version 2.0, January 2004
+http://www.apache.org/licenses/ +

+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+

1. Definitions.

+
+

"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document.

+

"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License.

+

"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty +percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity.

+

"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License.

+

"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files.

+

"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types.

+

"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the +Appendix below).

+

"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as +a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof.

+

"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution."

+

"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

+
+

2. Grant of Copyright License. Subject to the +terms and conditions of this License, each Contributor hereby grants to You +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, publicly +display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form.

+

3. Grant of Patent License. Subject to the terms +and conditions of this License, each Contributor hereby grants to You a +perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the +date such litigation is filed.

+

4. Redistribution. You may reproduce and +distribute copies of the Work or Derivative Works thereof in any medium, +with or without modifications, and in Source or Object form, provided that +You meet the following conditions:

+
    +
  1. You must give any other recipients of the Work or Derivative Works a +copy of this License; and
  2. +
  3. You must cause any modified files to carry prominent notices stating +that You changed the files; and
  4. +
  5. You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and
  6. +
  7. If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in +at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, +if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. +
    +
    +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License. +
  8. +
+

5. Submission of Contributions. Unless You +explicitly state otherwise, any Contribution intentionally submitted for +inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the +terms of any separate license agreement you may have executed with Licensor +regarding such Contributions.

+

6. Trademarks. This License does not grant +permission to use the trade names, trademarks, service marks, or product +names of the Licensor, except as required for reasonable and customary use +in describing the origin of the Work and reproducing the content of the +NOTICE file.

+

7. Disclaimer of Warranty. Unless required by +applicable law or agreed to in writing, Licensor provides the Work (and +each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You +are solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise +of permissions under this License.

+

8. Limitation of Liability. In no event and +under no legal theory, whether in tort (including negligence), contract, or +otherwise, unless required by applicable law (such as deliberate and +grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a result +of this License or out of the use or inability to use the Work (including +but not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or losses), +even if such Contributor has been advised of the possibility of such +damages.

+

9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose +to offer, and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this License. +However, in accepting such obligations, You may act only on Your own behalf +and on Your sole responsibility, not on behalf of any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability.

+

END OF TERMS AND CONDITIONS

+ diff --git a/installer/macos/nimbus-pkg/nimbus.plist b/installer/macos/nimbus-pkg/nimbus.plist new file mode 100644 index 000000000..4d934cfdf --- /dev/null +++ b/installer/macos/nimbus-pkg/nimbus.plist @@ -0,0 +1,23 @@ + + + + + UserName + nimbus + Label + Nimbus + ServiceDescription + Nimbus Beacon Node + Program + /Library/Scripts/Nimbus/launchservice.sh + ProgramArguments + + /Library/Scripts/Nimbus/launchservice.sh + + StandardOutPath + /tmp/nimbus.stdout + StandardErrorPath + /tmp/nimbus.stderr + + diff --git a/installer/macos/nimbus-pkg/postinstall.sh b/installer/macos/nimbus-pkg/postinstall.sh new file mode 100755 index 000000000..d9cac84c7 --- /dev/null +++ b/installer/macos/nimbus-pkg/postinstall.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +NIMBUS_SERVER="$(cat /tmp/nimbus.server.config)" +NIMBUS_ETH="$(cat /tmp/nimbus.eth.config)" +NIMBUS_LAUNCH="$(cat /tmp/nimbus.launch.config)" + +echo "NETWORK=\"$NIMBUS_SERVER\"" > /etc/nimbus.config +echo "WEB3_URL=\"$NIMBUS_ETH\"" >> /etc/nimbus.config +echo "DATA_DIR=/var/lib/nimbus" >> /etc/nimbus.config +mkdir "/var/lib/nimbus" + +sudo dscl . -create /Users/nimbus +sudo dscl . -create /Users/nimbus UserShell /bin/bash +sudo dscl . -create /Users/nimbus RealName "Nimbus" + +sudo dscl . -create /Users/nimbus UniqueID "1012" +sudo dscl . -create /Users/nimbus PrimaryGroupID 80 +sudo dscl . -append /Groups/admin GroupMembership nimbus + +sudo chown nimbus /var/lib/nimbus + +sudo -u nimbus chmod u+rw,g,rw,o=r /var/lib/nimbus + +launchctl load /Library/LaunchDaemons/nimbus.plist + +if [ NIMBUS_LAUNCH == 1 ]; then + sudo launchctl start Nimbus +fi + +exit 0