Lines 123-128
Link Here
|
123 |
|
123 |
|
124 |
RESTRICT+=" test" |
124 |
RESTRICT+=" test" |
125 |
|
125 |
|
|
|
126 |
# used for agent scripts migration |
127 |
OLDST=/etc/plasma/startup/10-agent-startup.sh |
128 |
NEWST=/etc/xdg/plasma-workspace/env/10-agent-startup.sh |
129 |
OLDSH=/etc/plasma/shutdown/10-agent-shutdown.sh |
130 |
NEWSH=/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh |
131 |
|
126 |
src_prepare() { |
132 |
src_prepare() { |
127 |
kde5_src_prepare |
133 |
kde5_src_prepare |
128 |
|
134 |
|
Lines 152-173
Link Here
|
152 |
src_install() { |
158 |
src_install() { |
153 |
kde5_src_install |
159 |
kde5_src_install |
154 |
|
160 |
|
155 |
# startup and shutdown scripts |
161 |
# default startup and shutdown scripts |
156 |
insinto /etc/plasma/startup |
162 |
insinto "$(dirname ${NEWST})" |
157 |
doins "${FILESDIR}/10-agent-startup.sh" |
163 |
doins "${FILESDIR}/$(basename ${NEWST})" |
|
|
164 |
|
165 |
insinto "$(dirname ${NEWSH})" |
166 |
doins "${FILESDIR}/$(basename ${NEWSH})" |
167 |
fperms +x "${NEWSH}" |
168 |
} |
169 |
|
170 |
pkg_preinst() { |
171 |
kde5_pkg_preinst |
158 |
|
172 |
|
159 |
insinto /etc/plasma/shutdown |
173 |
# migrate existing agent scripts to new layout if no files there yet |
160 |
doins "${FILESDIR}/10-agent-shutdown.sh" |
174 |
if [[ -r "${EROOT}${OLDST}" && ! -f "${EROOT}${NEWST}" ]]; then |
|
|
175 |
mkdir -p "${EROOT}$(dirname ${NEWST})" && cp "${EROOT}${OLDST}" "${EROOT}${NEWST}" && \ |
176 |
elog "${EROOT}${OLDST} has been migrated to ${EROOT}${NEWST}, please delete old file." |
177 |
fi |
178 |
if [[ -r "${EROOT}${OLDSH}" && ! -f "${EROOT}${NEWSH}" ]]; then |
179 |
mkdir -p "${EROOT}$(dirname ${NEWSH})" && cp "${EROOT}${OLDSH}" "${EROOT}${NEWSH}" && \ |
180 |
chmod +x "${EROOT}${NEWSH}" && \ |
181 |
elog "${EROOT}${OLDSH} has been migrated to ${EROOT}${NEWSH}, please delete old file." |
182 |
fi |
161 |
} |
183 |
} |
162 |
|
184 |
|
163 |
pkg_postinst () { |
185 |
pkg_postinst () { |
164 |
kde5_pkg_postinst |
186 |
kde5_pkg_postinst |
165 |
|
187 |
|
166 |
elog "To enable gpg-agent and/or ssh-agent in Plasma sessions, do the following:" |
188 |
# warn about any leftover user scripts |
167 |
elog " * Copy the necessary files to your home directory:" |
189 |
if [[ -d "${EROOT}"/etc/plasma/startup && -n "$(ls "${EROOT}"/etc/plasma/startup)" ]] || \ |
168 |
elog " - cp /etc/plasma/startup/10-agent-startup.sh ~/.config/plasma-workspace/env/" |
190 |
[[ -d "${EROOT}"/etc/plasma/shutdown && -n "$(ls "${EROOT}"/etc/plasma/shutdown)" ]]; then |
169 |
elog " - cp /etc/plasma/shutdown/10-agent-shutdown.sh ~/.config/plasma-workspace/shutdown/" |
191 |
elog "You appear to have scripts in ${EROOT}/etc/plasma/{startup,shutdown}." |
170 |
elog " * Edit 10-agent-startup.sh and uncomment the lines enabling ssh-agent." |
192 |
elog "They will no longer work since plasma-workspace-5.17" |
171 |
elog " * In 10-agent-shutdown.sh uncomment the respective lines to properly kill" |
193 |
fi |
172 |
elog " the agent when the session ends." |
194 |
|
|
|
195 |
elog " * Edit ${EROOT}${NEWST} and uncomment" |
196 |
elog " the lines enabling ssh-agent." |
197 |
elog " * Edit ${EROOT}${NEWSH} uncomment" |
198 |
elog " the respective lines to properly kill the agent when the session ends." |
173 |
} |
199 |
} |