Index: head/sysutils/runit-faster/Makefile =================================================================== --- head/sysutils/runit-faster/Makefile (revision 503306) +++ head/sysutils/runit-faster/Makefile (revision 503307) @@ -1,102 +1,56 @@ # Created by: Sergei Kolobov # $FreeBSD$ PORTNAME= runit -DISTVERSION= ${RUNITVERSION}-${CONFVERSION} -RUNITVERSION= 2.1.2 -CONFVERSION= 0.1.36 +DISTVERSION= 2.1.3 CATEGORIES= sysutils -MASTER_SITES= http://smarden.org/runit/ \ - http://www.bayofrum.net/dist/runit/ \ - https://github.com/t6/freebsd-runit/releases/download/v${CONFVERSION}/:config \ - LOCAL/tobik:config \ - https://pkg.tobik.me/distfiles/:config +MASTER_SITES= https://github.com/t6/freebsd-runit/releases/download/v${DISTVERSION}/ \ + LOCAL/tobik PKGNAMESUFFIX= -faster -DISTFILES= runit-${RUNITVERSION}${EXTRACT_SUFX} \ - freebsd-runit-${CONFVERSION}${EXTRACT_SUFX}:config +DISTNAME= freebsd-runit-${DISTVERSION} MAINTAINER= tobik@FreeBSD.org COMMENT= Runit based init replacement for ${OPSYS} LICENSE= BSD3CLAUSE CC0-1.0 LICENSE_COMB= multi -LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/package/COPYING -LICENSE_FILE_CC0-1.0= ${WRKDIR}/freebsd-runit-${CONFVERSION}/README.md +LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= snooze:sysutils/snooze +USE_RC_SUBR= runsvdir + +MAKE_ENV= RUNITDIR=${RUNITDIR} \ + SBINDIR=${SBINDIR} \ + SVDIR=${PREFIX}/etc/sv + CONFLICTS_INSTALL= runit -PLIST_SUB= RUNITDIR=${RUNITDIR} SUB_FILES= pkg-message SUB_LIST= RUNITDIR=${RUNITDIR} -USE_RC_SUBR= runsvdir -WRKSRC= ${WRKDIR}/admin/runit-${RUNITVERSION} +PLIST_SUB= RUNITDIR=${RUNITDIR} +PORTDOCS= * + OPTIONS_DEFINE= DOCS ROOT OPTIONS_SUB= yes ROOT_DESC= Install bootstrap files into /etc/runit and /sbin -PORTDOCS= * - -ROOT_VARS= RUNITDIR=/etc/runit SBINDIR=/sbin ROOT_VARS_OFF= RUNITDIR=${ETCDIR} SBINDIR=${PREFIX}/sbin +ROOT_VARS= RUNITDIR=/etc/runit SBINDIR=/sbin post-patch: - @${REINPLACE_CMD} -e 's,/service/,/var/service,' \ - -e 's,/etc/runit,${RUNITDIR},' \ - -e 's,/sbin/runit,${SBINDIR}/runit,' \ - ${WRKSRC}/man/* ${WRKSRC}/doc/*.html \ - ${WRKSRC}/src/sv.c \ - ${WRKSRC}/src/runsvchdir.c \ - ${WRKSRC}/src/runit.c \ - ${WRKSRC}/src/runit.h + @${REINPLACE_CMD} 's,all: docs,all:,' ${WRKSRC}/Makefile -do-configure: - @${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/conf-cc - @${ECHO_CMD} "${CC}" > ${WRKSRC}/src/conf-ld - -do-build: - @cd ${WRKSRC} && package/compile - -do-install: - @${MKDIR} ${STAGEDIR}${RUNITDIR} ${STAGEDIR}${SBINDIR} - cd ${WRKSRC}/command && ${INSTALL_PROGRAM} runit runit-init \ - ${STAGEDIR}${SBINDIR} - cd ${WRKSRC}/command && ${INSTALL_PROGRAM} \ - chpst runsv runsvchdir runsvdir sv svlogd utmpset \ - ${STAGEDIR}${PREFIX}/sbin - ${INSTALL_MAN} ${WRKSRC}/man/*.8 ${STAGEDIR}${PREFIX}/man/man8 - @${DO_MAKE_BUILD} -C ${WRKDIR}/freebsd-runit-${CONFVERSION} \ - DESTDIR=${STAGEDIR} \ - LOCALBASE=${LOCALBASE} \ - PREFIX=${PREFIX} \ - RUNITDIR=${RUNITDIR} \ - SVDIR=${PREFIX}/etc/sv \ - install -# Point runit to the run directory (a necessity to let runit work on -# read-only root filesystems) and make sure rebooting and powering off -# can work correctly. - @${LN} -s /var/run/runit/reboot ${STAGEDIR}${RUNITDIR}/reboot - @${LN} -s /var/run/runit/stopit ${STAGEDIR}${RUNITDIR}/stopit - -do-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} \ - package/CHANGES package/README package/THANKS doc/*.html \ - ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/freebsd-runit-${CONFVERSION}/docs/runit-faster.md \ - ${STAGEDIR}${DOCSDIR} - post-install: # Micromanaging pkg-plist is no fun here... Generate it on the fly # instead. @${FIND} -s ${STAGEDIR}${PREFIX}/etc/sv -not -type d | ${SORT} | \ ${SED} -e 's,^${STAGEDIR},,' -e 's,^${PREFIX}/,,' \ >> ${TMPPLIST} do-test: - @cd ${WRKSRC} && package/check + @cd ${WRKSRC}/runit && package/check .include Index: head/sysutils/runit-faster/distinfo =================================================================== --- head/sysutils/runit-faster/distinfo (revision 503306) +++ head/sysutils/runit-faster/distinfo (revision 503307) @@ -1,5 +1,3 @@ -TIMESTAMP = 1554109612 -SHA256 (runit-2.1.2.tar.gz) = 6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18 -SIZE (runit-2.1.2.tar.gz) = 110916 -SHA256 (freebsd-runit-0.1.36.tar.gz) = 38dd91d6b92517eb0b4ad1c8be2c21037024e124f843e781ad415641103cf034 -SIZE (freebsd-runit-0.1.36.tar.gz) = 34592 +TIMESTAMP = 1559475686 +SHA256 (freebsd-runit-2.1.3.tar.gz) = 26721897eeb778cebe129f2520c502183e354270fc204b61cc0d038b8e26137e +SIZE (freebsd-runit-2.1.3.tar.gz) = 141256 Index: head/sysutils/runit-faster/files/patch-utmpx =================================================================== --- head/sysutils/runit-faster/files/patch-utmpx (revision 503306) +++ head/sysutils/runit-faster/files/patch-utmpx (nonexistent) @@ -1,90 +0,0 @@ -Since init lacks this code in FreeBSD (utx-logout is performed in pam_lastlog) -we will simply make utmpset.c a noop if utmpx is present. - -http://lists.freebsd.org/pipermail/freebsd-ports/2011-May/067872.html - ---- src/tryuwtmpx.c.orig 2014-08-10 18:22:35 UTC -+++ src/tryuwtmpx.c -@@ -1,9 +1,9 @@ - #include - #include - --struct futmpx ut; -+struct utmpx ut; - - int main(void) { -- char *s =ut.ut_name; -+ char *s =ut.ut_user; - return(0); - } ---- src/utmpset.c.orig 2014-08-10 18:22:35 UTC -+++ src/utmpset.c -@@ -22,6 +22,11 @@ const char *progname; - void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); } - - int utmp_logout(const char *line) { -+ -+#ifdef _UW_TMP_UTMPX -+ int ok = 1; /* do_nada(); */ -+#else /* _UW_TMP_UTMP */ -+ - int fd; - uw_tmp ut; - int ok =-1; -@@ -45,9 +50,13 @@ int utmp_logout(const char *line) { - break; - } - close(fd); -+#endif /* _UW_TMP_UTMPX */ - return(ok); - } - int wtmp_logout(const char *line) { -+#ifdef _UW_TMP_UTMPX -+ return 1; /* do_nada(); */ -+#else /* _UW_TMP_UTMP */ - int fd; - int len; - struct stat st; -@@ -79,6 +88,7 @@ int wtmp_logout(const char *line) { - } - close(fd); - return(1); -+#endif /* _UW_TMP_UTMPX */ - } - - int main (int argc, const char * const *argv, const char * const *envp) { ---- src/uw_tmp.h1.orig 2014-08-10 18:22:35 UTC -+++ src/uw_tmp.h1 -@@ -3,6 +3,8 @@ - - /* sysdep: -utmpx */ - -+#ifndef _UW_TMP_UTMP -+#define _UW_TMP_UTMP - #ifdef _PATH_UTMP - #define UW_TMP_UFILE _PATH_UTMP - #define UW_TMP_WFILE _PATH_WTMP -@@ -17,3 +19,4 @@ - #endif - - typedef struct utmp uw_tmp; -+#endif /* _UW_TMP_UTMP */ ---- src/uw_tmp.h2.orig 2014-08-10 18:22:35 UTC -+++ src/uw_tmp.h2 -@@ -3,11 +3,12 @@ - - /* sysdep: +utmpx */ - --#define UW_TMP_UFILE _UTMPX_FILE --#define UW_TMP_WFILE _WTMPX_FILE -- -+#ifndef _UW_TMP_UTMPX -+#define _UW_TMP_UTMPX - #ifndef ut_time - #define ut_time ut_tv.tv_sec - #endif - --typedef struct futmpx uw_tmp; -+typedef struct utmpx uw_tmp; -+ -+#endif /* _UW_TMP_UTMPX */ Property changes on: head/sysutils/runit-faster/files/patch-utmpx ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_runit.c =================================================================== --- head/sysutils/runit-faster/files/patch-src_runit.c (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_runit.c (nonexistent) @@ -1,15 +0,0 @@ ---- src/runit.c.orig 2018-03-06 14:39:19 UTC -+++ src/runit.c -@@ -309,10 +309,10 @@ int main (int argc, const char * const *argv, char * c - reboot_system(RB_AUTOBOOT); - } - else { --#ifdef RB_POWER_OFF -+#ifdef RB_POWEROFF - strerr_warn2(INFO, "power off...", 0); - sync(); -- reboot_system(RB_POWER_OFF); -+ reboot_system(RB_POWEROFF); - sleep(2); - #endif - #ifdef RB_HALT_SYSTEM Property changes on: head/sysutils/runit-faster/files/patch-src_runit.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_svlogd.c =================================================================== --- head/sysutils/runit-faster/files/patch-src_svlogd.c (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_svlogd.c (nonexistent) @@ -1,10 +0,0 @@ ---- src/svlogd.c.orig 2014-08-10 18:22:34 UTC -+++ src/svlogd.c -@@ -430,6 +430,7 @@ unsigned int logdir_open(struct logdir *ld, const char - 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(); Property changes on: head/sysutils/runit-faster/files/patch-src_svlogd.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_chkshsgr.c =================================================================== --- head/sysutils/runit-faster/files/patch-src_chkshsgr.c (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_chkshsgr.c (nonexistent) @@ -1,11 +0,0 @@ ---- src/chkshsgr.c.orig 2018-03-05 09:33:03 UTC -+++ src/chkshsgr.c -@@ -4,7 +4,7 @@ - - int main() - { -- short x[4]; -+ gid_t x[4]; - - x[0] = x[1] = 0; - if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1); Property changes on: head/sysutils/runit-faster/files/patch-src_chkshsgr.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_pathexec__run.c =================================================================== --- head/sysutils/runit-faster/files/patch-src_pathexec__run.c (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_pathexec__run.c (nonexistent) @@ -1,28 +0,0 @@ ---- src/pathexec_run.c.orig 2014-08-10 18:22:35 UTC -+++ src/pathexec_run.c -@@ -5,6 +5,7 @@ - #include "str.h" - #include "env.h" - #include "pathexec.h" -+#include - - static stralloc tmp; - -@@ -15,7 +16,7 @@ void pathexec_run(const char *file,const char * const - int savederrno; - - if (file[str_chr(file,'/')]) { -- execve(file,argv,envp); -+ execve(file,(char *const *)argv,(char *const *)envp); - return; - } - -@@ -32,7 +33,7 @@ void pathexec_run(const char *file,const char * const - if (!stralloc_cats(&tmp,file)) return; - if (!stralloc_0(&tmp)) return; - -- execve(tmp.s,argv,envp); -+ execve(tmp.s,(char *const *)argv,(char * const *)envp); - if (errno != error_noent) { - savederrno = errno; - if ((errno != error_acces) && (errno != error_perm) && (errno != error_isdir)) return; Property changes on: head/sysutils/runit-faster/files/patch-src_pathexec__run.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_prot.c =================================================================== --- head/sysutils/runit-faster/files/patch-src_prot.c (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_prot.c (nonexistent) @@ -1,20 +0,0 @@ ---- src/prot.c.orig 2018-03-05 09:31:55 UTC -+++ src/prot.c -@@ -3,7 +3,7 @@ - #include "hasshsgr.h" - #include "prot.h" - --int prot_gid(int gid) -+int prot_gid(gid_t gid) - { - #ifdef HASSHORTSETGROUPS - short x[2]; -@@ -15,7 +15,7 @@ int prot_gid(int gid) - return setgid(gid); /* _should_ be redundant, but on some systems it isn't */ - } - --int prot_uid(int uid) -+int prot_uid(uid_t uid) - { - return setuid(uid); - } Property changes on: head/sysutils/runit-faster/files/patch-src_prot.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/files/patch-src_prot.h =================================================================== --- head/sysutils/runit-faster/files/patch-src_prot.h (revision 503306) +++ head/sysutils/runit-faster/files/patch-src_prot.h (nonexistent) @@ -1,15 +0,0 @@ ---- src/prot.h.orig 2018-03-05 09:38:43 UTC -+++ src/prot.h -@@ -3,7 +3,10 @@ - #ifndef PROT_H - #define PROT_H - --extern int prot_gid(int); --extern int prot_uid(int); -+#include -+#include -+ -+extern int prot_gid(gid_t); -+extern int prot_uid(uid_t); - - #endif Property changes on: head/sysutils/runit-faster/files/patch-src_prot.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/runit-faster/pkg-plist =================================================================== --- head/sysutils/runit-faster/pkg-plist (revision 503306) +++ head/sysutils/runit-faster/pkg-plist (revision 503307) @@ -1,73 +1,74 @@ bin/svclone bin/svmod %%ROOT%%@dir %%RUNITDIR%% %%ROOT%%@dir %%RUNITDIR%%/core-services %%RUNITDIR%%/1 %%RUNITDIR%%/2 %%RUNITDIR%%/3 %%RUNITDIR%%/core-services/11-devmatch.sh %%RUNITDIR%%/core-services/11-kld.sh %%RUNITDIR%%/core-services/11-set-defaults.sh @sample %%RUNITDIR%%/core-services/12-console.sh.sample @sample %%RUNITDIR%%/core-services/30-geli.sh.sample %%RUNITDIR%%/core-services/31-fsck.sh %%RUNITDIR%%/core-services/31-mount.sh %%RUNITDIR%%/core-services/31-zfs-mount.sh %%RUNITDIR%%/core-services/33-init-var.sh %%RUNITDIR%%/core-services/33-microcode_update.sh %%RUNITDIR%%/core-services/33-savecore.sh %%RUNITDIR%%/core-services/33-set-dumpdev.sh %%RUNITDIR%%/core-services/33-swap.sh %%RUNITDIR%%/core-services/41-devfs-rules.sh %%RUNITDIR%%/core-services/41-entropy.sh %%RUNITDIR%%/core-services/41-hostid.sh %%RUNITDIR%%/core-services/41-hostname.sh %%RUNITDIR%%/core-services/41-ldconfig.sh %%RUNITDIR%%/core-services/41-loopback.sh %%RUNITDIR%%/core-services/41-mixer.sh %%RUNITDIR%%/core-services/41-nextboot.sh %%RUNITDIR%%/core-services/41-rctl.sh @sample %%RUNITDIR%%/core-services/44-bhyve-network.sh.sample @sample %%RUNITDIR%%/core-services/44-jail-network.sh.sample %%RUNITDIR%%/core-services/51-pf.sh %%RUNITDIR%%/core-services/91-cleanup.sh @sample %%RUNITDIR%%/core-services/92-nfs.sh.sample %%RUNITDIR%%/core-services/93-ctld.sh %%RUNITDIR%%/core-services/95-mount-late.sh %%RUNITDIR%%/core-services/95-swap-late.sh %%RUNITDIR%%/core-services/99-binmisc.sh +%%RUNITDIR%%/core-services/99-linux.sh %%RUNITDIR%%/core-services/99-ports-env.sh %%RUNITDIR%%/core-services/99-start-jails.sh %%RUNITDIR%%/ctrlaltdel %%RUNITDIR%%/functions %%RUNITDIR%%/jail %%RUNITDIR%%/reboot @dir %%RUNITDIR%%/runsvdir @dir %%RUNITDIR%%/runsvdir/default %%RUNITDIR%%/stopit man/man7/runit-faster.7.gz man/man8/chpst.8.gz man/man8/runit-init.8.gz man/man8/runit.8.gz man/man8/runsv.8.gz man/man8/runsvchdir.8.gz man/man8/runsvdir.8.gz man/man8/sv.8.gz man/man8/svclone.8.gz man/man8/svmod.8.gz man/man8/svlogd.8.gz man/man8/utmpset.8.gz sbin/chpst %%ROOT%%/sbin/runit %%NO_ROOT%%sbin/runit %%ROOT%%/sbin/runit-init %%NO_ROOT%%sbin/runit-init sbin/runsv sbin/runsvchdir sbin/runsvdir sbin/sv sbin/svlogd sbin/utmpset @postexec [ ! -e %%RUNITDIR%%/runsvdir/current ] && cd %%RUNITDIR%%/runsvdir && ln -s default current @postexec ln -sF /var/run/runit/runsvdir/current /var/service @rmtry /var/service