1 |
commit: 3293034ed718aaee2de79c999b53f313ce2beec1 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 22 13:45:11 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 22 20:16:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=3293034e |
7 |
|
8 |
kde-plasma/ksshaskpass: Add old script migration, update postinst |
9 |
|
10 |
Follow-up to bdb0f5267d00191069c4bf88b98fe759441a2a2b and |
11 |
77aa9069fe3cc4680c446a3d9ecd2f5f695f171d. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/688366 |
14 |
Package-Manager: Portage-2.3.82, Repoman-2.3.20 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
.../ksshaskpass/ksshaskpass-5.17.49.9999.ebuild | 33 ++++++++++++++++++++-- |
18 |
kde-plasma/ksshaskpass/ksshaskpass-9999.ebuild | 33 ++++++++++++++++++++-- |
19 |
2 files changed, 60 insertions(+), 6 deletions(-) |
20 |
|
21 |
diff --git a/kde-plasma/ksshaskpass/ksshaskpass-5.17.49.9999.ebuild b/kde-plasma/ksshaskpass/ksshaskpass-5.17.49.9999.ebuild |
22 |
index b444897de0..7d2b01d201 100644 |
23 |
--- a/kde-plasma/ksshaskpass/ksshaskpass-5.17.49.9999.ebuild |
24 |
+++ b/kde-plasma/ksshaskpass/ksshaskpass-5.17.49.9999.ebuild |
25 |
@@ -25,6 +25,28 @@ DEPEND=" |
26 |
" |
27 |
RDEPEND="${DEPEND}" |
28 |
|
29 |
+pkg_setup() { |
30 |
+ ecm_pkg_setup |
31 |
+ |
32 |
+ local srcfile=/etc/plasma/startup/05-ksshaskpass.sh |
33 |
+ local newfile=/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh |
34 |
+ if [[ -f "${EROOT}"${srcfile} ]]; then |
35 |
+ local md5=$(md5sum "${EROOT}"${srcfile}) |
36 |
+ if [[ ${md5%% *} != 615ae8f5b0090ff7f51d0edee7885d55 ]]; then |
37 |
+ elog "Existing modified "${EPREFIX}"${srcfile} detected." |
38 |
+ elog "Copying to "${EPREFIX}"${newfile}..." |
39 |
+ cp -v "${EROOT}"${srcfile} "${T}"/ || die |
40 |
+ fi |
41 |
+ fi |
42 |
+} |
43 |
+ |
44 |
+src_prepare() { |
45 |
+ ecm_src_prepare |
46 |
+ if [[ ! -f "${T}"/05-ksshaskpass.sh ]]; then |
47 |
+ cp "${FILESDIR}"/05-ksshaskpass.sh "${T}"/ || die |
48 |
+ fi |
49 |
+} |
50 |
+ |
51 |
src_install() { |
52 |
ecm_src_install |
53 |
|
54 |
@@ -37,7 +59,7 @@ pkg_postinst() { |
55 |
ecm_pkg_postinst |
56 |
|
57 |
elog "In order to have ssh-agent start with Plasma 5," |
58 |
- elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh.sh" |
59 |
+ elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh" |
60 |
elog "and uncomment the lines enabling ssh-agent." |
61 |
elog |
62 |
elog "If you do so, do not forget to uncomment the respective" |
63 |
@@ -47,6 +69,11 @@ pkg_postinst() { |
64 |
elog "${PN} has been installed as your default askpass application" |
65 |
elog "for Plasma 5 sessions." |
66 |
elog "If that's not desired, select the one you want to use in" |
67 |
- elog |
68 |
- elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh (ATTN: Path moved!)" |
69 |
+ elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh" |
70 |
+ |
71 |
+ # Clean up pre-5.17.4 script |
72 |
+ if [[ -e "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh ]]; then |
73 |
+ rm "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh || die |
74 |
+ elog "Removed obsolete ${EPREFIX}/etc/plasma/startup/05-ksshaskpass.sh" |
75 |
+ fi |
76 |
} |
77 |
|
78 |
diff --git a/kde-plasma/ksshaskpass/ksshaskpass-9999.ebuild b/kde-plasma/ksshaskpass/ksshaskpass-9999.ebuild |
79 |
index 181b59a8b5..bea3649085 100644 |
80 |
--- a/kde-plasma/ksshaskpass/ksshaskpass-9999.ebuild |
81 |
+++ b/kde-plasma/ksshaskpass/ksshaskpass-9999.ebuild |
82 |
@@ -25,6 +25,28 @@ DEPEND=" |
83 |
" |
84 |
RDEPEND="${DEPEND}" |
85 |
|
86 |
+pkg_setup() { |
87 |
+ ecm_pkg_setup |
88 |
+ |
89 |
+ local srcfile=/etc/plasma/startup/05-ksshaskpass.sh |
90 |
+ local newfile=/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh |
91 |
+ if [[ -f "${EROOT}"${srcfile} ]]; then |
92 |
+ local md5=$(md5sum "${EROOT}"${srcfile}) |
93 |
+ if [[ ${md5%% *} != 615ae8f5b0090ff7f51d0edee7885d55 ]]; then |
94 |
+ elog "Existing modified "${EPREFIX}"${srcfile} detected." |
95 |
+ elog "Copying to "${EPREFIX}"${newfile}..." |
96 |
+ cp -v "${EROOT}"${srcfile} "${T}"/ || die |
97 |
+ fi |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ ecm_src_prepare |
103 |
+ if [[ ! -f "${T}"/05-ksshaskpass.sh ]]; then |
104 |
+ cp "${FILESDIR}"/05-ksshaskpass.sh "${T}"/ || die |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
src_install() { |
109 |
ecm_src_install |
110 |
|
111 |
@@ -37,7 +59,7 @@ pkg_postinst() { |
112 |
ecm_pkg_postinst |
113 |
|
114 |
elog "In order to have ssh-agent start with Plasma 5," |
115 |
- elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh.sh" |
116 |
+ elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh" |
117 |
elog "and uncomment the lines enabling ssh-agent." |
118 |
elog |
119 |
elog "If you do so, do not forget to uncomment the respective" |
120 |
@@ -47,6 +69,11 @@ pkg_postinst() { |
121 |
elog "${PN} has been installed as your default askpass application" |
122 |
elog "for Plasma 5 sessions." |
123 |
elog "If that's not desired, select the one you want to use in" |
124 |
- elog |
125 |
- elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh (ATTN: Path moved!)" |
126 |
+ elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh" |
127 |
+ |
128 |
+ # Clean up pre-5.17.4 script |
129 |
+ if [[ -e "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh ]]; then |
130 |
+ rm "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh || die |
131 |
+ elog "Removed obsolete ${EPREFIX}/etc/plasma/startup/05-ksshaskpass.sh" |
132 |
+ fi |
133 |
} |