Commit 81529ee5 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

component/dcron: version up 4.5->4.6

parent 13d4b415
......@@ -8,12 +8,13 @@ parts = dcron-output
[dcron]
recipe = slapos.recipe.cmmi
shared = false
url = http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz
md5sum = 078833f3281f96944fc30392b1888326
url = https://github.com/ptchinster/dcron/archive/refs/tags/v4.6.zip
md5sum = d5bd12863547daf499187bc9b4e863a8
configure-command = true
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/noroot-no-globals.patch#623379916f48bd8292a28057c8bd30f7
${:_profile_base_location_}/noroot-no-globals.patch#cd8d0f6d1d2ee133d6341d1515832c0d
${:_profile_base_location_}/support_old_gcc.patch#4dc8c81b1d94474c3c15e0db7b5b60de
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
......
--- dcron-4.5/chuser.c
+++ dcron-4.5/chuser.c
@@ -14,6 +14,7 @@
diff --git a/chuser.c b/chuser.c
index 0d79dbc..ccc3acc 100644
--- a/chuser.c
+++ b/chuser.c
@@ -11,6 +11,7 @@
Prototype int ChangeUser(const char *user, char *dochdir);
+#if 0
int
ChangeUser(const char *user, char *dochdir)
{
+#if 0
struct passwd *pas;
/*
@@ -57,5 +58,8 @@
@@ -57,5 +58,7 @@ ChangeUser(const char *user, char *dochdir)
}
}
return(pas->pw_uid);
+#else
+ return getpwnam(user);
+#endif
}
+#endif
--- dcron-4.5/crontab.c
+++ dcron-4.5/crontab.c
@@ -88,7 +88,7 @@
diff --git a/crontab.c b/crontab.c
index b29e0d2..06df70f 100644
--- a/crontab.c
+++ b/crontab.c
@@ -88,7 +88,7 @@ main(int ac, char **av)
break;
case 'c':
/* getopt guarantees optarg != 0 here */
......@@ -27,8 +30,8 @@
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -316,9 +316,6 @@
printlogf(0, "-c option: superuser only\n");
@@ -318,9 +318,6 @@ GetReplaceStream(const char *user, const char *file)
close(filedes[0]);
......@@ -38,7 +41,7 @@
fd = open(file, O_RDONLY);
if (fd < 0) {
printlogf(0, "unable to open %s: %s", file, strerror(errno));
@@ -344,8 +341,6 @@
@@ -346,8 +343,6 @@ EditFile(const char *user, const char *file)
const char *ptr;
char visual[SMALL_BUFFER];
......@@ -47,9 +50,11 @@
if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) >= sizeof(visual))
if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) >= sizeof(visual))
ptr = PATH_VI;
--- dcron-4.5/job.c
+++ dcron-4.5/job.c
@@ -62,14 +62,6 @@
diff --git a/job.c b/job.c
index b5e02de..79650c2 100644
--- a/job.c
+++ b/job.c
@@ -63,14 +63,6 @@ RunJob(CronFile *file, CronLine *line)
* Change running state to the user in question
*/
......@@ -64,7 +69,7 @@
/* from this point we are unpriviledged */
if (DebugOpt)
@@ -295,14 +287,6 @@
@@ -296,14 +288,6 @@ EndJob(CronFile *file, CronLine *line, int exit_status)
* by the mailing and we already verified the mail file.
*/
......@@ -79,9 +84,11 @@
/* from this point we are unpriviledged */
/*
--- dcron-4.5/Makefile
+++ dcron-4.5/Makefile
@@ -3,7 +3,6 @@
diff --git a/Makefile b/Makefile
index 547febc..13829e6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@ VERSION = 4.5
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
PREFIX = /usr/local
......@@ -89,7 +96,7 @@
SCRONTABS = /etc/cron.d
CRONTABS = /var/spool/cron/crontabs
CRONSTAMPS = /var/spool/cron/cronstamps
@@ -20,10 +19,10 @@
@@ -20,10 +19,10 @@ MANDIR = $(PREFIX)/share/man
SHELL = /bin/sh
......@@ -101,9 +108,9 @@
+INSTALL_DATA = $(INSTALL) -D -m0644
+INSTALL_DIR = $(INSTALL) -d -m0755
CFLAGS ?= -O2
CFLAGS += -Wall -Wstrict-prototypes -Wno-missing-field-initializers
SRCS = main.c subs.c database.c job.c concat.c chuser.c
@@ -45,7 +44,6 @@
CFLAGS += -Wall -Wextra -Wstrict-prototypes -Wno-missing-field-initializers -Wfloat-equal -fstack-protector-all -Wformat-security -Wformat=2 -fPIE
CFLAGS += -Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,-z,relro -Wl,-z,now -Wl,-z,nodlopen -Wl,-z,-pie
@@ -47,7 +46,6 @@ all: $(PROTOS) crond crontab ;
echo "SBINDIR = $(SBINDIR)" >> config
echo "BINDIR = $(BINDIR)" >> config
echo "MANDIR = $(MANDIR)" >> config
......@@ -111,7 +118,7 @@
echo "SCRONTABS = $(SCRONTABS)" >> config
echo "CRONTABS = $(CRONTABS)" >> config
echo "CRONSTAMPS = $(CRONSTAMPS)" >> config
@@ -63,13 +61,10 @@
@@ -65,13 +63,10 @@ crontab: $(TABOBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
install:
......
diff --git a/main.c b/main.c
diff --git a/main.c b/main.c
index dcf3f23..3eb6332 100644
--- a/main.c
+++ b/main.c
@@ -130,7 +130,7 @@ main(int ac, char **av)
case 'd':
DebugOpt = 1;
LogLevel = LOG_DEBUG;
- [[fallthrough]]; //fall through to include f too
+ __attribute__((fallthrough)); //fall through to include f too
case 'f':
ForegroundOpt = 1;
break;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment