ALT Linux Bugzilla
– Attachment 7943 Details for
Bug 35883
Миграция на /run и /run/lock
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Миграция на /run и /run/lock
run-migration.patch (text/plain), 5.80 KB, created by
Антон Мидюков
on 2019-01-12 17:07:24 MSK
(
hide
)
Description:
Миграция на /run и /run/lock
Filename:
MIME Type:
Creator:
Антон Мидюков
Created:
2019-01-12 17:07:24 MSK
Size:
5.80 KB
patch
obsolete
>diff --git a/.gear/rules b/.gear/rules >index adae0d3..27abca5 100644 >--- a/.gear/rules >+++ b/.gear/rules >@@ -1,3 +1,4 @@ > copy: *.init > copy: *.service > tar.xz: acpid >+copy?: *.patch >diff --git a/acpid.init b/acpid.init >index b4ee6fa..17b08f2 100644 >--- a/acpid.init >+++ b/acpid.init >@@ -14,8 +14,8 @@ WITHOUT_RC_COMPAT=1 > # Source function library. > . /etc/init.d/functions > >-PIDFILE=/var/run/acpid.pid >-LOCKFILE=/var/lock/subsys/acpid >+PIDFILE=/run/acpid.pid >+LOCKFILE=/run/lock/subsys/acpid > RETVAL=0 > > SourceIfNotEmpty /etc/sysconfig/acpid >diff --git a/acpid.spec b/acpid.spec >index 2a5c381..bc032c1 100644 >--- a/acpid.spec >+++ b/acpid.spec >@@ -1,6 +1,6 @@ > Name: acpid > Version: 2.0.22 >-Release: alt1 >+Release: alt2 > Epoch: 1 > Summary: ACPI kernel daemon and control utility > License: GPL >@@ -13,6 +13,7 @@ PreReq: sysvinit-utils > Source0: %name-%version.tar.xz > Source1: %name.init > Source2: %name.service >+Patch: replace_rundir-%version.patch > > %description > The ACPI specification defines power and system management functions >@@ -32,6 +33,7 @@ Power event config for acpid > > %prep > %setup >+%patch -p2 > > %build > %autoreconf >@@ -57,7 +59,7 @@ __EOF__ > > %post > if pidof %name >/dev/null 2>&1; then >- [ -f %_var/run/%name.pid ] || pidof %name > %_var/run/%name.pid >+ [ -f /run/%name.pid ] || pidof %name > /run/%name.pid > fi > %post_service %name >diff --git a/replace_rundir-2.0.22.patch b/replace_rundir-2.0.22.patch >new file mode 100644 >index 0000000..287691d >--- /dev/null >+++ b/replace_rundir-2.0.22.patch >@@ -0,0 +1,113 @@ >+diff --git a/acpid/acpi_listen.8 b/acpid/acpi_listen.8 >+index d97efae..413a6b0 100644 >+--- a/acpid/acpi_listen.8 >++++ b/acpid/acpi_listen.8 >+@@ -19,7 +19,7 @@ Receive up to a maximum number of ACPI events, then exit. >+ .TP >+ .BI \-s "\fR, \fP" \--socketfile " filename" >+ This option changes the name of the UNIX domain socket which \fBacpid\fP opens. >+-Default is \fI/var/run/acpid.socket\fP. >++Default is \fI/run/acpid.socket\fP. >+ .TP >+ .BI \-t "\fR, \fP" \--time " seconds" >+ Listen for the specified time in seconds, before exiting. >+@@ -32,7 +32,7 @@ Show help and exit. >+ >+ .SH FILES >+ .PD 0 >+-.B /var/run/acpid.socket >++.B /run/acpid.socket >+ .PD >+ >+ .SH BUGS >+diff --git a/acpid/acpid.8 b/acpid/acpid.8 >+index 3a6b047..1e4985d 100644 >+--- a/acpid/acpid.8 >++++ b/acpid/acpid.8 >+@@ -55,7 +55,7 @@ generate spurious battery events at frequent intervals. The name of >+ this pseudo-action may be redefined with a commandline option. >+ .PP >+ In addition to rule files, \fBacpid\fP also accepts connections on a UNIX >+-domain socket (\fI/var/run/acpid.socket\fP by default). Any application may >++domain socket (\fI/run/acpid.socket\fP by default). Any application may >+ connect to this socket. Once connected, \fBacpid\fP will send the text of >+ all ACPI events to the client. The client has the responsibility of filtering >+ for messages about which it cares. \fBacpid\fP will not close the client >+@@ -120,7 +120,7 @@ This option changes the permissions of the UNIX domain socket to which >+ .TP >+ .BI \-s "\fR, \fP" \-\-socketfile " filename" >+ This option changes the name of the UNIX domain socket which \fBacpid\fP opens. >+-Default is \fI/var/run/acpid.socket\fP. >++Default is \fI/run/acpid.socket\fP. >+ .TP >+ .BI \-S "\fR, \fP" \-\-nosocket " filename" >+ This option tells \fBacpid\fP not to open a UNIX domain socket. This >+@@ -129,7 +129,7 @@ overrides the \fI-s\fP option, and negates all other socket options. >+ .BI \-p "\fR, \fP" \-\-pidfile " filename" >+ This option tells \fBacpid\fP to use the specified file as its pidfile. If >+ the file exists, it will be removed and over-written. >+-Default is \fI/var/run/acpid.pid\fP. >++Default is \fI/run/acpid.pid\fP. >+ .TP >+ .BI \-r "\fR, \fP" \-\-dropaction " action" >+ This option defines the pseudo-action which tells \fBacpid\fP to abort >+@@ -180,11 +180,11 @@ The script will then shut down the system. >+ .br >+ .B /etc/acpi/ >+ .br >+-.B /var/run/acpid.socket >++.B /run/acpid.socket >+ .br >+-.B /var/run/acpid.pid >++.B /run/acpid.pid >+ .br >+-.B /var/lock/acpid >++.B /run/lock/acpid >+ .br >+ .PD >+ .SH BUGS >+diff --git a/acpid/acpid.h b/acpid/acpid.h >+index 7c88b4e..cdeff83 100644 >+--- a/acpid/acpid.h >++++ b/acpid/acpid.h >+@@ -26,11 +26,11 @@ >+ #define ACPI_PROCDIR "/proc/acpi" >+ #define ACPID_EVENTFILE ACPI_PROCDIR "/event" >+ #define ACPID_CONFDIR "/etc/acpi/events" >+-#define ACPID_SOCKETFILE "/var/run/acpid.socket" >++#define ACPID_SOCKETFILE "/run/acpid.socket" >+ #define ACPID_SOCKETMODE 0666 >+ #define ACPID_CLIENTMAX 256 >+-#define ACPID_PIDFILE "/var/run/acpid.pid" >+-#define ACPID_LOCKFILE "/var/lock/acpid" >++#define ACPID_PIDFILE "/run/acpid.pid" >++#define ACPID_LOCKFILE "/run/lock/acpid" >+ #define ACPID_MAX_ERRS 5 >+ >+ /* ??? make these changeable by commandline option? */ >+diff --git a/acpid/samples/powerbtn/powerbtn.sh b/acpid/samples/powerbtn/powerbtn.sh >+index 39a3d9b..f2927b4 100755 >+--- a/acpid/samples/powerbtn/powerbtn.sh >++++ b/acpid/samples/powerbtn/powerbtn.sh >+@@ -43,7 +43,7 @@ getXconsole() { >+ } >+ >+ # Skip if we are just in the middle of resuming. >+-test -f /var/lock/acpisleep && exit 0 >++test -f /run/lock/acpisleep && exit 0 >+ >+ # If the current X console user is running a power management daemon that >+ # handles suspend/resume requests, let them handle policy. >+diff --git a/acpid/samples/powerbtn/powerbtn.sh.old b/acpid/samples/powerbtn/powerbtn.sh.old >+index e5a3e35..9d149f7 100755 >+--- a/acpid/samples/powerbtn/powerbtn.sh.old >++++ b/acpid/samples/powerbtn/powerbtn.sh.old >+@@ -10,7 +10,7 @@ >+ # Skip if we are in the middle of resuming. Otherwise we may power down the >+ # system as it is coming back up. >+ # See 98-acpi-unlock.sh and 05-acpi-lock.sh in Debian. >+-test -f /var/lock/acpisleep && exit 0 >++test -f /run/lock/acpisleep && exit 0 >+ >+ # If gnome-power-manager, kpowersave or klaptopdaemon are running... >+ if pidof gnome-power-manager kpowersave > /dev/null ||
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 35883
:
7936
| 7943