summaryrefslogtreecommitdiff
path: root/packages/opkg
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2008-08-22 04:36:01 +0000
committerMike Westerhof <mwester@dls.net>2008-08-22 04:36:01 +0000
commitc367c54adc09d21456cef634f3460ebc15406c95 (patch)
treeac87f4b947cd68a3800f9e0d29d540403be45b48 /packages/opkg
parent58cee914314ebf55d2c1051edca047f1c5327822 (diff)
create opkg variant for very small rootfs systems (SlugOS 5.0)
This is a work-in-progress at this time, preference is set to -1
Diffstat (limited to 'packages/opkg')
-rw-r--r--packages/opkg/files/opkg_wget.patch88
-rw-r--r--packages/opkg/files/reduce-nogpg-noise.patch11
-rw-r--r--packages/opkg/opkg-nogpg-nocurl_svn.bb20
3 files changed, 119 insertions, 0 deletions
diff --git a/packages/opkg/files/opkg_wget.patch b/packages/opkg/files/opkg_wget.patch
new file mode 100644
index 0000000000..b9773a54b6
--- /dev/null
+++ b/packages/opkg/files/opkg_wget.patch
@@ -0,0 +1,88 @@
+--- opkg/libopkg/opkg_download.c.orig 2008-08-21 12:33:49.000000000 -0500
++++ opkg/libopkg/opkg_download.c 2008-08-21 15:12:00.000000000 -0500
+@@ -17,7 +17,9 @@
+ General Public License for more details.
+ */
+ #include "config.h"
++#ifdef HAVE_CURL
+ #include <curl/curl.h>
++#endif
+ #ifdef HAVE_GPGME
+ #include <gpgme.h>
+ #endif
+@@ -76,6 +78,7 @@
+ setenv("no_proxy", conf->no_proxy, 1);
+ }
+
++#ifdef HAVE_CURL
+ CURL *curl;
+ CURLcode res;
+ FILE * file = fopen (tmp_file_location, "w");
+@@ -121,6 +124,27 @@
+ free(src_basec);
+ return -1;
+ }
++#else
++ {
++ int res;
++ char *wgetcmd;
++ char *wgetopts;
++ wgetopts = getenv("OPKG_WGETOPTS");
++ sprintf_alloc(&wgetcmd, "wget -q %s%s -O \"%s\" \"%s\"",
++ (conf->http_proxy || conf->ftp_proxy) ? "-Y on " : "",
++ (wgetopts!=NULL) ? wgetopts : "",
++ tmp_file_location, src);
++ opkg_message(conf, OPKG_INFO, "Executing: %s\n", wgetcmd);
++ res = xsystem(wgetcmd);
++ free(wgetcmd);
++ if (res) {
++ opkg_message(conf, OPKG_ERROR, "Failed to download %s, error %d\n", src, res);
++ free(tmp_file_location);
++ free(src_basec);
++ return res;
++ }
++ }
++#endif
+
+ err = file_move(tmp_file_location, dest_file_name);
+
+--- opkg/configure.ac.orig 2008-07-08 09:39:11.000000000 -0500
++++ opkg/configure.ac 2008-08-21 14:57:35.000000000 -0500
+@@ -23,7 +23,7 @@
+ # Checks for libraries
+
+ # check for libcurl
+-PKG_CHECK_MODULES(CURL, libcurl)
++#PKG_CHECK_MODULES(CURL, libcurl)
+
+
+
+--- opkg/libopkg/opkg.c.orig 2008-08-21 19:49:35.000000000 -0500
++++ opkg/libopkg/opkg.c 2008-08-21 19:55:27.000000000 -0500
+@@ -1021,7 +1021,9 @@
+ return package;
+ }
+
++#ifdef HAVE_CURL
+ #include <curl/curl.h>
++#endif
+ /**
+ * @brief Check the accessibility of repositories. It will try to access the repository to check if the respository is accessible throught current network status.
+ * @param opkg The opkg_t
+@@ -1071,12 +1073,16 @@
+ repositories--;
+
+ err = opkg_download(opkg->conf, iter1->data, "/dev/null", NULL, NULL);
++#ifdef HAVE_CURL
+ if (!(err == CURLE_OK ||
+ err == CURLE_HTTP_RETURNED_ERROR ||
+ err == CURLE_FILE_COULDNT_READ_FILE ||
+ err == CURLE_REMOTE_FILE_NOT_FOUND ||
+ err == CURLE_TFTP_NOTFOUND
+ )) {
++#else
++ if (!(err == 0)) {
++#endif
+ ret++;
+ }
+ str_list_elt_deinit(iter1);
diff --git a/packages/opkg/files/reduce-nogpg-noise.patch b/packages/opkg/files/reduce-nogpg-noise.patch
new file mode 100644
index 0000000000..b72560876e
--- /dev/null
+++ b/packages/opkg/files/reduce-nogpg-noise.patch
@@ -0,0 +1,11 @@
+--- opkg/libopkg/opkg_cmd.c.orig 2008-08-21 22:18:43.000000000 -0500
++++ opkg/libopkg/opkg_cmd.c 2008-08-21 22:19:20.000000000 -0500
+@@ -288,7 +288,7 @@ static int opkg_update_cmd(opkg_conf_t *
+ free (tmp_file_name);
+ free (url);
+ #else
+- opkg_message (conf, OPKG_NOTICE, "Signiture check for %s skipped "
++ opkg_message (conf, OPKG_INFO, "Signature check for %s skipped "
+ "because GPG support was not enabled in this build\n", src->name);
+ #endif
+ free(list_file_name);
diff --git a/packages/opkg/opkg-nogpg-nocurl_svn.bb b/packages/opkg/opkg-nogpg-nocurl_svn.bb
new file mode 100644
index 0000000000..5fa459630d
--- /dev/null
+++ b/packages/opkg/opkg-nogpg-nocurl_svn.bb
@@ -0,0 +1,20 @@
+require opkg_svn.bb
+
+DEPENDS = ""
+PROVIDES += "opkg"
+
+SRC_URI += "file://opkg_wget.patch;patch=1 \
+ file://reduce-nogpg-noise.patch;patch=1 \
+ "
+PR = "r0"
+
+SRCREV = "${SRCREV_pn-opkg}"
+
+EXTRA_OECONF += "--disable-gpg"
+
+# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
+do_configure_prepend() {
+ sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+}
+
+DEFAULT_PREFERENCE = "-1"