-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a suffix to package version; by default, e.g. `~1jessie~1mk.dbuild`. This allows distribution packagers to give unique versions to their packages, as well as combine packages for different upstream distros into one `pool` directory (fixes #6). - Build new changelog entry for source packages - Read upstream version from `changelog` file (fixes #8) - Remove `$RELEASE` from pkg configs - Add default suffix `~1mk.dbuild` to packages - Unpack debianization first in order to get data from changelog early - Set default pkg format to reduce verbosity - Merge files formerly separated along upstream distro lines - `build/PACKAGE` dir; `repo/pool` dir Also: - Misc bug fixes - Install `sbuild.conf` from template (will address issues in #9)
- Loading branch information
Showing
17 changed files
with
799 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,40 @@ | |
# Debianization git tree operations | ||
debug " Sourcing debian-debzn.sh" | ||
|
||
parse_changelog() { | ||
dpkg-parsechangelog --file $BUILD_DIR/changelog.orig --show-field $1 | ||
} | ||
|
||
debianization_init() { | ||
test -z "$PACKAGE_VERSION" || return | ||
|
||
PACKAGE_VERSION=$(parse_changelog version) | ||
debug " Upstream package version-release: $PACKAGE_VERSION" | ||
PACKAGE_VER=$(echo $PACKAGE_VERSION | sed 's/\(.*\)-.*/\1/') | ||
debug " Package version: $PACKAGE_VER" | ||
PACKAGE_RELEASE=$(echo $PACKAGE_VERSION | \ | ||
sed -e 's/^\([^-]*\)$/\1-/' -e 's/[^-]*-//') | ||
debug " Upstream package release: $PACKAGE_RELEASE" | ||
PACKAGE_DISTRIBUTION=$(parse_changelog distribution) | ||
debug " Package distribution: $PACKAGE_DISTRIBUTION" | ||
PACKAGE_URGENCY=$(parse_changelog urgency) | ||
debug " Package urgency: $PACKAGE_URGENCY" | ||
PACKAGE_NEW_VERSION_SUFFIX="~1${CODENAME}${PACKAGE_VERSION_SUFFIX}" | ||
PACKAGE_NEW_VERSION="${PACKAGE_VERSION}${PACKAGE_NEW_VERSION_SUFFIX}" | ||
debug " New package version-release: $PACKAGE_NEW_VERSION" | ||
DSC_FILE=${PACKAGE}_${PACKAGE_NEW_VERSION}.dsc | ||
debug " .dsc file name: $DSC_FILE" | ||
CHANGELOG=/tmp/changelog-$PACKAGE-$CODENAME | ||
|
||
if test -z "$MAINTAINER"; then | ||
MAINTAINER="$(git config user.name)" || MAINTAINER="mk-dbuild user" | ||
fi | ||
if test -z "$EMAIL"; then | ||
EMAIL="$(git config user.email)" || EMAIL="[email protected]" | ||
fi | ||
debug " Maintainer <email>: $MAINTAINER <$EMAIL>" | ||
} | ||
|
||
debianization_git_tree_update() { | ||
if test -z "$GIT_URL"; then | ||
debug " (No GIT_URL defined; not handling debianization git tree)" | ||
|
@@ -22,6 +56,35 @@ debianization_git_tree_update() { | |
run_user git --git-dir=$DEBZN_GIT_DIR/.git --work-tree=$DEBZN_GIT_DIR \ | ||
pull --ff-only dbuild ${GIT_BRANCH:-master} | ||
fi | ||
|
||
debug " Saving original changelog" | ||
run_user cp $DEBZN_GIT_DIR/changelog $BUILD_DIR/changelog.orig | ||
} | ||
|
||
debianization_add_changelog() { | ||
# https://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog | ||
msg " Adding new changelog entry" | ||
|
||
# Calculate first line of changelog entry | ||
PACKAGE_CHANGELOG_HEAD="$(echo "${PACKAGE}" "(${PACKAGE_NEW_VERSION})" \ | ||
"${PACKAGE_DISTRIBUTION};" "urgency=${PACKAGE_URGENCY}")" | ||
|
||
# Calculate trailer line of changelog entry | ||
PACKAGE_CHANGELOG_TRAILER=" -- $MAINTAINER <$EMAIL> $(date -R)" | ||
|
||
# Write changelog entry | ||
( | ||
echo "$PACKAGE_CHANGELOG_HEAD" | ||
echo " * Rebuilt in mk-debuild" | ||
echo " - See https://github.com/zultron/mk-dbuild" | ||
echo "$PACKAGE_CHANGELOG_TRAILER" | ||
echo | ||
) > $CHANGELOG | ||
|
||
debug " Full changelog:" | ||
run_debug cat $CHANGELOG | ||
run bash -c "cat $BUILD_DIR/changelog.orig >> $CHANGELOG" | ||
run_user cp $CHANGELOG $BUILD_SRC_DIR/debian/changelog | ||
} | ||
|
||
debianization_git_tree_unpack() { | ||
|
@@ -30,10 +93,9 @@ debianization_git_tree_unpack() { | |
debug " Debzn git dir: $DEBZN_GIT_DIR" | ||
debug " Dest dir: $BUILD_SRC_DIR/debian" | ||
debug " Git branch: ${GIT_BRANCH:-master}" | ||
run_user mkdir -p $BUILD_SRC_DIR/debian | ||
run_user git --git-dir=$DEBZN_GIT_DIR/.git archive \ | ||
--prefix=./ ${GIT_BRANCH:-master} | \ | ||
run_user tar xCf $BUILD_SRC_DIR/debian - | ||
--prefix=debian/ ${GIT_BRANCH:-master} | \ | ||
run_user tar xCf $BUILD_SRC_DIR - | ||
else | ||
debug " (No GIT_URL defined; not unpacking debianization from git)" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
VERSION=2.2.0 | ||
RELEASE=0.4 | ||
TARBALL_URL=http://download.zeromq.org/czmq-${VERSION}.tar.gz | ||
GIT_URL=https://github.com/zultron/czmq-deb.git | ||
DEBIAN_PACKAGE_FORMAT='3.0 (quilt)' | ||
DEBIAN_PACKAGE_COMP=gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
VERSION=0.1 | ||
RELEASE=2 | ||
GIT_URL=https://github.com/zultron/dovetail-automata-keyring-deb.git | ||
DEBIAN_PACKAGE_FORMAT='3.0 (native)' | ||
DEBIAN_PACKAGE_COMP=gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
VERSION=1.2.0 | ||
RELEASE=4 | ||
TARBALL_URL=https://github.com/giampaolo/pyftpdlib/archive/release-$VERSION.tar.gz | ||
GIT_URL=https://github.com/zultron/python-pyftpdlib-deb.git | ||
DEBIAN_PACKAGE_FORMAT='3.0 (quilt)' | ||
DEBIAN_PACKAGE_COMP=gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
GIT_REV=a416758 | ||
VERSION=4.0.5.${GIT_REV} | ||
RELEASE=1 | ||
TARBALL_URL=https://github.com/ShabbyX/RTAI/archive/${GIT_REV}.tar.gz | ||
GIT_URL=https://github.com/zultron/rtai-deb.git | ||
GIT_REPO=rtai-deb | ||
DEBIAN_PACKAGE_FORMAT='3.0 (quilt)' | ||
DEBIAN_PACKAGE_COMP=gz | ||
EXCLUDE_ARCHES=armhf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
VERSION=2.6.4 | ||
RELEASE=1 | ||
TARBALL_URL=http://download.gna.org/xenomai/stable/xenomai-$VERSION.tar.bz2 | ||
GIT_URL=https://github.com/zultron/xenomai-deb.git | ||
DEBIAN_PACKAGE_FORMAT='3.0 (quilt)' | ||
DEBIAN_PACKAGE_COMP=bz2 |
Oops, something went wrong.