initial transfer

master
artoo 4 years ago
parent 18f4f0a3b0
commit 8746a80272
  1. 79
      repos/core-x86_64/PKGBUILD
  2. 11
      repos/core-x86_64/clearmem.patch
  3. 13
      repos/core-x86_64/svlogd.patch
  4. 56
      repos/core-x86_64/utmpset-time_t.patch
  5. 79
      trunk/PKGBUILD
  6. 11
      trunk/clearmem.patch
  7. 13
      trunk/svlogd.patch
  8. 56
      trunk/utmpset-time_t.patch

@ -0,0 +1,79 @@
# Maintainer: Chris Cromer <chris@cromer.cl>
# Maintainer: Muhammad Herdiansyah <koni@artixlinux.org>
_url=https://gitea.artixlinux.org/artix/runit-artix
_pkgname=runit-artix
_pkgver=20180730
# set default service path to /run/runit/service
_servicedir=/run/runit/service
pkgname=runit
pkgver=2.1.2
pkgrel=12.1
pkgdesc='a cross-platform Unix init scheme with service supervision'
arch=('x86_64')
url='http://smarden.org/runit/'
license=('BSD')
makedepends=('git')
backup=('etc/rc/rc.local')
depends=('runit-rc')
provides=('svc-manager')
conflicts=('svc-manager')
source=("http://smarden.org/${pkgname}/${pkgname}-${pkgver}.tar.gz"
"${_pkgname}-${_pkgver}.tar.gz::${_url}/archive/20180730.tar.gz"
"clearmem.patch"
"svlogd.patch"
"utmpset-time_t.patch")
sha256sums=('6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18'
'4970c066b4737df415a5a0bafea00a2d6b79718890512d3a0dbbf40af7dad159'
'19b5e99135f153d07052f2dff707430af9faeabc717a5740ea58a8a783f609de'
'9cf269264c0713975be1b3bc9dd3b5b3bb1e2078ac596527370a902d8d025a5a'
'527f68f501cc9eb4bbab33f8ad374822624342c7d74b5c795efe4aac6b3f170a')
prepare() {
# set default service path to /run/runit/service
cd "${srcdir}/admin/${pkgname}-${pkgver}"
sed -i "s|/service/|${_servicedir}/|" src/sv.c
# apply patches
patch -p1 -i "${srcdir}/clearmem.patch"
patch -p1 -i "${srcdir}/svlogd.patch"
patch -p1 -i "${srcdir}/utmpset-time_t.patch"
}
build() {
cd ${_pkgname}
make SERVICEDIR="${_servicedir}"
cd "${srcdir}/admin/${pkgname}-${pkgver}"
CFLAGS="${CFLAGS} -static"
LDFLAGS="${LDFLAGS} -static"
package/compile
}
check() {
cd "${srcdir}/admin/${pkgname}-${pkgver}"
package/check
}
package() {
# commands
install -dm755 "${pkgdir}/usr/bin"
install -Dm755 ${srcdir}/admin/${pkgname}-${pkgver}/command/* "${pkgdir}/usr/bin"
cd ${_pkgname}
make DESTDIR="${pkgdir}" PREFIX="/usr" SERVICEDIR="${_servicedir}" install-runit
# man pages
install -dm755 "${pkgdir}/usr/share/man/man8"
install -Dm644 ${srcdir}/admin/${pkgname}-${pkgver}/man/* "${pkgdir}/usr/share/man/man8"
# license
install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
install -Dm644 "${srcdir}/admin/${pkgname}-${pkgver}/package/COPYING" ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
sed -n '/To the extent/,/0/p' README.md > "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}

@ -0,0 +1,11 @@
diff -Naur runit-2.1.2/src/svlogd.c runit-2.1.2/src/svlogd.c
--- runit-2.1.2/src/svlogd.c 2014-08-10 11:22:34.000000000 -0700
+++ runit-2.1.2/src/svlogd.c 2018-03-03 03:28:08.243085845 -0800
@@ -705,6 +705,7 @@
coe(fdwdir);
dir =(struct logdir*)alloc(dirn *sizeof(struct logdir));
if (! dir) die_nomem();
+ memset(dir, 0, dirn * sizeof(struct logdir));
for (i =0; i < dirn; ++i) {
dir[i].fddir =-1; dir[i].fdcur =-1;
dir[i].btmp =(char*)alloc(buflen *sizeof(char));

@ -0,0 +1,13 @@
Initialize all fields of sockaddr_in.
http://skarnet.org/cgi-bin/archive.cgi?2:mss:1163:201602:gpiglpbjdemlioaeabbn
--- runit-2.1.2/src/svlogd.c 2014-08-10 15:22:34.000000000 -0300
+++ runit-2.1.2/src/svlogd.c 2016-02-04 22:53:52.910965361 -0300
@@ -430,6 +430,7 @@
ld->name =(char*)fn;
ld->ppid =0;
ld->match ='+';
+ ld->udpaddr.sin_family =AF_INET;
ld->udpaddr.sin_port =0;
ld->udponly =0;
while (! stralloc_copys(&ld->prefix, "")) pause_nomem();

@ -0,0 +1,56 @@
From 20a0afcd367666efc17c59cf121a0d991ff1bd09 Mon Sep 17 00:00:00 2001
From: Gerrit Pape <pape@smarden.org>
Date: Thu, 31 Jul 2014 12:25:49 +0000
Subject: [PATCH] utmpset.c: mixes "int32_t *" and "time_t *"
Don't pass int32_t to time(), thx Lorenzo Beretta,
https://bugs.debian.org/754849
---
runit-2.1.2/src/utmpset.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/runit-2.1.2/src/utmpset.c b/runit-2.1.2/src/utmpset.c
index eea41a5..2e8a525 100644
--- runit-2.1.2/src/utmpset.c
+++ runit-2.1.2/src/utmpset.c
@@ -24,6 +24,7 @@ void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); }
int utmp_logout(const char *line) {
int fd;
uw_tmp ut;
+ time_t t;
int ok =-1;
if ((fd =open(UW_TMP_UFILE, O_RDWR, 0)) < 0)
@@ -35,7 +36,8 @@ int utmp_logout(const char *line) {
if (!ut.ut_name[0] || (str_diff(ut.ut_line, line) != 0)) continue;
memset(ut.ut_name, 0, sizeof ut.ut_name);
memset(ut.ut_host, 0, sizeof ut.ut_host);
- if (time(&ut.ut_time) == -1) break;
+ if (time(&t) == -1) break;
+ ut.ut_time = t;
#ifdef DEAD_PROCESS
ut.ut_type =DEAD_PROCESS;
#endif
@@ -52,6 +54,7 @@ int wtmp_logout(const char *line) {
int len;
struct stat st;
uw_tmp ut;
+ time_t t;
if ((fd = open_append(UW_TMP_WFILE)) == -1)
strerr_die4sys(111, FATAL, "unable to open ", UW_TMP_WFILE, ": ");
@@ -65,10 +68,11 @@ int wtmp_logout(const char *line) {
memset(&ut, 0, sizeof(uw_tmp));
if ((len =str_len(line)) > sizeof ut.ut_line) len =sizeof ut.ut_line -2;
byte_copy(ut.ut_line, len, line);
- if (time(&ut.ut_time) == -1) {
+ if (time(&t) == -1) {
close(fd);
return(-1);
}
+ ut.ut_time = t;
#ifdef DEAD_PROCESS
ut.ut_type =DEAD_PROCESS;
#endif
--
2.0.1

@ -0,0 +1,79 @@
# Maintainer: Chris Cromer <chris@cromer.cl>
# Maintainer: Muhammad Herdiansyah <koni@artixlinux.org>
_url=https://gitea.artixlinux.org/artix/runit-artix
_pkgname=runit-artix
_pkgver=20180730
# set default service path to /run/runit/service
_servicedir=/run/runit/service
pkgname=runit
pkgver=2.1.2
pkgrel=12.2
pkgdesc='a cross-platform Unix init scheme with service supervision'
arch=('x86_64')
url='http://smarden.org/runit/'
license=('BSD')
makedepends=('git')
backup=('etc/rc/rc.local')
depends=('runit-rc')
provides=('svc-manager')
conflicts=('svc-manager')
source=("http://smarden.org/${pkgname}/${pkgname}-${pkgver}.tar.gz"
"${_pkgname}-${_pkgver}.tar.gz::${_url}/archive/20180730.tar.gz"
"clearmem.patch"
"svlogd.patch"
"utmpset-time_t.patch")
sha256sums=('6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18'
'4970c066b4737df415a5a0bafea00a2d6b79718890512d3a0dbbf40af7dad159'
'19b5e99135f153d07052f2dff707430af9faeabc717a5740ea58a8a783f609de'
'9cf269264c0713975be1b3bc9dd3b5b3bb1e2078ac596527370a902d8d025a5a'
'527f68f501cc9eb4bbab33f8ad374822624342c7d74b5c795efe4aac6b3f170a')
prepare() {
# set default service path to /run/runit/service
cd "${srcdir}/admin/${pkgname}-${pkgver}"
sed -i "s|/service/|${_servicedir}/|" src/sv.c
# apply patches
patch -p1 -i "${srcdir}/clearmem.patch"
patch -p1 -i "${srcdir}/svlogd.patch"
patch -p1 -i "${srcdir}/utmpset-time_t.patch"
}
build() {
cd ${_pkgname}
make SERVICEDIR="${_servicedir}"
cd "${srcdir}/admin/${pkgname}-${pkgver}"
CFLAGS="${CFLAGS} -static"
LDFLAGS="${LDFLAGS} -static"
package/compile
}
check() {
cd "${srcdir}/admin/${pkgname}-${pkgver}"
package/check
}
package() {
# commands
install -dm755 "${pkgdir}/usr/bin"
install -Dm755 ${srcdir}/admin/${pkgname}-${pkgver}/command/* "${pkgdir}/usr/bin"
cd ${_pkgname}
make DESTDIR="${pkgdir}" PREFIX="/usr" SERVICEDIR="${_servicedir}" install-runit
# man pages
install -dm755 "${pkgdir}/usr/share/man/man8"
install -Dm644 ${srcdir}/admin/${pkgname}-${pkgver}/man/* "${pkgdir}/usr/share/man/man8"
# license
install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
install -Dm644 "${srcdir}/admin/${pkgname}-${pkgver}/package/COPYING" ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
sed -n '/To the extent/,/0/p' README.md > "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}

@ -0,0 +1,11 @@
diff -Naur runit-2.1.2/src/svlogd.c runit-2.1.2/src/svlogd.c
--- runit-2.1.2/src/svlogd.c 2014-08-10 11:22:34.000000000 -0700
+++ runit-2.1.2/src/svlogd.c 2018-03-03 03:28:08.243085845 -0800
@@ -705,6 +705,7 @@
coe(fdwdir);
dir =(struct logdir*)alloc(dirn *sizeof(struct logdir));
if (! dir) die_nomem();
+ memset(dir, 0, dirn * sizeof(struct logdir));
for (i =0; i < dirn; ++i) {
dir[i].fddir =-1; dir[i].fdcur =-1;
dir[i].btmp =(char*)alloc(buflen *sizeof(char));

@ -0,0 +1,13 @@
Initialize all fields of sockaddr_in.
http://skarnet.org/cgi-bin/archive.cgi?2:mss:1163:201602:gpiglpbjdemlioaeabbn
--- runit-2.1.2/src/svlogd.c 2014-08-10 15:22:34.000000000 -0300
+++ runit-2.1.2/src/svlogd.c 2016-02-04 22:53:52.910965361 -0300
@@ -430,6 +430,7 @@
ld->name =(char*)fn;
ld->ppid =0;
ld->match ='+';
+ ld->udpaddr.sin_family =AF_INET;
ld->udpaddr.sin_port =0;
ld->udponly =0;
while (! stralloc_copys(&ld->prefix, "")) pause_nomem();

@ -0,0 +1,56 @@
From 20a0afcd367666efc17c59cf121a0d991ff1bd09 Mon Sep 17 00:00:00 2001
From: Gerrit Pape <pape@smarden.org>
Date: Thu, 31 Jul 2014 12:25:49 +0000
Subject: [PATCH] utmpset.c: mixes "int32_t *" and "time_t *"
Don't pass int32_t to time(), thx Lorenzo Beretta,
https://bugs.debian.org/754849
---
runit-2.1.2/src/utmpset.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/runit-2.1.2/src/utmpset.c b/runit-2.1.2/src/utmpset.c
index eea41a5..2e8a525 100644
--- runit-2.1.2/src/utmpset.c
+++ runit-2.1.2/src/utmpset.c
@@ -24,6 +24,7 @@ void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); }
int utmp_logout(const char *line) {
int fd;
uw_tmp ut;
+ time_t t;
int ok =-1;
if ((fd =open(UW_TMP_UFILE, O_RDWR, 0)) < 0)
@@ -35,7 +36,8 @@ int utmp_logout(const char *line) {
if (!ut.ut_name[0] || (str_diff(ut.ut_line, line) != 0)) continue;
memset(ut.ut_name, 0, sizeof ut.ut_name);
memset(ut.ut_host, 0, sizeof ut.ut_host);
- if (time(&ut.ut_time) == -1) break;
+ if (time(&t) == -1) break;
+ ut.ut_time = t;
#ifdef DEAD_PROCESS
ut.ut_type =DEAD_PROCESS;
#endif
@@ -52,6 +54,7 @@ int wtmp_logout(const char *line) {
int len;
struct stat st;
uw_tmp ut;
+ time_t t;
if ((fd = open_append(UW_TMP_WFILE)) == -1)
strerr_die4sys(111, FATAL, "unable to open ", UW_TMP_WFILE, ": ");
@@ -65,10 +68,11 @@ int wtmp_logout(const char *line) {
memset(&ut, 0, sizeof(uw_tmp));
if ((len =str_len(line)) > sizeof ut.ut_line) len =sizeof ut.ut_line -2;
byte_copy(ut.ut_line, len, line);
- if (time(&ut.ut_time) == -1) {
+ if (time(&t) == -1) {
close(fd);
return(-1);
}
+ ut.ut_time = t;
#ifdef DEAD_PROCESS
ut.ut_type =DEAD_PROCESS;
#endif
--
2.0.1
Loading…
Cancel
Save