delete unused patches
This commit is contained in:
parent
0dd00cf131
commit
df06c188ef
@ -1,50 +0,0 @@
|
|||||||
From 7fc2a89a7387db1e5daa4892393c9e9536920c25 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Tue, 1 Nov 2011 22:27:48 +0100
|
|
||||||
Subject: [PATCH] mount: order remote mounts after both network.target and
|
|
||||||
remote-fs-pre.target
|
|
||||||
|
|
||||||
Since remote-fs-pre.target is optional we cannot count on it to order
|
|
||||||
remote mounts after network.target, so let's add that order explicitly
|
|
||||||
in addition to remote-fs-pre.target.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=749940
|
|
||||||
---
|
|
||||||
src/mount.c | 7 ++++++-
|
|
||||||
1 files changed, 6 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/mount.c b/src/mount.c
|
|
||||||
index ef953f0..f9cfe91 100644
|
|
||||||
--- a/src/mount.c
|
|
||||||
+++ b/src/mount.c
|
|
||||||
@@ -327,7 +327,7 @@ static bool needs_quota(MountParameters *p) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static int mount_add_fstab_links(Mount *m) {
|
|
||||||
- const char *target, *after = NULL;
|
|
||||||
+ const char *target, *after = NULL, *after2 = NULL;
|
|
||||||
MountParameters *p;
|
|
||||||
Unit *tu;
|
|
||||||
int r;
|
|
||||||
@@ -358,6 +358,7 @@ static int mount_add_fstab_links(Mount *m) {
|
|
||||||
if (mount_is_network(p)) {
|
|
||||||
target = SPECIAL_REMOTE_FS_TARGET;
|
|
||||||
after = SPECIAL_REMOTE_FS_PRE_TARGET;
|
|
||||||
+ after2 = SPECIAL_NETWORK_TARGET;
|
|
||||||
} else {
|
|
||||||
target = SPECIAL_LOCAL_FS_TARGET;
|
|
||||||
after = SPECIAL_LOCAL_FS_PRE_TARGET;
|
|
||||||
@@ -374,6 +375,10 @@ static int mount_add_fstab_links(Mount *m) {
|
|
||||||
if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, NULL, true)) < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
+ if (after2)
|
|
||||||
+ if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after2, NULL, true)) < 0)
|
|
||||||
+ return r;
|
|
||||||
+
|
|
||||||
if (automount) {
|
|
||||||
Unit *am;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.7
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From a65cb51f29ee177f6f800c87232b68475216a418 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Schmidt <mschmidt@redhat.com>
|
|
||||||
Date: Fri, 23 Sep 2011 13:58:00 +0200
|
|
||||||
Subject: [PATCH] unit: fix complementing of requirement deps with After deps
|
|
||||||
for targets
|
|
||||||
|
|
||||||
'man systemd.target' says:
|
|
||||||
Unless DefaultDependencies= is set to false, target units will
|
|
||||||
implicitly complement all configured dependencies of type
|
|
||||||
Wants=, Requires=, RequiresOverridable= with dependencies of type
|
|
||||||
After= if the units in question also have DefaultDependencies=true.
|
|
||||||
|
|
||||||
It did not work because of a forgotten negation.
|
|
||||||
---
|
|
||||||
src/unit.c | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/unit.c b/src/unit.c
|
|
||||||
index 0b435cb..903a8e4 100644
|
|
||||||
--- a/src/unit.c
|
|
||||||
+++ b/src/unit.c
|
|
||||||
@@ -774,7 +774,7 @@ int unit_add_default_target_dependency(Unit *u, Unit *target) {
|
|
||||||
/* If either side wants no automatic dependencies, then let's
|
|
||||||
* skip this */
|
|
||||||
if (!u->meta.default_dependencies ||
|
|
||||||
- target->meta.default_dependencies)
|
|
||||||
+ !target->meta.default_dependencies)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Don't create loops */
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From fc8f0b5c9cb8277950a2fefdb7f754c47b172dfd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Tue, 1 Nov 2011 22:29:48 +0100
|
|
||||||
Subject: [PATCH] units: drop [Install] section from remote-fs-pre.target
|
|
||||||
|
|
||||||
remote-fs-pre.target is not a unit a user should ever explicitly enable.
|
|
||||||
Instead services which need to hook before network mounts should pull it
|
|
||||||
in.
|
|
||||||
---
|
|
||||||
units/remote-fs-pre.target | 3 ---
|
|
||||||
1 files changed, 0 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/units/remote-fs-pre.target b/units/remote-fs-pre.target
|
|
||||||
index 5406aa2..8aceb08 100644
|
|
||||||
--- a/units/remote-fs-pre.target
|
|
||||||
+++ b/units/remote-fs-pre.target
|
|
||||||
@@ -10,6 +10,3 @@
|
|
||||||
[Unit]
|
|
||||||
Description=Remote File Systems (Pre)
|
|
||||||
After=network.target
|
|
||||||
-
|
|
||||||
-[Install]
|
|
||||||
-WantedBy=multi-user.target
|
|
||||||
--
|
|
||||||
1.7.7
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
|||||||
From 563ba9ea6e60774086555998b957edf923e24b46 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Schmidt <mschmidt@redhat.com>
|
|
||||||
Date: Mon, 17 Oct 2011 11:12:12 +0200
|
|
||||||
Subject: [PATCH 2/5] manager: fix a crash in isolating
|
|
||||||
|
|
||||||
HASHMAP_FOREACH is safe against the removal of the current entry, but
|
|
||||||
not against the removal of other entries. job_finish_and_invalidate()
|
|
||||||
can recursively remove other entries.
|
|
||||||
|
|
||||||
It triggered an assertion failure:
|
|
||||||
Assertion 'j->installed' failed at src/manager.c:1218, function
|
|
||||||
transaction_apply(). Aborting.
|
|
||||||
|
|
||||||
Fix the crash by iterating from the beginning when there is a
|
|
||||||
possibility that the iterator could be invalid.
|
|
||||||
|
|
||||||
It is O(n^2) in the worst case, but that's better than a crash.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=717325
|
|
||||||
---
|
|
||||||
src/job.c | 19 ++++++++++++++-----
|
|
||||||
src/manager.c | 7 ++++++-
|
|
||||||
2 files changed, 20 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/job.c b/src/job.c
|
|
||||||
index 5c0913b..20971da 100644
|
|
||||||
--- a/src/job.c
|
|
||||||
+++ b/src/job.c
|
|
||||||
@@ -527,6 +527,7 @@ int job_finish_and_invalidate(Job *j, JobResult result) {
|
|
||||||
Unit *other;
|
|
||||||
JobType t;
|
|
||||||
Iterator i;
|
|
||||||
+ bool recursed = false;
|
|
||||||
|
|
||||||
assert(j);
|
|
||||||
assert(j->installed);
|
|
||||||
@@ -573,23 +574,29 @@ int job_finish_and_invalidate(Job *j, JobResult result) {
|
|
||||||
if (other->meta.job &&
|
|
||||||
(other->meta.job->type == JOB_START ||
|
|
||||||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
|
|
||||||
- other->meta.job->type == JOB_RELOAD_OR_START))
|
|
||||||
+ other->meta.job->type == JOB_RELOAD_OR_START)) {
|
|
||||||
job_finish_and_invalidate(other->meta.job, JOB_DEPENDENCY);
|
|
||||||
+ recursed = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
SET_FOREACH(other, u->meta.dependencies[UNIT_BOUND_BY], i)
|
|
||||||
if (other->meta.job &&
|
|
||||||
(other->meta.job->type == JOB_START ||
|
|
||||||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
|
|
||||||
- other->meta.job->type == JOB_RELOAD_OR_START))
|
|
||||||
+ other->meta.job->type == JOB_RELOAD_OR_START)) {
|
|
||||||
job_finish_and_invalidate(other->meta.job, JOB_DEPENDENCY);
|
|
||||||
+ recursed = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY_OVERRIDABLE], i)
|
|
||||||
if (other->meta.job &&
|
|
||||||
!other->meta.job->override &&
|
|
||||||
(other->meta.job->type == JOB_START ||
|
|
||||||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
|
|
||||||
- other->meta.job->type == JOB_RELOAD_OR_START))
|
|
||||||
+ other->meta.job->type == JOB_RELOAD_OR_START)) {
|
|
||||||
job_finish_and_invalidate(other->meta.job, JOB_DEPENDENCY);
|
|
||||||
+ recursed = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
} else if (t == JOB_STOP) {
|
|
||||||
|
|
||||||
@@ -597,8 +604,10 @@ int job_finish_and_invalidate(Job *j, JobResult result) {
|
|
||||||
if (other->meta.job &&
|
|
||||||
(other->meta.job->type == JOB_START ||
|
|
||||||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
|
|
||||||
- other->meta.job->type == JOB_RELOAD_OR_START))
|
|
||||||
+ other->meta.job->type == JOB_RELOAD_OR_START)) {
|
|
||||||
job_finish_and_invalidate(other->meta.job, JOB_DEPENDENCY);
|
|
||||||
+ recursed = true;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -626,7 +635,7 @@ finish:
|
|
||||||
|
|
||||||
manager_check_finished(u->meta.manager);
|
|
||||||
|
|
||||||
- return 0;
|
|
||||||
+ return recursed;
|
|
||||||
}
|
|
||||||
|
|
||||||
int job_start_timer(Job *j) {
|
|
||||||
diff --git a/src/manager.c b/src/manager.c
|
|
||||||
index e626347..6d20258 100644
|
|
||||||
--- a/src/manager.c
|
|
||||||
+++ b/src/manager.c
|
|
||||||
@@ -1214,13 +1214,18 @@ static int transaction_apply(Manager *m, JobMode mode) {
|
|
||||||
|
|
||||||
/* When isolating first kill all installed jobs which
|
|
||||||
* aren't part of the new transaction */
|
|
||||||
+ rescan:
|
|
||||||
HASHMAP_FOREACH(j, m->jobs, i) {
|
|
||||||
assert(j->installed);
|
|
||||||
|
|
||||||
if (hashmap_get(m->transaction_jobs, j->unit))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- job_finish_and_invalidate(j, JOB_CANCELED);
|
|
||||||
+ /* 'j' itself is safe to remove, but if other jobs
|
|
||||||
+ are invalidated recursively, our iterator may become
|
|
||||||
+ invalid and we need to start over. */
|
|
||||||
+ if (job_finish_and_invalidate(j, JOB_CANCELED) > 0)
|
|
||||||
+ goto rescan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
|||||||
From 74eeab044e506a39786f484b160d9f64d48ad243 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dave Reisner <d@falconindy.com>
|
|
||||||
Date: Tue, 11 Oct 2011 20:56:53 -0400
|
|
||||||
Subject: [PATCH 5/5] systemctl-completion: always invoke with --no-legend
|
|
||||||
|
|
||||||
In the case of completion for the 'restart' verb, passing the invalid
|
|
||||||
unit name (the colums header) causes completion to cease functioning
|
|
||||||
entirely, with the error:
|
|
||||||
|
|
||||||
Failed to issue method call: Unit name UNIT is not valid.
|
|
||||||
|
|
||||||
This adds a small wrapper function for systemctl which can have common
|
|
||||||
options added to it.
|
|
||||||
---
|
|
||||||
src/systemctl-bash-completion.sh | 20 ++++++++++++--------
|
|
||||||
1 files changed, 12 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/systemctl-bash-completion.sh b/src/systemctl-bash-completion.sh
|
|
||||||
index 6369a6c..6ebb792 100644
|
|
||||||
--- a/src/systemctl-bash-completion.sh
|
|
||||||
+++ b/src/systemctl-bash-completion.sh
|
|
||||||
@@ -15,6 +15,10 @@
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
+__systemctl() {
|
|
||||||
+ systemctl --no-legend "$@"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
__contains_word () {
|
|
||||||
local word=$1; shift
|
|
||||||
for w in $*; do [[ $w = $word ]] && return 0; done
|
|
||||||
@@ -24,7 +28,7 @@ __contains_word () {
|
|
||||||
__filter_units_by_property () {
|
|
||||||
local property=$1 value=$2 ; shift ; shift
|
|
||||||
local -a units=( $* )
|
|
||||||
- local -a props=( $(systemctl show --property "$property" -- ${units[*]} | grep -v ^$) )
|
|
||||||
+ local -a props=( $(__systemctl show --property "$property" -- ${units[*]} | grep -v ^$) )
|
|
||||||
for ((i=0; $i < ${#units[*]}; i++)); do
|
|
||||||
if [[ "${props[i]}" = "$property=$value" ]]; then
|
|
||||||
echo "${units[i]}"
|
|
||||||
@@ -32,10 +36,10 @@ __filter_units_by_property () {
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
-__get_all_units () { systemctl list-units --full --all | awk ' {print $1}' ; }
|
|
||||||
-__get_active_units () { systemctl list-units --full | awk ' {print $1}' ; }
|
|
||||||
-__get_inactive_units () { systemctl list-units --full --all | awk '$3 == "inactive" {print $1}' ; }
|
|
||||||
-__get_failed_units () { systemctl list-units --full | awk '$3 == "failed" {print $1}' ; }
|
|
||||||
+__get_all_units () { __systemctl list-units --full --all | awk ' {print $1}' ; }
|
|
||||||
+__get_active_units () { __systemctl list-units --full | awk ' {print $1}' ; }
|
|
||||||
+__get_inactive_units () { __systemctl list-units --full --all | awk '$3 == "inactive" {print $1}' ; }
|
|
||||||
+__get_failed_units () { __systemctl list-units --full | awk '$3 == "failed" {print $1}' ; }
|
|
||||||
|
|
||||||
_systemctl () {
|
|
||||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
@@ -134,13 +138,13 @@ _systemctl () {
|
|
||||||
comps=''
|
|
||||||
|
|
||||||
elif __contains_word "$verb" ${VERBS[JOBS]}; then
|
|
||||||
- comps=$( systemctl list-jobs | awk '{print $1}' )
|
|
||||||
+ comps=$( __systemctl list-jobs | awk '{print $1}' )
|
|
||||||
|
|
||||||
elif __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then
|
|
||||||
- comps=$( systemctl list-units --type snapshot --full --all | awk '{print $1}' )
|
|
||||||
+ comps=$( __systemctl list-units --type snapshot --full --all | awk '{print $1}' )
|
|
||||||
|
|
||||||
elif __contains_word "$verb" ${VERBS[ENVS]}; then
|
|
||||||
- comps=$( systemctl show-environment | sed 's_\([^=]\+=\).*_\1_' )
|
|
||||||
+ comps=$( __systemctl show-environment | sed 's_\([^=]\+=\).*_\1_' )
|
|
||||||
compopt -o nospace
|
|
||||||
fi
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user