feat: rework repo format

This commit is contained in:
Georg K
2023-01-06 03:06:42 +03:00
parent 12ff670210
commit 3984ac3bc7
6 changed files with 3 additions and 1 deletions

4
build/.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
.git/
.idea/
*.md
*.yml

46
build/Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
ARG RADIUS_TAG="v3.2.x"
ENV RADIUS_REPO="https://github.com/FreeRADIUS/freeradius-server.git"
ENV RADIUS_TAG=${RADIUS_TAG}
ENV RLM_RAW_REPO="https://github.com/jar3b/rlm_raw.git"
ENV RLM_RAW_TAG="master"
#
# Install build tools
#
COPY local-bionic.list /etc/apt/sources.list
RUN apt-get update && apt-get install -y devscripts equivs git quilt gcc
#
# Create build directory
#
RUN mkdir -p /usr/local/src/repositories
WORKDIR /usr/local/src/repositories
RUN git clone --depth 1 --single-branch --branch ${RADIUS_TAG} ${RADIUS_REPO}
RUN git clone --depth 1 --single-branch --branch ${RLM_RAW_TAG} ${RLM_RAW_REPO}
RUN mv rlm_raw/rlm_raw freeradius-server/src/modules
WORKDIR freeradius-server
#
# Install build dependencies
#
RUN git checkout ${RADIUS_TAG}; \
if [ -e ./debian/control.in ]; then \
debian/rules debian/control; \
fi; \
echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control
#
# Build the server
#
RUN make -j2 deb && ls -la ..
WORKDIR /usr/local/src/repositories
ADD upload.sh .
RUN chmod a+x upload.sh

49
build/local-bionic.list Normal file
View File

@@ -0,0 +1,49 @@
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.yandex.ru/ubuntu/ bionic main restricted
# deb-src http://mirror.yandex.ru/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted
# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirror.yandex.ru/ubuntu/ bionic universe
# deb-src http://mirror.yandex.ru/ubuntu/ bionic universe
deb http://mirror.yandex.ru/ubuntu/ bionic-updates universe
# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirror.yandex.ru/ubuntu/ bionic multiverse
# deb-src http://mirror.yandex.ru/ubuntu/ bionic multiverse
deb http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse
# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse

9
build/upload.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
DEB_REPO=${DEB_REPO:-"https://nexus.connectone.pro/repository/radius/"}
for file in *.deb
do
curl -u "${DEB_USER}:${DEB_PASS}" -H "Content-Type: multipart/form-data" --data-binary "@./$file" "${DEB_REPO}"
done; # file