Commit 4cd1561b authored by Kolbjørn Barmen's avatar Kolbjørn Barmen

Shit that works

parent caa84613
FROM debian:jessie
WORKDIR /root/
COPY patches patches
COPY build.sh build.sh
RUN ./build.sh
CMD tar c *.deb
Radsecproxy med patcher for UNINETT/eduroame
# Build script for Radsecproxy at UNINETT
This script will generate a .deb package for Radsecproxy.
## Usage
Edit **build.sh** and set the desired version number for Radsecproxy.
```bash
docker build --no-cache -t radsecproxy-debbuild .
docker run -i radsecproxy-debbuild | tar x
```
#!/bin/sh
set -e
# set -x
export TZ="Europe/Oslo"
package="radsecproxy"
version="1.6.8"
now=$(date +"%a, %d %b %Y %T %z")
here=$(pwd)
export DEBIAN_FRONTEND=noninteractive
cat >> /etc/apt/sources.list << EOF
deb-src http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie-updates main
deb-src http://security.debian.org jessie/updates main
EOF
apt-get update
apt-get -y upgrade
apt-get -y install curl debhelper dh-autoreconf dh-systemd autotools-dev libssl-dev nettle-dev docbook2x
curl -o "${package}"_"${version}".orig.tar.gz "https://software.nordu.net/${package}/${package}-${version}.tar.gz"
tar xzf "${package}"_"${version}".orig.tar.gz
apt-get source ${package}
tar xf "${package}"_*.debian.tar.xz -C "${package}"-"${version}/"
cp patches/* "${package}"-"${version}"/debian/patches/
for patch in patches/* ; do
echo ${patch##*/}
done >> "${package}"-"${version}"/debian/patches/series
cat > changelog << EOF
radsecproxy (${version}-uninett1) unstable; urgency=medium
* New upstream release, with uninett-specific patches
-- Kolbjørn Barmen <debian@kolla.no> ${now}
EOF
cat "${package}-${version}/debian/changelog" >> changelog
cat changelog > "${package}-${version}/debian/changelog"
cd "${package}-${version}/"
dpkg-buildpackage
cd "${here}"
......@@ -2,11 +2,11 @@ $NetBSD$
These syslog messages occur way too often. ...and since Kolla
likes to run with full debugging turned on, eliminate these so
that we don't fill the /var file system.
that we don't fill the /var/log file system.
--- radsecproxy.c.orig 2010-06-03 14:44:10.000000000 +0200
+++ radsecproxy.c
@@ -419,7 +419,9 @@ struct request *newrqref(struct request
--- a/radsecproxy.c 2016-03-14 15:14:55.000000000 +0100
+++ b/radsecproxy.c 2016-08-03 15:27:28.504000000 +0200
@@ -433,7 +433,9 @@
void freerq(struct request *rq) {
if (!rq)
return;
......
......@@ -2,11 +2,11 @@ $NetBSD$
These syslog messages occur way too often. ...and since Kolla
likes to run with full debugging turned on, eliminate these so
that we don't fill the /var file system.
that we don't fill the /var/log file system.
--- udp.c.orig 2010-06-03 14:44:11.000000000 +0200
+++ udp.c
@@ -308,7 +308,9 @@ void *udpserverwr(void *arg) {
--- a/udp.c 2016-03-14 15:14:55.000000000 +0100
+++ b/udp.c 2016-08-03 15:28:31.056000000 +0200
@@ -310,7 +310,9 @@
if (sendto(reply->udpsock, reply->replybuf, RADLEN(reply->replybuf), 0, (struct sockaddr *)&to, SOCKADDR_SIZE(to)) < 0)
debug(DBG_WARN, "udpserverwr: send failed");
}
......
......@@ -2,9 +2,9 @@ $NetBSD$
Use NOTICE for requests as well
--- radsecproxy.c.orig 2010-12-23 14:01:35.000000000 +0100
+++ radsecproxy.c
@@ -1261,12 +1261,12 @@
--- a/radsecproxy.c 2016-08-03 15:27:28.504000000 +0200
+++ b/radsecproxy.c 2016-08-03 15:29:01.328000000 +0200
@@ -1284,12 +1284,12 @@
attr = radmsg_gettype(msg, RAD_Attr_User_Name);
if (!attr) {
......@@ -19,7 +19,7 @@ Use NOTICE for requests as well
free(username);
}
@@ -1469,7 +1469,7 @@
@@ -1523,7 +1523,7 @@
userascii = radattr2ascii(attr);
if (!userascii)
goto rmclrqexit;
......
......@@ -3,9 +3,9 @@ $NetBSD$
Don't overwrite LDFLAGS, only add to it. We might get flags
via the build environment, but not during the configure stage.
--- Makefile.in.orig 2012-04-16 13:08:14.000000000 +0000
+++ Makefile.in
@@ -207,7 +207,7 @@ INSTALL_DATA = @INSTALL_DATA@
--- a/Makefile.in 2016-03-14 15:15:08.000000000 +0100
+++ b/Makefile.in 2016-08-03 15:29:37.344000000 +0200
@@ -310,7 +310,7 @@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment