Skip to content

Commit

Permalink
Merge pull request #627 from lindegroup/1.5.1-dev
Browse files Browse the repository at this point in the history
1.5.1 Merge to master
  • Loading branch information
shawnhonsberger authored Oct 1, 2019
2 parents 8584db5 + 0b60263 commit f0100ad
Show file tree
Hide file tree
Showing 26 changed files with 153 additions and 64 deletions.
19 changes: 10 additions & 9 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgErrorHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@ typedef NS_OPTIONS(NSInteger, LGAutoPkgVerb) {
kLGAutoPkgRun = 1 << 0,
kLGAutoPkgListRecipes = 1 << 1,
kLGAutoPkgMakeOverride = 1 << 2,
kLGAutoPkgSearch = 1 << 3,
kLGAutoPkgInfo = 1 << 4,
kLGAutoPkgTrustOverride = 1 << 3,
kLGAutoPkgSearch = 1 << 4,
kLGAutoPkgInfo = 1 << 5,

// repo verbs
kLGAutoPkgRepoAdd = 1 << 5,
kLGAutoPkgRepoDelete = 1 << 6,
kLGAutoPkgRepoUpdate = 1 << 7,
kLGAutoPkgRepoList = 1 << 8,
kLGAutoPkgRepoAdd = 1 << 6,
kLGAutoPkgRepoDelete = 1 << 7,
kLGAutoPkgRepoUpdate = 1 << 8,
kLGAutoPkgRepoList = 1 << 9,

// processor verbs
kLGAutoPkgProcessorInfo = 1 << 9,
kLGAutoPkgListProcessors = 1 << 10,
kLGAutoPkgProcessorInfo = 1 << 10,
kLGAutoPkgListProcessors = 1 << 11,

// other verbs
kLGAutoPkgVersion = 1 << 11,
kLGAutoPkgVersion = 1 << 12,
};

@interface LGAutoPkgErrorHandler : NSObject
Expand Down
3 changes: 3 additions & 0 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgErrorHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
case kLGAutoPkgMakeOverride:
message = NSLocalizedStringFromTable(@"Error creating recipe override file", @"LocalizableAutoPkg", nil);
break;
case kLGAutoPkgTrustOverride:
message = NSLocalizedStringFromTable(@"Error updating trust in override file", @"LocalizableAutoPkg", nil);
break;
case kLGAutoPkgSearch:
message = NSLocalizedStringFromTable(@"Error encountered searching for recipe", @"LocalizableAutoPkg", nil);
break;
Expand Down
3 changes: 3 additions & 0 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgResultHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ - (id)results
case kLGAutoPkgMakeOverride: {
break;
}
case kLGAutoPkgTrustOverride: {
break;
}
#pragma mark Search
case kLGAutoPkgSearch: {

Expand Down
11 changes: 11 additions & 0 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,17 @@ extern NSString *const kLGPostProcessorDefaultsKey;

+ (void)makeOverride:(NSString *)recipe name:(NSString *)name
reply:(void (^)(NSString *newOverrideFile, NSError *error))reply;
/**
* Equivalent to /usr/bin/local/autopkg update-trust-info [recipe]
*
* @param recipe Recipe override file in which trust information will be added or updated
* @param reply The block to be executed on upon task completion. This block has no return value and takes two arguments: NSString representing the full path the the newly trusted override and NSError that is populated should an error occur.
*/
+ (void)updateTrustInfo:(NSString *)recipe
reply:(void (^)(NSString *trustedOverride, NSError *error))reply;

+ (void)updateTrustInfo:(NSString *)recipe name:(NSString *)name
reply:(void (^)(NSString *trustedOverride, NSError *error))reply;
/**
* Equivalent to /usr/bin/local/autopkg list-recipes
*
Expand Down
23 changes: 23 additions & 0 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
@"run" : @(kLGAutoPkgRun),
@"list-recipes" : @(kLGAutoPkgListRecipes),
@"make-override" : @(kLGAutoPkgMakeOverride),
@"update-trust-info" : @(kLGAutoPkgTrustOverride),
@"search" : @(kLGAutoPkgSearch),
@"info" : @(kLGAutoPkgInfo),
@"repo-add" : @(kLGAutoPkgRepoAdd),
Expand Down Expand Up @@ -1005,6 +1006,28 @@ + (void)makeOverride:(NSString *)recipe name:(NSString *)name reply:(void (^)(NS
}];
}

+ (void)updateTrustInfo:(NSString *)recipe reply:(void (^)(NSString *, NSError *))reply
{
LGAutoPkgTask *task = [[LGAutoPkgTask alloc] init];
NSMutableArray *args = [@[ @"update-trust-info", recipe ] mutableCopy];

task.arguments = args;
__weak typeof(task) weakTask = task;
[task launchInBackground:^(NSError *error) {
typeof(task) strongTask = weakTask;
NSMutableString *path = nil;
if (!error) {
path = [strongTask.standardOutString.trimmed mutableCopy];
[path deleteCharactersInRange:[path rangeOfString:@"Wrote updated "]];
if ((path.length > 2) && ([path characterAtIndex:path.length - 1] == '.')) {
[path deleteCharactersInRange:NSMakeRange(path.length - 1, 1)];
}
}

reply(path, error);
}];
}

+ (NSArray *)listRecipes
{
LGAutoPkgTask *task = [[LGAutoPkgTask alloc] initWithArguments:@[ @"list-recipes" ]];
Expand Down
1 change: 1 addition & 0 deletions AutoPkgr/Models/Install-Uninstall/LGPackageRemover.m
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ + (NSArray *)validRemovablePackages
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
packages = @[
@"com.github.jssimporter",
@"com.github.sheagcraig.jssimporter",
@"com.github.sheagcraig.jss-autopkg-addon",
@"com.github.tburgin.AbsoluteManageExport",
Expand Down
16 changes: 11 additions & 5 deletions AutoPkgr/Models/Integrations/LGJSSImporterIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ + (NSString *)name

+ (NSURL *)homePage
{
return [NSURL URLWithString:@"https://github.com/sheagcraig/JSSImporter"];
return [NSURL URLWithString:@"https://github.com/jssimporter/JSSImporter"];
}

+ (NSString *)credits
{
return @"Copyright 2014, 2015 Shea Craig\nhttp://www.apache.org/licenses/LICENSE-2.0";
return @"Copyright 2014, 2019 Shea Craig and Graham Pugh\nhttp://www.apache.org/licenses/LICENSE-2.0";
}

+ (NSString *)gitHubURL
{
return @"https://api.github.com/repos/sheagcraig/JSSImporter/releases";
return @"https://api.github.com/repos/jssimporter/JSSImporter/releases";
}

+ (NSString *)defaultRepository
Expand All @@ -68,7 +68,8 @@ + (NSArray *)components

+ (NSArray *)packageIdentifiers
{
return @[ @"com.github.sheagcraig.jssimporter",
return @[ @"com.github.jssimporter",
@"com.github.sheagcraig.jssimporter",
@"com.github.sheagcraig.jss-autopkg-addon" ];
}

Expand All @@ -90,10 +91,15 @@ - (NSString *)installedVersion
NSString *jssAddonReceipt = @"/private/var/db/receipts/com.github.sheagcraig.jss-autopkg-addon.plist";

NSString *jssImporterReceipt = @"/private/var/db/receipts/com.github.sheagcraig.jssimporter.plist";

NSString *newJssImporterReceipt = @"/private/var/db/receipts/com.github.jssimporter.plist";

if ([[self class] isInstalled]) {
NSDictionary *receiptDict;
if ([fm fileExistsAtPath:jssImporterReceipt]) {
if ([fm fileExistsAtPath:newJssImporterReceipt]) {
receiptDict = [NSDictionary dictionaryWithContentsOfFile:newJssImporterReceipt];
}
else if ([fm fileExistsAtPath:jssImporterReceipt]) {
receiptDict = [NSDictionary dictionaryWithContentsOfFile:jssImporterReceipt];
}
else if ([fm fileExistsAtPath:jssAddonReceipt]) {
Expand Down
4 changes: 2 additions & 2 deletions AutoPkgr/Supporting Files/AutoPkgr-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5</string>
<string>1.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1392</string>
<string>1404</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
6 changes: 3 additions & 3 deletions AutoPkgr/Supporting Files/en.lproj/Credits.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0\fs22 \cf0 \expnd0\expndtw0\kerning0
\
AutoPkgr was created at the\
Linde Group in Emeryville, California.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand All @@ -21,14 +20,15 @@ Linde Group in Emeryville, California.\
\f1 \cf0 Original AutoPkgr team:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 James Barclay, Elliot Jordan, and Josh Senick\
\f0 \cf0 James Barclay, Elliot Jordan, Josh Senick,\
and Eldon Ahrold\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f1 \cf0 Ongoing development:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 Eldon Ahrold and Shawn Honsberger\
\f0 \cf0 Shawn Honsberger and Elliot Jordan\
\
AutoPkgr takes advantage of the following awesome open-source libraries and projects:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand Down
6 changes: 3 additions & 3 deletions AutoPkgr/Supporting Files/es.lproj/Credits.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0\fs22 \cf0 \expnd0\expndtw0\kerning0
\
AutoPkgr fue creado por\
Linde Group en Emeryville, California.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand All @@ -21,14 +20,15 @@ Linde Group en Emeryville, California.\
\f1 \cf0 Equipo AutoPkgr original:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 James Barclay, Elliot Jordan, y Josh Senick\
\f0 \cf0 James Barclay, Elliot Jordan, Josh Senick,\
y Eldon Ahrold\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f1 \cf0 Desarrollo:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 Eldon Ahrold y Shawn Honsberger\
\f0 \cf0 Shawn Honsberger y Elliot Jordan \
\
AutoPkgr hace uso de los siguientes proyectos de c\'f3digo abierto:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand Down
6 changes: 3 additions & 3 deletions AutoPkgr/Supporting Files/fr.lproj/Credits.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0\fs22 \cf0 \expnd0\expndtw0\kerning0
\
AutoPkgr a \'e9t\'e9 cr\'e9\'e9 au\
Linde Group \'e0 Emeryville, en Californie.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand All @@ -21,14 +20,15 @@ Linde Group \'e0 Emeryville, en Californie.\
\f1 \cf0 \'c9quipe AutoPkgr originale:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 James Barclay, Elliot Jordan et Josh Senick\
\f0 \cf0 James Barclay, Elliot Jordan, Josh Senick,\
et Eldon Ahrold\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f1 \cf0 \'c9quipe technique actuelle:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0

\f0 \cf0 Eldon Ahrold et Shawn Honsberger\
\f0 \cf0 Shawn Honsberger et Elliot Jordan\
\
AutoPkgr s\'92appuie sur des biblioth\'e8ques et des projets open-source formidables\'a0:\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc\partightenfactor0
Expand Down
2 changes: 1 addition & 1 deletion AutoPkgr/Utility/LGConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#pragma mark-- GitHub
NSString *const kLGAutoPkgReleasesJSONURL = @"https://api.github.com/repos/autopkg/autopkg/releases";
NSString *const kLGGitReleasesJSONURL = @"https://api.github.com/repos/timcharper/git_osx_installer/releases";
NSString *const kLGJSSImporterJSONURL = @"https://api.github.com/repos/sheagcraig/JSSImporter/releases";
NSString *const kLGJSSImporterJSONURL = @"https://api.github.com/repos/jssimporter/JSSImporter/releases";

NSString *const kLGAutoPkgRepositoriesJSONURL = @"https://api.github.com/orgs/autopkg/repos?per_page=100";
NSString *const kLGJSSDefaultRepo = @"https://github.com/autopkg/jss-recipes.git";
Expand Down
Loading

0 comments on commit f0100ad

Please sign in to comment.