Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
5278c061
Commit
5278c061
authored
Nov 11, 2016
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
package signing and uploading without passwords
parent
049ab52c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
4 deletions
+61
-4
tools/packaging/debian/create_package.cmake
tools/packaging/debian/create_package.cmake
+3
-4
tools/packaging/debian/generate_package.sh
tools/packaging/debian/generate_package.sh
+27
-0
tools/packaging/debian/gpg_pass.sh
tools/packaging/debian/gpg_pass.sh
+15
-0
tools/packaging/debian/ssh_add_pass.sh
tools/packaging/debian/ssh_add_pass.sh
+16
-0
No files found.
tools/packaging/debian/create_package.cmake
View file @
5278c061
...
...
@@ -24,7 +24,7 @@ if (NOT IS_RELEASE)
set
(
PACKAGE_VERSION
"
${
PACKAGE_VERSION
}
~rc
${
PACKAGE_RELEASE_CANDIDATE
}
"
)
endif
()
set
(
PACKAGE_VERSION
"
${
PACKAGE_VERSION
}
~ppa
1
~
${
PACKAGE_DISTRIBUTION
}
"
)
set
(
PACKAGE_VERSION
"
${
PACKAGE_VERSION
}
~ppa
5
~
${
PACKAGE_DISTRIBUTION
}
"
)
set
(
PACKAGE_VERSION_FULL
"
${
PACKAGE_VERSION
}
-1"
)
set
(
PACKAGE_CONTACT
"Simon Praetorius <simon.praetorius@tu-dresden.de>"
)
...
...
@@ -88,6 +88,5 @@ file(WRITE ${DEBIAN_DIR}/compat "9\n")
file
(
WRITE
${
DEBIAN_DIR
}
/soure/format
"3.0 (quilt)
\n
"
)
# generate the debian package
execute_process
(
COMMAND debuild -S -sa
# execute_process(COMMAND debuild -d -us -uc
WORKING_DIRECTORY
${
OUT_DIR
}
/
${
PACKAGE_PREFIX
}
)
execute_process
(
COMMAND ./generate_package.sh
${
OUT_DIR
}
/
${
PACKAGE_PREFIX
}
${
PACKAGE_VERSION_FULL
}
${
IN_DIR
}
WORKING_DIRECTORY
${
IN_DIR
}
)
tools/packaging/debian/generate_package.sh
0 → 100755
View file @
5278c061
#!/bin/bash
if
[
$#
-lt
3
]
;
then
echo
"Usage: generate_package.sh root-dir amdis-version bin-dir"
exit
1
fi
ROOT
=
"
$1
"
VERSION
=
"
$2
"
BIN
=
"
$3
"
CHANGES_FILE
=
"
${
ROOT
}
/../amdis_
${
VERSION
}
_source.changes"
cd
$ROOT
debuild
-uc
-us
-S
-sa
# export GNUPGHOME=/srv/amdis-deploy/gnupg
# build debian source package and sign it using gpg
echo
"
${
AMDIS_PGP_PASSPHRASE
}
"
>>
/tmp/amdis_passphrase
debsign
-p
"
$BIN
/gpg_pass.sh /tmp/amdis_passphrase"
-S
-k99F411D7
${
CHANGES_FILE
}
#3B1E713A
$BIN
/ssh_add_pass.sh /amdis/id_rsa /tmp/amdis_passphrase
# upload the package
dput ppa:math-iwr/ppa
${
CHANGES_FILE
}
rm
-f
/tmp/amdis_passphrase
tools/packaging/debian/gpg_pass.sh
0 → 100755
View file @
5278c061
#!/bin/bash
if
[
$#
-ne
1
]
;
then
echo
"Usage: gpg-pass.sh passfile additional-arguments..."
exit
1
fi
PWD_FILE
=
"
$1
"
shift
1
eval
$(
gpg-agent
--daemon
--allow-preset-passphrase
--max-cache-ttl
7200
)
cat
${
PWD_FILE
}
| /usr/lib/gnupg/gpg-preset-passphrase
--preset
key:99F411D7
export
GPG_TTY
=
`
tty
`
gpg
--batch
--use-agent
$@
/usr/lib/gnupg/gpg-preset-passphrase
--forget
key:99F411D7
tools/packaging/debian/ssh_add_pass.sh
0 → 100755
View file @
5278c061
#!/bin/bash
if
[
$#
-ne
2
]
;
then
echo
"Usage: ssh-add-pass.sh keyfile passfile"
exit
1
fi
eval
$(
ssh-agent
)
pass
=
$(
cat
$2
)
/amdis/tools/tcl/bin/expect
<<
EOF
spawn ssh-add
$1
expect "Enter passphrase"
send "
$pass
\r
"
expect eof
EOF
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