Bundle original Debian apt 2.6.1 test package with readable description
This commit is contained in:
1 parent
dc51a3a3c7
commit
718bf032c8
4 files changed
+22
-5
No files matched your search
@@ -55,7 +55,7 @@ filza_develop.ipa
|
||||
- `mount` lists mounted filesystems.
|
||||
- `extract`, `unzip`, `untar`, `un7z`, `unrar` extract zip, tar, tar.gz, gz,
|
||||
bz2, xz, zst, 7z and rar through libarchive.
|
||||
- `test.deb` (official Procursus `apt 2.9.4-1`) and an executable `test` script
|
||||
- `test.deb` (official Debian `apt 2.6.1`, arm64) and an executable `test` script
|
||||
are copied into `worse_query` on first launch.
|
||||
- `respring` uses Erosion's WebKit pressure method.
|
||||
|
||||
|
||||
@@ -2080,6 +2080,8 @@ static BOOL hook_isDEBAvailable(id self, SEL _cmd)
|
||||
static NSString *hook_dpkgInfo(id self, SEL _cmd, NSString *path)
|
||||
{
|
||||
NSString *info = WQDebInfoText(path);
|
||||
NSLog(@"[WQDeb] dpkgInfo %@ -> %lu bytes", path,
|
||||
(unsigned long)info.length);
|
||||
if (info.length) return info;
|
||||
if (orig_dpkgInfo)
|
||||
return ((NSString *(*)(id, SEL, NSString *))orig_dpkgInfo)(self, _cmd, path);
|
||||
|
||||
+19
-4
@@ -248,14 +248,28 @@ static NSDictionary *WQParseControl(NSString *control)
|
||||
NSString *WQDebInfoText(NSString *path)
|
||||
{
|
||||
NSData *archive = [NSData dataWithContentsOfFile:path];
|
||||
if (!archive.length) return nil;
|
||||
if (!archive.length) {
|
||||
NSLog(@"[WQDeb] cannot read %@", path);
|
||||
return nil;
|
||||
}
|
||||
NSData *controlArchive = WQArMember(archive, @"control.tar");
|
||||
if (!controlArchive.length) return nil;
|
||||
if (!controlArchive.length) {
|
||||
NSLog(@"[WQDeb] no control archive in %@", path);
|
||||
return nil;
|
||||
}
|
||||
NSData *controlData = WQArchiveEntryNamed(controlArchive, @"control");
|
||||
if (!controlData.length) return nil;
|
||||
if (!controlData.length) {
|
||||
NSLog(@"[WQDeb] no control file in %@", path);
|
||||
return nil;
|
||||
}
|
||||
NSString *control = [[NSString alloc] initWithData:controlData
|
||||
encoding:NSUTF8StringEncoding];
|
||||
if (!control.length) return nil;
|
||||
if (!control.length) {
|
||||
NSLog(@"[WQDeb] control is not UTF-8 in %@", path);
|
||||
return nil;
|
||||
}
|
||||
NSLog(@"[WQDeb] info %@ control=%lu bytes", path,
|
||||
(unsigned long)controlData.length);
|
||||
NSMutableString *text = [NSMutableString stringWithFormat:
|
||||
@" new Debian package, version 2.0.\n"
|
||||
@" size %lu bytes: control archive %lu bytes.\n",
|
||||
@@ -335,6 +349,7 @@ static BOOL WQInstallDeb(NSString *path, FILE *out, FILE *err,
|
||||
![architecture isEqualToString:@"iphoneos-arm64"] &&
|
||||
![architecture isEqualToString:@"iphoneos-arm"] &&
|
||||
![architecture isEqualToString:@"darwin-arm64"] &&
|
||||
![architecture isEqualToString:@"arm64"] &&
|
||||
![architecture isEqualToString:@"all"]) {
|
||||
fprintf(err, "dpkg: package architecture %s is not native "
|
||||
"(use --force-architecture)\n", architecture.UTF8String);
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user