diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-19 22:26:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-19 22:26:40 +0900 |
| commit | 1c6f30379e0b21dad7f8da21e9c7736c1fa72997 (patch) | |
| tree | 5d24065c75a14a360d3ba09903b2525a737519d5 /internal/rosa/package | |
| parent | 009a4e0d583d14ebe328473df6468424587087a7 (diff) | |
internal/rosa/package: migrate bzip2, curl, connman
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package')
| -rw-r--r-- | internal/rosa/package/bzip2.az | 27 | ||||
| -rw-r--r-- | internal/rosa/package/connman/alpine-musl-res.patch | 59 | ||||
| -rw-r--r-- | internal/rosa/package/connman/package.az | 37 | ||||
| -rw-r--r-- | internal/rosa/package/curl.az | 47 |
4 files changed, 170 insertions, 0 deletions
diff --git a/internal/rosa/package/bzip2.az b/internal/rosa/package/bzip2.az new file mode 100644 index 00000000..12fb1d7c --- /dev/null +++ b/internal/rosa/package/bzip2.az @@ -0,0 +1,27 @@ +package bzip2 { + description = "a freely available, patent free, high-quality data compressor"; + website = "https://sourceware.org/bzip2"; + anitya = 237; + + version* = "1.0.8"; + source = remoteTar { + url = "https://sourceware.org/pub/bzip2/bzip2-"+version+".tar.gz"; + checksum = "cTLykcco7boom-s05H1JVsQi1AtChYL84nXkg_92Dm1Xt94Ob_qlMg_-NSguIK-c"; + compress = gzip; + }; + + // uses source tree as scratch space + writable = true; + enterSource = true; + + exec = make { + skipConfigure = true; + skipCheck = true; + inPlace = true; + + make = [ + "CC=cc", + ]; + install = "make PREFIX=/work/system install"; + }; +} diff --git a/internal/rosa/package/connman/alpine-musl-res.patch b/internal/rosa/package/connman/alpine-musl-res.patch new file mode 100644 index 00000000..3786b86c --- /dev/null +++ b/internal/rosa/package/connman/alpine-musl-res.patch @@ -0,0 +1,59 @@ +musl does not implement res_ninit + +--- a/gweb/gresolv.c ++++ b/gweb/gresolv.c +@@ -877,8 +877,6 @@ + resolv->index = index; + resolv->nameserver_list = NULL; + +- res_ninit(&resolv->res); +- + return resolv; + } + +@@ -918,8 +916,6 @@ + + flush_nameservers(resolv); + +- res_nclose(&resolv->res); +- + g_free(resolv); + } + +@@ -1022,24 +1018,19 @@ + debug(resolv, "hostname %s", hostname); + + if (!resolv->nameserver_list) { +- int i; +- +- for (i = 0; i < resolv->res.nscount; i++) { +- char buf[100]; +- int family = resolv->res.nsaddr_list[i].sin_family; +- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr; +- +- if (family != AF_INET && +- resolv->res._u._ext.nsaddrs[i]) { +- family = AF_INET6; +- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr; ++ FILE *f = fopen("/etc/resolv.conf", "r"); ++ if (f) { ++ char line[256], *s; ++ int i; ++ while (fgets(line, sizeof(line), f)) { ++ if (strncmp(line, "nameserver", 10) || !isspace(line[10])) ++ continue; ++ for (s = &line[11]; isspace(s[0]); s++); ++ for (i = 0; s[i] && !isspace(s[i]); i++); ++ s[i] = 0; ++ g_resolv_add_nameserver(resolv, s, 53, 0); + } +- +- if (family != AF_INET && family != AF_INET6) +- continue; +- +- if (inet_ntop(family, sa_addr, buf, sizeof(buf))) +- g_resolv_add_nameserver(resolv, buf, 53, 0); ++ fclose(f); + } + + if (!resolv->nameserver_list) diff --git a/internal/rosa/package/connman/package.az b/internal/rosa/package/connman/package.az new file mode 100644 index 00000000..2bddeb83 --- /dev/null +++ b/internal/rosa/package/connman/package.az @@ -0,0 +1,37 @@ +package connman { + description = "a daemon for managing Internet connections"; + website = "https://git.kernel.org/pub/scm/network/connman/connman.git"; + anitya = 337; + + version* = "2.0"; + source = remoteTar { + url = "https://git.kernel.org/pub/scm/network/connman/connman.git/"+ + "snapshot/connman-"+version+".tar.gz"; + checksum = "MhVTdJOhndnZn2SWd8URKo_Pj7Zvc14tntEbrVOf9L3yVWJvpb3v3Q6104tWJgtW"; + compress = gzip; + }; + patches = [ "alpine-musl-res.patch" ]; + + exec = make { + generate = "./bootstrap"; + }; + + inputs = [ + automake, + libtool, + pkg-config, + + dbus, + iptables, + gnutls, + readline, + kernel-headers, + ]; + + runtime = [ + dbus, + iptables, + gnutls, + readline, + ]; +} diff --git a/internal/rosa/package/curl.az b/internal/rosa/package/curl.az new file mode 100644 index 00000000..947218fc --- /dev/null +++ b/internal/rosa/package/curl.az @@ -0,0 +1,47 @@ +package curl { + description = "command line tool and library for transferring data with URLs"; + website = "https://curl.se"; + anitya = 381; + + version* = "8.20.0"; + source = remoteTar { + url = "https://curl.se/download/curl-"+version+".tar.bz2"; + checksum = "xyHXwrngIRGMasuzhn-I5MSCOhktwINbsWt1f_LuR-5jRVvyx_g6U1EQfDLEbr9r"; + compress = bzip2; + }; + + // remove broken test + writable = true; + early = "\nchmod +w tests/data && rm -f tests/data/test459\n"; + + exec = make { + configure = { + "with-openssl"; + "with-ca-bundle": "/system/etc/ssl/certs/ca-bundle.crt"; + + "disable-smb"; + }; + + check = [ + "TFLAGS=" + jobsLFlagE, + "test-nonflaky", + ]; + }; + + inputs = [ + perl, + python, + pkg-config, + diffutils, + + libpsl, + openssl, + ]; + + runtime = [ + zlib, + zstd, + libpsl, + openssl, + ]; +} |
