Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
packages
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
infra
packages
Commits
5286c45f
Commit
5286c45f
authored
Mar 06, 2019
by
Hinrikus Wolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update grml-zsh-config config
parent
d4e87083
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
114 deletions
+84
-114
patches/grml-zsh-config/remove_non_zsh_config.patch
patches/grml-zsh-config/remove_non_zsh_config.patch
+74
-96
scripts/grml-zsh-config.sh
scripts/grml-zsh-config.sh
+10
-18
No files found.
patches/grml-zsh-config/remove_non_zsh_config.patch
View file @
5286c45f
...
...
@@ -50,119 +50,97 @@ index 3aed935..c4ff58b 100644
+grml-zsh-config: diversion-for-unknown-file *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst:35
+grml-zsh-config: orphaned-diversion *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755
index 72da544..0000000
index 72da544..9bb8222 100755
--- a/debian/postrm
+++
/dev/null
@@ -1,
44 +0,0
@@
-
#!/bin/sh
-
# Filename: postrm
+++
b/debian/postrm
@@ -1,
6 +1,6
@@
#!/bin/sh
# Filename: postrm
-# Purpose: postrm script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-################################################################################
-
-set -e
-
-TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc"
-TO_UNDIVERT2=".zshrc"
+# Purpose: postrm script for package grml-zsh-config
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
@@ -10,12 +10,11 @@
set -e
TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc"
TO_UNDIVERT2=".zshrc"
-TO_UNDIVERT3="vimrc"
-
-
undivert_gen() {
-
if [ -f "$2/$1" -o "$2/$1".original ] ; then
-
DEXT=${3:-original}
undivert_gen() {
if [ -f "$2/$1" -o "$2/$1".original ] ; then
DEXT=${3:-original}
- dpkg-divert --remove --rename --package grml-etc-core \
- --divert $2/$1.$DEXT $2/$1 #> /dev/null
- fi
-}
-
-case "$1" in
- purge)
- for cmd in $TO_UNDIVERT1; do
- undivert_gen $cmd /etc/zsh
- done
- for cmd in $TO_UNDIVERT2; do
- undivert_gen $cmd /etc/skel
- done
+ dpkg-divert --remove --rename --package grml-zsh-config \
--divert $2/$1.$DEXT $2/$1 #> /dev/null
fi
}
@@ -28,9 +27,6 @@
case "$1" in
for cmd in $TO_UNDIVERT2; do
undivert_gen $cmd /etc/skel
done
- for cmd in $TO_UNDIVERT3; do
- undivert_gen $cmd /etc/vim
- done
- ;;
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
- *)
- echo "postrm called with unknown argument $1" >&2
- exit 1
-esac
-
-exit 0
-
-## END OF FILE #################################################################
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100755
index c30e103..0000000
index c30e103..c5227d5 100755
--- a/debian/preinst
+++
/dev/null
@@ -1,
56 +0,0
@@
-
#!/bin/sh
-
# Filename: preinst
+++
b/debian/preinst
@@ -1,
6 +1,6
@@
#!/bin/sh
# Filename: preinst
-# Purpose: preinst script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-################################################################################
-
-set -e
-
-# check for files from rm_conffile() in debian/preinst of grml-etc
-# make sure we don't lose any files...
-backup_conffile() {
- CONFFILE="$1"
-
- if [ -e "$CONFFILE.dpkg-bak" -a -e "$CONFFILE" ]; then
- cp -f "$CONFFILE" "$CONFFILE".original
- else
+# Purpose: preinst script for package grml-zsh-config
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
@@ -16,33 +16,33 @@
backup_conffile() {
if [ -e "$CONFFILE.dpkg-bak" -a -e "$CONFFILE" ]; then
cp -f "$CONFFILE" "$CONFFILE".original
else
- [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-etc-core || true
- fi
-}
-
-case "$1" in
- install|upgrade|configure)
- TMP=$$
+ [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-zsh-config || true
fi
}
case "$1" in
install|upgrade|configure)
TMP=$$
- # move files from package grml-etc to grml-etc-core, make sure
- # we don't lose any files...
- for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \
+ # move files from package grml-etc to grml-zsh-config, make sure
# we don't lose any files...
for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \
- /etc/zsh/zlogout /etc/vim/vimrc /etc/tmux.conf; do
- [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true
- backup_conffile $file && \
- [ -f "$file" ] && rm $file && \
+ /etc/zsh/zlogout ; do
[ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true
backup_conffile $file && \
[ -f "$file" ] && rm $file && \
- dpkg-divert --quiet --add --rename --package grml-etc-core --divert "$file".original $file && \
- [ -f "$file".dpkg-bak ] && mv -f "$file".dpkg-bak "$file"
+ dpkg-divert --quiet --add --rename --package grml-zsh-config --divert "$file".original $file && \
[ -f "$file".dpkg-bak ] && mv -f "$file".dpkg-bak "$file"
- [ -f "$file".grml-etc-core ] && mv -f "$file".grml-etc-core "$file"
- [ -e "${file}.tmp.$TMP" ] && mv -f "${file}.tmp.$TMP" "$file.original"
-
- # trying to overwrite `/etc/skel/.zshrc', which is also in package zsh
- # [ -f /etc/skel/.zshrc ] && \
+ [ -f "$file".grml-zsh-config ] && mv -f "$file".grml-zsh-config "$file"
[ -e "${file}.tmp.$TMP" ] && mv -f "${file}.tmp.$TMP" "$file.original"
# trying to overwrite `/etc/skel/.zshrc', which is also in package zsh
# [ -f /etc/skel/.zshrc ] && \
- # dpkg-divert --quiet --add --rename --package grml-etc-core --divert /etc/skel/.zshrc.original /etc/skel/.zshrc
- done
-
+ # dpkg-divert --quiet --add --rename --package grml-zsh-config --divert /etc/skel/.zshrc.original /etc/skel/.zshrc
done
- if dpkg-divert --list grml-etc-core 2>/dev/null | grep -q /etc/skel/.zshrc.original ; then
- mv -f /etc/skel/.zshrc.original /etc/skel/.zshrc.original.old && \
+ if dpkg-divert --list grml-zsh-config 2>/dev/null | grep -q /etc/skel/.zshrc.original ; then
mv -f /etc/skel/.zshrc.original /etc/skel/.zshrc.original.old && \
- dpkg-divert --remove --rename --package grml-etc-core /etc/skel/.zshrc
- fi
-
- ;;
- *)
- echo "preinst called with unknown argument $1" >&2
- exit 1
-esac
-
-exit 0
-
-## END OF FILE #################################################################
+ dpkg-divert --remove --rename --package grml-zsh-config /etc/skel/.zshrc
fi
;;
diff --git a/debian/rules b/debian/rules
index 7bf93ff..
b49fc95
100755
index 7bf93ff..
ebe8ef9
100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@
clean:
...
...
@@ -182,8 +160,8 @@ index 7bf93ff..b49fc95 100755
- cp -a etc/ debian/grml-etc-core/
- cp -a usr_share_grml/ debian/grml-etc-core/usr/share/grml
+ # Add here commands to install the package into debian/grml-zsh-config.
+ cp -a etc/skel/.zshrc debian/grml-zsh-config/skel/
+ cp -a etc/zsh debian/grml-zsh-config/
+ cp -a etc/skel/.zshrc debian/grml-zsh-config/
etc/
skel/
+ cp -a etc/zsh debian/grml-zsh-config/
etc/
# Build architecture-dependent files here.
binary-arch: build install
...
...
scripts/grml-zsh-config.sh
View file @
5286c45f
#!/bin/bash
echo
"deb-src http://deb.grml.org/ grml-stable main"
>
/etc/apt/sources.list.d/grml_src.list
git clone https://github.com/grml/grml-etc-core grml-zsh-config
cd
grml-zsh-config
git tag
--sort
"version:refname"
-l
|
tail
-n1
| xargs git checkout
GRML_ZSH_CONFIG_VERSION
=
$(
git tag
--sort
"version:refname"
-l
|
tail
-n1
|
sed
s/v//
)
ADCLI_VERSION
=
$(
rmadison adcli
--architecture
=
amd64
-s
stretch|
cut
-d
\|
-f2
|
sed
s
"/ //g"
|
sed
s
"/
\-
.*
$/
/g"
)
apt-get update
apt-get
source
--only-source
adcli
TARGET_DIR
=
adcli-
$ADCLI_VERSION
cd
${
TARGET_DIR
}
/debian
for
patch
in
../../patches/adcli/
*
.patch
;
do
quilt import
$patch
for
patch
in
../patches/grml-zsh-config/
*
.patch
;
do
patch
-p1
<
${
patch
}
done
cd
..
sed
-i
s/grml-etc-core/grml-zsh-config/g debian/changelog
debchange
--preserve
--newversion
${
ADCLI_VERSION
}
-fsmpi
"Apply the unreleased upstream-patches, fixing RT#100
"
debchange
--preserve
--newversion
${
GRML_ZSH_CONFIG_VERSION
}
-fsmpi
"Remove unneeded grml-configs
"
apt-get
build-dep
-y
adcli
apt-get
install
-y
txt2tags debhelper
fakeroot debian/rules binary
debuild
-b
-uc
-us
cd
..
mkdir
debug packages
mv
*
dbgsym
*
debug
mkdir
packages
mv
*
.deb packages
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment