From 192bc4fcf0b11d2292e0e69f286ba16d40981649 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 5 Jul 2016 10:54:07 -0700 Subject: More repo work. --- linux-build-farm/README.md | 2 +- linux-build-farm/aptly.sh | 16 ---------------- linux-build-farm/make-apt-repos.sh | 16 ++++++++++++++++ linux-build-farm/make-rpm-repos.sh | 17 +++++++++++++++++ 4 files changed, 34 insertions(+), 17 deletions(-) delete mode 100755 linux-build-farm/aptly.sh create mode 100755 linux-build-farm/make-apt-repos.sh create mode 100755 linux-build-farm/make-rpm-repos.sh diff --git a/linux-build-farm/README.md b/linux-build-farm/README.md index c0c8325f..8055eb0b 100644 --- a/linux-build-farm/README.md +++ b/linux-build-farm/README.md @@ -5,4 +5,4 @@ This subfolder contains Dockerfiles and a script to build Linux packages for a v Running `build.sh` with no arguments builds everything. You can run `build.sh` with the name of a distro (e.g. centos-7) to only build that. Both 32 and 64 bit packages are built except where no 32-bit version of the distribution exists. -The `aptly.sh` script creates Debian repositories with *aptly*. You will need it installed. Be careful if you have an existing *aptly* configuration since this may mess with it. +The `make-apt-repos.sh` and `make-rpm-repos.sh` scripts build repositories. They may require some editing for outside-of-ZeroTier use, and be careful with the apt one if you have an existing *aptly* configuration. diff --git a/linux-build-farm/aptly.sh b/linux-build-farm/aptly.sh deleted file mode 100755 index 7a81cc5c..00000000 --- a/linux-build-farm/aptly.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# This builds a series of Debian repositories for each distribution. - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin - -for distro in debian-* ubuntu-*; do - if [ -n "`find ${distro} -name '*.deb' -type f`" ]; then - arches=`ls ${distro}/*.deb | cut -d _ -f 3 | cut -d . -f 1 | xargs | sed 's/ /,/g'` - distro_name=`echo $distro | cut -d '-' -f 2` - echo '---' $distro / $distro_name / $arches - aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro_name} zt-release-${distro_name} - aptly repo add zt-release-${distro_name} ${distro}/*.deb - aptly publish repo zt-release-${distro_name} $distro_name - fi -done diff --git a/linux-build-farm/make-apt-repos.sh b/linux-build-farm/make-apt-repos.sh new file mode 100755 index 00000000..7a81cc5c --- /dev/null +++ b/linux-build-farm/make-apt-repos.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# This builds a series of Debian repositories for each distribution. + +export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin + +for distro in debian-* ubuntu-*; do + if [ -n "`find ${distro} -name '*.deb' -type f`" ]; then + arches=`ls ${distro}/*.deb | cut -d _ -f 3 | cut -d . -f 1 | xargs | sed 's/ /,/g'` + distro_name=`echo $distro | cut -d '-' -f 2` + echo '---' $distro / $distro_name / $arches + aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro_name} zt-release-${distro_name} + aptly repo add zt-release-${distro_name} ${distro}/*.deb + aptly publish repo zt-release-${distro_name} $distro_name + fi +done diff --git a/linux-build-farm/make-rpm-repos.sh b/linux-build-farm/make-rpm-repos.sh new file mode 100755 index 00000000..cbcaa9bf --- /dev/null +++ b/linux-build-farm/make-rpm-repos.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin + +GPG_KEY=contact@zerotier.com + +rm -rf /tmp/zt-rpm-repo +mkdir /tmp/zt-rpm-repo +cp `find . -type f -name '*.rpm'` /tmp/zt-rpm-repo + +for rpm in /tmp/zt-rpm-repo/*.rpm; do + rpmsign --resign --key-id=$GPG_KEY --digest-algo=sha256 $rpm +done + +createrepo --database /tmp/zt-rpm-repo + +echo Repo created in /tmp/zt-rpm-repo -- cgit v1.2.3