View | Details | Raw Unified | Return to bug 35886
Collapse All | Expand All

(-)a/anacron-2.3-re.patch (-2 / +2 lines)
Lines 287-294 Link Here
287
-    free(name);
287
-    free(name);
288
-    fcntl(fd, F_SETFD, 1);    /* set close-on-exec flag */
288
-    fcntl(fd, F_SETFD, 1);    /* set close-on-exec flag */
289
-    return fd;
289
-    return fd;
290
+	mkdir("/var/run/anacron", 0700);
290
+	// mkdir("/var/run/anacron", 0700);
291
+	char	name[] = "/var/run/anacron/XXXXXX";
291
+	char	name[] = "/run/anacron/XXXXXX";
292
+	int	fd = mkstemp( name );
292
+	int	fd = mkstemp( name );
293
+	if ( fd < 0 )
293
+	if ( fd < 0 )
294
+		die_e( "Can't create temporary file" );
294
+		die_e( "Can't create temporary file" );
(-)a/anacron.spec (-3 / +8 lines)
Lines 1-6 Link Here
1
Name: anacron
1
Name: anacron
2
Version: 2.3
2
Version: 2.3
3
Release: alt7
3
Release: alt8
4
Epoch: 1
4
Epoch: 1
5
5
6
Summary: A cron-like program that doesn't go by time
6
Summary: A cron-like program that doesn't go by time
Lines 19-25 Source5: anacron.service Link Here
19
Patch1: anacron-2.3-re.patch
19
Patch1: anacron-2.3-re.patch
20
Patch2: anacron-2.3-alt-lock-file.patch
20
Patch2: anacron-2.3-alt-lock-file.patch
21
21
22
%define lockfile %_lockdir/subsys/anacron
22
%define lockfile /run/lock/subsys/anacron
23
23
24
%description
24
%description
25
Anacron (like `anac(h)ronistic') is a periodic command scheduler.  It
25
Anacron (like `anac(h)ronistic') is a periodic command scheduler.  It
Lines 59-65 install -pD -m644 %_sourcedir/anacron.service %buildroot%_unitdir/anacron.servic Link Here
59
mkdir -p %buildroot/etc/sysconfig/limits.d
59
mkdir -p %buildroot/etc/sysconfig/limits.d
60
ln -s crond %buildroot/etc/sysconfig/limits.d/anacron
60
ln -s crond %buildroot/etc/sysconfig/limits.d/anacron
61
61
62
mkdir -p %buildroot/var/{run,spool}/anacron
62
mkdir -p %buildroot/var/spool/anacron
63
64
mkdir -p %buildroot%_tmpfilesdir/
65
cat >%buildroot%_tmpfilesdir/%name.conf<<EOF
66
d /run/anacron 0700 root root -
67
EOF
63
68
64
for f in cron.{dai,week,month}ly; do
69
for f in cron.{dai,week,month}ly; do
65
	mkdir -p "%buildroot/etc/$f"
70
	mkdir -p "%buildroot/etc/$f"

Return to bug 35886