summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
l---------data/dpkg/_metadata/xz.dep1
-rw-r--r--data/dpkg/make.sh2
-rw-r--r--data/dpkg/nullptr.diff79
-rw-r--r--data/dpkg/runcmd.diff45
-rw-r--r--data/dpkg/telesphoreo.diff3
5 files changed, 128 insertions, 2 deletions
diff --git a/data/dpkg/_metadata/xz.dep b/data/dpkg/_metadata/xz.dep
new file mode 120000
index 000000000..d5eb7ae54
--- /dev/null
+++ b/data/dpkg/_metadata/xz.dep
@@ -0,0 +1 @@
+../../xz \ No newline at end of file
diff --git a/data/dpkg/make.sh b/data/dpkg/make.sh
index 074b599f4..54629d49a 100644
--- a/data/dpkg/make.sh
+++ b/data/dpkg/make.sh
@@ -1,7 +1,7 @@
pkg:setup
#autoconf
#cp -a libcompat/obstack.[ch] lib
-pkg:configure --with-admindir=/var/lib/dpkg --disable-start-stop-daemon --disable-nls --sysconfdir=/etc --disable-linker-optimisations dpkg_cv_va_copy=yes --enable-static=yes --enable-shared=no --with-dpkg-deb-compressor=gzip
+pkg:configure --with-admindir=/var/lib/dpkg --disable-start-stop-daemon --disable-nls --sysconfdir=/etc --disable-linker-optimisations dpkg_cv_va_copy=yes --enable-static=yes --enable-shared=no --with-dpkg-deb-compressor=gzip TAR=tar
pkg:make
pkg:install
pkg: rm -rf /usr/share/perl5
diff --git a/data/dpkg/nullptr.diff b/data/dpkg/nullptr.diff
new file mode 100644
index 000000000..8679bb25d
--- /dev/null
+++ b/data/dpkg/nullptr.diff
@@ -0,0 +1,79 @@
+diff -ur dpkg-1.18.10/dselect/method.cc dpkg-1.18.10+iPhone/dselect/method.cc
+--- dpkg-1.18.10/dselect/method.cc 2016-07-04 16:00:41.000000000 -1000
++++ dpkg-1.18.10+iPhone/dselect/method.cc 2018-07-25 16:26:13.000000000 -1000
+@@ -50,10 +50,10 @@
+ static const char *const methoddirectories[]= {
+ LIBDIR "/" METHODSDIR,
+ LOCALLIBDIR "/" METHODSDIR,
+- nullptr
++ NULL
+ };
+
+-static char *methodlockfile = nullptr;
++static char *methodlockfile = NULL;
+ static int methlockfd= -1;
+
+ static void
+@@ -84,7 +84,7 @@
+ int nread;
+
+ if (!options) {
+- newoptions = nullptr;
++ newoptions = NULL;
+ nread= 0;
+ for (ccpp= methoddirectories; *ccpp; ccpp++)
+ readmethods(*ccpp, &newoptions, &nread);
+@@ -101,7 +101,7 @@
+ static enum urqresult lockmethod(void) {
+ struct flock fl;
+
+- if (methodlockfile == nullptr)
++ if (methodlockfile == NULL)
+ methodlockfile = dpkg_db_get_path(METHLOCKFILE);
+
+ if (methlockfd == -1) {
+@@ -124,7 +124,7 @@
+ sthfailed(_("cannot lock access method area"));
+ return urqr_fail;
+ }
+- push_cleanup(cu_unlockmethod, ~0, nullptr, 0, 0);
++ push_cleanup(cu_unlockmethod, ~0, NULL, 0, 0);
+ return urqr_normal;
+ }
+
+@@ -140,7 +140,7 @@
+
+ pid = subproc_fork();
+ if (pid == 0) {
+- subproc_signals_cleanup(0, nullptr);
++ subproc_signals_cleanup(0, NULL);
+ command_exec(cmd);
+ }
+
+@@ -178,7 +178,7 @@
+
+ command_init(&cmd, coption->meth->path, name);
+ command_add_args(&cmd, exepath, dpkg_db_get_dir(),
+- coption->meth->name, coption->name, nullptr);
++ coption->meth->name, coption->name, NULL);
+ ur = falliblesubprocess(&cmd);
+ command_destroy(&cmd);
+ } else {
+@@ -204,7 +204,7 @@
+
+ command_init(&cmd, DPKG, name);
+ command_add_args(&cmd, DPKG, "--admindir", dpkg_db_get_dir(), "--pending",
+- dpkgmode, nullptr);
++ dpkgmode, NULL);
+
+ cursesoff();
+ printf("running dpkg --pending %s ...\n",dpkgmode);
+@@ -243,7 +243,7 @@
+
+ command_init(&cmd, coption->meth->path, _("query/setup script"));
+ command_add_args(&cmd, METHODSETUPSCRIPT, dpkg_db_get_dir(),
+- coption->meth->name, coption->name, nullptr);
++ coption->meth->name, coption->name, NULL);
+ ur = falliblesubprocess(&cmd);
+ command_destroy(&cmd);
+ if (ur == urqr_normal) writecurrentopt();
diff --git a/data/dpkg/runcmd.diff b/data/dpkg/runcmd.diff
new file mode 100644
index 000000000..80edf7ee6
--- /dev/null
+++ b/data/dpkg/runcmd.diff
@@ -0,0 +1,45 @@
+--- dpkg-1.18.10/lib/dpkg/command.c 2016-07-04 15:55:13.000000000 -1000
++++ dpkg-1.18.10+iPhone/lib/dpkg/command.c 2018-07-27 18:00:54.000000000 -1000
+@@ -31,6 +31,8 @@
+ #include <dpkg/path.h>
+ #include <dpkg/command.h>
+
++void runcmd(struct command *cmd);
++
+ /**
+ * Initialize a command structure.
+ *
+@@ -178,8 +180,7 @@
+ void
+ command_exec(struct command *cmd)
+ {
+- execvp(cmd->filename, (char * const *)cmd->argv);
+- ohshite(_("unable to execute %s (%s)"), cmd->name, cmd->filename);
++ runcmd(cmd);
+ }
+
+
+@@ -230,3 +231,23 @@
+ execlp(shell, shell, mode, cmd, NULL);
+ ohshite(_("unable to execute %s (%s)"), name, cmd);
+ }
++
++void
++runcmd(struct command *cmd)
++{
++ int i = 0;
++ char cmdstring[cmd->argv_size];
++ char *ptr = cmdstring; // set ptr to the start of the destination buffer
++ for (i=0; i<cmd->argc; i++) {
++ const char *current_arg = cmd->argv[i];
++ char c;
++ while ( (c = *current_arg++) ) {
++ // copy each character to the destination buffer until the end of the current string
++ *ptr++ = c;
++ }
++ *ptr++ = ' '; // or whatever joining character you want
++ }
++ *ptr = '\0'; // null terminate
++ command_shell(cmdstring, cmd->name);
++ ohshite(_("unable to execute %s (%s)"), cmd->name, cmd->filename);
++}
diff --git a/data/dpkg/telesphoreo.diff b/data/dpkg/telesphoreo.diff
index 57f19261e..d31957409 100644
--- a/data/dpkg/telesphoreo.diff
+++ b/data/dpkg/telesphoreo.diff
@@ -1,11 +1,12 @@
diff -ru dpkg-1.18.10/triplettable dpkg-1.18.10+iPhone/triplettable
--- dpkg-1.18.10/triplettable 2016-07-05 01:55:14.000000000 +0000
+++ dpkg-1.18.10+iPhone/triplettable 2016-08-15 23:48:36.000000000 +0000
-@@ -30,6 +30,7 @@
+@@ -30,6 +30,8 @@
bsd-openbsd-<cpu> openbsd-<cpu>
bsd-netbsd-<cpu> netbsd-<cpu>
bsd-darwin-<cpu> darwin-<cpu>
+bsd-darwin-arm iphoneos-arm
++bsd-darwin-arm64 iphoneos-arm64
sysv-solaris-<cpu> solaris-<cpu>
uclibceabi-uclinux-arm uclinux-armel
uclibc-uclinux-<cpu> uclinux-<cpu>